Commit e34ebeca93b0f19d6b268baad9e34987df2de208
1 parent
fd54712c
秒杀的商品加入了自定义模板~~要显示正在的秒杀价
Showing
3 changed files
with
13 additions
and
3 deletions
components/diy_goodsGroup/diy_goodsGroup.js
| ... | ... | @@ -151,6 +151,9 @@ Component({ |
| 151 | 151 | index = 0, |
| 152 | 152 | gdata = []; |
| 153 | 153 | |
| 154 | + var user_id=getApp().globalData.user_id; | |
| 155 | + if(!user_id) user_id=0; | |
| 156 | + | |
| 154 | 157 | //--初始化卡类-- |
| 155 | 158 | th.card_init(); |
| 156 | 159 | var os=getApp().globalData.setting; |
| ... | ... | @@ -162,8 +165,10 @@ Component({ |
| 162 | 165 | for (var i = 0; i < g_id.length; i++) { |
| 163 | 166 | str += g_id[i].goodsid + ","; |
| 164 | 167 | } |
| 165 | - str=str.substring(0, str.length - 1); | |
| 168 | + str=str.substring(0, str.length - 1); | |
| 169 | + | |
| 166 | 170 | await app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, { |
| 171 | + data:{user_id:user_id}, | |
| 167 | 172 | isShowLoading:false, |
| 168 | 173 | success: function(res) { |
| 169 | 174 | th.data.loading=0; |
| ... | ... | @@ -218,6 +223,10 @@ Component({ |
| 218 | 223 | if(th.data.is_hot) r_data.is_hot=th.data.is_hot; |
| 219 | 224 | if(th.data.is_new) r_data.is_new=th.data.is_new; |
| 220 | 225 | |
| 226 | + var user_id=getApp().globalData.user_id; | |
| 227 | + if(!user_id) user_id=0; | |
| 228 | + r_data.user_id=user_id; | |
| 229 | + | |
| 221 | 230 | await app.request.promiseGet("/api/weshop/goods/page", { |
| 222 | 231 | data:r_data |
| 223 | 232 | }).then(res => { |
| ... | ... | @@ -245,6 +254,7 @@ Component({ |
| 245 | 254 | isonsale: 1, |
| 246 | 255 | orderField: "sort", |
| 247 | 256 | orderType: 'asc', |
| 257 | + user_id:user_id | |
| 248 | 258 | } |
| 249 | 259 | }).then(res => { |
| 250 | 260 | th.data.loading=0; | ... | ... |
packageB/pages/user/collect_list/collect_list.wxml
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | <!-- 优惠价 --> |
| 47 | 47 | <view class="price flex xc-wc"> |
| 48 | 48 | <view class="fs24">¥</view> |
| 49 | - <view class="fs40">{{item.shop_price}}</view> | |
| 49 | + <view class="fs40">{{item.prom_price?item.prom_price:item.shop_price}}</view> | |
| 50 | 50 | </view> |
| 51 | 51 | <!-- 原价 --> |
| 52 | 52 | <view class="flex fs24 line through xc-ash"> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -605,7 +605,7 @@ Page({ |
| 605 | 605 | }).then(res => { |
| 606 | 606 | var t = res; |
| 607 | 607 | var data = t.data.data.pageData; |
| 608 | - if (data.length > 0) { | |
| 608 | + if (data && data.length > 0) { | |
| 609 | 609 | //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, }); |
| 610 | 610 | is_collect = 1; |
| 611 | 611 | collect_id = data[0].collect_id; | ... | ... |