Commit 8f43363a7cdd3a23dd24a6a6d412f6c3c7f7e87d
1 parent
7734388f
生日有礼代码调整
Showing
3 changed files
with
9 additions
and
44 deletions
pages/giftpack/birthdaygift/birthdaygift.js
@@ -35,21 +35,21 @@ Page({ | @@ -35,21 +35,21 @@ Page({ | ||
35 | getApp().request.promiseGet(url, { | 35 | getApp().request.promiseGet(url, { |
36 | data: { | 36 | data: { |
37 | "actId": th.data.getActId, //活动id | 37 | "actId": th.data.getActId, //活动id |
38 | - "actType": th.data.getActType, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | 38 | + "actType":4, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 |
39 | "giftBagId": th.data.giftID, //礼包ID | 39 | "giftBagId": th.data.giftID, //礼包ID |
40 | "storeId": a.stoid, //商家ID | 40 | "storeId": a.stoid, //商家ID |
41 | "userId": d.user_id //用户ID | 41 | "userId": d.user_id //用户ID |
42 | } | 42 | } |
43 | }).then(res => { | 43 | }).then(res => { |
44 | if (res.data.code == 0) { | 44 | if (res.data.code == 0) { |
45 | - if (res.data.data.lbCoupons != null) { | 45 | + if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons!=null) { |
46 | //礼包内容--礼券 | 46 | //礼包内容--礼券 |
47 | th.setData({ | 47 | th.setData({ |
48 | cardShow: true, | 48 | cardShow: true, |
49 | cards: res.data.data.lbCoupons | 49 | cards: res.data.data.lbCoupons |
50 | }) | 50 | }) |
51 | } | 51 | } |
52 | - if (res.data.data.lbSM != null) { | 52 | + if (res.data.data.lbSM.length > 0 && res.data.data.lbSM!=nll) { |
53 | //礼包内容--服务项目 | 53 | //礼包内容--服务项目 |
54 | th.setData({ | 54 | th.setData({ |
55 | itemShow: true, | 55 | itemShow: true, |
@@ -109,46 +109,11 @@ Page({ | @@ -109,46 +109,11 @@ Page({ | ||
109 | } | 109 | } |
110 | }) | 110 | }) |
111 | }, | 111 | }, |
112 | - //判断中间的连接线是否显示 | ||
113 | - itemShows: function () { | ||
114 | - if (this.itemShow) { | ||
115 | - if (this.cardShow) { | ||
116 | - return true; | ||
117 | - } else { | ||
118 | - return false; | ||
119 | - } | ||
120 | - } else { | ||
121 | - if (this.cardShow) { | ||
122 | - return false; | ||
123 | - } else { | ||
124 | - return false; | ||
125 | - } | ||
126 | - | ||
127 | - } | ||
128 | - }, | ||
129 | - //判断中间的连接线是否显示 | ||
130 | - cardShows: function () { | ||
131 | - if (this.cardShow) { | ||
132 | - if (this.packShow) { | ||
133 | - return true; | ||
134 | - } else { | ||
135 | - return false; | ||
136 | - } | ||
137 | - } else { | ||
138 | - if (this.packShow) { | ||
139 | - return false; | ||
140 | - } else { | ||
141 | - return false; | ||
142 | - } | ||
143 | - | ||
144 | - } | ||
145 | - }, | ||
146 | 112 | ||
147 | onLoad: function onLoad(options) { | 113 | onLoad: function onLoad(options) { |
148 | var th = this; | 114 | var th = this; |
149 | th.setData({ | 115 | th.setData({ |
150 | getActId: options.actId, | 116 | getActId: options.actId, |
151 | - getActType: options.actType, | ||
152 | giftID: options.giftBagId | 117 | giftID: options.giftBagId |
153 | }) | 118 | }) |
154 | th.GetList(); | 119 | th.GetList(); |
@@ -173,8 +138,8 @@ Page({ | @@ -173,8 +138,8 @@ Page({ | ||
173 | 138 | ||
174 | var json = { | 139 | var json = { |
175 | "actId": th.data.getActId, //活动Id | 140 | "actId": th.data.getActId, //活动Id |
176 | - "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
177 | - "lbId": th.data.giftID, //礼包Id | 141 | + "actType": 4, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
142 | + "giftBagId": th.data.giftID, //礼包Id | ||
178 | "storeId": a.stoid, //商家Id | 143 | "storeId": a.stoid, //商家Id |
179 | "userId": d.user_id //用户ID | 144 | "userId": d.user_id //用户ID |
180 | }; | 145 | }; |
pages/giftpack/birthdaygift/birthdaygift.wxml
1 | <view> | 1 | <view> |
2 | <view class="image_box"> | 2 | <view class="image_box"> |
3 | - <image src="{{iurl+'/miniapp/images/giftbag/vip00.png'}}" lazy-load="true"></image> | 3 | + <image src="{{iurl+'/miniapp/images/giftbag/birth00.png'}}" lazy-load="true"></image> |
4 | </view> | 4 | </view> |
5 | <block wx:if="{{itemShow}}"> | 5 | <block wx:if="{{itemShow}}"> |
6 | <view class="top"> | 6 | <view class="top"> |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | </block> | 49 | </block> |
50 | </view> | 50 | </view> |
51 | </block> | 51 | </block> |
52 | - <block wx:if="{{true}}"> | 52 | + <block wx:if="{{itemShow}}"> |
53 | <view > | 53 | <view > |
54 | <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | 54 | <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> |
55 | <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | 55 | <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> |
@@ -98,7 +98,7 @@ | @@ -98,7 +98,7 @@ | ||
98 | </view> | 98 | </view> |
99 | </view> | 99 | </view> |
100 | </block> | 100 | </block> |
101 | - <block wx:if="{{true}}"> | 101 | + <block wx:if="{{cardShow}}"> |
102 | <view> | 102 | <view> |
103 | <view> | 103 | <view> |
104 | <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | 104 | <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> |
pages/giftpack/birthdaygift/birthdaygift.wxss
@@ -313,7 +313,7 @@ | @@ -313,7 +313,7 @@ | ||
313 | height: 70rpx; | 313 | height: 70rpx; |
314 | font-size: 28rpx; | 314 | font-size: 28rpx; |
315 | line-height: 70rpx; | 315 | line-height: 70rpx; |
316 | - border-radius: 30rpx 30rpx 30rpx 30rpx; | 316 | + border-radius: 40rpx; |
317 | } | 317 | } |
318 | .foot_button_notbuy{ | 318 | .foot_button_notbuy{ |
319 | background: #999999; | 319 | background: #999999; |