Commit 1bee0608f27f5d2f1aeae59b5d72fd4d0c230539

Authored by WXD-SEASON\season
1 parent cfe8414d

移包

Showing 51 changed files with 189 additions and 8932 deletions
app.json
... ... @@ -16,13 +16,9 @@
16 16 "pages/user/userqy/userqy",
17 17 "pages/user/plus/plus",
18 18 "pages/user/my_service/i_service",
19   - "pages/giftpack/birthdaygift/birthdaygift",
20   - "pages/giftpack/evaluategift/evaluategift",
21   - "pages/giftpack/newvipgift/newvipgift",
22   - "pages/giftpack/payment/payment",
23   - "pages/giftpack/buygiftpack/giftpackbuy",
24   - "pages/giftpack/giftpacklist/giftpacklist",
25   - "pages/giftpack/mygiftpack/mygiftpack",
  19 +
  20 +
  21 +
26 22 "pages/user/assistance/giftpacklist",
27 23 "pages/user/assistance/task_assistance",
28 24 "pages/user/assistance/friend_assistance",
... ... @@ -213,7 +209,15 @@
213 209 "pages/user/return_goods_list/return_goods_list",
214 210 "pages/user/return_goods/return_goods",
215 211 "pages/user/address_list/address_list",
216   - "pages/user/add_address/add_address"
  212 + "pages/user/add_address/add_address",
  213 +
  214 + "pages/giftpack/birthdaygift/birthdaygift",
  215 + "pages/giftpack/evaluategift/evaluategift",
  216 + "pages/giftpack/newvipgift/newvipgift",
  217 + "pages/giftpack/payment/payment",
  218 + "pages/giftpack/buygiftpack/giftpackbuy",
  219 + "pages/giftpack/giftpacklist/giftpacklist",
  220 + "pages/giftpack/mygiftpack/mygiftpack"
