Commit 00672529b35775aebb893acfed7856ff977dd0f4

Authored by season
2 parents 5f96b386 d062d1ac

Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp

Showing 82 changed files with 8232 additions and 7943 deletions
... ... @@ -1635,7 +1635,7 @@ App({
1635 1635 if (res.data.code == 0) {
1636 1636 var actid = res.data.data.id; //活动id
1637 1637 var giftBagId = res.data.data.giftBagId; //礼包id
1638   - var new_nav = "/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId;
  1638 + var new_nav = "/packageF/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId;
1639 1639 wx.redirectTo({
1640 1640 url:new_nav
1641 1641 })
... ...
app.json
... ... @@ -16,19 +16,21 @@
16 16 "pages/user/userqy/userqy",
17 17 "pages/user/plus/plus",
18 18 "pages/user/my_service/i_service",
  19 +
19 20 "pages/giftpack/birthdaygift/birthdaygift",
20 21 "pages/giftpack/evaluategift/evaluategift",
21 22 "pages/giftpack/newvipgift/newvipgift",
22   - "pages/giftpack/payment/payment",
23 23 "pages/giftpack/buygiftpack/giftpackbuy",
24 24 "pages/giftpack/giftpacklist/giftpacklist",
25 25 "pages/giftpack/mygiftpack/mygiftpack",
  26 + "pages/giftpack/festival/festival",
  27 +
26 28 "pages/user/assistance/giftpacklist",
27 29 "pages/user/assistance/task_assistance",
28 30 "pages/user/assistance/friend_assistance",
29 31 "pages/user/assistance/assistance_success",
30 32 "pages/user/assistance/assistance",
31   - "pages/giftpack/festival/festival",
  33 +
32 34 "pages/distribution/distribution",
33 35 "pages/template/index"
34 36 ],
... ... @@ -213,7 +215,17 @@
213 215 "pages/user/return_goods_list/return_goods_list",
214 216 "pages/user/return_goods/return_goods",
215 217 "pages/user/address_list/address_list",
216   - "pages/user/add_address/add_address"
  218 + "pages/user/add_address/add_address",
  219 +
  220 + "pages/giftpack/birthdaygift/birthdaygift",
  221 + "pages/giftpack/evaluategift/evaluategift",
  222 + "pages/giftpack/newvipgift/newvipgift",
  223 + "pages/giftpack/payment/payment",
  224 + "pages/giftpack/buygiftpack/giftpackbuy",
  225 + "pages/giftpack/giftpacklist/giftpacklist",
  226 + "pages/giftpack/mygiftpack/mygiftpack",
  227 + "pages/giftpack/festival/festival"
  228 +
217 229 ]
218 230  
219 231 },
... ...
code_obfuscation_config.json 0 → 100644
  1 +{
  2 + "desc": "关于本文件的更多信息,请参考文档 代码加固开发者文档: https://developers.weixin.qq.com/miniprogram/dev/devtools/code_obfuscation.html",
  3 + "switch": true,
  4 + "configs": [
  5 + {
  6 + "path": "app.js",
  7 + "sub_switch": true
  8 + },
  9 + {
  10 + "path": "utils/pay.js",
  11 + "sub_switch": true
  12 + },
  13 + {
  14 + "path": "utils/pay2.js",
  15 + "sub_switch": true
  16 + },
  17 + {
  18 + "path": "utils/request.js",
  19 + "sub_switch": true
  20 + },
  21 + {
  22 + "path": "utils/util.js",
  23 + "sub_switch": true
  24 + },
  25 + {
  26 + "path": "utils/auth.js",
  27 + "sub_switch": true
  28 + }
  29 + ]
  30 +}
0 31 \ No newline at end of file
... ...
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({
... ...
packageF/pages/giftpack/birthdaygift/birthdaygift.js 0 → 100644
  1 +var i = require("../../../../utils/util.js")
  2 +const com = require("../../../../pages/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 +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 + if(options.transfer){
  172 + let obj=getApp().globalData.ts_trans_data;
  173 + options= JSON.parse(JSON.stringify(obj));
  174 + getApp().globalData.ts_trans_data=null;
  175 + }
  176 +
  177 + var th = this;
  178 + th.setData({
  179 + getActId: options.actId,
  180 + giftID: options.giftBagId,
  181 + buyType:4
  182 + })
  183 +
  184 + getApp().getConfig2(function (e) {
  185 + var json_d = JSON.parse(e.switch_list);
  186 + th.setData({
  187 + bconfig: e,
  188 + sys_switch: json_d,
  189 + is_retail_price: json_d.is_retail_price || 0
  190 + });
  191 + })
  192 +
  193 + },
  194 + onShow: function onShow() {
  195 + //--先判断会员状态--
  196 + var user_info = getApp().globalData.userInfo;
  197 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  198 + getApp().goto('/packageE/pages/togoin/togoin');
  199 + return false;
  200 + }
  201 + this.is_birthdayInfo(this.GetList);
  202 +
  203 + },
  204 +
  205 + //-- 领取礼包的优化 --
  206 + GetReceive:function (){
  207 + var th=this;
  208 + if(this.data.is_nd_pk){
  209 + th.setData({ openSpecModal: 1 })
  210 + th.pp_bacK_func=th.GetReceive_next; //设置回调函数
  211 + }else{
  212 + th.GetReceive_next();
  213 + }
  214 + },
  215 +
  216 + GetReceive_next: function() {
  217 + var th = this;
  218 + if (th.data.receiveState) {
  219 + return false;
  220 + }
  221 + var is_sub = th.data.is_sub; //判断是否重复提交
  222 + if (is_sub == 0) {
  223 + th.setData({
  224 + is_sub: 1
  225 + })
  226 + var json = {
  227 + "actId": th.data.getActId, //活动Id
  228 + "actType": 4, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  229 + "giftBagId": th.data.giftID, //礼包Id
  230 + "storeId": a.stoid, //商家Id
  231 + "userId": d.user_id, //用户ID
  232 + "buyFrom": 2
  233 + };
  234 +
  235 + //-- 如果需要门店的时候 --
  236 + if( th.data.is_nd_pk==1){
  237 + json.pickup_id=th.data.def_pick_store.pickup_id;
  238 + }
  239 +
  240 + var data = JSON.stringify(json);
  241 + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
  242 + getApp().request.json_post(url, json,
  243 + function(res) {
  244 + th.setData({
  245 + is_sub: 0
  246 + })
  247 + if (res.data.code == 0) {
  248 + th.setData({
  249 + receiveState: 1
  250 + })
  251 + getApp().my_warnning("领取成功", 1, th);
  252 + } else {
  253 + getApp().my_warnning(res.data.msg, 0, th);
  254 + }
  255 + },
  256 + function(res) {
  257 +
  258 + }
  259 +
  260 + )
  261 +
  262 + }
  263 + },
  264 + //获取生日有礼信息
  265 + is_birthdayInfo: function(func) {
  266 + var th = this;
  267 + var url = `/api/weshop/marketing/get/${a.stoid}/${th.data.getActId}`;
  268 + console.log(th.data.getActId);
  269 + getApp().request.promiseGet(url, {
  270 +
  271 + }).then(res => {
  272 + console.log(res,20000);
  273 + if (res.data.code == 0) {
  274 +
  275 + var sele_g=res.data.data;
  276 +
  277 + sele_g.giftTitle=sele_g.actName;
  278 + sele_g.lbUrl=sele_g.actImg;
  279 +
  280 +
  281 + let birthdayStyle=`
  282 + --bg-color:${res.data.data.actBgColor};
  283 + --color:${res.data.data.actFontColor};
  284 + `
  285 +
  286 +
  287 + if(res.data.data.is_pickup){
  288 + th.data.pickup_list=res.data.data.pickup_list;
  289 + sele_g.pickup_list=res.data.data.pickup_list;
  290 + sele_g.is_pickup=1;
  291 + }
  292 +
  293 + th.setData({
  294 + bimg: res.data.data.actBoundImg,
  295 + birthdayStyle,
  296 + sele_g
  297 + // actFontColor: res.data.actFontColor, //字体颜色
  298 + // actBgColor: res.data.actBgColor, //背景颜色
  299 + })
  300 +
  301 + func();
  302 +
  303 + }
  304 + })
  305 + },
  306 + //界面跳转
  307 + goto: function(e) {
  308 + var url = e.currentTarget.dataset.url;
  309 + getApp().goto(url);
  310 + },
  311 + //图片失败,默认图片
  312 + bind_bnerr1: function(e) {
  313 + var th = this;
  314 + var _errImg = e.target.dataset.errorimg;
  315 + var _Img = e.target.dataset.img;
  316 + if (_Img != undefined) {
  317 + var _errObj = {};
  318 + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
  319 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  320 + }
  321 + },
  322 +
  323 + buy_libao: function () {
  324 + com.buy_libao(this)
  325 + },
  326 +
  327 +
  328 + //-- 选择门店 --
  329 + choice_store: function (ee) {
  330 + this.setData({
  331 + keyword:''
  332 + })
  333 +
  334 + //--先判断会员状态--
  335 + var user_info = getApp().globalData.userInfo;
  336 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  337 + wx.navigateTo({
  338 + url: '/packageE/pages/togoin/togoin',
  339 + })
  340 + return false;
  341 + }
  342 +
  343 + var th = this;
  344 + var ind = ee.currentTarget.dataset.ind;
  345 + var bconfig = th.data.bconfig;
  346 +
  347 + //如果开启了,则不在选择门店
  348 + // if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  349 + // return false;
  350 + // }
  351 + // if (!th.data.only_pk && !th.data.def_pickpu_list) {
  352 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  353 + // return false;
  354 + // }
  355 +
  356 + if (th.data.only_pk && !th.data.only_pk.length) {
  357 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  358 + return false;
  359 + }
  360 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  361 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  362 + return false;
  363 + }
  364 +
  365 +
  366 + if (bconfig && bconfig.is_sort_storage) {
  367 + wx.getLocation({
  368 + type: 'gcj02',
  369 + success: function (res) {
  370 +
  371 + th.data.lat = res.latitude;
  372 + th.data.lon = res.longitude;
  373 + th.data.is_get_local_ok = 1;
  374 + th.setData({
  375 + is_gps: 1
  376 + });
  377 + //th.onShow();
  378 + com.get_sto(th, os);
  379 + },
  380 + fail: function (res) {
  381 + //th.onShow();
  382 + th.data.is_get_local_ok = 1;
  383 + com.get_sto(th, os);
  384 + if (res.errCode == 2) {
  385 + th.setData({
  386 + is_gps: 0
  387 + });
  388 + if (th.data.is_gps == 0) {
  389 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  390 + }
  391 + } else {
  392 + th.setData({
  393 + is_gps: "3"
  394 + });
  395 + }
  396 +
  397 + }
  398 + })
  399 + } else {
  400 + th.data.is_get_local_ok = 1;
  401 + com.get_sto(th, os);
  402 + }
  403 +
  404 + if (ind != undefined && ind != null) {
  405 + this.setData({
  406 + open_ind_store: ind,
  407 + store: 1,
  408 + openSpecModal: !1,
  409 + openSpecModal_pt: !1,
  410 + openSpecModal_flash_normal: !1,
  411 + })
  412 + } else {
  413 + this.setData({
  414 + store: 1,
  415 + openSpecModal: !1,
  416 + openSpecModal_pt: !1,
  417 + openSpecModal_flash_normal: !1
  418 +
  419 + })
  420 + }
  421 + },
  422 + //关闭选择门店
  423 + close_popup: function (e) {
  424 + var th = this;
  425 + this.setData({
  426 + store: 0,
  427 + choice_sort_store: 0,
  428 + sort_store: 0,
  429 + fir_pick_index: 0,
  430 + sec_pick_index: 0
  431 + })
  432 +
  433 + var openindstore = this.data.open_ind_store;
  434 + if (openindstore == 1) {
  435 + th.setData({
  436 + openSpecModal: !0,
  437 + openSpecModal_ind: openindstore,
  438 + });
  439 + } else if (openindstore == 2) {
  440 + th.setData({
  441 + openSpecModal: !0,
  442 + openSpecModal_ind: openindstore,
  443 + });
  444 + } else if (openindstore == 4) { //4就是拼团
  445 + th.setData({
  446 + openSpecModal_pt: 1, //打开拼团购买界面
  447 + store: 0, //关闭门店
  448 + choice_sort_store: 0, //关闭门店2级
  449 + sort_store: 0, //关闭门店2级
  450 + });
  451 + } else {
  452 + th.setData({
  453 + store: 0,
  454 + choice_sort_store: 0,
  455 + sort_store: 0
  456 + })
  457 + }
  458 +
  459 +
  460 + },
  461 + //选择更多门店
  462 + more_store: function () {
  463 + this.setData({
  464 + sort_store: 1
  465 + });
  466 + },
  467 + // 返回按钮
  468 + returns: function () {
  469 + this.setData({
  470 + sort_store: 0,
  471 + choice_sort_store: 0
  472 + });
  473 + },
  474 + //---选择分类门店---
  475 + choice_sort_store: function (e) {
  476 + var index = e.currentTarget.dataset.index;
  477 + var region_name = e.currentTarget.dataset.region;
  478 + var item = this.data.all_sto[index];
  479 + this.setData({
  480 + region_name: region_name,
  481 + sort_store: 0,
  482 + choice_sort_store: 1,
  483 + sec_i:index,
  484 + sec_sto: item,
  485 + sec_pick_index: 0
  486 + });
  487 + },
  488 + choose_for_store_fir: function (e) {
  489 + var index_c = e.currentTarget.dataset.ind;
  490 + var th = this;
  491 + th.setData({
  492 + fir_pick_index: index_c
  493 + })
  494 +
  495 + },
  496 + //确定def_pick为选择的门店
  497 + sure_pick: function (e) {
  498 + var th = this;
  499 + var item = null;
  500 + var openindstore = th.data.open_ind_store;
  501 +
  502 + if (th.data.choice_sort_store == 0) {
  503 + var index = th.data.fir_pick_index;
  504 + if (th.data.is_show_sto_cat == 1) {
  505 + item = th.data.def_pickpu_list[index];
  506 + } else {
  507 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  508 + }
  509 +
  510 + } else {
  511 + var index = th.data.sec_pick_index;
  512 + item = th.data.sec_sto.s_arr[index];
  513 + }
  514 +
  515 + if(!item) return false;
  516 +
  517 + if (!th.data.sele_g) return false;
  518 +
  519 + th.setData({
  520 + def_pick_store: item,
  521 + sto_sele_name: item.pickup_name,
  522 + sto_sele_id: item.pickup_id,
  523 + sto_sele_distr: item.distr_type,
  524 + store: 0,
  525 + choice_sort_store: 0,
  526 + fir_pick_index: 0,
  527 + openSpecModal: !0,
  528 + });
  529 +
  530 +
  531 + },
  532 + //---点击二级之后的选择---
  533 + choose_for_store: function (e) {
  534 + var index_c = e.currentTarget.dataset.ind;
  535 + var th = this;
  536 + th.setData({
  537 + sec_pick_index: index_c,
  538 + fir_pick_index: index_c
  539 + })
  540 +
  541 + },
  542 + //把选择的门店设置成默认的门店def_pick
  543 + set_def_pick: function (e) {
  544 + var th = this;
  545 + var item = null;
  546 + if (th.data.choice_sort_store == 0) {
  547 + var index = th.data.fir_pick_index;
  548 + if (th.data.is_show_sto_cat == 1) {
  549 + item = th.data.def_pickpu_list[index];
  550 + } else {
  551 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  552 + }
  553 + } else {
  554 + var index = th.data.sec_pick_index;
  555 + item = th.data.sec_sto.s_arr[index];
  556 + }
  557 +
  558 + if(!item) return false;
  559 +
  560 + th.setData({
  561 + def_pick_store: item,
  562 + sto_sele_name: item.pickup_name,
  563 + sto_sele_id: item.pickup_id,
  564 + sto_sele_distr: item.distr_type,
  565 + store: 0,
  566 + choice_sort_store: 0,
  567 + openSpecModal: !0,
  568 + });
  569 +
  570 + var user_id = getApp().globalData.user_id;
  571 + var def_pickup_id = item.pickup_id;
  572 + getApp().request.put('/api/weshop/users/update', {
  573 + data: {
  574 + user_id: user_id,
  575 + def_pickup_id: def_pickup_id
  576 + },
  577 + success: function (res) {
  578 + if (res.data.code == 0) {
  579 + if (th.data.choice_sort_store == 0) th.setData({
  580 + fir_pick_index: 0
  581 + });
  582 + getApp().globalData.pk_store = item;
  583 + } else {
  584 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  585 + }
  586 +
  587 + }
  588 + });
  589 +
  590 +
  591 + },
  592 + closeSpecModal: function () {
  593 + this.setData({openSpecModal: 0});
  594 + },
  595 +
  596 + //获取搜索门店输入的值
  597 + input_store: function(e) {
  598 + this.setData({
  599 + keyword: e.detail.value
  600 + })
  601 + },
  602 + //-- 搜索门店 --
  603 + searchfn(){
  604 + let choice_sort_store = this.data.choice_sort_store
  605 + if (choice_sort_store==0) { //全局搜索
  606 + let all_pick_list = this.data.all_pick_list
  607 + let def_pickpu_list = this.data.def_pickpu_list
  608 + let keyword = this.data.keyword
  609 + if (keyword) {
  610 + let arr=all_pick_list.filter( item =>{
  611 + let i = item.pickup_name.indexOf(keyword)
  612 + if (i > -1) {
  613 + return true
  614 + }else{
  615 + return false
  616 + }
  617 + })
  618 + if (arr && arr.length>0) {
  619 + if(this.data.is_show_sto_cat==1){
  620 + this.setData({
  621 + def_pickpu_list:arr
  622 + })
  623 + }else{
  624 + this.setData({
  625 + only_pk:arr
  626 + })
  627 + }
  628 + }else{
  629 + wx.showToast({
  630 + title: '没有搜索到门店',
  631 + icon: 'none',
  632 + duration: 2000
  633 + })
  634 + }
  635 + }else{
  636 + if (this.data.is_show_sto_cat==1) {
  637 + this.setData({
  638 + def_pickpu_list:all_pick_list.slice(0,10)
  639 + })
  640 + }else{
  641 + this.setData({
  642 + only_pk:all_pick_list
  643 + })
  644 + }
  645 +
  646 + }
  647 + }else{ //分类下搜索
  648 + let sec_i=this.data.sec_i
  649 + let all_sto = this.data.all_sto
  650 + let old_all_sto = this.data.old_all_sto
  651 + if (!old_all_sto) {
  652 + this.setData({
  653 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  654 + })
  655 + }
  656 + let sec_sto= this.data.sec_sto
  657 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  658 + let keyword = this.data.keyword
  659 + let text='sec_sto.s_arr'
  660 + if (keyword) {
  661 + let arr=sec_arr.filter( item =>{
  662 + let i = item.pickup_name.indexOf(keyword)
  663 + if (i > -1) {
  664 + return true
  665 + }else{
  666 + return false
  667 + }
  668 + })
  669 + if (arr && arr.length>0) {
  670 + this.setData({
  671 + [text]:arr
  672 + })
  673 + }else{
  674 + wx.showToast({
  675 + title: '没有搜索到门店',
  676 + icon: 'none',
  677 + duration: 2000
  678 + })
  679 + }
  680 + }else{
  681 + if(this.data.old_all_sto){
  682 + this.setData({
  683 + [text]: this.data.old_all_sto[sec_i].s_arr
  684 + })
  685 + }else{
  686 + this.setData({
  687 + [text]: all_sto[sec_i].s_arr
  688 + })
  689 + }
  690 +
  691 + }
  692 +
  693 +
  694 + }
  695 + },
  696 +
  697 + check_guide(func){
  698 + var first_leader=this.data.first_leader;
  699 + if(!first_leader){
  700 + func();
  701 + return false;
  702 + }
  703 + if(this.data.is_geted_guide_pick){
  704 + func();
  705 + return false;
  706 + }
  707 + if(getApp().globalData.guide_pick_id){
  708 + func();
  709 + return false;
  710 + }
  711 + var th=this;
  712 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  713 + if (res.data.code == 0) {
  714 + getApp().globalData.guide_pick_id= res.data.data.pickup_id;
  715 + }
  716 + th.data.is_geted_guide_pick=1;
  717 + func();
  718 + })
  719 + },
  720 +
  721 +
  722 +});
