From 1a493b4faf108510c36533882a125774f3666320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E6=98=9F=E6=98=9F?= <605893810@qq.com> Date: Thu, 23 Jul 2026 20:11:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order_submit/order_submit.vue | 76 ++++++++++++------- .../other_package/productInfo/productInfo.vue | 26 +++++-- 2 files changed, 66 insertions(+), 36 deletions(-) diff --git a/pages/order_package/order_submit/order_submit.vue b/pages/order_package/order_submit/order_submit.vue index 4fb3c89..d1def93 100644 --- a/pages/order_package/order_submit/order_submit.vue +++ b/pages/order_package/order_submit/order_submit.vue @@ -411,19 +411,19 @@ export default { this.sed = JSON.parse(option.sed); this.leftPathType = "navigateTo"; this.leftPath = null; - await this.addressList(); - // console.log('addressListOne',this.addressListOne) - // if(this.addressListOne && this.addressListOne.length){ - // this.addressShow = true; - // } + await this.addressList(); + // console.log('addressListOne',this.addressListOne) + // if(this.addressListOne && this.addressListOne.length){ + // this.addressShow = true; + // } this.getOrderTwo(); } - + if (option.ids) { this.ids = option.ids; this.getOrder(); } - + console.log("参数---", option, this.defaultAddress); const addressShowPop = option.addressShow; @@ -493,7 +493,7 @@ export default { }, onCancel() { if (this.type == "2") { - uni.redirectTo({ + uni.redirectTo({ url: "/pages/rwa_package/forgotPass/forgotPass?type=1", }); } @@ -501,7 +501,7 @@ export default { }, onConfirm() { if (this.type == "1") { - uni.redirectTo({ + uni.redirectTo({ url: "/pages/rwa_package/forgotPass/forgotPass?type=1", }); } else { @@ -532,21 +532,28 @@ export default { }, async getWayOption() { let parmas = {}; - if (this.isPoints) { - parmas["types"] = "4"; - } else { - parmas["types"] = "1,2,3"; - } - console.log("parmas-----", this.isCoupon); + // if (this.isPoints) { + // parmas["types"] = "4"; + // } else { + // parmas["types"] = "1,2,3"; + // } + // console.log("parmas-----", this.isCoupon); - if (this.isCoupon) { - parmas["types"] = "1,2,3"; - parmas.isDeduction = true; - } + // if (this.isCoupon) { + // parmas["types"] = "1,2,3"; + // parmas.isDeduction = true; + // } + + // if (this.sed?.activedType == "seckill") { + // parmas["types"] = "1,2,3"; + // } + // #ifdef MP-WEIXIN + parmas["types"] = "1,3"; + // #endif + // #ifndef MP-WEIXIN + parmas["types"] = "1,2,3"; + // #endif - if (this.sed?.activedType == "seckill") { - parmas["types"] = "1,2,3"; - } const result = await getSupportPay(parmas); if (result && result.bizcode === 100) { const data = result.data || []; @@ -901,7 +908,7 @@ export default { if (params.payway == "wechat") { // #ifdef MP-WEIXIN - params["payway"] = "wechatMiniProgram"; + params["payway"] = "wechat"; params["code"] = await new Promise((resolve) => { uni.login({ provider: "weixin", @@ -920,7 +927,7 @@ export default { console.log("收货地址ID--params", params); let resp = null; - console.log("orderInfo----", this.sed); + console.log("orderInfo----", this.sed, this.orderInfo); if (this.sed) { if ( this.orderInfo.paymentMethod == "balance" || @@ -939,8 +946,21 @@ export default { params["activityId"] = Number(this.sed?.activityId); // 秒杀活动ID resp = await setSeckillOrder(params); } else { - if (this.isCoupon) params.payway2 = "vcoin"; - resp = await settlementOrder(params); + if (this.isCoupon) { + params.payway2 = "vcoin"; + resp = await settlementOrder(params); + } else { + // params["cartIds"] = this.ids; + if ( + this.orderInfo.paymentMethod == "balance" || + this.orderInfo.paymentMethod == "redpacket" + ) { + params["password"] = CryptoJS.MD5(this.payPwd).toString(); + } + resp = await settle(params); + } + + // resp = await settle(params); } } else { params["cartIds"] = this.ids; @@ -957,8 +977,8 @@ export default { // 提交订单成功,就唤起支付 if (resp && resp.bizcode === 100) { - console.log("提交订单成功", resp.data); - const item = resp.data; + console.log("提交订单成功", resp.data); + const item = resp.data; if (item.status === 1) { jumpWayOk(); return; diff --git a/pages/other_package/productInfo/productInfo.vue b/pages/other_package/productInfo/productInfo.vue index b0c3cde..d763a1b 100644 --- a/pages/other_package/productInfo/productInfo.vue +++ b/pages/other_package/productInfo/productInfo.vue @@ -1331,8 +1331,8 @@ export default { }; console.log("selectTempl", selectTempl); - if (this.isShowCart == 1 || this.isCoupon || isBy) { - console.log("活动类型params---秦星星", params, this.isCoupon); + if (this.isShowCart == 1 || this.isCoupon) { + console.log("活动类型params---秦星星", params, this.isCoupon, this.isShowCart == 1); params["specsId"] = selectTempl; let url = ""; if (this.activedType == "seckill") { @@ -1356,6 +1356,8 @@ export default { this.specificationShow = false; } + console.log("活动类型params---秦星星--1", url); + uni.navigateTo({ url: url }); @@ -1363,12 +1365,20 @@ export default { } const resp = await addGoods(params); if (resp && resp.bizcode === 100) { - this.specificationShow = false; - uni.showToast({ - title: "成功加入购物车", - icon: "success", // 可选 success/loading/none - duration: 2000, // 持续时长,单位ms - }); + + if (isBy) { + uni.navigateTo({ + url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}&address=${this.selectAddress?.id}`, + }); + } else { + this.specificationShow = false; + uni.showToast({ + title: "成功加入购物车", + icon: "success", // 可选 success/loading/none + duration: 2000, // 持续时长,单位ms + }); + } + } }, // 跳转到分享页面