Commit ca4defb7efa7b67f940e4b144fc4834f4f3f38ae
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
4 changed files
with
46 additions
and
12 deletions
pages/cart/cart2/cart2.js
| @@ -2977,7 +2977,7 @@ Page({ | @@ -2977,7 +2977,7 @@ Page({ | ||
| 2977 | console.log("index.js wx.request CheckCallUser fail"); | 2977 | console.log("index.js wx.request CheckCallUser fail"); |
| 2978 | }, | 2978 | }, |
| 2979 | complete: function () { | 2979 | complete: function () { |
| 2980 | - this.setData({ | 2980 | + th.setData({ |
| 2981 | submit:0, | 2981 | submit:0, |
| 2982 | }) | 2982 | }) |
| 2983 | } | 2983 | } |
pages/goods/goodsInfo/goodsInfo.wxml
| @@ -274,6 +274,7 @@ | @@ -274,6 +274,7 @@ | ||
| 274 | </view> | 274 | </view> |
| 275 | </view> | 275 | </view> |
| 276 | <view class="goods-title"> | 276 | <view class="goods-title"> |
| 277 | + <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
| 277 | <view class="goods-name elli">{{data.goods_name}}</view> | 278 | <view class="goods-name elli">{{data.goods_name}}</view> |
| 278 | </view> | 279 | </view> |
| 279 | <view class="goods-num"> | 280 | <view class="goods-num"> |
| @@ -388,9 +389,11 @@ | @@ -388,9 +389,11 @@ | ||
| 388 | </view> | 389 | </view> |
| 389 | </view> | 390 | </view> |
| 390 | </block> | 391 | </block> |
| 392 | + | ||
| 391 | <!-- 许程商品名字 --> | 393 | <!-- 许程商品名字 --> |
| 392 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> | 394 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> |
| 393 | <view class="goods-title"> | 395 | <view class="goods-title"> |
| 396 | + <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
| 394 | <view class="goods-name elli">{{data.goods_name}}</view> | 397 | <view class="goods-name elli">{{data.goods_name}}</view> |
| 395 | </view> | 398 | </view> |
| 396 | </view> | 399 | </view> |
| @@ -1707,9 +1710,9 @@ | @@ -1707,9 +1710,9 @@ | ||
| 1707 | </view> | 1710 | </view> |
| 1708 | </view> | 1711 | </view> |
| 1709 | <view class="pdt40"> | 1712 | <view class="pdt40"> |
| 1710 | - <view class="pdb20">活动内容</view> | 1713 | + <view class="pdb20">活动内容:</view> |
| 1711 | <view class="popup-content"> | 1714 | <view class="popup-content"> |
| 1712 | - <text class="pdb10">{{prom_act.remark}}</text> | 1715 | + <text class="pdb10">{{prom_act.remark?prom_act.remark:'暂无'}}</text> |
| 1713 | </view> | 1716 | </view> |
| 1714 | </view> | 1717 | </view> |
| 1715 | 1718 |
pages/goods/goodsInfo/goodsInfo.wxss
| @@ -127,6 +127,8 @@ image { | @@ -127,6 +127,8 @@ image { | ||
| 127 | .goods-title { | 127 | .goods-title { |
| 128 | display: flex; | 128 | display: flex; |
| 129 | justify-content: space-between; | 129 | justify-content: space-between; |
| 130 | + align-items: center; | ||
| 131 | + vertical-align: middle; | ||
| 130 | /* overflow: hidden; */ | 132 | /* overflow: hidden; */ |
| 131 | /* height: 108rpx; */ | 133 | /* height: 108rpx; */ |
| 132 | } | 134 | } |
pages/index/index/index.js
| @@ -382,19 +382,46 @@ Page({ | @@ -382,19 +382,46 @@ Page({ | ||
| 382 | flash_data.forEach(function (val, ind) { | 382 | flash_data.forEach(function (val, ind) { |
| 383 | 383 | ||
| 384 | if(val.user_price) val.price=val.user_price; | 384 | if(val.user_price) val.price=val.user_price; |
| 385 | - if (val.start_time > nt) flash_data[ind].status = 0; | ||
| 386 | - else if (val.end_time > nt) flash_data[ind].status = 1; | ||
| 387 | - if (val.buy_num >= val.goods_num) flash_data[ind].status = 2; | 385 | + if (val.start_time > nt) { |
| 386 | + flash_data[ind].status = 0; | ||
| 387 | + } else if (val.end_time > nt) { | ||
| 388 | + flash_data[ind].status = 1; | ||
| 389 | + } | ||
| 390 | + | ||
| 391 | + if (val.buy_num >= val.goods_num){ | ||
| 392 | + flash_data[ind].status = 2; | ||
| 393 | + } | ||
| 388 | }); | 394 | }); |
| 389 | 395 | ||
| 390 | - var arr = new Array(); | ||
| 391 | - //--三个三个一组--- | ||
| 392 | - for (var i = 0; i < flash_data.length; i += 3) { | ||
| 393 | - arr.push(flash_data.slice(i, i + 3)); | 396 | + var promisies = []; |
| 397 | + for (const key in flash_data) { | ||
| 398 | + if (Object.hasOwnProperty.call(flash_data, key)) { | ||
| 399 | + const val = flash_data[key]; | ||
| 400 | + promisies[key] = getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | ||
| 401 | + os.stoid + "/1/" + val.id, | ||
| 402 | + {} | ||
| 403 | + ).then(res => { | ||
| 404 | + if (res.data.code == 0) { | ||
| 405 | + if (res.data.data <= 0) flash_data[key].status = 2; | ||
| 406 | + }; | ||
| 407 | + }); | ||
| 408 | + } | ||
| 394 | } | 409 | } |
| 395 | - th.setData({ | ||
| 396 | - saleGoods: arr | 410 | + |
| 411 | + Promise.all(promisies).then((values) => { | ||
| 412 | + var arr = new Array(); | ||
| 413 | + //--三个三个一组--- | ||
| 414 | + for (var i = 0; i < flash_data.length; i += 3) { | ||
| 415 | + arr.push(flash_data.slice(i, i + 3)); | ||
| 416 | + } | ||
| 417 | + | ||
| 418 | + th.setData({ | ||
| 419 | + saleGoods: arr | ||
| 420 | + }); | ||
| 397 | }); | 421 | }); |
| 422 | + | ||
| 423 | + | ||
| 424 | + | ||
| 398 | } | 425 | } |
| 399 | }); | 426 | }); |
| 400 | 427 | ||
| @@ -1179,6 +1206,8 @@ Page({ | @@ -1179,6 +1206,8 @@ Page({ | ||
| 1179 | var url=e.currentTarget.dataset.url; | 1206 | var url=e.currentTarget.dataset.url; |
| 1180 | getApp().goto(url); | 1207 | getApp().goto(url); |
| 1181 | }, | 1208 | }, |
| 1209 | + | ||
| 1210 | + | ||
| 1182 | 1211 | ||
| 1183 | 1212 | ||
| 1184 | 1213 |