...
|
...
|
@@ -21,6 +21,10 @@ Component({ |
|
|
realPrice: String,
|
|
|
orderCode:String,
|
|
|
productId:String,
|
|
|
isStore:{
|
|
|
type:Boolean,
|
|
|
value: false
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -33,7 +37,7 @@ Component({ |
|
|
},
|
|
|
|
|
|
lifetimes: {
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
attached: function () {
|
...
|
...
|
@@ -44,14 +48,14 @@ attached: function () { |
|
|
console.log("lastIndex===" + lastIndex);
|
|
|
that.setData({ lastIndex: lastIndex });
|
|
|
}
|
|
|
|
|
|
|
|
|
if (that.data.timer) {
|
|
|
let leftTime = that.data.lefttime;
|
|
|
let timer = that.data.timer;
|
|
|
|
|
|
|
|
|
if(timer > 0){
|
|
|
let interval = setInterval(() => {
|
|
|
timer = timer - 1;
|
|
|
timer = timer - 1;
|
|
|
leftTime = formatTimeByMin(timer, 'm:s');
|
|
|
if (timer <= 0) {
|
|
|
leftTime = '00:00'
|
...
|
...
|
@@ -63,7 +67,7 @@ attached: function () { |
|
|
}, 1000);
|
|
|
that.setData({ interval: interval});
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -74,7 +78,7 @@ detached: function () { |
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 组件的方法列表
|
...
|
...
|
@@ -85,14 +89,13 @@ detached: function () { |
|
|
let actionCode = e.currentTarget.dataset.buttonCode;
|
|
|
let orderCode = e.currentTarget.dataset.orderCode;
|
|
|
let productId = e.currentTarget.dataset.productId;
|
|
|
|
|
|
|
|
|
if (actionCode == BUY_AGAIN) {
|
|
|
let params = {
|
|
|
id: productId
|
|
|
}
|
|
|
router.go('productDetail', params);
|
|
|
} else if (actionCode == NOW_BUY){
|
|
|
console.log("== 去支付页面===")
|
|
|
prePay(productId, orderCode, 1);
|
|
|
} else if (actionCode == SHOW_DETAIL) {
|
|
|
let params = {
|
...
|
...
|
@@ -107,9 +110,9 @@ detached: function () { |
|
|
} else {
|
|
|
showDialog(orderCode, actionCode, 0);
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|