From 6f162b6d152299398563472eb7e4939bbd2ff087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 25 Jun 2021 19:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B=EF=BC=8C=E4=BB=A5=E5=8F=8A=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=B0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/api.js | 16 ++++++++-------- pages/cart/payment/payOrder.vue | 33 +++++++++++++++++---------------- pages/cart/payment/success.vue | 17 +++++++---------- pages/order/fillorder.vue | 2 +- pages/order/myOrder.vue | 9 ++++++--- pages/product/goods.vue | 24 +++++++++++++++++++++--- pages/tabbar/home/views.vue | 3 ++- 7 files changed, 62 insertions(+), 42 deletions(-) diff --git a/config/api.js b/config/api.js index ff00800..9308538 100644 --- a/config/api.js +++ b/config/api.js @@ -4,16 +4,16 @@ */ // 开发环境 const dev = { - // common: "http://192.168.0.100:8890", - // buyer: "http://192.168.0.100:8888", - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - // common: 'http://192.168.0.109:8890', - // buyer: 'http://192.168.0.109:8888', + common: "http://192.168.0.100:8890", + buyer: "http://192.168.0.100:8888", + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // common: 'http://192.168.0.109:8890', + // buyer: 'http://192.168.0.109:8888', }; // 生产环境 -const prod = { - // common: 'http://192.168.0.109:8890', +const prod = { + // common: 'http://192.168.0.109:8890', // buyer: 'http://192.168.0.109:8888', common: "https://common-api.pickmall.cn", buyer: "https://buyer-api.pickmall.cn", diff --git a/pages/cart/payment/payOrder.vue b/pages/cart/payment/payOrder.vue index cbfa209..3b2a629 100644 --- a/pages/cart/payment/payOrder.vue +++ b/pages/cart/payment/payOrder.vue @@ -147,9 +147,9 @@ awaitPay(payment){ - - this.pay(payment) - + this.$u.throttle(()=>{ + this.pay(payment) + }, 2000) }, //订单支付 @@ -179,10 +179,10 @@ //如果支付异常 if (!signXml.data.success) { - uni.showModal({ - content: signXml.data.message, - showCancel: false, - }) + uni.showToast({ + title: signXml.data.message, + duration: 2000 + }); return; } @@ -226,15 +226,16 @@ (res) => { let response = res.data; //如果非支付宝支付才需要进行判定,因为支付宝h5支付是直接输出的,没有返回所谓的消息状态 - if(paymentMethod !== "ALIPAY"){ - //如果支付异常 - if (!response.success) { - uni.showModal({ - content: response.message, - showCancel: false, - }) - return; - } + if(paymentMethod !== "ALIPAY"){ + //如果支付异常 + if (!response.success) { + uni.showToast({ + title: response.message, + duration: 2000, + icon:"none" + }); + return; + } } if (paymentMethod === "ALIPAY") { document.write(response); diff --git a/pages/cart/payment/success.vue b/pages/cart/payment/success.vue index 72c695e..ccd4afc 100644 --- a/pages/cart/payment/success.vue +++ b/pages/cart/payment/success.vue @@ -51,7 +51,6 @@ -