0 723 \ No newline at end of file
... ...
packageF/pages/giftpack/birthdaygift/birthdaygift.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "生日礼包",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageF/pages/giftpack/birthdaygift/birthdaygift.wxml 0 → 100644
  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>
  180 +</view>
  181 +<!-- 引入提示组件 -->
  182 +<warn id="warn"></warn>
  183 +<my_confirm id="my_confirm"></my_confirm>
  184 +<include src="../../../../pages/giftpack/public/buy_com.wxml"></include>
0 185 \ No newline at end of file
... ...
packageF/pages/giftpack/birthdaygift/birthdaygift.wxss 0 → 100644
  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;
  718 +}
0 719 \ No newline at end of file
... ...
packageF/pages/giftpack/buygiftpack/giftpackbuy.js 0 → 100644
  1 +var i = require("../../../../utils/util.js");
  2 +var ut=i;
  3 +var com = require("../../../../pages/giftpack/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 +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 + if(options.transfer){
  79 + let obj=getApp().globalData.ts_trans_data;
  80 + options= JSON.parse(JSON.stringify(obj));
  81 + getApp().globalData.ts_trans_data=null;
  82 + }
  83 +
  84 + var th=this;
  85 +
  86 + //定义第一次进入
  87 + this.data.fir_in=1;
  88 +
  89 + this.setData({
  90 + params: options,
  91 + now:Date.parse(new Date()) / 1000,
  92 + })
  93 +
  94 + getApp().getConfig2(function (e) {
  95 + var json_d = JSON.parse(e.switch_list);
  96 + th.setData({
  97 + bconfig: e,
  98 + sys_switch:json_d
  99 + });
  100 + })
  101 +
  102 + },
  103 + init() {
  104 + var th = this;
  105 + let options = this.data?.params;
  106 + this.setData({
  107 + getStorageID: a.stoid,
  108 + getUserID: d.user_id
  109 + });
  110 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  111 + my_confirm.open_cancel(0);
  112 + //-- 获取分享人的ID --
  113 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  114 + if (first_leader) {
  115 +
  116 + this.data.is_get_guide=1;
  117 + this.setData({
  118 + first_leader,
  119 + })
  120 + //-- user_id代过来免登录 --
  121 + getApp().globalData.first_leader = first_leader;
  122 + //调用接口判断是不是会员
  123 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  124 + if (res.data.code == 0) {
  125 + getApp().globalData.guide_id = res.data.data.id;
  126 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  127 + }
  128 +
  129 + com.wait_for_store_config(th);
  130 + com.set_user_mo_store(th,os);
  131 +
  132 + })
  133 + }
  134 +
  135 + getApp().request.promiseGet("/api/weshop/ad/page?pid=902&store_id=" + os.stoid, {
  136 + data: {
  137 + enabled: 1
  138 + }
  139 + }).then(res => {
  140 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  141 + var a = res.data.data.pageData;
  142 + var tt = {
  143 + 'ad_code': os.imghost + a[0].ad_code,
  144 + 'media_link': '',
  145 + 'ad_weapplink': a[0].ad_weapplink,
  146 + 'bgcolor': a[0].bgcolor,
  147 + };
  148 + th.setData({
  149 + ad_data: tt
  150 + });
  151 + }
  152 + })
  153 + this.getList();
  154 + },
  155 + onShow: function () {
  156 +
  157 + this.setData({submit:0})
  158 + var th=this;
  159 +
  160 + //判断是不是第一次进入
  161 + if(this.data.fir_in){
  162 + this.data.fir_in=0;
  163 + }else{
  164 + //富友支付插件
  165 + i.fy_back('',0);
  166 + com.set_py_fir();
  167 +
  168 +
  169 + if(th.data.ok_order_sn){
  170 + //-- 通联的第三方支付的返回优化 --
  171 + var money=th.data.payMoney;
  172 + var back_url = "/packageF/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn;
  173 +
  174 + ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){
  175 + if(!th.data.ok_order_sn) return false;
  176 + getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
  177 + {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
  178 +
  179 + th.data.ok_order_sn=null;
  180 +
  181 + if(res.data.code==0 && res.data.data){
  182 + var item=res.data.data;
  183 + if(item.payState==1){
  184 + //支付支付,返回首页
  185 + ut.m_toast('支付成功');
  186 + setTimeout(()=>{
  187 + getApp().goto(back_url);
  188 + },1000)
  189 +
  190 + }else{
  191 + //支付支付,返回首页
  192 + ut.m_toast('支付失败');
  193 + }
  194 + }
  195 + })
  196 + },null,null,1);
  197 +
  198 + th.data.ok_order_sn=null;
  199 + }
  200 +
  201 +
  202 +
  203 +
  204 + }
  205 +
  206 +
  207 +
  208 + getApp().check_can_share();
  209 +
  210 + //--先判断会员状态--
  211 + getApp().is_Single_page(this, function () {
  212 + var user_info = getApp().globalData.userInfo;
  213 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  214 + getApp().goto('/packageE/pages/togoin/togoin');
  215 + return false;
  216 + }
  217 +
  218 + if(!th.data.is_get_guide) {
  219 + com.wait_for_store_config(th);
  220 + com.set_user_mo_store(th, os);
  221 + }
  222 + th.data.is_get_guide=0;
  223 +
  224 + })
  225 + this.init();
  226 +
  227 + setTimeout(()=>{
  228 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  229 + },2000)
  230 +
  231 + },
  232 + //获取搜索门店输入的值
  233 + input_store: function(e) {
  234 + this.setData({
  235 + keyword: e.detail.value
  236 + })
  237 + },
  238 + //搜索门店
  239 + searchfn(){
  240 + let choice_sort_store = this.data.choice_sort_store
  241 + if (choice_sort_store==0) { //全局搜索
  242 + let all_pick_list = this.data.all_pick_list
  243 + let def_pickpu_list = this.data.def_pickpu_list
  244 + let keyword = this.data.keyword
  245 + if (keyword) {
  246 + let arr=all_pick_list.filter( item =>{
  247 + let i = item.pickup_name.indexOf(keyword)
  248 + if (i > -1) {
  249 + return true
  250 + }else{
  251 + return false
  252 + }
  253 + })
  254 + if (arr && arr.length>0) {
  255 + if(this.data.is_show_sto_cat==1){
  256 + this.setData({
  257 + def_pickpu_list:arr
  258 + })
  259 + }else{
  260 + this.setData({
  261 + only_pk:arr
  262 + })
  263 + }
  264 + }else{
  265 + wx.showToast({
  266 + title: '没有搜索到门店',
  267 + icon: 'none',
  268 + duration: 2000
  269 + })
  270 + }
  271 + }else{
  272 + if (this.data.is_show_sto_cat==1) {
  273 + this.setData({
  274 + def_pickpu_list:all_pick_list.slice(0,10)
  275 + })
  276 + }else{
  277 + this.setData({
  278 + only_pk:all_pick_list
  279 + })
  280 + }
  281 +
  282 + }
  283 + }else{ //分类下搜索
  284 + let sec_i=this.data.sec_i
  285 + let all_sto = this.data.all_sto
  286 + let old_all_sto = this.data.old_all_sto
  287 + if (!old_all_sto) {
  288 + this.setData({
  289 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  290 + })
  291 + }
  292 + let sec_sto= this.data.sec_sto
  293 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  294 + let keyword = this.data.keyword
  295 + let text='sec_sto.s_arr'
  296 + if (keyword) {
  297 + let arr=sec_arr.filter( item =>{
  298 + let i = item.pickup_name.indexOf(keyword)
  299 + if (i > -1) {
  300 + return true
  301 + }else{
  302 + return false
  303 + }
  304 + })
  305 + if (arr && arr.length>0) {
  306 + this.setData({
  307 + [text]:arr
  308 + })
  309 + }else{
  310 + wx.showToast({
  311 + title: '没有搜索到门店',
  312 + icon: 'none',
  313 + duration: 2000
  314 + })
  315 + }
  316 + }else{
  317 + if(this.data.old_all_sto){
  318 + this.setData({
  319 + [text]: this.data.old_all_sto[sec_i].s_arr
  320 + })
  321 + }else{
  322 + this.setData({
  323 + [text]: all_sto[sec_i].s_arr
  324 + })
  325 + }
  326 +
  327 + }
  328 +
  329 +
  330 + }
  331 + },
  332 + //购买礼包
  333 + GetBuyPrice: function (e) {
  334 +
  335 + var th = this;
  336 + var index = e.currentTarget.dataset.index; //活动id
  337 + var sele_g=th.data.wareCard[index];
  338 + this.data.payMoney=sele_g.payMoney;
  339 +
  340 + th.setData({sele_g:sele_g,buyType:2,})
  341 + if(sele_g.is_pickup){
  342 + if(sele_g.pickup_list && th.data.def_pick_store){
  343 + com.check_def_pk(th);
  344 + }
  345 + com.get_sto(th,os)
  346 + th.setData({
  347 + openSpecModal:1
  348 + })
  349 + }else{
  350 +
  351 + if(this.data.submit) return false;
  352 +
  353 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  354 + my_confirm.open(
  355 + "是否确定购买该礼包",
  356 + "取消",
  357 + "确定",
  358 + function () {
  359 + my_confirm.open_cancel(0);
  360 + },
  361 + function () {
  362 + my_confirm.open_cancel(0);
  363 + com.buy_libao(th)
  364 + }
  365 +
  366 + )
  367 + }
  368 +
  369 +
  370 +
  371 +
  372 +
  373 + },
  374 + // 积分兑换
  375 + GetBuyIntegral: function (e) {
  376 + var th = this;
  377 + var index = e.currentTarget.dataset.index; //活动id
  378 + var sele_g=th.data.wareCard[index];
  379 + th.setData({sele_g:sele_g, buyType:1,})
  380 + if(sele_g.is_pickup){
  381 + if(sele_g.pickup_list && th.data.def_pick_store){
  382 + com.check_def_pk(th);
  383 + }
  384 + com.get_sto(th,os)
  385 + th.setData({
  386 + openSpecModal:1
  387 + })
  388 + }else {
  389 +
  390 + if(this.data.submit) return false;
  391 +
  392 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  393 + my_confirm.open(
  394 + "是否确定兑换该礼包",
  395 + "取消",
  396 + "确定",
  397 + function () {
  398 + my_confirm.open_cancel(0);
  399 + },
  400 + function () {
  401 + my_confirm.open_cancel(0);
  402 + com.buy_libao(th)
  403 + })
  404 + }
  405 +
  406 + },
  407 + //免费领取
  408 + GetFree: function (e) {
  409 +
  410 + var th = this;
  411 + var index = e.currentTarget.dataset.index; //活动id
  412 + var sele_g=th.data.wareCard[index];
  413 + th.setData({sele_g:sele_g, buyType:3,})
  414 +
  415 + if(sele_g.is_pickup){
  416 + if(sele_g.pickup_list && th.data.def_pick_store){
  417 + com.check_def_pk(th);
  418 + }
  419 + com.get_sto(th,os)
  420 + th.setData({
  421 + openSpecModal:1
  422 + })
  423 + }else {
  424 + if(this.data.submit) return false;
  425 +
  426 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  427 + my_confirm.open(
  428 + "是否确定领取该礼包",
  429 + "取消",
  430 + "确定",
  431 + function () {
  432 + my_confirm.open_cancel(0);
  433 + },
  434 + function () {
  435 + my_confirm.open_cancel(0);
  436 + com.buy_libao(th)
  437 + })
  438 + }
  439 + },
  440 +
  441 + getList: function (e) {
  442 +
  443 + if(this.data.ismore) return false;
  444 + if(this.data.searching) return false;
  445 + this.data.searching=1;
  446 +
  447 + wx.showLoading({
  448 + title: '加载中.',
  449 + })
  450 +
  451 + var th = this;
  452 + let r_q={
  453 + storeId: th.data.getStorageID, //商家ID
  454 + userId: th.data.getUserID, //用户ID
  455 + page: th.data.curpage,
  456 + pageSize: th.data.pageSize,
  457 + is_share:0
  458 + };
  459 +
  460 + if(this.data.sear_key){
  461 + r_q.key_str=this.data.sear_key;
  462 + }
  463 +
  464 + getApp().request.get('/api/weshop/marketing/giftbag/page', {
  465 + isShowLoading: true,
  466 + data: r_q,
  467 + success: function (res) {
  468 +
  469 + th.data.searching=0;
  470 +
  471 + if (res.data.code == 0) {
  472 + th.data.curpage++;
  473 + var arr1 = th.data.wareCard;
  474 + var arr2 = res.data.data.pageData;
  475 + for (let j = 0; j < arr2.length; j++) {
  476 + arr2[j].starTime1=Date.parse(new Date(arr2[j].starTime.replace(/-/g, "/")))/1000
  477 + }
  478 +
  479 + var arr3 = [...arr1, ...arr2];
  480 + var ismore = 0;
  481 + if (arr3.length == res.data.data.total) ismore = 1
  482 + th.setData({
  483 + wareCard: arr3,
  484 + total: res.data.data.total,
  485 + ismore: ismore,
  486 + is_read: 1,
  487 + is_get:1
  488 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  489 +
  490 + } else {
  491 + th.setData({
  492 + is_read: 1,
  493 + ismore: 1,
  494 + is_get:1
  495 + })
  496 + }
  497 +
  498 + wx.hideLoading();
  499 +
  500 + }
  501 + })
  502 +
  503 + },
  504 + //销毁界面跳转
  505 + redirectTo: function (e) {
  506 + var th = this;
  507 + var url = e.currentTarget.dataset.url;
  508 + //销毁跳转
  509 + wx.redirectTo({
  510 + url: url
  511 + });
  512 + },
  513 + //不销毁界面跳转
  514 + navigateTo: function (e) {
  515 + var th = this;
  516 + var url = e.currentTarget.dataset.url;
  517 + getApp().goto(url);
  518 +
  519 + },
  520 + //下拉事件
  521 + onReachBottom: function () {
  522 + var th = this;
  523 + if (th.data.total <= th.data.pageSize) return;
  524 + if (th.data.ismore) return;
  525 +
  526 + th.getList();
  527 + },
  528 + //图片失败,默认图片
  529 + bind_bnerr2: function (e) {
  530 + var _errImg = e.target.dataset.errorimg;
  531 + var _errObj = {};
  532 + _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
  533 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  534 + },
  535 + goto: function (e) {
  536 + var th = this;
  537 + var url = e.currentTarget.dataset.url;
  538 + getApp().goto(url);
  539 + },
  540 +
  541 + onShareAppMessage: function (e) {
  542 + getApp().globalData.no_clear=1;
  543 + var curPage = this;
  544 + var pagePath = curPage.route; //当前页面url
  545 + if (pagePath.indexOf('/') != 0) {
  546 + pagePath = '/' + pagePath;
  547 + }
  548 + pagePath += "?first_leader=" + this.data.getUserID;
  549 + return {
  550 + title: "专享礼包",
  551 + path: pagePath,
  552 + }
  553 + },
  554 +
  555 + // 分享朋友圈
  556 + onShareTimeline() {
  557 + getApp().globalData.no_clear=1;
  558 +
  559 + var user_id=getApp().globalData.user_id;
  560 + if(!user_id) user_id=0;
  561 +
  562 + return {
  563 + title: '专享礼包',
  564 + imageUrl: this.data.ad_data.ad_code,
  565 + query: 'first_leader='+user_id
  566 + }
  567 + },
  568 +
  569 +
  570 +
  571 + //--- 设置一下默认库存的数量 ----
  572 + set_def_storage(ee) {
  573 + var that = this, th = this;
  574 + that.data.fir_def_store = ee;
  575 + that.setData({
  576 + def_pick_store: ee,
  577 + sto_sele_name: ee.pickup_name,
  578 + sto_sele_id: ee.pickup_id,
  579 + sto_sele_distr: ee.distr_type
  580 + })
  581 + },
  582 + // 选择门店
  583 + choice_store: function (ee) {
  584 + this.setData({
  585 + keyword:''
  586 + })
  587 + //--先判断会员状态--
  588 + var user_info = getApp().globalData.userInfo;
  589 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  590 + wx.navigateTo({
  591 + url: '/packageE/pages/togoin/togoin',
  592 + })
  593 + return false;
  594 + }
  595 +
  596 + var th = this;
  597 + var ind = ee.currentTarget.dataset.ind;
  598 + var bconfig = th.data.bconfig;
  599 +
  600 + //如果开启了,则不在选择门店
  601 + if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){
  602 + return false;
  603 + }
  604 +
  605 + if (!th.data.only_pk && !th.data.def_pickpu_list) {
  606 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  607 + return false;
  608 + }
  609 +
  610 + if (th.data.only_pk && !th.data.only_pk.length) {
  611 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  612 + return false;
  613 + }
  614 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  615 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  616 + return false;
  617 + }
  618 +
  619 +
  620 + if (bconfig && bconfig.is_sort_storage) {
  621 + wx.getLocation({
  622 + type: 'gcj02',
  623 + success: function (res) {
  624 +
  625 + th.data.lat = res.latitude;
  626 + th.data.lon = res.longitude;
  627 + th.data.is_get_local_ok = 1;
  628 + th.setData({
  629 + is_gps: 1
  630 + });
  631 + //th.onShow();
  632 + com.get_sto(th,os);
  633 + },
  634 + fail: function (res) {
  635 + //th.onShow();
  636 + th.data.is_get_local_ok = 1;
  637 + com.get_sto(th,os);
  638 + if (res.errCode == 2) {
  639 + th.setData({
  640 + is_gps: 0
  641 + });
  642 + if (th.data.is_gps == 0) {
  643 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  644 + }
  645 + } else {
  646 + th.setData({
  647 + is_gps: "3"
  648 + });
  649 + }
  650 +
  651 + }
  652 + })
  653 + } else {
  654 + th.data.is_get_local_ok = 1;
  655 + com.get_sto(th,os);
  656 + }
  657 +
  658 + if (ind != undefined && ind != null) {
  659 + this.setData({
  660 + open_ind_store: ind,
  661 + store: 1,
  662 + openSpecModal: !1,
  663 + openSpecModal_pt: !1,
  664 + openSpecModal_flash_normal: !1,
  665 + })
  666 + } else {
  667 + this.setData({
  668 + store: 1,
  669 + openSpecModal: !1,
  670 + openSpecModal_pt: !1,
  671 + openSpecModal_flash_normal: !1
  672 +
  673 + })
  674 + }
  675 + },
  676 + //关闭选择门店
  677 + close_popup: function (e) {
  678 + var th = this;
  679 + this.setData({
  680 + store: 0,
  681 + choice_sort_store: 0,
  682 + sort_store: 0,
  683 + fir_pick_index: 0,
  684 + sec_pick_index: 0
  685 + })
  686 +
  687 + var openindstore = this.data.open_ind_store;
  688 + if (openindstore == 1) {
  689 + th.setData({
  690 + openSpecModal: !0,
  691 + openSpecModal_ind: openindstore,
  692 + });
  693 + } else if (openindstore == 2) {
  694 + th.setData({
  695 + openSpecModal: !0,
  696 + openSpecModal_ind: openindstore,
  697 + });
  698 + }
  699 + else if (openindstore == 4) { //4就是拼团
  700 + th.setData({
  701 + openSpecModal_pt: 1, //打开拼团购买界面
  702 + store: 0, //关闭门店
  703 + choice_sort_store: 0, //关闭门店2级
  704 + sort_store: 0, //关闭门店2级
  705 + });
  706 + }
  707 + else {
  708 + th.setData({
  709 + store: 0,
  710 + choice_sort_store: 0,
  711 + sort_store: 0
  712 + })
  713 + }
  714 +
  715 +
  716 + },
  717 +
  718 + //选择更多门店
  719 + more_store: function () {
  720 + this.setData({
  721 + sort_store: 1
  722 + });
  723 + },
  724 + // 返回按钮
  725 + returns: function () {
  726 + this.setData({
  727 + sort_store: 0,
  728 + choice_sort_store: 0
  729 + });
  730 + },
  731 + //---选择分类门店---
  732 + choice_sort_store: function (e) {
  733 + var index = e.currentTarget.dataset.index;
  734 + var region_name = e.currentTarget.dataset.region;
  735 + var item = this.data.all_sto[index];
  736 + this.setData({
  737 + region_name: region_name,
  738 + sort_store: 0,
  739 + choice_sort_store: 1,
  740 + sec_sto: item,
  741 + sec_i:index,
  742 + sec_pick_index: 0
  743 + });
  744 + },
  745 +
  746 + choose_for_store_fir: function (e) {
  747 + var index_c = e.currentTarget.dataset.ind;
  748 + var th = this;
  749 + th.setData({
  750 + fir_pick_index: index_c
  751 + })
  752 +
  753 + },
  754 +
  755 + //确定def_pick为选择的门店
  756 + sure_pick: function (e) {
  757 + var th = this;
  758 + var item = null;
  759 + var openindstore = th.data.open_ind_store;
  760 +
  761 + if (th.data.choice_sort_store == 0) {
  762 + var index = th.data.fir_pick_index;
  763 + if (th.data.is_show_sto_cat == 1) {
  764 + item = th.data.def_pickpu_list[index];
  765 + } else {
  766 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  767 + }
  768 +
  769 + } else {
  770 + var index = th.data.sec_pick_index;
  771 + item = th.data.sec_sto.s_arr[index];
  772 + }
  773 +
  774 + if(!item) return false;
  775 +
  776 + if (!th.data.sele_g) return false;
  777 +
  778 + th.setData({
  779 + def_pick_store: item,
  780 + sto_sele_name: item.pickup_name,
  781 + sto_sele_id: item.pickup_id,
  782 + sto_sele_distr: item.distr_type,
  783 + store: 0,
  784 + choice_sort_store: 0,
  785 + fir_pick_index: 0,
  786 + openSpecModal: !0,
  787 + });
  788 +
  789 +
  790 + },
  791 + //---点击二级之后的选择---
  792 + choose_for_store: function (e) {
  793 + var index_c = e.currentTarget.dataset.ind;
  794 + var th = this;
  795 + th.setData({
  796 + sec_pick_index: index_c,
  797 + fir_pick_index: index_c
  798 + })
  799 +
  800 + },
  801 + //把选择的门店设置成默认的门店def_pick
  802 + set_def_pick: function (e) {
  803 + var th = this;
  804 + var item = null;
  805 + if (th.data.choice_sort_store == 0) {
  806 + var index = th.data.fir_pick_index;
  807 + if (th.data.is_show_sto_cat == 1) {
  808 + item = th.data.def_pickpu_list[index];
  809 + } else {
  810 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  811 + }
  812 + } else {
  813 + var index = th.data.sec_pick_index;
  814 + item = th.data.sec_sto.s_arr[index];
  815 + }
  816 +
  817 + if(!item) return false;
  818 +
  819 + th.setData({
  820 + def_pick_store: item,
  821 + sto_sele_name: item.pickup_name,
  822 + sto_sele_id: item.pickup_id,
  823 + sto_sele_distr: item.distr_type,
  824 + store: 0,
  825 + choice_sort_store: 0,
  826 + openSpecModal: !0,
  827 + });
  828 +
  829 + var user_id=getApp().globalData.user_id;
  830 + var def_pickup_id = item.pickup_id;
  831 + getApp().request.put('/api/weshop/users/update', {
  832 + data: {
  833 + user_id: user_id,
  834 + def_pickup_id: def_pickup_id
  835 + },
  836 + success: function (res) {
  837 + if (res.data.code == 0) {
  838 + if (th.data.choice_sort_store == 0) th.setData({
  839 + fir_pick_index: 0
  840 + });
  841 + getApp().globalData.pk_store = item;
  842 + } else {
  843 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  844 + }
  845 +
  846 + }
  847 + });
  848 +
  849 +
  850 +
  851 + },
  852 + closeSpecModal: function () {
  853 + this.setData({openSpecModal: 0});
  854 + },
  855 +
  856 + buy_libao:function () {
  857 + com.buy_libao(this)
  858 + },
  859 +
  860 + search_lb(){
  861 + this.data.curpage=0;
  862 + this.searching=0;
  863 + this.setData({ismore:0,is_get:0,wareCard:[]});
  864 + this.getList();
  865 + },
  866 +
  867 + input_sear(e){
  868 + let value = e.detail;
  869 + this.data.sear_key=value;
  870 + }
  871 +
  872 +})
