Commit 3095a6fd19c7f23076f1f54b2eddfe55bbca5dc8

Authored by WXD-SEASON\season
1 parent a0de53c9

F包

Showing 33 changed files with 8217 additions and 0 deletions
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
... ...
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
... ...
packageF/pages/giftpack/payment/payment.js 0 → 100644
  1 +var e = getApp();
  2 +var regeneratorRuntime = require('../../../../utils/runtime.js');
  3 +Page({
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + url: e.globalData.setting.imghost,
  9 + resourceUrl: e.globalData.setting.resourceUrl,
  10 + iurl: e.globalData.setting.imghost,
  11 + allmoney: 0,
  12 + order_sn: "",
  13 + },
  14 +
  15 + /**
  16 + * 生命周期函数--监听页面加载
  17 + */
  18 + onLoad: function (options) {
  19 + wx.setNavigationBarTitle({
  20 + title: '支付成功',
  21 + });
  22 + var money = parseFloat(options.money), order_sn = options.order_sn;
  23 + this.setData({allmoney:money,order_sn:order_sn})
  24 +
  25 +
  26 +
  27 + },
  28 + onReady(){
  29 + // console.error(6666);
  30 + if (this.data.allmoney*1 > 0) {
  31 + var encourage = this.selectComponent("#encourage"); //组件的id
  32 + if (encourage){
  33 + encourage.get_encourage();
  34 + }
  35 + }
  36 + },
  37 +
  38 + goto: function () {
  39 + var url = '/pages/index/index/index';
  40 + getApp().goto(url)
  41 + },
  42 +})
0 43 \ No newline at end of file
... ...
packageF/pages/giftpack/payment/payment.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "支付成功",
  3 + "usingComponents": {
  4 + "show_encourage": "/components/show_encourage/show_encourage"
  5 + }
  6 +}
0 7 \ No newline at end of file
... ...
packageF/pages/giftpack/payment/payment.wxml 0 → 100644
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
  2 +<view>
  3 + <!-- 支付成功提示 -->
  4 + <view class="payradio">
  5 + <!-- 提示框 -->
  6 + <view class="Success_box flex-center">
  7 + <view>
  8 + <view class="flex-center">
  9 + <image src="{{url}}miniapp/images/pay/paysuccess.png"></image>
  10 + </view>
  11 + <view class="Success_box_title fs32">订单支付成功!</view>
  12 + </view>
  13 + </view>
  14 +
  15 + <!-- 支付信息 -->
  16 + <view class="payitem_max fs28">
  17 + <!-- 订单编号 -->
  18 + <view class="payitem flex">
  19 + <view>订单编号 :</view>
  20 + <text selectable="true">{{order_sn}}</text>
  21 + </view>
  22 +
  23 + <!-- 实付金额 -->
  24 + <view class="payitem flex">
  25 + <view>实付金额 :</view>
  26 + <!-- {{filters.toFix()}} -->
  27 + <view class="pay_money">{{filters.toFix(allmoney,2)}}元</view>
  28 + </view>
  29 +
  30 + <!-- 支付方式 -->
  31 + <view class="payitem flex" wx:if="type==1">
  32 + <view>支付方式 :</view>
  33 + <view>微信支付</view>
  34 + </view>
  35 + </view>
  36 + </view>
  37 + <view class="flex-level">
  38 + <view class="line"></view>
  39 + </view>
  40 +
  41 + <!-- 跳转链接 -->
  42 + <view>
  43 + <!-- 链接 -->
  44 + <view class="fs32">
  45 + <view class="flex-center">
  46 + <navigator class="pay_order flex-center" url="/packageF/pages/giftpack/mygiftpack/mygiftpack">
  47 + <view>我的礼包</view>
  48 + </navigator>
  49 + </view>
  50 + <view class="flex-center">
  51 + <navigator class="pay_home flex-center" bindtap="goto">
  52 + <view>回到首页</view>
  53 + </navigator>
  54 + </view>
  55 + </view>
  56 + </view>
  57 +</view>
  58 +
  59 +
  60 +<!-- 满足抽奖提醒 -->
  61 +<show_encourage id="encourage"></show_encourage>
0 62 \ No newline at end of file
... ...
packageF/pages/giftpack/payment/payment.wxss 0 → 100644
  1 +page {
  2 + border-top: 2rpx solid rgb(245, 245, 245);
  3 +}
  4 +.line {
  5 + border-top: 2rpx solid rgb(245, 245, 245);
  6 + width: 700rpx;
  7 +}
  8 +
  9 +.payradio .Success_box {
  10 + padding-top: 45rpx;
  11 + padding-bottom: 45rpx;
  12 +}
  13 +
  14 +.payradio .Success_box .Success_box_title {
  15 + margin-top: 45rpx;
  16 + color: rgb(8, 8, 8);
  17 +}
  18 +
  19 +.payradio image {
  20 + width: 140rpx;
  21 + height: 140rpx;
  22 + display: flex;
  23 +}
  24 +
  25 +.payitem_max {
  26 + padding: 0rpx 55rpx;
  27 + color: rgb(104, 104, 104);
  28 + padding-bottom: 30rpx;
  29 +}
  30 +
  31 +.payitem_max .payitem {
  32 + margin-top: 30rpx;
  33 +}
  34 +
  35 +.payitem_max .payitem .pay_nam {
  36 + width: 200rpx;
  37 +}
  38 +
  39 +.payitem_max .payitem view {
  40 + margin-right: 50rpx;
  41 +}
  42 +.pay_money{
  43 + color: rgb(219, 27, 52);
  44 +}
  45 +
  46 +.pay_User {
  47 + padding-left: 55rpx;
  48 + color: rgb(104, 104, 104);
  49 +}
  50 +
  51 +.pay_User .payitem {
  52 + margin-top: 30rpx;
  53 +}
  54 +
  55 +.pay_User .payitem .pay_Receiving {
  56 + width: 128rpx;
  57 + margin-right: 50rpx;
  58 +}
  59 +
  60 +.pay_User .payitem .pay_name {
  61 + margin-right: 38rpx;
  62 + max-width: 250rpx;
  63 +}
  64 +
  65 +.pay_order {
  66 + margin-top: 115rpx;
  67 + color: rgb(104, 104, 104);
  68 + width: 560rpx;
  69 + height: 62rpx;
  70 + border-radius: 30rpx;
  71 + border: 3rpx solid rgb(209, 209, 209);
  72 +}
  73 +
  74 +.pay_home {
  75 + margin-top: 35rpx;
  76 + color: rgb(255, 255, 255);
  77 + width: 566rpx;
  78 + height: 68rpx;
  79 + border-radius: 30rpx;
  80 + background-color: rgb(219, 27, 52);
  81 +}
  82 +.address{
  83 + width: 470rpx;
  84 +}
0 85 \ No newline at end of file
... ...