217 221 ]
218 222  
219 223 },
... ...
components/diy_user_my_rights/diy_user_my_rights.js
... ... @@ -27,7 +27,7 @@ Component({
27 27 var giftbagid = th.properties.b_gift.giftbagid;
28 28  
29 29 if (actId != "" && giftbagid != "") {
30   - getApp().goto("/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3);
  30 + getApp().goto("/packageF/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3);
31 31 } else {
32 32 getApp().showWarning("请稍后重试");
33 33 }
... ...
components/promate_pop/promate_pop.js
... ... @@ -111,9 +111,9 @@ Component({
111 111 let url = '';
112 112 if (flag == 2) { // flag =1 控制跳转到专享礼包
113 113 url = `/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id=${id}&is_act=1`;
114   - // url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
  114 +
115 115 } else if (flag == 1) { // flag =1 控制跳转到专享礼包
116   - url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
  116 + url = `/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
117 117 } else {
118 118 url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮
119 119 };
... ...
packageA/pages/activity_share/activity_share.js
... ... @@ -150,7 +150,7 @@ Page({
150 150 //礼包的转发
151 151 if(th.data.currentIndex==3) {
152 152 var lbid=th.data.hui_active.lbId;
153   - var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
  153 + var url="/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
154 154 if(getApp().globalData.user_id){
155 155 url+="&first_leader="+getApp().globalData.user_id;
156 156 }
... ... @@ -1437,7 +1437,7 @@ Page({
1437 1437 var index=e.currentTarget.dataset.index;
1438 1438 var item=this.data.list[index];
1439 1439 var lbid=item.lbId;
1440   - var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
  1440 + var url="/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
1441 1441 getApp().goto(url);
1442 1442 },
1443 1443  
... ...
packageA/pages/jfbuy/jfbuy.js
... ... @@ -234,7 +234,7 @@ Page({
234 234 // //礼包的转发
235 235 // if(th.data.currentIndex==3){
236 236 // var lbid=th.data.hui_active.lbId;
237   - // var url="pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
  237 + // var url="packageF/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
238 238 // if(getApp().globalData.user_id){
239 239 // url+="&first_leader="+getApp().globalData.user_id;
240 240 // }
... ...
packageA/pages/my_service/tment_eval.js
... ... @@ -252,7 +252,7 @@ Page({
252 252 var gifbagid = this.data.gifbagid;
253 253 console.log(id,"订单", this.data.number),
254 254 wx.redirectTo({
255   - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
  255 + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
256 256 });
257 257  
258 258 },
... ...
packageA/pages/my_service2/tment_eval.js
... ... @@ -252,7 +252,7 @@ Page({
252 252 var gifbagid = this.data.gifbagid;
253 253 console.log(id,"订单", this.data.number),
254 254 wx.redirectTo({
255   - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
  255 + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
256 256 });
257 257  
258 258 },
... ...
packageB/pages/evaluate/evaluate.js
... ... @@ -320,7 +320,7 @@ Page({
320 320 var ty=this.data.ftype?this.data.ftype:2;
321 321 var isdg = this.data.isdg
322 322 wx.redirectTo({
323   - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType="+ty+"&orderNumber="+this.data.number+"&isdg="+isdg
  323 + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType="+ty+"&orderNumber="+this.data.number+"&isdg="+isdg
324 324 });
325 325  
326 326 },
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.js
... ... @@ -1352,7 +1352,7 @@ Page({
1352 1352 break;
1353 1353 };
1354 1354 case 6: {
1355   - url = `/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&orderSn=${ordersn}&lbId=${buyreceive_id}`;
  1355 + url = `/packageF/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&orderSn=${ordersn}&lbId=${buyreceive_id}`;
1356 1356 break;
1357 1357 };
1358 1358 //-- 每月礼包的优化,去列表领取 --
... ...
packageB/pages/user/view_comment/view_comment.wxml
... ... @@ -133,7 +133,7 @@
133 133 <view class="fs30 flex-level white " bindtap="goto" data-url="/packageB/pages/user/comment/comment">评价其他</view>
134 134 </view>
135 135 <view class="flex-level" wx:if="{{is_act}}">
136   - <view class="fs30 flex-level white receive" data-url="/pages/giftpack/evaluategift/evaluategift?actId={{actId}}&orderNumber={{order_id}}&orderGoodsId={{goods_id}}&giftBagId={{giftBagId}}" bindtap="goto">点击领取礼品</view>
  136 + <view class="fs30 flex-level white receive" data-url="/packageF/pages/giftpack/evaluategift/evaluategift?actId={{actId}}&orderNumber={{order_id}}&orderGoodsId={{goods_id}}&giftBagId={{giftBagId}}" bindtap="goto">点击领取礼品</view>
137 137 </view>
138 138 </view>
139 139 </block>
... ...
packageE/pages/cart/cart2/cart2.js
... ... @@ -8245,7 +8245,7 @@ Page({
8245 8245 } else if (flag == 1) {
8246 8246 url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮
8247 8247 } else {
8248   - url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
  8248 + url = `/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
8249 8249 };
8250 8250 // console.log('myurl', url);
8251 8251 getApp().goto(url);
... ...
packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js
... ... @@ -567,7 +567,7 @@ Page({
567 567 // var th = this;
568 568 // var nav_b = th.selectComponent("#nav_b"); //组件的id
569 569 // nav_b.close_box();
570   - // nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy");
  570 + // nav_b.set_name("礼包", "/packageF/pages/giftpack/buygiftpack/giftpackbuy");
571 571 // },
572 572  
573 573 //--- 分享设置 --
... ... @@ -972,7 +972,7 @@ Page({
972 972 }
973 973 ///二微码
974 974 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
975   - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist";
  975 + os.stoid + "?sceneValue=" + scene + "&pageValue=packageF/pages/giftpack/giftpacklist/giftpacklist";
976 976  
977 977 // 读取文件成功则OK--
978 978 wx.getImageInfo({
... ...
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
... ... @@ -1130,7 +1130,7 @@ Page({
1130 1130 }
1131 1131 ///二微码
1132 1132 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
1133   - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist";
  1133 + os.stoid + "?sceneValue=" + scene + "&pageValue=packageF/pages/giftpack/giftpacklist/giftpacklist";
1134 1134  
1135 1135 // 读取文件成功则OK--
1136 1136 wx.getImageInfo({
... ...
packageG/pages/user/my_service/tment_eval.js
... ... @@ -251,7 +251,7 @@ Page({
251 251 var gifbagid = this.data.gifbagid;
252 252 console.log(id,"订单", this.data.number),
253 253 wx.redirectTo({
254   - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
  254 + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
255 255 });
256 256  
257 257 },
... ...
pages/giftpack/birthdaygift/birthdaygift.js
1   -var i = require("../../../utils/util.js")
2   -const com = require("../../giftpack/public/buy_com.js");
3   -var e = getApp(),
4   - a = e.globalData.setting,
5   - os = a,
6   - t = e.request,
7   - d = e.globalData;
8 1 Page({
9   - data: {
10   - url: a.url, //接口网址
11   - iurl: a.imghost, //图片前缀网址
12   - itemShow: false, //项目栏目是否显示
13   - cardShow: false, //代金券栏目是否显示
14   - packShow: false, //福利栏目是否显示
15   - textShow: false, //规则是否显示
16   - integralShow: true, //积分领取是否显示
17   - growUpShow: true, //成长值领取是否显示
18   - itemButton: '',
19   - cardButton: '',
20   - getActId: '',
21   - getActType: '',
22   - giftID: '',
23   - receiveState: 0,
24   - textTitle: '',
25   - getUrl: '',
26   - noShow: false,
27   - cards: [], //礼包内容--礼券
28   - itemWare: [], //礼包内容--服务项目
29   - integralTitle: "",
30   - growUpTitle: "",
31   - is_sub: 0, //是否重复领取
32   -
33   - //门店相关
34   - ismend: 0,
35   - is_sec_mend: 0,
36   - sto_sele_name: "", //选中的门店名称
37   - sto_sele_id: "", //选中的门店id
38   - sto_sele_distr: "", //选择的门店的配送方式
39   - is_show_sto_cat: 1, //是否显示门店分类
40   - only_pk: null,
41   - all_sto: null,
42   - sec_sto: null, //选择了的门店分类
43   - pickpu_list: null, //读出的所有门店list
44   - def_pickpu_list: null, //一开始5个门店list
45   - sec_pick_index: 0, //第二级门店选择ID
46   - fir_pick_index: 0, //第一级门店选择ID
47   - all_pick_list: null,//所有的门店先记录起来
48   -
49   - select_store: 0, //选择更多
50   - index: 1,
51   - more_store: 0, //选择门店
52   - sort_store: 0, //门店分类
53   - choice_sort_store: 0, //选择分类门店
54   - new_user: 0, //新用户
55   -
56   - def_pick_store: null, // 默认的门店
57   - fir_def_store: null, //客户默认的门店的
58   - lat: null, //维度
59   - lon: null, //经度
60   -
61   - is_get_local_ok: 0, //获取坐标是否完成
62   - region_name: "门店分类", //区域的名字
63   - is_gps: 1,
64   - open_ind_store: 0, //哪里打开的门店列表的控制属性
65   - default_store: {}, //创建添加默认门店地址的对象
66   -
67   - store: 0,
68   - openSpecModal: 0,
69   - },
70   - GetList:function() {
71   - var th = this;
72   - var url = "/api/weshop/marketing/giftbag/bound/get";
73   - getApp().request.promiseGet(url, {
74   - isShowLoading: true,
75   - data: {
76   - "actId": th.data.getActId, //活动id
77   - "actType": 4, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销
78   - "storeId": a.stoid, //商家ID
79   - "userId": d.user_id //用户ID
80   - }
81   - }).then(res => {
82   - if (res.data.code == 0) {
83   - th.setData({
84   - giftID: res.data.data.id,
85   - })
86   -
87   - if(th.data.pickup_list && res.data.data.lbType.indexOf(',1,')>-1){
88   -
89   - th.data.is_nd_pk=1;
90   - //-- 检测一下有没有门店 --
91   - th.check_guide(function (){
92   - com.wait_for_store_config(th);
93   - com.set_user_mo_store(th, os, function () {
94   - if (th.data.def_pick_store) {
95   - com.check_def_pk(th);
96   - }
97   - });
98   - com.get_sto(th, os);
99   - })
100   - }
101   -
102   - if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) {
103   - //礼包内容--礼券
104   - th.setData({
105   - cardShow: true,
106   - cards: res.data.data.lbCoupons
107   - })
108   - }
109   - if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != null) {
110   - //礼包内容--服务项目
111   - th.setData({
112   - itemShow: true,
113   - itemWare: res.data.data.lbSM
114   - })
115   - }
116   - //礼包积分
117   - if (res.data.data.lbIntegral <= 0) {
118   - if (res.data.data.lbGrowthValue <= 0) {
119   - th.setData({
120   - packShow: false
121   - })
122   - } else {
123   - th.setData({
124   - packShow: false,
125   - integralShow: false,
126   - growUpShow: true
127   - })
128   - }
129   -
130   - } else {
131   - if (res.data.data.lbGrowthValue > 0) {
132   - th.setData({
133   - packShow: true
134   - })
135   - } else {
136   - th.setData({
137   - packShow: true,
138   - integralShow: true,
139   - growUpShow: false
140   - })
141   - }
142   - }
143   - th.setData({
144   - integralTitle: '价值' + res.data.data.lbIntegral + '积分',
145   - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值'
146   - })
147   - if (res.data.data.receiveState == 0) {
148   - th.setData({
149   - receiveState: 0
150   - })
151   - } else {
152   - th.setData({
153   - receiveState: 1
154   - })
155   - }
156   -
157   - if (res.data.data.actIntro != '') {
158   - th.setData({
159   - textShow: true,
160   - textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
161   - })
162   - }
163   - } else {
164   - getApp().my_warnning(res.data.msg, 0, th);
165   - return false;
166   - }
167   - })
168   - },
169   -
170   - onLoad: function onLoad(options) {
171   - var th = this;
172   - th.setData({
173   - getActId: options.actId,
174   - giftID: options.giftBagId,
175   - buyType:4
176   - })
177   -
178   - getApp().getConfig2(function (e) {
179   - var json_d = JSON.parse(e.switch_list);
180   - th.setData({
181   - bconfig: e,
182   - sys_switch: json_d,
183   - is_retail_price: json_d.is_retail_price || 0
184   - });
185   - })
186   -
187   - },
188   - onShow: function onShow() {
189   - //--先判断会员状态--
190   - var user_info = getApp().globalData.userInfo;
191   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
192   - getApp().goto('/packageE/pages/togoin/togoin');
193   - return false;
194   - }
195   - this.is_birthdayInfo(this.GetList);
196   -
197   - },
198   -
199   - //-- 领取礼包的优化 --
200   - GetReceive:function (){
201   - var th=this;
202   - if(this.data.is_nd_pk){
203   - th.setData({ openSpecModal: 1 })
204   - th.pp_bacK_func=th.GetReceive_next; //设置回调函数
205   - }else{
206   - th.GetReceive_next();
207   - }
208   - },
209   -
210   - GetReceive_next: function() {
211   - var th = this;
212   - if (th.data.receiveState) {
213   - return false;
214   - }
215   - var is_sub = th.data.is_sub; //判断是否重复提交
216   - if (is_sub == 0) {
217   - th.setData({
218   - is_sub: 1
219   - })
220   - var json = {
221   - "actId": th.data.getActId, //活动Id
222   - "actType": 4, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
223   - "giftBagId": th.data.giftID, //礼包Id
224   - "storeId": a.stoid, //商家Id
225   - "userId": d.user_id, //用户ID
226   - "buyFrom": 2
227   - };
228   -
229   - //-- 如果需要门店的时候 --
230   - if( th.data.is_nd_pk==1){
231   - json.pickup_id=th.data.def_pick_store.pickup_id;
232   - }
233   -
234   - var data = JSON.stringify(json);
235   - var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
236   - getApp().request.json_post(url, json,
237   - function(res) {
238   - th.setData({
239   - is_sub: 0
240   - })
241   - if (res.data.code == 0) {
242   - th.setData({
243   - receiveState: 1
244   - })
245   - getApp().my_warnning("领取成功", 1, th);
246   - } else {
247   - getApp().my_warnning(res.data.msg, 0, th);
248   - }
249   - },
250   - function(res) {
251   -
252   - }
253   -
254   - )
255   -
256   - }
257   - },
258   - //获取生日有礼信息
259   - is_birthdayInfo: function(func) {
260   - var th = this;
261   - var url = `/api/weshop/marketing/get/${a.stoid}/${th.data.getActId}`;
262   - console.log(th.data.getActId);
263   - getApp().request.promiseGet(url, {
264   -
265   - }).then(res => {
266   - console.log(res,20000);
267   - if (res.data.code == 0) {
268   -
269   - var sele_g=res.data.data;
270   -
271   - sele_g.giftTitle=sele_g.actName;
272   - sele_g.lbUrl=sele_g.actImg;
273   -
274   -
275   - let birthdayStyle=`
276   - --bg-color:${res.data.data.actBgColor};
277   - --color:${res.data.data.actFontColor};
278   - `
279   -
280   -
281   - if(res.data.data.is_pickup){
282   - th.data.pickup_list=res.data.data.pickup_list;
283   - sele_g.pickup_list=res.data.data.pickup_list;
284   - sele_g.is_pickup=1;
285   - }
286   -
287   - th.setData({
288   - bimg: res.data.data.actBoundImg,
289   - birthdayStyle,
290   - sele_g
291   - // actFontColor: res.data.actFontColor, //字体颜色
292   - // actBgColor: res.data.actBgColor, //背景颜色
293   - })
294   -
295   - func();
296   -
297   - }
298   - })
299   - },
300   - //界面跳转
301   - goto: function(e) {
302   - var url = e.currentTarget.dataset.url;
303   - getApp().goto(url);
304   - },
305   - //图片失败,默认图片
306   - bind_bnerr1: function(e) {
307   - var th = this;
308   - var _errImg = e.target.dataset.errorimg;
309   - var _Img = e.target.dataset.img;
310   - if (_Img != undefined) {
311   - var _errObj = {};
312   - _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
313   - th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
314   - }
315   - },
316   -
317   - buy_libao: function () {
318   - com.buy_libao(this)
319   - },
320   -
321   -
322   - //-- 选择门店 --
323   - choice_store: function (ee) {
324   - this.setData({
325   - keyword:''
326   - })
327   -
328   - //--先判断会员状态--
329   - var user_info = getApp().globalData.userInfo;
330   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
331   - wx.navigateTo({
332   - url: '/packageE/pages/togoin/togoin',
333   - })
334   - return false;
335   - }
336   -
337   - var th = this;
338   - var ind = ee.currentTarget.dataset.ind;
339   - var bconfig = th.data.bconfig;
340   -
341   - //如果开启了,则不在选择门店
342   - // if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
343   - // return false;
344   - // }
345   - // if (!th.data.only_pk && !th.data.def_pickpu_list) {
346   - // getApp().confirmBox("门店库存不足", null, 25000, !1);
347   - // return false;
348   - // }
349   -
350   - if (th.data.only_pk && !th.data.only_pk.length) {
351   - getApp().confirmBox("门店库存不足", null, 25000, !1);
352   - return false;
353   - }
354   - if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
355   - getApp().confirmBox("门店库存不足", null, 25000, !1);
356   - return false;
357   - }
358   -
359   -
360   - if (bconfig && bconfig.is_sort_storage) {
361   - wx.getLocation({
362   - type: 'gcj02',
363   - success: function (res) {
364   -
365   - th.data.lat = res.latitude;
366   - th.data.lon = res.longitude;
367   - th.data.is_get_local_ok = 1;
368   - th.setData({
369   - is_gps: 1
370   - });
371   - //th.onShow();
372   - com.get_sto(th, os);
373   - },
374   - fail: function (res) {
375   - //th.onShow();
376   - th.data.is_get_local_ok = 1;
377   - com.get_sto(th, os);
378   - if (res.errCode == 2) {
379   - th.setData({
380   - is_gps: 0
381   - });
382   - if (th.data.is_gps == 0) {
383   - getApp().confirmBox("请开启GPS定位", null, 25000, !1);
384   - }
385   - } else {
386   - th.setData({
387   - is_gps: "3"
388   - });
389   - }
390   -
391   - }
392   - })
393   - } else {
394   - th.data.is_get_local_ok = 1;
395   - com.get_sto(th, os);
396   - }
397   -
398   - if (ind != undefined && ind != null) {
399   - this.setData({
400   - open_ind_store: ind,
401   - store: 1,
402   - openSpecModal: !1,
403   - openSpecModal_pt: !1,
404   - openSpecModal_flash_normal: !1,
405   - })
406   - } else {
407   - this.setData({
408   - store: 1,
409   - openSpecModal: !1,
410   - openSpecModal_pt: !1,
411   - openSpecModal_flash_normal: !1
412   -
413   - })
414   - }
415   - },
416   - //关闭选择门店
417   - close_popup: function (e) {
418   - var th = this;
419   - this.setData({
420   - store: 0,
421   - choice_sort_store: 0,
422   - sort_store: 0,
423   - fir_pick_index: 0,
424   - sec_pick_index: 0
425   - })
426   -
427   - var openindstore = this.data.open_ind_store;
428   - if (openindstore == 1) {
429   - th.setData({
430   - openSpecModal: !0,
431   - openSpecModal_ind: openindstore,
432   - });
433   - } else if (openindstore == 2) {
434   - th.setData({
435   - openSpecModal: !0,
436   - openSpecModal_ind: openindstore,
437   - });
438   - } else if (openindstore == 4) { //4就是拼团
439   - th.setData({
440   - openSpecModal_pt: 1, //打开拼团购买界面
441   - store: 0, //关闭门店
442   - choice_sort_store: 0, //关闭门店2级
443   - sort_store: 0, //关闭门店2级
444   - });
445   - } else {
446   - th.setData({
447   - store: 0,
448   - choice_sort_store: 0,
449   - sort_store: 0
450   - })
451   - }
452   -
453   -
  2 + data: {},
  3 + onLoad: async function(options) {
  4 + getApp().globalData.ts_trans_data=options;
  5 + getApp().goto('/packageF/pages/giftpack/birthdaygift/birthdaygift');
454 6 },
455   - //选择更多门店
456   - more_store: function () {
457   - this.setData({
458   - sort_store: 1
459   - });
460   - },
461   - // 返回按钮
462   - returns: function () {
463   - this.setData({
464   - sort_store: 0,
465   - choice_sort_store: 0
466   - });
467   - },
468   - //---选择分类门店---
469   - choice_sort_store: function (e) {
470   - var index = e.currentTarget.dataset.index;
471   - var region_name = e.currentTarget.dataset.region;
472   - var item = this.data.all_sto[index];
473   - this.setData({
474   - region_name: region_name,
475   - sort_store: 0,
476   - choice_sort_store: 1,
477   - sec_i:index,
478   - sec_sto: item,
479   - sec_pick_index: 0
480   - });
481   - },
482   - choose_for_store_fir: function (e) {
483   - var index_c = e.currentTarget.dataset.ind;
484   - var th = this;
485   - th.setData({
486   - fir_pick_index: index_c
487   - })
488   -
489   - },
490   - //确定def_pick为选择的门店
491   - sure_pick: function (e) {
492   - var th = this;
493   - var item = null;
494   - var openindstore = th.data.open_ind_store;
495   -
496   - if (th.data.choice_sort_store == 0) {
497   - var index = th.data.fir_pick_index;
498   - if (th.data.is_show_sto_cat == 1) {
499   - item = th.data.def_pickpu_list[index];
500   - } else {
501   - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
502   - }
503   -
504   - } else {
505   - var index = th.data.sec_pick_index;
506   - item = th.data.sec_sto.s_arr[index];
507   - }
508   -
509   - if(!item) return false;
510   -
511   - if (!th.data.sele_g) return false;
512   -
513   - th.setData({
514   - def_pick_store: item,
515   - sto_sele_name: item.pickup_name,
516   - sto_sele_id: item.pickup_id,
517   - sto_sele_distr: item.distr_type,
518   - store: 0,
519   - choice_sort_store: 0,
520   - fir_pick_index: 0,
521   - openSpecModal: !0,
522   - });
523   -
524   -
525   - },
526   - //---点击二级之后的选择---
527   - choose_for_store: function (e) {
528   - var index_c = e.currentTarget.dataset.ind;
529   - var th = this;
530   - th.setData({
531   - sec_pick_index: index_c,
532   - fir_pick_index: index_c
533   - })
534   -
535   - },
536   - //把选择的门店设置成默认的门店def_pick
537   - set_def_pick: function (e) {
538   - var th = this;
539   - var item = null;
540   - if (th.data.choice_sort_store == 0) {
541   - var index = th.data.fir_pick_index;
542   - if (th.data.is_show_sto_cat == 1) {
543   - item = th.data.def_pickpu_list[index];
544   - } else {
545   - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
546   - }
547   - } else {
548   - var index = th.data.sec_pick_index;
549   - item = th.data.sec_sto.s_arr[index];
550   - }
551   -
552   - if(!item) return false;
553   -
554   - th.setData({
555   - def_pick_store: item,
556   - sto_sele_name: item.pickup_name,
557   - sto_sele_id: item.pickup_id,
558   - sto_sele_distr: item.distr_type,
559   - store: 0,
560   - choice_sort_store: 0,
561   - openSpecModal: !0,
562   - });
563   -
564   - var user_id = getApp().globalData.user_id;
565   - var def_pickup_id = item.pickup_id;
566   - getApp().request.put('/api/weshop/users/update', {
567   - data: {
568   - user_id: user_id,
569   - def_pickup_id: def_pickup_id
570   - },
571   - success: function (res) {
572   - if (res.data.code == 0) {
573   - if (th.data.choice_sort_store == 0) th.setData({
574   - fir_pick_index: 0
575   - });
576   - getApp().globalData.pk_store = item;
577   - } else {
578   - getApp().my_warnning("设置默认门店地址失败", 0, th)
579   - }
580   -
581   - }
582   - });
583   -
584   -
585   - },
586   - closeSpecModal: function () {
587   - this.setData({openSpecModal: 0});
588   - },
589   -
590   - //获取搜索门店输入的值
591   - input_store: function(e) {
592   - this.setData({
593   - keyword: e.detail.value
594   - })
595   - },
596   - //-- 搜索门店 --
597   - searchfn(){
598   - let choice_sort_store = this.data.choice_sort_store
599   - if (choice_sort_store==0) { //全局搜索
600   - let all_pick_list = this.data.all_pick_list
601   - let def_pickpu_list = this.data.def_pickpu_list
602   - let keyword = this.data.keyword
603   - if (keyword) {
604   - let arr=all_pick_list.filter( item =>{
605   - let i = item.pickup_name.indexOf(keyword)
606   - if (i > -1) {
607   - return true
608   - }else{
609   - return false
610   - }
611   - })
612   - if (arr && arr.length>0) {
613   - if(this.data.is_show_sto_cat==1){
614   - this.setData({
615   - def_pickpu_list:arr
616   - })
617   - }else{
618   - this.setData({
619   - only_pk:arr
620   - })
621   - }
622   - }else{
623   - wx.showToast({
624   - title: '没有搜索到门店',
625   - icon: 'none',
626   - duration: 2000
627   - })
628   - }
629   - }else{
630   - if (this.data.is_show_sto_cat==1) {
631   - this.setData({
632   - def_pickpu_list:all_pick_list.slice(0,10)
633   - })
634   - }else{
635   - this.setData({
636   - only_pk:all_pick_list
637   - })
638   - }
639   -
640   - }
641   - }else{ //分类下搜索
642   - let sec_i=this.data.sec_i
643   - let all_sto = this.data.all_sto
644   - let old_all_sto = this.data.old_all_sto
645   - if (!old_all_sto) {
646   - this.setData({
647   - old_all_sto:JSON.parse(JSON.stringify(all_sto))
648   - })
649   - }
650   - let sec_sto= this.data.sec_sto
651   - let sec_arr = this.data.old_all_sto[sec_i].s_arr
652   - let keyword = this.data.keyword
653   - let text='sec_sto.s_arr'
654   - if (keyword) {
655   - let arr=sec_arr.filter( item =>{
656   - let i = item.pickup_name.indexOf(keyword)
657   - if (i > -1) {
658   - return true
659   - }else{
660   - return false
661   - }
662   - })
663   - if (arr && arr.length>0) {
664   - this.setData({
665   - [text]:arr
666   - })
667   - }else{
668   - wx.showToast({
669   - title: '没有搜索到门店',
670   - icon: 'none',
671   - duration: 2000
672   - })
673   - }
674   - }else{
675   - if(this.data.old_all_sto){
676   - this.setData({
677   - [text]: this.data.old_all_sto[sec_i].s_arr
678   - })
679   - }else{
680   - this.setData({
681   - [text]: all_sto[sec_i].s_arr
682   - })
683   - }
684   -
685   - }
686   -
687   -
688   - }
689   - },
690   -
691   - check_guide(func){
692   - var first_leader=this.data.first_leader;
693   - if(!first_leader){
694   - func();
695   - return false;
696   - }
697   - if(this.data.is_geted_guide_pick){
698   - func();
699   - return false;
700   - }
701   - if(getApp().globalData.guide_pick_id){
702   - func();
703   - return false;
704   - }
705   - var th=this;
706   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
707   - if (res.data.code == 0) {
708   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
709   - }
710   - th.data.is_geted_guide_pick=1;
711   - func();
712   - })
713   - },
714   -
  7 + //显示加载
  8 + onShow:function(){ },
715 9  
716   -});
717 10 \ No newline at end of file
  11 +})
718 12 \ No newline at end of file
... ...
pages/giftpack/birthdaygift/birthdaygift.json
1 1 {
2   - "navigationBarTitleText": "生日礼包",
3   - "usingComponents": {
4   - "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm"
6   - }
  2 + "windom": {
  3 + "navigationBarTitleText": "加载中.",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
  8 + }
  9 +
7 10 }
8 11 \ No newline at end of file
... ...
pages/giftpack/birthdaygift/birthdaygift.wxml
1   -<view style="{{birthdayStyle}}" class="font_and_bg">
2   - <view class="image_box">
3   - <image src="{{iurl}}{{bimg?bimg:'/miniapp/images/default_g_img.gif'}}" binderror="bind_bnerr1" data-errorimg="bimg" lazy-load="true"></image>
4   - </view>
5   - <block wx:if="{{itemShow}}">
6   - <view class="top rel">
7   - <view class="top_box">
8   - <view class="top_box_text">
9   - <text>______</text>
10   - </view>
11   - <view class="top_box_text">
12   - <text>生日专享\n你的美丽我来缔造</text>
13   - </view>
14   - <view class="top_box_text">
15   - <text>______</text>
16   - </view>
17   - </view>
18   - <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index">
19   - <view class="top_item ">
20   - <block wx:if="{{item.lbType==3}}">
21   - <view class="top_item_img">
22   - <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image>
23   - </view>
24   - </block>
25   - <block wx:if="{{item.lbType==1}}">
26   - <view class="top_item_img ">
27   - <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image>
28   - </view>
29   - </block>
30   - <view class="top_item_center ">
31   - <view class="top_item_center_title">
32   - <block wx:if="{{item.lbType==1}}">
33   - <text>免费领取</text>
34   - </block>
35   - <block wx:if="{{item.lbType==3}}">
36   - <text>{{item.fromName}}</text>
37   - </block>
38   - </view>
39   - <view class="top_item_center_ramke ">
40   - <block wx:if="{{item.lbType==1}}">
41   - <text>{{item.fromName}}</text>
42   - </block>
43   - <block wx:if="{{item.lbType==3}}">
44   - <text>{{"生日可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text>
45   - </block>
46   - <view class="num flex-level-right fs26">
47   - <view>数量:</view>
48   - <view>{{item.num}}</view>
49   - </view>
50   - </view>
51   - </view>
52   - </view>
53   - </block>
54   - <block wx:if="{{itemShow}}">
55   - <view class="vips">
56   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
57   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
58   - </view>
59   - </block>
60   - </view>
61   - </block>
62   - <block wx:if="{{cardShow}}">
63   - <view>
64   - <view class="top rel">
65   - <view class="top_box ">
66   - <view class="top_box_text ">
67   - <text>———</text>
68   - </view>
69   - <view class="top_box_text ">
70   - <text>生日专享优惠券</text>
71   - </view>
72   - <view class="top_box_text ">
73   - <text>———</text>
74   - </view>
75   - </view>
76   - <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index">
77   - <view class="top_card ">
78   - <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}">
79   - <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" -->
80   - <view class="top_card_tite_box ">
81   - <block wx:if="{{item.useObjectType==0}}">
82   - <view class="top_card_tite_a">全场通用</view>
83   - </block>
84   - <block wx:if="{{item.useObjectType==1}}">
85   - <view class="top_card_tite_b">品牌限定</view>
86   - </block>
87   - <block wx:if="{{item.useObjectType==2}}">
88   - <view class="top_card_tite_c">品类限定</view>
89   - </block>
90   - <block wx:if="{{item.useObjectType==11}}">
91   - <view class="top_card_tite_a">用途限定</view>
92   - </block>
93   - <block wx:if="{{item.useObjectType==12}}">
94   - <view class="top_card_tite_a">分类限定</view>
95   - </block>
96   - </view>
97   - <block wx:if="{{item.isPack!=null}}">
98   - <view class="top_card_counte">包邮券</view>
99   - </block>
100   - <block wx:else>
101   - <view class="top_card_counte ">{{item.sum+"元券"}}</view>
102   - </block>
103   - <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view>
104   - </view>
105   - </view>
106   - </block>
107   - <block wx:if="{{packShow}}">
108   - <view class="vips">
109   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
110   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
111   - </view>
112   - </block>
113   - </view>
114   - </view>
115   - </block>
116   - <block wx:if="{{packShow}}">
117   - <view>
118   - <view class="top ">
119   - <view class="top_box ">
120   - <view class="top_box_text ">
121   - <text>———</text>
122   - </view>
123   - <view class="top_box_text ">
124   - <text>生日专享福利</text>
125   - </view>
126   - <view class="top_box_text ">
127   - <text>———</text>
128   - </view>
129   - </view>
130   - <block wx:if="{{integralShow}}">
131   - <view>
132   - <view class="top_box_image ">
133   - <image src="{{iurl+'/miniapp/images/giftbag/integral.png'}}" lazy-load="true"></image>
134   - <button>{{integralTitle}}</button>
135   - </view>
136   - </view>
137   - </block>
138   - <block wx:if="{{growUpShow}}">
139   - <view>
140   - <view class="top_box_image fs36">
141   - <image src="{{iurl+'/miniapp/images/giftbag/vgrowup.png'}}" lazy-load="true"></image>
142   - <button>{{growUpTitle}}</button>
143   - </view>
144   - </view>
145   - </block>
146   - </view>
147   - </view>
148   - </block>
149   - <block wx:if="{{textShow}}">
150   - <view class="foot_box">
151   - <view class="foot_box_title fs36">
152   - <text>活动规则:</text>
153   - </view>
154   - <view class="foot_box_text">
155   - <rich-text nodes="{{textTitle}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
156   - </view>
157   - </view>
158   - </block>
159   - <view class="button_box">
160   - <view>
161   - <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button>
162   - </view>
163   - <view class="button_text ">
164   - <text>本活动最终解释权归公司所有,如果有问题请联系客服</text>
165   - </view>
166   - </view>
167   - <view class="foot_empty "></view>
168   - <view class="foot_button">
169   - <block wx:if="{{receiveState}}">
170   - <view class="foot_button_notbuy">
171   - <text>已领取</text>
172   - </view>
173   - </block>
174   - <block wx:else>
175   - <view class="foot_button_buy'}}" bindtap="GetReceive">
176   - <text>一键全部领取</text>
177   - </view>
178   - </block>
179   - </view>
  1 +<!---- //文字"-->
  2 +<view class="rty">
  3 + <view style="margin-top:260rpx">加载中。。</view>
180 4 </view>
181   -<!-- 引入提示组件 -->
182   -<warn id="warn"></warn>
183   -<my_confirm id="my_confirm"></my_confirm>
184   -<include src="../public/buy_com.wxml"></include>
185 5 \ No newline at end of file
... ...
pages/giftpack/birthdaygift/birthdaygift.wxss
1   -@charset "UTF-8";
2   -/* Author XGQ
3   - * 2019-10-27
4   - */
5   -.image_box {
6   - -webkit-box-pack: center;
7   - -webkit-justify-content: center;
8   - justify-content: center;
9   -}
10   -.image_box image {
11   - width: 100%;
12   - height: 690rpx;
13   -}
14   -.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   -}
20   -.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;
28   -}
29   -.top_box_text {
30   - -webkit-box-pack: center;
31   - -webkit-justify-content: center;
32   - justify-content: center;
33   - margin: 50rpx 15rpx 20rpx 15rpx;
34   -}
35   -.top_box_text text {
36   - color: #FB6451;
37   - font-size: 40rpx;
38   -}
39   -.top_item {
40   - display: -webkit-box;
41   - display: -webkit-flex;
42   - display: flex;
43   - width: 100%;
44   - margin: 60rpx 0 0 0;
45   -}
46   -.top_item_img {
47   - float: left;
48   - width: 28%;
49   - margin: 0rpx 10rpx 0rpx 20rpx;
50   -}
51   -.top_item_img image {
52   - width: 150rpx;
53   - height: 150rpx;
54   - border-radius: 50%;
55   - border: #F96865 solid 3rpx;
56   -}
57   -.top_item_center {
58   - float: left;
59   - width: 50%;
60   -}
61   -.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   - /** 隐藏超出的内容 **/
79   -}
80   -.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   - /** 隐藏超出的内容 **/
98   -}
99   -.top_item_button {
100   - float: right;
101   - width: 22%;
102   - padding: 65rpx 20rpx 0 1rpx;
103   -}
104   -.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;
111   -}
112   -.top_card {
113   - width: 309rpx;
114   - display: inline-block;
115   - margin: 15rpx;
116   - vertical-align:top;
117   -}
118   -.top_card_box {
119   - background-size: cover;
120   - background-position: center;
121   - background-repeat: no-repeat;
122   - border-radius: 20rpx;
123   - height: 250rpx;
124   - margin: 5rpx;
125   -}
126   -.img1 {
127   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
128   -}
129   -.img2 {
130   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
131   -}
132   -.img3 {
133   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
134   -}
135   -.top_card_tite_box {
136   - width: 100%;
137   - display: -webkit-box;
138   - display: -webkit-flex;
139   - display: flex;
140   - -webkit-box-pack: end;
141   - -webkit-justify-content: flex-end;
142   - justify-content: flex-end;
143   -}
144   -.top_card_tite_a {
145   - padding: 5rpx 25rpx 5rpx 25rpx;
146   - line-height: 29rpx;
147   - font-size: 25rpx;
148   - color: #FFFFFF;
149   - background: #ffa7c0;
150   - border-radius: 0rpx 20rpx 0rpx 6rpx;
151   -}
152   -.top_card_tite_b {
153   - padding: 5rpx 25rpx 5rpx 25rpx;
154   - line-height: 29rpx;
155   - font-size: 25rpx;
156   - color: #FFFFFF;
157   - background: #50dfdb;
158   - border-radius: 0rpx 20rpx 0rpx 6rpx;
159   -}
160   -.top_card_tite_c {
161   - padding: 5rpx 25rpx 5rpx 25rpx;
162   - line-height: 29rpx;
163   - font-size: 25rpx;
164   - color: #FFFFFF;
165   - background: #92cbff;
166   - border-radius: 0rpx 20rpx 0rpx 6rpx;
167   -}
168   -.top_card_tite_d {
169   - padding: 5rpx 25rpx 5rpx 25rpx;
170   - line-height: 29rpx;
171   - font-size: 25rpx;
172   - color: #FFFFFF;
173   - border-radius: 0rpx 20rpx 0rpx 6rpx;
174   -}
175   -.top_card_counte {
176   - padding: 40rpx 20rpx 0 0;
177   - text-align: center;
178   - display: -webkit-box;
179   - display: -webkit-flex;
180   - display: flex;
181   - -webkit-box-pack: center;
182   - -webkit-justify-content: center;
183   - justify-content: center;
184   - -webkit-box-align: center;
185   - -webkit-align-items: center;
186   - align-items: center;
187   - color: #FFFFFF;
188   - font-size: 40rpx;
189   -}
190   -.top_card_remak {
191   - padding: 20rpx 0 40rpx 0;
192   - text-align: center;
193   - display: -webkit-box;
194   - display: -webkit-flex;
195   - display: flex;
196   - -webkit-box-pack: center;
197   - -webkit-justify-content: center;
198   - justify-content: center;
199   - -webkit-box-align: center;
200   - -webkit-align-items: center;
201   - align-items: center;
202   - font-size: 20rpx;
203   - color: #FFFFFF;
204   -}
205   -.top_card_button_a button {
206   - margin: 0 85rpx;
207   - background: #ffa6bc;
208   - border-radius: 50rpx;
209   - line-height: 40rpx;
210   - height: 40rpx;
211   - color: white;
212   - font-size: 25rpx;
213   -}
214   -.top_card_button_b button {
215   - margin: 0 85rpx;
216   - background: #50dfdb;
217   - border-radius: 50rpx;
218   - line-height: 40rpx;
219   - height: 40rpx;
220   - color: white;
221   - font-size: 25rpx;
222   -}
223   -.top_card_button_c button {
224   - margin: 0 85rpx;
225   - background: #75bcfc;
226   - border-radius: 50rpx;
227   - line-height: 40rpx;
228   - height: 40rpx;
229   - color: white;
230   - font-size: 25rpx;
231   -}
232   -.top_card_button_d button {
233   - margin: 0 85rpx;
234   - border-radius: 50rpx;
235   - line-height: 40rpx;
236   - height: 40rpx;
237   - color: white;
238   - font-size: 25rpx;
239   -}
240   -.top_box_image {
241   - padding: 20rpx 20rpx 20rpx 20rpx;
242   -}
243   -.top_box_image image {
244   - height: 216rpx;
245   - width: 100%;
246   -}
247   -.top_box_image button {
248   - margin: 15rpx 95rpx 0rpx 95rpx;
249   - background: var(--color);
250   - border-radius: 50rpx;
251   - line-height: 60rpx;
252   - height: 60rpx;
253   - color: white;
254   - font-size: 30rpx;
255   -}
256   -.foot_box {
257   - margin: 0 30rpx 40rpx 30rpx;
258   - background: #FFFFFF;
259   - border-radius: 20rpx;
260   -}
261   -.foot_box_title {
262   - font-size: 43rpx;
263   - color: #000000;
264   - padding: 20rpx 30rpx 20rpx 30rpx;
265   -}
266   -.foot_box_text {
267   - font-size: 30rpx;
268   - color: #000000;
269   - line-height: 48rpx;
270   - padding: 20rpx 35rpx 50rpx 30rpx;
271   -}
272   -.button_box {
273   - margin: 50rpx 50rpx 50rpx 50rpx;
274   - text-align: center;
275   -}
276   -.button {
277   - margin: 0 30rpx;
278   - background:#61d3dd;
279   - border-radius: 50rpx;
280   - line-height: 80rpx;
281   - height: 80rpx;
282   - color: white;
283   - font-size: 35rpx;
284   -}
285   -.button_text {
286   - padding-top: 20rpx;
287   - font-size: 20rpx;
288   - color: white;
289   - height: 100rpx;
290   -}
291   -.foot_empty {
292   - height: 90rpx;
293   -}
294   -.foot_button {
295   - display: -webkit-box;
296   - display: -webkit-flex;
297   - display: flex;
298   - margin: 20rpx 0rpx 0rpx 0rpx;
299   - padding: 25rpx 0rpx;
300   - background: #FFFFFF;
301   - text-align: center;
302   - -webkit-box-pack: center;
303   - -webkit-justify-content: center;
304   - justify-content: center;
305   - position: fixed;
306   - bottom: 0;
307   - left: 0;
308   - width: 100%;
309   -}
310   -.foot_button_buy {
311   - background:#61d3dd;
312   - color: #FFFFFF;
313   - width: 400rpx;
314   - height: 70rpx;
315   - font-size: 28rpx;
316   - line-height: 70rpx;
317   - border-radius: 40rpx;
318   -}
319   -.foot_button_notbuy{
320   - background: #999999;
321   - color: #FFFFFF;
322   - width: 400rpx;
323   - height: 70rpx;
324   - font-size: 28rpx;
325   - line-height: 70rpx;
326   - border-radius: 30rpx 30rpx 30rpx 30rpx;
327   -}
328   -page {
329   - background-color: #9be0e5;
330   -}
331   -button::after {
332   - border: none;
333   -}
334   -.foot_box_text ._img {
335   - width: 100%;
336   -}
337   -.foot_box_text .img {
338   - line-height: 0;
339   -}
340   -
341   -.lvip {
342   - left: 30rpx;
343   - bottom: -58rpx;
344   - width: 20rpx;
345   - height: 90rpx;
346   - z-index: 5;
347   -}
348   -.rvip {
349   - right: 30rpx;
350   - bottom: -58rpx;
351   - width: 20rpx;
352   - height: 90rpx;
353   - z-index: 5;
354   -}
355   -
356   -.font_and_bg {
357   - background-color: var(--bg-color);
358   - color:var(--color);
359   -}
360   -
361   -
362   -
363   -/*-- 和弹出框的组件有关系 --*/
364   -.xc-width {
365   - width: 100%;
366   -}
367   -.spec-model {
368   - position: fixed;
369   - bottom: 0;
370   - z-index: 20;
371   - background: white;
372   - width: 100%;
373   - /* padding: 0 30rpx; */
374   - font-size: 32rpx;
375   - box-sizing: border-box;
376   - border-radius: 20rpx 20rpx 0 0;
377   - /* height: 72%; */
378   -}
379   -
380   -.spec-model .pding {
381   - padding: 0 20rpx;
382   -}
383   -.pding {
384   - padding-top: 20rpx;
385   - padding-left: 20rpx;
386   - height: 81%;
387   - padding-right: 20rpx;
388   - font-size: 26rpx;
389   - color: #ea120f
390   -}
391   -
392   -.spec-goods {
393   - padding: 30rpx 0 20rpx;
394   - /* float: left; */
395   - width: 100%;
396   - /* border-bottom:2rpx solid #eee; */
397   -}
398   -
399   -.spec-img {
400   - float: left;
401   - height: 186rpx;
402   - width: 186rpx;
403   - border: 4rpx solid #eee
404   -}
405   -
406   -.spec-goods-info {
407   - float: left;
408   - padding: 0 25rpx;
409   - width: 400rpx;
410   -}
411   -
412   -.spec-goods-name {
413   - font-size: 30rpx;
414   - line-height: 35rpx;
415   - height: 70rpx;
416   - margin: 15rpx 20rpx 25rpx 0;
417   - overflow: hidden;
418   - text-overflow: ellipsis;
419   - color: #333;
420   -}
421   -
422   -.spec-goods-price {
423   - color: #d60021;
424   - font-size: 33rpx;
425   - font-weight: bold;
426   - /* display: flex; */
427   -}
428   -
429   -.spec-goods-stock {
430   - margin-top: 3rpx;
431   - font-size: 24rpx;
432   - color: #999999;
433   - margin-right: 15rpx;
434   -}
435   -
436   -.spec-name {
437   - clear: both;
438   - padding: 20rpx 0;
439   - font-size: 30rpx;
440   - color: #333;
441   -}
442   -.spec-name+view{
443   - flex-wrap: wrap;
444   -}
445   -.stores-img {
446   - width: 28rpx;
447   - height: 28rpx;
448   - margin-right: 10rpx;
449   -}
450   -.right-arrow {
451   - width: 15rpx;
452   - height: 15rpx;
453   - border-top: 2rpx solid #d70026;
454   - border-right: 2rpx solid #d70026;
455   - transform: rotate(45deg);
456   - display: inline-block;
457   - margin-bottom: 3rpx;
458   -}
459   -
460   -
461   -.spec-btn {
462   - color: black;
463   - background-color: white;
464   - padding: 10rpx 10rpx;
465   - font-size: 26rpx;
466   - line-height: 28rpx;
467   - float: left;
468   - border: 1rpx solid #dedede;
469   - margin: 4rpx 10rpx 4rpx 0;
470   - border-radius: 4rpx;
471   -}
472   -
473   -.spec-btn-click {
474   - color: white;
475   - background-color: #f23030;
476   - border: 1rpx solid #f23030;
477   -}
478   -
479   -.spec-cart-btns {
480   - /* width: 92%; */
481   - line-height: 70rpx;
482   - /* margin: 0rpx auto;
483   - margin-top: 160rpx; */
484   - /* border-radius: 20rpx; */
485   - /* position: fixed; */
486   - /* bottom: 50rpx; */
487   - /* left: 4%; */
488   - padding: 20rpx;
489   -}
490   -
491   -.spec-cart-btn {
492   -
493   - width: 100%;
494   - font-size: 30rpx;
495   - text-align: center;
496   - color: white;
497   - border-radius: 40rpx;
498   -}
499   -
500   -.spec-cart-btn.w40 {
501   - width: 46%;
502   -}
503   -
504   -.spec-add-cart {
505   - background-color: #ffb03f;
506   -}
507   -
508   -.spec-buy {
509   - background-color: #f23030;
510   - /* margin-left: 34rpx; */
511   -}
512   -
513   -.spec-cart-disable {
514   - background: #bbbbbb;
515   -}
516   -
517   -.spec-cart-btn-lg {
518   - width: 614rpx;
519   -}
520   -
521   -/* 选择门店的弹窗 */
522   -.mongolia-layer {
523   - position: fixed;
524   - left: 0;
525   - top: 0;
526   - right: 0;
527   - bottom: 0;
528   - z-index: 11;
529   - background: rgba(0, 0, 0, 0.4);
530   - width: 100%;
531   - height: 91.9%;
532   -
533   -}
534   -
535   -.popup-frame {
536   - position: fixed;
537   - z-index: 20;
538   - background: white;
539   - width: 100%;
540   - border-radius: 20rpx 20rpx 0 0;
541   - height: auto;
542   - bottom: 0;
543   -}
544   -
545   -.popup-top {
546   - border-bottom: 1rpx solid #eee;
547   - height: 155rpx;
548   - width: 95%;
549   - margin: auto;
550   - line-height: 155rpx;
551   -
552   -}
553   -
554   -.bg_rights {
555   - border-top: 2rpx solid;
556   - border-right: 2rpx solid;
557   - transform: rotate(45deg);
558   - display: inline-block;
559   - width: 15rpx;
560   - height: 15rpx;
561   - border-color: #da0b31;
562   -}
563   -
564   -.modal-closes {
565   - position: absolute;
566   - right: 30rpx;
567   - top: -15rpx;
568   - height: 25rpx;
569   -
570   -}
571   -
572   -.choose_more {
573   - margin-top: 40rpx;
574   - margin-right: 20rpx;
575   -
576   -}
577   -
578   -.choose_mores {
579   - margin-top: 30rpx;
580   - margin-right: 15rpx;
581   -
582   -}
583   -
584   -.store-list {
585   - width: 95%;
586   - min-height: 700rpx;
587   - overflow-y: scroll;
588   - margin: auto;
589   - max-height: 700rpx;
590   -}
591   -
592   -.store-list .store_choose {
593   - width: 100%;
594   - height: 120rpx;
595   - line-height: 125rpx;
596   - border-bottom: 1rpx solid #eee;
597   - padding: 10rpx 0;
598   -}
599   -
600   -.store-list .store_choose .store {
601   - width: 100%;
602   - margin: auto;
603   - line-height: 37rpx;
604   - padding-left: 20rpx;
605   -
606   -}
607   -
608   -.xc-hook {
609   - width: 35rpx;
610   - height: 35rpx;
611   - transform: rotate(-145deg);
612   - line-height: 37rpx;
613   - text-align: center;
614   -}
615   -
616   -.xc-hooks {
617   - width: 30rpx;
618   - height: 30rpx;
619   - border: 1rpx solid #999;
620   -}
621   -
622   -.address-frame {
623   - width: 93%;
624   - margin-left: 7rpx;
625   -
626   -}
627   -
628   -.nearby_store {
629   - margin-left: 17rpx;
630   -}
631   -
632   -.address_name {
633   - margin-right: 10rpx;
634   - width: 360rpx;
635   -
636   -}
637   -
638   -.address-val {
639   - height: 38rpx;
640   - line-height: 38rpx;
641   -
642   -}
643   -
644   -.store-bottom {
645   - width: 85%;
646   - margin: auto;
647   - height: 90rpx;
648   -}
649   -
650   -.searchbar {
651   - height: 95rpx;
652   - border-bottom: 2rpx solid rgb(238, 238, 238);
653   -}
654   -.storeListpadd {
655   - padding: 0rpx 31rpx;
656   -}
657   -.search {
658   - width: 125rpx;
659   - height: 45rpx;
660   - line-height: 45rpx;
661   - background-color: rgb(219, 27, 52);
662   - border-radius: 30rpx;
663   - color: rgb(255, 255, 255);
664   -}
665   -.inputstore {
666   - width: 510rpx;
667   - height: 43rpx;
668   - line-height: 43rpx;
669   - border-radius: 30rpx;
670   - border: 2rpx solid rgb(238, 238, 238);
671   - padding-left: 30rpx;
672   -}
673   -
674   -
675   -
676   -.determine {
677   - width: 260rpx;
678   - height: 55rpx;
679   - border-radius: 50rpx;
680   - line-height: 55rpx;
681   -}
682   -
683   -.default {
684   - width: 260rpx;
685   - height: 55rpx;
686   - border: 3rpx solid #c8c8c8;
687   - border-radius: 50rpx;
688   - line-height: 55rpx;
689   -}
690   -
691   -.store-bottom-frame {
692   - width: 95%;
693   - margin: auto;
694   -
695   -}
696   -
697   -/* 门店分类列表 */
698   -.sort_store_list {
699   - max-height: 700rpx;
700   - min-height: 700rpx;
701   - overflow: hidden;
702   - overflow-y: scroll;
703   - width: 95%;
704   - margin: auto;
705   -}
706   -
707   -.sort_store_list .sort-store-frame {
708   - width: 100%;
709   - height: 100rpx;
710   - line-height: 100rpx;
711   - border-bottom: 1rpx solid #eee;
712   -
713   -}
714   -
715   -.sort_store_list .sort-store-frame .sort-store {
716   - width: 94.5%;
717   - margin: auto;
  1 +.rty{
  2 + display:flex; justify-content: center; align-items: center;
  3 + width:100%;
  4 + height:100%
718 5 }
719 6 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
1   -var i = require("../../../utils/util.js");
2   -var ut=i;
3   -var com = require("../public/buy_com.js");
4   -var e = getApp(),
5   - a = e.globalData.setting,
6   - os = a,
7   - t = e.request,
8   - d = e.globalData;
9 1 Page({
10   - data: {
11   - url: a.url, //接口网址
12   - iurl: a.imghost, //图片前缀网址
13   - getStorageID: '',
14   - getUserID: '',
15   - wareCard: [],
16   - // page: 0,
17   - // pageSize: 10,
18   - isEmpty: false,
19   - loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
20   - contentText: {
21   - contentdown: '加载更多',
22   - contentrefresh: '加载中...',
23   - contentnomore: '已加载全部'
24   - },
25   - ismore: 0, //数据是否全部加载完成
26   - is_read: 0, //是否查询过我的礼包接口
27   - curpage: 1, //当前分页数
28   - pageSize: 10, //页大小
29   - total: 0, //总数量
30   - ad_data: null,
31   - first_leader: e.globalData.first_leader || 0, // 推荐人ID
32   -
33   - //门店相关
34   - ismend: 0,
35   - is_sec_mend: 0,
36   - sto_sele_name: "", //选中的门店名称
37   - sto_sele_id: "", //选中的门店id
38   - sto_sele_distr: "", //选择的门店的配送方式
39   - is_show_sto_cat: 1, //是否显示门店分类
40   - only_pk: null,
41   - all_sto: null,
42   - sec_sto: null, //选择了的门店分类
43   - pickpu_list: null, //读出的所有门店list
44   - def_pickpu_list: null, //一开始5个门店list
45   - sec_pick_index: 0, //第二级门店选择ID
46   - fir_pick_index: 0, //第一级门店选择ID
47   - all_pick_list: null,//所有的门店先记录起来
48   -
49   - select_store: 0, //选择更多
50   - index: 1,
51   - more_store: 0, //选择门店
52   - sort_store: 0, //门店分类
53   - choice_sort_store: 0, //选择分类门店
54   - new_user: 0, //新用户
55   -
56   - def_pick_store: null, // 默认的门店
57   - fir_def_store: null, //客户默认的门店的
58   - lat: null, //维度
59   - lon: null, //经度
60   -
61   - is_get_local_ok: 0, //获取坐标是否完成
62   - region_name: "门店分类", //区域的名字
63   - is_gps: 1,
64   - open_ind_store: 0, //哪里打开的门店列表的控制属性
65   - default_store: {}, //创建添加默认门店地址的对象
66   - old_all_sto:null,
67   - store:0,
68   - openSpecModal:0,
69   -
70   - is_get_guide:0,
71   - keyword:'', //门店搜索
72   - sec_i:-1,//选中分类门店 下标
73   -
74   - sear_key:''
75   -
76   - },
77   - onLoad: function (options) {
78   - var th=this;
79   -
80   - //定义第一次进入
81   - this.data.fir_in=1;
82   -
83   - this.setData({
84   - params: options,
85   - now:Date.parse(new Date()) / 1000,
86   - })
87   -
88   - getApp().getConfig2(function (e) {
89   - var json_d = JSON.parse(e.switch_list);
90   - th.setData({
91   - bconfig: e,
92   - sys_switch:json_d
93   - });
94   - })
95   -
96   - },
97   - init() {
98   - var th = this;
99   - let options = this.data?.params;
100   - this.setData({
101   - getStorageID: a.stoid,
102   - getUserID: d.user_id
103   - });
104   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
105   - my_confirm.open_cancel(0);
106   - //-- 获取分享人的ID --
107   - var first_leader = options.first_leader || getApp().globalData.first_leader;
108   - if (first_leader) {
109   -
110   - this.data.is_get_guide=1;
111   - this.setData({
112   - first_leader,
113   - })
114   - //-- user_id代过来免登录 --
115   - getApp().globalData.first_leader = first_leader;
116   - //调用接口判断是不是会员
117   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
118   - if (res.data.code == 0) {
119   - getApp().globalData.guide_id = res.data.data.id;
120   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
121   - }
122   -
123   - com.wait_for_store_config(th);
124   - com.set_user_mo_store(th,os);
125   -
126   - })
127   - }
128   -
129   - getApp().request.promiseGet("/api/weshop/ad/page?pid=902&store_id=" + os.stoid, {
130   - data: {
131   - enabled: 1
132   - }
133   - }).then(res => {
134   - if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
135   - var a = res.data.data.pageData;
136   - var tt = {
137   - 'ad_code': os.imghost + a[0].ad_code,
138   - 'media_link': '',
139   - 'ad_weapplink': a[0].ad_weapplink,
140   - 'bgcolor': a[0].bgcolor,
141   - };
142   - th.setData({
143   - ad_data: tt
144   - });
145   - }
146   - })
147   - this.getList();
148   - },
149   - onShow: function () {
150   -
151   - this.setData({submit:0})
152   - var th=this;
153   -
154   - //判断是不是第一次进入
155   - if(this.data.fir_in){
156   - this.data.fir_in=0;
157   - }else{
158   - //富友支付插件
159   - i.fy_back('',0);
160   - com.set_py_fir();
161   -
162   -
163   - if(th.data.ok_order_sn){
164   - //-- 通联的第三方支付的返回优化 --
165   - var money=th.data.payMoney;
166   - var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn;
167   -
168   - ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){
169   - if(!th.data.ok_order_sn) return false;
170   - getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
171   - {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
172   -
173   - th.data.ok_order_sn=null;
174   -
175   - if(res.data.code==0 && res.data.data){
176   - var item=res.data.data;
177   - if(item.payState==1){
178   - //支付支付,返回首页
179   - ut.m_toast('支付成功');
180   - setTimeout(()=>{
181   - getApp().goto(back_url);
182   - },1000)
183   -
184   - }else{
185   - //支付支付,返回首页
186   - ut.m_toast('支付失败');
187   - }
188   - }
189   - })
190   - },null,null,1);
191   -
192   - th.data.ok_order_sn=null;
193   - }
194   -
195   -
196   -
197   -
198   - }
199   -
200   -
201   -
202   - getApp().check_can_share();
203   -
204   - //--先判断会员状态--
205   - getApp().is_Single_page(this, function () {
206   - var user_info = getApp().globalData.userInfo;
207   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
208   - getApp().goto('/packageE/pages/togoin/togoin');
209   - return false;
210   - }
211   -
212   - if(!th.data.is_get_guide) {
213   - com.wait_for_store_config(th);
214   - com.set_user_mo_store(th, os);
215   - }
216   - th.data.is_get_guide=0;
217   -
218   - })
219   - this.init();
220   -
221   - setTimeout(()=>{
222   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
223   - },2000)
224   -
225   - },
226   - //获取搜索门店输入的值
227   - input_store: function(e) {
228   - this.setData({
229   - keyword: e.detail.value
230   - })
231   - },
232   - //搜索门店
233   - searchfn(){
234   - let choice_sort_store = this.data.choice_sort_store
235   - if (choice_sort_store==0) { //全局搜索
236   - let all_pick_list = this.data.all_pick_list
237   - let def_pickpu_list = this.data.def_pickpu_list
238   - let keyword = this.data.keyword
239   - if (keyword) {
240   - let arr=all_pick_list.filter( item =>{
241   - let i = item.pickup_name.indexOf(keyword)
242   - if (i > -1) {
243   - return true
244   - }else{
245   - return false
246   - }
247   - })
248   - if (arr && arr.length>0) {
249   - if(this.data.is_show_sto_cat==1){
250   - this.setData({
251   - def_pickpu_list:arr
252   - })
253   - }else{
254   - this.setData({
255   - only_pk:arr
256   - })
257   - }
258   - }else{
259   - wx.showToast({
260   - title: '没有搜索到门店',
261   - icon: 'none',
262   - duration: 2000
263   - })
264   - }
265   - }else{
266   - if (this.data.is_show_sto_cat==1) {
267   - this.setData({
268   - def_pickpu_list:all_pick_list.slice(0,10)
269   - })
270   - }else{
271   - this.setData({
272   - only_pk:all_pick_list
273   - })
274   - }
275   -
276   - }
277   - }else{ //分类下搜索
278   - let sec_i=this.data.sec_i
279   - let all_sto = this.data.all_sto
280   - let old_all_sto = this.data.old_all_sto
281   - if (!old_all_sto) {
282   - this.setData({
283   - old_all_sto:JSON.parse(JSON.stringify(all_sto))
284   - })
285   - }
286   - let sec_sto= this.data.sec_sto
287   - let sec_arr = this.data.old_all_sto[sec_i].s_arr
288   - let keyword = this.data.keyword
289   - let text='sec_sto.s_arr'
290   - if (keyword) {
291   - let arr=sec_arr.filter( item =>{
292   - let i = item.pickup_name.indexOf(keyword)
293   - if (i > -1) {
294   - return true
295   - }else{
296   - return false
297   - }
298   - })
299   - if (arr && arr.length>0) {
300   - this.setData({
301   - [text]:arr
302   - })
303   - }else{
304   - wx.showToast({
305   - title: '没有搜索到门店',
306   - icon: 'none',
307   - duration: 2000
308   - })
309   - }
310   - }else{
311   - if(this.data.old_all_sto){
312   - this.setData({
313   - [text]: this.data.old_all_sto[sec_i].s_arr
314   - })
315   - }else{
316   - this.setData({
317   - [text]: all_sto[sec_i].s_arr
318   - })
319   - }
320   -
321   - }
322   -
323   -
324   - }
325   - },
326   - //购买礼包
327   - GetBuyPrice: function (e) {
328   -
329   - var th = this;
330   - var index = e.currentTarget.dataset.index; //活动id
331   - var sele_g=th.data.wareCard[index];
332   - this.data.payMoney=sele_g.payMoney;
333   -
334   - th.setData({sele_g:sele_g,buyType:2,})
335   - if(sele_g.is_pickup){
336   - if(sele_g.pickup_list && th.data.def_pick_store){
337   - com.check_def_pk(th);
338   - }
339   - com.get_sto(th,os)
340   - th.setData({
341   - openSpecModal:1
342   - })
343   - }else{
344   -
345   - if(this.data.submit) return false;
346   -
347   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
348   - my_confirm.open(
349   - "是否确定购买该礼包",
350   - "取消",
351   - "确定",
352   - function () {
353   - my_confirm.open_cancel(0);
354   - },
355   - function () {
356   - my_confirm.open_cancel(0);
357   - com.buy_libao(th)
358   - }
359   -
360   - )
361   - }
362   -
363   -
364   -
365   -
366   -
367   - },
368   - // 积分兑换
369   - GetBuyIntegral: function (e) {
370   - var th = this;
371   - var index = e.currentTarget.dataset.index; //活动id
372   - var sele_g=th.data.wareCard[index];
373   - th.setData({sele_g:sele_g, buyType:1,})
374   - if(sele_g.is_pickup){
375   - if(sele_g.pickup_list && th.data.def_pick_store){
376   - com.check_def_pk(th);
377   - }
378   - com.get_sto(th,os)
379   - th.setData({
380   - openSpecModal:1
381   - })
382   - }else {
383   -
384   - if(this.data.submit) return false;
385   -
386   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
387   - my_confirm.open(
388   - "是否确定兑换该礼包",
389   - "取消",
390   - "确定",
391   - function () {
392   - my_confirm.open_cancel(0);
393   - },
394   - function () {
395   - my_confirm.open_cancel(0);
396   - com.buy_libao(th)
397   - })
398   - }
399   -
400   - },
401   - //免费领取
402   - GetFree: function (e) {
403   -
404   - var th = this;
405   - var index = e.currentTarget.dataset.index; //活动id
406   - var sele_g=th.data.wareCard[index];
407   - th.setData({sele_g:sele_g, buyType:3,})
408   -
409   - if(sele_g.is_pickup){
410   - if(sele_g.pickup_list && th.data.def_pick_store){
411   - com.check_def_pk(th);
412   - }
413   - com.get_sto(th,os)
414   - th.setData({
415   - openSpecModal:1
416   - })
417   - }else {
418   - if(this.data.submit) return false;
419   -
420   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
421   - my_confirm.open(
422   - "是否确定领取该礼包",
423   - "取消",
424   - "确定",
425   - function () {
426   - my_confirm.open_cancel(0);
427   - },
428   - function () {
429   - my_confirm.open_cancel(0);
430   - com.buy_libao(th)
431   - })
432   - }
  2 + data: {},
  3 + onLoad: async function(options) {
  4 + getApp().globalData.ts_trans_data=options;
  5 + getApp().goto('/packageF/pages/giftpack/buygiftpack/giftpackbuy');
433 6 },
434   -
435   - getList: function (e) {
436   -
437   - if(this.data.ismore) return false;
438   - if(this.data.searching) return false;
439   - this.data.searching=1;
440   -
441   - wx.showLoading({
442   - title: '加载中.',
443   - })
444   -
445   - var th = this;
446   - let r_q={
447   - storeId: th.data.getStorageID, //商家ID
448   - userId: th.data.getUserID, //用户ID
449   - page: th.data.curpage,
450   - pageSize: th.data.pageSize,
451   - is_share:0
452   - };
453   -
454   - if(this.data.sear_key){
455   - r_q.key_str=this.data.sear_key;
456   - }
457   -
458   - getApp().request.get('/api/weshop/marketing/giftbag/page', {
459   - isShowLoading: true,
460   - data: r_q,
461   - success: function (res) {
462   -
463   - th.data.searching=0;
464   -
465   - if (res.data.code == 0) {
466   - th.data.curpage++;
467   - var arr1 = th.data.wareCard;
468   - var arr2 = res.data.data.pageData;
469   - for (let j = 0; j < arr2.length; j++) {
470   - arr2[j].starTime1=Date.parse(new Date(arr2[j].starTime.replace(/-/g, "/")))/1000
471   - }
472   -
473   - var arr3 = [...arr1, ...arr2];
474   - var ismore = 0;
475   - if (arr3.length == res.data.data.total) ismore = 1
476   - th.setData({
477   - wareCard: arr3,
478   - total: res.data.data.total,
479   - ismore: ismore,
480   - is_read: 1,
481   - is_get:1
482   - }), wx.stopPullDownRefresh(); //停止下拉刷新
483   -
484   - } else {
485   - th.setData({
486   - is_read: 1,
487   - ismore: 1,
488   - is_get:1
489   - })
490   - }
491   -
492   - wx.hideLoading();
493   -
494   - }
495   - })
496   -
497   - },
498   - //销毁界面跳转
499   - redirectTo: function (e) {
500   - var th = this;
501   - var url = e.currentTarget.dataset.url;
502   - //销毁跳转
503   - wx.redirectTo({
504   - url: url
505   - });
506   - },
507   - //不销毁界面跳转
508   - navigateTo: function (e) {
509   - var th = this;
510   - var url = e.currentTarget.dataset.url;
511   - getApp().goto(url);
512   -
513   - },
514   - //下拉事件
515   - onReachBottom: function () {
516   - var th = this;
517   - if (th.data.total <= th.data.pageSize) return;
518   - if (th.data.ismore) return;
519   -
520   - th.getList();
521   - },
522   - //图片失败,默认图片
523   - bind_bnerr2: function (e) {
524   - var _errImg = e.target.dataset.errorimg;
525   - var _errObj = {};
526   - _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
527   - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
528   - },
529   - goto: function (e) {
530   - var th = this;
531   - var url = e.currentTarget.dataset.url;
532   - getApp().goto(url);
533   - },
534   -
535   - onShareAppMessage: function (e) {
536   - getApp().globalData.no_clear=1;
537   - var curPage = this;
538   - var pagePath = curPage.route; //当前页面url
539   - if (pagePath.indexOf('/') != 0) {
540   - pagePath = '/' + pagePath;
541   - }
542   - pagePath += "?first_leader=" + this.data.getUserID;
543   - return {
544   - title: "专享礼包",
545   - path: pagePath,
546   - }
547   - },
548   -
549   - // 分享朋友圈
550   - onShareTimeline() {
551   - getApp().globalData.no_clear=1;
552   -
553   - var user_id=getApp().globalData.user_id;
554   - if(!user_id) user_id=0;
555   -
556   - return {
557   - title: '专享礼包',
558   - imageUrl: this.data.ad_data.ad_code,
559   - query: 'first_leader='+user_id
560   - }
561   - },
562   -
563   -
564   -
565   - //--- 设置一下默认库存的数量 ----
566   - set_def_storage(ee) {
567   - var that = this, th = this;
568   - that.data.fir_def_store = ee;
569   - that.setData({
570   - def_pick_store: ee,
571   - sto_sele_name: ee.pickup_name,
572   - sto_sele_id: ee.pickup_id,
573   - sto_sele_distr: ee.distr_type
574   - })
575   - },
576   - // 选择门店
577   - choice_store: function (ee) {
578   - this.setData({
579   - keyword:''
580   - })
581   - //--先判断会员状态--
582   - var user_info = getApp().globalData.userInfo;
583   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
584   - wx.navigateTo({
585   - url: '/packageE/pages/togoin/togoin',
586   - })
587   - return false;
588   - }
589   -
590   - var th = this;
591   - var ind = ee.currentTarget.dataset.ind;
592   - var bconfig = th.data.bconfig;
593   -
594   - //如果开启了,则不在选择门店
595   - if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){
596   - return false;
597   - }
598   -
599   - if (!th.data.only_pk && !th.data.def_pickpu_list) {
600   - getApp().confirmBox("门店库存不足", null, 25000, !1);
601   - return false;
602   - }
603   -
604   - if (th.data.only_pk && !th.data.only_pk.length) {
605   - getApp().confirmBox("门店库存不足", null, 25000, !1);
606   - return false;
607   - }
608   - if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
609   - getApp().confirmBox("门店库存不足", null, 25000, !1);
610   - return false;
611   - }
612   -
613   -
614   - if (bconfig && bconfig.is_sort_storage) {
615   - wx.getLocation({
616   - type: 'gcj02',
617   - success: function (res) {
618   -
619   - th.data.lat = res.latitude;
620   - th.data.lon = res.longitude;
621   - th.data.is_get_local_ok = 1;
622   - th.setData({
623   - is_gps: 1
624   - });
625   - //th.onShow();
626   - com.get_sto(th,os);
627   - },
628   - fail: function (res) {
629   - //th.onShow();
630   - th.data.is_get_local_ok = 1;
631   - com.get_sto(th,os);
632   - if (res.errCode == 2) {
633   - th.setData({
634   - is_gps: 0
635   - });
636   - if (th.data.is_gps == 0) {
637   - getApp().confirmBox("请开启GPS定位", null, 25000, !1);
638   - }
639   - } else {
640   - th.setData({
641   - is_gps: "3"
642   - });
643   - }
644   -
645   - }
646   - })
647   - } else {
648   - th.data.is_get_local_ok = 1;
649   - com.get_sto(th,os);
650   - }
651   -
652   - if (ind != undefined && ind != null) {
653   - this.setData({
654   - open_ind_store: ind,
655   - store: 1,
656   - openSpecModal: !1,
657   - openSpecModal_pt: !1,
658   - openSpecModal_flash_normal: !1,
659   - })
660   - } else {
661   - this.setData({
662   - store: 1,
663   - openSpecModal: !1,
664   - openSpecModal_pt: !1,
665   - openSpecModal_flash_normal: !1
666   -
667   - })
668   - }
669   - },
670   - //关闭选择门店
671   - close_popup: function (e) {
672   - var th = this;
673   - this.setData({
674   - store: 0,
675   - choice_sort_store: 0,
676   - sort_store: 0,
677   - fir_pick_index: 0,
678   - sec_pick_index: 0
679   - })
680   -
681   - var openindstore = this.data.open_ind_store;
682   - if (openindstore == 1) {
683   - th.setData({
684   - openSpecModal: !0,
685   - openSpecModal_ind: openindstore,
686   - });
687   - } else if (openindstore == 2) {
688   - th.setData({
689   - openSpecModal: !0,
690   - openSpecModal_ind: openindstore,
691   - });
692   - }
693   - else if (openindstore == 4) { //4就是拼团
694   - th.setData({
695   - openSpecModal_pt: 1, //打开拼团购买界面
696   - store: 0, //关闭门店
697   - choice_sort_store: 0, //关闭门店2级
698   - sort_store: 0, //关闭门店2级
699   - });
700   - }
701   - else {
702   - th.setData({
703   - store: 0,
704   - choice_sort_store: 0,
705   - sort_store: 0
706   - })
707   - }
708   -
709   -
710   - },
711   -
712   - //选择更多门店
713   - more_store: function () {
714   - this.setData({
715   - sort_store: 1
716   - });
717   - },
718   - // 返回按钮
719   - returns: function () {
720   - this.setData({
721   - sort_store: 0,
722   - choice_sort_store: 0
723   - });
724   - },
725   - //---选择分类门店---
726   - choice_sort_store: function (e) {
727   - var index = e.currentTarget.dataset.index;
728   - var region_name = e.currentTarget.dataset.region;
729   - var item = this.data.all_sto[index];
730   - this.setData({
731   - region_name: region_name,
732   - sort_store: 0,
733   - choice_sort_store: 1,
734   - sec_sto: item,
735   - sec_i:index,
736   - sec_pick_index: 0
737   - });
738   - },
739   -
740   - choose_for_store_fir: function (e) {
741   - var index_c = e.currentTarget.dataset.ind;
742   - var th = this;
743   - th.setData({
744   - fir_pick_index: index_c
745   - })
746   -
747   - },
748   -
749   - //确定def_pick为选择的门店
750   - sure_pick: function (e) {
751   - var th = this;
752   - var item = null;
753   - var openindstore = th.data.open_ind_store;
754   -
755   - if (th.data.choice_sort_store == 0) {
756   - var index = th.data.fir_pick_index;
757   - if (th.data.is_show_sto_cat == 1) {
758   - item = th.data.def_pickpu_list[index];
759   - } else {
760   - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
761   - }
762   -
763   - } else {
764   - var index = th.data.sec_pick_index;
765   - item = th.data.sec_sto.s_arr[index];
766   - }
767   -
768   - if(!item) return false;
769   -
770   - if (!th.data.sele_g) return false;
771   -
772   - th.setData({
773   - def_pick_store: item,
774   - sto_sele_name: item.pickup_name,
775   - sto_sele_id: item.pickup_id,
776   - sto_sele_distr: item.distr_type,
777   - store: 0,
778   - choice_sort_store: 0,
779   - fir_pick_index: 0,
780   - openSpecModal: !0,
781   - });
782   -
783   -
784   - },
785   - //---点击二级之后的选择---
786   - choose_for_store: function (e) {
787   - var index_c = e.currentTarget.dataset.ind;
788   - var th = this;
789   - th.setData({
790   - sec_pick_index: index_c,
791   - fir_pick_index: index_c
792   - })
793   -
794   - },
795   - //把选择的门店设置成默认的门店def_pick
796   - set_def_pick: function (e) {
797   - var th = this;
798   - var item = null;
799   - if (th.data.choice_sort_store == 0) {
800   - var index = th.data.fir_pick_index;
801   - if (th.data.is_show_sto_cat == 1) {
802   - item = th.data.def_pickpu_list[index];
803   - } else {
804   - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
805   - }
806   - } else {
807   - var index = th.data.sec_pick_index;
808   - item = th.data.sec_sto.s_arr[index];
809   - }
810   -
811   - if(!item) return false;
812   -
813   - th.setData({
814   - def_pick_store: item,
815   - sto_sele_name: item.pickup_name,
816   - sto_sele_id: item.pickup_id,
817   - sto_sele_distr: item.distr_type,
818   - store: 0,
819   - choice_sort_store: 0,
820   - openSpecModal: !0,
821   - });
822   -
823   - var user_id=getApp().globalData.user_id;
824   - var def_pickup_id = item.pickup_id;
825   - getApp().request.put('/api/weshop/users/update', {
826   - data: {
827   - user_id: user_id,
828   - def_pickup_id: def_pickup_id
829   - },
830   - success: function (res) {
831   - if (res.data.code == 0) {
832   - if (th.data.choice_sort_store == 0) th.setData({
833   - fir_pick_index: 0
834   - });
835   - getApp().globalData.pk_store = item;
836   - } else {
837   - getApp().my_warnning("设置默认门店地址失败", 0, th)
838   - }
839   -
840   - }
841   - });
842   -
843   -
844   -
845   - },
846   - closeSpecModal: function () {
847   - this.setData({openSpecModal: 0});
848   - },
849   -
850   - buy_libao:function () {
851   - com.buy_libao(this)
852   - },
853   -
854   - search_lb(){
855   - this.data.curpage=0;
856   - this.searching=0;
857   - this.setData({ismore:0,is_get:0,wareCard:[]});
858   - this.getList();
859   - },
860   -
861   - input_sear(e){
862   - let value = e.detail;
863   - this.data.sear_key=value;
864   - }
  7 + //显示加载
  8 + onShow:function(){ },