0 873 \ No newline at end of file
... ...
packageF/pages/giftpack/buygiftpack/giftpackbuy.json 0 → 100644
  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"
  7 + }
  8 +}
0 9 \ No newline at end of file
... ...
packageF/pages/giftpack/buygiftpack/giftpackbuy.wxml 0 → 100644
  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="/packageF/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="/packageF/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>
  127 +</view>
  128 +<!-- 引入提示组件 -->
  129 +<warn id="warn"></warn>
  130 +<my_confirm id="my_confirm"></my_confirm>
  131 +
  132 +<include src="../../../../pages/giftpack/public/buy_com.wxml"></include>
0 133 \ No newline at end of file
... ...
packageF/pages/giftpack/buygiftpack/giftpackbuy.wxss 0 → 100644
  1 +/*引用样式路径*/
  2 +@charset "UTF-8";
  3 +@import '/pages/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 +}
... ...
packageF/pages/giftpack/evaluategift/evaluategift.js 0 → 100644
  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 +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 + if(options.transfer){
  138 + let obj=getApp().globalData.ts_trans_data;
  139 + options= JSON.parse(JSON.stringify(obj));
  140 + getApp().globalData.ts_trans_data=null;
  141 + }
  142 +
  143 + var getisdg=0;
  144 + if (options.isdg)
  145 + {
  146 + getisdg=options.isdg;
  147 + }
  148 + var th = this;
  149 + th.setData({
  150 + getActId: options.actId,
  151 + orderNumber: options.orderNumber,
  152 + orderGoodsId: options.orderGoodsId,
  153 + giftBagId: options.giftBagId,
  154 + isdg: getisdg
  155 + })
  156 +
  157 + var orderType = options.orderType;
  158 + if (orderType) {
  159 + th.setData({ orderType: orderType})
  160 + }
  161 +
  162 +
  163 + },
  164 + onShow: function() {
  165 + //--先判断会员状态--
  166 + var user_info = getApp().globalData.userInfo;
  167 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  168 + getApp().goto('/packageE/pages/togoin/togoin');
  169 + return false;
  170 + }
  171 +
  172 + this.GetList();
  173 +
  174 + },
  175 + GetReceive: function() {
  176 + var th = this;
  177 + if (th.data.receiveState) {
  178 + return false;
  179 + }
  180 + var is_sub = th.data.is_sub; //判断是否重复提交
  181 + if (is_sub == 0) {
  182 + th.setData({
  183 + is_sub: 1
  184 + })
  185 +
  186 + var json = {
  187 + "actId": th.data.getActId, //活动Id
  188 + "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  189 + "storeId": a.stoid, //商家Id
  190 + "userId": d.user_id, //用户ID
  191 + "orderNumber": th.data.orderNumber,
  192 + "orderType": th.data.orderType,
  193 + "orderGoodsId": th.data.orderGoodsId,
  194 + "giftBagId": th.data.giftBagId,
  195 + "buyFrom": 2
  196 + };
  197 + if (th.data.isdg) {
  198 + json.isdg=th.data.isdg
  199 + }
  200 + var data = JSON.stringify(json);
  201 + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
  202 + getApp().request.json_post(url, json,
  203 + function (res) {
  204 + th.setData({
  205 + is_sub: 0
  206 + })
  207 + if (res.data.code == 0) {
  208 + th.setData({
  209 + receiveState: 1
  210 + })
  211 + getApp().my_warnning("领取成功,同一个订单评价后只能兑换一份礼包!", 1, th);
  212 + } else {
  213 + getApp().my_warnning(res.data.msg, 0, th);
  214 + }
  215 + },
  216 + function (res) {
  217 +
  218 + }
  219 +
  220 + )
  221 +
  222 + }
  223 + },
  224 + //界面跳转
  225 + goto: function(e) {
  226 + var url = e.currentTarget.dataset.url;
  227 + getApp().goto(url);
  228 + },
  229 + //图片失败,默认图片
  230 + bind_bnerr1: function(e) {
  231 + var th = this;
  232 + var _errImg = e.target.dataset.errorimg;
  233 + var _Img = e.target.dataset.img;
  234 + if (_Img != undefined) {
  235 + var _errObj = {};
  236 + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
  237 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  238 + }
  239 + },
  240 +});
