From 8a945655409c9f2caf8ef58824202d8f922c5b87 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Tue, 19 Mar 2024 11:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/goods.js | 25 +++ pages.json | 16 ++ pages/goods/payment/orderPayment.vue | 263 +++++++++++++++++++++++++++ pages/user/mycertinfo/orgverify.vue | 6 +- store/modules/user.js | 1 + 5 files changed, 310 insertions(+), 1 deletion(-) create mode 100644 pages/goods/payment/orderPayment.vue 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)