diff --git a/pages/activity/charts.vue b/pages/activity/charts.vue index bf12027..5c0bb27 100644 --- a/pages/activity/charts.vue +++ b/pages/activity/charts.vue @@ -41,7 +41,7 @@ - ¥{{item.goods_price_min}} + ¥{{item.goods_price_min?Number(item.goods_price_min):''}} 去看看 @@ -124,7 +124,9 @@ status, message, data - } = await GoodsApi.typeList({is_in_store: 0}); + } = await GoodsApi.typeList({ + is_in_store: 0 + }); if (status == 200) { this.rankList = data.list } @@ -161,14 +163,7 @@ } Api.chartsGoodsList(pamars) .then(result => { - if (result.data.data.length > 0) { - result.data.data.forEach(item => { - item.goods_price_min = Number(item.goods_price_min); - }); - app.jingList = result.data.data; - } else { - app.jingList = [] - } + app.jingList = result.data.data || []; }) .finally(() => app.isLoading = false) }, diff --git a/pages/activity/newGoods.vue b/pages/activity/newGoods.vue index babaafd..a625882 100644 --- a/pages/activity/newGoods.vue +++ b/pages/activity/newGoods.vue @@ -28,7 +28,7 @@ - ¥{{item.goods_price_min}}起 + ¥{{item.goods_price_min?Number(item.goods_price_min):''}}起 立即购买 @@ -83,12 +83,7 @@ } Api.brandList(pamars) .then(result => { - if (result.data.data.length > 0) { - result.data.data.map(a => { - a.goods_price_min = Number(a.goods_price_min) - }) - app.list = result.data.data; - } + app.list = result.data.data; }) .finally(() => app.isLoading = false) }, diff --git a/pages/activity/newPeople.vue b/pages/activity/newPeople.vue index 3d83fda..c341cc8 100644 --- a/pages/activity/newPeople.vue +++ b/pages/activity/newPeople.vue @@ -31,8 +31,8 @@ 自营{{item.goods_name}} - {{item.goods_price_min}}到手价 - ¥{{item.line_price_min}} + {{item.goods_price_min?Number(item.goods_price_min):''}}到手价 + ¥{{item.line_price_min?Number(item.line_price_min):''}}