0 241 \ No newline at end of file
... ...
packageF/pages/giftpack/evaluategift/evaluategift.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "评价有礼",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageF/pages/giftpack/evaluategift/evaluategift.wxml 0 → 100644
  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>
  180 +</view>
  181 +<!-- 引入提示组件 -->
  182 +<warn id="warn"></warn>
  183 +<my_confirm id="my_confirm"></my_confirm>
0 184 \ No newline at end of file
... ...
packageF/pages/giftpack/evaluategift/evaluategift.wxss 0 → 100644
  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 +}
... ...
packageF/pages/giftpack/festival/festival.js 0 → 100644
  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 +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: "", //背景颜色
  34 + },
  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 + }
  79 +
  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 + if(options.transfer){
  122 + let obj=getApp().globalData.ts_trans_data;
  123 + options= JSON.parse(JSON.stringify(obj));
  124 + getApp().globalData.ts_trans_data=null;
  125 + }
  126 +
  127 + var th = this;
  128 + th.setData({
  129 + getActId: options.actId,
  130 + giftID: options.giftBagId
  131 + })
  132 +
  133 + wx.setNavigationBarTitle({
  134 + title: "节日有礼",
  135 + });
  136 + },
  137 + onShow: function() {
  138 + //--先判断会员状态--
  139 + var user_info = getApp().globalData.userInfo;
  140 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  141 + getApp().goto('/packageE/pages/togoin/togoin');
  142 + return false;
  143 + }
  144 + this.is_festival();
  145 + this.GetList();
  146 +
  147 + },
  148 + GetReceive: function() {
  149 + var th = this;
  150 + if (th.data.receiveState) {
  151 + return false;
  152 + }
  153 + var is_sub = th.data.is_sub; //判断是否重复提交
  154 + if (is_sub == 0) {
  155 + th.setData({
  156 + is_sub: 1
  157 + })
  158 + var json = {
  159 + "actId": th.data.getActId, //活动Id
  160 + "actType": 3, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  161 + "giftBagId": th.data.giftID, //礼包Id
  162 + "storeId": a.stoid, //商家Id
  163 + "userId": d.user_id, //用户ID
  164 + "buyFrom": 2
  165 + }
  166 + var data = JSON.stringify(json);
  167 + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
  168 + getApp().request.json_post(url, json,
  169 + function (res) {
  170 + th.setData({
  171 + is_sub: 0
  172 + })
  173 + if (res.data.code == 0) {
  174 + th.setData({
  175 + receiveState: 1
  176 + })
  177 + getApp().my_warnning("领取成功", 1, th);
  178 + } else {
  179 + getApp().my_warnning(res.data.msg, 0, th);
  180 + }
  181 + },
  182 + function (res) {
  183 + }
  184 + )
  185 + }
  186 + },
  187 + //获取节日有礼信息
  188 + is_festival: function(e) {
  189 + var th = this;
  190 + var url = "/api/weshop/marketing/holiday/act/judge";
  191 + console.log(th.data.getActId);
  192 + getApp().request.promiseGet(url, {
  193 + data: {
  194 + storeId: a.stoid, //商家ID
  195 + userId: d.user_id, //用户ID
  196 + id:th.data.getActId
  197 + }
  198 + }).then(res => {
  199 + if (res.data.code == 0) {
  200 + th.setData({
  201 + bimg: res.data.data.actImg,
  202 + actFontColor: res.data.data.actFontColor, //字体颜色
  203 + actBgColor: res.data.data.actBgColor, //背景颜色
  204 + })
  205 + }
  206 + })
  207 + },
  208 + //界面跳转
  209 + goto: function(e) {
  210 + var url = e.currentTarget.dataset.url;
  211 + getApp().goto(url);
  212 + },
  213 + //图片失败,默认图片
  214 + bind_bnerr1: function(e) {
  215 + var th = this;
  216 + var _errImg = e.target.dataset.errorimg;
  217 + var _Img = e.target.dataset.img;
  218 + if (_Img != undefined) {
  219 + var _errObj = {};
  220 + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
  221 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  222 + }
  223 + },
  224 +});
0 225 \ No newline at end of file
... ...
packageF/pages/giftpack/festival/festival.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "节日有礼",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageF/pages/giftpack/festival/festival.wxml 0 → 100644
  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>
  180 +</view>
  181 +<!-- 引入提示组件 -->
  182 +<warn id="warn"></warn>
  183 +<my_confirm id="my_confirm"></my_confirm>
0 184 \ No newline at end of file
... ...
packageF/pages/giftpack/festival/festival.wxss 0 → 100644
  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 +}
