From 7144fcb89c45acaf5783c0cd5d465a5239e4b1dc Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Fri, 20 Mar 2026 14:59:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package1/buyFood/buyFood.vue | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/package1/buyFood/buyFood.vue b/package1/buyFood/buyFood.vue index 486a0b5..d902ee9 100644 --- a/package1/buyFood/buyFood.vue +++ b/package1/buyFood/buyFood.vue @@ -221,6 +221,41 @@ 指定配送员 + + + + + + + 支付剩余时间 59:09 + + + ¥449.96 + + + 若拼团失败,将会为您自动退款 + + + + + + + 微信支付 + + + 使用微信支付 + + + + + + + + 确认付款 + + + + > @@ -376,6 +411,7 @@ return arr.join(','); }, submitPay(){ + this.$refs.payPopup.open('bottom'); if(this.isPaotui && !this.formData.address) { this.warnPopup = 'shdz'; this.$refs.warnPopup.open(); @@ -495,6 +531,35 @@ this.assignedWorker = null; } }, + //微信支付测试 + wxPayment() { + let that = this; + this.tui.request("/api/wechat/pay/unified-order", "POST", { + openid: uni.getStorageSync('miniProgramOpenid'), + amount: 1, // 支付金额(分) + description: '拼团订单', + outTradeNo: 'ORDER_' + Date.now() + }, false, false).then((res) => { + if (res.code == 200) { + uni.requestPayment({ + provider: 'wxpay', + timeStamp: res.timeStamp, + nonceStr: res.nonceStr, + package: res.package, + signType: res.signType, + paySign: res.paySign, + success: function(res2) { + console.log('success:' + JSON.stringify(res2)); + }, + fail: function(err) { + console.log('fail:' + JSON.stringify(err)); + } + }); + } else { + this.tui.toast(res.message) + } + }) + }, //时间选择器获取时间数据 generateDeliveryTimes() { const now = new Date(); @@ -743,6 +808,17 @@ border-radius: 50px; margin: 10px auto; } + .btn { + width: 95%; + height: 50px; + font-size: 16px; + font-weight: 700; + background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); + border-radius: 50px; + line-height: 50px; + text-align: center; + margin: 20px auto 0; + } .ziqu-box{ background: #eee; width: 90%; @@ -801,4 +877,7 @@ padding: 10px; overflow: scroll; } + .vue-ref{ + border-radius: 10px !important; + }