diff --git a/api/goods.js b/api/goods.js index 273a3ba..3a9c069 100644 --- a/api/goods.js +++ b/api/goods.js @@ -11,6 +11,9 @@ const api = { souser:"tes/api/Goods/searchUsers", sogoods: "AgencyAddress/order/searchGoods", addShoppingCaUrl: "AgencyAddress/order/addShoppingCa", + createOrder: "AgencyAddress/order/createOrder", + paymentListUrl: "Paymentlist/certiaudit/listIndet", + certificationPay: "PayCallBack/order/certificationPay", } // 商品列表 @@ -48,6 +51,7 @@ export const souser = (data) => { return request.post(api.souser, data ) } +// 加入购物车 export const addShoppingCa = (data) => { return request.post( api.addShoppingCaUrl + @@ -55,4 +59,25 @@ export const addShoppingCa = (data) => { '&user_isli=' + data.user_isli + '&use_years=' + data.use_years ) +} + +// 立即购买 +export const createOrder = (data) => { + return request.post( + api.createOrder + + '?goods_isli=' + data.goods_isli + + '&is_car=' + data.is_car + + '&user_isli=' + data.user_isli + + '&use_years=' + data.use_years + ) +} + +// 缴费订单列表 +export const paymentList = (data) => { + return request.get(api.paymentListUrl,data) +} + +// 缴费订单列表 +export const certificationPay = (paramStr) => { + return request.post(api.certificationPay + paramStr,{}) } \ No newline at end of file diff --git a/pages.json b/pages.json index b290740..59c4dce 100644 --- a/pages.json +++ b/pages.json @@ -355,6 +355,22 @@ "navigationBarTitleText" : "文化数字内容", "enablePullDownRefresh" : false } + }, + { + "path" : "pages/user/shopcart/index", + "style" : + { + "navigationBarTitleText" : "购物车", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/goods/payment/orderPayment", + "style" : + { + "navigationBarTitleText" : "订单结算", + "enablePullDownRefresh" : false + } } ], "globalStyle": { diff --git a/pages/goods/payment/orderPayment.vue b/pages/goods/payment/orderPayment.vue new file mode 100644 index 0000000..2d518e2 --- /dev/null +++ b/pages/goods/payment/orderPayment.vue @@ -0,0 +1,263 @@ + + + + + \ No newline at end of file diff --git a/pages/user/mycertinfo/orgverify.vue b/pages/user/mycertinfo/orgverify.vue index 72b699a..fcab039 100644 --- a/pages/user/mycertinfo/orgverify.vue +++ b/pages/user/mycertinfo/orgverify.vue @@ -1160,7 +1160,11 @@ export default { }) }, jumpUrl() { - uni.reLaunch({url: "/pages/user/index"}) + if (this.fee > 0) { + uni.reLaunch({url: "/pages/goods/payment/orderPayment"}) + } else { + uni.reLaunch({url: "/pages/user/index"}) + } }, }, } diff --git a/store/modules/user.js b/store/modules/user.js index b27a650..bbdc8ea 100644 --- a/store/modules/user.js +++ b/store/modules/user.js @@ -21,6 +21,7 @@ const loginSuccess = (commit, { token, user }, userObj = {}) => { userType = 2 } storage.set("userType",userType) + storage.set("Merchant_id",'910000198') //商户id // 记录到store全局变量 commit('SET_TOKEN', token) commit('SET_ACCOUNT_ID', user.accountId)