865 9  
866 10 })
867 11 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.json
1 1 {
2   - "navigationBarTitleText": "礼包列表",
3   - "usingComponents": {
4   - "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm",
6   - "lb_sear": "/components/lb_sear/lb_sear"
  2 + "windom": {
  3 + "navigationBarTitleText": "加载中.",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
7 8 }
  9 +
8 10 }
9 11 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxml
1   -<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
2   -<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;padding-bottom: 10rpx;">
3   - <block wx:if="{{ad_data}}">
4   - <view class="top_img rel">
5   - <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
6   - <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
7   - </view>
8   - </block>
9   - <block wx:else>
10   - <view class="top_img rel">
11   - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=202403'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
12   - <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
13   - </view>
14   - </block>
15   -
16   -
17   - <view class="top_title">
18   - <view class="top_title_box">
19   - <text class="top_title_redtext">礼包列表</text>
20   - </view>
21   - <view class="top_title_box_S"></view>
22   - <view class="top_title_box">
23   - <a class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/mygiftpack/mygiftpack">我的礼包</a>
24   - </view>
25   - </view>
26   - <!--<block wx:for="{{wareCard}}" wx:if="{{now > filter.gettimestamp(items.starTime) || (items.is_show && now > items.show_time)}}" wx:for-item="items" wx:for-index="index" wx:key="index">-->
27   - <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index">
28   - <view class="content_box">
29   - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&cover_img={{items.cover_img}}&orderSn=''">
30   - <view class="content_box_img">
31   - <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}" data-errorimg="wareCard[{{index}}].cover_img"></image>
32   - <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else data-errorimg="wareCard[{{index}}].lbUrl"></image>
33   - </view>
34   - <view class="content_box_title">
35   - <view class="content_ware_title">
36   - <text>{{items.giftTitle}}</text>
37   - </view>
38   - <view class="content_ware_type flex">
39   - <block wx:if="{{items.payMoney>0}}">
40   - <text>{{"¥"+items.payMoney}}</text>
41   - </block>
42   - <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}">
43   - <text>/</text>
44   - </block>
45   - <block wx:if="{{items.payIntegral>0}}">
46   - <view class="flex">
47   - <text class="ellipsis-1">{{items.payIntegral}}</text>
48   - <view>积分</view>
49   - </view>
50   - </block>
51   - </view>
52   - <view class="content_ware_price no_line_c">
53   - <text class="ellipsis-1">{{"零售价:¥"+items.giftPosPrice}}</text>
54   - </view>
55   - <view wx:if="{{items.is_show && now < items.starTime1 }}" class="content_ware_time">
56   - <text class="ellipsis-1">{{"活动开始时间:"+items.starTime}}</text>
57   - </view>
58   - <view wx:else class="content_ware_time">
59   - <text class="ellipsis-1">{{"活动结束时间:"+items.endTime}}</text>
60   - </view>
61   - </view>
62   - </view>
63   - <view class="content_box_button">
64   - <view class="box_button_remark">
65   - <text>{{"已售:"+items.giftQty+"件"}}</text>
66   - </view>
67   - <block wx:if="{{now > items.starTime1}}">
68   - <view class="flex-vertical">
69   - <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}">
70   - <block wx:if="{{items.payMoney>0}}">
71   - <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
72   - <button class="box_button_dui">立即购买</button>
73   - </view>
74   - </block>
75   - <block wx:if="{{items.payIntegral>0}}">
76   - <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
77   - <button class="box_button_dui box_button_buy">立即兑换</button>
78   - </view>
79   - </block>
80   - </block>
81   - <block wx:else>
82   - <block wx:if="{{items.payMoney>0}}">
83   - <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
84   - <button class="box_button_dui box_button_buy">立即购买</button>
85   - </view>
86   - </block>
87   - <block wx:if="{{items.payIntegral>0}}">
88   - <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
89   - <button class="box_button_dui box_button_buy">立即兑换</button>
90   - </view>
91   - </block>
92   - </block>
93   - <block wx:if="{{!items.payMoney && !items.payIntegral}}">
94   - <view class="flex" bindtap="GetFree" data-index="{{index}}">
95   - <button class="box_button_dui box_button_buy">免费领取</button>
96   - </view>
97   - </block>
98   - </view>
99   - </block>
100   - <block wx:else>
101   - <view class="flex-vertical" style="color: #666;">
102   - <button class="box_button_dui box_button_buy" style="background-color: #666;">活动还未开始</button>
103   - </view>
104   - </block>
105   - </view>
106   - </view>
107   - </block>
108   - <block wx:if="{{is_read && wareCard.length<1 && is_get}}">
109   - <view class="foot_empty">
110   - <view>
111   - <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>
112   - </view>
113   - <view>
114   - <text>当前暂无礼包</text>
115   - </view>
116   - <view class="foot_empty_button">
117   - <text bindtap="goto" data-url="/pages/index/index/index">回到首页</text>
118   - </view>
119   - </view>
120   - </block>
121   - <!-- 加载完毕并且数据大于=页大小 -->
122   - <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}">
123   - <view class="Line"></view>
124   - <view class="end fs26">到底了</view>
125   - <view class="Line"></view>
126   - </view>
  1 +<!---- //文字"-->
  2 +<view class="rty">
  3 + <view style="margin-top:260rpx">加载中。。</view>
127 4 </view>
128   -<!-- 引入提示组件 -->
129   -<warn id="warn"></warn>
130   -<my_confirm id="my_confirm"></my_confirm>
131   -
132   -<include src="../public/buy_com.wxml"></include>
133 5 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxss
1   -/*引用样式路径*/
2   -@charset "UTF-8";
3   -@import '../../goods/goodsInfo/goodsInfo.wxss';
4   -
5   -page {
6   - /* background-color: #fb7454; */
7   -}
8   -
9   -.top_img {
10   - -webkit-align-content: center;
11   - align-content: center;
12   -}
13   -
14   -.top_img image {
15   - width: 100%;
16   -
17   -}
18   -
19   -.top_title {
20   - display: -webkit-box;
21   - display: -webkit-flex;
22   - display: flex;
23   - background-color: #fff;
24   - height: 85rpx;
25   - border-radius: 10rpx 10rpx 0rpx 0rpx;
26   - margin: 0rpx 20rpx 0rpx 20rpx;
27   - -webkit-align-content: center;
28   - align-content: center;
29   - margin-bottom: 10rpx;
30   -}
31   -
32   -.top_title_box {
33   - width: 49%;
34   - -webkit-align-content: center;
35   - align-content: center;
36   - text-align: center;
37   - padding: 15rpx;
38   -}
39   -
40   -.top_title_box_S {
41   - width: 1%;
42   - -webkit-align-content: center;
43   - align-content: center;
44   - text-align: center;
45   - margin: 20rpx 0rpx 20rpx 0rpx;
46   - border-left: #000 solid 3rpx;
47   -}
48   -
49   -.top_title_redtext {
50   - font-size: 30rpx;
51   - color: #d61b30;
52   -}
53   -
54   -.top_title_blacktext {
55   - font-size: 30rpx;
56   - color: #000;
57   -}
58   -
59   -.content_box {
60   - background-color: #fff;
61   - margin: 0rpx 20rpx;
62   - border-radius: 10rpx;
63   - margin-bottom: 10rpx;
64   -}
65   -
66   -.content_box_ware {
67   - border-bottom: #f5f5f5 solid 2rpx;
68   - display: -webkit-box;
69   - display: -webkit-flex;
70   - display: flex;
71   -}
72   -
73   -.content_box_img {
74   - margin: 20rpx 20rpx 20rpx 25rpx;
75   - width: 35%;
76   - display: -webkit-box;
77   - display: -webkit-flex;
78   - display: flex;
79   - font-size: 8rpx;
80   - position: relative;
81   -}
82   -
83   -.content_box_img image {
84   - width: 230rpx;
85   - height: 230rpx;
86   -}
87   -
88   -.content_box_title {
89   - width: 65%;
90   - margin: 25rpx 25rpx 10rpx 0rpx;
91   - position: relative;
92   -}
93   -
94   -.content_ware_title {
95   - font-size: 30rpx;
96   - word-break: break-all;
97   - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
98   - text-overflow: ellipsis;
99   - display: -webkit-box;
100   - /** 对象作为伸缩盒子模型显示 **/
101   - -webkit-box-orient: vertical;
102   - /** 设置或检索伸缩盒对象的子元素的排列方式 **/
103   - -webkit-line-clamp: 2;
104   - /** 显示的行数 **/
105   - overflow: hidden;
106   - /** 隐藏超出的内容 **/
107   -}
108   -
109   -.content_ware_type {
110   - font-size: 32rpx;
111   - color: #c61a34;
112   - margin-top: 10rpx;
113   - position: absolute;
114   - left: 0;
115   - bottom: 100rpx;
116   -}
117   -
118   -.content_ware_price {
119   - font-size: 26rpx;
120   - color: #b9b5b5;
121   - margin-top: 2rpx;
122   - text-decoration: line-through;
123   - position: absolute;
124   - left: 0;
125   - bottom: 70rpx;
126   -}
127   -
128   -.content_ware_time {
129   - font-size: 25rpx;
130   - color: #000;
131   - margin-top: 20rpx;
132   - position: absolute;
133   - left: 0;
134   - bottom: 25rpx;
135   -}
136   -.box_button_buy{
137   - display: flex;
138   - align-items: center;
139   -}
140   -.content_box_button {
141   - display: flex;
142   - height: 110rpx;
143   - justify-content: space-between;
144   - align-items: center;
145   - padding-left: 20rpx;
146   - padding-right: 25rpx;
147   - line-height: 110rpx;
148   -}
149   -
150   -.box_button_remark text {
151   - font-size: 28rpx;
152   - color: #b9b5b5;
153   -}
154   -
155   -.box_button_dui {
156   - display: inline-block;
157   - width: 160rpx;
158   - height: 50rpx;
159   - font-size: 20rpx;
160   - background: #fff;
161   - color: #000;
162   - line-height: 50rpx;
163   - margin-left: 20rpx;
164   - border-radius: 10rpx;
165   -}
166   -
167   -.box_button_buy {
168   - background: #d41c34;
169   - color: #fff;
170   - border-radius: 10rpx;
171   -}
172   -
173   -.foot_box {
174   - -webkit-align-content: center;
175   - align-content: center;
176   - text-align: center;
177   - margin-top: 15rpx;
178   - margin-bottom: 50rpx;
179   -}
180   -
181   -.foot_box text {
182   - font-size: 25rpx;
183   - color: #fff;
184   -}
185   -
186   -.foot_empty {
187   - background-color: #fff;
188   - height: 375rpx;
189   - margin: 10rpx 20rpx 0rpx 20rpx;
190   - border-radius: 10rpx;
191   - text-align: center;
192   - padding: 150rpx 0rpx 300rpx 0rpx;
193   - -webkit-box-pack: center;
194   - -webkit-justify-content: center;
195   - justify-content: center;
196   -}
197   -
198   -.foot_empty image {
199   - width: 400rpx;
200   - height: 273rpx;
201   -}
202   -
203   -.foot_empty text {
204   - font-size: 30rpx;
205   - color: #999;
206   -}
207   -
208   -.foot_empty_button {
209   - background: #ff6363;
210   - margin: 60rpx 230rpx 0rpx 230rpx;
211   - padding: 10rpx;
212   - border-radius: 70rpx;
213   - line-height: 40rpx;
214   -}
215   -
216   -.foot_empty_button text {
217   - font-size: 28rpx;
218   - color: #fff;
219   -}
220   -.After_all {
221   - height: 80rpx;
222   - margin-bottom: 10rpx;
223   - color: rgb(255, 255, 255);
224   -}
225   -
226   -.After_all .Line {
227   - border-top: 3rpx solid rgb(255, 255, 255);
228   - width: 130rpx;
229   -}
230   -
231   -.After_all .end {
232   - margin: 0rpx 15rpx;
233   -}
234   -
235   -.searchbar {
236   - height: 95rpx;
237   - border-bottom: 2rpx solid rgb(238, 238, 238);
238   -}
239   -.storeListpadd {
240   - padding: 0rpx 31rpx;
241   -}
242   -.search {
243   - width: 125rpx;
244   - height: 45rpx;
245   - line-height: 45rpx;
246   - background-color: rgb(219, 27, 52);
247   - border-radius: 30rpx;
248   - color: rgb(255, 255, 255);
249   -}
250   -.inputstore {
251   - width: 510rpx;
252   - height: 43rpx;
253   - line-height: 43rpx;
254   - border-radius: 30rpx;
255   - border: 2rpx solid rgb(238, 238, 238);
256   - padding-left: 30rpx;
257   -}
  1 +.rty{
  2 + display:flex; justify-content: center; align-items: center;
  3 + width:100%;
  4 + height:100%
  5 +}
258 6 \ No newline at end of file
... ...
pages/giftpack/evaluategift/evaluategift.js
1   -var i = require("../../../utils/util.js")
2   -var e = getApp(),
3   - a = e.globalData.setting,
4   - os = a,
5   - t = e.request,
6   - d = e.globalData;
7 1 Page({
8   - data: {
9   - url: a.url, //接口网址
10   - iurl: a.imghost, //图片前缀网址
11   - itemShow: false, //项目栏目是否显示
12   - cardShow: false, //代金券栏目是否显示
13   - packShow: false, //福利栏目是否显示
14   - textShow: false, //规则是否显示
15   - integralShow: true, //积分领取是否显示
16   - growUpShow: true, //成长值领取是否显示
17   - itemButton: '',
18   - cardButton: '',
19   - getActId: '',
20   - getActType: '',
21   - giftBagId: '',
22   - receiveState: 0,
23   - textTitle: '',
24   - getUrl: '',
25   - noShow: false,
26   - cards: [], //礼包内容--礼券
27   - itemWare: [], //礼包内容--服务项目
28   - integralTitle: "",
29   - growUpTitle: "",
30   - is_sub: 0, //是否重复领取
31   - orderNumber: "", //订单号
32   - orderGoodsId: "", //商品id
33   - orderType:1,
34   - isdg:0,
35   -
36   - weappurltitle:"进入商城购物",
37   - weappurl:"/pages/index/index/index",
38   -
39   - },
40   - GetList: function() {
41   - var th = this;
42   - wx.showLoading({
43   - title: '加载中',
44   - })
45   - var url = "/api/weshop/marketing/giftbag/bound/get";
46   - getApp().request.promiseGet(url, {
47   - isShowLoading: true,
48   - data: {
49   - "actId": th.data.getActId, //活动Id
50   - "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
51   - "storeId": a.stoid, //商家Id
52   - "userId": d.user_id, //用户ID
53   - "orderNumber": th.data.orderNumber,
54   - "orderType": th.data.orderType,
55   - "orderGoodsId": th.data.orderGoodsId,
56   - "gifbagid": th.data.giftBagId,
57   - "isdg": th.data.isdg
58   - }
59   - }).then(res => {
60   - if (res.data.code == 0) {
61   - if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) {
62   - //礼包内容--礼券
63   - th.setData({
64   - cardShow: true,
65   - cards: res.data.data.lbCoupons
66   - })
67   - }
68   - if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != null) {
69   - //礼包内容--服务项目
70   - th.setData({
71   - itemShow: true,
72   - itemWare: res.data.data.lbSM
73   - })
74   - }
75   - //礼包积分
76   - if (res.data.data.lbIntegral <= 0) {
77   - if (res.data.data.lbGrowthValue <= 0) {
78   - th.setData({
79   - packShow: false
80   - })
81   - } else {
82   - th.setData({
83   - packShow: false,
84   - integralShow: false,
85   - growUpShow: true
86   - })
87   - }
88   -
89   - } else {
90   - if (res.data.data.lbGrowthValue > 0) {
91   - th.setData({
92   - packShow: true
93   - })
94   - } else {
95   - th.setData({
96   - packShow: true,
97   - integralShow: true,
98   - growUpShow: false
99   - })
100   - }
101   - }
102   - th.setData({
103   - integralTitle: '价值' + res.data.data.lbIntegral + '积分',
104   - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值'
105   - })
106   - if (res.data.data.receiveState == 0) {
107   - th.setData({
108   - receiveState:0
109   - })
110   - } else {
111   - th.setData({
112   - receiveState: 1
113   - })
114   - }
115   -
116   - if (res.data.data.actIntro != '') {
117   - th.setData({
118   - textShow: true,
119   - textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
120   - })
121   - }
122   - if (res.data.data.weappurl != '' && res.data.data.weappurltitle != '') {
123   - th.setData({
124   - weappurl: res.data.data.weappurl,
125   - weappurltitle: res.data.data.weappurltitle
126   - })
127   - }
128   -
129   -
130   - } else {
131   - getApp().my_warnning(res.data.msg, 0, th);
132   - return false;
133   - }
134   - })
135   - },
136   - onLoad: function(options) {
137   -
138   - var getisdg=0;
139   - if (options.isdg)
140   - {
141   - getisdg=options.isdg;
142   - }
143   - var th = this;
144   - th.setData({
145   - getActId: options.actId,
146   - orderNumber: options.orderNumber,
147   - orderGoodsId: options.orderGoodsId,
148   - giftBagId: options.giftBagId,
149   - isdg: getisdg
150   - })
151   -
152   - var orderType = options.orderType;
153   - if (orderType) {
154   - th.setData({ orderType: orderType})
155   - }
156   -
157   -
  2 + data: {},
  3 + onLoad: async function(options) {
  4 + getApp().globalData.ts_trans_data=options;
  5 + getApp().goto('/packageF/pages/giftpack/evaluategift/evaluategift');
158 6 },
159   - onShow: function() {
160   - //--先判断会员状态--
161   - var user_info = getApp().globalData.userInfo;
162   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
163   - getApp().goto('/packageE/pages/togoin/togoin');
164   - return false;
165   - }
166   -
167   - this.GetList();
168   -
169   - },
170   - GetReceive: function() {
171   - var th = this;
172   - if (th.data.receiveState) {
173   - return false;
174   - }
175   - var is_sub = th.data.is_sub; //判断是否重复提交
176   - if (is_sub == 0) {
177   - th.setData({
178   - is_sub: 1
179   - })
180   -
181   - var json = {
182   - "actId": th.data.getActId, //活动Id
183   - "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
184   - "storeId": a.stoid, //商家Id
185   - "userId": d.user_id, //用户ID
186   - "orderNumber": th.data.orderNumber,
187   - "orderType": th.data.orderType,
188   - "orderGoodsId": th.data.orderGoodsId,
189   - "giftBagId": th.data.giftBagId,
190   - "buyFrom": 2
191   - };
192   - if (th.data.isdg) {
193   - json.isdg=th.data.isdg
194   - }
195   - var data = JSON.stringify(json);
196   - var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
197   - getApp().request.json_post(url, json,
198   - function (res) {
199   - th.setData({
200   - is_sub: 0
201   - })
202   - if (res.data.code == 0) {
203   - th.setData({
204   - receiveState: 1
205   - })
206   - getApp().my_warnning("领取成功,同一个订单评价后只能兑换一份礼包!", 1, th);
207   - } else {
208   - getApp().my_warnning(res.data.msg, 0, th);
209   - }
210   - },
211   - function (res) {
  7 + //显示加载
  8 + onShow:function(){ },
212 9  
213   - }
214   -
215   - )
216   -
217   - }
218   - },
219   - //界面跳转
220   - goto: function(e) {
221   - var url = e.currentTarget.dataset.url;
222   - getApp().goto(url);
223   - },
224   - //图片失败,默认图片
225   - bind_bnerr1: function(e) {
226   - var th = this;
227   - var _errImg = e.target.dataset.errorimg;
228   - var _Img = e.target.dataset.img;
229   - if (_Img != undefined) {
230   - var _errObj = {};
231   - _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
232   - th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
233   - }
234   - },
235   -});
236 10 \ No newline at end of file
  11 +})
