Commit f6d2dc3bc540975dd0f406c6045e2b051e44c4ae

Authored by yvan.ni
1 parent e814761f

我的礼包测试返4个bug优化

components/my_confirm/my_confirm.wxml
... ... @@ -3,12 +3,14 @@
3 3 <view class="xc-obscuration" bindtap='close_yu_e' catchtouchmove="ture"></view>
4 4 <view>
5 5 <view class="xc-qr-frame">
6   - <view class="shut" bindtap="close_yu_e">ⅹ</view>
7   - <view class="fs32 xc-black3 flex jc-center ai-center" style="padding: 10rpx 20rpx;min-height:220rpx;"><text>{{title}}</text></view>
8   - <view class="flex jc-center ai_center" style="width: 100%;height: 75rpx;">
9   - <view bindtap="go_sure" class="fs30 white flex jc-center ai-center ck_btn" style="margin-right: 20rpx;background:#ececea;">{{s_text}}</view>
10   - <view bindtap='go_cancle' class="fs30 xc-ash flex jc-center ai-center ck_btn color" >{{c_text}}</view>
11   - </view>
  6 + <view style="position: relative">
  7 + <view class="shut" bindtap="close_yu_e">ⅹ</view>
  8 + <view class="fs32 xc-black3 flex jc-center ai-center" style="padding: 10rpx 20rpx;min-height:220rpx;"><text>{{title}}</text></view>
  9 + <view class="flex jc-center ai_center" style="width: 100%;height: 75rpx;">
  10 + <view bindtap="go_sure" class="fs30 white flex jc-center ai-center ck_btn" style="margin-right: 20rpx;background:#ececea;">{{s_text}}</view>
  11 + <view bindtap='go_cancle' class="fs30 xc-ash flex jc-center ai-center ck_btn color" >{{c_text}}</view>
  12 + </view>
  13 + </view>
12 14 </view>
13 15 </view>
14 16 </view>
... ...
components/my_confirm/my_confirm.wxss
... ... @@ -32,10 +32,10 @@
32 32 font-size: 40rpx;
33 33 color: #fff;
34 34 text-align: center;
35   - position: fixed;
  35 + position: absolute;
36 36 z-index: 66666;
37   - right: 75rpx;
38   - top: 465rpx;
  37 + right: -20rpx;
  38 + top: -20rpx;
