73bdaaf5 by simon

默认提交

1 parent 87fca6e1
......@@ -14,6 +14,9 @@ Page({
auctionBidVisible: false,
auctionBidSuccessVisible: false,
auctionBidFailVisible: false,
commonTipsCompVisible: false,
innerTitle: "提示",
innerText: "",
userInfo: {},
productInfo: {},
priceInfo: [],
......@@ -161,6 +164,7 @@ Page({
let _this = this;
return new Promise((resolve, reject) => {
app.post({
toast: false,
url: app.api.auctionDetail,
data: {
auctionCode: code
......@@ -174,12 +178,16 @@ Page({
// })
resolve();
}).catch((err) => {
clearTimeout(_this.data.navBackTimeout);
_this.data.navBackTimeout = setTimeout(() => {
wx.navigateBack({
delta: 1
});
}, 1000);
// clearTimeout(_this.data.navBackTimeout);
// _this.data.navBackTimeout = setTimeout(() => {
// wx.navigateBack({
// delta: 1
// });
// }, 1000);
_this.setData({
commonTipsCompVisible: true,
innerText: err.errMsg || "您未达到进入条件"
})
});
})
},
......@@ -192,6 +200,7 @@ Page({
let code = this.data.options.code;
if (code) {
app.post({
toast: false,
url: app.api.auctionRecordLast,
data: {
auctionCode: code
......@@ -433,6 +442,13 @@ Page({
this.onSubmitHandler();
break;
// 通用按钮
case "_evt_common_comp_button":
wx.navigateBack({
delta: 1
});
break;
default:
break;
}
......
......@@ -96,3 +96,7 @@
<van-popup show="{{ auctionBidFailVisible }}">
<auction-bid-fail-comp inner-title="出价失败" bind:evtcomp="evtcomp"></auction-bid-fail-comp>
</van-popup>
<van-popup show="{{ commonTipsCompVisible }}">
<common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
</van-popup>
......
......@@ -12,6 +12,9 @@ Page({
data: {
authorizeVisible: false,
seckillOrderVisible: false,
commonTipsCompVisible: false,
innerTitle: "提示",
innerText: "",
userInfo: {},
productInfo: {},
navBackTimeout: 0,
......@@ -134,6 +137,7 @@ Page({
let _this = this;
return new Promise((resolve, reject) => {
app.post({
toast: false,
url: app.api.seckillDetail,
data: {
seckillCode: code
......@@ -145,12 +149,16 @@ Page({
console.log("result:", result);
resolve();
}).catch((err) => {
clearTimeout(_this.data.navBackTimeout);
_this.data.navBackTimeout = setTimeout(() => {
wx.navigateBack({
delta: 1
});
}, 1000);
// clearTimeout(_this.data.navBackTimeout);
// _this.data.navBackTimeout = setTimeout(() => {
// wx.navigateBack({
// delta: 1
// });
// }, 1000);
_this.setData({
commonTipsCompVisible: true,
innerText: err.errMsg || "您未达到进入条件"
})
});
})
},
......@@ -260,6 +268,13 @@ Page({
this.querySeckillSubmit(data);
break;
// 通用按钮
case "_evt_common_comp_button":
wx.navigateBack({
delta: 1
});
break;
default:
break;
}
......
......@@ -53,3 +53,7 @@
<van-popup show="{{ seckillOrderVisible }}">
<seckill-order-comp id="seckillOrderComp" product-info="{{productInfo}}" user-info="{{userInfo}}" order-status="{{orderStatus}}" is-sell-out="{{isSellOut}}" bind:evtcomp="evtcomp"></seckill-order-comp>
</van-popup>
<van-popup show="{{ commonTipsCompVisible }}">
<common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
</van-popup>
......