Commit 1b364c8226d6d46e93bbedf44d0dfdf161d2d262

Authored by 后端研发-苏明海
2 parents 09721c16 3b02e2b2

Merge branch 'dev' into 'test'

Dev

See merge request !1157
pages/cart/cart/cart.js
... ... @@ -545,7 +545,16 @@ Page({
545 545 }
546 546 }).then(res => {
547 547 if (res.data.code == 0) {
548   - prom = res.data.data
  548 + //开始时间已经开始的情况
  549 + for(var i=0;i<res.data.data.length;i++){
  550 + var a_item=res.data.data[i];
  551 + if(a_item.s_time<now) {
  552 + if(!prom) prom=[];
  553 + prom.push(a_item);
  554 + }
  555 + }
  556 +
  557 +
549 558 }
550 559 })
551 560 let prom_true = 0
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -3215,6 +3215,13 @@ Page({
3215 3215 prom = res.data.data;
3216 3216 }
3217 3217 })
  3218 + let times = new Date().getTime()
  3219 + prom.show_time_off=""
  3220 + let atimes= prom.start_time*1000
  3221 +
  3222 + if(atimes>times){
  3223 + prom.show_time_off=ut.formatTime(prom.start_time)
  3224 + }
3218 3225 }
3219 3226 console.log('活动详情------------');
3220 3227 console.log(prom);
... ... @@ -4197,6 +4204,14 @@ Page({
4197 4204 if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
4198 4205 var inte_data = res.data.data.pageData[0];
4199 4206 var can_integral = (parseFloat(integrals) >= parseFloat(inte_data.integral));
  4207 + let times = new Date().getTime()
  4208 + inte_data.show_time_off=""
  4209 + let atimes= inte_data.start_time*1000
  4210 +
  4211 + if(atimes>times){
  4212 + inte_data.show_time_off=ut.formatTime(inte_data.start_time)
  4213 + }
  4214 +
4200 4215 ee.setData({
4201 4216 prom_price: parseFloat(inte_data.addmoney),
4202 4217 prom_integral: parseFloat(inte_data.integral),
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -282,6 +282,9 @@
282 282 <view class="fs22 c-7b">分享</view>
283 283 </view>
284 284 </view>
  285 + <view class="goods-num" style="font-size: 30rpx;margin: 18rpx 0;" wx:if="{{ prom_act.show_time_off}}">
  286 + {{prom_act.show_time_off}}开始兑换
  287 + </view>
285 288 <view class="goods-title">
286 289 <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>
287 290 <view class="goods-name elli">{{data.goods_name}}</view>
... ... @@ -1167,15 +1170,37 @@
1167 1170 </view>
1168 1171 <view>单独购买</view>
1169 1172 </view>
1170   - <view bindtap="go_pay_integral" class="buy-btn cart-btn" wx:if="{{can_integral}}">
1171   - 立即兑换
  1173 + <!-- <block wx:if="{{can_integral}}">
  1174 + <view class="buy-btn cart-btn" wx:if="{{false && prom_act.show_time_off}}" style="background-color: #aaa;" >
  1175 + 即将开始1
  1176 + </view>
  1177 + <view bindtap="go_pay_integral" class="buy-btn cart-btn" wx:else>
  1178 + 立即兑换1
  1179 + </view>
  1180 +
  1181 + </block> -->
  1182 + <view class="buy-btn-all cart-btn" style="width: 30%; margin-left:1%;" wx:if="{{can_integral}}">
  1183 + <!-- 立即兑换 -->
  1184 + <!-- <view wx:if="{{ prom_act.show_time_off}}" >即将开始</view> -->
  1185 + <view wx:if="{{ prom_act.show_time_off}}" style="background-color: #aaa;">即将开始</view>
  1186 + <view bindtap="go_pay_integral" wx:else>立即兑换</view>
1172 1187 </view>
1173 1188 <view class="buy-btn cart-btn" style="background-color: #aaa;" wx:else>积分不足</view>
1174 1189 </block>
1175 1190 <block wx:else>
1176   - <view bindtap="go_pay_integral" class="buy-btn-all cart-btn" style="width: 58%; margin-left:1%;" wx:if="{{can_integral}}">
1177   - 立即兑换
  1191 + <view class="buy-btn-all cart-btn" style="width: 58%; margin-left:1%;" wx:if="{{can_integral}}">
  1192 + <view wx:if="{{ prom_act.show_time_off}}" style="background-color: #aaa;" >即将开始</view>
  1193 + <view bindtap="go_pay_integral" wx:else>立即兑换</view>
1178 1194 </view>
  1195 + <!-- <block wx:if="{{can_integral}}">
  1196 + <view class="buy-btn cart-btn" wx:if="{{false && prom_act.show_time_off}}" style="background-color: #aaa;" >
  1197 + 即将开始
  1198 + </view>
  1199 + <view bindtap="go_pay_integral" class="buy-btn cart-btn" wx:else>
  1200 + 立即兑换1
  1201 + </view> -->
  1202 +
  1203 + <!-- </block> -->
1179 1204 <view class="buy-btn-all cart-btn" style="background-color: #aaa; width: 58%;margin-left:1%" wx:else>
1180 1205 积分不足
1181 1206 </view>
... ...