diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 41fab01..d3baec5 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -36,7 +36,8 @@ Page({
opacity:0,
queueData:null,
zIndex:11,
- display:null
+ display:null,
+ showbutton:false
},
phone: function () {
let that = this;
@@ -111,7 +112,8 @@ Page({
gotopay: function () {
let that = this;
that.setData({
- queueData: null
+ queueData: null,
+ showbutton:true
})
Http.get({
url: config.api.getQuestion,
@@ -150,7 +152,6 @@ Page({
})
},
-
countdown(end_time) {
let that = this;
var EndTime = end_time;
@@ -273,15 +274,14 @@ Page({
}
})
.then(res => {
+ wx.hideLoading()
console.log(res);
if (!type) {
- setTimeout(() => {
- wx.navigateTo({
- url: `/pages/order/detail/index?orderId=${
- orderId
- }`
- });
- }, 1000)
+ wx.navigateTo({
+ url: `/pages/order/detail/index?orderId=${
+ orderId
+ }`
+ });
}
})
.catch(err => {
@@ -298,9 +298,9 @@ Page({
*/
orderFunc(flag) {
var that = this;
- wx.showLoading({
- title: "加载中..."
- });
+ // wx.showLoading({
+ // title: "加载中..."
+ // });
if (that.data.data.type == 6) {} else {
Http.post({
url: config.api.checkPhoneStatus,
@@ -426,7 +426,6 @@ Page({
orderId: orderId
}
}).then(res => {
- /// Begin payment ----
var payOrderId = "" + res.data.payOrderId;
wx.hideLoading();
wx.requestPayment({
@@ -436,6 +435,12 @@ Page({
signType: (res.data.signType) ? res.data.signType : "MD5",
paySign: res.data.paySign,
success: res => {
+ wx.showLoading({
+ title: '订单正在处理中...',
+ })
+ setTimeout(function(){
+ wx.hideLoading()
+ },5000)
that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that);
if (res.errMsg == "requestPayment:ok") {
setTimeout(function () {
@@ -462,6 +467,9 @@ Page({
* 支付失败,需要更新订单的状态
*/
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that);
+ that.setData({
+ showbutton: false
+ })
return;
},
complete: res => {}
@@ -483,13 +491,13 @@ Page({
key: 'couponNum',
data: "couponNum"
})
- setTimeout(function () {
- wx.navigateTo({
- url: `/pages/order/detail/index?orderId=${
- that.data.orderId
- }`
- });
- }, 1000)
+ wx.navigateTo({
+ url: `/pages/order/detail/index?orderId=${
+ that.data.orderId
+ }`
+ });
+ // setTimeout(function () {
+ // }, 1000)
// if (that.data.data.type == 5) {
// setTimeout(() => {
// wx.switchTab({
@@ -510,6 +518,11 @@ Page({
})
}
},
+ onShow(){
+ this.setData({
+ showbutton:false
+ })
+ },
onShareAppMessage: function (options) {
var that = this;
var shareObj = {
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 8201cc1..2a2669e 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -79,15 +79,18 @@
+
-
+
+
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index 98bce2b..b917686 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -136,6 +136,12 @@ Page({
signType: (res.data.signType) ? res.data.signType : "MD5",
paySign: res.data.paySign,
success: res => {
+ wx.showLoading({
+ title: '订单正在处理中...',
+ })
+ setTimeout(function () {
+ wx.hideLoading()
+ }, 5000)
that.payOrderUpdate(that.data.orderId, payOrderId, 1,'','',that); // 支付成功
},
fail: res => {
@@ -170,6 +176,7 @@ Page({
}
})
.then(res => {
+ wx.hideLoading()
if (!type) {
wx.showToast({
title: "购买成功",
diff --git a/pages/user/index.wxml b/pages/user/index.wxml
index 8c6fe7a..c68635f 100644
--- a/pages/user/index.wxml
+++ b/pages/user/index.wxml
@@ -70,7 +70,7 @@
- 版本号:3.1.0
+ 版本号:3.1.1