... ...
packageF/pages/giftpack/giftpacklist/giftpacklist.js 0 → 100644
  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("../../../../pages/giftpack/public/buy_com.js");
  8 +
  9 +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 + if(options.transfer){
  85 + let obj=getApp().globalData.ts_trans_data;
  86 + options= JSON.parse(JSON.stringify(obj));
  87 + getApp().globalData.ts_trans_data=null;
  88 + }
  89 +
  90 + //定义第一次进入
  91 + this.data.fir_in=1;
  92 +
  93 + var th = this;
  94 +
  95 + this.setData({
  96 + params: options,
  97 + })
  98 +
  99 + getApp().getConfig(function (e) {
  100 + th.setData({sto_sele_name_1: e.store_name})
  101 + })
  102 +
  103 + getApp().getConfig2(function (e) {
  104 + var json_d = JSON.parse(e.switch_list);
  105 + th.setData({
  106 + bconfig: e,
  107 + sys_switch: json_d,
  108 + is_retail_price: json_d.is_retail_price || 0
  109 + });
  110 + })
  111 +
  112 + //获取用户设备信息,屏幕宽度
  113 + wx.getSystemInfo({
  114 + success: res => {
  115 + th.setData({
  116 + screenWidth: res.screenWidth
  117 + })
  118 + }
  119 + });
  120 +
  121 + },
  122 + init() {
  123 + let options = this.data?.params; // this.data == null ? undefined:this.data.params
  124 + var th = this;
  125 + this.setData({
  126 + getUserID: d.user_id,
  127 + getStorageID: a.stoid,
  128 + })
  129 +
  130 + if(!options.lbId && options.scene){
  131 + var gid_str = decodeURIComponent(options.scene);
  132 + gid_str = gid_str.split("_");
  133 +
  134 + options.lbId=gid_str[0];
  135 + options.first_leader=gid_str[1];
  136 + options.isBuy=1;
  137 + }
  138 +
  139 +
  140 + this.setData({
  141 + isBuy: options.isBuy,
  142 + getGiftID: options.lbId,
  143 + orderSn: options.orderSn,
  144 + flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1
  145 + })
  146 + if (options.lbId) th.data.lbId = options.lbId;
  147 + //-- 获取分享人的ID --
  148 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  149 + if (first_leader) {
  150 + this.setData({
  151 + first_leader,
  152 + })
  153 + //-- user_id代过来免登录 --
  154 + getApp().globalData.first_leader = first_leader;
  155 + //调用接口判断是不是会员
  156 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  157 + if (res.data.code == 0) {
  158 + getApp().globalData.guide_id = res.data.data.id;
  159 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  160 + }
  161 + })
  162 + }
  163 + th.close();
  164 +
  165 +
  166 + if (this.data.flag == 1) {
  167 + this.getZxlbDetails();
  168 + } else {
  169 + if (this.data.isBuy == 0) {
  170 + this.GetMyGiftList();
  171 + } else if (this.data.isBuy == 1) {
  172 + this.GetBuyGiftList();
  173 + }
  174 +
  175 + }
  176 +
  177 + },
  178 +
  179 + onShow: function () {
  180 + this.setData({submit:0})
  181 +
  182 + var th=this;
  183 + //判断是不是第一次进入
  184 + if(this.data.fir_in){
  185 + this.data.fir_in=0;
  186 + }else{
  187 + //富友支付插件的判断
  188 + ut.fy_back('',0);
  189 + com.set_py_fir();
  190 +
  191 + if(th.data.ok_order_sn){
  192 + //-- 通联的第三方支付的返回优化 --
  193 + var money=th.data.payMoney;
  194 + var back_url = "/packageF/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn;
  195 + ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){
  196 + if(!th.data.ok_order_sn) return false;
  197 + getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
  198 + {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
  199 +
  200 + th.data.ok_order_sn=null;
  201 + if(res.data.code==0 && res.data.data){
  202 + var item=res.data.data;
  203 + if(item.payState==1){
  204 + //支付支付,返回首页
  205 + ut.m_toast('支付成功');
  206 + setTimeout(()=>{
  207 + getApp().goto(back_url);
  208 + },1000)
  209 +
  210 + }else{
  211 + //支付支付,返回首页
  212 + ut.m_toast('支付失败');
  213 + }
  214 + }
  215 + })
  216 + },null,null,1);
  217 + th.data.ok_order_sn=null;
  218 + }
  219 +
  220 + }
  221 +
  222 +
  223 + getApp().check_can_share(this);
  224 + getApp().is_Single_page(this, function () {
  225 + //--先判断会员状态--
  226 + var user_info = getApp().globalData.userInfo;
  227 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  228 + getApp().goto('/packageE/pages/togoin/togoin');
  229 + return false;
  230 + }
  231 + this.init();
  232 + })
  233 + this.setData({ submit:0})
  234 + },
  235 + //获取搜索门店输入的值
  236 + input_store: function(e) {
  237 + this.setData({
  238 + keyword: e.detail.value
  239 + })
  240 + },
  241 + //搜索门店
  242 + searchfn(){
  243 + let choice_sort_store = this.data.choice_sort_store
  244 + if (choice_sort_store==0) { //全局搜索
  245 + let all_pick_list = this.data.all_pick_list
  246 + let def_pickpu_list = this.data.def_pickpu_list
  247 + let keyword = this.data.keyword
  248 + if (keyword) {
  249 + let arr=all_pick_list.filter( item =>{
  250 + let i = item.pickup_name.indexOf(keyword)
  251 + if (i > -1) {
  252 + return true
  253 + }else{
  254 + return false
  255 + }
  256 + })
  257 + if (arr && arr.length>0) {
  258 + if(this.data.is_show_sto_cat==1){
  259 + this.setData({
  260 + def_pickpu_list:arr
  261 + })
  262 + }else{
  263 + this.setData({
  264 + only_pk:arr
  265 + })
  266 + }
  267 + }else{
  268 + wx.showToast({
  269 + title: '没有搜索到门店',
  270 + icon: 'none',
  271 + duration: 2000
  272 + })
  273 + }
  274 + }else{
  275 + if (this.data.is_show_sto_cat==1) {
  276 + this.setData({
  277 + def_pickpu_list:all_pick_list.slice(0,10)
  278 + })
  279 + }else{
  280 + this.setData({
  281 + only_pk:all_pick_list
  282 + })
  283 + }
  284 +
  285 + }
  286 + }else{ //分类下搜索
  287 + let sec_i=this.data.sec_i
  288 + let all_sto = this.data.all_sto
  289 + let old_all_sto = this.data.old_all_sto
  290 + if (!old_all_sto) {
  291 + this.setData({
  292 + old_all_sto:JSON.parse(JSON.stringify(all_sto))
  293 + })
  294 + }
  295 + let sec_sto= this.data.sec_sto
  296 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  297 + let keyword = this.data.keyword
  298 + let text='sec_sto.s_arr'
  299 + if (keyword) {
  300 + let arr=sec_arr.filter( item =>{
  301 + let i = item.pickup_name.indexOf(keyword)
  302 + if (i > -1) {
  303 + return true
  304 + }else{
  305 + return false
  306 + }
  307 + })
  308 + if (arr && arr.length>0) {
  309 + this.setData({
  310 + [text]:arr
  311 + })
  312 + }else{
  313 + wx.showToast({
  314 + title: '没有搜索到门店',
  315 + icon: 'none',
  316 + duration: 2000
  317 + })
  318 + }
  319 + }else{
  320 + if(this.data.old_all_sto){
  321 + this.setData({
  322 + [text]: this.data.old_all_sto[sec_i].s_arr
  323 + })
  324 + }else{
  325 + this.setData({
  326 + [text]: all_sto[sec_i].s_arr
  327 + })
  328 + }
  329 +
  330 + }
  331 +
  332 +
  333 + }
  334 + },
  335 + GetBuyPrice: function (e) {
  336 + var that = this.data;
  337 + var th = this;
  338 + //如果还没有开始的话
  339 + if (th.data.isStart != 1) {
  340 + getApp().my_warnning("活动还没有开始", 0, th);
  341 + return false;
  342 + }
  343 +
  344 +
  345 + this.data.payMoney = th.data.sele_g.payMoney;
  346 + th.setData({buyType: 2})
  347 + if (th.data.sele_g.is_pickup) {
  348 + th.setData({
  349 + openSpecModal: 1
  350 + })
  351 + } else {
  352 +
  353 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  354 + my_confirm.open(
  355 + "是否确定购买该礼包",
  356 + "取消",
  357 + "确定",
  358 + function () {
  359 + my_confirm.open_cancel(0);
  360 + },
  361 + function () {
  362 +
  363 + my_confirm.open_cancel(0);
  364 + com.buy_libao(th)
  365 + }
  366 + )
  367 + }
  368 +
  369 +
  370 + },
  371 + GetBuyIntegral: function (e) {
  372 + var that = this.data;
  373 + var th = this;
  374 +
  375 + //如果还没有开始的话
  376 + if (th.data.isStart != 1) {
  377 + getApp().my_warnning("活动还没有开始", 0, th);
  378 + return false;
  379 + }
  380 +
  381 + th.setData({buyType: 1});
  382 + if (th.data.sele_g.is_pickup) {
  383 + th.setData({
  384 + openSpecModal: 1
  385 + })
  386 + } else {
  387 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  388 + my_confirm.open(
  389 + "是否确定兑换该礼包",
  390 + "取消",
  391 + "确定",
  392 + function () {
  393 + my_confirm.open_cancel(0);
  394 + },
  395 + function () {
  396 + my_confirm.open_cancel(0);
  397 + com.buy_libao(th)
  398 + })
  399 + }
  400 +
  401 +
  402 + },
  403 +
  404 + GetMyGiftList: function () {
  405 + var _this = this;
  406 + var th = this;
  407 + getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', {
  408 + isShowLoading: true,
  409 + data: {
  410 + "storeId": a.stoid, //商家ID
  411 + "userId": d.user_id, //用户ID
  412 + "orderSn": th.data.orderSn
  413 + },
  414 + success: function (res) {
  415 + if (res.data.code == 0) {
  416 + console.log('商品------++')
  417 + console.log(res)
  418 + th.setData({
  419 + giftImage: th.data.iurl + res.data.data.lbUrl,
  420 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
  421 + giftTitle: res.data.data.giftTitle,
  422 + default_color: res.data.data.bgcolor
  423 + })
  424 +
  425 + if (res.data.data.iswarelbtype == 1) {
  426 + th.setData({iswarelbtype: 1})
  427 + }
  428 +
  429 + if (!res.data.data.giftRemark || res.data.data.giftRemark == '') {
  430 + th.setData({
  431 + giftRemark: '暂无详情......'
  432 + })
  433 + } else {
  434 + th.setData({
  435 + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  436 + })
  437 + }
  438 +
  439 + //---获取日期的时间戳---
  440 + var t_endtime = res.data.data.endTime;
  441 + t_endtime = t_endtime.replace(/-/g, '/');
  442 + var t_date = new Date(t_endtime) / 1000;
  443 + var t_now = ut.gettimestamp();
  444 +
  445 + var t_starttime = res.data.data.starTime;
  446 + t_starttime = t_starttime.replace(/-/g, '/');
  447 + var t_sdate = new Date(t_starttime) / 1000;
  448 +
  449 + if (res.data.data.goodsUseState) th.setData({
  450 + c_state: 1
  451 + })
  452 + else if (t_date <= t_now)
  453 + th.setData({
  454 + c_state: 2
  455 + })
  456 + else if (t_sdate > t_now)
  457 + th.setData({
  458 + c_state: -1
  459 + })
  460 + th.setData({
  461 + giftDate: res.data.data.endTime,
  462 + giftPosPrice: res.data.data.giftPosPrice,
  463 + giftQty: res.data.data.giftQty,
  464 + giftIntegral: res.data.data.payIntegral,
  465 + giftPrice: res.data.data.payMoney,
  466 + giftType: res.data.data.actType,
  467 + actTitle: res.data.data.actTitle,
  468 + wareCard: res.data.data.wareCard,
  469 + lbId: res.data.data.lbId
  470 + })
  471 + //判断是否有礼包
  472 + for (var i = 0; i < res.data.data.wareCard.length; i++) {
  473 + if (res.data.data.wareCard[i].lbType == 1) {
  474 + th.setData({
  475 + is_lb: 1
  476 + })
  477 + break;
  478 + }
  479 + }
  480 +
  481 + if (res.data.data.pickup_id) {
  482 + getApp().request.get("/api/weshop/pickup/get/" + os.stoid + "/" + res.data.data.pickup_id, {
  483 + success: function (res) {
  484 + if (res.data.code == 0) {
  485 + th.setData({pick_up: res.data.data});
  486 + }
  487 + }
  488 + });
  489 +
  490 + }
  491 +
  492 +
  493 + } else {
  494 + getApp().my_warnning(res.data.msg, 0, th);
  495 + return false;
  496 + }
  497 + }
  498 + });
  499 +
  500 + },
  501 +
  502 + check_guide(func){
  503 + var first_leader=this.data.first_leader;
  504 + if(!first_leader){
  505 + func();
  506 + return false;
  507 + }
  508 + if(this.data.is_geted_guide_pick){
  509 + func();
  510 + return false;
  511 + }
  512 + if(getApp().globalData.guide_pick_id){
  513 + func();
  514 + return false;
  515 + }
  516 + var th=this;
  517 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  518 + if (res.data.code == 0) {
  519 + getApp().globalData.guide_pick_id= res.data.data.pickup_id;
  520 + }
  521 + th.data.is_geted_guide_pick=1;
  522 + func();
  523 + })
  524 + },
  525 +
  526 + GetBuyGiftList: function () {
  527 + var _this2 = this;
  528 + var th = this.data;
  529 + getApp().request.get('/api/weshop/marketing/giftbag/detail/get', {
  530 + isShowLoading: true,
  531 + data: {
  532 + "storeId": a.stoid, //商家ID
  533 + "userId": d.user_id, //用户ID
  534 + "giftBagId": th.getGiftID,
  535 + isnNewUserLb:1
  536 + },
  537 + success: function success(res) {
  538 + if (res.data.code == 0) {
  539 + _this2.setData({
  540 + giftImage: th.iurl + res.data.data.lbUrl,
  541 + giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl),
  542 + giftTitle: res.data.data.giftTitle,
  543 + default_color: res.data.data.bgcolor
  544 + })
  545 + if (res.data.data.giftRemark == '') {
  546 + _this2.setData({
  547 + giftRemark: '暂无详情......'
  548 + })
  549 + } else {
  550 + _this2.setData({
  551 + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  552 + })
  553 + }
  554 +
  555 + //-- 如果只限定链接的时候,要取消分享按钮 --
  556 + if(res.data.data.is_share){
  557 + wx.hideShareMenu();
  558 + wx.offCopyUrl()
  559 + //替换掉复制链接
  560 + wx.onCopyUrl(() => {
  561 + setTimeout(()=>{
  562 + wx.setClipboardData({
  563 + data: '暂不支持分享',
  564 + success (res) { }
  565 + })
  566 + },500)
  567 + return { query: 'a=1&b=2' }
  568 + })
  569 + }
  570 +
  571 +
  572 + var isStart = 0;
  573 + var now = ut.gettimestamp();
  574 +
  575 + var str = res.data.data.starTime.replace(/-/g, '/');
  576 + var start = Date.parse(new Date(str));
  577 + start = start / 1000;
  578 + if (start < now) isStart = 1;
  579 +
  580 + _this2.setData({
  581 + giftDate: res.data.data.endTime,
  582 + giftStart: res.data.data.starTime,
  583 + giftPosPrice: res.data.data.giftPosPrice,
  584 + giftQty: res.data.data.giftQty,
  585 + giftIntegral: res.data.data.payIntegral,
  586 + giftPrice: res.data.data.payMoney,
  587 + giftType: res.data.data.actType,
  588 + actTitle: res.data.data.actTitle,
  589 + wareCard: res.data.data.wareCard,
  590 + isStart: isStart,
  591 + sele_g: res.data.data,
  592 + is_share:res.data.data.is_share
  593 + })
  594 +
  595 +
  596 + var sele_g = res.data.data;
  597 + //需不需要门店,不需要门店返回
  598 + if (!sele_g.is_pickup) return false;
  599 +
  600 + //-- 检测一下有没有门店 --
  601 + _this2.check_guide(function (){
  602 + com.wait_for_store_config(_this2);
  603 + com.set_user_mo_store(_this2, os, function () {
  604 + if (sele_g.pickup_list && _this2.data.def_pick_store) {
  605 + com.check_def_pk(_this2);
  606 + }
  607 + });
  608 + com.get_sto(_this2, os);
  609 + })
  610 +
  611 + } else {
  612 + getApp().my_warnning(res.data.msg, 0, _this2);
  613 +
  614 + setTimeout(()=>{
  615 + getApp().goto('/pages/index/index/index')
  616 + },2000)
  617 +
  618 + return false;
  619 + }
  620 + }
  621 + });
  622 +
  623 + },
  624 +
  625 + getZxlbDetails: function () {
  626 +
  627 + var th = this;
  628 + getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', {
  629 + isShowLoading: true,
  630 + data: {
  631 + "storeId": a.stoid, //商家ID
  632 + //"userId": d.user_id, //用户ID
  633 + "giftBagId": th.data.lbId
  634 + },
  635 + success: function (res) {
  636 + if (res.data.code == 0) {
  637 + th.setData({
  638 + giftImage: th.data.iurl + res.data.data.lbUrl,
  639 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
  640 + giftTitle: res.data.data.lbTitle,
  641 + default_color: res.data.data.bgcolor
  642 + })
  643 + if (res.data.data.lbIntro == '') {
  644 + th.setData({
  645 + giftRemark: '暂无详情......'
  646 + })
  647 + } else {
  648 + th.setData({
  649 + giftRemark: res.data.data.lbIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  650 + })
  651 + }
  652 +
  653 + //---获取日期的时间戳---
  654 + let exchangeType = res.data.data.exchangeType;
  655 + let exchangeDay = res.data.data.exchangeDay;
  656 + let exchangeStartTime = res.data.data.exchangeStartTime;
  657 + let exchangeEndTime = res.data.data.exchangeEndTime;
  658 + // let t_endtime;
  659 +
  660 + if (exchangeType == 2) {
  661 + if (exchangeStartTime == 0 || !exchangeStartTime) {
  662 + exchangeStartTime = ut.gettimestamp();
  663 + }
  664 + exchangeStartTime = ut.formatTime(exchangeStartTime, 0);
  665 + exchangeEndTime = ut.formatTime(exchangeEndTime, 0);
  666 + }
  667 +
  668 +
  669 + th.setData({
  670 + // giftDate: t_endtime,
  671 + giftPosPrice: res.data.data.oldPrice,
  672 + giftQty: res.data.data.lbNum,
  673 + giftIntegral: res.data.data.exchangeIntegral,
  674 + giftPrice: res.data.data.lbPrice,
  675 + giftType: res.data.data.actType,
  676 + actTitle: res.data.data.actTitle,
  677 + wareCard: res.data.data.wareCard,
  678 + lbId: res.data.data.lbId,
  679 + exchangeType: exchangeType,
  680 + exchangeDay: exchangeDay,
  681 + exchangeStartTime: exchangeStartTime,
  682 + exchangeEndTime: exchangeEndTime,
  683 + })
  684 + //判断是否有礼包
  685 + for (var i = 0; i < res.data.data.wareCard.length; i++) {
  686 + if (res.data.data.wareCard[i].lbType == 1) {
  687 + th.setData({
  688 + is_lb: 1
  689 + })
  690 + break;
  691 + }
  692 + }
  693 + } else {
  694 + getApp().my_warnning(res.data.msg, 0, th);
  695 + return false;
  696 + }
  697 + }
  698 + });
  699 +
  700 + },
  701 + onUnload:function(){
  702 + wx.offCopyUrl()
  703 + },
  704 + onHide: function() {
  705 + wx.offCopyUrl()
  706 + },
  707 +
  708 + //显示核销码
  709 + code_show: function (e) {
  710 + var th = this;
  711 + //--获取成功的时候--
  712 + var no = th.data.code;
  713 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  714 + var obj = {
  715 + val: no,
  716 + content: "请将二维码展示给核销员,收货更快捷"
  717 + };
  718 + qc_com.open(obj)
  719 + },
  720 + //获取核销码
  721 + getcode: function (e) {
  722 + var th = this;
  723 + var orderSn = th.data.orderSn; //订单号
  724 + let codeId = e.currentTarget.dataset.codeid;
  725 + var json = {
  726 + "storeId": a.stoid,
  727 + "orderSn": orderSn,
  728 + }
  729 + if (codeId && codeId !== "") {
  730 + json.id = codeId
  731 + }
  732 + var data = JSON.stringify(json);
  733 + var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址
  734 + getApp().request.json_post(url, json,
  735 + function (res) {
  736 + if (res.data.code == 0) {
  737 + th.setData({
  738 + code: res.data.data
  739 + })
  740 + th.code_show();
  741 + } else {
  742 + getApp().my_warnning(res.data.msg, 0, th);
  743 + }
  744 + },
  745 + function (res) {
  746 +
  747 + },
  748 + "put"
  749 + )
  750 +
  751 + },
  752 + //界面跳转
  753 + goto: function (e) {
  754 + var th = this;
  755 + var url = e.currentTarget.dataset.url;
  756 + getApp().goto(url);
  757 + },
  758 + //图片失败,默认图片
  759 + bind_bnerr2: function (e) {
  760 + var _errImg = e.target.dataset.errorimg;
  761 + var _errObj = {};
  762 + _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png";
  763 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  764 + },
  765 +
  766 + //图片失败,默认图片
  767 + bind_bnerr: function (e) {
  768 + var _errImg = e.target.dataset.errorimg;
  769 + var _errObj = {};
  770 + _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg";
  771 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  772 + //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
  773 +
  774 + },
  775 +
  776 + //关闭导航
  777 + close: function () {
  778 + var th = this;
  779 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  780 + nav_b.close_box();
  781 + nav_b.set_name("礼包", "/packageF/pages/giftpack/buygiftpack/giftpackbuy");
  782 + },
  783 +
  784 + //--- 分享设置 --
  785 + onShareAppMessage: function (e) {
  786 + getApp().globalData.no_clear = 1;
  787 + var curPage = this;
  788 + var pagePath = curPage.route; //当前页面url
  789 + if (pagePath.indexOf('/') != 0) {
  790 + pagePath = '/' + pagePath;
  791 + }
  792 + pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader=" + this.data.getUserID;
  793 + // if (this.data.isBuy == 0) {
  794 + // pagePath += "&orderSn=" + this.data.orderSn;
  795 + // } else {
  796 + // pagePath += "&lbId=" + this.data.getGiftID;
  797 + // }
  798 + // console.log('pagePath', pagePath);
  799 + return {
  800 + title: "礼包详情",
  801 + path: pagePath,
  802 + }
  803 + },
  804 +
  805 + /**
  806 + * 用户分享朋友圈
  807 + */
  808 + onShareTimeline() {
  809 + getApp().globalData.no_clear = 1;
  810 +
  811 + var pagePath = "&isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader=" + this.data.getUserID;
  812 + var user_id = getApp().globalData.user_id;
  813 + if (!user_id) user_id = 0;
  814 +
  815 + return {
  816 + title: "礼包详情",
  817 + query: 'first_leader=' + user_id + pagePath
  818 + }
  819 + },
  820 +
  821 + //免费领取
  822 + GetFree: function (e) {
  823 + var that = this.data;
  824 + var th = this;
  825 +
  826 + //如果还没有开始的话
  827 + if (th.data.isStart != 1) {
  828 + getApp().my_warnning("活动还没有开始", 0, th);
  829 + return false;
  830 + }
  831 +
  832 + th.setData({buyType: 3});
  833 + if (th.data.sele_g.is_pickup) {
  834 + th.setData({
  835 + openSpecModal: 1
  836 + })
  837 + } else {
  838 +
  839 +
  840 + // var id = e.currentTarget.dataset.id;//活动id
  841 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  842 + my_confirm.open(
  843 + "是否确定领取该礼包",
  844 + "取消",
  845 + "确定",
  846 + function () {
  847 + my_confirm.open_cancel(0);
  848 + },
  849 + function () {
  850 + my_confirm.open_cancel(0);
  851 + com.buy_libao(th)
  852 + })
  853 + }
  854 +
  855 +
  856 + },
  857 +
  858 + //--- 设置一下默认库存的数量 ----
  859 + set_def_storage(ee) {
  860 + var that = this, th = this;
  861 + that.data.fir_def_store = ee;
  862 +
  863 + that.setData({
  864 + def_pick_store: ee,
  865 + sto_sele_name: ee.pickup_name,
  866 + sto_sele_id: ee.pickup_id,
  867 + sto_sele_distr: ee.distr_type
  868 + })
  869 + },
  870 + // 选择门店
  871 + choice_store: function (ee) {
  872 + this.setData({
  873 + keyword:''
  874 + })
  875 + //--先判断会员状态--
  876 + var user_info = getApp().globalData.userInfo;
  877 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  878 + wx.navigateTo({
  879 + url: '/packageE/pages/togoin/togoin',
  880 + })
  881 + return false;
  882 + }
  883 +
  884 + var th = this;
  885 + var ind = ee.currentTarget.dataset.ind;
  886 + var bconfig = th.data.bconfig;
  887 +
  888 + //如果开启了,则不在选择门店
  889 + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  890 + return false;
  891 + }
  892 + if (!th.data.only_pk && !th.data.def_pickpu_list) {
  893 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  894 + return false;
  895 + }
  896 +
  897 + if (th.data.only_pk && !th.data.only_pk.length) {
  898 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  899 + return false;
  900 + }
  901 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  902 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  903 + return false;
  904 + }
  905 +
  906 +
  907 + if (bconfig && bconfig.is_sort_storage) {
  908 + wx.getLocation({
  909 + type: 'gcj02',
  910 + success: function (res) {
  911 +
  912 + th.data.lat = res.latitude;
  913 + th.data.lon = res.longitude;
  914 + th.data.is_get_local_ok = 1;
  915 + th.setData({
  916 + is_gps: 1
  917 + });
  918 + //th.onShow();
  919 + com.get_sto(th, os);
  920 + },
  921 + fail: function (res) {
  922 + //th.onShow();
  923 + th.data.is_get_local_ok = 1;
  924 + com.get_sto(th, os);
  925 + if (res.errCode == 2) {
  926 + th.setData({
  927 + is_gps: 0
  928 + });
  929 + if (th.data.is_gps == 0) {
  930 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  931 + }
  932 + } else {
  933 + th.setData({
  934 + is_gps: "3"
  935 + });
  936 + }
  937 +
  938 + }
  939 + })
  940 + } else {
  941 + th.data.is_get_local_ok = 1;
  942 + com.get_sto(th, os);
  943 + }
  944 +
  945 + if (ind != undefined && ind != null) {
  946 + this.setData({
  947 + open_ind_store: ind,
  948 + store: 1,
  949 + openSpecModal: !1,
  950 + openSpecModal_pt: !1,
  951 + openSpecModal_flash_normal: !1,
  952 + })
  953 + } else {
  954 + this.setData({
  955 + store: 1,
  956 + openSpecModal: !1,
  957 + openSpecModal_pt: !1,
  958 + openSpecModal_flash_normal: !1
  959 +
  960 + })
  961 + }
  962 + },
  963 + //关闭选择门店
  964 + close_popup: function (e) {
  965 + var th = this;
  966 + this.setData({
  967 + store: 0,
  968 + choice_sort_store: 0,
  969 + sort_store: 0,
  970 + fir_pick_index: 0,
  971 + sec_pick_index: 0
  972 + })
  973 +
  974 + var openindstore = this.data.open_ind_store;
  975 + if (openindstore == 1) {
  976 + th.setData({
  977 + openSpecModal: !0,
  978 + openSpecModal_ind: openindstore,
  979 + });
  980 + } else if (openindstore == 2) {
  981 + th.setData({
  982 + openSpecModal: !0,
  983 + openSpecModal_ind: openindstore,
  984 + });
  985 + } else if (openindstore == 4) { //4就是拼团
  986 + th.setData({
  987 + openSpecModal_pt: 1, //打开拼团购买界面
  988 + store: 0, //关闭门店
  989 + choice_sort_store: 0, //关闭门店2级
  990 + sort_store: 0, //关闭门店2级
  991 + });
  992 + } else {
  993 + th.setData({
  994 + store: 0,
  995 + choice_sort_store: 0,
  996 + sort_store: 0
  997 + })
  998 + }
  999 +
  1000 +
  1001 + },
  1002 +
  1003 + //选择更多门店
  1004 + more_store: function () {
  1005 + this.setData({
  1006 + sort_store: 1
  1007 + });
  1008 + },
  1009 + // 返回按钮
  1010 + returns: function () {
  1011 + this.setData({
  1012 + sort_store: 0,
  1013 + choice_sort_store: 0
  1014 + });
  1015 + },
  1016 + //---选择分类门店---
  1017 + choice_sort_store: function (e) {
  1018 + var index = e.currentTarget.dataset.index;
  1019 + var region_name = e.currentTarget.dataset.region;
  1020 + var item = this.data.all_sto[index];
  1021 + this.setData({
  1022 + region_name: region_name,
  1023 + sort_store: 0,
  1024 + choice_sort_store: 1,
  1025 + sec_i:index,
  1026 + sec_sto: item,
  1027 + sec_pick_index: 0
  1028 + });
  1029 + },
  1030 +
  1031 + choose_for_store_fir: function (e) {
  1032 + var index_c = e.currentTarget.dataset.ind;
  1033 + var th = this;
  1034 + th.setData({
  1035 + fir_pick_index: index_c
  1036 + })
  1037 +
  1038 + },
  1039 +
  1040 + //确定def_pick为选择的门店
  1041 + sure_pick: function (e) {
  1042 + var th = this;
  1043 + var item = null;
  1044 + var openindstore = th.data.open_ind_store;
  1045 +
  1046 + if (th.data.choice_sort_store == 0) {
  1047 + var index = th.data.fir_pick_index;
  1048 + if (th.data.is_show_sto_cat == 1) {
  1049 + item = th.data.def_pickpu_list[index];
  1050 + } else {
  1051 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  1052 + }
  1053 +
  1054 + } else {
  1055 + var index = th.data.sec_pick_index;
  1056 + item = th.data.sec_sto.s_arr[index];
  1057 + }
  1058 +
  1059 + if(!item) return false;
  1060 +
  1061 + if (!th.data.sele_g) return false;
  1062 +
  1063 + th.setData({
  1064 + def_pick_store: item,
  1065 + sto_sele_name: item.pickup_name,
  1066 + sto_sele_id: item.pickup_id,
  1067 + sto_sele_distr: item.distr_type,
  1068 + store: 0,
  1069 + choice_sort_store: 0,
  1070 + fir_pick_index: 0,
  1071 + openSpecModal: !0,
  1072 + });
  1073 +
  1074 +
  1075 + },
  1076 + //---点击二级之后的选择---
  1077 + choose_for_store: function (e) {
  1078 + var index_c = e.currentTarget.dataset.ind;
  1079 + var th = this;
  1080 + th.setData({
  1081 + sec_pick_index: index_c,
  1082 + fir_pick_index: index_c
  1083 + })
  1084 +
  1085 + },
  1086 + //把选择的门店设置成默认的门店def_pick
  1087 + set_def_pick: function (e) {
  1088 + var th = this;
  1089 + var item = null;
  1090 + if (th.data.choice_sort_store == 0) {
  1091 + var index = th.data.fir_pick_index;
  1092 + if (th.data.is_show_sto_cat == 1) {
  1093 + item = th.data.def_pickpu_list[index];
  1094 + } else {
  1095 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  1096 + }
  1097 + } else {
  1098 + var index = th.data.sec_pick_index;
  1099 + item = th.data.sec_sto.s_arr[index];
  1100 + }
  1101 +
  1102 + if(!item) return false;
  1103 +
  1104 + th.setData({
  1105 + def_pick_store: item,
  1106 + sto_sele_name: item.pickup_name,
  1107 + sto_sele_id: item.pickup_id,
  1108 + sto_sele_distr: item.distr_type,
  1109 + store: 0,
  1110 + choice_sort_store: 0,
  1111 + openSpecModal: !0,
  1112 + });
  1113 +
  1114 + var user_id = getApp().globalData.user_id;
  1115 + var def_pickup_id = item.pickup_id;
  1116 + getApp().request.put('/api/weshop/users/update', {
  1117 + data: {
  1118 + user_id: user_id,
  1119 + def_pickup_id: def_pickup_id
  1120 + },
  1121 + success: function (res) {
  1122 + if (res.data.code == 0) {
  1123 + if (th.data.choice_sort_store == 0) th.setData({
  1124 + fir_pick_index: 0
  1125 + });
  1126 + getApp().globalData.pk_store = item;
  1127 + } else {
  1128 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  1129 + }
  1130 +
  1131 + }
  1132 + });
  1133 +
  1134 +
  1135 + },
  1136 + closeSpecModal: function () {
  1137 + this.setData({openSpecModal: 0});
  1138 + },
  1139 +
  1140 + buy_libao: function () {
  1141 + com.buy_libao(this)
  1142 + },
  1143 +
  1144 +
  1145 + clickShare() {
  1146 + // if (!getApp().globalData.user_id) {
  1147 + // getApp().goto("/packageE/pages/togoin/togoin");
  1148 + // return false;
  1149 + // }
  1150 + this.setData({
  1151 + share_hidden: true,
  1152 + });
  1153 + },
  1154 +
  1155 + send() {
  1156 + this.setData({
  1157 + share_hidden: false,
  1158 + });
  1159 + },
  1160 +
  1161 + cancel() {
  1162 + this.setData({
  1163 + share_hidden: false,
  1164 + });
  1165 + },
  1166 +
  1167 +
  1168 + //--定义的保存图片方法,分享团---
  1169 + saveImageToPhotosAlbum: function () {
  1170 + //--先判断会员状态--
  1171 + // var user_info = getApp().globalData.userInfo;
  1172 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1173 + // //getApp().my_warnning("请先登录",0,this);
  1174 + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  1175 + // return false;
  1176 + // }
  1177 +
  1178 + if (this.data.share_hidden) {
  1179 + this.setData({share_hidden: false,});
  1180 + }
  1181 +
  1182 + wx.showLoading({title: '生成中...',})
  1183 + var that = this, th = that;
  1184 + //设置画板显示,才能开始绘图
  1185 + that.setData({
  1186 + canvasHidden: false
  1187 + })
  1188 +
  1189 + var app = getApp();
  1190 + var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
  1191 + var scene = th.data.lbId + "";
  1192 +
  1193 + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
  1194 + if (user_id > 0) {
  1195 + scene += "_" + user_id;
  1196 + }
  1197 + ///二微码
  1198 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  1199 + os.stoid + "?sceneValue=" + scene + "&pageValue=packageF/pages/giftpack/giftpacklist/giftpacklist";
  1200 +
  1201 + // 读取文件成功则OK--
  1202 + wx.getImageInfo({
  1203 + src: path3,
  1204 + success: function (res) {
  1205 + th.get_goods_temp(function () {
  1206 + var vpath = res.path;
  1207 + var context = wx.createCanvasContext('share');
  1208 + // let share_goods_img = th.params.cover_img
  1209 + th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0);
  1210 +
  1211 + //把画板内容绘制成图片,并回调 画板图片路径
  1212 + context.draw(false, function () {
  1213 + setTimeout(function () {
  1214 + wx.canvasToTempFilePath({
  1215 + x: 0,
  1216 + y: 0,
  1217 + width: 750,
  1218 + height: 1217,
  1219 + destWidth: 1.2 * 750 * 750 / that.data.screenWidth,
  1220 + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth,
  1221 + canvasId: 'share',
  1222 + success: function (res) {
  1223 +
  1224 + that.setData({
  1225 + shareImgPath: res.tempFilePath,
  1226 + canvasHidden: true
  1227 + })
  1228 +
  1229 + if (!res.tempFilePath) {
  1230 + wx.showModal({
  1231 + title: '提示',
  1232 + content: '图片绘制中,请稍后重试',
  1233 + showCancel: false
  1234 + })
  1235 + return false;
  1236 + }
  1237 +
  1238 + that.setData({
  1239 + showPoster: true,
  1240 + });
  1241 + wx.hideLoading();
  1242 + }
  1243 + })
  1244 + }, 800)
  1245 +
  1246 + });
  1247 + })
  1248 + },
  1249 + fail: function (res) {
  1250 + console.log(res);
  1251 + wx.hideLoading();
  1252 +
  1253 + }
  1254 + });
  1255 + },
  1256 +
  1257 + //-- 小程序绘制海报 --
  1258 + drawPoster(context, unit, img, vpath, type) {
  1259 + // 1.灰色背景
  1260 + context.setFillStyle('#f2f1f6');
  1261 + context.rect(0, 0, 554 * unit, 899 * unit);
  1262 + context.fill();
  1263 +
  1264 + // 2.商城名称
  1265 + let shopName = this.data.sto_sele_name_1;
  1266 + context.setTextAlign('center');
  1267 + context.setFontSize(26 * unit);
  1268 + context.setFillStyle('black');
  1269 + context.fillText(shopName, 277 * unit, 60 * unit);
  1270 +
  1271 + // 3.推荐来源
  1272 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  1273 + context.setTextAlign('center');
  1274 + context.setFontSize(22 * unit);
  1275 + context.setFillStyle('#96959a');
  1276 + context.fillText(fromText, 277 * unit, 105 * unit);
  1277 +
  1278 + // 4.海报背景
  1279 + context.setFillStyle('white');
  1280 + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit);
  1281 +
  1282 + // 5.商品图片
  1283 + // 图片的x坐标
  1284 + let bg_x = 37 * unit
  1285 + // 图片的y坐标
  1286 + let bg_y = 157 * unit
  1287 + // 图片宽度
  1288 + let bg_w = 480 * unit
  1289 + // 图片高度
  1290 + let bg_h = 474 * unit
  1291 + // 图片圆角
  1292 + let bg_r = 4
  1293 + // 绘制海报背景图片圆角
  1294 + context.save()
  1295 + context.beginPath()
  1296 + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5)
  1297 + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2)
  1298 + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5)
  1299 + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI)
  1300 + context.clip()
  1301 + context.drawImage(img, bg_x, bg_y, bg_w, bg_h);
  1302 + context.restore();
  1303 +
  1304 + // 6.强烈推荐
  1305 + let src = '';
  1306 + context.beginPath();
  1307 + if (type == 0) { // 普通
  1308 + src = '../../../images/share/q_tj.png';
  1309 + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit);
  1310 + context.setFontSize(16 * unit)
  1311 + context.setFillStyle("white")
  1312 + context.setTextAlign('left');
  1313 + context.fillText('强烈推荐', 64 * unit, 668 * unit);
  1314 + }
  1315 +
  1316 +
  1317 + let price = this.data.giftPrice;
  1318 + let giftIntegral = this.data.giftIntegral;
  1319 + context.setFontSize(32 * unit);
  1320 + context.setFillStyle('#DE1117');
  1321 +
  1322 + var price_txt="";
  1323 + if(price || giftIntegral){
  1324 + if(price){
  1325 + price_txt='¥' + price;
  1326 + if(giftIntegral) price_txt+='+';
  1327 + }
  1328 + if(giftIntegral) price_txt+=giftIntegral+'积分';
  1329 + }else{
  1330 + price_txt="¥0";
  1331 + }
  1332 +
  1333 + context.fillText(price_txt, 54 * unit, 735 * unit);
  1334 +
  1335 +
  1336 + var wp= 62 * unit;
  1337 + var hp=765 * unit
  1338 + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit);
  1339 +
  1340 + // 8.商品标题
  1341 + context.setFontSize(20 * unit);
  1342 + context.setFillStyle('#898989');
  1343 + getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1);
  1344 +
  1345 + // 9.小程序码
  1346 + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit);
  1347 + context.setFontSize(16 * unit);
  1348 + context.setFillStyle('#777');
  1349 + context.fillText('长按识别二维码', 378 * unit, 810 * unit);
  1350 +
  1351 + // 10.竖线
  1352 + context.beginPath();
  1353 + context.setFillStyle('#eee');
  1354 + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit);
  1355 + context.fill();
  1356 + },
  1357 +
  1358 +
  1359 + //---市场价划掉---
  1360 + draw_pos_price(context,w,h,market_price,unit){
  1361 +
  1362 + if(!this.is_retail_price) return false;
  1363 +
  1364 + context.setFillStyle("gray")
  1365 + context.setFontSize(22 * unit)
  1366 + var pri0 = "¥" + market_price.toFixed(2);
  1367 + context.fillText(pri0, w, h);
  1368 +
  1369 + var c_h=h-6;
  1370 + context.setStrokeStyle('gray');
  1371 + context.setLineWidth(1 * unit);
  1372 + context.moveTo(w - 5, c_h);
  1373 + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h);
  1374 + context.stroke();
  1375 +
  1376 + },
  1377 +
  1378 + //--获取商品图片的本地缓存,回调写法--
  1379 + get_goods_temp: function (tt) {
  1380 + var ee = this;
  1381 + if (ee.data.share_goods_img) {
  1382 + tt();
  1383 + return false;
  1384 + }
  1385 + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage;
  1386 + //获取商品是分享图信息
  1387 + wx.getImageInfo({
  1388 + src: img_url,
  1389 + success: function (res) {
  1390 + //res.path是网络图片的本地地址
  1391 + ee.data.share_goods_img = res.path;
  1392 + tt();
  1393 + },
  1394 + fail: function (res) {
  1395 + //获取默认空白图
  1396 + wx.getImageInfo({
  1397 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  1398 + success: function(res) {
  1399 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  1400 + tt();
  1401 + }
  1402 + })
  1403 + }
  1404 + });
  1405 + },
  1406 +
  1407 + closePoster() {
  1408 + this.setData({
  1409 + showPoster: false,
  1410 + });
  1411 + },
  1412 + // 保存图片到手机
  1413 + savePic() {
  1414 + getApp().savePic(this);
  1415 + },
  1416 + // 预览海报
  1417 + previewPoster() {
  1418 + getApp().globalData.no_clear=1;
  1419 + wx.previewImage({
  1420 + current: this.data.shareImgPath, // 当前显示图片的http链接
  1421 + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表
  1422 + });
  1423 + },
  1424 +
  1425 +
  1426 +
  1427 +});