237 12 \ No newline at end of file
... ...
pages/giftpack/evaluategift/evaluategift.json
1 1 {
2   - "navigationBarTitleText": "评价有礼",
3   - "usingComponents": {
4   - "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm"
  2 + "windom": {
  3 + "navigationBarTitleText": "加载中.",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
6 8 }
  9 +
7 10 }
8 11 \ No newline at end of file
... ...
pages/giftpack/evaluategift/evaluategift.wxml
1   -<view>
2   - <view class="image_box">
3   - <image src="{{iurl+'miniapp/images/giftbag/eval00.png'}}" lazy-load="true"></image>
4   - </view>
5   - <block wx:if="{{itemShow}}">
6   - <view class="top rel">
7   - <view class="top_box">
8   - <view class="top_box_text">
9   - <text>______</text>
10   - </view>
11   - <view class="top_box_text">
12   - <text>评价专享\n你的美丽我来缔造</text>
13   - </view>
14   - <view class="top_box_text">
15   - <text>______</text>
16   - </view>
17   - </view>
18   - <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index">
19   - <view class="top_item ">
20   - <block wx:if="{{item.lbType==3}}">
21   - <view class="top_item_img">
22   - <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image>
23   - </view>
24   - </block>
25   - <block wx:if="{{item.lbType==1}}">
26   - <view class="top_item_img ">
27   - <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image>
28   - </view>
29   - </block>
30   - <view class="top_item_center ">
31   - <view class="top_item_center_title">
32   - <block wx:if="{{item.lbType==1}}">
33   - <text>免费领取</text>
34   - </block>
35   - <block wx:if="{{item.lbType==3}}">
36   - <text>{{item.fromName}}</text>
37   - </block>
38   - </view>
39   - <view class="top_item_center_ramke ">
40   - <block wx:if="{{item.lbType==1}}">
41   - <text>{{item.fromName}}</text>
42   - </block>
43   - <block wx:if="{{item.lbType==3}}">
44   - <text>{{"评价可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text>
45   - </block>
46   - <view class="num flex-level-right fs26">
47   - <view>数量:</view>
48   - <view>{{item.num}}</view>
49   - </view>
50   - </view>
51   - </view>
52   - </view>
53   - </block>
54   - <block wx:if="{{itemShow}}">
55   - <view class="vips">
56   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
57   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
58   - </view>
59   - </block>
60   - </view>
61   - </block>
62   - <block wx:if="{{cardShow}}">
63   - <view>
64   - <view class="top rel">
65   - <view class="top_box ">
66   - <view class="top_box_text ">
67   - <text>———</text>
68   - </view>
69   - <view class="top_box_text ">
70   - <text>评价专享优惠券</text>
71   - </view>
72   - <view class="top_box_text ">
73   - <text>———</text>
74   - </view>
75   - </view>
76   - <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index">
77   - <view class="top_card ">
78   - <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}">
79   - <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" -->
80   - <view class="top_card_tite_box ">
81   - <block wx:if="{{item.useObjectType==0}}">
82   - <view class="top_card_tite_a">全场通用</view>
83   - </block>
84   - <block wx:if="{{item.useObjectType==1}}">
85   - <view class="top_card_tite_b">品牌限定</view>
86   - </block>
87   - <block wx:if="{{item.useObjectType==2}}">
88   - <view class="top_card_tite_c">品类限定</view>
89   - </block>
90   - <block wx:if="{{item.useObjectType==11}}">
91   - <view class="top_card_tite_a">用途限定</view>
92   - </block>
93   - <block wx:if="{{item.useObjectType==12}}">
94   - <view class="top_card_tite_a">分类限定</view>
95   - </block>
96   - </view>
97   - <block wx:if="{{item.isPack!=null}}">
98   - <view class="top_card_counte">包邮券</view>
99   - </block>
100   - <block wx:else>
101   - <view class="top_card_counte ">{{item.sum+"元券"}}</view>
102   - </block>
103   - <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view>
104   - </view>
105   - </view>
106   - </block>
107   - <block wx:if="{{packShow}}">
108   - <view class="vips">
109   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
110   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
111   - </view>
112   - </block>
113   - </view>
114   - </view>
115   - </block>
116   - <block wx:if="{{packShow}}">
117   - <view>
118   - <view class="top ">
119   - <view class="top_box ">
120   - <view class="top_box_text ">
121   - <text>———</text>
122   - </view>
123   - <view class="top_box_text ">
124   - <text>评价专享福利</text>
125   - </view>
126   - <view class="top_box_text ">
127   - <text>———</text>
128   - </view>
129   - </view>
130   - <block wx:if="{{integralShow}}">
131   - <view>
132   - <view class="top_box_image ">
133   - <image src="{{iurl+'/miniapp/images/giftbag/integral.png'}}" lazy-load="true"></image>
134   - <button>{{integralTitle}}</button>
135   - </view>
136   - </view>
137   - </block>
138   - <block wx:if="{{growUpShow}}">
139   - <view>
140   - <view class="top_box_image fs36">
141   - <image src="{{iurl+'/miniapp/images/giftbag/growup.png'}}" lazy-load="true"></image>
142   - <button>{{growUpTitle}}</button>
143   - </view>
144   - </view>
145   - </block>
146   - </view>
147   - </view>
148   - </block>
149   - <block wx:if="{{textShow}}">
150   - <view class="foot_box">
151   - <view class="foot_box_title fs36">
152   - <text>活动规则:</text>
153   - </view>
154   - <view class="foot_box_text">
155   - <rich-text nodes="{{textTitle}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
156   - </view>
157   - </view>
158   - </block>
159   - <view class="button_box">
160   - <view>
161   - <button class="button" bindtap="goto" data-url="{{weappurl}}">{{weappurltitle}}</button>
162   - </view>
163   - <view class="button_text ">
164   - <text>本活动最终解释权归公司所有,如果有问题请联系客服</text>
165   - </view>
166   - </view>
167   - <view class="foot_empty "></view>
168   - <view class="foot_button">
169   - <block wx:if="{{receiveState}}">
170   - <view class="foot_button_notbuy">
171   - <text>已领取</text>
172   - </view>
173   - </block>
174   - <block wx:else>
175   - <view class="foot_button_buy'}}" bindtap="GetReceive">
176   - <text>一键全部领取</text>
177   - </view>
178   - </block>
179   - </view>
  1 +<!---- //文字"-->
  2 +<view class="rty">
  3 + <view style="margin-top:260rpx">加载中。。</view>
180 4 </view>
181   -<!-- 引入提示组件 -->
182   -<warn id="warn"></warn>
183   -<my_confirm id="my_confirm"></my_confirm>
184 5 \ No newline at end of file
... ...
pages/giftpack/evaluategift/evaluategift.wxss
1   -@charset "UTF-8";
2   -
3   -/* Author XGQ
4   - * 2019-10-27
5   - */
6   -
7   -.image_box {
8   - -webkit-box-pack: center;
9   - -webkit-justify-content: center;
10   - justify-content: center;
11   -}
12   -
13   -.image_box image {
14   - width: 100%;
15   - height: 690rpx;
16   -}
17   -
18   -.top {
19   - margin: -20rpx 28rpx 45rpx 28rpx;
20   - padding: 10rpx 10rpx 70rpx 10rpx;
21   - background-color: #fff;
22   - border-radius: 0rpx 0rpx 15rpx 15rpx;
23   -}
24   -
25   -.top_box {
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;
33   -}
34   -
35   -.top_box_text {
36   - -webkit-box-pack: center;
37   - -webkit-justify-content: center;
38   - justify-content: center;
39   - margin: 50rpx 15rpx 20rpx 15rpx;
40   -}
41   -
42   -.top_box_text text {
43   - color: rgb(71, 132, 239);
44   - font-size: 40rpx;
45   -}
46   -
47   -.top_item {
48   - display: -webkit-box;
49   - display: -webkit-flex;
50   - display: flex;
51   - width: 100%;
52   - margin: 60rpx 0 0 0;
53   -}
54   -
55   -.top_item_img {
56   - float: left;
57   - width: 28%;
58   - margin: 0rpx 10rpx 0rpx 20rpx;
59   -}
60   -
61   -.top_item_img image {
62   - width: 150rpx;
63   - height: 150rpx;
64   - border-radius: 50%;
65   - border: #f96865 solid 3rpx;
66   -}
67   -
68   -.top_item_center {
69   - float: left;
70   - width: 50%;
71   -}
72   -
73   -.top_item_center_title {
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;
86   -}
87   -
88   -.top_item_center_ramke {
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   - /** 隐藏超出的内容 **/
106   -}
107   -
108   -.top_item_button {
109   - float: right;
110   - width: 22%;
111   - padding: 65rpx 20rpx 0 1rpx;
112   -}
113   -
114   -.top_item_button button {
115   - font-size: 25rpx;
116   - background: #fd6969;
117   - color: #fff;
118   - border-radius: 50rpx;
119   - height: 45rpx;
120   - line-height: 45rpx;
121   -}
122   -
123   -.top_card {
124   - width: 309rpx;
125   - display: inline-block;
126   - margin: 15rpx;
127   - vertical-align:top;
128   -}
129   -
130   -.top_card_box {
131   - background-size: cover;
132   - background-position: center;
133   - background-repeat: no-repeat;
134   - border-radius: 20rpx;
135   - height: 250rpx;
136   - margin: 5rpx;
137   -}
138   -
139   -.img1 {
140   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
141   -}
142   -
143   -.img2 {
144   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
145   -}
146   -
147   -.img3 {
148   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
149   -}
150   -
151   -.top_card_tite_box {
152   - width: 100%;
153   - display: -webkit-box;
154   - display: -webkit-flex;
155   - display: flex;
156   - -webkit-box-pack: end;
157   - -webkit-justify-content: flex-end;
158   - justify-content: flex-end;
159   -}
160   -
161   -.top_card_tite_a {
162   - padding: 5rpx 25rpx 5rpx 25rpx;
163   - line-height: 29rpx;
164   - font-size: 25rpx;
165   - color: #fff;
166   - background: #ffa7c0;
167   - border-radius: 0rpx 20rpx 0rpx 6rpx;
168   -}
169   -
170   -.top_card_tite_b {
171   - padding: 5rpx 25rpx 5rpx 25rpx;
172   - line-height: 29rpx;
173   - font-size: 25rpx;
174   - color: #fff;
175   - background: #50dfdb;
176   - border-radius: 0rpx 20rpx 0rpx 6rpx;
177   -}
178   -
179   -.top_card_tite_c {
180   - padding: 5rpx 25rpx 5rpx 25rpx;
181   - line-height: 29rpx;
182   - font-size: 25rpx;
183   - color: #fff;
184   - background: #92cbff;
185   - border-radius: 0rpx 20rpx 0rpx 6rpx;
186   -}
187   -
188   -.top_card_tite_d {
189   - padding: 5rpx 25rpx 5rpx 25rpx;
190   - line-height: 29rpx;
191   - font-size: 25rpx;
192   - color: #fff;
193   - border-radius: 0rpx 20rpx 0rpx 6rpx;
194   -}
195   -
196   -.top_card_counte {
197   - padding: 40rpx 20rpx 0 0;
198   - text-align: center;
199   - display: -webkit-box;
200   - display: -webkit-flex;
201   - display: flex;
202   - -webkit-box-pack: center;
203   - -webkit-justify-content: center;
204   - justify-content: center;
205   - -webkit-box-align: center;
206   - -webkit-align-items: center;
207   - align-items: center;
208   - color: #fff;
209   - font-size: 40rpx;
210   -}
211   -
212   -.top_card_remak {
213   - padding: 20rpx 0 40rpx 0;
214   - text-align: center;
215   - display: -webkit-box;
216   - display: -webkit-flex;
217   - display: flex;
218   - -webkit-box-pack: center;
219   - -webkit-justify-content: center;
220   - justify-content: center;
221   - -webkit-box-align: center;
222   - -webkit-align-items: center;
223   - align-items: center;
224   - font-size: 20rpx;
225   - color: #fff;
226   -}
227   -
228   -.top_card_button_a button {
229   - margin: 0 85rpx;
230   - background: #ffa6bc;
231   - border-radius: 50rpx;
232   - line-height: 40rpx;
233   - height: 40rpx;
234   - color: white;
235   - font-size: 25rpx;
236   -}
237   -
238   -.top_card_button_b button {
239   - margin: 0 85rpx;
240   - background: #50dfdb;
241   - border-radius: 50rpx;
242   - line-height: 40rpx;
243   - height: 40rpx;
244   - color: white;
245   - font-size: 25rpx;
246   -}
247   -
248   -.top_card_button_c button {
249   - margin: 0 85rpx;
250   - background: #75bcfc;
251   - border-radius: 50rpx;
252   - line-height: 40rpx;
253   - height: 40rpx;
254   - color: white;
255   - font-size: 25rpx;
256   -}
257   -
258   -.top_card_button_d button {
259   - margin: 0 85rpx;
260   - border-radius: 50rpx;
261   - line-height: 40rpx;
262   - height: 40rpx;
263   - color: white;
264   - font-size: 25rpx;
265   -}
266   -
267   -.top_box_image {
268   - padding: 20rpx 20rpx 20rpx 20rpx;
269   -}
270   -
271   -.top_box_image image {
272   - height: 216rpx;
273   - width: 100%;
274   -}
275   -
276   -.top_box_image button {
277   - margin: 15rpx 95rpx 0rpx 95rpx;
278   - background: #fe6a6a;
279   - border-radius: 50rpx;
280   - line-height: 60rpx;
281   - height: 60rpx;
282   - color: white;
283   - font-size: 30rpx;
284   -}
285   -
286   -.foot_box {
287   - margin: 0 30rpx 40rpx 30rpx;
288   - /* background: #FFFFFF; */
289   - border-radius: 20rpx;
290   - background-color: rgb(255, 255, 255);
291   -}
292   -
293   -.foot_box_title {
294   - /* color: #000000; */
295   - padding: 20rpx 30rpx 20rpx 30rpx;
296   -}
297   -
298   -.foot_box_text {
299   - font-size: 30rpx;
300   - /* color: #000000; */
301   - line-height: 48rpx;
302   - padding: 20rpx 35rpx 50rpx 30rpx;
303   -}
304   -
305   -.button_box {
306   - margin: 50rpx 50rpx 50rpx 50rpx;
307   - text-align: center;
308   -}
309   -
310   -.button {
311   - margin: 0 30rpx;
312   - background: rgb(93, 147, 245);
313   - border-radius: 50rpx;
314   - line-height: 80rpx;
315   - height: 80rpx;
316   - color: rgb(255, 255, 255);
317   - font-size: 35rpx;
318   -}
319   -
320   -.button_text {
321   - padding-top: 20rpx;
322   - font-size: 22rpx;
323   - color: white;
324   - height: 100rpx;
325   -}
326   -
327   -.foot_empty {
328   - height: 90rpx;
329   -}
330   -
331   -.foot_button {
332   - display: -webkit-box;
333   - display: -webkit-flex;
334   - display: flex;
335   - margin: 20rpx 0rpx 0rpx 0rpx;
336   - padding: 25rpx 0rpx;
337   - background: #fff;
338   - text-align: center;
339   - -webkit-box-pack: center;
340   - -webkit-justify-content: center;
341   - justify-content: center;
342   - position: fixed;
343   - bottom: 0;
344   - left: 0;
345   - width: 100%;
346   -}
347   -
348   -.foot_button_buy {
349   - background: rgb(71, 132, 239);
350   - color: #fff;
351   - width: 400rpx;
352   - height: 70rpx;
353   - font-size: 28rpx;
354   - line-height: 70rpx;
355   - border-radius: 40rpx;
356   -}
357   -
358   -.foot_button_notbuy {
359   - background: #999;
360   - color: #fff;
361   - width: 400rpx;
362   - height: 70rpx;
363   - font-size: 28rpx;
364   - line-height: 70rpx;
365   - border-radius: 40rpx;
366   -}
367   -
368   -page {
369   - background-color: rgb(71, 132, 239);
370   -}
371   -
372   -button::after {
373   - border: none;
374   -}
375   -
376   -.foot_box_text ._img {
377   - width: 100%;
378   -}
379   -
380   -.foot_box_text .img {
381   - line-height: 0;
382   -}
383   -.num {
384   - color: rgb(71, 132, 239);
385   -}
386   -
387   -.lvip {
388   - left: 30rpx;
389   - bottom: -58rpx;
390   - width: 20rpx;
391   - height: 90rpx;
392   - z-index: 5;
393   -}
394   -
395   -.rvip {
396   - right: 30rpx;
397   - bottom: -58rpx;
398   - width: 20rpx;
399   - height: 90rpx;
400   - z-index: 5;
401   -}
  1 +.rty{
  2 + display:flex; justify-content: center; align-items: center;
  3 + width:100%;
  4 + height:100%
  5 +}
402 6 \ No newline at end of file
... ...
pages/giftpack/festival/festival.js
1   -var i = require("../../../utils/util.js")
2   -var e = getApp(),
3   - a = e.globalData.setting,
4   - os = a,
5   - t = e.request,
6   - d = e.globalData;
7 1 Page({
8   - data: {
9   - url: a.url, //接口网址
10   - iurl: a.imghost, //图片前缀网址
11   - itemShow: false, //项目栏目是否显示
12   - cardShow: false, //代金券栏目是否显示
13   - packShow: false, //福利栏目是否显示
14   - textShow: false, //规则是否显示
15   - integralShow: true, //积分领取是否显示
16   - growUpShow: true, //成长值领取是否显示
17   - itemButton: '',
18   - cardButton: '',
19   - getActId: '',
20   - getActType: '',
21   - giftID: '',
22   - receiveState: 0,
23   - textTitle: '',
24   - getUrl: '',
25   - noShow: false,
26   - cards: [], //礼包内容--礼券
27   - itemWare: [], //礼包内容--服务项目
28   - integralTitle: "",
29   - growUpTitle: "",
30   - is_sub: 0, //是否重复领取
31   - bimg: "", //评价有礼背景图片
32   - actFontColor: "", //字体颜色
33   - actBgColor: "", //背景颜色
  2 + data: {},
  3 + onLoad: async function(options) {
  4 + getApp().globalData.ts_trans_data=options;
  5 + getApp().goto('/packageF/pages/giftpack/festival/festival');
34 6 },
35   - GetList: function() {
36   - var th = this;
37   - wx.showLoading({
38   - title: '加载中',
39   - })
40   - var url = "/api/weshop/marketing/giftbag/bound/get";
41   - getApp().request.promiseGet(url, {
42   - isShowLoading: true,
43   - data: {
44   - "actId": th.data.getActId, //活动id
45   - "actType": 3, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销
46   - "giftBagId": th.data.giftID, //礼包ID
47   - "storeId": a.stoid, //商家ID
48   - "userId": d.user_id //用户ID
49   - }
50   - }).then(res => {
51   - if (res.data.code == 0) {
52   - if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length > 0) {
53   - //礼包内容--礼券
54   - th.setData({
55   - cardShow: true,
56   - cards: res.data.data.lbCoupons
57   - })
58   - }
59   - if (res.data.data.lbSM != null && res.data.data.lbSM.length > 0) {
60   - //礼包内容--服务项目
61   - th.setData({
62   - itemShow: true,
63   - itemWare: res.data.data.lbSM
64   - })
65   - }
66   - //礼包积分
67   - if (res.data.data.lbIntegral <= 0) {
68   - if (res.data.data.lbGrowthValue <= 0) {
69   - th.setData({
70   - packShow: false
71   - })
72   - } else {
73   - th.setData({
74   - packShow: false,
75   - integralShow: false,
76   - growUpShow: true
77   - })
78   - }
  7 + //显示加载
  8 + onShow:function(){ },
79 9  
80   - } else {
81   - if (res.data.data.lbGrowthValue > 0) {
82   - th.setData({
83   - packShow: true
84   - })
85   - } else {
86   - th.setData({
87   - packShow: true,
88   - integralShow: true,
89   - growUpShow: false
90   - })
91   - }
92   - }
93   - th.setData({
94   - integralTitle: '价值' + res.data.data.lbIntegral + '积分',
95   - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值'
96   - })
97   - if (res.data.data.receiveState == 0) {
98   - th.setData({
99   - receiveState: 0
100   - })
101   - } else {
102   - th.setData({
103   - receiveState: 1
104   - })
105   - }
106   -
107   - if (res.data.data.actIntro != '') {
108   - th.setData({
109   - textShow: true,
110   - textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
111   - })
112   - }
113   - } else {
114   - getApp().my_warnning(res.data.msg, 0, th);
115   - return false;
116   - }
117   - })
118   - },
119   -
120   - onLoad: function(options) {
121   -
122   - var th = this;
123   - th.setData({
124   - getActId: options.actId,
125   - giftID: options.giftBagId
126   - })
127   -
128   - wx.setNavigationBarTitle({
129   - title: "节日有礼",
130   - });
131   - },
132   - onShow: function() {
133   - //--先判断会员状态--
134   - var user_info = getApp().globalData.userInfo;
135   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
136   - getApp().goto('/packageE/pages/togoin/togoin');
137   - return false;
138   - }
139   - this.is_festival();
140   - this.GetList();
141   -
142   - },
143   - GetReceive: function() {
144   - var th = this;
145   - if (th.data.receiveState) {
146   - return false;
147   - }
148   - var is_sub = th.data.is_sub; //判断是否重复提交
149   - if (is_sub == 0) {
150   - th.setData({
151   - is_sub: 1
152   - })
153   - var json = {
154   - "actId": th.data.getActId, //活动Id
155   - "actType": 3, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
156   - "giftBagId": th.data.giftID, //礼包Id
157   - "storeId": a.stoid, //商家Id
158   - "userId": d.user_id, //用户ID
159   - "buyFrom": 2
160   - }
161   - var data = JSON.stringify(json);
162   - var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
163   - getApp().request.json_post(url, json,
164   - function (res) {
165   - th.setData({
166   - is_sub: 0
167   - })
168   - if (res.data.code == 0) {
169   - th.setData({
170   - receiveState: 1
171   - })
172   - getApp().my_warnning("领取成功", 1, th);
173   - } else {
174   - getApp().my_warnning(res.data.msg, 0, th);
175   - }
176   - },
177   - function (res) {
178   - }
179   - )
180   - }
181   - },
182   - //获取节日有礼信息
183   - is_festival: function(e) {
184   - var th = this;
185   - var url = "/api/weshop/marketing/holiday/act/judge";
186   - console.log(th.data.getActId);
187   - getApp().request.promiseGet(url, {
188   - data: {
189   - storeId: a.stoid, //商家ID
190   - userId: d.user_id, //用户ID
191   - id:th.data.getActId
192   - }
193   - }).then(res => {
194   - if (res.data.code == 0) {
195   - th.setData({
196   - bimg: res.data.data.actImg,
197   - actFontColor: res.data.data.actFontColor, //字体颜色
198   - actBgColor: res.data.data.actBgColor, //背景颜色
199   - })
200   - }
201   - })
202   - },
203   - //界面跳转
204   - goto: function(e) {
205   - var url = e.currentTarget.dataset.url;
206   - getApp().goto(url);
207   - },
208   - //图片失败,默认图片
209   - bind_bnerr1: function(e) {
210   - var th = this;
211   - var _errImg = e.target.dataset.errorimg;
212   - var _Img = e.target.dataset.img;
213   - if (_Img != undefined) {
214   - var _errObj = {};
215   - _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
216   - th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
217   - }
218   - },
219   -});
220 10 \ No newline at end of file
  11 +})
