diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index 86cd238..7cbedc2 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -338,7 +338,7 @@ {{goods.goods_name}} - ¥{{goods.goods_price_min}} + ¥{{goods.goods_price_min?Number(goods.goods_price_min):goods.goods_price_min}} diff --git a/pages/goods/list.vue b/pages/goods/list.vue index 8a3b77c..8e26598 100644 --- a/pages/goods/list.vue +++ b/pages/goods/list.vue @@ -81,7 +81,8 @@ - ¥{{ item.goods_price_min>0?Number(item.goods_price_min):'' }} + ¥{{ item.goods_price_min>0?Number(item.goods_price_min):'' }} ¥{{ item.line_price_min>0?Number(item.line_price_min):'' }} @@ -115,8 +116,9 @@ - ¥{{ item.goods_price_min>0?Number(item.goods_price_min):'' }} 到手价 + ¥{{ item.goods_price_min>0?Number(item.goods_price_min):'' }} + 到手价 ¥{{ item.line_price_min>0?Number(item.line_price_min):'' }} @@ -126,6 +128,7 @@ + @@ -217,13 +220,24 @@ }, onChage(item, type) { if (type == 1) { - this.isBanrdActive = item.category_id; - this.keyName1 = item.name + if (item.category_id == this.isBanrdActive) { + this.isBanrdActive = ''; + this.keyName1 = '' + } else { + this.isBanrdActive = item.category_id; + this.keyName1 = item.name + } } if (type == 2) { - this.isActive = item.category_id - this.keyName2 = item.name + if (item.category_id == this.isActive) { + this.isActive = ''; + this.keyName2 = '' + } else { + this.isActive = item.category_id; + this.keyName2 = item.name + } } + this.getGoodsList() }, /** @@ -267,8 +281,9 @@ categoryId: app.options.categoryId || 0, goodsName: app.options.search || '', page: pageNo, - keywords: keywords + keywords: keywords.length > 0 ? keywords.join(',') : '' } + console.log(param) return new Promise((resolve, reject) => { GoodsApi.list(param) .then(result => { @@ -361,6 +376,10 @@