0 1428 \ No newline at end of file
... ...
packageF/pages/giftpack/giftpacklist/giftpacklist.json 0 → 100644
  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"
  12 +}
0 13 \ No newline at end of file
... ...
packageF/pages/giftpack/giftpacklist/giftpacklist.wxml 0 → 100644
  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 +
  218 +</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="../../../../pages/giftpack/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>
0 250 \ No newline at end of file
... ...
packageF/pages/giftpack/giftpacklist/giftpacklist.wxss 0 → 100644
  1 +@charset "UTF-8";
  2 +@import '/pages/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 +}
... ...
packageF/pages/giftpack/mygiftpack/mygiftpack.js 0 → 100644
  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 +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 + if(options.transfer){
  36 + let obj=getApp().globalData.ts_trans_data;
  37 + options= JSON.parse(JSON.stringify(obj));
  38 + getApp().globalData.ts_trans_data=null;
  39 + }
  40 +
  41 + this.setData({
  42 + params: options,
  43 + })
  44 + },
  45 +
  46 + init() {
  47 + let options = this.data?.params;
  48 + var th = this;
  49 + this.setData({
  50 + getStorageID: a.stoid,
  51 + getUserID: d.user_id,
  52 + loadingType: 0,
  53 + getDate: i.formatTime(new Date().getTime())
  54 + });
  55 + //-- 获取分享人的ID --
  56 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  57 + if (first_leader) {
  58 + this.setData({
  59 + first_leader,
  60 + })
  61 + //-- user_id代过来免登录 --
  62 + getApp().globalData.first_leader = first_leader;
  63 + //调用接口判断是不是会员
  64 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  65 + if (res.data.code == 0) {
  66 + getApp().globalData.guide_id = res.data.data.id;
  67 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  68 + }
  69 + })
  70 + }
  71 +
  72 + getApp().request.promiseGet("/api/weshop/ad/page?pid=902&store_id=" + os.stoid, {
  73 + data: {
  74 + enabled: 1
  75 + }
  76 + }).then(res => {
  77 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  78 + var a = res.data.data.pageData;
  79 + var tt = {
  80 + 'ad_code': os.imghost + a[0].ad_code,
  81 + 'media_link': '',
  82 + 'ad_weapplink': a[0].ad_weapplink,
  83 + 'bgcolor': a[0].bgcolor,
  84 + };
  85 + th.setData({ ad_data: tt });
  86 + }
  87 + })
  88 + this.getList();
  89 + },
  90 + onShow: function () {
  91 + getApp().check_can_share();
  92 + //--先判断会员状态--
  93 + getApp().is_Single_page(this, function () {
  94 + var user_info = getApp().globalData.userInfo;
  95 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  96 + getApp().goto('/packageE/pages/togoin/togoin');
  97 + return false;
  98 + }
  99 + this.init()
  100 + })
  101 +
  102 +
  103 + },
  104 + getList: function () {
  105 +
  106 + if(this.data.ismore) return false;
  107 + if(this.data.searching) return false;
  108 + this.data.searching=1;
  109 +
  110 + wx.showLoading({
  111 + title: '加载中.',
  112 + })
  113 +
  114 + var th = this;
  115 + let r_q={
  116 + storeId: th.data.getStorageID, //商家ID
  117 + userId: th.data.getUserID, //用户ID
  118 + page: th.data.curpage,
  119 + pageSize: th.data.pageSize
  120 + }
  121 +
  122 + if(this.data.sear_key){
  123 + r_q.key_str=this.data.sear_key;
  124 + }
  125 +
  126 + getApp().request.get('/api/weshop/marketing/my/giftbag/page', {
  127 + isShowLoading: true,
  128 + data: r_q,
  129 + success: function (res) {
  130 +
  131 + th.data.searching=0;
  132 +
  133 + if (res.data.code == 0) {
  134 + th.data.curpage++;
  135 + var arr1 = th.data.wareCard;
  136 + var arr2 = res.data.data.pageData;
  137 +
  138 + for (let j = 0; j <arr2.length ; j++) {
  139 +
  140 + var t_now = ut.gettimestamp();
  141 +
  142 + //---获取日期的时间戳---
  143 + var t_endtime = arr2[j].endTime;
  144 + t_endtime = t_endtime.replace(/-/g, '/');
  145 + var t_date = new Date(t_endtime) / 1000;
  146 +
  147 +
  148 + var t_starttime = arr2[j].starTime;
  149 + t_starttime = t_starttime.replace(/-/g, '/');
  150 + var t_sdate = new Date(t_starttime) / 1000;
  151 +
  152 + if (!arr2[j].iswarelbtype)
  153 + arr2[j].c_state=-2 //无核销商品
  154 + else if (arr2[j].goodsUseState)
  155 + arr2[j].c_state=1 //已核销
  156 + else if (t_date <= t_now)
  157 + arr2[j].c_state=2 //已过期
  158 + else if (t_sdate > t_now)
  159 + arr2[j].c_state=-1 //未开始
  160 + else
  161 + arr2[j].c_state=0 //正常
  162 + }
  163 +
  164 +
  165 + var arr3 = [...arr1, ...arr2];
  166 + var ismore = 0;
  167 + if (arr3.length == res.data.data.total) ismore = 1
  168 + th.setData({
  169 + wareCard: arr3,
  170 + total: res.data.data.total,
  171 + ismore: ismore,
  172 + is_read: 1,
  173 + is_get:1,
  174 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  175 + } else {
  176 + th.setData({
  177 + is_read: 1,
  178 + ismore: 1,
  179 + is_get:1,
  180 + })
  181 + }
  182 +
  183 + wx.hideLoading();
  184 +
  185 + }
  186 +
  187 + });
  188 +
  189 + },
  190 + //销毁界面跳转
  191 + redirectTo: function (e) {
  192 + var th = this;
  193 + var url = e.currentTarget.dataset.url;
  194 + //销毁跳转
  195 + wx.redirectTo({
  196 + url: url
  197 + });
  198 + },
  199 + //不销毁界面跳转
  200 + navigateTo: function (e) {
  201 + var th = this;
  202 + var url = e.currentTarget.dataset.url;
  203 + let is_back = e.currentTarget.dataset.is_back
  204 + if (is_back==1) {
  205 + wx.showToast({
  206 + title: '该礼包已退款',
  207 + icon: 'none',
  208 + duration: 2000
  209 + })
  210 + }else {
  211 + getApp().goto(url);
  212 + }
  213 + },
  214 + //下拉事件
  215 + onReachBottom: function () {
  216 + var th = this;
  217 + if (th.data.total <= th.data.pageSize) return;
  218 + if (th.data.ismore) return;
  219 + th.getList();
  220 + },
  221 +
  222 + //图片失败,默认图片
  223 + bind_bnerr2: function (e) {
  224 + var _errImg = e.target.dataset.errorimg;
  225 + var _errObj = {};
  226 + _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
  227 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  228 + },
  229 +
  230 +
  231 + //--- 分享设置 --
  232 + onShareAppMessage: function (e) {
  233 + getApp().globalData.no_clear=1;
  234 + var curPage = this;
  235 + var pagePath = curPage.route; //当前页面url
  236 + if (pagePath.indexOf('/') != 0) {
  237 + pagePath = '/' + pagePath;
  238 + }
  239 + pagePath += "?first_leader=" + this.data.getUserID;
  240 + return {
  241 + title: "专享礼包",
  242 + path: pagePath,
  243 + }
  244 + },
  245 +
  246 + onShareTimeline() {
  247 + getApp().globalData.no_clear=1;
  248 + return {
  249 + title: '专享礼包',
  250 + imageUrl: this.data.ad_data.ad_code,
  251 + query: "first_leader=" + this.data.getUserID
  252 + }
  253 + },
  254 +
  255 + search_lb(){
  256 + this.data.curpage=0;
  257 + this.searching=0;
  258 + this.setData({ismore:0,is_get:0,wareCard:[]});
  259 + this.getList();
  260 + },
  261 +
  262 + input_sear(e){
  263 + let value = e.detail;
  264 + this.data.sear_key=value;
  265 + }
  266 +
  267 +});