221 12 \ No newline at end of file
... ...
pages/giftpack/festival/festival.json
1 1 {
2   - "navigationBarTitleText": "节日有礼",
3   - "usingComponents": {
4   - "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm"
  2 + "windom": {
  3 + "navigationBarTitleText": "加载中.",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
6 8 }
  9 +
7 10 }
8 11 \ No newline at end of file
... ...
pages/giftpack/festival/festival.wxml
1   -<view style="background-color:{{actBgColor==undefined?'#FFB72D':actBgColor}}">
2   - <view class="image_box">
3   - <image src="{{iurl}}{{bimg?bimg:'/miniapp/images/default_g_img.gif'}}" binderror="bind_bnerr1" data-errorimg="bimg" lazy-load="true"></image>
4   - </view>
5   - <block wx:if="{{itemShow}}">
6   - <view class="top rel">
7   - <view class="top_box">
8   - <view class="top_box_text">
9   - <text style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">______</text>
10   - </view>
11   - <view class="top_box_text">
12   - <text style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">节日专享\n你的美丽我来缔造</text>
13   - </view>
14   - <view class="top_box_text">
15   - <text style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">______</text>
16   - </view>
17   - </view>
18   - <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index">
19   - <view class="top_item ">
20   - <block wx:if="{{item.lbType==3}}">
21   - <view class="top_item_img">
22   - <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image>
23   - </view>
24   - </block>
25   - <block wx:if="{{item.lbType==1}}">
26   - <view class="top_item_img ">
27   - <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image>
28   - </view>
29   - </block>
30   - <view class="top_item_center ">
31   - <view class="top_item_center_title" style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">
32   - <block wx:if="{{item.lbType==1}}">
33   - <text>免费领取</text>
34   - </block>
35   - <block wx:if="{{item.lbType==3}}">
36   - <text>{{item.fromName}}</text>
37   - </block>
38   - </view>
39   - <view class="top_item_center_ramke ">
40   - <block wx:if="{{item.lbType==1}}">
41   - <text>{{item.fromName}}</text>
42   - </block>
43   - <block wx:if="{{item.lbType==3}}">
44   - <text>{{"节日可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text>
45   - </block>
46   - <view class="num flex-level-right fs26" style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">
47   - <view>数量:</view>
48   - <view>{{item.num}}</view>
49   - </view>
50   - </view>
51   - </view>
52   - </view>
53   - </block>
54   - <block wx:if="{{itemShow}}">
55   - <view class="vips">
56   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
57   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
58   - </view>
59   - </block>
60   - </view>
61   - </block>
62   - <block wx:if="{{cardShow}}">
63   - <view>
64   - <view class="top rel">
65   - <view class="top_box ">
66   - <view class="top_box_text">
67   - <text style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">———</text>
68   - </view>
69   - <view class="top_box_text ">
70   - <text style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">节日专享优惠券</text>
71   - </view>
72   - <view class="top_box_text ">
73   - <text style="color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">———</text>
74   - </view>
75   - </view>
76   - <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index">
77   - <view class="top_card ">
78   - <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}">
79   - <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" -->
80   - <view class="top_card_tite_box ">
81   - <block wx:if="{{item.useObjectType==0}}">
82   - <view class="top_card_tite_a">全场通用</view>
83   - </block>
84   - <block wx:if="{{item.useObjectType==1}}">
85   - <view class="top_card_tite_b">品牌限定</view>
86   - </block>
87   - <block wx:if="{{item.useObjectType==2}}">
88   - <view class="top_card_tite_c">品类限定</view>
89   - </block>
90   - <block wx:if="{{item.useObjectType==11}}">
91   - <view class="top_card_tite_a">用途限定</view>
92   - </block>
93   - <block wx:if="{{item.useObjectType==12}}">
94   - <view class="top_card_tite_a">分类限定</view>
95   - </block>
96   - </view>
97   - <block wx:if="{{item.isPack!=null}}">
98   - <view class="top_card_counte">包邮券</view>
99   - </block>
100   - <block wx:else>
101   - <view class="top_card_counte ">{{item.sum+"元券"}}</view>
102   - </block>
103   - <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view>
104   - </view>
105   - </view>
106   - </block>
107   - <block wx:if="{{packShow}}">
108   - <view class="vips">
109   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
110   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
111   - </view>
112   - </block>
113   - </view>
114   - </view>
115   - </block>
116   - <block wx:if="{{packShow}}">
117   - <view>
118   - <view class="top ">
119   - <view class="top_box ">
120   - <view class="top_box_text ">
121   - <text>———</text>
122   - </view>
123   - <view class="top_box_text ">
124   - <text>节日专享福利</text>
125   - </view>
126   - <view class="top_box_text ">
127   - <text>———</text>
128   - </view>
129   - </view>
130   - <block wx:if="{{integralShow}}">
131   - <view>
132   - <view class="top_box_image ">
133   - <image src="{{iurl+'/miniapp/images/giftbag/integral.png'}}" lazy-load="true"></image>
134   - <button style="background-color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">{{integralTitle}}</button>
135   - </view>
136   - </view>
137   - </block>
138   - <block wx:if="{{growUpShow}}">
139   - <view>
140   - <view class="top_box_image fs36">
141   - <image src="{{iurl+'/miniapp/images/giftbag/growup.png'}}" lazy-load="true"></image>
142   - <button style="background-color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">{{growUpTitle}}</button>
143   - </view>
144   - </view>
145   - </block>
146   - </view>
147   - </view>
148   - </block>
149   - <block wx:if="{{textShow}}">
150   - <view class="foot_box">
151   - <view class="foot_box_title fs36">
152   - <text>活动规则:</text>
153   - </view>
154   - <view class="foot_box_text">
155   - <rich-text nodes="{{textTitle}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
156   - </view>
157   - </view>
158   - </block>
159   - <view class="button_box">
160   - <view>
161   - <button class="button" bindtap="goto" data-url="/pages/index/index/index" style="background-color:{{actFontColor!='' && actFontColor!=undefined?actFontColor:''}}">进入商城购物</button>
162   - </view>
163   - <view class="button_text ">
164   - <text>本活动最终解释权归公司所有,如果有问题请联系客服</text>
165   - </view>
166   - </view>
167   - <view class="foot_empty "></view>
168   - <view class="foot_button">
169   - <block wx:if="{{receiveState}}">
170   - <view class="foot_button_notbuy">
171   - <text>已领取</text>
172   - </view>
173   - </block>
174   - <block wx:else>
175   - <view class="foot_button_buy'}}" bindtap="GetReceive">
176   - <text>一键全部领取</text>
177   - </view>
178   - </block>
179   - </view>
  1 +<!---- //文字"-->
  2 +<view class="rty">
  3 + <view style="margin-top:260rpx">加载中。。</view>
180 4 </view>
181   -<!-- 引入提示组件 -->
182   -<warn id="warn"></warn>
183   -<my_confirm id="my_confirm"></my_confirm>
184 5 \ No newline at end of file
... ...
pages/giftpack/festival/festival.wxss
1   -@charset "UTF-8";
2   -
3   -/* Author XGQ
4   - * 2019-10-27
5   - */
6   -
7   -.image_box {
8   - -webkit-box-pack: center;
9   - -webkit-justify-content: center;
10   - justify-content: center;
11   -}
12   -
13   -.image_box image {
14   - width: 100%;
15   - height: 690rpx;
16   -}
17   -
18   -.top {
19   - margin: 0rpx 28rpx 45rpx 28rpx;
20   - padding: 10rpx 10rpx 70rpx 10rpx;
21   - background-color: #fff;
22   - border-radius: 0rpx 0rpx 15rpx 15rpx;
23   -}
24   -
25   -.top_box {
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;
33   -}
34   -
35   -.top_box_text {
36   - -webkit-box-pack: center;
37   - -webkit-justify-content: center;
38   - justify-content: center;
39   - margin: 20rpx 15rpx 20rpx 15rpx;
40   -}
41   -
42   -.top_box_text text {
43   - color: #FFB72D;
44   - font-size: 40rpx;
45   -}
46   -
47   -.top_item {
48   - display: -webkit-box;
49   - display: -webkit-flex;
50   - display: flex;
51   - width: 100%;
52   - margin: 60rpx 0 0 0;
53   -}
54   -
55   -.top_item_img {
56   - float: left;
57   - width: 28%;
58   - margin: 0rpx 10rpx 0rpx 20rpx;
59   -}
60   -
61   -.top_item_img image {
62   - width: 150rpx;
63   - height: 150rpx;
64   - border-radius: 50%;
65   - border: #f96865 solid 3rpx;
66   -}
67   -
68   -.top_item_center {
69   - float: left;
70   - width: 50%;
71   -}
72   -
73   -.top_item_center_title {
74   - font-size: 35rpx;
75   - color: #FFB72D;
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   - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
82   - text-overflow: ellipsis;
83   - display: -webkit-box;
84   - /** 对象作为伸缩盒子模型显示 **/
85   - -webkit-box-orient: vertical;
86   - /** 设置或检索伸缩盒对象的子元素的排列方式 **/
87   - -webkit-line-clamp: 2;
88   - /** 显示的行数 **/
89   - overflow: hidden;
90   - /** 隐藏超出的内容 **/
91   -}
92   -
93   -.top_item_center_ramke {
94   - font-size: 25rpx;
95   - -webkit-box-pack: start;
96   - -webkit-justify-content: flex-start;
97   - justify-content: flex-start;
98   - line-height: 35rpx;
99   - letter-spacing: 0.5rpx;
100   - word-break: break-all;
101   - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
102   - text-overflow: ellipsis;
103   - display: -webkit-box;
104   - /** 对象作为伸缩盒子模型显示 **/
105   - -webkit-box-orient: vertical;
106   - /** 设置或检索伸缩盒对象的子元素的排列方式 **/
107   - -webkit-line-clamp: 2;
108   - /** 显示的行数 **/
109   - overflow: hidden;
110   - /** 隐藏超出的内容 **/
111   -}
112   -
113   -.top_item_button {
114   - float: right;
115   - width: 22%;
116   - padding: 65rpx 20rpx 0 1rpx;
117   -}
118   -
119   -.top_item_button button {
120   - font-size: 25rpx;
121   - background: #fd6969;
122   - color: #fff;
123   - border-radius: 50rpx;
124   - height: 45rpx;
125   - line-height: 45rpx;
126   -}
127   -
128   -.top_card {
129   - width: 309rpx;
130   - display: inline-block;
131   - margin: 15rpx;
132   - vertical-align:top;
133   -}
134   -
135   -.top_card_box {
136   - background-size: cover;
137   - background-position: center;
138   - background-repeat: no-repeat;
139   - border-radius: 20rpx;
140   - height: 250rpx;
141   -}
142   -
143   -.img1 {
144   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
145   -}
146   -
147   -.img2 {
148   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
149   -}
150   -
151   -.img3 {
152   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
153   -}
154   -
155   -.top_card_tite_box {
156   - width: 100%;
157   - display: -webkit-box;
158   - display: -webkit-flex;
159   - display: flex;
160   - -webkit-box-pack: end;
161   - -webkit-justify-content: flex-end;
162   - justify-content: flex-end;
163   -}
164   -
165   -.top_card_tite_a {
166   - padding: 5rpx 25rpx 5rpx 25rpx;
167   - line-height: 29rpx;
168   - font-size: 25rpx;
169   - color: #fff;
170   - background: #ffa7c0;
171   - border-radius: 0rpx 20rpx 0rpx 6rpx;
172   -}
173   -
174   -.top_card_tite_b {
175   - padding: 5rpx 25rpx 5rpx 25rpx;
176   - line-height: 29rpx;
177   - font-size: 25rpx;
178   - color: #fff;
179   - background: #50dfdb;
180   - border-radius: 0rpx 20rpx 0rpx 6rpx;
181   -}
182   -
183   -.top_card_tite_c {
184   - padding: 5rpx 25rpx 5rpx 25rpx;
185   - line-height: 29rpx;
186   - font-size: 25rpx;
187   - color: #fff;
188   - background: #92cbff;
189   - border-radius: 0rpx 20rpx 0rpx 6rpx;
190   -}
191   -
192   -.top_card_tite_d {
193   - padding: 5rpx 25rpx 5rpx 25rpx;
194   - line-height: 29rpx;
195   - font-size: 25rpx;
196   - color: #fff;
197   - border-radius: 0rpx 20rpx 0rpx 6rpx;
198   -}
199   -
200   -.top_card_counte {
201   - padding: 40rpx 20rpx 0 0;
202   - text-align: center;
203   - display: -webkit-box;
204   - display: -webkit-flex;
205   - display: flex;
206   - -webkit-box-pack: center;
207   - -webkit-justify-content: center;
208   - justify-content: center;
209   - -webkit-box-align: center;
210   - -webkit-align-items: center;
211   - align-items: center;
212   - color: #fff;
213   - font-size: 40rpx;
214   -}
215   -
216   -.top_card_remak {
217   - padding: 20rpx 0 40rpx 0;
218   - text-align: center;
219   - display: -webkit-box;
220   - display: -webkit-flex;
221   - display: flex;
222   - -webkit-box-pack: center;
223   - -webkit-justify-content: center;
224   - justify-content: center;
225   - -webkit-box-align: center;
226   - -webkit-align-items: center;
227   - align-items: center;
228   - font-size: 20rpx;
229   - color: #fff;
230   -}
231   -
232   -.top_card_button_a button {
233   - margin: 0 85rpx;
234   - background: #ffa6bc;
235   - border-radius: 50rpx;
236   - line-height: 40rpx;
237   - height: 40rpx;
238   - color: white;
239   - font-size: 25rpx;
240   -}
241   -
242   -.top_card_button_b button {
243   - margin: 0 85rpx;
244   - background: #50dfdb;
245   - border-radius: 50rpx;
246   - line-height: 40rpx;
247   - height: 40rpx;
248   - color: white;
249   - font-size: 25rpx;
250   -}
251   -
252   -.top_card_button_c button {
253   - margin: 0 85rpx;
254   - background: #75bcfc;
255   - border-radius: 50rpx;
256   - line-height: 40rpx;
257   - height: 40rpx;
258   - color: white;
259   - font-size: 25rpx;
260   -}
261   -
262   -.top_card_button_d button {
263   - margin: 0 85rpx;
264   - border-radius: 50rpx;
265   - line-height: 40rpx;
266   - height: 40rpx;
267   - color: white;
268   - font-size: 25rpx;
269   -}
270   -
271   -.top_box_image {
272   - padding: 20rpx 20rpx 20rpx 20rpx;
273   -}
274   -
275   -.top_box_image image {
276   - height: 216rpx;
277   - width: 100%;
278   -}
279   -
280   -.top_box_image button {
281   - margin: 15rpx 95rpx 0rpx 95rpx;
282   - background: rgb(254,182,44);
283   - border-radius: 50rpx;
284   - line-height: 60rpx;
285   - height: 60rpx;
286   - color: white;
287   - font-size: 30rpx;
288   -}
289   -
290   -.foot_box {
291   - margin: 0 30rpx 40rpx 30rpx;
292   - background: #fff;
293   - border-radius: 20rpx;
294   -}
295   -
296   -.foot_box_title {
297   - color: #000;
298   - padding: 20rpx 30rpx 20rpx 30rpx;
299   -}
300   -
301   -.foot_box_text {
302   - font-size: 30rpx;
303   - color: #000;
304   - line-height: 48rpx;
305   - padding: 20rpx 35rpx 50rpx 30rpx;
306   -}
307   -
308   -.button_box {
309   - margin: 50rpx 50rpx 50rpx 50rpx;
310   - text-align: center;
311   -}
312   -
313   -.button {
314   - margin: 0 30rpx;
315   - background: #FFDB97;
316   - border-radius: 50rpx;
317   - line-height: 80rpx;
318   - height: 80rpx;
319   - color: white;
320   - font-size: 35rpx;
321   -}
322   -
323   -.button_text {
324   - padding-top: 20rpx;
325   - font-size: 20rpx;
326   - color: white;
327   - height: 100rpx;
328   -}
329   -
330   -.foot_empty {
331   - height: 90rpx;
332   -}
333   -
334   -.foot_button {
335   - display: -webkit-box;
336   - display: -webkit-flex;
337   - display: flex;
338   - margin: 20rpx 0rpx 0rpx 0rpx;
339   - padding: 25rpx 0rpx;
340   - background: #fff;
341   - text-align: center;
342   - -webkit-box-pack: center;
343   - -webkit-justify-content: center;
344   - justify-content: center;
345   - position: fixed;
346   - bottom: 0;
347   - left: 0;
348   - width: 100%;
349   - z-index: 10;
350   -}
351   -
352   -.foot_button_buy {
353   - background: #FFB72D;
354   - color: #fff;
355   - width: 400rpx;
356   - height: 70rpx;
357   - font-size: 28rpx;
358   - line-height: 70rpx;
359   - border-radius: 40rpx;
360   -}
361   -
362   -.foot_button_notbuy {
363   - background: #999;
364   - color: #fff;
365   - width: 400rpx;
366   - height: 70rpx;
367   - font-size: 28rpx;
368   - line-height: 70rpx;
369   - border-radius: 40rpx;
370   -}
371   -
372   -/* page {
373   - background-color: #FFB72D;
374   -} */
375   -
376   -button::after {
377   - border: none;
378   -}
379   -
380   -.foot_box_text ._img {
381   - width: 100%;
382   -}
383   -
384   -.foot_box_text .img {
385   - line-height: 0;
386   -}
387   -
388   -.image {
389   - width: 400rpx;
390   - height: 200rpx;
391   -}
392   -
393   -.num {
394   - color: #FFB72D;
395   -}
396   -
397   -.lvip {
398   - left: 30rpx;
399   - bottom: -58rpx;
400   - width: 20rpx;
401   - height: 90rpx;
402   - z-index: 5;
403   -}
404   -
405   -.rvip {
406   - right: 30rpx;
407   - bottom: -58rpx;
408   - width: 20rpx;
409   - height: 90rpx;
410   - z-index: 5;
411   -}
  1 +.rty{
  2 + display:flex; justify-content: center; align-items: center;
  3 + width:100%;
  4 + height:100%
  5 +}
412 6 \ No newline at end of file
... ...
pages/giftpack/giftpacklist/giftpacklist.js
1   -var e = getApp(),
2   - a = e.globalData.setting,
3   - os = a,
4   - t = e.request,
5   - d = e.globalData;
6   -var ut = require("../../../utils/util.js");
7   -var com = require("../public/buy_com.js");
8   -
9 1 Page({
10   - data: {
11   - url: a.url, //接口网址
12   - iurl: a.imghost, //图片前缀网址
13   - isBuy: 0,
14   - getGiftID: '', //礼包id
15   - giftImage: '',
16   - giftTitle: '',
17   - giftDate: '',
18   - giftPrice: '',
19   - giftIntegral: '',
20   - giftPosPrice: '',
21   - giftQty: '',
22   - giftRemark: '',
23   - giftType: '',
24   - actTitle: '',
25   - getUrl: '',
26   - wareCard: [],
27   - orderSn: "", //订单编号
28   - lbId: "",
29   - code: "", //核销码
30   - c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期
31   - is_lb: 0, //是否有礼包
32   - default_color: null,
33   - first_leader: e.globalData.first_leader || 0, // 推荐人ID
34   -
35   - //门店相关
36   - ismend: 0,
37   - is_sec_mend: 0,
38   - sto_sele_name: "", //选中的门店名称
39   - sto_sele_id: "", //选中的门店id
40   - sto_sele_distr: "", //选择的门店的配送方式
41   - is_show_sto_cat: 1, //是否显示门店分类
42   - only_pk: null,
43   - all_sto: null,
44   - sec_sto: null, //选择了的门店分类
45   - pickpu_list: null, //读出的所有门店list
46   - def_pickpu_list: null, //一开始5个门店list
47   - sec_pick_index: 0, //第二级门店选择ID
48   - fir_pick_index: 0, //第一级门店选择ID
49   - all_pick_list: null,//所有的门店先记录起来
50   -
51   - select_store: 0, //选择更多
52   - index: 1,
53   - more_store: 0, //选择门店
54   - sort_store: 0, //门店分类
55   - choice_sort_store: 0, //选择分类门店
56   - new_user: 0, //新用户
57   -
58   - def_pick_store: null, // 默认的门店
59   - fir_def_store: null, //客户默认的门店的
60   - lat: null, //维度
61   - lon: null, //经度
62   -
63   - is_get_local_ok: 0, //获取坐标是否完成
64   - region_name: "门店分类", //区域的名字
65   - is_gps: 1,
66   - open_ind_store: 0, //哪里打开的门店列表的控制属性
67   - default_store: {}, //创建添加默认门店地址的对象
68   -
69   - store: 0,
70   - openSpecModal: 0,
71   -
72   - sto_sele_name_1: '',
73   - share_goods_img:'', //礼包的分享图
74   - giftImageCover:null,
75   - canvasHidden:true,
76   -
77   - screenWidth: 0,
78   - submit:0,
79   - is_detail:1, //是详情页面的购买
80   - keyword:'', //门店搜索
81   - sec_i:-1,//选中分类门店 下标
82   - },
83   - onLoad: function (options) {
84   -
85   - //定义第一次进入
86   - this.data.fir_in=1;
87   -
88   - var th = this;
89   -
90   - this.setData({
91   - params: options,
92   - })
93   -
94   - getApp().getConfig(function (e) {
95   - th.setData({sto_sele_name_1: e.store_name})
96   - })
97   -
98   - getApp().getConfig2(function (e) {
99   - var json_d = JSON.parse(e.switch_list);
100   - th.setData({
101   - bconfig: e,
102   - sys_switch: json_d,
103   - is_retail_price: json_d.is_retail_price || 0
104   - });
105   - })
106   -
107   - //获取用户设备信息,屏幕宽度
108   - wx.getSystemInfo({
109   - success: res => {
110   - th.setData({
111   - screenWidth: res.screenWidth
112   - })
113   - }
114   - });
115   -
116   - },
117   - init() {
118   - let options = this.data?.params; // this.data == null ? undefined:this.data.params
119   - var th = this;
120   - this.setData({
121   - getUserID: d.user_id,
122   - getStorageID: a.stoid,
123   - })
124   -
125   - if(!options.lbId && options.scene){
126   - var gid_str = decodeURIComponent(options.scene);
127   - gid_str = gid_str.split("_");
128   -
129   - options.lbId=gid_str[0];
130   - options.first_leader=gid_str[1];
131   - options.isBuy=1;
132   - }
133   -
134   -
135   - this.setData({
136   - isBuy: options.isBuy,
137   - getGiftID: options.lbId,
138   - orderSn: options.orderSn,
139   - flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1
140   - })
141   - if (options.lbId) th.data.lbId = options.lbId;
142   - //-- 获取分享人的ID --
143   - var first_leader = options.first_leader || getApp().globalData.first_leader;
144   - if (first_leader) {
145   - this.setData({
146   - first_leader,
147   - })
148   - //-- user_id代过来免登录 --
149   - getApp().globalData.first_leader = first_leader;
150   - //调用接口判断是不是会员
151   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
152   - if (res.data.code == 0) {
153   - getApp().globalData.guide_id = res.data.data.id;
154   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
155   - }
156   - })
157   - }
158   - th.close();
159   -
160   -
161   - if (this.data.flag == 1) {
162   - this.getZxlbDetails();
163   - } else {
164   - if (this.data.isBuy == 0) {
165   - this.GetMyGiftList();
166   - } else if (this.data.isBuy == 1) {
167   - this.GetBuyGiftList();
168   - }
169   -
170   - }
171   -
172   - },
173   -
174   - onShow: function () {
175   - this.setData({submit:0})
176   -
177   - var th=this;
178   - //判断是不是第一次进入
179   - if(this.data.fir_in){
180   - this.data.fir_in=0;
181   - }else{
182   - //富友支付插件的判断
183   - ut.fy_back('',0);
184   - com.set_py_fir();
185   -
186   - if(th.data.ok_order_sn){
187   - //-- 通联的第三方支付的返回优化 --
188   - var money=th.data.payMoney;
189   - var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn;
190   - ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){
191   - if(!th.data.ok_order_sn) return false;
192   - getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
193   - {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
194   -
195   - th.data.ok_order_sn=null;
196   - if(res.data.code==0 && res.data.data){
197   - var item=res.data.data;
198   - if(item.payState==1){
199   - //支付支付,返回首页
200   - ut.m_toast('支付成功');
201   - setTimeout(()=>{
202   - getApp().goto(back_url);
203   - },1000)
204   -
205   - }else{
206   - //支付支付,返回首页
207   - ut.m_toast('支付失败');
208   - }
209   - }
210   - })
211   - },null,null,1);
212   - th.data.ok_order_sn=null;
213   - }
214   -
215   - }
216   -
217   -
218   - getApp().check_can_share(this);
219   - getApp().is_Single_page(this, function () {
220   - //--先判断会员状态--
221   - var user_info = getApp().globalData.userInfo;
222   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
223   - getApp().goto('/packageE/pages/togoin/togoin');
224   - return false;
225   - }
226   - this.init();
227   - })
228   - this.setData({ submit:0})
229   - },
230   - //获取搜索门店输入的值
231   - input_store: function(e) {
232   - this.setData({
233   - keyword: e.detail.value
234   - })
235   - },
236   - //搜索门店
237   - searchfn(){
238   - let choice_sort_store = this.data.choice_sort_store
239   - if (choice_sort_store==0) { //全局搜索
240   - let all_pick_list = this.data.all_pick_list
241   - let def_pickpu_list = this.data.def_pickpu_list
242   - let keyword = this.data.keyword
243   - if (keyword) {
244   - let arr=all_pick_list.filter( item =>{
245   - let i = item.pickup_name.indexOf(keyword)
246   - if (i > -1) {
247   - return true
248   - }else{
249   - return false
250   - }
251   - })
252   - if (arr && arr.length>0) {
253   - if(this.data.is_show_sto_cat==1){
254   - this.setData({
255   - def_pickpu_list:arr
256   - })
257   - }else{
258   - this.setData({
259   - only_pk:arr
260   - })
261   - }
262   - }else{
263   - wx.showToast({
264   - title: '没有搜索到门店',
265   - icon: 'none',
266   - duration: 2000
267   - })
268   - }
269   - }else{
270   - if (this.data.is_show_sto_cat==1) {
271   - this.setData({
272   - def_pickpu_list:all_pick_list.slice(0,10)
273   - })
274   - }else{
275   - this.setData({
276   - only_pk:all_pick_list
277   - })
278   - }
279   -
280   - }
281   - }else{ //分类下搜索
282   - let sec_i=this.data.sec_i
283   - let all_sto = this.data.all_sto
284   - let old_all_sto = this.data.old_all_sto
285   - if (!old_all_sto) {
286   - this.setData({
287   - old_all_sto:JSON.parse(JSON.stringify(all_sto))
288   - })
289   - }
290   - let sec_sto= this.data.sec_sto
291   - let sec_arr = this.data.old_all_sto[sec_i].s_arr
292   - let keyword = this.data.keyword
293   - let text='sec_sto.s_arr'
294   - if (keyword) {
295   - let arr=sec_arr.filter( item =>{
296   - let i = item.pickup_name.indexOf(keyword)
297   - if (i > -1) {
298   - return true
299   - }else{
300   - return false
301   - }
302   - })
303   - if (arr && arr.length>0) {
304   - this.setData({
305   - [text]:arr
306   - })
307   - }else{
308   - wx.showToast({
309   - title: '没有搜索到门店',
310   - icon: 'none',
311   - duration: 2000
312   - })
313   - }
314   - }else{
315   - if(this.data.old_all_sto){
316   - this.setData({
317   - [text]: this.data.old_all_sto[sec_i].s_arr
318   - })
319   - }else{
320   - this.setData({
321   - [text]: all_sto[sec_i].s_arr
322   - })
323   - }
324   -
325   - }
326   -
327   -
328   - }
329   - },
330   - GetBuyPrice: function (e) {
331   - var that = this.data;
332   - var th = this;
333   - //如果还没有开始的话
334   - if (th.data.isStart != 1) {
335   - getApp().my_warnning("活动还没有开始", 0, th);
336   - return false;
337   - }
338   -
339   -
340   - this.data.payMoney = th.data.sele_g.payMoney;
341   - th.setData({buyType: 2})
342   - if (th.data.sele_g.is_pickup) {
343   - th.setData({
344   - openSpecModal: 1
345   - })
346   - } else {
347   -
348   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
349   - my_confirm.open(
350   - "是否确定购买该礼包",
351   - "取消",
352   - "确定",
353   - function () {
354   - my_confirm.open_cancel(0);
355   - },
356   - function () {
357   -
358   - my_confirm.open_cancel(0);
359   - com.buy_libao(th)
360   - }
361   - )
362   - }
363   -
364   -
365   - },
366   - GetBuyIntegral: function (e) {
367   - var that = this.data;
368   - var th = this;
369   -
370   - //如果还没有开始的话
371   - if (th.data.isStart != 1) {
372   - getApp().my_warnning("活动还没有开始", 0, th);
373   - return false;
374   - }
375   -
376   - th.setData({buyType: 1});
377   - if (th.data.sele_g.is_pickup) {
378   - th.setData({
379   - openSpecModal: 1
380   - })
381   - } else {
382   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
383   - my_confirm.open(
384   - "是否确定兑换该礼包",
385   - "取消",
386   - "确定",
387   - function () {
388   - my_confirm.open_cancel(0);
389   - },
390   - function () {
391   - my_confirm.open_cancel(0);
392   - com.buy_libao(th)
393   - })
394   - }
395   -
396   -
397   - },
398   -
399   - GetMyGiftList: function () {
400   - var _this = this;
401   - var th = this;
402   - getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', {
403   - isShowLoading: true,
404   - data: {
405   - "storeId": a.stoid, //商家ID
406   - "userId": d.user_id, //用户ID
407   - "orderSn": th.data.orderSn
408   - },
409   - success: function (res) {
410   - if (res.data.code == 0) {
411   - console.log('商品------++')
412   - console.log(res)
413   - th.setData({
414   - giftImage: th.data.iurl + res.data.data.lbUrl,
415   - giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
416   - giftTitle: res.data.data.giftTitle,
417   - default_color: res.data.data.bgcolor
418   - })
419   -
420   - if (res.data.data.iswarelbtype == 1) {
421   - th.setData({iswarelbtype: 1})
422   - }
423   -
424   - if (!res.data.data.giftRemark || res.data.data.giftRemark == '') {
425   - th.setData({
426   - giftRemark: '暂无详情......'
427   - })
428   - } else {
429   - th.setData({
430   - giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
431   - })
432   - }
433   -
434   - //---获取日期的时间戳---
435   - var t_endtime = res.data.data.endTime;
436   - t_endtime = t_endtime.replace(/-/g, '/');
437   - var t_date = new Date(t_endtime) / 1000;
438   - var t_now = ut.gettimestamp();
439   -
440   - var t_starttime = res.data.data.starTime;
441   - t_starttime = t_starttime.replace(/-/g, '/');
442   - var t_sdate = new Date(t_starttime) / 1000;
443   -
444   - if (res.data.data.goodsUseState) th.setData({
445   - c_state: 1
446   - })
447   - else if (t_date <= t_now)
448   - th.setData({
449   - c_state: 2
450   - })
451   - else if (t_sdate > t_now)
452   - th.setData({
453   - c_state: -1
454   - })
455   - th.setData({
456   - giftDate: res.data.data.endTime,
457   - giftPosPrice: res.data.data.giftPosPrice,
458   - giftQty: res.data.data.giftQty,
459   - giftIntegral: res.data.data.payIntegral,
460   - giftPrice: res.data.data.payMoney,
461   - giftType: res.data.data.actType,
462   - actTitle: res.data.data.actTitle,
463   - wareCard: res.data.data.wareCard,
464   - lbId: res.data.data.lbId
465   - })
466   - //判断是否有礼包
467   - for (var i = 0; i < res.data.data.wareCard.length; i++) {
468   - if (res.data.data.wareCard[i].lbType == 1) {
469   - th.setData({
470   - is_lb: 1
471   - })
472   - break;
473   - }
474   - }
475   -
476   - if (res.data.data.pickup_id) {
477   - getApp().request.get("/api/weshop/pickup/get/" + os.stoid + "/" + res.data.data.pickup_id, {
478   - success: function (res) {
479   - if (res.data.code == 0) {
480   - th.setData({pick_up: res.data.data});
481   - }
482   - }
483   - });
484   -
485   - }
486   -
487   -
488   - } else {
489   - getApp().my_warnning(res.data.msg, 0, th);
490   - return false;
491   - }
492   - }
493   - });
494   -
495   - },
496   -
497   - check_guide(func){
498   - var first_leader=this.data.first_leader;
499   - if(!first_leader){
500   - func();
501   - return false;
502   - }
503   - if(this.data.is_geted_guide_pick){
504   - func();
505   - return false;
506   - }
507   - if(getApp().globalData.guide_pick_id){
508   - func();
509   - return false;
510   - }
511   - var th=this;
512   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
513   - if (res.data.code == 0) {
514   - getApp().globalData.guide_pick_id= res.data.data.pickup_id;
515   - }
516   - th.data.is_geted_guide_pick=1;
517   - func();
518   - })
519   - },
520   -
521   - GetBuyGiftList: function () {
522   - var _this2 = this;
523   - var th = this.data;
524   - getApp().request.get('/api/weshop/marketing/giftbag/detail/get', {
525   - isShowLoading: true,
526   - data: {
527   - "storeId": a.stoid, //商家ID
528   - "userId": d.user_id, //用户ID
529   - "giftBagId": th.getGiftID,
530   - isnNewUserLb:1
531   - },
532   - success: function success(res) {
533   - if (res.data.code == 0) {
534   - _this2.setData({
535   - giftImage: th.iurl + res.data.data.lbUrl,
536   - giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl),
537   - giftTitle: res.data.data.giftTitle,
538   - default_color: res.data.data.bgcolor
539   - })
540   - if (res.data.data.giftRemark == '') {
541   - _this2.setData({
542   - giftRemark: '暂无详情......'
543   - })
544   - } else {
545   - _this2.setData({
546   - giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
547   - })
548   - }
549   -
550   - //-- 如果只限定链接的时候,要取消分享按钮 --
551   - if(res.data.data.is_share){
552   - wx.hideShareMenu();
553   - wx.offCopyUrl()
554   - //替换掉复制链接
555   - wx.onCopyUrl(() => {
556   - setTimeout(()=>{
557   - wx.setClipboardData({
558   - data: '暂不支持分享',
559   - success (res) { }
560   - })
561   - },500)
562   - return { query: 'a=1&b=2' }
563   - })
564   - }
565   -
566   -
567   - var isStart = 0;
568   - var now = ut.gettimestamp();
569   -
570   - var str = res.data.data.starTime.replace(/-/g, '/');
571   - var start = Date.parse(new Date(str));
572   - start = start / 1000;
573   - if (start < now) isStart = 1;
574   -
575   - _this2.setData({
576   - giftDate: res.data.data.endTime,
577   - giftStart: res.data.data.starTime,
578   - giftPosPrice: res.data.data.giftPosPrice,
579   - giftQty: res.data.data.giftQty,
580   - giftIntegral: res.data.data.payIntegral,
581   - giftPrice: res.data.data.payMoney,
582   - giftType: res.data.data.actType,
583   - actTitle: res.data.data.actTitle,
584   - wareCard: res.data.data.wareCard,
585   - isStart: isStart,
586   - sele_g: res.data.data,
587   - is_share:res.data.data.is_share
588   - })
589   -
590   -
591   - var sele_g = res.data.data;
592   - //需不需要门店,不需要门店返回
593   - if (!sele_g.is_pickup) return false;
594   -
595   - //-- 检测一下有没有门店 --
596   - _this2.check_guide(function (){
597   - com.wait_for_store_config(_this2);
598   - com.set_user_mo_store(_this2, os, function () {
599   - if (sele_g.pickup_list && _this2.data.def_pick_store) {
600   - com.check_def_pk(_this2);
601   - }
602   - });
603   - com.get_sto(_this2, os);
604   - })
605   -
606   - } else {
607   - getApp().my_warnning(res.data.msg, 0, _this2);
608   -
609   - setTimeout(()=>{
610   - getApp().goto('/pages/index/index/index')
611   - },2000)
612   -
613   - return false;
614   - }
615   - }
616   - });
617   -
618   - },
619   -
620   - getZxlbDetails: function () {
621   -
622   - var th = this;
623   - getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', {
624   - isShowLoading: true,
625   - data: {
626   - "storeId": a.stoid, //商家ID
627   - //"userId": d.user_id, //用户ID
628   - "giftBagId": th.data.lbId
629   - },
630   - success: function (res) {
631   - if (res.data.code == 0) {
632   - th.setData({
633   - giftImage: th.data.iurl + res.data.data.lbUrl,
634   - giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
635   - giftTitle: res.data.data.lbTitle,
636   - default_color: res.data.data.bgcolor
637   - })
638   - if (res.data.data.lbIntro == '') {
639   - th.setData({
640   - giftRemark: '暂无详情......'
641   - })
642   - } else {
643   - th.setData({
644   - giftRemark: res.data.data.lbIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
645   - })
646   - }
647   -
648   - //---获取日期的时间戳---
649   - let exchangeType = res.data.data.exchangeType;
650   - let exchangeDay = res.data.data.exchangeDay;
651   - let exchangeStartTime = res.data.data.exchangeStartTime;
652   - let exchangeEndTime = res.data.data.exchangeEndTime;
653   - // let t_endtime;
654   -
655   - if (exchangeType == 2) {
656   - if (exchangeStartTime == 0 || !exchangeStartTime) {
657   - exchangeStartTime = ut.gettimestamp();
658   - }
659   - exchangeStartTime = ut.formatTime(exchangeStartTime, 0);
660   - exchangeEndTime = ut.formatTime(exchangeEndTime, 0);
661   - }
662   -
663   -
664   - th.setData({
665   - // giftDate: t_endtime,
666   - giftPosPrice: res.data.data.oldPrice,
667   - giftQty: res.data.data.lbNum,
668   - giftIntegral: res.data.data.exchangeIntegral,
669   - giftPrice: res.data.data.lbPrice,
670   - giftType: res.data.data.actType,
671   - actTitle: res.data.data.actTitle,
672   - wareCard: res.data.data.wareCard,
673   - lbId: res.data.data.lbId,
674   - exchangeType: exchangeType,
675   - exchangeDay: exchangeDay,
676   - exchangeStartTime: exchangeStartTime,
677   - exchangeEndTime: exchangeEndTime,
678   - })
679   - //判断是否有礼包
680   - for (var i = 0; i < res.data.data.wareCard.length; i++) {
681   - if (res.data.data.wareCard[i].lbType == 1) {
682   - th.setData({
683   - is_lb: 1
684   - })
685   - break;
686   - }
687   - }
688   - } else {
689   - getApp().my_warnning(res.data.msg, 0, th);
690   - return false;
691   - }
692   - }
693   - });
694   -
695   - },
696   - onUnload:function(){
697   - wx.offCopyUrl()
698   - },
699   - onHide: function() {
700   - wx.offCopyUrl()
701   - },
702   -
703   - //显示核销码
704   - code_show: function (e) {
705   - var th = this;
706   - //--获取成功的时候--
707   - var no = th.data.code;
708   - var qc_com = th.selectComponent("#qc_com"); //组件的id
709   - var obj = {
710   - val: no,
711   - content: "请将二维码展示给核销员,收货更快捷"
712   - };
713   - qc_com.open(obj)
714   - },
715   - //获取核销码
716   - getcode: function (e) {
717   - var th = this;
718   - var orderSn = th.data.orderSn; //订单号
719   - let codeId = e.currentTarget.dataset.codeid;
720   - var json = {
721   - "storeId": a.stoid,
722   - "orderSn": orderSn,
723   - }
724   - if (codeId && codeId !== "") {
725   - json.id = codeId
726   - }
727   - var data = JSON.stringify(json);
728   - var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址
729   - getApp().request.json_post(url, json,
730   - function (res) {
731   - if (res.data.code == 0) {
732   - th.setData({
733   - code: res.data.data
734   - })
735   - th.code_show();
736   - } else {
737   - getApp().my_warnning(res.data.msg, 0, th);
738   - }
739   - },
740   - function (res) {
741   -
742   - },
743   - "put"
744   - )
745   -
746   - },
747   - //界面跳转
748   - goto: function (e) {
749   - var th = this;
750   - var url = e.currentTarget.dataset.url;
751   - getApp().goto(url);
752   - },
753   - //图片失败,默认图片
754   - bind_bnerr2: function (e) {
755   - var _errImg = e.target.dataset.errorimg;
756   - var _errObj = {};
757   - _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png";
758   - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
759   - },
760   -
761   - //图片失败,默认图片
762   - bind_bnerr: function (e) {
763   - var _errImg = e.target.dataset.errorimg;
764   - var _errObj = {};
765   - _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg";
766   - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
767   - //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
768   -
769   - },
770   -
771   - //关闭导航
772   - close: function () {
773   - var th = this;
774   - var nav_b = th.selectComponent("#nav_b"); //组件的id
775   - nav_b.close_box();
776   - nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy");
777   - },
778   -
779   - //--- 分享设置 --
780   - onShareAppMessage: function (e) {
781   - getApp().globalData.no_clear = 1;
782   - var curPage = this;
783   - var pagePath = curPage.route; //当前页面url
784   - if (pagePath.indexOf('/') != 0) {
785   - pagePath = '/' + pagePath;
786   - }
787   - pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader=" + this.data.getUserID;
788   - // if (this.data.isBuy == 0) {
789   - // pagePath += "&orderSn=" + this.data.orderSn;
790   - // } else {
791   - // pagePath += "&lbId=" + this.data.getGiftID;
792   - // }
793   - // console.log('pagePath', pagePath);
794   - return {
795   - title: "礼包详情",
796   - path: pagePath,
797   - }
798   - },
799   -
800   - /**
801   - * 用户分享朋友圈
802   - */
803   - onShareTimeline() {
804   - getApp().globalData.no_clear = 1;
805   -
806   - var pagePath = "&isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader=" + this.data.getUserID;
807   - var user_id = getApp().globalData.user_id;
808   - if (!user_id) user_id = 0;
809   -
810   - return {
811   - title: "礼包详情",
812   - query: 'first_leader=' + user_id + pagePath
813   - }
814   - },
815   -
816   - //免费领取
817   - GetFree: function (e) {
818   - var that = this.data;
819   - var th = this;
820   -
821   - //如果还没有开始的话
822   - if (th.data.isStart != 1) {
823   - getApp().my_warnning("活动还没有开始", 0, th);
824   - return false;
825   - }
826   -
827   - th.setData({buyType: 3});
828   - if (th.data.sele_g.is_pickup) {
829   - th.setData({
830   - openSpecModal: 1
831   - })
832   - } else {
833   -
834   -
835   - // var id = e.currentTarget.dataset.id;//活动id
836   - var my_confirm = th.selectComponent("#my_confirm"); //组件的id
837   - my_confirm.open(
838   - "是否确定领取该礼包",
839   - "取消",
840   - "确定",
841   - function () {
842   - my_confirm.open_cancel(0);
843   - },
844   - function () {
845   - my_confirm.open_cancel(0);
846   - com.buy_libao(th)
847   - })
848   - }
849   -
850   -
851   - },
852   -
853   - //--- 设置一下默认库存的数量 ----
854   - set_def_storage(ee) {
855   - var that = this, th = this;
856   - that.data.fir_def_store = ee;
857   -
858   - that.setData({
859   - def_pick_store: ee,
860   - sto_sele_name: ee.pickup_name,
861   - sto_sele_id: ee.pickup_id,
862   - sto_sele_distr: ee.distr_type
863   - })
864   - },
865   - // 选择门店
866   - choice_store: function (ee) {
867   - this.setData({
868   - keyword:''
869   - })
870   - //--先判断会员状态--
871   - var user_info = getApp().globalData.userInfo;
872   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
873   - wx.navigateTo({
874   - url: '/packageE/pages/togoin/togoin',
875   - })
876   - return false;
877   - }
878   -
879   - var th = this;
880   - var ind = ee.currentTarget.dataset.ind;
881   - var bconfig = th.data.bconfig;
882   -
883   - //如果开启了,则不在选择门店
884   - if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
885   - return false;
886   - }
887   - if (!th.data.only_pk && !th.data.def_pickpu_list) {
888   - getApp().confirmBox("门店库存不足", null, 25000, !1);
889   - return false;
890   - }
891   -
892   - if (th.data.only_pk && !th.data.only_pk.length) {
893   - getApp().confirmBox("门店库存不足", null, 25000, !1);
894   - return false;
895   - }
896   - if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
897   - getApp().confirmBox("门店库存不足", null, 25000, !1);
898   - return false;
899   - }
900   -
901   -
902   - if (bconfig && bconfig.is_sort_storage) {
903   - wx.getLocation({
904   - type: 'gcj02',
905   - success: function (res) {
906   -
907   - th.data.lat = res.latitude;
908   - th.data.lon = res.longitude;
909   - th.data.is_get_local_ok = 1;
910   - th.setData({
911   - is_gps: 1
912   - });
913   - //th.onShow();
914   - com.get_sto(th, os);
915   - },
916   - fail: function (res) {
917   - //th.onShow();
918   - th.data.is_get_local_ok = 1;
919   - com.get_sto(th, os);
920   - if (res.errCode == 2) {
921   - th.setData({
922   - is_gps: 0
923   - });
924   - if (th.data.is_gps == 0) {
925   - getApp().confirmBox("请开启GPS定位", null, 25000, !1);
926   - }
927   - } else {
928   - th.setData({
929   - is_gps: "3"
930   - });
931   - }
932   -
933   - }
934   - })
935   - } else {
936   - th.data.is_get_local_ok = 1;
937   - com.get_sto(th, os);
938   - }
939   -
940   - if (ind != undefined && ind != null) {
941   - this.setData({
942   - open_ind_store: ind,
943   - store: 1,
944   - openSpecModal: !1,
945   - openSpecModal_pt: !1,
946   - openSpecModal_flash_normal: !1,
947   - })
948   - } else {
949   - this.setData({
950   - store: 1,
951   - openSpecModal: !1,
952   - openSpecModal_pt: !1,
953   - openSpecModal_flash_normal: !1
954   -
955   - })
956   - }
957   - },
958   - //关闭选择门店
959   - close_popup: function (e) {
960   - var th = this;
961   - this.setData({
962   - store: 0,
963   - choice_sort_store: 0,
964   - sort_store: 0,
965   - fir_pick_index: 0,
966   - sec_pick_index: 0
967   - })
968   -
969   - var openindstore = this.data.open_ind_store;
970   - if (openindstore == 1) {
971   - th.setData({
972   - openSpecModal: !0,
973   - openSpecModal_ind: openindstore,
974   - });
975   - } else if (openindstore == 2) {
976   - th.setData({
977   - openSpecModal: !0,
978   - openSpecModal_ind: openindstore,
979   - });
980   - } else if (openindstore == 4) { //4就是拼团
981   - th.setData({
982   - openSpecModal_pt: 1, //打开拼团购买界面
983   - store: 0, //关闭门店
984   - choice_sort_store: 0, //关闭门店2级
985   - sort_store: 0, //关闭门店2级
986   - });
987   - } else {
988   - th.setData({
989   - store: 0,
990   - choice_sort_store: 0,
991   - sort_store: 0
992   - })
993   - }
994   -
995   -
996   - },
997   -
998   - //选择更多门店
999   - more_store: function () {
1000   - this.setData({
1001   - sort_store: 1
1002   - });
1003   - },
1004   - // 返回按钮
1005   - returns: function () {
1006   - this.setData({
1007   - sort_store: 0,
1008   - choice_sort_store: 0
1009   - });
1010   - },
1011   - //---选择分类门店---
1012   - choice_sort_store: function (e) {
1013   - var index = e.currentTarget.dataset.index;
1014   - var region_name = e.currentTarget.dataset.region;
1015   - var item = this.data.all_sto[index];
1016   - this.setData({
1017   - region_name: region_name,
1018   - sort_store: 0,
1019   - choice_sort_store: 1,
1020   - sec_i:index,
1021   - sec_sto: item,
1022   - sec_pick_index: 0
1023   - });
1024   - },
1025   -
1026   - choose_for_store_fir: function (e) {
1027   - var index_c = e.currentTarget.dataset.ind;
1028   - var th = this;
1029   - th.setData({
1030   - fir_pick_index: index_c
1031   - })
1032   -
1033   - },
1034   -
1035   - //确定def_pick为选择的门店
1036   - sure_pick: function (e) {
1037   - var th = this;
1038   - var item = null;
1039   - var openindstore = th.data.open_ind_store;
1040   -
1041   - if (th.data.choice_sort_store == 0) {
1042   - var index = th.data.fir_pick_index;
1043   - if (th.data.is_show_sto_cat == 1) {
1044   - item = th.data.def_pickpu_list[index];
1045   - } else {
1046   - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
1047   - }
1048   -
1049   - } else {
1050   - var index = th.data.sec_pick_index;
1051   - item = th.data.sec_sto.s_arr[index];
1052   - }
1053   -
1054   - if(!item) return false;
1055   -
1056   - if (!th.data.sele_g) return false;
1057   -
1058   - th.setData({
1059   - def_pick_store: item,
1060   - sto_sele_name: item.pickup_name,
1061   - sto_sele_id: item.pickup_id,
1062   - sto_sele_distr: item.distr_type,
1063   - store: 0,
1064   - choice_sort_store: 0,
1065   - fir_pick_index: 0,
1066   - openSpecModal: !0,
1067   - });
1068   -
1069   -
1070   - },
1071   - //---点击二级之后的选择---
1072   - choose_for_store: function (e) {
1073   - var index_c = e.currentTarget.dataset.ind;
1074   - var th = this;
1075   - th.setData({
1076   - sec_pick_index: index_c,
1077   - fir_pick_index: index_c
1078   - })
1079   -
1080   - },
1081   - //把选择的门店设置成默认的门店def_pick
1082   - set_def_pick: function (e) {
1083   - var th = this;
1084   - var item = null;
1085   - if (th.data.choice_sort_store == 0) {
1086   - var index = th.data.fir_pick_index;
1087   - if (th.data.is_show_sto_cat == 1) {
1088   - item = th.data.def_pickpu_list[index];
1089   - } else {
1090   - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
1091   - }
1092   - } else {
1093   - var index = th.data.sec_pick_index;
1094   - item = th.data.sec_sto.s_arr[index];
1095   - }
1096   -
1097   - if(!item) return false;
1098   -
1099   - th.setData({
1100   - def_pick_store: item,
1101   - sto_sele_name: item.pickup_name,
1102   - sto_sele_id: item.pickup_id,
1103   - sto_sele_distr: item.distr_type,
1104   - store: 0,
1105   - choice_sort_store: 0,
1106   - openSpecModal: !0,
1107   - });
1108   -
1109   - var user_id = getApp().globalData.user_id;
1110   - var def_pickup_id = item.pickup_id;
1111   - getApp().request.put('/api/weshop/users/update', {
1112   - data: {
1113   - user_id: user_id,
1114   - def_pickup_id: def_pickup_id
1115   - },
1116   - success: function (res) {
1117   - if (res.data.code == 0) {
1118   - if (th.data.choice_sort_store == 0) th.setData({
1119   - fir_pick_index: 0
1120   - });
1121   - getApp().globalData.pk_store = item;
1122   - } else {
1123   - getApp().my_warnning("设置默认门店地址失败", 0, th)
1124   - }
1125   -
1126   - }
1127   - });
1128   -
1129   -
1130   - },
1131   - closeSpecModal: function () {
1132   - this.setData({openSpecModal: 0});
1133   - },
1134   -
1135   - buy_libao: function () {
1136   - com.buy_libao(this)
1137   - },
1138   -
1139   -
1140   - clickShare() {
1141   - // if (!getApp().globalData.user_id) {
1142   - // getApp().goto("/packageE/pages/togoin/togoin");
1143   - // return false;
1144   - // }
1145   - this.setData({
1146   - share_hidden: true,
1147   - });
1148   - },
1149   -
1150   - send() {
1151   - this.setData({
1152   - share_hidden: false,
1153   - });
1154   - },
1155   -
1156   - cancel() {
1157   - this.setData({
1158   - share_hidden: false,
1159   - });
1160   - },
1161   -
1162   -
1163   - //--定义的保存图片方法,分享团---
1164   - saveImageToPhotosAlbum: function () {
1165   - //--先判断会员状态--
1166   - // var user_info = getApp().globalData.userInfo;
1167   - // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
1168   - // //getApp().my_warnning("请先登录",0,this);
1169   - // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
1170   - // return false;
1171   - // }
1172   -
1173   - if (this.data.share_hidden) {
1174   - this.setData({share_hidden: false,});
1175   - }
1176   -
1177   - wx.showLoading({title: '生成中...',})
1178   - var that = this, th = that;
1179   - //设置画板显示,才能开始绘图
1180   - that.setData({
1181   - canvasHidden: false
1182   - })
1183   -
1184   - var app = getApp();
1185   - var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
1186   - var scene = th.data.lbId + "";
1187   -
1188   - var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
1189   - if (user_id > 0) {
1190   - scene += "_" + user_id;
1191   - }
1192   - ///二微码
1193   - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
1194   - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist";
1195   -
1196   - // 读取文件成功则OK--
1197   - wx.getImageInfo({
1198   - src: path3,
1199   - success: function (res) {
1200   - th.get_goods_temp(function () {
1201   - var vpath = res.path;
1202   - var context = wx.createCanvasContext('share');
1203   - // let share_goods_img = th.params.cover_img
1204   - th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0);
1205   -
1206   - //把画板内容绘制成图片,并回调 画板图片路径
1207   - context.draw(false, function () {
1208   - setTimeout(function () {
1209   - wx.canvasToTempFilePath({
1210   - x: 0,
1211   - y: 0,
1212   - width: 750,
1213   - height: 1217,
1214   - destWidth: 1.2 * 750 * 750 / that.data.screenWidth,
1215   - destHeight: 1.2 * 1217 * 750 / that.data.screenWidth,
1216   - canvasId: 'share',
1217   - success: function (res) {
1218   -
1219   - that.setData({
1220   - shareImgPath: res.tempFilePath,
1221   - canvasHidden: true
1222   - })
1223   -
1224   - if (!res.tempFilePath) {
1225   - wx.showModal({
1226   - title: '提示',
1227   - content: '图片绘制中,请稍后重试',
1228   - showCancel: false
1229   - })
1230   - return false;
1231   - }
1232   -
1233   - that.setData({
1234   - showPoster: true,
1235   - });
1236   - wx.hideLoading();
1237   - }
1238   - })
1239   - }, 800)
1240   -
1241   - });
1242   - })
1243   - },
1244   - fail: function (res) {
1245   - console.log(res);
1246   - wx.hideLoading();
1247   -
1248   - }
1249   - });
1250   - },
1251   -
1252   - //-- 小程序绘制海报 --
1253   - drawPoster(context, unit, img, vpath, type) {
1254   - // 1.灰色背景
1255   - context.setFillStyle('#f2f1f6');
1256   - context.rect(0, 0, 554 * unit, 899 * unit);
1257   - context.fill();
1258   -
1259   - // 2.商城名称
1260   - let shopName = this.data.sto_sele_name_1;
1261   - context.setTextAlign('center');
1262   - context.setFontSize(26 * unit);
1263   - context.setFillStyle('black');
1264   - context.fillText(shopName, 277 * unit, 60 * unit);
1265   -
1266   - // 3.推荐来源
1267   - let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
1268   - context.setTextAlign('center');
1269   - context.setFontSize(22 * unit);
1270   - context.setFillStyle('#96959a');
1271   - context.fillText(fromText, 277 * unit, 105 * unit);
1272   -
1273   - // 4.海报背景
1274   - context.setFillStyle('white');
1275   - context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit);
1276   -
1277   - // 5.商品图片
1278   - // 图片的x坐标
1279   - let bg_x = 37 * unit
1280   - // 图片的y坐标
1281   - let bg_y = 157 * unit
1282   - // 图片宽度
1283   - let bg_w = 480 * unit
1284   - // 图片高度
1285   - let bg_h = 474 * unit
1286   - // 图片圆角
1287   - let bg_r = 4
1288   - // 绘制海报背景图片圆角
1289   - context.save()
1290   - context.beginPath()
1291   - context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5)
1292   - context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2)
1293   - context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5)
1294   - context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI)
1295   - context.clip()
1296   - context.drawImage(img, bg_x, bg_y, bg_w, bg_h);
1297   - context.restore();
1298   -
1299   - // 6.强烈推荐
1300   - let src = '';
1301   - context.beginPath();
1302   - if (type == 0) { // 普通
1303   - src = '../../../images/share/q_tj.png';
1304   - context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit);
1305   - context.setFontSize(16 * unit)
1306   - context.setFillStyle("white")
1307   - context.setTextAlign('left');
1308   - context.fillText('强烈推荐', 64 * unit, 668 * unit);
1309   - }
1310   -
1311   -
1312   - let price = this.data.giftPrice;
1313   - let giftIntegral = this.data.giftIntegral;
1314   - context.setFontSize(32 * unit);
1315   - context.setFillStyle('#DE1117');
1316   -
1317   - var price_txt="";
1318   - if(price || giftIntegral){
1319   - if(price){
1320   - price_txt='¥' + price;
1321   - if(giftIntegral) price_txt+='+';
1322   - }
1323   - if(giftIntegral) price_txt+=giftIntegral+'积分';
1324   - }else{
1325   - price_txt="¥0";
1326   - }
1327   -
1328   - context.fillText(price_txt, 54 * unit, 735 * unit);
1329   -
1330   -
1331   - var wp= 62 * unit;
1332   - var hp=765 * unit
1333   - this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit);
1334   -
1335   - // 8.商品标题
1336   - context.setFontSize(20 * unit);
1337   - context.setFillStyle('#898989');
1338   - getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1);
1339   -
1340   - // 9.小程序码
1341   - context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit);
1342   - context.setFontSize(16 * unit);
1343   - context.setFillStyle('#777');
1344   - context.fillText('长按识别二维码', 378 * unit, 810 * unit);
1345   -
1346   - // 10.竖线
1347   - context.beginPath();
1348   - context.setFillStyle('#eee');
1349   - context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit);
1350   - context.fill();
1351   - },
1352   -
1353   -
1354   - //---市场价划掉---
1355   - draw_pos_price(context,w,h,market_price,unit){
1356   -
1357   - if(!this.is_retail_price) return false;
1358   -
1359   - context.setFillStyle("gray")
1360   - context.setFontSize(22 * unit)
1361   - var pri0 = "¥" + market_price.toFixed(2);
1362   - context.fillText(pri0, w, h);
1363   -
1364   - var c_h=h-6;
1365   - context.setStrokeStyle('gray');
1366   - context.setLineWidth(1 * unit);
1367   - context.moveTo(w - 5, c_h);
1368   - context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h);
1369   - context.stroke();
1370   -
1371   - },
1372   -
1373   - //--获取商品图片的本地缓存,回调写法--
1374   - get_goods_temp: function (tt) {
1375   - var ee = this;
1376   - if (ee.data.share_goods_img) {
1377   - tt();
1378   - return false;
1379   - }
1380   - var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage;
1381   - //获取商品是分享图信息
1382   - wx.getImageInfo({
1383   - src: img_url,
1384   - success: function (res) {
1385   - //res.path是网络图片的本地地址
1386   - ee.data.share_goods_img = res.path;
1387   - tt();
1388   - },
1389   - fail: function (res) {
1390   - //获取默认空白图
1391   - wx.getImageInfo({
1392   - src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
1393   - success: function(res) {
1394   - ee.data.share_goods_img = res.path; //分享的图片不能用网络的
1395   - tt();
1396   - }
1397   - })
1398   - }
1399   - });
1400   - },
1401   -
1402   - closePoster() {
1403   - this.setData({
1404   - showPoster: false,
1405   - });
1406   - },
1407   - // 保存图片到手机
1408   - savePic() {
1409   - getApp().savePic(this);
1410   - },
1411   - // 预览海报
1412   - previewPoster() {
1413   - getApp().globalData.no_clear=1;
1414   - wx.previewImage({
1415   - current: this.data.shareImgPath, // 当前显示图片的http链接
1416   - urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表
1417   - });
1418   - },
1419   -
1420   -
1421   -
1422   -});
1423 2 \ No newline at end of file
  3 + data: {},
  4 + onLoad: async function(options) {
  5 + getApp().globalData.ts_trans_data=options;
  6 + getApp().goto('/packageF/pages/giftpack/giftpacklist/giftpacklist');
  7 + },
  8 + //显示加载
  9 + onShow:function(){ },
  10 +
  11 +})
