修复购物车添加促销商品出现的Bug

master
ran 2022-04-29 12:07:30 +08:00
parent 79f737404e
commit dc04b4220f
3 changed files with 8 additions and 10 deletions

View File

@ -1 +0,0 @@
qSyvBPhDsPdxvOhC

View File

@ -195,10 +195,6 @@
}
},
"plugins" : {
"myPlugin" : {
"version" : "1.1.0",
"provider" : "wx738958e0f4c894f9"
},
"live-player-plugin" : {
"version" : "1.3.0",
"provider" : "wx2b03c6e691cd7370"

View File

@ -239,9 +239,12 @@ export default {
* 倒数计时
*/
getCountDownTime(val) {
let date = new Date(val.replace(/-/g, "/"));
let timeSimple = new Date(date).getTime() / 1000;
return timeSimple - new Date().getTime() / 1000;
if (val.promotionMap) {
let key = Object.keys(val.promotionMap).find((child, index) => {
return child.split("-")[0] == 'SECKILL'
});
return val.promotionMap[key].endTime / 1000 - (new Date().getTime() / 1000)
}
},
/**