no message
This commit is contained in:
@@ -17,27 +17,27 @@ Page({
|
||||
showTips: !1,
|
||||
approve: !0
|
||||
},
|
||||
onLoad: function(a) {
|
||||
onLoad: function (a) {
|
||||
var i = this;
|
||||
e.pageStart(t).then(function(e) {
|
||||
e.pageStart(t).then(function (e) {
|
||||
i.getList(), i.setData({
|
||||
servicetel: t.globalData.servicetel
|
||||
});
|
||||
});
|
||||
},
|
||||
onShow: function(e) {
|
||||
onShow: function (e) {
|
||||
t.globalData.isneedUpload && (this.getList(), t.globalData.isneedUpload = !1);
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
onPullDownRefresh: function () {
|
||||
this.setData({
|
||||
list: []
|
||||
}), this.getList();
|
||||
},
|
||||
onReachBottom: function() {
|
||||
onReachBottom: function () {
|
||||
this.getList();
|
||||
},
|
||||
onShareAppMessage: function() {},
|
||||
getList: function() {
|
||||
onShareAppMessage: function () { },
|
||||
getList: function () {
|
||||
var a = this;
|
||||
if (this.data.loading) return !1;
|
||||
this.setData({
|
||||
@@ -46,7 +46,7 @@ Page({
|
||||
title: ""
|
||||
}), e.request(t.globalData.config.recharge.init, {
|
||||
page: this.data.page.next_page
|
||||
}, !0).then(function(t) {
|
||||
}, !0).then(function (t) {
|
||||
if (wx.hideLoading(), a.setData({
|
||||
loading: !1
|
||||
}), 200 != t.code) return wx.showModal({
|
||||
@@ -59,47 +59,60 @@ Page({
|
||||
user: t.data.user,
|
||||
protocol: t.data.protocol,
|
||||
tips: t.data.tips.split("\n")
|
||||
}, function() {});
|
||||
}).catch(function(t) {
|
||||
}, function () { });
|
||||
}).catch(function (t) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
tobuy: function(a) {
|
||||
tobuy: function (a) {
|
||||
var i = a.currentTarget.dataset.id;
|
||||
console.log(i), wx.showLoading({
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
}), e.request(t.globalData.config.recharge.create, {
|
||||
id: i
|
||||
}, !0).then(function(t) {
|
||||
}, !0).then(function (t) {
|
||||
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
|
||||
title: "提示",
|
||||
content: t.message
|
||||
}), !1;
|
||||
var e = t.data.result;
|
||||
|
||||
console.log('tobuy', e, t);
|
||||
|
||||
wx.requestPayment({
|
||||
timeStamp: e.timestamp,
|
||||
timeStamp: e.timeStamp,
|
||||
nonceStr: e.nonceStr,
|
||||
package: e.package,
|
||||
signType: e.signType,
|
||||
paySign: e.paySign,
|
||||
success: function(t) {
|
||||
success: function (t) {
|
||||
|
||||
// 加载回调接口
|
||||
e.request(t.data.notify_url, {
|
||||
orderid: t.data.orderid
|
||||
}, !0).then(function (t) {
|
||||
console.log('pay_success', t);
|
||||
}).catch(function (t) {
|
||||
console.log('pay_success', t);
|
||||
});
|
||||
|
||||
getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({
|
||||
url: "/pages/index/index"
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(function(t) {
|
||||
}).catch(function (t) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
selectItem: function(t) {
|
||||
selectItem: function (t) {
|
||||
var e = t.currentTarget.dataset.id;
|
||||
this.setData({
|
||||
selectItemID: e
|
||||
});
|
||||
},
|
||||
isSubmit: !1,
|
||||
tobuyNow: function(a) {
|
||||
tobuyNow: function (a) {
|
||||
if (!this.data.approve) return wx.showToast({
|
||||
title: "请勾选同意相关条款",
|
||||
icon: "none"
|
||||
@@ -114,34 +127,46 @@ Page({
|
||||
var i = this;
|
||||
e.request(t.globalData.config.recharge.create, {
|
||||
id: i.data.selectItemID
|
||||
}, !0).then(function(t) {
|
||||
}, !0).then(function (t) {
|
||||
if (wx.hideLoading(), i.isSubmit = !1, 200 != t.code) return wx.showModal({
|
||||
title: "提示",
|
||||
content: t.message
|
||||
}), !1;
|
||||
var e = t.data.result;
|
||||
var r = t.data.result;
|
||||
wx.requestPayment({
|
||||
timeStamp: e.timestamp,
|
||||
nonceStr: e.nonceStr,
|
||||
package: e.package,
|
||||
signType: e.signType,
|
||||
paySign: e.paySign,
|
||||
success: function(t) {
|
||||
timeStamp: r.timeStamp,
|
||||
nonceStr: r.nonceStr,
|
||||
package: r.package,
|
||||
signType: r.signType,
|
||||
paySign: r.paySign,
|
||||
success: function (o) {
|
||||
|
||||
if (t.data.notify_url) {
|
||||
// 加载回调接口
|
||||
e.request(t.data.notify_url, {
|
||||
orderid: t.data.orderid
|
||||
}, !0).then(function (t) {
|
||||
console.log('pay_success', t);
|
||||
}).catch(function (t) {
|
||||
console.log('pay_success', t);
|
||||
});
|
||||
}
|
||||
|
||||
getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({
|
||||
url: "/pages/index/index"
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(function(t) {
|
||||
}).catch(function (t) {
|
||||
wx.hideLoading(), i.isSubmit = !1;
|
||||
});
|
||||
},
|
||||
showprovision: function() {
|
||||
showprovision: function () {
|
||||
this.setData({
|
||||
showTips: !this.data.showTips
|
||||
});
|
||||
},
|
||||
change: function(t) {
|
||||
change: function (t) {
|
||||
var e = t.detail.value.length;
|
||||
this.setData({
|
||||
approve: 1 == e
|
||||
|
||||
Reference in New Issue
Block a user