1424 12 \ No newline at end of file
... ...
pages/giftpack/giftpacklist/giftpacklist.json
1 1 {
2   - "navigationBarTitleText": "礼包详情",
3   - "usingComponents": {
4   - "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm",
6   - "qr_code": "/components/qr_code/qr_code",
7   - "nav_b": "/components/nav_b/nav_b",
8   - "share": "/components/share/share",
9   - "com_top_nav": "/components/com_top_nav/com_top_nav"
10   - },
11   - "navigationStyle": "custom"
  2 + "windom": {
  3 + "navigationBarTitleText": "加载中.",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
  8 + }
  9 +
12 10 }
13 11 \ No newline at end of file
... ...
pages/giftpack/giftpacklist/giftpacklist.wxml
1   -<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
2   -<com_top_nav title="礼包详情"></com_top_nav>
3   -
4   -<view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}}">
5   - <view class="box_top data-v-3a5b7e36">
6   - <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image>
7   - </view>
8   - <view class="box_title data-v-3a5b7e36" >
9   -
10   - <view class="flex ai_c fs28" style="margin-bottom: 20rpx" wx:if="{{isBuy==0 && pick_up}}">
11   - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>{{pick_up.pickup_name}}
12   - </view>
13   -
14   - <view class="top_title data-v-3a5b7e36">
15   - <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text>
16   -
17   - <!-- 这个是分享按钮 -->
18   - <view wx:if="{{c_state<2 && isLogin && !is_share}}" class="xc-share-frame t-c" bindtap="clickShare">
19   - <view class="iconfont icon-share fs40" ></view>
20   - <view class="fs22 c-7b">分享</view>
21   - </view>
22   -
23   -
24   - </view>
25   - <view class="top_time data-v-3a5b7e36" wx:if="{{!flag}}">
26   - <block wx:if="{{isBuy==1 && giftTitle && isStart!=1}}" >
27   - <text class="data-v-3a5b7e36">
28   - {{"活动开始时间:"+giftStart}}
29   - </text>
30   - </block>
31   -
32   - <block wx:else>
33   - <text class="data-v-3a5b7e36" wx:if="{{isBuy==0 && iswarelbtype}}">{{"兑换结束时间:"+giftDate}}</text>
34   - <text class="data-v-3a5b7e36" wx:if="{{flag == 1}}">
35   - {{"活动结束时间:"+giftDate}}
36   - </text>
37   - </block>
38   - </view>
39   - <view class="top_time data-v-3a5b7e36" wx:if="{{flag == 1 && iswarelbtype}}">
40   - <text class="data-v-3a5b7e36" wx:if="{{exchangeType == 1}}">
41   - {{"兑换时间:领取后"+exchangeDay+"天内兑换"}}
42   - </text>
43   - <text class="data-v-3a5b7e36" wx:elif="{{exchangeType == 2}}">
44   - {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}}
45   - </text>
46   - </view>
47   -
48   - <view class="top_price data-v-3a5b7e36">
49   -
50   -
51   - <block wx:if="{{giftPrice>0}}">
52   - <text class="data-v-3a5b7e36">{{"¥"+giftPrice}}</text>
53   - </block>
54   - <block wx:if="{{giftPrice>0 && giftIntegral>0}}">
55   - <text class="data-v-3a5b7e36">/</text>
56   - </block>
57   - <block wx:if="{{giftIntegral>0}}">
58   - <text class="data-v-3a5b7e36">{{giftIntegral+"积分"}}</text>
59   - </block>
60   - <block wx:if="{{giftType>0}}">
61   - <text class="data-v-3a5b7e36">{{actTitle}}</text>
62   - </block>
63   -
64   - </view>
65   - <view class="top_foot data-v-3a5b7e36">
66   - <view class="top_foot_price data-v-3a5b7e36 no_line_x">
67   - <text class="data-v-3a5b7e36"> {{is_retail_price?'零售价:':''}}{{giftPosPrice+"元"}}</text>
68   - </view>
69   - <view class="top_foot_qty data-v-3a5b7e36">
70   - <text class="data-v-3a5b7e36" wx:if="{{!flag}}">{{"已售:"+giftQty+"件"}}</text>
71   - <text class="data-v-3a5b7e36" wx:elif="{{flag == 1 && giftQty > 0}}">{{"数量:"+giftQty+"件"}}</text>
72   - </view>
73   - </view>
74   - </view>
75   - <view class="box_ware data-v-3a5b7e36">
76   - <view class="box_ware_title data-v-3a5b7e36">
77   - <text class="data-v-3a5b7e36">礼包内容</text>
78   - </view>
79   - <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id">
80   - <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36">
81   - <view class="box_ware_img data-v-3a5b7e36">
82   - <block wx:if="{{item.lbType==1}}">
83   - <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
84   - </block>
85   - <block wx:if="{{item.lbType==2}}">
86   - <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
87   - </block>
88   - <block wx:if="{{item.lbType==3}}">
89   - <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
90   - </block>
91   - <block wx:if="{{item.lbType==4}}">
92   - <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
93   - </block>
94   - <block wx:if="{{item.lbType==5}}">
95   - <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
96   - </block>
97   - </view>
98   - <view class="box_ware_item data-v-3a5b7e36">
99   - <view class="box_ware_item_title data-v-3a5b7e36">
100   - <text class="data-v-3a5b7e36">{{item.couponName}}</text>
101   - </view>
102   - <view class="box_ware_item_price data-v-3a5b7e36">
103   - <text class="data-v-3a5b7e36"></text>
104   - </view>
105   - <view class="box_ware_item_qty data-v-3a5b7e36 flex">
106   - <text class="data-v-3a5b7e36 ellipsis-1">
107   - {{"数量:"+item.num}}
108   - </text>
109   - <block wx:if="{{isBuy==0 && !flag && item.lbType==1}}">
110   - <text style="margin-left:10rpx" wx:if="{{item.useState}}">
111   - 已核销
112   - </text>
113   - <text style="margin-left:10rpx" wx:else>
114   - 未核销
115   - </text>
116   - </block>
117   - </view>
118   -
119   - <view class="box_ware_code data-v-3a5b7e36" wx:if="{{!flag}}">
120   - <!-- <block wx:if="{{c_state==0}}"> -->
121   -
122   - <block wx:if="{{isBuy==0&item.lbType==1}}">
123   - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" data-codeId="{{item.Id}}" class="data-v-3a5b7e36"></image>
124   - </block>
125   -
126   - <block wx:if="{{isBuy==0&item.lbType==2}}">
127   - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/packageD/pages/user/coupons/coupons" bindtap="goto"></image>
128   - </block>
129   - <block wx:if="{{isBuy==0&item.lbType==3}}">
130   - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>
131   - </block>
132   - <block wx:if="{{isBuy==0&item.lbType>3}}">
133   - <text class="data-v-3a5b7e36">奖励已发放</text>
134   - </block>
135   - </view>
136   - </view>
137   - </view>
138   - </block>
139   - </view>
140   - <view class="foot_box data-v-3a5b7e36">
141   - <view class="foot_box_title data-v-3a5b7e36">
142   - <text class="data-v-3a5b7e36">活动说明</text>
143   - </view>
144   - <view class="foot_box_remark data-v-3a5b7e36">
145   - <rich-text nodes="{{giftRemark}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
146   - </view>
147   - </view>
148   -
149   -
150   - <view class="foot_empty data-v-3a5b7e36"></view>
151   -
152   - <block wx:if="{{flag != 1}}">
153   - <block wx:if="{{isBuy==1 && giftTitle}}">
154   - <block wx:if="{{isStart==1}}">
155   - <view class="foot_button data-v-3a5b7e36">
156   - <block wx:if="{{giftPrice>0 && giftIntegral>0}}">
157   - <view class="foot_button_left data-v-3a5b7e36 " data-money="{{giftPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice">
158   - <text class="data-v-3a5b7e36 ">立即购买</text>
159   - </view>
160   - <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
161   - <text class="data-v-3a5b7e36">立即兑换</text>
162   - </view>
163   - </block>
164   - <block wx:if="{{giftPrice>0 && giftIntegral<=0}}">
165   - <view class="foot_button_buy data-v-3a5b7e36 " data-money="{{giftPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}">
166   - <text class="data-v-3a5b7e36">立即购买</text>
167   - </view>
168   - </block>
169   - <block wx:if="{{giftPrice<=0 && giftIntegral>0}}">
170   - <view class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
171   - <text class="data-v-3a5b7e36">立即兑换</text>
172   - </view>
173   - </block>
174   -
175   - <block wx:if="{{giftPrice<=0 && giftIntegral<=0}}">
176   - <view class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetFree" data-id="{{lbId}}">
177   - <text class="data-v-3a5b7e36">免费领取</text>
178   - </view>
179   - </block>
180   -
181   -
182   - </view>
183   - </block>
184   - <block wx:else>
185   - <view class="foot_button data-v-3a5b7e36">
186   - <view class="foot_button_intalge data-v-3a5b7e36 gray ">
187   - <text class="data-v-3a5b7e36">活动还未开始</text>
188   - </view>
189   - </view>
190   - </block>
191   -
192   - </block>
193   - <block wx:if="{{isBuy==0}}">
194   - <view class="foot_button data-v-3a5b7e36">
195   - <block wx:if="{{is_lb!=1}}">
196   - <view class="foot_button_buy data-v-3a5b7e36 overdue">
197   - <text class="data-v-3a5b7e36">无核销商品</text>
198   - </view>
199   - </block>
200   - <block wx:else>
201   - <view wx:if="{{c_state==-1}}" class="foot_button_buy data-v-3a5b7e36 overdue" >
202   - <text class="data-v-3a5b7e36">兑换未开始</text>
203   - </view>
204   - <view wx:if="{{c_state==0}}" class="foot_button_buy data-v-3a5b7e36" bindtap="getcode">
205   - <text class="data-v-3a5b7e36">立即使用</text>
206   - </view>
207   - <view wx:if="{{c_state==1}}" class="foot_button_buy data-v-3a5b7e36 overdue" bindtap="getcode">
208   - <text class="data-v-3a5b7e36">商品已核销</text>
209   - </view>
210   - <view wx:if="{{c_state==2}}" class="foot_button_buy data-v-3a5b7e36 overdue">
211   - <text class="data-v-3a5b7e36">商品兑换时间已过</text>
212   - </view>
213   - </block>
214   - </view>
215   - </block>
216   - </block>
217   -
  1 +<!---- //文字"-->
  2 +<view class="rty">
  3 + <view style="margin-top:260rpx">加载中。。</view>
218 4 </view>
219   -<!-- 引入提示组件 -->
220   -<warn id="warn"></warn>
221   -<my_confirm id="my_confirm"></my_confirm>
222   -<!-- 弹出框扫描 -->
223   -<qr_code id="qc_com"></qr_code>
224   -<!-- 制作一个圆球导航 -->
225   -<nav_b id="nav_b"></nav_b>
226   -
227   -<include src="../public/buy_com.wxml"></include>
228   -<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas>
229   -<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
230   -
231   -
232   -<view wx:if="{{showPoster}}">
233   - <view class="mask" catchtap="closePoster"></view>
234   - <view class="poster-container">
235   - <view class="poster-wrapper">
236   - <view class="poster" bindtap="previewPoster">
237   - <!-- <view class="poster" bindtap="previewImage"> -->
238   - <image src="{{shareImgPath}}" class="poster-img"></image>
239   - <view class="btn-close" catchtap="closePoster">
240   - <text class="iconfont icon-close"></text>
241   - </view>
242   - </view>
243   - <view class="btn-container">
244   - <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> -->
245   - <button class="btn-share" bindtap="savePic">保存到相册</button>
246   - </view>
247   - </view>
248   - </view>
249   -</view>
250 5 \ No newline at end of file
... ...
pages/giftpack/giftpacklist/giftpacklist.wxss
1   -@charset "UTF-8";
2   -@import '../../goods/goodsInfo/goodsInfo.wxss';
3   -
4   -.box.data-v-3a5b7e36 {
5   - -webkit-align-content: center;
6   - align-content: center;
7   - background-color: #e85f93;
8   -}
9   -
10   -.box_top.data-v-3a5b7e36 {
11   - width: 100%;
12   -}
13   -
14   -.box_top image.data-v-3a5b7e36 {
15   - width: 100%;
16   - max-height: 540rpx;
17   -}
18   -
19   -.box_title.data-v-3a5b7e36 {
20   - margin: 10rpx 20rpx 20rpx 20rpx;
21   - padding: 35rpx;
22   - background-color: #fff;
23   - border-radius: 40rpx;
24   -}
25   -
26   -.top_title.data-v-3a5b7e36 {
27   - font-size: 30rpx;
28   - margin-bottom: 10rpx;
29   - position: relative;
30   -}
31   -
32   -.top_time.data-v-3a5b7e36 {
33   - font-size: 27rpx;
34   - color: #b9b5b5;
35   -}
36   -
37   -.top_price.data-v-3a5b7e36 {
38   - font-size: 35rpx;
39   - color: #d61b30;
40   - margin-top: 30rpx;
41   - margin-bottom: 5rpx;
42   - position: relative;
43   -}
44   -
45   -.top_foot.data-v-3a5b7e36 {
46   - display: -webkit-box;
47   - display: -webkit-flex;
48   - display: flex;
49   -}
50   -
51   -.top_foot_price.data-v-3a5b7e36 {
52   - font-size: 22rpx;
53   - color: #b9b5b5;
54   - width: 50%;
55   - text-decoration: line-through;
56   -}
57   -
58   -.top_foot_qty.data-v-3a5b7e36 {
59   - font-size: 22rpx;
60   - color: #b9b5b5;
61   - width: 50%;
62   - -webkit-align-content: flex-end;
63   - align-content: flex-end;
64   - text-align: right;
65   -}
66   -
67   -.box_ware.data-v-3a5b7e36 {
68   - margin: 10rpx 20rpx 20rpx 20rpx;
69   - padding: 35rpx;
70   - background-color: #fff;
71   - border-radius: 40rpx;
72   -}
73   -
74   -.box_ware_title.data-v-3a5b7e36 {
75   - font-size: 35rpx;
76   - margin: 5rpx 0rpx 30rpx 0rpx;
77   -}
78   -
79   -.box_ware_box.data-v-3a5b7e36 {
80   - display: -webkit-box;
81   - display: -webkit-flex;
82   - display: flex;
83   - margin: 10rpx 0rpx 25rpx 0rpx;
84   -}
85   -
86   -/* .box_ware_img.data-v-3a5b7e36 {
87   - width: 30%;
88   - height: 180rpx;
89   - border: #999999 solid 1rpx;
90   -} */
91   -
92   -.box_ware_img image.data-v-3a5b7e36 {
93   - /* width: 185rpx;
94   - height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */
95   - border: 2rpx solid #fafaf9;
96   - border-radius: 4rpx;
97   - width: 120rpx;
98   - height: 120rpx;
99   - background-color: #f8f8f8;
100   -}
101   -
102   -.box_ware_item.data-v-3a5b7e36 {
103   - width: 70%;
104   - margin-left: 25rpx;
105   - position: relative;
106   -}
107   -
108   -.box_ware_item_title.data-v-3a5b7e36 {
109   - font-size: 24rpx;
110   - word-break: break-all;
111   - text-overflow: ellipsis;
112   - display: -webkit-box;
113   - -webkit-box-orient: vertical;
114   - -webkit-line-clamp: 2;
115   - overflow: hidden;
116   -}
117   -
118   -.box_ware_count.data-v-3a5b7e36 {
119   - display: -webkit-box;
120   - display: -webkit-flex;
121   - display: flex;
122   -}
123   -
124   -.box_ware_item_price.data-v-3a5b7e36 {
125   - font-size: 25rpx;
126   - color: #b9b5b5;
127   - position: absolute;
128   - bottom: 60rpx;
129   - left: 0;
130   -}
131   -
132   -.box_ware_item_qty.data-v-3a5b7e36 {
133   - font-size: 22rpx;
134   - position: absolute;
135   - bottom: 15rpx;
136   - left: 0;
137   -}
138   -
139   -.box_ware_code.data-v-3a5b7e36 {
140   - position: absolute;
141   - right: 10rpx;
142   - bottom: 10rpx;
143   -}
144   -
145   -.box_ware_code image.data-v-3a5b7e36 {
146   - width: 50rpx;
147   - height: 50rpx;
148   -}
149   -
150   -.box_ware_code text.data-v-3a5b7e36 {
151   - font-size: 20rpx;
152   -}
153   -
154   -.foot_box.data-v-3a5b7e36 {
155   - margin: 10rpx 20rpx 50rpx 20rpx;
156   - padding: 35rpx;
157   - background-color: #fff;
158   - border-radius: 40rpx;
159   -}
160   -
161   -.foot_box_title.data-v-3a5b7e36 {
162   - font-size: 35rpx;
163   - margin-bottom: 30rpx;
164   -}
165   -
166   -.foot_box_remark.data-v-3a5b7e36 {
167   - font-size: 27rpx;
168   - line-height: 40rpx;
169   -}
170   -
171   -.foot_empty.data-v-3a5b7e36 {
172   - height: 90rpx;
173   -}
174   -
175   -.foot_button.data-v-3a5b7e36 {
176   - display: -webkit-box;
177   - display: -webkit-flex;
178   - display: flex;
179   - margin: 20rpx 0rpx 0rpx 0rpx;
180   - padding: 25rpx 0rpx;
181   - background: #fff;
182   - text-align: center;
183   - -webkit-box-pack: center;
184   - -webkit-justify-content: center;
185   - justify-content: center;
186   - position: fixed;
187   - bottom: 0;
188   - left: 0;
189   - width: 100%;
190   -}
191   -
192   -.foot_button_left.data-v-3a5b7e36 {
193   - background: #e4010c;
194   - color: #fff;
195   - width: 250rpx;
196   - height: 70rpx;
197   - font-size: 28rpx;
198   - line-height: 70rpx;
199   - border-radius: 40rpx;
200   - margin-right: 20rpx;
201   -}
202   -
203   -.foot_button_right.data-v-3a5b7e36 {
204   - background: #ffbb42;
205   - color: #fff;
206   - width: 250rpx;
207   - height: 70rpx;
208   - font-size: 28rpx;
209   - line-height: 70rpx;
210   - border-radius: 40rpx;
211   -}
212   -
213   -.foot_button_buy.data-v-3a5b7e36 {
214   - background: #e4010c;
215   - color: #fff;
216   - width: 400rpx;
217   - height: 70rpx;
218   - font-size: 28rpx;
219   - line-height: 70rpx;
220   - border-radius: 40rpx;
221   -}
222   -
223   -.foot_button_intalge.data-v-3a5b7e36 {
224   - background: #ffbb42;
225   - color: #fff;
226   - width: 400rpx;
227   - height: 70rpx;
228   - font-size: 28rpx;
229   - line-height: 70rpx;
230   - border-radius: 40rpx;
231   -}
232   -
233   -page.data-v-3a5b7e36 {
234   - background-color: #e85f93;
235   -}
236   -
237   -.foot_box_remark.data-v-3a5b7e36 ._img {
238   - width: 100%;
239   -}
240   -
241   -.foot_box_remark.data-v-3a5b7e36 .img {
242   - line-height: 0;
243   -}
244   -.overdue.data-v-3a5b7e36{
245   - background-color: rgb(153,153,153);
246   -}
247   -
248   -.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; }
249   -
250   -.xc-share-frame {
251   - position: absolute; right:0; top: -10rpx;
252   -}
253   -.searchbar {
254   - height: 95rpx;
255   - border-bottom: 2rpx solid rgb(238, 238, 238);
256   -}
257   -.storeListpadd {
258   - padding: 0rpx 31rpx;
259   -}
260   -.search {
261   - width: 125rpx;
262   - height: 45rpx;
263   - line-height: 45rpx;
264   - background-color: rgb(219, 27, 52);
265   - border-radius: 30rpx;
266   - color: rgb(255, 255, 255);
267   -}
268   -.inputstore {
269   - width: 510rpx;
270   - height: 43rpx;
271   - line-height: 43rpx;
272   - border-radius: 30rpx;
273   - border: 2rpx solid rgb(238, 238, 238);
274   - padding-left: 30rpx;
275   -}
  1 +.rty{
  2 + display:flex; justify-content: center; align-items: center;
  3 + width:100%;
  4 + height:100%
  5 +}
276 6 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.js
1   -var i = require("../../../utils/util.js")
2   -const ut = require("../../../utils/util.js");
3   -var e = getApp(),
4   - a = e.globalData.setting,
5   - os = a,
6   - t = e.request,
7   - d = e.globalData;
8 1 Page({
9   - data: {
10   - iurl: a.imghost, //图片前缀网址
11   - getDate: "",
12   - getStorageID: '',
13   - getUserID: '',
14   - wareCard: [],
15   - // pages: 0,
16   - // pageSize: 10,
17   - isEmpty: false,
18   - loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
19   - contentText: {
20   - contentdown: '加载更多',
21   - contentrefresh: '加载中...',
22   - contentnomore: '已加载全部'
23   - },
24   - ismore: 0, //数据是否全部加载完成
25   - is_read: 0, //是否查询过我的礼包接口
26   - curpage: 1, //当前分页数
27   - pageSize: 10, //页大小
28   - total: 0, //总数量
29   - ad_data: null,
30   - first_leader: e.globalData.first_leader || 0, // 推荐人ID
31   -
32   - sear_key:'' //顶部搜索关键子
33   - },
34   - onLoad: function (options) {
35   - this.setData({
36   - params: options,
37   - })
38   - },
39   -
40   - init() {
41   - let options = this.data?.params;
42   - var th = this;
43   - this.setData({
44   - getStorageID: a.stoid,
45   - getUserID: d.user_id,
46   - loadingType: 0,
47   - getDate: i.formatTime(new Date().getTime())
48   - });
49   - //-- 获取分享人的ID --
50   - var first_leader = options.first_leader || getApp().globalData.first_leader;
51   - if (first_leader) {
52   - this.setData({
53   - first_leader,
54   - })
55   - //-- user_id代过来免登录 --
56   - getApp().globalData.first_leader = first_leader;
57   - //调用接口判断是不是会员
58   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
59   - if (res.data.code == 0) {
60   - getApp().globalData.guide_id = res.data.data.id;
61   - getApp().globalData.guide_pick_id= res.data.data.pickup_id
62   - }
63   - })
64   - }
65   -
66   - getApp().request.promiseGet("/api/weshop/ad/page?pid=902&store_id=" + os.stoid, {
67   - data: {
68   - enabled: 1
69   - }
70   - }).then(res => {
71   - if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
72   - var a = res.data.data.pageData;
73   - var tt = {
74   - 'ad_code': os.imghost + a[0].ad_code,
75   - 'media_link': '',
76   - 'ad_weapplink': a[0].ad_weapplink,
77   - 'bgcolor': a[0].bgcolor,
78   - };
79   - th.setData({ ad_data: tt });
80   - }
81   - })
82   - this.getList();
  2 + data: {},
  3 + onLoad: async function(options) {
  4 + getApp().globalData.ts_trans_data=options;
  5 + getApp().goto('/packageF/pages/giftpack/mygiftpack/mygiftpack');
83 6 },
84   - onShow: function () {
85   - getApp().check_can_share();
86   - //--先判断会员状态--
87   - getApp().is_Single_page(this, function () {
88   - var user_info = getApp().globalData.userInfo;
89   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
90   - getApp().goto('/packageE/pages/togoin/togoin');
91   - return false;
92   - }
93   - this.init()
94   - })
95   -
96   -
97   - },
98   - getList: function () {
99   -
100   - if(this.data.ismore) return false;
101   - if(this.data.searching) return false;
102   - this.data.searching=1;
103   -
104   - wx.showLoading({
105   - title: '加载中.',
106   - })
107   -
108   - var th = this;
109   - let r_q={
110   - storeId: th.data.getStorageID, //商家ID
111   - userId: th.data.getUserID, //用户ID
112   - page: th.data.curpage,
113   - pageSize: th.data.pageSize
114   - }
115   -
116   - if(this.data.sear_key){
117   - r_q.key_str=this.data.sear_key;
118   - }
119   -
120   - getApp().request.get('/api/weshop/marketing/my/giftbag/page', {
121   - isShowLoading: true,
122   - data: r_q,
123   - success: function (res) {
124   -
125   - th.data.searching=0;
126   -
127   - if (res.data.code == 0) {
128   - th.data.curpage++;
129   - var arr1 = th.data.wareCard;
130   - var arr2 = res.data.data.pageData;
131   -
132   - for (let j = 0; j <arr2.length ; j++) {
133   -
134   - var t_now = ut.gettimestamp();
135   -
136   - //---获取日期的时间戳---
137   - var t_endtime = arr2[j].endTime;
138   - t_endtime = t_endtime.replace(/-/g, '/');
139   - var t_date = new Date(t_endtime) / 1000;
140   -
141   -
142   - var t_starttime = arr2[j].starTime;
143   - t_starttime = t_starttime.replace(/-/g, '/');
144   - var t_sdate = new Date(t_starttime) / 1000;
145   -
146   - if (!arr2[j].iswarelbtype)
147   - arr2[j].c_state=-2 //无核销商品
148   - else if (arr2[j].goodsUseState)
149   - arr2[j].c_state=1 //已核销
150   - else if (t_date <= t_now)
151   - arr2[j].c_state=2 //已过期
152   - else if (t_sdate > t_now)
153   - arr2[j].c_state=-1 //未开始
154   - else
155   - arr2[j].c_state=0 //正常
156   - }
157   -
158   -
159   - var arr3 = [...arr1, ...arr2];
160   - var ismore = 0;
161   - if (arr3.length == res.data.data.total) ismore = 1
162   - th.setData({
163   - wareCard: arr3,
164   - total: res.data.data.total,
165   - ismore: ismore,
166   - is_read: 1,
167   - is_get:1,
168   - }), wx.stopPullDownRefresh(); //停止下拉刷新
169   - } else {
170   - th.setData({
171   - is_read: 1,
172   - ismore: 1,
173   - is_get:1,
174   - })
175   - }
176   -
177   - wx.hideLoading();
178   -
179   - }
180   -
181   - });
182   -
183   - },
184   - //销毁界面跳转
185   - redirectTo: function (e) {
186   - var th = this;
187   - var url = e.currentTarget.dataset.url;
188   - //销毁跳转
189   - wx.redirectTo({
190   - url: url
191   - });
192   - },
193   - //不销毁界面跳转
194   - navigateTo: function (e) {
195   - var th = this;
196   - var url = e.currentTarget.dataset.url;
197   - let is_back = e.currentTarget.dataset.is_back
198   - if (is_back==1) {
199   - wx.showToast({
200   - title: '该礼包已退款',
201   - icon: 'none',
202   - duration: 2000
203   - })
204   - }else {
205   - getApp().goto(url);
206   - }
207   - },
208   - //下拉事件
209   - onReachBottom: function () {
210   - var th = this;
211   - if (th.data.total <= th.data.pageSize) return;
212   - if (th.data.ismore) return;
213   - th.getList();
214   - },
215   -
216   - //图片失败,默认图片
217   - bind_bnerr2: function (e) {
218   - var _errImg = e.target.dataset.errorimg;
219   - var _errObj = {};
220   - _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
221   - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
222   - },
223   -
224   -
225   - //--- 分享设置 --
226   - onShareAppMessage: function (e) {
227   - getApp().globalData.no_clear=1;
228   - var curPage = this;
229   - var pagePath = curPage.route; //当前页面url
230   - if (pagePath.indexOf('/') != 0) {
231   - pagePath = '/' + pagePath;
232   - }
233   - pagePath += "?first_leader=" + this.data.getUserID;
234   - return {
235   - title: "专享礼包",
236   - path: pagePath,
237   - }
238   - },
239   -
240   - onShareTimeline() {
241   - getApp().globalData.no_clear=1;
242   - return {
243   - title: '专享礼包',
244   - imageUrl: this.data.ad_data.ad_code,
245   - query: "first_leader=" + this.data.getUserID
246   - }
247   - },
248   -
249   - search_lb(){
250   - this.data.curpage=0;
251   - this.searching=0;
252   - this.setData({ismore:0,is_get:0,wareCard:[]});
253   - this.getList();
254   - },
255   -
256   - input_sear(e){
257   - let value = e.detail;
258   - this.data.sear_key=value;
259   - }
  7 + //显示加载
  8 + onShow:function(){ },
