解决秒杀活动可能在首页出现的bug

This commit is contained in:
lemon橪
2022-07-08 11:12:13 +08:00
parent 86fa39d7af
commit 12839eee8d

View File

@@ -52,7 +52,7 @@ export default {
methods: {
getIndexData () {
// 获取首页装修数据
indexData({ clientType: 'PC' }).then((res) => {
indexData({ clientType: 'PC' }).then(async (res) => {
if (res.success) {
let dataJson = JSON.parse(res.result.pageData);
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
@@ -65,7 +65,7 @@ export default {
this.carouselLarge = true
this.carouselOpacity = true
} else if (type === 'seckill') {
let seckill = this.getListByDay()
let seckill = await this.getListByDay()
dataJson.list[i].options.list = seckill
}
}