39 39 background: #c8162c;
40 40 }
41 41 .xc-qr-frame{
... ...
packageA/pages/myGift/myGift.js
... ... @@ -122,7 +122,17 @@ Page({
122 122 * 页面上拉触底事件的处理函数
123 123 */
124 124 onReachBottom: function () {
125   - this.scrollToLower('/api/weshop/libao/libaoFormvip/page', {
  125 +
  126 + var url="";
  127 + var index=this.data.currentIndex;
  128 + if(index == 0) {
  129 + url = '/api/weshop/libao/libaoForm/page';
  130 + } else if(index == 1) {
  131 + url = '/api/weshop/libao/libaoFormvip/page';
  132 + };
  133 +
  134 +
  135 + this.scrollToLower(url, {
126 136 store_id: app.globalData.setting.stoid,
127 137 user_id: app.globalData.user_id,
128 138 });
... ...
packageA/pages/myGift/myGift.wxml
... ... @@ -33,7 +33,7 @@
33 33 </view>
34 34 <view class="fs22 c-a4 line-through mgl10">零售价{{filter.toFix(item.oldprice,2)}}</view>
35 35 </view>
36   - <view class="fs24 c-a4">已售{{item.salenum}}件</view>
  36 + <view class="fs24 c-a4">已售{{item.salenum+item.virtualsales}}件</view>
37 37 </view>
38 38 <!-- 时间 -->
39 39 <view class="date">活动结束日期 {{filter.format_time(item.endtime)}}</view>
... ...
packageA/pages/myGiftDetails/myGiftDetails.js
... ... @@ -2,6 +2,7 @@
2 2 const app = getApp();
3 3 let self = null;
4 4 var os = app.globalData.setting;
  5 +var ut = require("../../../utils/util.js");
5 6  
6 7 Page({
7 8  
... ... @@ -72,6 +73,14 @@ Page({
72 73 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
73 74 var da= res.data.data.pageData[0]
74 75 self.setData({ details:da, });
  76 +
  77 + //活动还未开始
  78 + if(da.startime>ut.gettimestamp()){
  79 + self.setData({ is_not_start:1, });
  80 + }
  81 +
  82 +
  83 +
75 84 console.log(da);
76 85 //礼包有俩种类型
77 86 if(da.lbtype==1){
... ...
packageA/pages/myGiftDetails/myGiftDetails.wxml
... ... @@ -5,7 +5,8 @@
5 5  
6 6 <!-- 未买 -->
7 7 <block wx:if="{{index==0}}">
8   - <view class="fs26 exp_title">活动结束时间:{{filter.format_time(details.endtime,1)}}</view>
  8 + <view wx:if="{{is_not_start}}" class="fs26 exp_title">活动开始时间:{{filter.format_time(details.startime,1)}}</view>
  9 + <view wx:else class="fs26 exp_title">活动结束时间:{{filter.format_time(details.endtime,1)}}</view>
9 10 </block>
10 11 <!-- 已买 -->
11 12 <block wx:else>
... ... @@ -37,7 +38,7 @@
37 38 </view>
38 39 <view class="fs22 c-a4 line-through mgl10">零售价{{filter.toFix(details.oldprice,2)}}</view>
39 40 </view>
40   - <view class="fs24 c-a4">已售{{details.salenum}}件</view>
  41 + <view class="fs24 c-a4" wx:if="{{!is_not_start}}">已售{{details.salenum+details.virtualsales}}件</view>
41 42 </view>
42 43 <!-- 时间 -->
43 44 <!-- <view class="date">活动结束日期 {{filter.format_time(details.endtime)}}</view> -->
... ... @@ -86,7 +87,8 @@
86 87 <view class="lb_quan" style="background-image: url({{imghost}}/miniapp/images/yhq_{{index%2+1}}.png)">
87 88 <view class="flex fs28 fir_view">
88 89 <view>满{{item.condition}}使用</view>
89   - <view class="fs8" style="text-align: right">¥{{item.money}}</view>
  90 + <view wx:if="{{item.type==6}}" class="fs8" style="text-align: center; padding-right: 40rpx; font-size: 35rpx">包邮</view>
  91 + <view wx:else class="fs8" style="text-align: right">¥{{item.money}}</view>
90 92 </view>
91 93  
92 94  
... ... @@ -122,8 +124,13 @@
122 124 <!-- 按钮 -->
123 125 <view class="btn-container" wx:if="{{details.lbtype==1}}">
124 126 <block wx:if="{{index == 0}}">
125   - <view wx:if="{{details.lbintegral>0}}" bindtap="GetBuyIntegral" class="btn red">立即兑换</view>
126   - <view wx:if="{{details.lbprice>0}}" bindtap="GetBuyPrice" class="btn pink">立即购买</view>
  127 + <block wx:if="{{is_not_start}}">
  128 + <view class="btn gray">活动还未开始</view>
  129 + </block>
  130 + <block wx:else>
  131 + <view wx:if="{{details.lbintegral>0}}" bindtap="GetBuyIntegral" class="btn red">立即兑换</view>
  132 + <view wx:if="{{details.lbprice>0}}" bindtap="GetBuyPrice" class="btn pink">立即购买</view>
  133 + </block>
127 134 </block>
128 135  
129 136 <block wx:else>
... ... @@ -136,8 +143,14 @@
136 143  
137 144 <view class="btn-container" wx:if="{{details.lbtype==2}}">
138 145 <block wx:if="{{index == 0}}">
139   - <view wx:if="{{details.lbintegral>0}}" bindtap="GetBuyIntegral" class="btn red">立即兑换</view>
140   - <view wx:if="{{details.lbprice>0}}" bindtap="GetBuyPrice" class="btn pink">立即购买</view>
  146 + <block wx:if="{{is_not_start}}">
  147 + <view class="btn gray">活动还未开始</view>
  148 + </block>
  149 + <block wx:else>
  150 + <view wx:if="{{details.lbintegral>0}}" bindtap="GetBuyIntegral" class="btn red">立即兑换</view>
  151 + <view wx:if="{{details.lbprice>0}}" bindtap="GetBuyPrice" class="btn pink">立即购买</view>
  152 + </block>
  153 +
141 154 </block>
142 155 <block wx:else>
143 156 <view wx:if="{{details.isget}}" data-type="1" class="btn" style="background-color:#aaa;color: #fff">已领取</view>
... ...
packageA/pages/myGiftDetails/myGiftDetails.wxss
... ... @@ -78,6 +78,13 @@ page {
78 78 color: #FF6768;
79 79 }
80 80  
  81 +.btn.gray{
  82 + background-color: #cccccc;
  83 + color:#fff
  84 +}
  85 +
  86 +
  87 +
81 88 .ling_btn{ background: #c0283a; color: #fff; width: 100rpx; height: 50rpx;
82 89 display: inline-block; line-height: 50rpx; border-radius: 10rpx}
83 90  
... ...