260 9  
261   -});
262 10 \ No newline at end of file
  11 +})
263 12 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.json
1 1 {
2   - "navigationBarTitleText": "我的礼包",
3   - "enablePullDownRefresh": false,
4   - "usingComponents": {
5   - "warn": "/components/long_warn/long_warn",
6   - "my_confirm": "/components/my_confirm/my_confirm",
7   - "lb_sear": "/components/lb_sear/lb_sear"
8   - }
  2 + "windom": {
  3 + "navigationBarTitleText": "加载中.",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
  8 + }
  9 +
9 10 }
10 11 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.wxml
1   -<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;padding-bottom: 10rpx;">
2   - <block wx:if="{{ad_data}}">
3   - <view class="top_img rel">
4   - <image mode="widthFix" src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
5   - <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
6   - </view>
7   - </block>
8   - <block wx:else>
9   - <view class="top_img rel">
10   - <image mode="widthFix" src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=202403'}}" lazy-load="true"></image>
11   - <lb_sear bindinput_sear="input_sear" bindsearch_lb="search_lb"></lb_sear>
12   - </view>
13   - </block>
14   -
15   -
16   - <view class="top_title">
17   - <view class="top_title_box">
18   - <text class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">礼包列表</text>
19   - </view>
20   - <view class="top_title_box_S"></view>
21   - <view class="top_title_box">
22   - <text class="top_title_redtext">我的礼包</text>
23   - </view>
24   - </view>
25   - <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index">
26   - <view class="content_box">
27   - <view class="content_box_ware" bindtap="navigateTo" data-is_back="{{item.is_back}}" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}">
28   - <view class="content_box_img">
29   - <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> -->
30   - <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image>
31   - <image wx:else src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
32   -
33   - <block wx:if="{{item.actType!=0}}">
34   - <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}">
35   - <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image>
36   - <!-- <block wx:if="{{item.$orig.actType==1}}"> -->
37   - <block wx:if="{{item.actType==1}}">
38   - <text>新人有礼</text>
39   - </block>
40   - <block wx:if="{{item.actType==2}}">
41   - <text>评价有礼</text>
42   - </block>
43   - <block wx:if="{{item.actType==3}}">
44   - <text>节日营销</text>
45   - </block>
46   - <block wx:if="{{item.actType==4}}">
47   - <text>生日营销</text>
48   - </block>
49   - <block wx:if="{{item.actType==5}}">
50   - <text>助力礼包</text>
51   - </block>
52   - </view>
53   - </block>
54   - </view>
55   - <view class="content_box_title">
56   - <view class="content_ware_title">
57   - <text>{{item.giftTitle}}</text>
58   - </view>
59   - <view class="content_ware_type">
60   - <block wx:if="{{item.actType==0&item.payMoney>0}}">
61   - <text>{{"¥"+item.payMoney}}</text>
62   - </block>
63   - <block wx:if="{{item.actType==0&item.payIntegral>0}}">
64   - <text>{{item.payIntegral+"积分"}}</text>
65   - </block>
66   -
67   - <!-- (121658)OA单规定取消,2023-12-15 -->
68   - <!--
69   - <block wx:if="{{item.actType==1}}">
70   - <text>{{item.actTitle}}</text>
71   - </block>
72   - <block wx:if="{{item.actType==2}}">
73   - <text>{{item.actTitle}}</text>
74   - </block>
75   - <block wx:if="{{item.actType==3}}">
76   - <text>{{item.actTitle}}</text>
77   - </block>
78   - <block wx:if="{{item.actType==4}}">
79   - <text>{{item.actTitle}}</text>
80   - </block>
81   - <block wx:if="{{item.actType==5}}">
82   - <text>{{item.actTitle}}</text>
83   - </block>-->
84   -
85   - </view>
86   - <view class="content_ware_price no_line_c">
87   - <text >{{"零售价:¥"+item.giftPosPrice}}</text>
88   - </view>
89   -
90   - <view class="content_ware_time" wx:if="{{item.iswarelbtype==1}}">
91   - <block wx:if="{{getDate>item.endTime}}">
92   - <text>{{"兑换截至日期:"+item.endTime}}</text>
93   - </block>
94   - <block wx:if="{{getDate<item.starTime}}">
95   - <text>{{"距兑换开始时间: "+item.starTime}}</text>
96   - </block>
97   - </view>
98   -
99   - </view>
100   - </view>
101   - <view wx:if="{{item.is_back !=1}}" class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}">
102   - <button class="overdue" wx:if="{{item.c_state==-2}}">无核销商品</button>
103   - <button class="overdue" wx:if="{{item.c_state==-1}}">兑换未开始</button>
104   - <button wx:if="{{item.c_state==0}}">立即使用</button>
105   - <button class="overdue" wx:if="{{item.c_state==1}}" >商品已核销</button>
106   - <button class="overdue" wx:if="{{item.c_state==2}}">商品兑换时间已过</button>
107   - </view>
108   - <view class="content_box_button" style="color:#b9b5b5;" wx:else>已退款</view>
109   - </view>
110   - </block>
111   - <block wx:if="{{is_read && wareCard.length<1 && is_get}}">
112   - <view class="foot_empty">
113   - <view>
114   - <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>
115   - </view>
116   - <view>
117   - <text>当前暂无礼包</text>
118   - </view>
119   - <view class="foot_empty_button">
120   - <text bindtap="navigateTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">去获取</text>
121   - </view>
122   - </view>
123   - </block>
124   - <block wx:if="{{ismore}}">
125   - <!-- 加载完毕并且数据大于=页大小 -->
126   - <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}">
127   - <view class="Line"></view>
128   - <view class="end fs26">到底了</view>
129   - <view class="Line"></view>
130   - </view>
131   - </block>
  1 +<!---- //文字"-->
  2 +<view class="rty">
  3 + <view style="margin-top:260rpx">加载中。。</view>
132 4 </view>
133   -<!-- 引入提示组件 -->
134   -<warn id="warn"></warn>
135   -<my_confirm id="my_confirm"></my_confirm>
136 5 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.wxss
1   -/*引用样式路径*/
2   -@charset "UTF-8";
3   -
4   -/* Author XGQ
5   - * 2019-11-12
6   - */
7   -
8   -.top_img {
9   - -webkit-align-content: center;
10   - align-content: center;
11   -}
12   -
13   -.top_img image {
14   - width: 100%;
15   -}
16   -
17   -.top_title {
18   - display: -webkit-box;
19   - display: -webkit-flex;
20   - display: flex;
21   - background-color: #fff;
22   - height: 85rpx;
23   - border-radius: 10rpx 10rpx 0rpx 0rpx;
24   - margin: 0rpx 20rpx 0rpx 20rpx;
25   - -webkit-align-content: center;
26   - align-content: center;
27   - margin-bottom: 10rpx;
28   -}
29   -
30   -.top_title_box {
31   - width: 49%;
32   - -webkit-align-content: center;
33   - align-content: center;
34   - text-align: center;
35   - padding: 15rpx;
36   -}
37   -
38   -.top_title_box_S {
39   - width: 1%;
40   - -webkit-align-content: center;
41   - align-content: center;
42   - text-align: center;
43   - margin: 20rpx 0rpx 20rpx 0rpx;
44   - border-left: #000 solid 3rpx;
45   -}
46   -
47   -.top_title_redtext {
48   - font-size: 30rpx;
49   - color: #d61b30;
50   -}
51   -
52   -.top_title_blacktext {
53   - font-size: 30rpx;
54   - color: #000;
55   -}
56   -
57   -.content_box {
58   - background-color: #fff;
59   - height: 375rpx;
60   - margin: 0rpx 20rpx;
61   - border-radius: 10rpx;
62   - margin-bottom: 10rpx;
63   -}
64   -
65   -.content_box_ware {
66   - border-bottom: #f5f5f5 solid 2rpx;
67   - display: -webkit-box;
68   - display: -webkit-flex;
69   - display: flex;
70   -}
71   -
72   -.content_box_img {
73   - margin: 20rpx 20rpx 20rpx 25rpx;
74   - width: 35%;
75   - display: -webkit-box;
76   - display: -webkit-flex;
77   - display: flex;
78   - font-size: 8rpx;
79   - position: relative;
80   -}
81   -
82   -.content_box_img image {
83   - width: 230rpx;
84   - height: 230rpx;
85   -}
86   -
87   -.content_box_img_title {
88   - position: absolute;
89   - background: #d01119;
90   - display: -webkit-box;
91   - display: -webkit-flex;
92   - display: flex;
93   - padding: 8rpx;
94   - border-radius: 0rpx 0rpx 10rpx 0rpx;
95   -}
96   -
97   -.content_box_img_ground1 {
98   - background: #fb6451;
99   -}
100   -
101   -.content_box_img_ground2 {
102   - background: #ffb72d;
103   -}
104   -
105   -.content_box_img_ground3 {
106   - background: #9be0e5;
107   -}
108   -
109   -.content_box_img_ground4 {
110   - background: #4784ef;
111   -}
112   -
113   -.content_box_img_title image {
114   - width: 30rpx;
115   - height: 30rpx;
116   -}
117   -
118   -.content_box_img_title text {
119   - font-size: 20rpx;
120   - color: #fff;
121   - line-height: 25rpx;
122   - padding-top: 5rpx;
123   -}
124   -
125   -.content_box_title {
126   - width: 65%;
127   - margin: 25rpx 25rpx 10rpx 0rpx;
128   - position: relative;
129   -}
130   -
131   -.content_ware_title {
132   - font-size: 30rpx;
133   - word-break: break-all;
134   - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
135   - text-overflow: ellipsis;
136   - display: -webkit-box;
137   - /** 对象作为伸缩盒子模型显示 **/
138   - -webkit-box-orient: vertical;
139   - /** 设置或检索伸缩盒对象的子元素的排列方式 **/
140   - -webkit-line-clamp: 2;
141   - /** 显示的行数 **/
142   - overflow: hidden;
143   - /** 隐藏超出的内容 **/
144   -}
145   -
146   -.content_ware_type {
147   - font-size: 32rpx;
148   - color: #c61a34;
149   - margin-top: 10rpx;
150   - position: absolute;
151   - left: 0;
152   - bottom: 100rpx;
153   -}
154   -
155   -.content_ware_price {
156   - font-size: 26rpx;
157   - color: #b9b5b5;
158   - margin-top: 2rpx;
159   - text-decoration: line-through;
160   - position: absolute;
161   - left: 0;
162   - bottom: 70rpx;
163   -}
164   -
165   -.content_ware_time {
166   - font-size: 24rpx;
167   - color: #c61a34;
168   - margin-top: 20rpx;
169   - position: absolute;
170   - left: 0;
171   - bottom: 25rpx;
172   -}
173   -
174   -.content_box_button {
175   - text-align: right;
176   - margin: 20rpx 25rpx 20rpx 20rpx;
177   -}
178   -
179   -.content_box_button button {
180   - display: inline-block;
181   - min-width: 160rpx;
182   - height: 50rpx;
183   - font-size: 25rpx;
184   - background: #d41c34;
185   - color: #fff;
186   - line-height: 50rpx;
187   - padding: 0 8rpx;
188   -}
189   -
190   -.foot_box {
191   - -webkit-align-content: center;
192   - align-content: center;
193   - text-align: center;
194   - margin-top: 15rpx;
195   - margin-bottom: 50rpx;
196   -}
197   -
198   -.foot_box text {
199   - font-size: 25rpx;
200   - color: #fff;
201   -}
202   -
203   -.foot_empty {
204   - background-color: #fff;
205   - height: 375rpx;
206   - margin: 10rpx 20rpx 0rpx 20rpx;
207   - border-radius: 10rpx;
208   - text-align: center;
209   - padding: 150rpx 0rpx 300rpx 0rpx;
210   - -webkit-box-pack: center;
211   - -webkit-justify-content: center;
212   - justify-content: center;
213   -}
214   -
215   -.foot_empty image {
216   - width: 400rpx;
217   - height: 273rpx;
218   -}
219   -
220   -.foot_empty text {
221   - font-size: 30rpx;
222   - color: #999;
223   -}
224   -
225   -.foot_empty_button {
226   - background: #ff6363;
227   - margin: 60rpx 230rpx 0rpx 230rpx;
228   - padding: 10rpx;
229   - border-radius: 70rpx;
230   - line-height: 40rpx;
231   -}
232   -
233   -.foot_empty_button text {
234   - font-size: 28rpx;
235   - color: #fff;
236   -}
237   -
238   -page {
239   - /* background-color: rgb(250, 120, 88); */
240   -}
241   -.After_all {
242   - height: 80rpx;
243   - margin-bottom: 10rpx;
244   - color: rgb(255, 255, 255);
245   -}
246   -
247   -.After_all .Line {
248   - border-top: 3rpx solid rgb(255, 255, 255);
249   - width: 130rpx;
250   -}
251   -
252   -.After_all .end {
253   - margin: 0rpx 15rpx;
254   -}
255   -
256   -button{
257   - border-radius: 8rpx !important; overflow: hidden;
258   -}
259   -
260   -.overdue{
261   - background-color: rgb(153,153,153) !important;
262   -}
263   -
264   -button::after{
265   - border: none;
266   -}
  1 +.rty{
  2 + display:flex; justify-content: center; align-items: center;
  3 + width:100%;
  4 + height:100%
  5 +}
267 6 \ No newline at end of file
... ...
pages/giftpack/newvipgift/newvipgift.js
1   -var i = require("../../../utils/util.js")
2   -var e = getApp(),
3   - a = e.globalData.setting,
4   - os = a,
5   - t = e.request,
6   - d = e.globalData;
7 1 Page({
8   - data: {
9   - url: a.url, //接口网址
10   - iurl: a.imghost, //图片前缀网址
11   - itemShow: false, //项目栏目是否显示
12   - cardShow: false, //代金券栏目是否显示
13   - packShow: false, //福利栏目是否显示
14   - textShow: false, //规则是否显示
15   - integralShow: true, //积分领取是否显示
16   - growUpShow: true, //成长值领取是否显示
17   - itemButton: '',
18   - cardButton: '',
19   - getActId: '',
20   - getActType: '',
21   - giftID: '',
22   - receiveState: '一键全部领取',
23   - textTitle: '',
24   - getUrl: '',
25   - noShow: false,
26   - cards: [], //礼包内容--礼券
27   - itemWare: [], //礼包内容--服务项目
28   - integralTitle: "",
29   - growUpTitle: "",
30   - is_sub: 0, //是否重复领取
31   -
32   - },
33   - GetList: function() {
34   - var th = this;
35   - var url = "/api/weshop/marketing/giftbag/bound/get";
36   - getApp().request.promiseGet(url, {
37   - isShowLoading: true,
38   - data: {
39   - "actId": th.data.getActId, //活动id
40   - "actType": 1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销
41   - "giftBagId": th.data.giftID, //礼包ID
42   - "storeId": a.stoid, //商家ID
43   - "userId": d.user_id //用户ID
44   - }
45   - }).then(res => {
46   - if (res.data.code == 0) {
47   - if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length > 0) {
48   - //礼包内容--礼券
49   - th.setData({
50   - cardShow: true,
51   - cards: res.data.data.lbCoupons
52   - })
53   - }
54   - if (res.data.data.lbSM != null && res.data.data.lbSM.length > 0) {
55   - //礼包内容--服务项目
56   - th.setData({
57   - itemShow: true,
58   - itemWare: res.data.data.lbSM
59   - })
60   - }
61   - //礼包积分
62   - if (res.data.data.lbIntegral <= 0) {
63   - if (res.data.data.lbGrowthValue <= 0) {
64   - th.setData({
65   - packShow: false
66   - })
67   - } else {
68   - th.setData({
69   - packShow: false,
70   - integralShow: false,
71   - growUpShow: true
72   - })
73   - }
74   -
75   - } else {
76   - if (res.data.data.lbGrowthValue > 0) {
77   - th.setData({
78   - packShow: true
79   - })
80   - } else {
81   - th.setData({
82   - packShow: true,
83   - integralShow: true,
84   - growUpShow: false
85   - })
86   - }
87   - }
88   - th.setData({
89   - integralTitle: '价值' + res.data.data.lbIntegral + '积分',
90   - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值'
91   - })
92   - if (res.data.data.receiveState == 0) {
93   - th.setData({
94   - receiveState: '一键全部领取'
95   - })
96   - } else {
97   - th.setData({
98   - receiveState: '已领取'
99   - })
100   - }
101   -
102   - if (res.data.data.actIntro != '') {
103   - th.setData({
104   - textShow: true,
105   - textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"').replace(/<section/g, '<div')
106   - .replace(/\/section>/g, '\div>')
107   - })
108   - }
109   - } else {
110   - getApp().my_warnning(res.data.msg, 0, th);
111   - return false;
112   - }
113   - })
114   - },
115   -
116   - onLoad: function(options) {
117   -
118   - var th = this;
119   - th.setData({
120   - getActId: options.actId,
121   - giftID: options.giftBagId
122   - })
123   -
124   - },
125   - onShow: function() {
126   - //--先判断会员状态--
127   - var user_info = getApp().globalData.userInfo;
128   - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
129   - getApp().goto('/packageE/pages/togoin/togoin');
130   - return false;
131   - }
132   - this.GetList();
133   -
  2 + data: {},
  3 + onLoad: async function(options) {
  4 + getApp().globalData.ts_trans_data=options;
  5 + getApp().goto('/packageF/pages/giftpack/newvipgift/newvipgift');
134 6 },
135   - GetReceive: function() {
136   - var th = this;
137   - if (th.data.receiveState == '已领取') {
138   - return false;
139   - }
140   - var is_sub = th.data.is_sub; //判断是否重复提交
141   - if (is_sub == 0) {
142   - th.setData({
143   - is_sub: 1
144   - })
145   - var json = {
146   - "actId": th.data.getActId, //活动Id
147   - "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
148   - "giftBagId": th.data.giftID, //礼包Id
149   - "storeId": a.stoid, //商家Id
150   - "userId": d.user_id, //用户ID
151   - "buyFrom": 2
152   - };
153   - var data = JSON.stringify(json);
154   - var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
155   - getApp().request.json_post(url, json,
156   - function(res) {
157   - th.setData({
158   - is_sub: 0
159   - })
160   - if (res.data.code == 0) {
161   - th.setData({
162   - receiveState: '已领取'
163   - })
164   - getApp().my_warnning("领取成功", 1, th);
165   - } else {
166   - getApp().my_warnning(res.data.msg, 0, th);
167   - }
168   - },
169   - function(res) {
170   -
171   - }, "post"
  7 + //显示加载
  8 + onShow:function(){ },
172 9  
173   - )
174   -
175   - }
176   - },
177   - //界面跳转
178   - goto: function(e) {
179   - var url = e.currentTarget.dataset.url;
180   - getApp().goto(url);
181   - },
182   - //图片失败,默认图片
183   - bind_bnerr1: function(e) {
184   - var th = this;
185   - var _errImg = e.target.dataset.errorimg;
186   - var _Img = e.target.dataset.img;
187   - if (_Img != undefined) {
188   - var _errObj = {};
189   - _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
190   - th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
191   - }
192   - },
193   -});
194 10 \ No newline at end of file
  11 +})