0 268 \ No newline at end of file
... ...
packageF/pages/giftpack/mygiftpack/mygiftpack.json 0 → 100644
  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 + }
  9 +}
0 10 \ No newline at end of file
... ...
packageF/pages/giftpack/mygiftpack/mygiftpack.wxml 0 → 100644
  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="/packageF/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="/packageF/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="/packageF/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="/packageF/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>
  132 +</view>
  133 +<!-- 引入提示组件 -->
  134 +<warn id="warn"></warn>
  135 +<my_confirm id="my_confirm"></my_confirm>
0 136 \ No newline at end of file
... ...
packageF/pages/giftpack/mygiftpack/mygiftpack.wxss 0 → 100644
  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 +}
... ...
packageF/pages/giftpack/newvipgift/newvipgift.js 0 → 100644
  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 +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 + if(options.transfer){
  118 + let obj=getApp().globalData.ts_trans_data;
  119 + options= JSON.parse(JSON.stringify(obj));
  120 + getApp().globalData.ts_trans_data=null;
  121 + }
  122 +
  123 + var th = this;
  124 + th.setData({
  125 + getActId: options.actId,
  126 + giftID: options.giftBagId
  127 + })
  128 +
  129 + },
  130 + onShow: function() {
  131 + //--先判断会员状态--
  132 + var user_info = getApp().globalData.userInfo;
  133 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  134 + getApp().goto('/packageE/pages/togoin/togoin');
  135 + return false;
  136 + }
  137 + this.GetList();
  138 +
  139 + },
  140 + GetReceive: function() {
  141 + var th = this;
  142 + if (th.data.receiveState == '已领取') {
  143 + return false;
  144 + }
  145 + var is_sub = th.data.is_sub; //判断是否重复提交
  146 + if (is_sub == 0) {
  147 + th.setData({
  148 + is_sub: 1
  149 + })
  150 + var json = {
  151 + "actId": th.data.getActId, //活动Id
  152 + "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  153 + "giftBagId": th.data.giftID, //礼包Id
  154 + "storeId": a.stoid, //商家Id
  155 + "userId": d.user_id, //用户ID
  156 + "buyFrom": 2
  157 + };
  158 + var data = JSON.stringify(json);
  159 + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert";
  160 + getApp().request.json_post(url, json,
  161 + function(res) {
  162 + th.setData({
  163 + is_sub: 0
  164 + })
  165 + if (res.data.code == 0) {
  166 + th.setData({
  167 + receiveState: '已领取'
  168 + })
  169 + getApp().my_warnning("领取成功", 1, th);
  170 + } else {
  171 + getApp().my_warnning(res.data.msg, 0, th);
  172 + }
  173 + },
  174 + function(res) {
  175 +
  176 + }, "post"
  177 +
  178 + )
  179 +
  180 + }
  181 + },
  182 + //界面跳转
  183 + goto: function(e) {
  184 + var url = e.currentTarget.dataset.url;
  185 + getApp().goto(url);
  186 + },
  187 + //图片失败,默认图片
  188 + bind_bnerr1: function(e) {
  189 + var th = this;
  190 + var _errImg = e.target.dataset.errorimg;
  191 + var _Img = e.target.dataset.img;
  192 + if (_Img != undefined) {
  193 + var _errObj = {};
  194 + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png";
  195 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  196 + }
  197 + },
  198 +});
