Showing
3 changed files
with
7 additions
and
3 deletions
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | :key="index" :class="(index) % 2 === 0 && 'magrin-right'"> | 4 | :key="index" :class="(index) % 2 === 0 && 'magrin-right'"> |
5 | <div class="item-top"> | 5 | <div class="item-top"> |
6 | <div class="item-price"> | 6 | <div class="item-price"> |
7 | - <span class="price-flag">{{product.available_now_price && '¥'}}</span><span>{{product.available_now_price || ' '}}</span> | 7 | + <span class="price-flag">{{product[priceKey] && '¥'}}</span><span>{{product[priceKey] || ' '}}</span> |
8 | </div> | 8 | </div> |
9 | <div class="item-sales">{{product.sales && product.sales + '人付款'}}</div> | 9 | <div class="item-sales">{{product.sales && product.sales + '人付款'}}</div> |
10 | </div> | 10 | </div> |
@@ -22,6 +22,10 @@ export default { | @@ -22,6 +22,10 @@ export default { | ||
22 | props: { | 22 | props: { |
23 | list: Array, | 23 | list: Array, |
24 | yasParams: Object, | 24 | yasParams: Object, |
25 | + priceKey: { | ||
26 | + type: String, | ||
27 | + default: 'available_now_price', | ||
28 | + }, | ||
25 | }, | 29 | }, |
26 | data: function() { | 30 | data: function() { |
27 | return { | 31 | return { |
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | :options="scrollOption" | 6 | :options="scrollOption" |
7 | @pulling-down="onPullingDown"> | 7 | @pulling-down="onPullingDown"> |
8 | <div class="list-wrapper" v-if="brandProductList != null"> | 8 | <div class="list-wrapper" v-if="brandProductList != null"> |
9 | - <product-list :list="brandProductList" /> | 9 | + <product-list :list="brandProductList" priceKey="price"/> |
10 | </div> | 10 | </div> |
11 | </scroll-view> | 11 | </scroll-view> |
12 | </layout-app> | 12 | </layout-app> |
@@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
48 | <img class="ref-img" v-lazy="prdDetailImage" /> | 48 | <img class="ref-img" v-lazy="prdDetailImage" /> |
49 | 49 | ||
50 | <div class="recommend" v-if="recommend"><h2>相关推荐</h2> | 50 | <div class="recommend" v-if="recommend"><h2>相关推荐</h2> |
51 | - <product-list :list="recommend" /> | 51 | + <product-list :list="recommend" priceKey="price"/> |
52 | </div> | 52 | </div> |
53 | </cube-scroll> | 53 | </cube-scroll> |
54 | </div> | 54 | </div> |
-
Please register or login to post a comment