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 @@
+
+
+
+
>
@@ -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;
+ }