0 199 \ No newline at end of file
... ...
packageF/pages/giftpack/newvipgift/newvipgift.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "新人礼",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageF/pages/giftpack/newvipgift/newvipgift.wxml 0 → 100644
  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>
0 177 \ No newline at end of file
... ...
packageF/pages/giftpack/newvipgift/newvipgift.wxss 0 → 100644
  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;
  417 +}
0 418 \ No newline at end of file
... ...
pages/giftpack/payment/payment.js renamed to packageF/pages/giftpack/payment/payment.js
1 1 var e = getApp();
2   -var regeneratorRuntime = require('../../../utils/runtime.js');
  2 +var regeneratorRuntime = require('../../../../utils/runtime.js');
3 3 Page({
4 4 /**
5 5 * 页面的初始数据
... ...
pages/giftpack/payment/payment.json renamed to packageF/pages/giftpack/payment/payment.json
pages/giftpack/payment/payment.wxml renamed to packageF/pages/giftpack/payment/payment.wxml
1   -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 2 <view>
3 3 <!-- 支付成功提示 -->
4 4 <view class="payradio">
... ... @@ -43,7 +43,7 @@
43 43 <!-- 链接 -->
44 44 <view class="fs32">
45 45 <view class="flex-center">
46   - <navigator class="pay_order flex-center" url="/pages/giftpack/mygiftpack/mygiftpack">
  46 + <navigator class="pay_order flex-center" url="/packageF/pages/giftpack/mygiftpack/mygiftpack">
47 47 <view>我的礼包</view>
48 48 </navigator>
49 49 </view>
... ...
pages/giftpack/payment/payment.wxss renamed to packageF/pages/giftpack/payment/payment.wxss
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?transfer=1');
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?transfer=1');
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?transfer=1');
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?transfer=1');
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?transfer=1');
  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?transfer=1');
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?transfer=1');
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>
  1 +<!---- //文字"-->
  2 +<view class="rty">
  3 + <view style="margin-top:260rpx">加载中。。</view>
173 4 </view>
174   -<!-- 引入提示组件 -->
175   -<warn id="warn"></warn>
176   -<my_confirm id="my_confirm"></my_confirm>
177 5 \ 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/public/buy_com.js
... ... @@ -271,7 +271,7 @@ module.exports = {
271 271 that.data.ok_order_sn=order_sn;
272 272  
273 273 var money=that.data.payMoney;
274   - var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;
  274 + var url = "/packageF/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;
275 275 getApp().globalData.no_clear=1;
276 276  
277 277 t_pay.pay_data(res,function (){
... ... @@ -313,7 +313,7 @@ module.exports = {
313 313 //不是详情页面,就不跳转了
314 314 if(!th.data.is_detail) return false;
315 315  
316   - var url='/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId='+id+'&orderSn='+orderSn;
  316 + var url='/packageF/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId='+id+'&orderSn='+orderSn;
317 317 getApp().goto(url);
318 318 },
319 319  
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -9137,9 +9137,9 @@ 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   - url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
  9142 + url = `/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`;
9143 9143 } else {
9144 9144 url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮
9145 9145 };
... ...
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 = {
... ... @@ -1433,7 +1433,7 @@ Page({
1433 1433 if (res.data.code == 0) {
1434 1434 var actid = res.data.data.id; //活动id
1435 1435 var giftBagId = res.data.data.gifBagId; //礼包id
1436   - var nav_url = "/pages/giftpack/festival/festival?actId=" + actid + '&' + 'actType=' + 3 + '&' + 'giftBagId=' + giftBagId;
  1436 + var nav_url = "/packageF/pages/giftpack/festival/festival?actId=" + actid + '&' + 'actType=' + 3 + '&' + 'giftBagId=' + giftBagId;
1437 1437 var swiperimage = th.data.swiperimage;
1438 1438 var actBoundImg = res.data.data.actBoundImg ? res.data.data.actBoundImg : '/miniapp/images/default_g_img.gif';
1439 1439  
... ...
pages/index/index/index.wxml
... ... @@ -644,12 +644,12 @@
644 644 <!-- 新人礼领取图片 -->
645 645 <view class="newreceive flex-center">
646 646 <view class="t-c">
647   - <navigator bindtap="new_nav" hover-class="none">
  647 + <view bindtap="new_nav" hover-class="none">
648 648 <view class="img-box" style="position: relative;">
649 649 <image mode="widthFix" class="receive" src="{{url}}{{new_image==''?'/miniapp/images/newpeople/newreceive.png':new_image}}"></image>
650 650 </view>
651 651  
652   - </navigator>
  652 + </view>
653 653 <image class="close" src="{{url}}/miniapp/images/plus/Close.png" catchtap="close_disgraceful" mode="" />
654 654 <!-- <view class="flex-level"></view> -->
655 655 </view>
... ...
pages/user/assistance/task_assistance.wxml
... ... @@ -195,5 +195,5 @@
195 195  
196 196 <!-- 二维码显示页面 -->
197 197 <canvas canvas-id='share_id' style='width:750rpx;height:1200rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas>
198   -<include src="../../giftpack/public/buy_com.wxml"></include>
  198 +<include src="../../../packageF/giftpack/public/buy_com.wxml"></include>
199 199  
... ...
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("请稍后重试");
... ... @@ -1139,7 +1139,13 @@ Page({
1139 1139  
1140 1140 let t_map={};
1141 1141 for (let i in d_list) {
1142   - let ite=d_list[i];
  1142 + let ite=d_list[i];
  1143 + //专享礼包、移包到F包
  1144 + if (ite.id==10)
  1145 + {
  1146 + d_list[i]["weappurl"]="/packageF/pages/giftpack/mygiftpack/mygiftpack";
  1147 + d_list[i]["new_weappurl"]="/packageF/pages/giftpack/mygiftpack/mygiftpack";
  1148 + }
1143 1149 t_map[ite.name]=ite.id+'';
1144 1150 }
1145 1151 this.setData({
... ...