195 12 \ No newline at end of file
... ...
pages/giftpack/newvipgift/newvipgift.json
1 1 {
2   - "navigationBarTitleText": "新人礼",
3   - "usingComponents": {
4   - "warn": "/components/long_warn/long_warn",
5   - "my_confirm": "/components/my_confirm/my_confirm"
  2 + "windom": {
  3 + "navigationBarTitleText": "加载中.",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
6 8 }
  9 +
7 10 }
8 11 \ No newline at end of file
... ...
pages/giftpack/newvipgift/newvipgift.wxml
1   -<view>
2   - <view class="image_box">
3   - <image src="{{iurl+'/miniapp/images/giftbag/vip00.png'}}" lazy-load="true"></image>
4   - </view>
5   - <block wx:if="{{itemShow}}">
6   - <view class="top rel">
7   - <view class="top_box">
8   - <view class="top_box_text">
9   - <text>______</text>
10   - </view>
11   - <view class="top_box_text">
12   - <text>新人专享\n你的美丽我来缔造</text>
13   - </view>
14   - <view class="top_box_text">
15   - <text>______</text>
16   - </view>
17   - </view>
18   - <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index">
19   - <view class="top_item ">
20   - <block wx:if="{{item.lbType==3}}">
21   - <view class="top_item_img">
22   - <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image>
23   - </view>
24   - </block>
25   - <block wx:if="{{item.lbType==1}}">
26   - <view class="top_item_img ">
27   - <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image>
28   - </view>
29   - </block>
30   - <view class="top_item_center ">
31   - <view class="top_item_center_title">
32   - <block wx:if="{{item.lbType==1}}">
33   - <text>免费领取</text>
34   - </block>
35   - <block wx:if="{{item.lbType==3}}">
36   - <text>{{item.fromName}}</text>
37   - </block>
38   - </view>
39   - <view class="top_item_center_ramke ">
40   - <block wx:if="{{item.lbType==1}}">
41   - <text>{{item.fromName}}</text>
42   - </block>
43   - <block wx:if="{{item.lbType==3}}">
44   - <text>{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text>
45   - </block>
46   - <view class="num flex-level-right fs26">
47   - <view>数量:</view>
48   - <view>{{item.num}}</view>
49   - </view>
50   - </view>
51   - </view>
52   - </view>
53   - </block>
54   - <block wx:if="{{itemShow}}">
55   - <view class="vips">
56   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
57   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
58   - </view>
59   - </block>
60   - </view>
61   - </block>
62   - <block wx:if="{{cardShow}}">
63   - <view>
64   - <view class="top rel">
65   - <view class="top_box ">
66   - <view class="top_box_text ">
67   - <text>———</text>
68   - </view>
69   - <view class="top_box_text ">
70   - <text>新人专享优惠券</text>
71   - </view>
72   - <view class="top_box_text ">
73   - <text>———</text>
74   - </view>
75   - </view>
76   - <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index">
77   - <view class="top_card ">
78   - <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}">
79   - <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" -->
80   - <view class="top_card_tite_box ">
81   - <block wx:if="{{item.useObjectType==0}}">
82   - <view class="top_card_tite_a">全场通用</view>
83   - </block>
84   - <block wx:if="{{item.useObjectType==1}}">
85   - <view class="top_card_tite_b">品牌限定</view>
86   - </block>
87   - <block wx:if="{{item.useObjectType==2}}">
88   - <view class="top_card_tite_c">品类限定</view>
89   - </block>
90   - <block wx:if="{{item.useObjectType==11}}">
91   - <view class="top_card_tite_a">用途限定</view>
92   - </block>
93   - <block wx:if="{{item.useObjectType==12}}">
94   - <view class="top_card_tite_a">分类限定</view>
95   - </block>
96   - </view>
97   - <block wx:if="{{item.isPack!=null}}">
98   - <view class="top_card_counte">包邮券</view>
99   - </block>
100   - <block wx:else>
101   - <view class="top_card_counte ">{{item.sum+"元券"}}</view>
102   - </block>
103   - <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view>
104   - </view>
105   - </view>
106   - </block>
107   - <block wx:if="{{packShow}}">
108   - <view class="vips">
109   - <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
110   - <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image>
111   - </view>
112   - </block>
113   - </view>
114   - </view>
115   - </block>
116   - <block wx:if="{{packShow}}">
117   - <view>
118   - <view class="top ">
119   - <view class="top_box ">
120   - <view class="top_box_text ">
121   - <text>———</text>
122   - </view>
123   - <view class="top_box_text ">
124   - <text>新人专享福利</text>
125   - </view>
126   - <view class="top_box_text ">
127   - <text>———</text>
128   - </view>
129   - </view>
130   - <block wx:if="{{integralShow}}">
131   - <view>
132   - <view class="top_box_image ">
133   - <image src="{{iurl+'/miniapp/images/giftbag/integral.png'}}" lazy-load="true"></image>
134   - <button>{{integralTitle}}</button>
135   - </view>
136   - </view>
137   - </block>
138   - <block wx:if="{{growUpShow}}">
139   - <view>
140   - <view class="top_box_image fs36">
141   - <image src="{{iurl+'/miniapp/images/giftbag/growup.png'}}" lazy-load="true"></image>
142   - <button>{{growUpTitle}}</button>
143   - </view>
144   - </view>
145   - </block>
146   - </view>
147   - </view>
148   - </block>
149   - <block wx:if="{{textShow}}">
150   - <view class="foot_box">
151   - <view class="foot_box_title fs36">
152   - <text>活动规则:</text>
153   - </view>
154   - <view class="foot_box_text">
155   - <rich-text nodes="{{textTitle}}" name="div" style="word-break:break-all;word-wrap:break-word"></rich-text>
156   - </view>
157   - </view>
158   - </block>
159   - <view class="button_box">
160   - <view>
161   - <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button>
162   - </view>
163   - <view class="button_text ">
164   - <text>本活动最终解释权归公司所有,如果有问题请联系客服</text>
165   - </view>
166   - </view>
167   - <view class="foot_empty "></view>
168   - <view class="foot_button">
169   - <view class="{{receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy'}}" bindtap="GetReceive">
170   - <text>{{receiveState}}</text>
171   - </view>
172   - </view>
173   -</view>
174   -<!-- 引入提示组件 -->
175   -<warn id="warn"></warn>
176   -<my_confirm id="my_confirm"></my_confirm>
177 1 \ No newline at end of file
  2 +.rty{
  3 + display:flex; justify-content: center; align-items: center;
  4 + width:100%;
  5 + height:100%
  6 +}
178 7 \ No newline at end of file
... ...
pages/giftpack/newvipgift/newvipgift.wxss
1   -@charset "UTF-8";
2   -
3   -/* Author XGQ
4   - * 2019-10-27
5   - */
6   -
7   -.image_box {
8   - -webkit-box-pack: center;
9   - -webkit-justify-content: center;
10   - justify-content: center;
11   -}
12   -
13   -.image_box image {
14   - width: 100%;
15   - height: 690rpx;
16   -}
17   -
18   -.top {
19   - margin: -20rpx 28rpx 45rpx 28rpx;
20   - padding: 10rpx 10rpx 70rpx 10rpx;
21   - background-color: #fff;
22   - border-radius: 0rpx 0rpx 15rpx 15rpx;
23   -}
24   -
25   -.top_box {
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;
33   -}
34   -
35   -.top_box_text {
36   - -webkit-box-pack: center;
37   - -webkit-justify-content: center;
38   - justify-content: center;
39   - margin: 50rpx 15rpx 20rpx 15rpx;
40   -}
41   -
42   -.top_box_text text {
43   - color: #fb6451;
44   - font-size: 40rpx;
45   -}
46   -
47   -.top_item {
48   - display: -webkit-box;
49   - display: -webkit-flex;
50   - display: flex;
51   - width: 100%;
52   - margin: 60rpx 0 0 0;
53   -}
54   -
55   -.top_item_img {
56   - float: left;
57   - width: 28%;
58   - margin: 0rpx 10rpx 0rpx 20rpx;
59   -}
60   -
61   -.top_item_img image {
62   - width: 150rpx;
63   - height: 150rpx;
64   - border-radius: 50%;
65   - border: #f96865 solid 3rpx;
66   -}
67   -
68   -.top_item_center {
69   - float: left;
70   - width: 50%;
71   -}
72   -
73   -.top_item_center_title {
74   - font-size: 35rpx;
75   - color: #fb6451;
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   - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
82   - text-overflow: ellipsis;
83   - display: -webkit-box;
84   - /** 对象作为伸缩盒子模型显示 **/
85   - -webkit-box-orient: vertical;
86   - /** 设置或检索伸缩盒对象的子元素的排列方式 **/
87   - -webkit-line-clamp: 2;
88   - /** 显示的行数 **/
89   - overflow: hidden;
90   - /** 隐藏超出的内容 **/
91   -}
92   -
93   -.top_item_center_ramke {
94   - font-size: 25rpx;
95   - -webkit-box-pack: start;
96   - -webkit-justify-content: flex-start;
97   - justify-content: flex-start;
98   - line-height: 35rpx;
99   - letter-spacing: 0.5rpx;
100   - word-break: break-all;
101   - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
102   - text-overflow: ellipsis;
103   - display: -webkit-box;
104   - /** 对象作为伸缩盒子模型显示 **/
105   - -webkit-box-orient: vertical;
106   - /** 设置或检索伸缩盒对象的子元素的排列方式 **/
107   - -webkit-line-clamp: 2;
108   - /** 显示的行数 **/
109   - overflow: hidden;
110   - /** 隐藏超出的内容 **/
111   -}
112   -
113   -.top_item_button {
114   - float: right;
115   - width: 22%;
116   - padding: 65rpx 20rpx 0 1rpx;
117   -}
118   -
119   -.top_item_button button {
120   - font-size: 25rpx;
121   - background: #fd6969;
122   - color: #fff;
123   - border-radius: 50rpx;
124   - height: 45rpx;
125   - line-height: 45rpx;
126   -}
127   -
128   -.top_card {
129   - width: 309rpx;
130   - display: inline-block;
131   - margin: 15rpx;
132   - vertical-align:top;
133   -}
134   -
135   -.top_card_box {
136   - background-size: cover;
137   - background-position: center;
138   - background-repeat: no-repeat;
139   - border-radius: 20rpx;
140   - height: 250rpx;
141   - margin: 5rpx;
142   -}
143   -
144   -.img1 {
145   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
146   -}
147   -
148   -.img2 {
149   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
150   -}
151   -
152   -.img3 {
153   - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
154   -}
155   -
156   -.top_card_tite_box {
157   - width: 100%;
158   - display: -webkit-box;
159   - display: -webkit-flex;
160   - display: flex;
161   - -webkit-box-pack: end;
162   - -webkit-justify-content: flex-end;
163   - justify-content: flex-end;
164   -}
165   -
166   -.top_card_tite_a {
167   - padding: 5rpx 25rpx 5rpx 25rpx;
168   - line-height: 29rpx;
169   - font-size: 25rpx;
170   - color: #fff;
171   - background: #ffa7c0;
172   - border-radius: 0rpx 20rpx 0rpx 6rpx;
173   -}
174   -
175   -.top_card_tite_b {
176   - padding: 5rpx 25rpx 5rpx 25rpx;
177   - line-height: 29rpx;
178   - font-size: 25rpx;
179   - color: #fff;
180   - background: #50dfdb;
181   - border-radius: 0rpx 20rpx 0rpx 6rpx;
182   -}
183   -
184   -.top_card_tite_c {
185   - padding: 5rpx 25rpx 5rpx 25rpx;
186   - line-height: 29rpx;
187   - font-size: 25rpx;
188   - color: #fff;
189   - background: #92cbff;
190   - border-radius: 0rpx 20rpx 0rpx 6rpx;
191   -}
192   -
193   -.top_card_tite_d {
194   - padding: 5rpx 25rpx 5rpx 25rpx;
195   - line-height: 29rpx;
196   - font-size: 25rpx;
197   - color: #fff;
198   - border-radius: 0rpx 20rpx 0rpx 6rpx;
199   -}
200   -
201   -.top_card_counte {
202   - padding: 40rpx 20rpx 0 0;
203   - text-align: center;
204   - display: -webkit-box;
205   - display: -webkit-flex;
206   - display: flex;
207   - -webkit-box-pack: center;
208   - -webkit-justify-content: center;
209   - justify-content: center;
210   - -webkit-box-align: center;
211   - -webkit-align-items: center;
212   - align-items: center;
213   - color: #fff;
214   - font-size: 40rpx;
215   -}
216   -
217   -.top_card_remak {
218   - padding: 20rpx 0 40rpx 0;
219   - text-align: center;
220   - display: -webkit-box;
221   - display: -webkit-flex;
222   - display: flex;
223   - -webkit-box-pack: center;
224   - -webkit-justify-content: center;
225   - justify-content: center;
226   - -webkit-box-align: center;
227   - -webkit-align-items: center;
228   - align-items: center;
229   - font-size: 20rpx;
230   - color: #fff;
231   -}
232   -
233   -.top_card_button_a button {
234   - margin: 0 85rpx;
235   - background: #ffa6bc;
236   - border-radius: 50rpx;
237   - line-height: 40rpx;
238   - height: 40rpx;
239   - color: white;
240   - font-size: 25rpx;
241   -}
242   -
243   -.top_card_button_b button {
244   - margin: 0 85rpx;
245   - background: #50dfdb;
246   - border-radius: 50rpx;
247   - line-height: 40rpx;
248   - height: 40rpx;
249   - color: white;
250   - font-size: 25rpx;
251   -}
252   -
253   -.top_card_button_c button {
254   - margin: 0 85rpx;
255   - background: #75bcfc;
256   - border-radius: 50rpx;
257   - line-height: 40rpx;
258   - height: 40rpx;
259   - color: white;
260   - font-size: 25rpx;
261   -}
262   -
263   -.top_card_button_d button {
264   - margin: 0 85rpx;
265   - border-radius: 50rpx;
266   - line-height: 40rpx;
267   - height: 40rpx;
268   - color: white;
269   - font-size: 25rpx;
270   -}
271   -
272   -.top_box_image {
273   - padding: 20rpx 20rpx 20rpx 20rpx;
274   -}
275   -
276   -.top_box_image image {
277   - height: 216rpx;
278   - width: 100%;
279   -}
280   -
281   -.top_box_image button {
282   - margin: 15rpx 95rpx 0rpx 95rpx;
283   - background: #fe6a6a;
284   - border-radius: 50rpx;
285   - line-height: 60rpx;
286   - height: 60rpx;
287   - color: white;
288   - font-size: 30rpx;
289   -}
290   -
291   -.foot_box {
292   - margin: 0 30rpx 40rpx 30rpx;
293   - background: #fff;
294   - border-radius: 20rpx;
295   -}
296   -
297   -.foot_box_title {
298   - color: #000;
299   - padding: 20rpx 30rpx 20rpx 30rpx;
300   -}
301   -
302   -.foot_box_text {
303   - font-size: 30rpx;
304   - color: #000;
305   - line-height: 48rpx;
306   - padding: 20rpx 35rpx 50rpx 30rpx;
307   -}
308   -
309   -.button_box {
310   - margin: 50rpx 50rpx 50rpx 50rpx;
311   - text-align: center;
312   -}
313   -
314   -.button {
315   - margin: 0 30rpx;
316   - background: #ff9a8c;
317   - border-radius: 50rpx;
318   - line-height: 80rpx;
319   - height: 80rpx;
320   - color: white;
321   - font-size: 35rpx;
322   -}
323   -
324   -.button_text {
325   - padding-top: 20rpx;
326   - font-size: 20rpx;
327   - color: white;
328   - height: 100rpx;
329   -}
330   -
331   -.foot_empty {
332   - height: 90rpx;
333   -}
334   -
335   -.foot_button {
336   - display: -webkit-box;
337   - display: -webkit-flex;
338   - display: flex;
339   - margin: 20rpx 0rpx 0rpx 0rpx;
340   - padding: 25rpx 0rpx;
341   - background: #fff;
342   - text-align: center;
343   - -webkit-box-pack: center;
344   - -webkit-justify-content: center;
345   - justify-content: center;
346   - position: fixed;
347   - bottom: 0;
348   - left: 0;
349   - width: 100%;
350   - z-index: 10;
351   -}
352   -
353   -.foot_button_buy {
354   - background: #e4010c;
355   - color: #fff;
356   - width: 400rpx;
357   - height: 70rpx;
358   - font-size: 28rpx;
359   - line-height: 70rpx;
360   - border-radius: 40rpx;
361   -}
362   -
363   -.foot_button_notbuy {
364   - background: #999;
365   - color: #fff;
366   - width: 400rpx;
367   - height: 70rpx;
368   - font-size: 28rpx;
369   - line-height: 70rpx;
370   - border-radius: 40rpx;
371   -}
372   -
373   -page {
374   - background-color: #fb6451;
375   -}
376   -
377   -button::after {
378   - border: none;
379   -}
380   -
381   -.foot_box_text ._img {
382   - width: 100%;
383   -}
384   -.foot_box_text .p{
385   - width: 100%;
386   -}
387   -
388   -.foot_box_text .img {
389   - line-height: 0;
390   -}
391   -.image {
392   - width: 400rpx;
393   - height: 200rpx;
394   -}
395   -.div_class{
396   - width: 600rpx;
397   -}
398   -
399   -.num {
400   - color: #fb6451;
401   -}
402   -
403   -.lvip {
404   - left: 30rpx;
405   - bottom: -58rpx;
406   - width: 20rpx;
407   - height: 90rpx;
408   - z-index: 5;
409   -}
410   -
411   -.rvip {
412   - right: 30rpx;
413   - bottom: -58rpx;
414   - width: 20rpx;
415   - height: 90rpx;
416   - z-index: 5;
  1 +.rty{
  2 + display:flex; justify-content: center; align-items: center;
  3 + width:100%;
  4 + height:100%
417 5 }
418 6 \ No newline at end of file
... ...
pages/giftpack/payment/payment.js deleted
1   -var e = getApp();
2   -var regeneratorRuntime = require('../../../utils/runtime.js');
3   -Page({
4   - /**
5   - * 页面的初始数据
6   - */
7   - data: {
8   - url: e.globalData.setting.imghost,
9   - resourceUrl: e.globalData.setting.resourceUrl,
10   - iurl: e.globalData.setting.imghost,
11   - allmoney: 0,
12   - order_sn: "",
13   - },
14   -
15   - /**
16   - * 生命周期函数--监听页面加载
17   - */
18   - onLoad: function (options) {
19   - wx.setNavigationBarTitle({
20   - title: '支付成功',
21   - });
22   - var money = parseFloat(options.money), order_sn = options.order_sn;
23   - this.setData({allmoney:money,order_sn:order_sn})
24   -
25   -
26   -
27   - },
28   - onReady(){
29   - // console.error(6666);
30   - if (this.data.allmoney*1 > 0) {
31   - var encourage = this.selectComponent("#encourage"); //组件的id
32   - if (encourage){
33   - encourage.get_encourage();
34   - }
35   - }
36   - },
37   -
38   - goto: function () {
39   - var url = '/pages/index/index/index';
40   - getApp().goto(url)
41   - },
42   -})
43 0 \ No newline at end of file
pages/giftpack/payment/payment.json deleted
1   -{
2   - "navigationBarTitleText": "支付成功",
3   - "usingComponents": {
4   - "show_encourage": "/components/show_encourage/show_encourage"
5   - }
6   -}
7 0 \ No newline at end of file
pages/giftpack/payment/payment.wxml deleted
1   -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2   -<view>
3   - <!-- 支付成功提示 -->
4   - <view class="payradio">
5   - <!-- 提示框 -->
6   - <view class="Success_box flex-center">
7   - <view>
8   - <view class="flex-center">
9   - <image src="{{url}}miniapp/images/pay/paysuccess.png"></image>
10   - </view>
11   - <view class="Success_box_title fs32">订单支付成功!</view>
12   - </view>
13   - </view>
14   -
15   - <!-- 支付信息 -->
16   - <view class="payitem_max fs28">
17   - <!-- 订单编号 -->
18   - <view class="payitem flex">
19   - <view>订单编号 :</view>
20   - <text selectable="true">{{order_sn}}</text>
21   - </view>
22   -
23   - <!-- 实付金额 -->
24   - <view class="payitem flex">
25   - <view>实付金额 :</view>
26   - <!-- {{filters.toFix()}} -->
27   - <view class="pay_money">{{filters.toFix(allmoney,2)}}元</view>
28   - </view>
29   -
30   - <!-- 支付方式 -->
31   - <view class="payitem flex" wx:if="type==1">
32   - <view>支付方式 :</view>
33   - <view>微信支付</view>
34   - </view>
35   - </view>
36   - </view>
37   - <view class="flex-level">
38   - <view class="line"></view>
39   - </view>
40   -
41   - <!-- 跳转链接 -->
42   - <view>
43   - <!-- 链接 -->
44   - <view class="fs32">
45   - <view class="flex-center">
46   - <navigator class="pay_order flex-center" url="/pages/giftpack/mygiftpack/mygiftpack">
47   - <view>我的礼包</view>
48   - </navigator>
49   - </view>
50   - <view class="flex-center">
51   - <navigator class="pay_home flex-center" bindtap="goto">
52   - <view>回到首页</view>
53   - </navigator>
54   - </view>
55   - </view>
56   - </view>
57   -</view>
58   -
59   -
60   -<!-- 满足抽奖提醒 -->
61   -<show_encourage id="encourage"></show_encourage>
62 0 \ No newline at end of file
pages/giftpack/payment/payment.wxss deleted
1   -page {
2   - border-top: 2rpx solid rgb(245, 245, 245);
3   -}
4   -.line {
5   - border-top: 2rpx solid rgb(245, 245, 245);
6   - width: 700rpx;
7   -}
8   -
9   -.payradio .Success_box {
10   - padding-top: 45rpx;
11   - padding-bottom: 45rpx;
12   -}
13   -
14   -.payradio .Success_box .Success_box_title {
15   - margin-top: 45rpx;
16   - color: rgb(8, 8, 8);
17   -}
18   -
19   -.payradio image {
20   - width: 140rpx;
21   - height: 140rpx;
22   - display: flex;
23   -}
24   -
25   -.payitem_max {
26   - padding: 0rpx 55rpx;
27   - color: rgb(104, 104, 104);
28   - padding-bottom: 30rpx;
29   -}
30   -
31   -.payitem_max .payitem {
32   - margin-top: 30rpx;
33   -}
34   -
35   -.payitem_max .payitem .pay_nam {
36   - width: 200rpx;
37   -}
38   -
39   -.payitem_max .payitem view {
40   - margin-right: 50rpx;
41   -}
42   -.pay_money{
43   - color: rgb(219, 27, 52);
44   -}
45   -
46   -.pay_User {
47   - padding-left: 55rpx;
48   - color: rgb(104, 104, 104);
49   -}
50   -
51   -.pay_User .payitem {
52   - margin-top: 30rpx;
53   -}
54   -
55   -.pay_User .payitem .pay_Receiving {
56   - width: 128rpx;
57   - margin-right: 50rpx;
58   -}
59   -
60   -.pay_User .payitem .pay_name {
61   - margin-right: 38rpx;
62   - max-width: 250rpx;
63   -}
64   -
65   -.pay_order {
66   - margin-top: 115rpx;
67   - color: rgb(104, 104, 104);
68   - width: 560rpx;
69   - height: 62rpx;
70   - border-radius: 30rpx;
71   - border: 3rpx solid rgb(209, 209, 209);
72   -}
73   -
74   -.pay_home {
75   - margin-top: 35rpx;
76   - color: rgb(255, 255, 255);
77   - width: 566rpx;
78   - height: 68rpx;
79   - border-radius: 30rpx;
80   - background-color: rgb(219, 27, 52);
81   -}
82   -.address{
83   - width: 470rpx;
84   -}
85 0 \ No newline at end of file
pages/giftpack/public/buy_com.js deleted
1   -const t_pay = require("../../../utils/pay2.js");
2   -module.exports = {
3   - set_py_fir(){
4   - t_pay.set_fir();
5   - },
6   - //开启定位
7   - wait_for_store_config: function (th) {
8   - var t_time = setInterval(function () {
9   - if (th.data.bconfig == null) false;
10   - var e = th.data.bconfig;
11   - if (e && e.is_sort_storage) {
12   - wx.getLocation({
13   - type: 'gcj02',
14   - success: function (res) {
15   - th.data.lat = res.latitude;
16   - th.data.lon = res.longitude;
17   - th.data.is_get_local_ok = 1;
18   - },
19   - fail: function (res) {
20   - if (res.errCode == 2) {
21   - th.setData({
22   - is_gps: 0
23   - });
24   - if (th.data.is_gps == 0) {
25   - getApp().confirmBox("请开启GPS定位", null, 10000, !1);
26   - }
27   -
28   - } else {
29   - th.setData({
30   - is_gps: "3"
31   - });
32   - }
33   -
34   - th.data.is_get_local_ok = 1;
35   - }
36   - })
37   - } else {
38   - th.data.is_get_local_ok = 1;
39   - }
40   - clearInterval(t_time);
41   - }, 500)
42   - },
43   - set_user_mo_store(th,os,func){
44   - var that=th;
45   - //获取用户的默认门店
46   - getApp().get_user_store(function (e) {
47   - if (!e) {
48   - th.data.fir_def_store = {}; //赋值空对象
49   - return false;
50   - }
51   -
52   - if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
53   -
54   - var ee = JSON.parse(JSON.stringify(e));
55   - //--定时器推迟一下--
56   - setTimeout(function () {
57   - if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
58   - //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
59   - if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
60   - ee.is_no_dis = 1;
61   - }
62   -
63   - var appd = getApp().globalData;
64   - var w_time = setInterval(function () {
65   - if (that.data.is_get_local_ok == 0) return false;
66   - clearInterval(w_time);
67   - var distance = null;
68   - var e = JSON.parse(JSON.stringify(ee));
69   -
70   - //如果有开启近距离的话,同时距离优不一样了
71   - if (that.data.lat != null) {
72   - //如果经纬度有变化的话
73   - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
74   - that.set_def_storage(e);
75   - if(func) func();
76   - } else {
77   - //要用接口是获取距离,js的计算不准
78   - getApp().request.promiseGet("/api/weshop/pickup/list", {
79   - data: {
80   - store_id: os.stoid,
81   - pickup_id: e.pickup_id,
82   - lat: th.data.lat,
83   - lon: th.data.lon,
84   - isstop: 0,
85   - is_pos: 1
86   - },
87   - }).then(res => {
88   - if (res.data.code == 0) {
89   - e = res.data.data.pageData[0];
90   - if (e) {
91   - e.is_no_dis = ee.is_no_dis;
92   - appd.pk_store = e;
93   - that.set_def_storage(e);
94   - }
95   -
96   - }
97   - if(func) func();
98   - })
99   - }
100   - //e.distance = distance;
101   - appd.lat = that.data.lat;
102   - appd.lon = that.data.lon;
103   -
104   - } else {
105   - if (e) {
106   - e.distance = null;
107   - that.set_def_storage(e);
108   - }
109   - if(func) func();
110   - }
111   - }, 500)
112   - }, 700)
113   - })
114   -
115   - },
116   -
117   - //---------拿出门店分类和门店------------
118   - get_sto(th,os) {
119   - var that = th;
120   - var self=this;
121   - var timer_get = setInterval(function () {
122   - if (th.data.is_get_local_ok == 0) return false;
123   - var dd = null;
124   -
125   - dd = {
126   - store_id: os.stoid,
127   - isstop: 0,
128   - is_pos: 1,
129   - pageSize: 2000,
130   - }
131   -
132   - //如果有距离的话
133   - if (th.data.lat != null) {
134   - dd.lat = th.data.lat;
135   - dd.lon = th.data.lon;
136   - }
137   -
138   - if(th.data.sele_g && th.data.sele_g.pickup_list){
139   - dd.ids=th.data.sele_g.pickup_list
140   - }
141   -
142   - clearInterval(timer_get);
143   -
144   - //如果会员是有默认的门店话
145   - if (!th.data.def_pick_store && th.data.fir_def_store) {
146   - th.setData({def_pick_store: th.data.fir_def_store});
147   - }
148   - wx.showLoading({
149   - title: '加载中.'
150   - });
151   - //----------获取门店----------------
152   - getApp().request.promiseGet("/api/weshop/pickup/list", {
153   - data: dd,
154   - }).then(res => {
155   - var e = res;
156   -
157   - if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
158   -
159   - var his_cate_num = 0;
160   - for (let i in e.data.data.pageData) {
161   - let item = e.data.data.pageData[i];
162   - if (item.category_id > 0) {
163   - his_cate_num = 1;
164   - break;
165   - }
166   - }
167   - e.his_cate_num = his_cate_num;
168   -
169   - //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
170   - if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) {
171   - th.setData({
172   - def_pick_store: e.data.data.pageData[0],
173   - sto_sele_name: e.data.data.pageData[0].pickup_name,
174   - sto_sele_id: e.data.data.pageData[0].pickup_id,
175   - sto_sele_distr: e.data.data.pageData[0].distr_type
176   - });
177   - th.data.fir_def_store = e.data.data.pageData[0];
178   - }
179   -
180   - //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 --
181   - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
182   - for (var k = 0; k < e.data.data.pageData.length; k++) {
183   - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
184   - e.data.data.pageData.splice(k, 1); //删除
185   - break;
186   - }
187   - }
188   - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
189   - }
190   -
191   - th.setData({all_pick_list: e.data.data.pageData});
192   -
193   - setTimeout(function () {
194   - self.deal_pickup(e,th,os); //--普通门店排版--
195   - }, 800)
196   -
197   - }
198   - })
199   - }, 200)
200   -
201   - },
202   -
203   - //-- 统一购买 --
204   - buy_libao:function (th) {
205   - var _that=this;
206   - if(th.data.sele_g.is_pickup){
207   - if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id)){
208   - getApp().my_warnning("请先选择门店", 1, th);
209   - return false;
210   - }
211   -
212   - if(th.data.def_pick_store.is_no_dis){
213   - getApp().my_warnning("门店不匹配,请重新选择", 1, th);
214   - return false;
215   - }
216   - }
217   -
218   - if(th.data.submit) return false;
219   - th.setData({submit:1})
220   -
221   - if(th.pp_bacK_func){
222   - th.pp_bacK_func();
223   - return false;
224   - }
225   -
226   - var id=th.data.sele_g.lbId;
227   - var that=th;
228   - var json = {
229   - "actId": '', //活动Id
230   - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
231   - "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买
232   - "giftBagId": id, //礼包Id
233   - "storeId": that.data.getStorageID, //商家Id
234   - "userId": that.data.getUserID, //用户ID
235   - "buyFrom": 2,
236   - };
237   -
238   - if(that.data.first_leader){
239   - json.first_leader=that.data.first_leader
240   - }
241   - if(that.data.guide_id){
242   - json.guide_id=that.data.guide_id
243   - }
244   -
245   - if(th.data.sele_g.is_pickup && that.data.def_pick_store){
246   - json.pickup_id=that.data.def_pick_store.pickup_id;
247   - }
248   -
249   - //-- 分享导购要记录 --
250   - if (getApp().globalData.guide_id) {
251   - json.guide_id = getApp().globalData.guide_id;
252   - }
253   -
254   - var url ="/api/weshop/marketing/buy/receive/gift/record/insert";
255   - getApp().request.json_post(url, json,
256   - function (res) {
257   - if (res.data.code == 0 && res.data.data) {
258   -
259   - switch(that.data.buyType){
260   - case 1://立即兑换
261   - var order_sn = res.data.data;
262   -
263   - th.setData({submit:0})
264   - getApp().my_warnning("兑换成功!", 1, th);
265   - th.closeSpecModal();
266   - _that.go_detail(id,order_sn,th);
267   - break;
268   - case 2://立即购买
269   -
270   - var order_sn = res.data.data.orderSn;
271   - that.data.ok_order_sn=order_sn;
272   -
273   - var money=that.data.payMoney;
274   - var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;
275   - getApp().globalData.no_clear=1;
276   -
277   - t_pay.pay_data(res,function (){
278   - th.setData({submit:0})
279   - getApp().goto(url);
280   - },function (e){
281   - th.setData({submit:0})
282   - wx.showToast({
283   - title:e,
284   - icon:'none',
285   - duration:2500
286   - })
287   - })
288   -
289   - break;
290   - case 3://立即领取
291   -
292   - var order_sn = res.data.data;
293   - th.setData({submit:0})
294   - getApp().my_warnning("领取成功!", 1, th);
295   - th.closeSpecModal();
296   - _that.go_detail(id,order_sn,th);
297   - break;
298   - }
299   -
300   - } else {
301   - th.setData({submit:0})
302   - getApp().my_warnning(res.data.msg, 0, th);
303   - }
304   - },
305   - function (res) {
306   - th.setData({submit:0})
307   - }
308   - )
309   - },
310   -
311   - //-- 跳转到商品使用页面 --
312   - go_detail(id,orderSn,th){
313   - //不是详情页面,就不跳转了
314   - if(!th.data.is_detail) return false;
315   -
316   - var url='/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId='+id+'&orderSn='+orderSn;
317   - getApp().goto(url);
318   - },
319   -
320   - //------------处理门店---------------
321   - deal_pickup(e,th,os) {
322   -
323   - if (!th.data.sele_g) return false
324   - wx.hideLoading();
325   -
326   - //单总量超出10个的时候,同时门店有分类
327   - if (e.data.data.total > 10 && e.his_cate_num) {
328   - getApp().request.get("/api/weshop/storagecategory/page", {
329   - data: {
330   - store_id: os.stoid,
331   - pageSize: 1000,
332   - orderField: "sort",
333   - orderType: 'asc',
334   - },
335   - success: function (ee) {
336   - if (ee.data.code == 0) {
337   - var check_all_cate = 0;
338   - if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) {
339   - for (let i in ee.data.data.pageData) {
340   - let item = ee.data.data.pageData[i];
341   - if (item.is_show == 1) {
342   - check_all_cate = 1;
343   - break
344   - }
345   - }
346   - }
347   - if (check_all_cate) {
348   - var sto_cate = ee.data.data.pageData;
349   - var sto_arr = e.data.data.pageData;
350   - var newarr = new Array();
351   - var qita = new Array();
352   -
353   -
354   - var is_del_pk = 0;
355   - //----要进行门店分组--------
356   - for (var i = 0; i < sto_arr.length; i++) {
357   - //找一下这个门店有没有在分类数组内
358   - var find2 = 0, find2name = "", sort = 0;
359   - is_del_pk = 0;
360   - for (var m = 0; m < sto_cate.length; m++) {
361   - if (sto_arr[i].category_id == sto_cate[m].cat_id) {
362   - if (sto_cate[m].is_show != 1) {
363   - is_del_pk = 1;
364   - sto_arr.splice(i, 1);
365   - i--;
366   - } else {
367   - find2 = sto_cate[m].cat_id;
368   - find2name = sto_cate[m].cat_name;
369   - sort = sto_cate[m].sort;
370   - is_del_pk = 0;
371   - }
372   - break;
373   - }
374   - }
375   - if (is_del_pk) continue;
376   -
377   - if (newarr.length > 0) {
378   - var find = 0;
379   - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
380   - if (find2 != 0) {
381   - for (var ii = 0; ii < newarr.length; ii++) {
382   - if (sto_arr[i].category_id == newarr[ii].cat_id) {
383   - newarr[ii].s_arr.push(sto_arr[i]);
384   - find = 1;
385   - break;
386   - }
387   - }
388   - if (find == 0) {
389   - var arr0 = new Array();
390   - arr0.push(sto_arr[i]);
391   - var item = {
392   - cat_id: find2,
393   - name: find2name,
394   - sort: sort,
395   - s_arr: arr0
396   - };
397   - newarr.push(item);
398   - }
399   - } else {
400   - qita.push(sto_arr[i]);
401   - }
402   - } else {
403   - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
404   - if (find2 != 0) {
405   - var arr0 = new Array();
406   - arr0.push(sto_arr[i]);
407   - var item = {
408   - cat_id: find2,
409   - name: find2name,
410   - sort: sort,
411   - s_arr: arr0
412   - };
413   - newarr.push(item);
414   - } else {
415   - qita.push(sto_arr[i]);
416   - }
417   - }
418   - }
419   -
420   - var def_arr = new Array();
421   - //-- 开始就看10个门店 --
422   - for (var k = 0; k < 10; k++) {
423   - if (k == sto_arr.length) break;
424   - def_arr.push(sto_arr[k]);
425   - }
426   -
427   - th.setData({
428   - def_pickpu_list: def_arr,
429   - pickpu_list: ee.data.data.pageData
430   - });
431   -
432   -
433   - //门店分类要排序下
434   - function compare(property) {
435   - return function (a, b) {
436   - var value1 = a[property];
437   - var value2 = b[property];
438   - return value1 - value2;
439   - }
440   - }
441   -
442   - if (newarr.length > 0)
443   - newarr.sort(compare("sort"));
444   -
445   -
446   - //----安排其他的分类-----
447   - if (qita.length > 0) {
448   - var item = {
449   - cat_id: -1,
450   - name: "其他",
451   - s_arr: qita
452   - };
453   - newarr.push(item);
454   - }
455   -
456   - var sd = {
457   - all_sto: newarr,
458   - is_show_sto_cat: 1
459   - }
460   - if (!sto_arr || sto_arr.length <= 10) {
461   - sd.is_show_sto_cat = -1;
462   - sd.only_pk = sto_arr;
463   - }
464   - th.setData(sd);
465   -
466   - } else {
467   - th.setData({
468   - is_show_sto_cat: -1,
469   - only_pk: e.data.data.pageData
470   - });
471   - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
472   - if (!th.data.def_pick_store) {
473   - th.setData({
474   - def_pick_store: e.data.data.pageData[0],
475   - sto_sele_name: e.data.data.pageData[0].pickup_name,
476   - sto_sele_id: e.data.data.pageData[0].pickup_id,
477   - sto_sele_distr: e.data.data.pageData[0].distr_type
478   - })
479   - }
480   - }
481   - } else {
482   - th.setData({
483   - is_show_sto_cat: -1,
484   - only_pk: e.data.data.pageData
485   - });
486   - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
487   - if (!th.data.def_pick_store) {
488   - th.setData({
489   - def_pick_store: e.data.data.pageData[0],
490   - sto_sele_name: e.data.data.pageData[0].pickup_name,
491   - sto_sele_id: e.data.data.pageData[0].pickup_id,
492   - sto_sele_distr: e.data.data.pageData[0].distr_type
493   - })
494   - }
495   -
496   - }
497   - }
498   - });
499   - } else {
500   - th.setData({
501   - is_show_sto_cat: 0,
502   - only_pk: e.data.data.pageData
503   - });
504   - //-----如果没有默认门店,要取第一个门店作为默认店------
505   - if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
506   - th.setData({
507   - def_pick_store: e.data.data.pageData[0],
508   - sto_sele_name: e.data.data.pageData[0].pickup_name,
509   - sto_sele_id: e.data.data.pageData[0].pickup_id,
510   - sto_sele_distr: e.data.data.pageData[0].distr_type
511   - })
512   - }
513   - }
514   - },
515   -
516   - check_def_pk:function (th) {
517   - th.data.def_pick_store.is_no_dis=0;
518   - var def_pick_store=th.data.def_pick_store
519   - var sele_g=th.data.sele_g;
520   - var arr=sele_g.pickup_list.split(',');
521   -
522   - var idx=arr.findIndex(function (e) {
523   - return e==def_pick_store.pickup_id;
524   - })
525   -
526   - if(idx==-1){
527   - def_pick_store.is_no_dis=1;
528   - }
529   - th.setData({def_pick_store})
530   -
531   - }
532   -
533   -
534   -
535   -
536   -}
537 0 \ No newline at end of file
pages/giftpack/public/buy_com.wxml deleted
1   -<!-- 选择门店的弹框,1.1版最新的 -->
2   -<block wx:if="{{store}}">
3   - <view class="mongolia-layer" bindtap="close_popup"></view>
4   - <view class="popup-frame">
5   - <block wx:if="{{sort_store==0}}">
6   - <!-- 头部 标题 -->
7   - <view class="popup-top flex-space-between">
8   - <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text>
9   - <view>
10   - <view>
11   - <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
12   - </view>
13   - <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}">
14   - <text class="fs26 red-co" >{{choice_sort_store==0?'更多门店':'返回'}}</text> <view class="bg_rights" ></view>
15   - </view>
16   - </view>
17   - </view>
18   - <view class="searchbar flex-vertical-between storeListpadd">
19   - <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" />
20   - <view class="search flex-center" bindtap="searchfn">
21   - <view class="fs28">搜索</view>
22   - </view>
23   - </view>
24   - <!-- 门店列表,最外层的门店列表,一开始 -->
25   - <view class="store-list">
26   - <!-- 如果还没有点击更多门店的时候 -->
27   - <block wx:if="{{choice_sort_store==0}}">
28   - <!-- 需要for循环 -->
29   - <block wx:if="{{is_show_sto_cat==1}}">
30   - <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
31   - <view class="store flex-vertical">
32   - <!-- 需要点击事件 -->
33   - <block wx:if="{{index==fir_pick_index}}">
34   - <view class="circle white xc-hook fs20 red-b">Г</view>
35   - </block>
36   - <block wx:else>
37   - <view class="circle xc-hooks"></view>
38   - </block>
39   - <view class="address-frame xc-ash">
40   - <view class="flex-vertical-between butttem5">
41   - <view class="flex xc-ash">
42   - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
43   - </view>
44   - <view>
45   - <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
46   - 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}}
47   - </view>
48   - </view>
49   - </view>
50   - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
51   - </view>
52   - </view>
53   - </view>
54   - </block>
55   - <block wx:else>
56   - <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
57   - <view class="store flex-vertical">
58   - <!-- 需要点击事件 -->
59   - <block wx:if="{{index==fir_pick_index}}">
60   - <view class="circle white xc-hook fs20 red-b">Г</view>
61   - </block>
62   - <block wx:else>
63   - <view class="circle xc-hooks"></view>
64   - </block>
65   - <view class="address-frame xc-ash">
66   - <view class="flex-vertical-between ">
67   - <view class="flex xc-ash">
68   - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
69   - </view>
70   - <view>
71   - <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
72   - 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}}
73   - </view>
74   - </view>
75   - </view>
76   - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
77   - </view>
78   - </view>
79   - </view>
80   - </block>
81   - </block>
82   - <block wx:else>
83   - <!-- 如果是点击选择门店分类后显示分类下的门店 -->
84   - <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store">
85   - <view class="store flex-vertical">
86   - <!-- 需要点击事件 -->
87   - <block wx:if="{{index==sec_pick_index}}">
88   - <view class="circle white xc-hook fs20 red-b">Г</view>
89   - </block>
90   - <block wx:else>
91   - <view class="circle xc-hooks"></view>
92   - </block>
93   - <view class="address-frame xc-ash">
94   - <view class="flex-vertical-between ">
95   - <view class="flex xc-ash">
96   - <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view>
97   - </view>
98   - <view>
99   - <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
100   - 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}}
101   - </view>
102   - </view>
103   - </view>
104   - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
105   - </view>
106   - </view>
107   - </view>
108   - </block>
109   - </view>
110   - <!-- 门店列表底部 -->
111   - <view class="store-bottom-frame">
112   - <view class="store-bottom flex-vertical-between">
113   - <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">
114   - 确定
115   - </view>
116   - <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">
117   - 设为默认
118   - </view>
119   - </view>
120   - </view>
121   - </block>
122   - <block wx:else>
123   - <view class="popup-top flex-space-between">
124   - <text class="fs32 nearby_store">门店分类选择</text>
125   - <view>
126   - <view>
127   - <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
128   - </view>
129   - <view class="felx choose_mores" bindtap="returns">
130   - <text class="fs26 red-co">返回</text>
131   - </view>
132   - </view>
133   - </view>
134   - <view class="sort_store_list">
135   - <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}">
136   - <view class="sort-store flex-vertical-between">
137   - <view class="fs30" di>{{item.name}}</view>
138   - <view class="black_rights-frame">
139   - <view class="black_rights"></view>
140   - </view>
141   - </view>
142   - </view>
143   - </view>
144   - </block>
145   - </view>
146   -</block>
147   -
148   - <!-- --弹起来,选择规格数量,普通商品购买和秒杀---- -->
149   -<view hidden="{{!openSpecModal}}">
150   - <view bindtap="closeSpecModal" class="cover-layer"></view>
151   - <view class="spec-model">
152   - <view class="pding">
153   - <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon>
154   - <view class="spec-goods">
155   - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl+(sele_g.cover_img?sele_g.cover_img:sele_g.lbUrl)}}" binderror="pop_err_img" data-errorimg=""></image>
156   - <view class="spec-goods-info">
157   - <view class="spec-goods-name ellipsis-2">{{sele_g.giftTitle}}</view>
158   - <view class="flex ai_end xc-val-money" wx:if="{{buyType<4}}">
159   - <view class="spec-goods-price">
160   - <block wx:if="{{sele_g.payMoney>0}}">
161   - <text>{{"¥"+sele_g.payMoney}}</text>
162   - </block>
163   - <block wx:if="{{sele_g.payMoney>0&&sele_g.payIntegral>0}}">
164   - <text>/</text>
165   - </block>
166   - <block wx:if="{{sele_g.payIntegral>0}}">
167   - <view class="flex">
168   - <text class="ellipsis-1">{{sele_g.payIntegral}}</text>
169   - <view>积分</view>
170   - </view>
171   - </block>
172   -
173   - </view>
174   - </view>
175   -
176   -
177   - <view class="flex" wx:if="{{buyType<4}}">
178   - <view class="spec-goods-stock" >已售:{{sele_g.giftQty}}</view>
179   - <view class="spec-goods-stock">可售:{{sele_g.lbnum-sele_g.giftQty+(sele_g.virtualsales?sele_g.virtualsales:0)}}</view>
180   - </view>
181   - </view>
182   -
183   - <view style="clear:both;" ></view>
184   - <!-- 选择门店模块 -->
185   - <view class="flex-space-between address ai_end xc-width {{buyType>3?'mgt20':''}}">
186   - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
187   - <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text>
188   - <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}">
189   - 距离:{{def_pick_store.distance>1000?filter.toFix(def_pick_store.distance/1000,2)+"km":filter.toFix(def_pick_store.distance,0)+"m"}}
190   - </view>
191   - </view>
192   - <!-- 没有门店的时候 -->
193   - <view class="flex" bindtap="choice_store" wx:else>
194   - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
195   - <view class="fs30" style="color:black;">选择门店</view>
196   - </view>
197   - <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view>
198   - </view>
199   - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
200   - <block wx:else>
201   - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
202   - <block wx:else>
203   - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
204   - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">
205   - (库存不足)
206   - </view>
207   - </block>
208   - </block>
209   - <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}">
210   - 地址:{{def_pick_store.fulladdress}}
211   - </view>
212   - </view>
213   - <!-- 商品的属性项目 -->
214   -
215   -
216   - </view>
217   - <view class="spec-cart-btns">
218   - <!-- 根本就找不到门店 -->
219   - <block wx:if="{{!only_pk && !def_pickpu_list}}">
220   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
221   - 未找到门店
222   - </view>
223   - </block>
224   - <block wx:else>
225   - <block wx:if="{{only_pk && !only_pk.length}}">
226   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
227   - 未找到门店
228   - </view>
229   - </block>
230   - <block wx:else>
231   - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">
232   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
233   - 库存不足
234   - </view>
235   - </block>
236   - <block wx:else>
237   - <block wx:if="{{!def_pick_store}}">
238   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
239   - 请先选择门店
240   - </view>
241   - </block>
242   - <block wx:else>
243   - <block wx:if="{{sele_g.store_count<=0}}">
244   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
245   - 库存不足
246   - </view>
247   - </block>
248   - <block wx:else>
249   - <button bindtap="buy_libao" disabled="{{submit}}" style="display: block" class="spec-cart-btn {{buyType==2?'yellow':'red-b'}} fs32" data-action="add">
250   - <text wx:if="{{buyType==1}}">立即兑换</text>
251   - <text wx:if="{{buyType==2}}">立即购买</text>
252   - <text wx:if="{{buyType==3}}">立即领取</text>
253   - <text wx:if="{{buyType==4}}">确认选择</text>
254   - </button>
255   - </block>
256   -
257   - </block>
258   - </block>
259   - </block>
260   - </block>
261   -
262   - </view>
263   - <view class="clear"></view>
264   -
265   - </view>
266   -</view>
267 0 \ No newline at end of file
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -9137,7 +9137,7 @@ Page({
9137 9137 let url = '';
9138 9138 if (flag == 2) { // flag =1 控制跳转到专享礼包
9139 9139 url = `/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id=${id}&is_act=1`;
9140   - // url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
  9140 +
9141 9141 } else if (flag == 1) { // flag =1 控制跳转到专享礼包
9142 9142 url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
9143 9143 } else {
... ...
pages/index/index/index.js
... ... @@ -1384,7 +1384,7 @@ Page({
1384 1384 if (res.data.code == 0) {
1385 1385 var actid = res.data.data.id; //活动id
1386 1386 var giftBagId = res.data.data.giftBagId; //礼包id
1387   - var new_nav = "/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId;
  1387 + var new_nav = "/packageF/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId;
1388 1388 var new_image = res.data.data.imageurl;
1389 1389 var swiperimage = th.data.swiperimage;
1390 1390 var img = {
... ...
pages/user/index/index.js
... ... @@ -1018,7 +1018,7 @@ Page({
1018 1018  
1019 1019 if (actId != "" && giftbagid != "") {
1020 1020  
1021   - getApp().goto("/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3);
  1021 + getApp().goto("/packageF/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3);
1022 1022 } else {
1023 1023  
1024 1024 getApp().showWarning("请稍后重试");
... ...