Commit c0d2c8105a0f26150d31fb900746388a69c5c67c

Authored by 前端研发-钱巧玲
1 parent 8f43363a

评价有礼代码调整和我的礼包变量名修改

pages/giftpack/buygiftpack/giftpackbuy.js
@@ -51,8 +51,8 @@ Page({ @@ -51,8 +51,8 @@ Page({
51 var th = this; 51 var th = this;
52 var id = e.currentTarget.dataset.id; //活动id 52 var id = e.currentTarget.dataset.id; //活动id
53 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 53 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
54 - var order_sn = e.currentTarget.dataset.order_sn;//订单号  
55 - var money=e.currentTarget.dataset.money; //支付金额 54 + var order_sn = e.currentTarget.dataset.order_sn; //订单号
  55 + var money = e.currentTarget.dataset.money; //支付金额
56 56
57 my_confirm.open( 57 my_confirm.open(
58 "是否确定购买该礼包", 58 "是否确定购买该礼包",
@@ -67,7 +67,7 @@ Page({ @@ -67,7 +67,7 @@ Page({
67 "actId": '', //活动Id 67 "actId": '', //活动Id
68 "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 68 "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
69 "buyType": '2', //1=积分兑换 2=余额购买 69 "buyType": '2', //1=积分兑换 2=余额购买
70 - "lbId": id, //礼包Id 70 + "giftBagId": id, //礼包Id
71 "storeId": that.getStorageID, //商家Id 71 "storeId": that.getStorageID, //商家Id
72 "userId": that.getUserID, //用户ID 72 "userId": that.getUserID, //用户ID
73 "buyFrom": 2 73 "buyFrom": 2
@@ -83,7 +83,7 @@ Page({ @@ -83,7 +83,7 @@ Page({
83 }, // 设置请求的 header 83 }, // 设置请求的 header
84 success: function(res) { 84 success: function(res) {
85 if (res.data.code == 0) { 85 if (res.data.code == 0) {
86 - var order_sn=res.data.data.orderSn; 86 + var order_sn = res.data.data.orderSn;
87 res = res.data.data.result; 87 res = res.data.data.result;
88 var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; 88 var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;
89 wx.requestPayment({ 89 wx.requestPayment({
@@ -95,8 +95,7 @@ Page({ @@ -95,8 +95,7 @@ Page({
95 success: function(res) { 95 success: function(res) {
96 getApp().goto(url); 96 getApp().goto(url);
97 }, 97 },
98 - fail: function(res) {  
99 - } 98 + fail: function(res) {}
100 }); 99 });
101 } else { 100 } else {
102 getApp().my_warnning(res.data.msg, 0, th); 101 getApp().my_warnning(res.data.msg, 0, th);
@@ -129,7 +128,7 @@ Page({ @@ -129,7 +128,7 @@ Page({
129 "actId": '', //活动Id 128 "actId": '', //活动Id
130 "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 129 "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
131 "buyType": '1', //1=积分兑换 2=余额购买 130 "buyType": '1', //1=积分兑换 2=余额购买
132 - "lbId": id, //礼包Id 131 + "giftBagId": id, //礼包Id
133 "storeId": that.getStorageID, //商家Id 132 "storeId": that.getStorageID, //商家Id
134 "userId": that.getUserID //用户ID 133 "userId": that.getUserID //用户ID
135 }; 134 };
pages/giftpack/evaluategift/evaluategift.js
@@ -18,7 +18,7 @@ Page({ @@ -18,7 +18,7 @@ Page({
18 cardButton: '', 18 cardButton: '',
19 getActId: '', 19 getActId: '',
20 getActType: '', 20 getActType: '',
21 - giftID: '', 21 + giftBagId: '',
22 receiveState: '一键全部领取', 22 receiveState: '一键全部领取',
23 textTitle: '', 23 textTitle: '',
24 getUrl: '', 24 getUrl: '',
@@ -28,28 +28,33 @@ Page({ @@ -28,28 +28,33 @@ Page({
28 integralTitle: "", 28 integralTitle: "",
29 growUpTitle: "", 29 growUpTitle: "",
30 is_sub: 0, //是否重复领取 30 is_sub: 0, //是否重复领取
  31 + orderNumber: "", //订单号
  32 + orderGoodsId: "", //商品id
31 }, 33 },
32 - GetList: function () { 34 + GetList: function() {
33 var th = this; 35 var th = this;
34 var url = "/api/weshop/marketing/giftbag/bound/get"; 36 var url = "/api/weshop/marketing/giftbag/bound/get";
35 getApp().request.promiseGet(url, { 37 getApp().request.promiseGet(url, {
36 data: { 38 data: {
37 - "actId": th.data.getActId, //活动id  
38 - "actType": th.data.getActType, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销  
39 - "giftBagId": th.data.giftID, //礼包ID  
40 - "storeId": a.stoid, //商家ID  
41 - "userId": d.user_id //用户ID 39 + "actId": th.data.getActId, //活动Id
  40 + "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  41 + "storeId": a.stoid, //商家Id
  42 + "userId": d.user_id, //用户ID
  43 + "orderNumber": th.data.orderNumber,
  44 + "orderType": 1,
  45 + "orderGoodsId": th.data.orderGoodsId,
  46 + "gifbagid": th.data.giftBagId
42 } 47 }
43 }).then(res => { 48 }).then(res => {
44 if (res.data.code == 0) { 49 if (res.data.code == 0) {
45 - if (res.data.data.lbCoupons != null) { 50 + if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) {
46 //礼包内容--礼券 51 //礼包内容--礼券
47 th.setData({ 52 th.setData({
48 cardShow: true, 53 cardShow: true,
49 cards: res.data.data.lbCoupons 54 cards: res.data.data.lbCoupons
50 }) 55 })
51 } 56 }
52 - if (res.data.data.lbSM != null) { 57 + if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != null) {
53 //礼包内容--服务项目 58 //礼包内容--服务项目
54 th.setData({ 59 th.setData({
55 itemShow: true, 60 itemShow: true,
@@ -109,58 +114,24 @@ Page({ @@ -109,58 +114,24 @@ Page({
109 } 114 }
110 }) 115 })
111 }, 116 },
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 -  
147 - onLoad: function onLoad(options) { 117 + onLoad: function(options) {
148 var th = this; 118 var th = this;
149 th.setData({ 119 th.setData({
150 getActId: options.actId, 120 getActId: options.actId,
151 - getActType: options.actType,  
152 - giftID: options.giftBagId 121 + orderNumber: options.orderNumber,
  122 + orderGoodsId: options.orderGoodsId,
  123 + giftBagId: options.giftBagId
153 }) 124 })
154 th.GetList(); 125 th.GetList();
155 }, 126 },
156 - onShow: function onShow() { 127 + onShow: function() {
157 var th = this; 128 var th = this;
158 var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img"); 129 var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img");
159 th.setData({ 130 th.setData({
160 textTitle: textTitle 131 textTitle: textTitle
161 }) 132 })
162 }, 133 },
163 - GetReceive: function () { 134 + GetReceive: function() {
164 var th = this; 135 var th = this;
165 if (th.data.receiveState == '已领取') { 136 if (th.data.receiveState == '已领取') {
166 return false; 137 return false;
@@ -173,10 +144,13 @@ Page({ @@ -173,10 +144,13 @@ Page({
173 144
174 var json = { 145 var json = {
175 "actId": th.data.getActId, //活动Id 146 "actId": th.data.getActId, //活动Id
176 - "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
177 - "lbId": th.data.giftID, //礼包Id 147 + "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
178 "storeId": a.stoid, //商家Id 148 "storeId": a.stoid, //商家Id
179 - "userId": d.user_id //用户ID 149 + "userId": d.user_id, //用户ID
  150 + "orderNumber": th.data.orderNumber,
  151 + "orderType": 1,
  152 + "orderGoodsId": th.data.orderGoodsId,
  153 + "giftBagId": th.data.giftBagId
180 }; 154 };
181 var data = JSON.stringify(json); 155 var data = JSON.stringify(json);
182 var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert"; 156 var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
@@ -187,7 +161,7 @@ Page({ @@ -187,7 +161,7 @@ Page({
187 header: { 161 header: {
188 'content-type': 'application/json' 162 'content-type': 'application/json'
189 }, // 设置请求的 header 163 }, // 设置请求的 header
190 - success: function (res) { 164 + success: function(res) {
191 th.setData({ 165 th.setData({
192 is_sub: 0 166 is_sub: 0
193 }) 167 })
@@ -197,19 +171,19 @@ Page({ @@ -197,19 +171,19 @@ Page({
197 }) 171 })
198 getApp().my_warnning("领取成功", 1, th); 172 getApp().my_warnning("领取成功", 1, th);
199 } else { 173 } else {
200 - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); 174 + getApp().my_warnning(res.data.msg, 0, th);
201 } 175 }
202 } 176 }
203 }) 177 })
204 } 178 }
205 }, 179 },
206 //界面跳转 180 //界面跳转
207 - goto: function (e) { 181 + goto: function(e) {
208 var url = e.currentTarget.dataset.url; 182 var url = e.currentTarget.dataset.url;
209 getApp().goto(url); 183 getApp().goto(url);
210 }, 184 },
211 //图片失败,默认图片 185 //图片失败,默认图片
212 - bind_bnerr1: function (e) { 186 + bind_bnerr1: function(e) {
213 var th = this; 187 var th = this;
214 var _errImg = e.target.dataset.errorimg; 188 var _errImg = e.target.dataset.errorimg;
215 var _Img = e.target.dataset.img; 189 var _Img = e.target.dataset.img;
pages/giftpack/evaluategift/evaluategift.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/eval00.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,15 +49,15 @@ @@ -49,15 +49,15 @@
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>
56 </view> 56 </view>
57 </block> 57 </block>
58 <block wx:if="{{cardShow}}"> 58 <block wx:if="{{cardShow}}">
59 - <view >  
60 - <view class="top "> 59 + <view>
  60 + <view class="top">
61 <view class="top_box "> 61 <view class="top_box ">
62 <view class="top_box_text "> 62 <view class="top_box_text ">
63 <text >———</text> 63 <text >———</text>
@@ -72,7 +72,6 @@ @@ -72,7 +72,6 @@
72 <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> 72 <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index">
73 <view class="top_card "> 73 <view class="top_card ">
74 <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}"> 74 <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}">
75 - <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" -->  
76 <view class="top_card_tite_box "> 75 <view class="top_card_tite_box ">
77 <block wx:if="{{item.useObjectType==0}}"> 76 <block wx:if="{{item.useObjectType==0}}">
78 <view class="top_card_tite_a">全场通用</view> 77 <view class="top_card_tite_a">全场通用</view>
@@ -98,7 +97,7 @@ @@ -98,7 +97,7 @@
98 </view> 97 </view>
99 </view> 98 </view>
100 </block> 99 </block>
101 - <block wx:if="{{true}}"> 100 + <block wx:if="{{cardShow}}">
102 <view> 101 <view>
103 <view> 102 <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> 103 <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/evaluategift/evaluategift.wxss
1 @charset "UTF-8"; 1 @charset "UTF-8";
  2 +
2 /* Author XGQ 3 /* Author XGQ
3 * 2019-10-27 4 * 2019-10-27
4 */ 5 */
  6 +
5 .image_box { 7 .image_box {
6 - -webkit-box-pack: center;  
7 - -webkit-justify-content: center;  
8 - justify-content: center; 8 + -webkit-box-pack: center;
  9 + -webkit-justify-content: center;
  10 + justify-content: center;
9 } 11 }
  12 +
10 .image_box image { 13 .image_box image {
11 - width: 100%;  
12 - height: 690rpx; 14 + width: 100%;
  15 + height: 690rpx;
13 } 16 }
  17 +
14 .top { 18 .top {
15 - margin: -20rpx 28rpx 45rpx 28rpx;  
16 - padding: 10rpx 10rpx 70rpx 10rpx;  
17 - background-color: #FFFFFF;  
18 - border-radius: 0rpx 0rpx 15rpx 15rpx; 19 + margin: -20rpx 28rpx 45rpx 28rpx;
  20 + padding: 10rpx 10rpx 70rpx 10rpx;
  21 + background-color: #fff;
  22 + border-radius: 0rpx 0rpx 15rpx 15rpx;
19 } 23 }
  24 +
20 .top_box { 25 .top_box {
21 - display: -webkit-box;  
22 - display: -webkit-flex;  
23 - display: flex;  
24 - text-align: center;  
25 - -webkit-box-pack: center;  
26 - -webkit-justify-content: center;  
27 - justify-content: center; 26 + display: -webkit-box;
  27 + display: -webkit-flex;
  28 + display: flex;
  29 + text-align: center;
  30 + -webkit-box-pack: center;
  31 + -webkit-justify-content: center;
  32 + justify-content: center;
28 } 33 }
  34 +
29 .top_box_text { 35 .top_box_text {
30 - -webkit-box-pack: center;  
31 - -webkit-justify-content: center;  
32 - justify-content: center;  
33 - margin: 50rpx 15rpx 20rpx 15rpx; 36 + -webkit-box-pack: center;
  37 + -webkit-justify-content: center;
  38 + justify-content: center;
  39 + margin: 50rpx 15rpx 20rpx 15rpx;
34 } 40 }
  41 +
35 .top_box_text text { 42 .top_box_text text {
36 - color: #FB6451;  
37 - font-size: 40rpx; 43 + color: rgb(71, 132, 239);
  44 + font-size: 40rpx;
38 } 45 }
  46 +
39 .top_item { 47 .top_item {
40 - display: -webkit-box;  
41 - display: -webkit-flex;  
42 - display: flex;  
43 - width: 100%;  
44 - margin: 60rpx 0 0 0; 48 + display: -webkit-box;
  49 + display: -webkit-flex;
  50 + display: flex;
  51 + width: 100%;
  52 + margin: 60rpx 0 0 0;
45 } 53 }
  54 +
46 .top_item_img { 55 .top_item_img {
47 - float: left;  
48 - width: 28%;  
49 - margin: 0rpx 10rpx 0rpx 20rpx; 56 + float: left;
  57 + width: 28%;
  58 + margin: 0rpx 10rpx 0rpx 20rpx;
50 } 59 }
  60 +
51 .top_item_img image { 61 .top_item_img image {
52 - width: 150rpx;  
53 - height: 150rpx;  
54 - border-radius: 50%;  
55 - border: #F96865 solid 3rpx; 62 + width: 150rpx;
  63 + height: 150rpx;
  64 + border-radius: 50%;
  65 + border: #f96865 solid 3rpx;
56 } 66 }
  67 +
57 .top_item_center { 68 .top_item_center {
58 - float: left;  
59 - width: 50%; 69 + float: left;
  70 + width: 50%;
60 } 71 }
  72 +
61 .top_item_center_title { 73 .top_item_center_title {
62 - font-size: 35rpx;  
63 - color: #FB6451;  
64 - -webkit-box-pack: start;  
65 - -webkit-justify-content: flex-start;  
66 - justify-content: flex-start;  
67 - padding: 0 10rpx 15rpx 0rpx;  
68 - word-break: break-all;  
69 - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/  
70 - text-overflow: ellipsis;  
71 - display: -webkit-box;  
72 - /** 对象作为伸缩盒子模型显示 **/  
73 - -webkit-box-orient: vertical;  
74 - /** 设置或检索伸缩盒对象的子元素的排列方式 **/  
75 - -webkit-line-clamp: 2;  
76 - /** 显示的行数 **/  
77 - overflow: hidden;  
78 - /** 隐藏超出的内容 **/ 74 + font-size: 35rpx;
  75 + color: rgb(71, 132, 239);
  76 + -webkit-box-pack: start;
  77 + -webkit-justify-content: flex-start;
  78 + justify-content: flex-start;
  79 + padding: 0 10rpx 15rpx 0rpx;
  80 + word-break: break-all;
  81 + text-overflow: ellipsis;
  82 + display: -webkit-box;
  83 + -webkit-box-orient: vertical;
  84 + -webkit-line-clamp: 2;
  85 + overflow: hidden;
79 } 86 }
  87 +
80 .top_item_center_ramke { 88 .top_item_center_ramke {
81 - font-size: 25rpx;  
82 - -webkit-box-pack: start;  
83 - -webkit-justify-content: flex-start;  
84 - justify-content: flex-start;  
85 - line-height: 35rpx;  
86 - letter-spacing: 0.5rpx;  
87 - word-break: break-all;  
88 - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/  
89 - text-overflow: ellipsis;  
90 - display: -webkit-box;  
91 - /** 对象作为伸缩盒子模型显示 **/  
92 - -webkit-box-orient: vertical;  
93 - /** 设置或检索伸缩盒对象的子元素的排列方式 **/  
94 - -webkit-line-clamp: 2;  
95 - /** 显示的行数 **/  
96 - overflow: hidden;  
97 - /** 隐藏超出的内容 **/ 89 + font-size: 25rpx;
  90 + -webkit-box-pack: start;
  91 + -webkit-justify-content: flex-start;
  92 + justify-content: flex-start;
  93 + line-height: 35rpx;
  94 + letter-spacing: 0.5rpx;
  95 + word-break: break-all;
  96 + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
  97 + text-overflow: ellipsis;
  98 + display: -webkit-box;
  99 + /** 对象作为伸缩盒子模型显示 **/
  100 + -webkit-box-orient: vertical;
  101 + /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  102 + -webkit-line-clamp: 2;
  103 + /** 显示的行数 **/
  104 + overflow: hidden;
  105 + /** 隐藏超出的内容 **/
98 } 106 }
  107 +
99 .top_item_button { 108 .top_item_button {
100 - float: right;  
101 - width: 22%;  
102 - padding: 65rpx 20rpx 0 1rpx; 109 + float: right;
  110 + width: 22%;
  111 + padding: 65rpx 20rpx 0 1rpx;
103 } 112 }
  113 +
104 .top_item_button button { 114 .top_item_button button {
105 - font-size: 25rpx;  
106 - background: #fd6969;  
107 - color: #FFFFFF;  
108 - border-radius: 50rpx;  
109 - height: 45rpx;  
110 - line-height: 45rpx; 115 + font-size: 25rpx;
  116 + background: #fd6969;
  117 + color: #fff;
  118 + border-radius: 50rpx;
  119 + height: 45rpx;
  120 + line-height: 45rpx;
111 } 121 }
  122 +
112 .top_card { 123 .top_card {
113 - width: calc(50% - 30rpx);  
114 - display: inline-block;  
115 - margin: 15rpx; 124 + width: calc(50% - 30rpx);
  125 + display: inline-block;
  126 + margin: 15rpx;
116 } 127 }
  128 +
117 .top_card_box { 129 .top_card_box {
118 - background-size: cover;  
119 - background-position: center;  
120 - background-repeat: no-repeat;  
121 - border-radius: 20rpx;  
122 - height: 250rpx;  
123 - margin: 5rpx; 130 + background-size: cover;
  131 + background-position: center;
  132 + background-repeat: no-repeat;
  133 + border-radius: 20rpx;
  134 + height: 250rpx;
  135 + margin: 5rpx;
124 } 136 }
  137 +
125 .img1 { 138 .img1 {
126 - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); 139 + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
127 } 140 }
  141 +
128 .img2 { 142 .img2 {
129 - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); 143 + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
130 } 144 }
  145 +
131 .img3 { 146 .img3 {
132 - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); 147 + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
133 } 148 }
  149 +
134 .top_card_tite_box { 150 .top_card_tite_box {
135 - width: 100%;  
136 - display: -webkit-box;  
137 - display: -webkit-flex;  
138 - display: flex;  
139 - -webkit-box-pack: end;  
140 - -webkit-justify-content: flex-end;  
141 - justify-content: flex-end; 151 + width: 100%;
  152 + display: -webkit-box;
  153 + display: -webkit-flex;
  154 + display: flex;
  155 + -webkit-box-pack: end;
  156 + -webkit-justify-content: flex-end;
  157 + justify-content: flex-end;
142 } 158 }
  159 +
143 .top_card_tite_a { 160 .top_card_tite_a {
144 - padding: 5rpx 25rpx 5rpx 25rpx;  
145 - line-height: 29rpx;  
146 - font-size: 25rpx;  
147 - color: #FFFFFF;  
148 - background: #ffa7c0;  
149 - border-radius: 0rpx 20rpx 0rpx 6rpx; 161 + padding: 5rpx 25rpx 5rpx 25rpx;
  162 + line-height: 29rpx;
  163 + font-size: 25rpx;
  164 + color: #fff;
  165 + background: #ffa7c0;
  166 + border-radius: 0rpx 20rpx 0rpx 6rpx;
150 } 167 }
  168 +
151 .top_card_tite_b { 169 .top_card_tite_b {
152 - padding: 5rpx 25rpx 5rpx 25rpx;  
153 - line-height: 29rpx;  
154 - font-size: 25rpx;  
155 - color: #FFFFFF;  
156 - background: #50dfdb;  
157 - border-radius: 0rpx 20rpx 0rpx 6rpx; 170 + padding: 5rpx 25rpx 5rpx 25rpx;
  171 + line-height: 29rpx;
  172 + font-size: 25rpx;
  173 + color: #fff;
  174 + background: #50dfdb;
  175 + border-radius: 0rpx 20rpx 0rpx 6rpx;
158 } 176 }
  177 +
159 .top_card_tite_c { 178 .top_card_tite_c {
160 - padding: 5rpx 25rpx 5rpx 25rpx;  
161 - line-height: 29rpx;  
162 - font-size: 25rpx;  
163 - color: #FFFFFF;  
164 - background: #92cbff;  
165 - border-radius: 0rpx 20rpx 0rpx 6rpx; 179 + padding: 5rpx 25rpx 5rpx 25rpx;
  180 + line-height: 29rpx;
  181 + font-size: 25rpx;
  182 + color: #fff;
  183 + background: #92cbff;
  184 + border-radius: 0rpx 20rpx 0rpx 6rpx;
166 } 185 }
  186 +
167 .top_card_tite_d { 187 .top_card_tite_d {
168 - padding: 5rpx 25rpx 5rpx 25rpx;  
169 - line-height: 29rpx;  
170 - font-size: 25rpx;  
171 - color: #FFFFFF;  
172 - border-radius: 0rpx 20rpx 0rpx 6rpx; 188 + padding: 5rpx 25rpx 5rpx 25rpx;
  189 + line-height: 29rpx;
  190 + font-size: 25rpx;
  191 + color: #fff;
  192 + border-radius: 0rpx 20rpx 0rpx 6rpx;
173 } 193 }
  194 +
174 .top_card_counte { 195 .top_card_counte {
175 - padding: 40rpx 20rpx 0 0;  
176 - text-align: center;  
177 - display: -webkit-box;  
178 - display: -webkit-flex;  
179 - display: flex;  
180 - -webkit-box-pack: center;  
181 - -webkit-justify-content: center;  
182 - justify-content: center;  
183 - -webkit-box-align: center;  
184 - -webkit-align-items: center;  
185 - align-items: center;  
186 - color: #FFFFFF;  
187 - font-size: 40rpx; 196 + padding: 40rpx 20rpx 0 0;
  197 + text-align: center;
  198 + display: -webkit-box;
  199 + display: -webkit-flex;
  200 + display: flex;
  201 + -webkit-box-pack: center;
  202 + -webkit-justify-content: center;
  203 + justify-content: center;
  204 + -webkit-box-align: center;
  205 + -webkit-align-items: center;
  206 + align-items: center;
  207 + color: #fff;
  208 + font-size: 40rpx;
188 } 209 }
  210 +
189 .top_card_remak { 211 .top_card_remak {
190 - padding: 20rpx 0 40rpx 0;  
191 - text-align: center;  
192 - display: -webkit-box;  
193 - display: -webkit-flex;  
194 - display: flex;  
195 - -webkit-box-pack: center;  
196 - -webkit-justify-content: center;  
197 - justify-content: center;  
198 - -webkit-box-align: center;  
199 - -webkit-align-items: center;  
200 - align-items: center;  
201 - font-size: 20rpx;  
202 - color: #FFFFFF; 212 + padding: 20rpx 0 40rpx 0;
  213 + text-align: center;
  214 + display: -webkit-box;
  215 + display: -webkit-flex;
  216 + display: flex;
  217 + -webkit-box-pack: center;
  218 + -webkit-justify-content: center;
  219 + justify-content: center;
  220 + -webkit-box-align: center;
  221 + -webkit-align-items: center;
  222 + align-items: center;
  223 + font-size: 20rpx;
  224 + color: #fff;
203 } 225 }
  226 +
204 .top_card_button_a button { 227 .top_card_button_a button {
205 - margin: 0 85rpx;  
206 - background: #ffa6bc;  
207 - border-radius: 50rpx;  
208 - line-height: 40rpx;  
209 - height: 40rpx;  
210 - color: white;  
211 - font-size: 25rpx; 228 + margin: 0 85rpx;
  229 + background: #ffa6bc;
  230 + border-radius: 50rpx;
  231 + line-height: 40rpx;
  232 + height: 40rpx;
  233 + color: white;
  234 + font-size: 25rpx;
212 } 235 }
  236 +
213 .top_card_button_b button { 237 .top_card_button_b button {
214 - margin: 0 85rpx;  
215 - background: #50dfdb;  
216 - border-radius: 50rpx;  
217 - line-height: 40rpx;  
218 - height: 40rpx;  
219 - color: white;  
220 - font-size: 25rpx; 238 + margin: 0 85rpx;
  239 + background: #50dfdb;
  240 + border-radius: 50rpx;
  241 + line-height: 40rpx;
  242 + height: 40rpx;
  243 + color: white;
  244 + font-size: 25rpx;
221 } 245 }
  246 +
222 .top_card_button_c button { 247 .top_card_button_c button {
223 - margin: 0 85rpx;  
224 - background: #75bcfc;  
225 - border-radius: 50rpx;  
226 - line-height: 40rpx;  
227 - height: 40rpx;  
228 - color: white;  
229 - font-size: 25rpx; 248 + margin: 0 85rpx;
  249 + background: #75bcfc;
  250 + border-radius: 50rpx;
  251 + line-height: 40rpx;
  252 + height: 40rpx;
  253 + color: white;
  254 + font-size: 25rpx;
230 } 255 }
  256 +
231 .top_card_button_d button { 257 .top_card_button_d button {
232 - margin: 0 85rpx;  
233 - border-radius: 50rpx;  
234 - line-height: 40rpx;  
235 - height: 40rpx;  
236 - color: white;  
237 - font-size: 25rpx; 258 + margin: 0 85rpx;
  259 + border-radius: 50rpx;
  260 + line-height: 40rpx;
  261 + height: 40rpx;
  262 + color: white;
  263 + font-size: 25rpx;
238 } 264 }
  265 +
239 .top_box_image { 266 .top_box_image {
240 - padding: 20rpx 20rpx 20rpx 20rpx; 267 + padding: 20rpx 20rpx 20rpx 20rpx;
241 } 268 }
  269 +
242 .top_box_image image { 270 .top_box_image image {
243 - height: 216rpx;  
244 - width: 100%; 271 + height: 216rpx;
  272 + width: 100%;
245 } 273 }
  274 +
246 .top_box_image button { 275 .top_box_image button {
247 - margin: 15rpx 95rpx 0rpx 95rpx;  
248 - background: #fe6a6a;  
249 - border-radius: 50rpx;  
250 - line-height: 60rpx;  
251 - height: 60rpx;  
252 - color: white;  
253 - font-size: 30rpx; 276 + margin: 15rpx 95rpx 0rpx 95rpx;
  277 + background: #fe6a6a;
  278 + border-radius: 50rpx;
  279 + line-height: 60rpx;
  280 + height: 60rpx;
  281 + color: white;
  282 + font-size: 30rpx;
254 } 283 }
  284 +
255 .foot_box { 285 .foot_box {
256 - margin: 0 30rpx 40rpx 30rpx;  
257 - background: #FFFFFF;  
258 - border-radius: 20rpx; 286 + margin: 0 30rpx 40rpx 30rpx;
  287 + /* background: #FFFFFF; */
  288 + border-radius: 20rpx;
  289 + color: rgb(255, 255, 255);
259 } 290 }
  291 +
260 .foot_box_title { 292 .foot_box_title {
261 - color: #000000;  
262 - padding: 20rpx 30rpx 20rpx 30rpx; 293 + /* color: #000000; */
  294 + padding: 20rpx 30rpx 20rpx 30rpx;
263 } 295 }
  296 +
264 .foot_box_text { 297 .foot_box_text {
265 - font-size: 30rpx;  
266 - color: #000000;  
267 - line-height: 48rpx;  
268 - padding: 20rpx 35rpx 50rpx 30rpx; 298 + font-size: 30rpx;
  299 + /* color: #000000; */
  300 + line-height: 48rpx;
  301 + padding: 20rpx 35rpx 50rpx 30rpx;
269 } 302 }
  303 +
270 .button_box { 304 .button_box {
271 - margin: 50rpx 50rpx 50rpx 50rpx;  
272 - text-align: center; 305 + margin: 50rpx 50rpx 50rpx 50rpx;
  306 + text-align: center;
273 } 307 }
  308 +
274 .button { 309 .button {
275 - margin: 0 30rpx;  
276 - background: #ff9a8c;  
277 - border-radius: 50rpx;  
278 - line-height: 80rpx;  
279 - height: 80rpx;  
280 - color: white;  
281 - font-size: 35rpx; 310 + margin: 0 30rpx;
  311 + background: rgb(93, 147, 245);
  312 + border-radius: 50rpx;
  313 + line-height: 80rpx;
  314 + height: 80rpx;
  315 + color: rgb(255, 255, 255);
  316 + font-size: 35rpx;
282 } 317 }
  318 +
283 .button_text { 319 .button_text {
284 - padding-top: 20rpx;  
285 - font-size: 20rpx;  
286 - color: white;  
287 - height: 100rpx; 320 + padding-top: 20rpx;
  321 + font-size: 22rpx;
  322 + color: white;
  323 + height: 100rpx;
288 } 324 }
  325 +
289 .foot_empty { 326 .foot_empty {
290 - height: 90rpx; 327 + height: 90rpx;
291 } 328 }
  329 +
292 .foot_button { 330 .foot_button {
293 - display: -webkit-box;  
294 - display: -webkit-flex;  
295 - display: flex;  
296 - margin: 20rpx 0rpx 0rpx 0rpx;  
297 - padding: 25rpx 0rpx;  
298 - background: #FFFFFF;  
299 - text-align: center;  
300 - -webkit-box-pack: center;  
301 - -webkit-justify-content: center;  
302 - justify-content: center;  
303 - position: fixed;  
304 - bottom: 0;  
305 - left: 0;  
306 - width: 100%; 331 + display: -webkit-box;
  332 + display: -webkit-flex;
  333 + display: flex;
  334 + margin: 20rpx 0rpx 0rpx 0rpx;
  335 + padding: 25rpx 0rpx;
  336 + background: #fff;
  337 + text-align: center;
  338 + -webkit-box-pack: center;
  339 + -webkit-justify-content: center;
  340 + justify-content: center;
  341 + position: fixed;
  342 + bottom: 0;
  343 + left: 0;
  344 + width: 100%;
307 } 345 }
  346 +
308 .foot_button_buy { 347 .foot_button_buy {
309 - background: #e4010c;  
310 - color: #FFFFFF;  
311 - width: 400rpx;  
312 - height: 70rpx;  
313 - font-size: 28rpx;  
314 - line-height: 70rpx;  
315 - border-radius: 30rpx;  
316 -}  
317 -.foot_button_notbuy{  
318 - background: #999999;  
319 - color: #FFFFFF;  
320 - width: 400rpx;  
321 - height: 70rpx;  
322 - font-size: 28rpx;  
323 - line-height: 70rpx;  
324 - border-radius: 30rpx 30rpx 30rpx 30rpx; 348 + background: #e4010c;
  349 + color: #fff;
  350 + width: 400rpx;
  351 + height: 70rpx;
  352 + font-size: 28rpx;
  353 + line-height: 70rpx;
  354 + border-radius: 40rpx;
325 } 355 }
  356 +
  357 +.foot_button_notbuy {
  358 + background: #999;
  359 + color: #fff;
  360 + width: 400rpx;
  361 + height: 70rpx;
  362 + font-size: 28rpx;
  363 + line-height: 70rpx;
  364 + border-radius: 40rpx;
  365 +}
  366 +
326 page { 367 page {
327 - background-color: #fb6451; 368 + background-color: rgb(71, 132, 239);
328 } 369 }
  370 +
329 button::after { 371 button::after {
330 border: none; 372 border: none;
331 } 373 }
  374 +
332 .foot_box_text ._img { 375 .foot_box_text ._img {
333 width: 100%; 376 width: 100%;
334 } 377 }
  378 +
335 .foot_box_text .img { 379 .foot_box_text .img {
336 line-height: 0; 380 line-height: 0;
337 } 381 }
338 -  
pages/giftpack/newvipgift/newvipgift.js
@@ -35,7 +35,7 @@ Page({ @@ -35,7 +35,7 @@ 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":1, //活动类型 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
@@ -109,51 +109,16 @@ Page({ @@ -109,51 +109,16 @@ 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(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();
155 }, 120 },
156 - onShow: function onShow() { 121 + onShow: function() {
157 var th = this; 122 var th = this;
158 var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img"); 123 var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img");
159 th.setData({ 124 th.setData({
@@ -174,7 +139,7 @@ Page({ @@ -174,7 +139,7 @@ Page({
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:生日营销 141 "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
177 - "lbId": th.data.giftID, //礼包Id 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/newvipgift/newvipgift.wxml
@@ -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>