From 1bee0608f27f5d2f1aeae59b5d72fd4d0c230539 Mon Sep 17 00:00:00 2001 From: WXD-SEASON\season Date: Sat, 14 Sep 2024 09:54:38 +0800 Subject: [PATCH] 移包 --- app.json | 20 ++++++++++++-------- components/diy_user_my_rights/diy_user_my_rights.js | 2 +- components/promate_pop/promate_pop.js | 4 ++-- packageA/pages/activity_share/activity_share.js | 4 ++-- packageA/pages/jfbuy/jfbuy.js | 2 +- packageA/pages/my_service/tment_eval.js | 2 +- packageA/pages/my_service2/tment_eval.js | 2 +- packageB/pages/evaluate/evaluate.js | 2 +- packageB/pages/luckactivity/luckinfo/luckinfo.js | 2 +- packageB/pages/user/view_comment/view_comment.wxml | 2 +- packageE/pages/cart/cart2/cart2.js | 2 +- packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js | 4 ++-- packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js | 2 +- packageG/pages/user/my_service/tment_eval.js | 2 +- pages/giftpack/birthdaygift/birthdaygift.js | 720 +++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/birthdaygift/birthdaygift.json | 13 ++++++++----- pages/giftpack/birthdaygift/birthdaygift.wxml | 186 +++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/birthdaygift/birthdaygift.wxss | 721 ++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/buygiftpack/giftpackbuy.js | 868 ++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/buygiftpack/giftpackbuy.json | 12 +++++++----- pages/giftpack/buygiftpack/giftpackbuy.wxml | 134 +++----------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/buygiftpack/giftpackbuy.wxss | 262 +++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/evaluategift/evaluategift.js | 239 +++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/evaluategift/evaluategift.json | 11 +++++++---- pages/giftpack/evaluategift/evaluategift.wxml | 185 +++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/evaluategift/evaluategift.wxss | 406 +++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/festival/festival.js | 223 +++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pages/giftpack/festival/festival.json | 11 +++++++---- pages/giftpack/festival/festival.wxml | 185 +++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/festival/festival.wxss | 416 +++++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/giftpacklist/giftpacklist.js | 1430 +++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/giftpacklist/giftpacklist.json | 18 ++++++++---------- pages/giftpack/giftpacklist/giftpacklist.wxml | 251 +++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/giftpacklist/giftpacklist.wxss | 280 +++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/mygiftpack/mygiftpack.js | 265 +++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pages/giftpack/mygiftpack/mygiftpack.json | 15 ++++++++------- pages/giftpack/mygiftpack/mygiftpack.wxml | 137 +++-------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/mygiftpack/mygiftpack.wxss | 271 +++++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/newvipgift/newvipgift.js | 197 +++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/newvipgift/newvipgift.json | 11 +++++++---- pages/giftpack/newvipgift/newvipgift.wxml | 181 +++++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/newvipgift/newvipgift.wxss | 420 ++++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/payment/payment.js | 42 ------------------------------------------ pages/giftpack/payment/payment.json | 6 ------ pages/giftpack/payment/payment.wxml | 61 ------------------------------------------------------------- pages/giftpack/payment/payment.wxss | 84 ------------------------------------------------------------------------------------ pages/giftpack/public/buy_com.js | 536 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/giftpack/public/buy_com.wxml | 266 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/goods/goodsInfo/goodsInfo.js | 2 +- pages/index/index/index.js | 2 +- pages/user/index/index.js | 2 +- 51 files changed, 189 insertions(+), 8932 deletions(-) delete mode 100644 pages/giftpack/payment/payment.js delete mode 100644 pages/giftpack/payment/payment.json delete mode 100644 pages/giftpack/payment/payment.wxml delete mode 100644 pages/giftpack/payment/payment.wxss delete mode 100644 pages/giftpack/public/buy_com.js delete mode 100644 pages/giftpack/public/buy_com.wxml diff --git a/app.json b/app.json index 88e89fd..386bda0 100644 --- a/app.json +++ b/app.json @@ -16,13 +16,9 @@ "pages/user/userqy/userqy", "pages/user/plus/plus", "pages/user/my_service/i_service", - "pages/giftpack/birthdaygift/birthdaygift", - "pages/giftpack/evaluategift/evaluategift", - "pages/giftpack/newvipgift/newvipgift", - "pages/giftpack/payment/payment", - "pages/giftpack/buygiftpack/giftpackbuy", - "pages/giftpack/giftpacklist/giftpacklist", - "pages/giftpack/mygiftpack/mygiftpack", + + + "pages/user/assistance/giftpacklist", "pages/user/assistance/task_assistance", "pages/user/assistance/friend_assistance", @@ -213,7 +209,15 @@ "pages/user/return_goods_list/return_goods_list", "pages/user/return_goods/return_goods", "pages/user/address_list/address_list", - "pages/user/add_address/add_address" + "pages/user/add_address/add_address", + + "pages/giftpack/birthdaygift/birthdaygift", + "pages/giftpack/evaluategift/evaluategift", + "pages/giftpack/newvipgift/newvipgift", + "pages/giftpack/payment/payment", + "pages/giftpack/buygiftpack/giftpackbuy", + "pages/giftpack/giftpacklist/giftpacklist", + "pages/giftpack/mygiftpack/mygiftpack" ] }, diff --git a/components/diy_user_my_rights/diy_user_my_rights.js b/components/diy_user_my_rights/diy_user_my_rights.js index b9f1d4d..45f41dc 100644 --- a/components/diy_user_my_rights/diy_user_my_rights.js +++ b/components/diy_user_my_rights/diy_user_my_rights.js @@ -27,7 +27,7 @@ Component({ var giftbagid = th.properties.b_gift.giftbagid; if (actId != "" && giftbagid != "") { - getApp().goto("/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3); + getApp().goto("/packageF/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3); } else { getApp().showWarning("请稍后重试"); } diff --git a/components/promate_pop/promate_pop.js b/components/promate_pop/promate_pop.js index fb38f5e..ce739f8 100644 --- a/components/promate_pop/promate_pop.js +++ b/components/promate_pop/promate_pop.js @@ -111,9 +111,9 @@ Component({ let url = ''; if (flag == 2) { // flag =1 控制跳转到专享礼包 url = `/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id=${id}&is_act=1`; - // url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; + } else if (flag == 1) { // flag =1 控制跳转到专享礼包 - url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; + url = `/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; } else { url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 }; diff --git a/packageA/pages/activity_share/activity_share.js b/packageA/pages/activity_share/activity_share.js index e681cea..4f668a3 100644 --- a/packageA/pages/activity_share/activity_share.js +++ b/packageA/pages/activity_share/activity_share.js @@ -150,7 +150,7 @@ Page({ //礼包的转发 if(th.data.currentIndex==3) { var lbid=th.data.hui_active.lbId; - var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; + var url="/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; if(getApp().globalData.user_id){ url+="&first_leader="+getApp().globalData.user_id; } @@ -1437,7 +1437,7 @@ Page({ var index=e.currentTarget.dataset.index; var item=this.data.list[index]; var lbid=item.lbId; - var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; + var url="/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; getApp().goto(url); }, diff --git a/packageA/pages/jfbuy/jfbuy.js b/packageA/pages/jfbuy/jfbuy.js index 2cb85d2..9ebad82 100644 --- a/packageA/pages/jfbuy/jfbuy.js +++ b/packageA/pages/jfbuy/jfbuy.js @@ -234,7 +234,7 @@ Page({ // //礼包的转发 // if(th.data.currentIndex==3){ // var lbid=th.data.hui_active.lbId; - // var url="pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; + // var url="packageF/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; // if(getApp().globalData.user_id){ // url+="&first_leader="+getApp().globalData.user_id; // } diff --git a/packageA/pages/my_service/tment_eval.js b/packageA/pages/my_service/tment_eval.js index d5f6c5f..f51b9bf 100644 --- a/packageA/pages/my_service/tment_eval.js +++ b/packageA/pages/my_service/tment_eval.js @@ -252,7 +252,7 @@ Page({ var gifbagid = this.data.gifbagid; console.log(id,"订单", this.data.number), wx.redirectTo({ - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number }); }, diff --git a/packageA/pages/my_service2/tment_eval.js b/packageA/pages/my_service2/tment_eval.js index d5f6c5f..f51b9bf 100644 --- a/packageA/pages/my_service2/tment_eval.js +++ b/packageA/pages/my_service2/tment_eval.js @@ -252,7 +252,7 @@ Page({ var gifbagid = this.data.gifbagid; console.log(id,"订单", this.data.number), wx.redirectTo({ - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number }); }, diff --git a/packageB/pages/evaluate/evaluate.js b/packageB/pages/evaluate/evaluate.js index 20921a2..3e6cef4 100644 --- a/packageB/pages/evaluate/evaluate.js +++ b/packageB/pages/evaluate/evaluate.js @@ -320,7 +320,7 @@ Page({ var ty=this.data.ftype?this.data.ftype:2; var isdg = this.data.isdg wx.redirectTo({ - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType="+ty+"&orderNumber="+this.data.number+"&isdg="+isdg + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType="+ty+"&orderNumber="+this.data.number+"&isdg="+isdg }); }, diff --git a/packageB/pages/luckactivity/luckinfo/luckinfo.js b/packageB/pages/luckactivity/luckinfo/luckinfo.js index a8cf2f4..196e17b 100644 --- a/packageB/pages/luckactivity/luckinfo/luckinfo.js +++ b/packageB/pages/luckactivity/luckinfo/luckinfo.js @@ -1352,7 +1352,7 @@ Page({ break; }; case 6: { - url = `/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&orderSn=${ordersn}&lbId=${buyreceive_id}`; + url = `/packageF/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&orderSn=${ordersn}&lbId=${buyreceive_id}`; break; }; //-- 每月礼包的优化,去列表领取 -- diff --git a/packageB/pages/user/view_comment/view_comment.wxml b/packageB/pages/user/view_comment/view_comment.wxml index e44216d..2bfa8dc 100644 --- a/packageB/pages/user/view_comment/view_comment.wxml +++ b/packageB/pages/user/view_comment/view_comment.wxml @@ -133,7 +133,7 @@ 评价其他 - 点击领取礼品 + 点击领取礼品 diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 4ced60d..3291d9b 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -8245,7 +8245,7 @@ Page({ } else if (flag == 1) { url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 } else { - url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; + url = `/packageF/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; }; // console.log('myurl', url); getApp().goto(url); diff --git a/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js b/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js index 74efcd6..eb45a18 100644 --- a/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js +++ b/packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js @@ -567,7 +567,7 @@ Page({ // var th = this; // var nav_b = th.selectComponent("#nav_b"); //组件的id // nav_b.close_box(); - // nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy"); + // nav_b.set_name("礼包", "/packageF/pages/giftpack/buygiftpack/giftpackbuy"); // }, //--- 分享设置 -- @@ -972,7 +972,7 @@ Page({ } ///二微码 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; + os.stoid + "?sceneValue=" + scene + "&pageValue=packageF/pages/giftpack/giftpacklist/giftpacklist"; // 读取文件成功则OK-- wx.getImageInfo({ diff --git a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js index e62d873..d57f254 100644 --- a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js +++ b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js @@ -1130,7 +1130,7 @@ Page({ } ///二微码 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; + os.stoid + "?sceneValue=" + scene + "&pageValue=packageF/pages/giftpack/giftpacklist/giftpacklist"; // 读取文件成功则OK-- wx.getImageInfo({ diff --git a/packageG/pages/user/my_service/tment_eval.js b/packageG/pages/user/my_service/tment_eval.js index dddc118..a77bc7b 100644 --- a/packageG/pages/user/my_service/tment_eval.js +++ b/packageG/pages/user/my_service/tment_eval.js @@ -251,7 +251,7 @@ Page({ var gifbagid = this.data.gifbagid; console.log(id,"订单", this.data.number), wx.redirectTo({ - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number + url: "/packageF/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number }); }, diff --git a/pages/giftpack/birthdaygift/birthdaygift.js b/pages/giftpack/birthdaygift/birthdaygift.js index 6918a3a..14f7cb5 100644 --- a/pages/giftpack/birthdaygift/birthdaygift.js +++ b/pages/giftpack/birthdaygift/birthdaygift.js @@ -1,716 +1,10 @@ -var i = require("../../../utils/util.js") -const com = require("../../giftpack/public/buy_com.js"); -var e = getApp(), - a = e.globalData.setting, - os = a, - t = e.request, - d = e.globalData; Page({ - data: { - url: a.url, //接口网址 - iurl: a.imghost, //图片前缀网址 - itemShow: false, //项目栏目是否显示 - cardShow: false, //代金券栏目是否显示 - packShow: false, //福利栏目是否显示 - textShow: false, //规则是否显示 - integralShow: true, //积分领取是否显示 - growUpShow: true, //成长值领取是否显示 - itemButton: '', - cardButton: '', - getActId: '', - getActType: '', - giftID: '', - receiveState: 0, - textTitle: '', - getUrl: '', - noShow: false, - cards: [], //礼包内容--礼券 - itemWare: [], //礼包内容--服务项目 - integralTitle: "", - growUpTitle: "", - is_sub: 0, //是否重复领取 - - //门店相关 - ismend: 0, - is_sec_mend: 0, - sto_sele_name: "", //选中的门店名称 - sto_sele_id: "", //选中的门店id - sto_sele_distr: "", //选择的门店的配送方式 - is_show_sto_cat: 1, //是否显示门店分类 - only_pk: null, - all_sto: null, - sec_sto: null, //选择了的门店分类 - pickpu_list: null, //读出的所有门店list - def_pickpu_list: null, //一开始5个门店list - sec_pick_index: 0, //第二级门店选择ID - fir_pick_index: 0, //第一级门店选择ID - all_pick_list: null,//所有的门店先记录起来 - - select_store: 0, //选择更多 - index: 1, - more_store: 0, //选择门店 - sort_store: 0, //门店分类 - choice_sort_store: 0, //选择分类门店 - new_user: 0, //新用户 - - def_pick_store: null, // 默认的门店 - fir_def_store: null, //客户默认的门店的 - lat: null, //维度 - lon: null, //经度 - - is_get_local_ok: 0, //获取坐标是否完成 - region_name: "门店分类", //区域的名字 - is_gps: 1, - open_ind_store: 0, //哪里打开的门店列表的控制属性 - default_store: {}, //创建添加默认门店地址的对象 - - store: 0, - openSpecModal: 0, - }, - GetList:function() { - var th = this; - var url = "/api/weshop/marketing/giftbag/bound/get"; - getApp().request.promiseGet(url, { - isShowLoading: true, - data: { - "actId": th.data.getActId, //活动id - "actType": 4, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 - "storeId": a.stoid, //商家ID - "userId": d.user_id //用户ID - } - }).then(res => { - if (res.data.code == 0) { - th.setData({ - giftID: res.data.data.id, - }) - - if(th.data.pickup_list && res.data.data.lbType.indexOf(',1,')>-1){ - - th.data.is_nd_pk=1; - //-- 检测一下有没有门店 -- - th.check_guide(function (){ - com.wait_for_store_config(th); - com.set_user_mo_store(th, os, function () { - if (th.data.def_pick_store) { - com.check_def_pk(th); - } - }); - com.get_sto(th, os); - }) - } - - if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) { - //礼包内容--礼券 - th.setData({ - cardShow: true, - cards: res.data.data.lbCoupons - }) - } - if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != null) { - //礼包内容--服务项目 - th.setData({ - itemShow: true, - itemWare: res.data.data.lbSM - }) - } - //礼包积分 - if (res.data.data.lbIntegral <= 0) { - if (res.data.data.lbGrowthValue <= 0) { - th.setData({ - packShow: false - }) - } else { - th.setData({ - packShow: false, - integralShow: false, - growUpShow: true - }) - } - - } else { - if (res.data.data.lbGrowthValue > 0) { - th.setData({ - packShow: true - }) - } else { - th.setData({ - packShow: true, - integralShow: true, - growUpShow: false - }) - } - } - th.setData({ - integralTitle: '价值' + res.data.data.lbIntegral + '积分', - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值' - }) - if (res.data.data.receiveState == 0) { - th.setData({ - receiveState: 0 - }) - } else { - th.setData({ - receiveState: 1 - }) - } - - if (res.data.data.actIntro != '') { - th.setData({ - textShow: true, - textTitle: res.data.data.actIntro.replace(/\ { - console.log(res,20000); - if (res.data.code == 0) { - - var sele_g=res.data.data; - - sele_g.giftTitle=sele_g.actName; - sele_g.lbUrl=sele_g.actImg; - - - let birthdayStyle=` - --bg-color:${res.data.data.actBgColor}; - --color:${res.data.data.actFontColor}; - ` - - - if(res.data.data.is_pickup){ - th.data.pickup_list=res.data.data.pickup_list; - sele_g.pickup_list=res.data.data.pickup_list; - sele_g.is_pickup=1; - } - - th.setData({ - bimg: res.data.data.actBoundImg, - birthdayStyle, - sele_g - // actFontColor: res.data.actFontColor, //字体颜色 - // actBgColor: res.data.actBgColor, //背景颜色 - }) - - func(); - - } - }) - }, - //界面跳转 - goto: function(e) { - var url = e.currentTarget.dataset.url; - getApp().goto(url); - }, - //图片失败,默认图片 - bind_bnerr1: function(e) { - var th = this; - var _errImg = e.target.dataset.errorimg; - var _Img = e.target.dataset.img; - if (_Img != undefined) { - var _errObj = {}; - _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; - th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; - } - }, - - buy_libao: function () { - com.buy_libao(this) - }, - - - //-- 选择门店 -- - choice_store: function (ee) { - this.setData({ - keyword:'' - }) - - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({ - url: '/packageE/pages/togoin/togoin', - }) - return false; - } - - var th = this; - var ind = ee.currentTarget.dataset.ind; - var bconfig = th.data.bconfig; - - //如果开启了,则不在选择门店 - // if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) { - // return false; - // } - // if (!th.data.only_pk && !th.data.def_pickpu_list) { - // getApp().confirmBox("门店库存不足", null, 25000, !1); - // return false; - // } - - if (th.data.only_pk && !th.data.only_pk.length) { - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - - - if (bconfig && bconfig.is_sort_storage) { - wx.getLocation({ - type: 'gcj02', - success: function (res) { - - th.data.lat = res.latitude; - th.data.lon = res.longitude; - th.data.is_get_local_ok = 1; - th.setData({ - is_gps: 1 - }); - //th.onShow(); - com.get_sto(th, os); - }, - fail: function (res) { - //th.onShow(); - th.data.is_get_local_ok = 1; - com.get_sto(th, os); - if (res.errCode == 2) { - th.setData({ - is_gps: 0 - }); - if (th.data.is_gps == 0) { - getApp().confirmBox("请开启GPS定位", null, 25000, !1); - } - } else { - th.setData({ - is_gps: "3" - }); - } - - } - }) - } else { - th.data.is_get_local_ok = 1; - com.get_sto(th, os); - } - - if (ind != undefined && ind != null) { - this.setData({ - open_ind_store: ind, - store: 1, - openSpecModal: !1, - openSpecModal_pt: !1, - openSpecModal_flash_normal: !1, - }) - } else { - this.setData({ - store: 1, - openSpecModal: !1, - openSpecModal_pt: !1, - openSpecModal_flash_normal: !1 - - }) - } - }, - //关闭选择门店 - close_popup: function (e) { - var th = this; - this.setData({ - store: 0, - choice_sort_store: 0, - sort_store: 0, - fir_pick_index: 0, - sec_pick_index: 0 - }) - - var openindstore = this.data.open_ind_store; - if (openindstore == 1) { - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, - }); - } else if (openindstore == 2) { - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, - }); - } else if (openindstore == 4) { //4就是拼团 - th.setData({ - openSpecModal_pt: 1, //打开拼团购买界面 - store: 0, //关闭门店 - choice_sort_store: 0, //关闭门店2级 - sort_store: 0, //关闭门店2级 - }); - } else { - th.setData({ - store: 0, - choice_sort_store: 0, - sort_store: 0 - }) - } - - + data: {}, + onLoad: async function(options) { + getApp().globalData.ts_trans_data=options; + getApp().goto('/packageF/pages/giftpack/birthdaygift/birthdaygift'); }, - //选择更多门店 - more_store: function () { - this.setData({ - sort_store: 1 - }); - }, - // 返回按钮 - returns: function () { - this.setData({ - sort_store: 0, - choice_sort_store: 0 - }); - }, - //---选择分类门店--- - choice_sort_store: function (e) { - var index = e.currentTarget.dataset.index; - var region_name = e.currentTarget.dataset.region; - var item = this.data.all_sto[index]; - this.setData({ - region_name: region_name, - sort_store: 0, - choice_sort_store: 1, - sec_i:index, - sec_sto: item, - sec_pick_index: 0 - }); - }, - choose_for_store_fir: function (e) { - var index_c = e.currentTarget.dataset.ind; - var th = this; - th.setData({ - fir_pick_index: index_c - }) - - }, - //确定def_pick为选择的门店 - sure_pick: function (e) { - var th = this; - var item = null; - var openindstore = th.data.open_ind_store; - - if (th.data.choice_sort_store == 0) { - var index = th.data.fir_pick_index; - if (th.data.is_show_sto_cat == 1) { - item = th.data.def_pickpu_list[index]; - } else { - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 - } - - } else { - var index = th.data.sec_pick_index; - item = th.data.sec_sto.s_arr[index]; - } - - if(!item) return false; - - if (!th.data.sele_g) return false; - - th.setData({ - def_pick_store: item, - sto_sele_name: item.pickup_name, - sto_sele_id: item.pickup_id, - sto_sele_distr: item.distr_type, - store: 0, - choice_sort_store: 0, - fir_pick_index: 0, - openSpecModal: !0, - }); - - - }, - //---点击二级之后的选择--- - choose_for_store: function (e) { - var index_c = e.currentTarget.dataset.ind; - var th = this; - th.setData({ - sec_pick_index: index_c, - fir_pick_index: index_c - }) - - }, - //把选择的门店设置成默认的门店def_pick - set_def_pick: function (e) { - var th = this; - var item = null; - if (th.data.choice_sort_store == 0) { - var index = th.data.fir_pick_index; - if (th.data.is_show_sto_cat == 1) { - item = th.data.def_pickpu_list[index]; - } else { - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 - } - } else { - var index = th.data.sec_pick_index; - item = th.data.sec_sto.s_arr[index]; - } - - if(!item) return false; - - th.setData({ - def_pick_store: item, - sto_sele_name: item.pickup_name, - sto_sele_id: item.pickup_id, - sto_sele_distr: item.distr_type, - store: 0, - choice_sort_store: 0, - openSpecModal: !0, - }); - - var user_id = getApp().globalData.user_id; - var def_pickup_id = item.pickup_id; - getApp().request.put('/api/weshop/users/update', { - data: { - user_id: user_id, - def_pickup_id: def_pickup_id - }, - success: function (res) { - if (res.data.code == 0) { - if (th.data.choice_sort_store == 0) th.setData({ - fir_pick_index: 0 - }); - getApp().globalData.pk_store = item; - } else { - getApp().my_warnning("设置默认门店地址失败", 0, th) - } - - } - }); - - - }, - closeSpecModal: function () { - this.setData({openSpecModal: 0}); - }, - - //获取搜索门店输入的值 - input_store: function(e) { - this.setData({ - keyword: e.detail.value - }) - }, - //-- 搜索门店 -- - searchfn(){ - let choice_sort_store = this.data.choice_sort_store - if (choice_sort_store==0) { //全局搜索 - let all_pick_list = this.data.all_pick_list - let def_pickpu_list = this.data.def_pickpu_list - let keyword = this.data.keyword - if (keyword) { - let arr=all_pick_list.filter( item =>{ - let i = item.pickup_name.indexOf(keyword) - if (i > -1) { - return true - }else{ - return false - } - }) - if (arr && arr.length>0) { - if(this.data.is_show_sto_cat==1){ - this.setData({ - def_pickpu_list:arr - }) - }else{ - this.setData({ - only_pk:arr - }) - } - }else{ - wx.showToast({ - title: '没有搜索到门店', - icon: 'none', - duration: 2000 - }) - } - }else{ - if (this.data.is_show_sto_cat==1) { - this.setData({ - def_pickpu_list:all_pick_list.slice(0,10) - }) - }else{ - this.setData({ - only_pk:all_pick_list - }) - } - - } - }else{ //分类下搜索 - let sec_i=this.data.sec_i - let all_sto = this.data.all_sto - let old_all_sto = this.data.old_all_sto - if (!old_all_sto) { - this.setData({ - old_all_sto:JSON.parse(JSON.stringify(all_sto)) - }) - } - let sec_sto= this.data.sec_sto - let sec_arr = this.data.old_all_sto[sec_i].s_arr - let keyword = this.data.keyword - let text='sec_sto.s_arr' - if (keyword) { - let arr=sec_arr.filter( item =>{ - let i = item.pickup_name.indexOf(keyword) - if (i > -1) { - return true - }else{ - return false - } - }) - if (arr && arr.length>0) { - this.setData({ - [text]:arr - }) - }else{ - wx.showToast({ - title: '没有搜索到门店', - icon: 'none', - duration: 2000 - }) - } - }else{ - if(this.data.old_all_sto){ - this.setData({ - [text]: this.data.old_all_sto[sec_i].s_arr - }) - }else{ - this.setData({ - [text]: all_sto[sec_i].s_arr - }) - } - - } - - - } - }, - - check_guide(func){ - var first_leader=this.data.first_leader; - if(!first_leader){ - func(); - return false; - } - if(this.data.is_geted_guide_pick){ - func(); - return false; - } - if(getApp().globalData.guide_pick_id){ - func(); - return false; - } - var th=this; - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { - if (res.data.code == 0) { - getApp().globalData.guide_pick_id= res.data.data.pickup_id; - } - th.data.is_geted_guide_pick=1; - func(); - }) - }, - + //显示加载 + onShow:function(){ }, -}); \ No newline at end of file +}) \ No newline at end of file diff --git a/pages/giftpack/birthdaygift/birthdaygift.json b/pages/giftpack/birthdaygift/birthdaygift.json index ebd948e..0b59e95 100644 --- a/pages/giftpack/birthdaygift/birthdaygift.json +++ b/pages/giftpack/birthdaygift/birthdaygift.json @@ -1,7 +1,10 @@ { - "navigationBarTitleText": "生日礼包", - "usingComponents": { - "warn": "/components/long_warn/long_warn", - "my_confirm": "/components/my_confirm/my_confirm" - } + "windom": { + "navigationBarTitleText": "加载中.", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" + } + } \ No newline at end of file diff --git a/pages/giftpack/birthdaygift/birthdaygift.wxml b/pages/giftpack/birthdaygift/birthdaygift.wxml index 353f3bc..7ce57f8 100644 --- a/pages/giftpack/birthdaygift/birthdaygift.wxml +++ b/pages/giftpack/birthdaygift/birthdaygift.wxml @@ -1,184 +1,4 @@ - - - - - - - - - ______ - - - 生日专享\n你的美丽我来缔造 - - - ______ - - - - - - - - - - - - - - - - - - 免费领取 - - - {{item.fromName}} - - - - - {{item.fromName}} - - - {{"生日可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}} - - - 数量: - {{item.num}} - - - - - - - - - - - - - - - - - - - ——— - - - 生日专享优惠券 - - - ——— - - - - - - - - - 全场通用 - - - 品牌限定 - - - 品类限定 - - - 用途限定 - - - 分类限定 - - - - 包邮券 - - - {{item.sum+"元券"}} - - {{"满"+item.buySum+"元可以用"}} - - - - - - - - - - - - - - - - - - ——— - - - 生日专享福利 - - - ——— - - - - - - - - - - - - - - - - - - - - - - - - - 活动规则: - - - - - - - - - - - - 本活动最终解释权归公司所有,如果有问题请联系客服 - - - - - - - 已领取 - - - - - 一键全部领取 - - - + + + 加载中。。 - - - - \ No newline at end of file diff --git a/pages/giftpack/birthdaygift/birthdaygift.wxss b/pages/giftpack/birthdaygift/birthdaygift.wxss index 3705d65..cc6cc05 100644 --- a/pages/giftpack/birthdaygift/birthdaygift.wxss +++ b/pages/giftpack/birthdaygift/birthdaygift.wxss @@ -1,718 +1,5 @@ -@charset "UTF-8"; -/* Author XGQ - * 2019-10-27 - */ -.image_box { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} -.image_box image { - width: 100%; - height: 690rpx; -} -.top { - margin: -20rpx 28rpx 45rpx 28rpx; - padding: 10rpx 10rpx 70rpx 10rpx; - background-color: #FFFFFF; - border-radius: 0rpx 0rpx 15rpx 15rpx; -} -.top_box { - display: -webkit-box; - display: -webkit-flex; - display: flex; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} -.top_box_text { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - margin: 50rpx 15rpx 20rpx 15rpx; -} -.top_box_text text { - color: #FB6451; - font-size: 40rpx; -} -.top_item { - display: -webkit-box; - display: -webkit-flex; - display: flex; - width: 100%; - margin: 60rpx 0 0 0; -} -.top_item_img { - float: left; - width: 28%; - margin: 0rpx 10rpx 0rpx 20rpx; -} -.top_item_img image { - width: 150rpx; - height: 150rpx; - border-radius: 50%; - border: #F96865 solid 3rpx; -} -.top_item_center { - float: left; - width: 50%; -} -.top_item_center_title { - font-size: 35rpx; - color: #FB6451; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - padding: 0 10rpx 15rpx 0rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} -.top_item_center_ramke { - font-size: 25rpx; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - line-height: 35rpx; - letter-spacing: 0.5rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} -.top_item_button { - float: right; - width: 22%; - padding: 65rpx 20rpx 0 1rpx; -} -.top_item_button button { - font-size: 25rpx; - background: #fd6969; - color: #FFFFFF; - border-radius: 50rpx; - height: 45rpx; - line-height: 45rpx; -} -.top_card { - width: 309rpx; - display: inline-block; - margin: 15rpx; - vertical-align:top; -} -.top_card_box { - background-size: cover; - background-position: center; - background-repeat: no-repeat; - border-radius: 20rpx; - height: 250rpx; - margin: 5rpx; -} -.img1 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); -} -.img2 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); -} -.img3 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); -} -.top_card_tite_box { - width: 100%; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: end; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} -.top_card_tite_a { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #FFFFFF; - background: #ffa7c0; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} -.top_card_tite_b { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #FFFFFF; - background: #50dfdb; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} -.top_card_tite_c { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #FFFFFF; - background: #92cbff; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} -.top_card_tite_d { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #FFFFFF; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} -.top_card_counte { - padding: 40rpx 20rpx 0 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - color: #FFFFFF; - font-size: 40rpx; -} -.top_card_remak { - padding: 20rpx 0 40rpx 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - font-size: 20rpx; - color: #FFFFFF; -} -.top_card_button_a button { - margin: 0 85rpx; - background: #ffa6bc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} -.top_card_button_b button { - margin: 0 85rpx; - background: #50dfdb; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} -.top_card_button_c button { - margin: 0 85rpx; - background: #75bcfc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} -.top_card_button_d button { - margin: 0 85rpx; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} -.top_box_image { - padding: 20rpx 20rpx 20rpx 20rpx; -} -.top_box_image image { - height: 216rpx; - width: 100%; -} -.top_box_image button { - margin: 15rpx 95rpx 0rpx 95rpx; - background: var(--color); - border-radius: 50rpx; - line-height: 60rpx; - height: 60rpx; - color: white; - font-size: 30rpx; -} -.foot_box { - margin: 0 30rpx 40rpx 30rpx; - background: #FFFFFF; - border-radius: 20rpx; -} -.foot_box_title { - font-size: 43rpx; - color: #000000; - padding: 20rpx 30rpx 20rpx 30rpx; -} -.foot_box_text { - font-size: 30rpx; - color: #000000; - line-height: 48rpx; - padding: 20rpx 35rpx 50rpx 30rpx; -} -.button_box { - margin: 50rpx 50rpx 50rpx 50rpx; - text-align: center; -} -.button { - margin: 0 30rpx; - background:#61d3dd; - border-radius: 50rpx; - line-height: 80rpx; - height: 80rpx; - color: white; - font-size: 35rpx; -} -.button_text { - padding-top: 20rpx; - font-size: 20rpx; - color: white; - height: 100rpx; -} -.foot_empty { - height: 90rpx; -} -.foot_button { - display: -webkit-box; - display: -webkit-flex; - display: flex; - margin: 20rpx 0rpx 0rpx 0rpx; - padding: 25rpx 0rpx; - background: #FFFFFF; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - position: fixed; - bottom: 0; - left: 0; - width: 100%; -} -.foot_button_buy { - background:#61d3dd; - color: #FFFFFF; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} -.foot_button_notbuy{ - background: #999999; - color: #FFFFFF; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 30rpx 30rpx 30rpx 30rpx; -} -page { - background-color: #9be0e5; -} -button::after { - border: none; -} -.foot_box_text ._img { - width: 100%; -} -.foot_box_text .img { - line-height: 0; -} - -.lvip { - left: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; -} -.rvip { - right: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; -} - -.font_and_bg { - background-color: var(--bg-color); - color:var(--color); -} - - - -/*-- 和弹出框的组件有关系 --*/ -.xc-width { - width: 100%; -} -.spec-model { - position: fixed; - bottom: 0; - z-index: 20; - background: white; - width: 100%; - /* padding: 0 30rpx; */ - font-size: 32rpx; - box-sizing: border-box; - border-radius: 20rpx 20rpx 0 0; - /* height: 72%; */ -} - -.spec-model .pding { - padding: 0 20rpx; -} -.pding { - padding-top: 20rpx; - padding-left: 20rpx; - height: 81%; - padding-right: 20rpx; - font-size: 26rpx; - color: #ea120f -} - -.spec-goods { - padding: 30rpx 0 20rpx; - /* float: left; */ - width: 100%; - /* border-bottom:2rpx solid #eee; */ -} - -.spec-img { - float: left; - height: 186rpx; - width: 186rpx; - border: 4rpx solid #eee -} - -.spec-goods-info { - float: left; - padding: 0 25rpx; - width: 400rpx; -} - -.spec-goods-name { - font-size: 30rpx; - line-height: 35rpx; - height: 70rpx; - margin: 15rpx 20rpx 25rpx 0; - overflow: hidden; - text-overflow: ellipsis; - color: #333; -} - -.spec-goods-price { - color: #d60021; - font-size: 33rpx; - font-weight: bold; - /* display: flex; */ -} - -.spec-goods-stock { - margin-top: 3rpx; - font-size: 24rpx; - color: #999999; - margin-right: 15rpx; -} - -.spec-name { - clear: both; - padding: 20rpx 0; - font-size: 30rpx; - color: #333; -} -.spec-name+view{ - flex-wrap: wrap; -} -.stores-img { - width: 28rpx; - height: 28rpx; - margin-right: 10rpx; -} -.right-arrow { - width: 15rpx; - height: 15rpx; - border-top: 2rpx solid #d70026; - border-right: 2rpx solid #d70026; - transform: rotate(45deg); - display: inline-block; - margin-bottom: 3rpx; -} - - -.spec-btn { - color: black; - background-color: white; - padding: 10rpx 10rpx; - font-size: 26rpx; - line-height: 28rpx; - float: left; - border: 1rpx solid #dedede; - margin: 4rpx 10rpx 4rpx 0; - border-radius: 4rpx; -} - -.spec-btn-click { - color: white; - background-color: #f23030; - border: 1rpx solid #f23030; -} - -.spec-cart-btns { - /* width: 92%; */ - line-height: 70rpx; - /* margin: 0rpx auto; - margin-top: 160rpx; */ - /* border-radius: 20rpx; */ - /* position: fixed; */ - /* bottom: 50rpx; */ - /* left: 4%; */ - padding: 20rpx; -} - -.spec-cart-btn { - - width: 100%; - font-size: 30rpx; - text-align: center; - color: white; - border-radius: 40rpx; -} - -.spec-cart-btn.w40 { - width: 46%; -} - -.spec-add-cart { - background-color: #ffb03f; -} - -.spec-buy { - background-color: #f23030; - /* margin-left: 34rpx; */ -} - -.spec-cart-disable { - background: #bbbbbb; -} - -.spec-cart-btn-lg { - width: 614rpx; -} - -/* 选择门店的弹窗 */ -.mongolia-layer { - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - z-index: 11; - background: rgba(0, 0, 0, 0.4); - width: 100%; - height: 91.9%; - -} - -.popup-frame { - position: fixed; - z-index: 20; - background: white; - width: 100%; - border-radius: 20rpx 20rpx 0 0; - height: auto; - bottom: 0; -} - -.popup-top { - border-bottom: 1rpx solid #eee; - height: 155rpx; - width: 95%; - margin: auto; - line-height: 155rpx; - -} - -.bg_rights { - border-top: 2rpx solid; - border-right: 2rpx solid; - transform: rotate(45deg); - display: inline-block; - width: 15rpx; - height: 15rpx; - border-color: #da0b31; -} - -.modal-closes { - position: absolute; - right: 30rpx; - top: -15rpx; - height: 25rpx; - -} - -.choose_more { - margin-top: 40rpx; - margin-right: 20rpx; - -} - -.choose_mores { - margin-top: 30rpx; - margin-right: 15rpx; - -} - -.store-list { - width: 95%; - min-height: 700rpx; - overflow-y: scroll; - margin: auto; - max-height: 700rpx; -} - -.store-list .store_choose { - width: 100%; - height: 120rpx; - line-height: 125rpx; - border-bottom: 1rpx solid #eee; - padding: 10rpx 0; -} - -.store-list .store_choose .store { - width: 100%; - margin: auto; - line-height: 37rpx; - padding-left: 20rpx; - -} - -.xc-hook { - width: 35rpx; - height: 35rpx; - transform: rotate(-145deg); - line-height: 37rpx; - text-align: center; -} - -.xc-hooks { - width: 30rpx; - height: 30rpx; - border: 1rpx solid #999; -} - -.address-frame { - width: 93%; - margin-left: 7rpx; - -} - -.nearby_store { - margin-left: 17rpx; -} - -.address_name { - margin-right: 10rpx; - width: 360rpx; - -} - -.address-val { - height: 38rpx; - line-height: 38rpx; - -} - -.store-bottom { - width: 85%; - margin: auto; - height: 90rpx; -} - -.searchbar { - height: 95rpx; - border-bottom: 2rpx solid rgb(238, 238, 238); -} -.storeListpadd { - padding: 0rpx 31rpx; -} -.search { - width: 125rpx; - height: 45rpx; - line-height: 45rpx; - background-color: rgb(219, 27, 52); - border-radius: 30rpx; - color: rgb(255, 255, 255); -} -.inputstore { - width: 510rpx; - height: 43rpx; - line-height: 43rpx; - border-radius: 30rpx; - border: 2rpx solid rgb(238, 238, 238); - padding-left: 30rpx; -} - - - -.determine { - width: 260rpx; - height: 55rpx; - border-radius: 50rpx; - line-height: 55rpx; -} - -.default { - width: 260rpx; - height: 55rpx; - border: 3rpx solid #c8c8c8; - border-radius: 50rpx; - line-height: 55rpx; -} - -.store-bottom-frame { - width: 95%; - margin: auto; - -} - -/* 门店分类列表 */ -.sort_store_list { - max-height: 700rpx; - min-height: 700rpx; - overflow: hidden; - overflow-y: scroll; - width: 95%; - margin: auto; -} - -.sort_store_list .sort-store-frame { - width: 100%; - height: 100rpx; - line-height: 100rpx; - border-bottom: 1rpx solid #eee; - -} - -.sort_store_list .sort-store-frame .sort-store { - width: 94.5%; - margin: auto; +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% } \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js index 0318e4a..d1dc5a0 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.js +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -1,866 +1,10 @@ -var i = require("../../../utils/util.js"); -var ut=i; -var com = require("../public/buy_com.js"); -var e = getApp(), - a = e.globalData.setting, - os = a, - t = e.request, - d = e.globalData; Page({ - data: { - url: a.url, //接口网址 - iurl: a.imghost, //图片前缀网址 - getStorageID: '', - getUserID: '', - wareCard: [], - // page: 0, - // pageSize: 10, - isEmpty: false, - loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore - contentText: { - contentdown: '加载更多', - contentrefresh: '加载中...', - contentnomore: '已加载全部' - }, - ismore: 0, //数据是否全部加载完成 - is_read: 0, //是否查询过我的礼包接口 - curpage: 1, //当前分页数 - pageSize: 10, //页大小 - total: 0, //总数量 - ad_data: null, - first_leader: e.globalData.first_leader || 0, // 推荐人ID - - //门店相关 - ismend: 0, - is_sec_mend: 0, - sto_sele_name: "", //选中的门店名称 - sto_sele_id: "", //选中的门店id - sto_sele_distr: "", //选择的门店的配送方式 - is_show_sto_cat: 1, //是否显示门店分类 - only_pk: null, - all_sto: null, - sec_sto: null, //选择了的门店分类 - pickpu_list: null, //读出的所有门店list - def_pickpu_list: null, //一开始5个门店list - sec_pick_index: 0, //第二级门店选择ID - fir_pick_index: 0, //第一级门店选择ID - all_pick_list: null,//所有的门店先记录起来 - - select_store: 0, //选择更多 - index: 1, - more_store: 0, //选择门店 - sort_store: 0, //门店分类 - choice_sort_store: 0, //选择分类门店 - new_user: 0, //新用户 - - def_pick_store: null, // 默认的门店 - fir_def_store: null, //客户默认的门店的 - lat: null, //维度 - lon: null, //经度 - - is_get_local_ok: 0, //获取坐标是否完成 - region_name: "门店分类", //区域的名字 - is_gps: 1, - open_ind_store: 0, //哪里打开的门店列表的控制属性 - default_store: {}, //创建添加默认门店地址的对象 - old_all_sto:null, - store:0, - openSpecModal:0, - - is_get_guide:0, - keyword:'', //门店搜索 - sec_i:-1,//选中分类门店 下标 - - sear_key:'' - - }, - onLoad: function (options) { - var th=this; - - //定义第一次进入 - this.data.fir_in=1; - - this.setData({ - params: options, - now:Date.parse(new Date()) / 1000, - }) - - getApp().getConfig2(function (e) { - var json_d = JSON.parse(e.switch_list); - th.setData({ - bconfig: e, - sys_switch:json_d - }); - }) - - }, - init() { - var th = this; - let options = this.data?.params; - this.setData({ - getStorageID: a.stoid, - getUserID: d.user_id - }); - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open_cancel(0); - //-- 获取分享人的ID -- - var first_leader = options.first_leader || getApp().globalData.first_leader; - if (first_leader) { - - this.data.is_get_guide=1; - this.setData({ - first_leader, - }) - //-- user_id代过来免登录 -- - getApp().globalData.first_leader = first_leader; - //调用接口判断是不是会员 - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { - if (res.data.code == 0) { - getApp().globalData.guide_id = res.data.data.id; - getApp().globalData.guide_pick_id= res.data.data.pickup_id - } - - com.wait_for_store_config(th); - com.set_user_mo_store(th,os); - - }) - } - - getApp().request.promiseGet("/api/weshop/ad/page?pid=902&store_id=" + os.stoid, { - data: { - enabled: 1 - } - }).then(res => { - if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { - var a = res.data.data.pageData; - var tt = { - 'ad_code': os.imghost + a[0].ad_code, - 'media_link': '', - 'ad_weapplink': a[0].ad_weapplink, - 'bgcolor': a[0].bgcolor, - }; - th.setData({ - ad_data: tt - }); - } - }) - this.getList(); - }, - onShow: function () { - - this.setData({submit:0}) - var th=this; - - //判断是不是第一次进入 - if(this.data.fir_in){ - this.data.fir_in=0; - }else{ - //富友支付插件 - i.fy_back('',0); - com.set_py_fir(); - - - if(th.data.ok_order_sn){ - //-- 通联的第三方支付的返回优化 -- - var money=th.data.payMoney; - var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn; - - ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){ - if(!th.data.ok_order_sn) return false; - getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get", - {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{ - - th.data.ok_order_sn=null; - - if(res.data.code==0 && res.data.data){ - var item=res.data.data; - if(item.payState==1){ - //支付支付,返回首页 - ut.m_toast('支付成功'); - setTimeout(()=>{ - getApp().goto(back_url); - },1000) - - }else{ - //支付支付,返回首页 - ut.m_toast('支付失败'); - } - } - }) - },null,null,1); - - th.data.ok_order_sn=null; - } - - - - - } - - - - getApp().check_can_share(); - - //--先判断会员状态-- - getApp().is_Single_page(this, function () { - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - getApp().goto('/packageE/pages/togoin/togoin'); - return false; - } - - if(!th.data.is_get_guide) { - com.wait_for_store_config(th); - com.set_user_mo_store(th, os); - } - th.data.is_get_guide=0; - - }) - this.init(); - - setTimeout(()=>{ - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - },2000) - - }, - //获取搜索门店输入的值 - input_store: function(e) { - this.setData({ - keyword: e.detail.value - }) - }, - //搜索门店 - searchfn(){ - let choice_sort_store = this.data.choice_sort_store - if (choice_sort_store==0) { //全局搜索 - let all_pick_list = this.data.all_pick_list - let def_pickpu_list = this.data.def_pickpu_list - let keyword = this.data.keyword - if (keyword) { - let arr=all_pick_list.filter( item =>{ - let i = item.pickup_name.indexOf(keyword) - if (i > -1) { - return true - }else{ - return false - } - }) - if (arr && arr.length>0) { - if(this.data.is_show_sto_cat==1){ - this.setData({ - def_pickpu_list:arr - }) - }else{ - this.setData({ - only_pk:arr - }) - } - }else{ - wx.showToast({ - title: '没有搜索到门店', - icon: 'none', - duration: 2000 - }) - } - }else{ - if (this.data.is_show_sto_cat==1) { - this.setData({ - def_pickpu_list:all_pick_list.slice(0,10) - }) - }else{ - this.setData({ - only_pk:all_pick_list - }) - } - - } - }else{ //分类下搜索 - let sec_i=this.data.sec_i - let all_sto = this.data.all_sto - let old_all_sto = this.data.old_all_sto - if (!old_all_sto) { - this.setData({ - old_all_sto:JSON.parse(JSON.stringify(all_sto)) - }) - } - let sec_sto= this.data.sec_sto - let sec_arr = this.data.old_all_sto[sec_i].s_arr - let keyword = this.data.keyword - let text='sec_sto.s_arr' - if (keyword) { - let arr=sec_arr.filter( item =>{ - let i = item.pickup_name.indexOf(keyword) - if (i > -1) { - return true - }else{ - return false - } - }) - if (arr && arr.length>0) { - this.setData({ - [text]:arr - }) - }else{ - wx.showToast({ - title: '没有搜索到门店', - icon: 'none', - duration: 2000 - }) - } - }else{ - if(this.data.old_all_sto){ - this.setData({ - [text]: this.data.old_all_sto[sec_i].s_arr - }) - }else{ - this.setData({ - [text]: all_sto[sec_i].s_arr - }) - } - - } - - - } - }, - //购买礼包 - GetBuyPrice: function (e) { - - var th = this; - var index = e.currentTarget.dataset.index; //活动id - var sele_g=th.data.wareCard[index]; - this.data.payMoney=sele_g.payMoney; - - th.setData({sele_g:sele_g,buyType:2,}) - if(sele_g.is_pickup){ - if(sele_g.pickup_list && th.data.def_pick_store){ - com.check_def_pk(th); - } - com.get_sto(th,os) - th.setData({ - openSpecModal:1 - }) - }else{ - - if(this.data.submit) return false; - - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定购买该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - com.buy_libao(th) - } - - ) - } - - - - - - }, - // 积分兑换 - GetBuyIntegral: function (e) { - var th = this; - var index = e.currentTarget.dataset.index; //活动id - var sele_g=th.data.wareCard[index]; - th.setData({sele_g:sele_g, buyType:1,}) - if(sele_g.is_pickup){ - if(sele_g.pickup_list && th.data.def_pick_store){ - com.check_def_pk(th); - } - com.get_sto(th,os) - th.setData({ - openSpecModal:1 - }) - }else { - - if(this.data.submit) return false; - - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定兑换该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - com.buy_libao(th) - }) - } - - }, - //免费领取 - GetFree: function (e) { - - var th = this; - var index = e.currentTarget.dataset.index; //活动id - var sele_g=th.data.wareCard[index]; - th.setData({sele_g:sele_g, buyType:3,}) - - if(sele_g.is_pickup){ - if(sele_g.pickup_list && th.data.def_pick_store){ - com.check_def_pk(th); - } - com.get_sto(th,os) - th.setData({ - openSpecModal:1 - }) - }else { - if(this.data.submit) return false; - - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定领取该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - com.buy_libao(th) - }) - } + data: {}, + onLoad: async function(options) { + getApp().globalData.ts_trans_data=options; + getApp().goto('/packageF/pages/giftpack/buygiftpack/giftpackbuy'); }, - - getList: function (e) { - - if(this.data.ismore) return false; - if(this.data.searching) return false; - this.data.searching=1; - - wx.showLoading({ - title: '加载中.', - }) - - var th = this; - let r_q={ - storeId: th.data.getStorageID, //商家ID - userId: th.data.getUserID, //用户ID - page: th.data.curpage, - pageSize: th.data.pageSize, - is_share:0 - }; - - if(this.data.sear_key){ - r_q.key_str=this.data.sear_key; - } - - getApp().request.get('/api/weshop/marketing/giftbag/page', { - isShowLoading: true, - data: r_q, - success: function (res) { - - th.data.searching=0; - - if (res.data.code == 0) { - th.data.curpage++; - var arr1 = th.data.wareCard; - var arr2 = res.data.data.pageData; - for (let j = 0; j < arr2.length; j++) { - arr2[j].starTime1=Date.parse(new Date(arr2[j].starTime.replace(/-/g, "/")))/1000 - } - - var arr3 = [...arr1, ...arr2]; - var ismore = 0; - if (arr3.length == res.data.data.total) ismore = 1 - th.setData({ - wareCard: arr3, - total: res.data.data.total, - ismore: ismore, - is_read: 1, - is_get:1 - }), wx.stopPullDownRefresh(); //停止下拉刷新 - - } else { - th.setData({ - is_read: 1, - ismore: 1, - is_get:1 - }) - } - - wx.hideLoading(); - - } - }) - - }, - //销毁界面跳转 - redirectTo: function (e) { - var th = this; - var url = e.currentTarget.dataset.url; - //销毁跳转 - wx.redirectTo({ - url: url - }); - }, - //不销毁界面跳转 - navigateTo: function (e) { - var th = this; - var url = e.currentTarget.dataset.url; - getApp().goto(url); - - }, - //下拉事件 - onReachBottom: function () { - var th = this; - if (th.data.total <= th.data.pageSize) return; - if (th.data.ismore) return; - - th.getList(); - }, - //图片失败,默认图片 - bind_bnerr2: function (e) { - var _errImg = e.target.dataset.errorimg; - var _errObj = {}; - _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; - }, - goto: function (e) { - var th = this; - var url = e.currentTarget.dataset.url; - getApp().goto(url); - }, - - onShareAppMessage: function (e) { - getApp().globalData.no_clear=1; - var curPage = this; - var pagePath = curPage.route; //当前页面url - if (pagePath.indexOf('/') != 0) { - pagePath = '/' + pagePath; - } - pagePath += "?first_leader=" + this.data.getUserID; - return { - title: "专享礼包", - path: pagePath, - } - }, - - // 分享朋友圈 - onShareTimeline() { - getApp().globalData.no_clear=1; - - var user_id=getApp().globalData.user_id; - if(!user_id) user_id=0; - - return { - title: '专享礼包', - imageUrl: this.data.ad_data.ad_code, - query: 'first_leader='+user_id - } - }, - - - - //--- 设置一下默认库存的数量 ---- - set_def_storage(ee) { - var that = this, th = this; - that.data.fir_def_store = ee; - that.setData({ - def_pick_store: ee, - sto_sele_name: ee.pickup_name, - sto_sele_id: ee.pickup_id, - sto_sele_distr: ee.distr_type - }) - }, - // 选择门店 - choice_store: function (ee) { - this.setData({ - keyword:'' - }) - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({ - url: '/packageE/pages/togoin/togoin', - }) - return false; - } - - var th = this; - var ind = ee.currentTarget.dataset.ind; - var bconfig = th.data.bconfig; - - //如果开启了,则不在选择门店 - if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ - return false; - } - - if (!th.data.only_pk && !th.data.def_pickpu_list) { - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - - if (th.data.only_pk && !th.data.only_pk.length) { - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - - - if (bconfig && bconfig.is_sort_storage) { - wx.getLocation({ - type: 'gcj02', - success: function (res) { - - th.data.lat = res.latitude; - th.data.lon = res.longitude; - th.data.is_get_local_ok = 1; - th.setData({ - is_gps: 1 - }); - //th.onShow(); - com.get_sto(th,os); - }, - fail: function (res) { - //th.onShow(); - th.data.is_get_local_ok = 1; - com.get_sto(th,os); - if (res.errCode == 2) { - th.setData({ - is_gps: 0 - }); - if (th.data.is_gps == 0) { - getApp().confirmBox("请开启GPS定位", null, 25000, !1); - } - } else { - th.setData({ - is_gps: "3" - }); - } - - } - }) - } else { - th.data.is_get_local_ok = 1; - com.get_sto(th,os); - } - - if (ind != undefined && ind != null) { - this.setData({ - open_ind_store: ind, - store: 1, - openSpecModal: !1, - openSpecModal_pt: !1, - openSpecModal_flash_normal: !1, - }) - } else { - this.setData({ - store: 1, - openSpecModal: !1, - openSpecModal_pt: !1, - openSpecModal_flash_normal: !1 - - }) - } - }, - //关闭选择门店 - close_popup: function (e) { - var th = this; - this.setData({ - store: 0, - choice_sort_store: 0, - sort_store: 0, - fir_pick_index: 0, - sec_pick_index: 0 - }) - - var openindstore = this.data.open_ind_store; - if (openindstore == 1) { - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, - }); - } else if (openindstore == 2) { - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, - }); - } - else if (openindstore == 4) { //4就是拼团 - th.setData({ - openSpecModal_pt: 1, //打开拼团购买界面 - store: 0, //关闭门店 - choice_sort_store: 0, //关闭门店2级 - sort_store: 0, //关闭门店2级 - }); - } - else { - th.setData({ - store: 0, - choice_sort_store: 0, - sort_store: 0 - }) - } - - - }, - - //选择更多门店 - more_store: function () { - this.setData({ - sort_store: 1 - }); - }, - // 返回按钮 - returns: function () { - this.setData({ - sort_store: 0, - choice_sort_store: 0 - }); - }, - //---选择分类门店--- - choice_sort_store: function (e) { - var index = e.currentTarget.dataset.index; - var region_name = e.currentTarget.dataset.region; - var item = this.data.all_sto[index]; - this.setData({ - region_name: region_name, - sort_store: 0, - choice_sort_store: 1, - sec_sto: item, - sec_i:index, - sec_pick_index: 0 - }); - }, - - choose_for_store_fir: function (e) { - var index_c = e.currentTarget.dataset.ind; - var th = this; - th.setData({ - fir_pick_index: index_c - }) - - }, - - //确定def_pick为选择的门店 - sure_pick: function (e) { - var th = this; - var item = null; - var openindstore = th.data.open_ind_store; - - if (th.data.choice_sort_store == 0) { - var index = th.data.fir_pick_index; - if (th.data.is_show_sto_cat == 1) { - item = th.data.def_pickpu_list[index]; - } else { - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 - } - - } else { - var index = th.data.sec_pick_index; - item = th.data.sec_sto.s_arr[index]; - } - - if(!item) return false; - - if (!th.data.sele_g) return false; - - th.setData({ - def_pick_store: item, - sto_sele_name: item.pickup_name, - sto_sele_id: item.pickup_id, - sto_sele_distr: item.distr_type, - store: 0, - choice_sort_store: 0, - fir_pick_index: 0, - openSpecModal: !0, - }); - - - }, - //---点击二级之后的选择--- - choose_for_store: function (e) { - var index_c = e.currentTarget.dataset.ind; - var th = this; - th.setData({ - sec_pick_index: index_c, - fir_pick_index: index_c - }) - - }, - //把选择的门店设置成默认的门店def_pick - set_def_pick: function (e) { - var th = this; - var item = null; - if (th.data.choice_sort_store == 0) { - var index = th.data.fir_pick_index; - if (th.data.is_show_sto_cat == 1) { - item = th.data.def_pickpu_list[index]; - } else { - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 - } - } else { - var index = th.data.sec_pick_index; - item = th.data.sec_sto.s_arr[index]; - } - - if(!item) return false; - - th.setData({ - def_pick_store: item, - sto_sele_name: item.pickup_name, - sto_sele_id: item.pickup_id, - sto_sele_distr: item.distr_type, - store: 0, - choice_sort_store: 0, - openSpecModal: !0, - }); - - var user_id=getApp().globalData.user_id; - var def_pickup_id = item.pickup_id; - getApp().request.put('/api/weshop/users/update', { - data: { - user_id: user_id, - def_pickup_id: def_pickup_id - }, - success: function (res) { - if (res.data.code == 0) { - if (th.data.choice_sort_store == 0) th.setData({ - fir_pick_index: 0 - }); - getApp().globalData.pk_store = item; - } else { - getApp().my_warnning("设置默认门店地址失败", 0, th) - } - - } - }); - - - - }, - closeSpecModal: function () { - this.setData({openSpecModal: 0}); - }, - - buy_libao:function () { - com.buy_libao(this) - }, - - search_lb(){ - this.data.curpage=0; - this.searching=0; - this.setData({ismore:0,is_get:0,wareCard:[]}); - this.getList(); - }, - - input_sear(e){ - let value = e.detail; - this.data.sear_key=value; - } + //显示加载 + onShow:function(){ }, }) \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.json b/pages/giftpack/buygiftpack/giftpackbuy.json index 2ea7afc..0b59e95 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.json +++ b/pages/giftpack/buygiftpack/giftpackbuy.json @@ -1,8 +1,10 @@ { - "navigationBarTitleText": "礼包列表", - "usingComponents": { - "warn": "/components/long_warn/long_warn", - "my_confirm": "/components/my_confirm/my_confirm", - "lb_sear": "/components/lb_sear/lb_sear" + "windom": { + "navigationBarTitleText": "加载中.", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" } + } \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml index 8340691..7ce57f8 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxml +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml @@ -1,132 +1,4 @@ - - - - - - - - - - - - - - - - - - - 礼包列表 - - - - 我的礼包 - - - - - - - - - - - - - {{items.giftTitle}} - - - - {{"¥"+items.payMoney}} - - - / - - - - {{items.payIntegral}} - 积分 - - - - - {{"零售价:¥"+items.giftPosPrice}} - - - {{"活动开始时间:"+items.starTime}} - - - {{"活动结束时间:"+items.endTime}} - - - - - - {{"已售:"+items.giftQty+"件"}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 当前暂无礼包 - - - 回到首页 - - - - - - - 到底了 - - + + + 加载中。。 - - - - - \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxss b/pages/giftpack/buygiftpack/giftpackbuy.wxss index 7393c1c..cc6cc05 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxss +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxss @@ -1,257 +1,5 @@ -/*引用样式路径*/ -@charset "UTF-8"; -@import '../../goods/goodsInfo/goodsInfo.wxss'; - -page { - /* background-color: #fb7454; */ -} - -.top_img { - -webkit-align-content: center; - align-content: center; -} - -.top_img image { - width: 100%; - -} - -.top_title { - display: -webkit-box; - display: -webkit-flex; - display: flex; - background-color: #fff; - height: 85rpx; - border-radius: 10rpx 10rpx 0rpx 0rpx; - margin: 0rpx 20rpx 0rpx 20rpx; - -webkit-align-content: center; - align-content: center; - margin-bottom: 10rpx; -} - -.top_title_box { - width: 49%; - -webkit-align-content: center; - align-content: center; - text-align: center; - padding: 15rpx; -} - -.top_title_box_S { - width: 1%; - -webkit-align-content: center; - align-content: center; - text-align: center; - margin: 20rpx 0rpx 20rpx 0rpx; - border-left: #000 solid 3rpx; -} - -.top_title_redtext { - font-size: 30rpx; - color: #d61b30; -} - -.top_title_blacktext { - font-size: 30rpx; - color: #000; -} - -.content_box { - background-color: #fff; - margin: 0rpx 20rpx; - border-radius: 10rpx; - margin-bottom: 10rpx; -} - -.content_box_ware { - border-bottom: #f5f5f5 solid 2rpx; - display: -webkit-box; - display: -webkit-flex; - display: flex; -} - -.content_box_img { - margin: 20rpx 20rpx 20rpx 25rpx; - width: 35%; - display: -webkit-box; - display: -webkit-flex; - display: flex; - font-size: 8rpx; - position: relative; -} - -.content_box_img image { - width: 230rpx; - height: 230rpx; -} - -.content_box_title { - width: 65%; - margin: 25rpx 25rpx 10rpx 0rpx; - position: relative; -} - -.content_ware_title { - font-size: 30rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} - -.content_ware_type { - font-size: 32rpx; - color: #c61a34; - margin-top: 10rpx; - position: absolute; - left: 0; - bottom: 100rpx; -} - -.content_ware_price { - font-size: 26rpx; - color: #b9b5b5; - margin-top: 2rpx; - text-decoration: line-through; - position: absolute; - left: 0; - bottom: 70rpx; -} - -.content_ware_time { - font-size: 25rpx; - color: #000; - margin-top: 20rpx; - position: absolute; - left: 0; - bottom: 25rpx; -} -.box_button_buy{ - display: flex; - align-items: center; -} -.content_box_button { - display: flex; - height: 110rpx; - justify-content: space-between; - align-items: center; - padding-left: 20rpx; - padding-right: 25rpx; - line-height: 110rpx; -} - -.box_button_remark text { - font-size: 28rpx; - color: #b9b5b5; -} - -.box_button_dui { - display: inline-block; - width: 160rpx; - height: 50rpx; - font-size: 20rpx; - background: #fff; - color: #000; - line-height: 50rpx; - margin-left: 20rpx; - border-radius: 10rpx; -} - -.box_button_buy { - background: #d41c34; - color: #fff; - border-radius: 10rpx; -} - -.foot_box { - -webkit-align-content: center; - align-content: center; - text-align: center; - margin-top: 15rpx; - margin-bottom: 50rpx; -} - -.foot_box text { - font-size: 25rpx; - color: #fff; -} - -.foot_empty { - background-color: #fff; - height: 375rpx; - margin: 10rpx 20rpx 0rpx 20rpx; - border-radius: 10rpx; - text-align: center; - padding: 150rpx 0rpx 300rpx 0rpx; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.foot_empty image { - width: 400rpx; - height: 273rpx; -} - -.foot_empty text { - font-size: 30rpx; - color: #999; -} - -.foot_empty_button { - background: #ff6363; - margin: 60rpx 230rpx 0rpx 230rpx; - padding: 10rpx; - border-radius: 70rpx; - line-height: 40rpx; -} - -.foot_empty_button text { - font-size: 28rpx; - color: #fff; -} -.After_all { - height: 80rpx; - margin-bottom: 10rpx; - color: rgb(255, 255, 255); -} - -.After_all .Line { - border-top: 3rpx solid rgb(255, 255, 255); - width: 130rpx; -} - -.After_all .end { - margin: 0rpx 15rpx; -} - -.searchbar { - height: 95rpx; - border-bottom: 2rpx solid rgb(238, 238, 238); -} -.storeListpadd { - padding: 0rpx 31rpx; -} -.search { - width: 125rpx; - height: 45rpx; - line-height: 45rpx; - background-color: rgb(219, 27, 52); - border-radius: 30rpx; - color: rgb(255, 255, 255); -} -.inputstore { - width: 510rpx; - height: 43rpx; - line-height: 43rpx; - border-radius: 30rpx; - border: 2rpx solid rgb(238, 238, 238); - padding-left: 30rpx; -} +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% +} \ No newline at end of file diff --git a/pages/giftpack/evaluategift/evaluategift.js b/pages/giftpack/evaluategift/evaluategift.js index f1ef4ee..3b7d39f 100644 --- a/pages/giftpack/evaluategift/evaluategift.js +++ b/pages/giftpack/evaluategift/evaluategift.js @@ -1,235 +1,10 @@ -var i = require("../../../utils/util.js") -var e = getApp(), - a = e.globalData.setting, - os = a, - t = e.request, - d = e.globalData; Page({ - data: { - url: a.url, //接口网址 - iurl: a.imghost, //图片前缀网址 - itemShow: false, //项目栏目是否显示 - cardShow: false, //代金券栏目是否显示 - packShow: false, //福利栏目是否显示 - textShow: false, //规则是否显示 - integralShow: true, //积分领取是否显示 - growUpShow: true, //成长值领取是否显示 - itemButton: '', - cardButton: '', - getActId: '', - getActType: '', - giftBagId: '', - receiveState: 0, - textTitle: '', - getUrl: '', - noShow: false, - cards: [], //礼包内容--礼券 - itemWare: [], //礼包内容--服务项目 - integralTitle: "", - growUpTitle: "", - is_sub: 0, //是否重复领取 - orderNumber: "", //订单号 - orderGoodsId: "", //商品id - orderType:1, - isdg:0, - - weappurltitle:"进入商城购物", - weappurl:"/pages/index/index/index", - - }, - GetList: function() { - var th = this; - wx.showLoading({ - title: '加载中', - }) - var url = "/api/weshop/marketing/giftbag/bound/get"; - getApp().request.promiseGet(url, { - isShowLoading: true, - data: { - "actId": th.data.getActId, //活动Id - "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "storeId": a.stoid, //商家Id - "userId": d.user_id, //用户ID - "orderNumber": th.data.orderNumber, - "orderType": th.data.orderType, - "orderGoodsId": th.data.orderGoodsId, - "gifbagid": th.data.giftBagId, - "isdg": th.data.isdg - } - }).then(res => { - if (res.data.code == 0) { - if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) { - //礼包内容--礼券 - th.setData({ - cardShow: true, - cards: res.data.data.lbCoupons - }) - } - if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != null) { - //礼包内容--服务项目 - th.setData({ - itemShow: true, - itemWare: res.data.data.lbSM - }) - } - //礼包积分 - if (res.data.data.lbIntegral <= 0) { - if (res.data.data.lbGrowthValue <= 0) { - th.setData({ - packShow: false - }) - } else { - th.setData({ - packShow: false, - integralShow: false, - growUpShow: true - }) - } - - } else { - if (res.data.data.lbGrowthValue > 0) { - th.setData({ - packShow: true - }) - } else { - th.setData({ - packShow: true, - integralShow: true, - growUpShow: false - }) - } - } - th.setData({ - integralTitle: '价值' + res.data.data.lbIntegral + '积分', - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值' - }) - if (res.data.data.receiveState == 0) { - th.setData({ - receiveState:0 - }) - } else { - th.setData({ - receiveState: 1 - }) - } - - if (res.data.data.actIntro != '') { - th.setData({ - textShow: true, - textTitle: res.data.data.actIntro.replace(/\ - - - - - - - - ______ - - - 评价专享\n你的美丽我来缔造 - - - ______ - - - - - - - - - - - - - - - - - - 免费领取 - - - {{item.fromName}} - - - - - {{item.fromName}} - - - {{"评价可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}} - - - 数量: - {{item.num}} - - - - - - - - - - - - - - - - - - - ——— - - - 评价专享优惠券 - - - ——— - - - - - - - - - 全场通用 - - - 品牌限定 - - - 品类限定 - - - 用途限定 - - - 分类限定 - - - - 包邮券 - - - {{item.sum+"元券"}} - - {{"满"+item.buySum+"元可以用"}} - - - - - - - - - - - - - - - - - - ——— - - - 评价专享福利 - - - ——— - - - - - - - - - - - - - - - - - - - - - - - - - 活动规则: - - - - - - - - - - - - 本活动最终解释权归公司所有,如果有问题请联系客服 - - - - - - - 已领取 - - - - - 一键全部领取 - - - + + + 加载中。。 - - - \ No newline at end of file diff --git a/pages/giftpack/evaluategift/evaluategift.wxss b/pages/giftpack/evaluategift/evaluategift.wxss index a9d2a14..cc6cc05 100644 --- a/pages/giftpack/evaluategift/evaluategift.wxss +++ b/pages/giftpack/evaluategift/evaluategift.wxss @@ -1,401 +1,5 @@ -@charset "UTF-8"; - -/* Author XGQ - * 2019-10-27 - */ - -.image_box { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.image_box image { - width: 100%; - height: 690rpx; -} - -.top { - margin: -20rpx 28rpx 45rpx 28rpx; - padding: 10rpx 10rpx 70rpx 10rpx; - background-color: #fff; - border-radius: 0rpx 0rpx 15rpx 15rpx; -} - -.top_box { - display: -webkit-box; - display: -webkit-flex; - display: flex; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.top_box_text { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - margin: 50rpx 15rpx 20rpx 15rpx; -} - -.top_box_text text { - color: rgb(71, 132, 239); - font-size: 40rpx; -} - -.top_item { - display: -webkit-box; - display: -webkit-flex; - display: flex; - width: 100%; - margin: 60rpx 0 0 0; -} - -.top_item_img { - float: left; - width: 28%; - margin: 0rpx 10rpx 0rpx 20rpx; -} - -.top_item_img image { - width: 150rpx; - height: 150rpx; - border-radius: 50%; - border: #f96865 solid 3rpx; -} - -.top_item_center { - float: left; - width: 50%; -} - -.top_item_center_title { - font-size: 35rpx; - color: rgb(71, 132, 239); - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - padding: 0 10rpx 15rpx 0rpx; - word-break: break-all; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; -} - -.top_item_center_ramke { - font-size: 25rpx; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - line-height: 35rpx; - letter-spacing: 0.5rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} - -.top_item_button { - float: right; - width: 22%; - padding: 65rpx 20rpx 0 1rpx; -} - -.top_item_button button { - font-size: 25rpx; - background: #fd6969; - color: #fff; - border-radius: 50rpx; - height: 45rpx; - line-height: 45rpx; -} - -.top_card { - width: 309rpx; - display: inline-block; - margin: 15rpx; - vertical-align:top; -} - -.top_card_box { - background-size: cover; - background-position: center; - background-repeat: no-repeat; - border-radius: 20rpx; - height: 250rpx; - margin: 5rpx; -} - -.img1 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); -} - -.img2 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); -} - -.img3 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); -} - -.top_card_tite_box { - width: 100%; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: end; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} - -.top_card_tite_a { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #ffa7c0; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_b { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #50dfdb; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_c { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #92cbff; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_d { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_counte { - padding: 40rpx 20rpx 0 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - color: #fff; - font-size: 40rpx; -} - -.top_card_remak { - padding: 20rpx 0 40rpx 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - font-size: 20rpx; - color: #fff; -} - -.top_card_button_a button { - margin: 0 85rpx; - background: #ffa6bc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_b button { - margin: 0 85rpx; - background: #50dfdb; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_c button { - margin: 0 85rpx; - background: #75bcfc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_d button { - margin: 0 85rpx; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_box_image { - padding: 20rpx 20rpx 20rpx 20rpx; -} - -.top_box_image image { - height: 216rpx; - width: 100%; -} - -.top_box_image button { - margin: 15rpx 95rpx 0rpx 95rpx; - background: #fe6a6a; - border-radius: 50rpx; - line-height: 60rpx; - height: 60rpx; - color: white; - font-size: 30rpx; -} - -.foot_box { - margin: 0 30rpx 40rpx 30rpx; - /* background: #FFFFFF; */ - border-radius: 20rpx; - background-color: rgb(255, 255, 255); -} - -.foot_box_title { - /* color: #000000; */ - padding: 20rpx 30rpx 20rpx 30rpx; -} - -.foot_box_text { - font-size: 30rpx; - /* color: #000000; */ - line-height: 48rpx; - padding: 20rpx 35rpx 50rpx 30rpx; -} - -.button_box { - margin: 50rpx 50rpx 50rpx 50rpx; - text-align: center; -} - -.button { - margin: 0 30rpx; - background: rgb(93, 147, 245); - border-radius: 50rpx; - line-height: 80rpx; - height: 80rpx; - color: rgb(255, 255, 255); - font-size: 35rpx; -} - -.button_text { - padding-top: 20rpx; - font-size: 22rpx; - color: white; - height: 100rpx; -} - -.foot_empty { - height: 90rpx; -} - -.foot_button { - display: -webkit-box; - display: -webkit-flex; - display: flex; - margin: 20rpx 0rpx 0rpx 0rpx; - padding: 25rpx 0rpx; - background: #fff; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - position: fixed; - bottom: 0; - left: 0; - width: 100%; -} - -.foot_button_buy { - background: rgb(71, 132, 239); - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -.foot_button_notbuy { - background: #999; - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -page { - background-color: rgb(71, 132, 239); -} - -button::after { - border: none; -} - -.foot_box_text ._img { - width: 100%; -} - -.foot_box_text .img { - line-height: 0; -} -.num { - color: rgb(71, 132, 239); -} - -.lvip { - left: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; -} - -.rvip { - right: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; -} +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% +} \ No newline at end of file diff --git a/pages/giftpack/festival/festival.js b/pages/giftpack/festival/festival.js index 645397a..7d58e26 100644 --- a/pages/giftpack/festival/festival.js +++ b/pages/giftpack/festival/festival.js @@ -1,219 +1,10 @@ -var i = require("../../../utils/util.js") -var e = getApp(), - a = e.globalData.setting, - os = a, - t = e.request, - d = e.globalData; Page({ - data: { - url: a.url, //接口网址 - iurl: a.imghost, //图片前缀网址 - itemShow: false, //项目栏目是否显示 - cardShow: false, //代金券栏目是否显示 - packShow: false, //福利栏目是否显示 - textShow: false, //规则是否显示 - integralShow: true, //积分领取是否显示 - growUpShow: true, //成长值领取是否显示 - itemButton: '', - cardButton: '', - getActId: '', - getActType: '', - giftID: '', - receiveState: 0, - textTitle: '', - getUrl: '', - noShow: false, - cards: [], //礼包内容--礼券 - itemWare: [], //礼包内容--服务项目 - integralTitle: "", - growUpTitle: "", - is_sub: 0, //是否重复领取 - bimg: "", //评价有礼背景图片 - actFontColor: "", //字体颜色 - actBgColor: "", //背景颜色 + data: {}, + onLoad: async function(options) { + getApp().globalData.ts_trans_data=options; + getApp().goto('/packageF/pages/giftpack/festival/festival'); }, - GetList: function() { - var th = this; - wx.showLoading({ - title: '加载中', - }) - var url = "/api/weshop/marketing/giftbag/bound/get"; - getApp().request.promiseGet(url, { - isShowLoading: true, - data: { - "actId": th.data.getActId, //活动id - "actType": 3, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 - "giftBagId": th.data.giftID, //礼包ID - "storeId": a.stoid, //商家ID - "userId": d.user_id //用户ID - } - }).then(res => { - if (res.data.code == 0) { - if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length > 0) { - //礼包内容--礼券 - th.setData({ - cardShow: true, - cards: res.data.data.lbCoupons - }) - } - if (res.data.data.lbSM != null && res.data.data.lbSM.length > 0) { - //礼包内容--服务项目 - th.setData({ - itemShow: true, - itemWare: res.data.data.lbSM - }) - } - //礼包积分 - if (res.data.data.lbIntegral <= 0) { - if (res.data.data.lbGrowthValue <= 0) { - th.setData({ - packShow: false - }) - } else { - th.setData({ - packShow: false, - integralShow: false, - growUpShow: true - }) - } + //显示加载 + onShow:function(){ }, - } else { - if (res.data.data.lbGrowthValue > 0) { - th.setData({ - packShow: true - }) - } else { - th.setData({ - packShow: true, - integralShow: true, - growUpShow: false - }) - } - } - th.setData({ - integralTitle: '价值' + res.data.data.lbIntegral + '积分', - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值' - }) - if (res.data.data.receiveState == 0) { - th.setData({ - receiveState: 0 - }) - } else { - th.setData({ - receiveState: 1 - }) - } - - if (res.data.data.actIntro != '') { - th.setData({ - textShow: true, - textTitle: res.data.data.actIntro.replace(/\ { - if (res.data.code == 0) { - th.setData({ - bimg: res.data.data.actImg, - actFontColor: res.data.data.actFontColor, //字体颜色 - actBgColor: res.data.data.actBgColor, //背景颜色 - }) - } - }) - }, - //界面跳转 - goto: function(e) { - var url = e.currentTarget.dataset.url; - getApp().goto(url); - }, - //图片失败,默认图片 - bind_bnerr1: function(e) { - var th = this; - var _errImg = e.target.dataset.errorimg; - var _Img = e.target.dataset.img; - if (_Img != undefined) { - var _errObj = {}; - _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; - th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; - } - }, -}); \ No newline at end of file +}) \ No newline at end of file diff --git a/pages/giftpack/festival/festival.json b/pages/giftpack/festival/festival.json index 3e38fd3..0b59e95 100644 --- a/pages/giftpack/festival/festival.json +++ b/pages/giftpack/festival/festival.json @@ -1,7 +1,10 @@ { - "navigationBarTitleText": "节日有礼", - "usingComponents": { - "warn": "/components/long_warn/long_warn", - "my_confirm": "/components/my_confirm/my_confirm" + "windom": { + "navigationBarTitleText": "加载中.", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" } + } \ No newline at end of file diff --git a/pages/giftpack/festival/festival.wxml b/pages/giftpack/festival/festival.wxml index c50539e..7ce57f8 100644 --- a/pages/giftpack/festival/festival.wxml +++ b/pages/giftpack/festival/festival.wxml @@ -1,183 +1,4 @@ - - - - - - - - - ______ - - - 节日专享\n你的美丽我来缔造 - - - ______ - - - - - - - - - - - - - - - - - - 免费领取 - - - {{item.fromName}} - - - - - {{item.fromName}} - - - {{"节日可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}} - - - 数量: - {{item.num}} - - - - - - - - - - - - - - - - - - - ——— - - - 节日专享优惠券 - - - ——— - - - - - - - - - 全场通用 - - - 品牌限定 - - - 品类限定 - - - 用途限定 - - - 分类限定 - - - - 包邮券 - - - {{item.sum+"元券"}} - - {{"满"+item.buySum+"元可以用"}} - - - - - - - - - - - - - - - - - - ——— - - - 节日专享福利 - - - ——— - - - - - - - - - - - - - - - - - - - - - - - - - 活动规则: - - - - - - - - - - - - 本活动最终解释权归公司所有,如果有问题请联系客服 - - - - - - - 已领取 - - - - - 一键全部领取 - - - + + + 加载中。。 - - - \ No newline at end of file diff --git a/pages/giftpack/festival/festival.wxss b/pages/giftpack/festival/festival.wxss index d7ae42b..cc6cc05 100644 --- a/pages/giftpack/festival/festival.wxss +++ b/pages/giftpack/festival/festival.wxss @@ -1,411 +1,5 @@ -@charset "UTF-8"; - -/* Author XGQ - * 2019-10-27 - */ - -.image_box { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.image_box image { - width: 100%; - height: 690rpx; -} - -.top { - margin: 0rpx 28rpx 45rpx 28rpx; - padding: 10rpx 10rpx 70rpx 10rpx; - background-color: #fff; - border-radius: 0rpx 0rpx 15rpx 15rpx; -} - -.top_box { - display: -webkit-box; - display: -webkit-flex; - display: flex; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.top_box_text { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - margin: 20rpx 15rpx 20rpx 15rpx; -} - -.top_box_text text { - color: #FFB72D; - font-size: 40rpx; -} - -.top_item { - display: -webkit-box; - display: -webkit-flex; - display: flex; - width: 100%; - margin: 60rpx 0 0 0; -} - -.top_item_img { - float: left; - width: 28%; - margin: 0rpx 10rpx 0rpx 20rpx; -} - -.top_item_img image { - width: 150rpx; - height: 150rpx; - border-radius: 50%; - border: #f96865 solid 3rpx; -} - -.top_item_center { - float: left; - width: 50%; -} - -.top_item_center_title { - font-size: 35rpx; - color: #FFB72D; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - padding: 0 10rpx 15rpx 0rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} - -.top_item_center_ramke { - font-size: 25rpx; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - line-height: 35rpx; - letter-spacing: 0.5rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} - -.top_item_button { - float: right; - width: 22%; - padding: 65rpx 20rpx 0 1rpx; -} - -.top_item_button button { - font-size: 25rpx; - background: #fd6969; - color: #fff; - border-radius: 50rpx; - height: 45rpx; - line-height: 45rpx; -} - -.top_card { - width: 309rpx; - display: inline-block; - margin: 15rpx; - vertical-align:top; -} - -.top_card_box { - background-size: cover; - background-position: center; - background-repeat: no-repeat; - border-radius: 20rpx; - height: 250rpx; -} - -.img1 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); -} - -.img2 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); -} - -.img3 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); -} - -.top_card_tite_box { - width: 100%; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: end; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} - -.top_card_tite_a { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #ffa7c0; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_b { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #50dfdb; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_c { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #92cbff; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_d { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_counte { - padding: 40rpx 20rpx 0 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - color: #fff; - font-size: 40rpx; -} - -.top_card_remak { - padding: 20rpx 0 40rpx 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - font-size: 20rpx; - color: #fff; -} - -.top_card_button_a button { - margin: 0 85rpx; - background: #ffa6bc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_b button { - margin: 0 85rpx; - background: #50dfdb; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_c button { - margin: 0 85rpx; - background: #75bcfc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_d button { - margin: 0 85rpx; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_box_image { - padding: 20rpx 20rpx 20rpx 20rpx; -} - -.top_box_image image { - height: 216rpx; - width: 100%; -} - -.top_box_image button { - margin: 15rpx 95rpx 0rpx 95rpx; - background: rgb(254,182,44); - border-radius: 50rpx; - line-height: 60rpx; - height: 60rpx; - color: white; - font-size: 30rpx; -} - -.foot_box { - margin: 0 30rpx 40rpx 30rpx; - background: #fff; - border-radius: 20rpx; -} - -.foot_box_title { - color: #000; - padding: 20rpx 30rpx 20rpx 30rpx; -} - -.foot_box_text { - font-size: 30rpx; - color: #000; - line-height: 48rpx; - padding: 20rpx 35rpx 50rpx 30rpx; -} - -.button_box { - margin: 50rpx 50rpx 50rpx 50rpx; - text-align: center; -} - -.button { - margin: 0 30rpx; - background: #FFDB97; - border-radius: 50rpx; - line-height: 80rpx; - height: 80rpx; - color: white; - font-size: 35rpx; -} - -.button_text { - padding-top: 20rpx; - font-size: 20rpx; - color: white; - height: 100rpx; -} - -.foot_empty { - height: 90rpx; -} - -.foot_button { - display: -webkit-box; - display: -webkit-flex; - display: flex; - margin: 20rpx 0rpx 0rpx 0rpx; - padding: 25rpx 0rpx; - background: #fff; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - z-index: 10; -} - -.foot_button_buy { - background: #FFB72D; - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -.foot_button_notbuy { - background: #999; - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -/* page { - background-color: #FFB72D; -} */ - -button::after { - border: none; -} - -.foot_box_text ._img { - width: 100%; -} - -.foot_box_text .img { - line-height: 0; -} - -.image { - width: 400rpx; - height: 200rpx; -} - -.num { - color: #FFB72D; -} - -.lvip { - left: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; -} - -.rvip { - right: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; -} +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% +} \ No newline at end of file diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index 522f8d9..9c76296 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -1,1422 +1,10 @@ -var e = getApp(), - a = e.globalData.setting, - os = a, - t = e.request, - d = e.globalData; -var ut = require("../../../utils/util.js"); -var com = require("../public/buy_com.js"); - Page({ - data: { - url: a.url, //接口网址 - iurl: a.imghost, //图片前缀网址 - isBuy: 0, - getGiftID: '', //礼包id - giftImage: '', - giftTitle: '', - giftDate: '', - giftPrice: '', - giftIntegral: '', - giftPosPrice: '', - giftQty: '', - giftRemark: '', - giftType: '', - actTitle: '', - getUrl: '', - wareCard: [], - orderSn: "", //订单编号 - lbId: "", - code: "", //核销码 - c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期 - is_lb: 0, //是否有礼包 - default_color: null, - first_leader: e.globalData.first_leader || 0, // 推荐人ID - - //门店相关 - ismend: 0, - is_sec_mend: 0, - sto_sele_name: "", //选中的门店名称 - sto_sele_id: "", //选中的门店id - sto_sele_distr: "", //选择的门店的配送方式 - is_show_sto_cat: 1, //是否显示门店分类 - only_pk: null, - all_sto: null, - sec_sto: null, //选择了的门店分类 - pickpu_list: null, //读出的所有门店list - def_pickpu_list: null, //一开始5个门店list - sec_pick_index: 0, //第二级门店选择ID - fir_pick_index: 0, //第一级门店选择ID - all_pick_list: null,//所有的门店先记录起来 - - select_store: 0, //选择更多 - index: 1, - more_store: 0, //选择门店 - sort_store: 0, //门店分类 - choice_sort_store: 0, //选择分类门店 - new_user: 0, //新用户 - - def_pick_store: null, // 默认的门店 - fir_def_store: null, //客户默认的门店的 - lat: null, //维度 - lon: null, //经度 - - is_get_local_ok: 0, //获取坐标是否完成 - region_name: "门店分类", //区域的名字 - is_gps: 1, - open_ind_store: 0, //哪里打开的门店列表的控制属性 - default_store: {}, //创建添加默认门店地址的对象 - - store: 0, - openSpecModal: 0, - - sto_sele_name_1: '', - share_goods_img:'', //礼包的分享图 - giftImageCover:null, - canvasHidden:true, - - screenWidth: 0, - submit:0, - is_detail:1, //是详情页面的购买 - keyword:'', //门店搜索 - sec_i:-1,//选中分类门店 下标 - }, - onLoad: function (options) { - - //定义第一次进入 - this.data.fir_in=1; - - var th = this; - - this.setData({ - params: options, - }) - - getApp().getConfig(function (e) { - th.setData({sto_sele_name_1: e.store_name}) - }) - - getApp().getConfig2(function (e) { - var json_d = JSON.parse(e.switch_list); - th.setData({ - bconfig: e, - sys_switch: json_d, - is_retail_price: json_d.is_retail_price || 0 - }); - }) - - //获取用户设备信息,屏幕宽度 - wx.getSystemInfo({ - success: res => { - th.setData({ - screenWidth: res.screenWidth - }) - } - }); - - }, - init() { - let options = this.data?.params; // this.data == null ? undefined:this.data.params - var th = this; - this.setData({ - getUserID: d.user_id, - getStorageID: a.stoid, - }) - - if(!options.lbId && options.scene){ - var gid_str = decodeURIComponent(options.scene); - gid_str = gid_str.split("_"); - - options.lbId=gid_str[0]; - options.first_leader=gid_str[1]; - options.isBuy=1; - } - - - this.setData({ - isBuy: options.isBuy, - getGiftID: options.lbId, - orderSn: options.orderSn, - flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1 - }) - if (options.lbId) th.data.lbId = options.lbId; - //-- 获取分享人的ID -- - var first_leader = options.first_leader || getApp().globalData.first_leader; - if (first_leader) { - this.setData({ - first_leader, - }) - //-- user_id代过来免登录 -- - getApp().globalData.first_leader = first_leader; - //调用接口判断是不是会员 - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { - if (res.data.code == 0) { - getApp().globalData.guide_id = res.data.data.id; - getApp().globalData.guide_pick_id= res.data.data.pickup_id - } - }) - } - th.close(); - - - if (this.data.flag == 1) { - this.getZxlbDetails(); - } else { - if (this.data.isBuy == 0) { - this.GetMyGiftList(); - } else if (this.data.isBuy == 1) { - this.GetBuyGiftList(); - } - - } - - }, - - onShow: function () { - this.setData({submit:0}) - - var th=this; - //判断是不是第一次进入 - if(this.data.fir_in){ - this.data.fir_in=0; - }else{ - //富友支付插件的判断 - ut.fy_back('',0); - com.set_py_fir(); - - if(th.data.ok_order_sn){ - //-- 通联的第三方支付的返回优化 -- - var money=th.data.payMoney; - var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn; - ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){ - if(!th.data.ok_order_sn) return false; - getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get", - {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{ - - th.data.ok_order_sn=null; - if(res.data.code==0 && res.data.data){ - var item=res.data.data; - if(item.payState==1){ - //支付支付,返回首页 - ut.m_toast('支付成功'); - setTimeout(()=>{ - getApp().goto(back_url); - },1000) - - }else{ - //支付支付,返回首页 - ut.m_toast('支付失败'); - } - } - }) - },null,null,1); - th.data.ok_order_sn=null; - } - - } - - - getApp().check_can_share(this); - getApp().is_Single_page(this, function () { - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - getApp().goto('/packageE/pages/togoin/togoin'); - return false; - } - this.init(); - }) - this.setData({ submit:0}) - }, - //获取搜索门店输入的值 - input_store: function(e) { - this.setData({ - keyword: e.detail.value - }) - }, - //搜索门店 - searchfn(){ - let choice_sort_store = this.data.choice_sort_store - if (choice_sort_store==0) { //全局搜索 - let all_pick_list = this.data.all_pick_list - let def_pickpu_list = this.data.def_pickpu_list - let keyword = this.data.keyword - if (keyword) { - let arr=all_pick_list.filter( item =>{ - let i = item.pickup_name.indexOf(keyword) - if (i > -1) { - return true - }else{ - return false - } - }) - if (arr && arr.length>0) { - if(this.data.is_show_sto_cat==1){ - this.setData({ - def_pickpu_list:arr - }) - }else{ - this.setData({ - only_pk:arr - }) - } - }else{ - wx.showToast({ - title: '没有搜索到门店', - icon: 'none', - duration: 2000 - }) - } - }else{ - if (this.data.is_show_sto_cat==1) { - this.setData({ - def_pickpu_list:all_pick_list.slice(0,10) - }) - }else{ - this.setData({ - only_pk:all_pick_list - }) - } - - } - }else{ //分类下搜索 - let sec_i=this.data.sec_i - let all_sto = this.data.all_sto - let old_all_sto = this.data.old_all_sto - if (!old_all_sto) { - this.setData({ - old_all_sto:JSON.parse(JSON.stringify(all_sto)) - }) - } - let sec_sto= this.data.sec_sto - let sec_arr = this.data.old_all_sto[sec_i].s_arr - let keyword = this.data.keyword - let text='sec_sto.s_arr' - if (keyword) { - let arr=sec_arr.filter( item =>{ - let i = item.pickup_name.indexOf(keyword) - if (i > -1) { - return true - }else{ - return false - } - }) - if (arr && arr.length>0) { - this.setData({ - [text]:arr - }) - }else{ - wx.showToast({ - title: '没有搜索到门店', - icon: 'none', - duration: 2000 - }) - } - }else{ - if(this.data.old_all_sto){ - this.setData({ - [text]: this.data.old_all_sto[sec_i].s_arr - }) - }else{ - this.setData({ - [text]: all_sto[sec_i].s_arr - }) - } - - } - - - } - }, - GetBuyPrice: function (e) { - var that = this.data; - var th = this; - //如果还没有开始的话 - if (th.data.isStart != 1) { - getApp().my_warnning("活动还没有开始", 0, th); - return false; - } - - - this.data.payMoney = th.data.sele_g.payMoney; - th.setData({buyType: 2}) - if (th.data.sele_g.is_pickup) { - th.setData({ - openSpecModal: 1 - }) - } else { - - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定购买该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - - my_confirm.open_cancel(0); - com.buy_libao(th) - } - ) - } - - - }, - GetBuyIntegral: function (e) { - var that = this.data; - var th = this; - - //如果还没有开始的话 - if (th.data.isStart != 1) { - getApp().my_warnning("活动还没有开始", 0, th); - return false; - } - - th.setData({buyType: 1}); - if (th.data.sele_g.is_pickup) { - th.setData({ - openSpecModal: 1 - }) - } else { - var my_confirm = th.selectComponent("#my_confirm"); //组件的id - my_confirm.open( - "是否确定兑换该礼包", - "取消", - "确定", - function () { - my_confirm.open_cancel(0); - }, - function () { - my_confirm.open_cancel(0); - com.buy_libao(th) - }) - } - - - }, - - GetMyGiftList: function () { - var _this = this; - var th = this; - getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', { - isShowLoading: true, - data: { - "storeId": a.stoid, //商家ID - "userId": d.user_id, //用户ID - "orderSn": th.data.orderSn - }, - success: function (res) { - if (res.data.code == 0) { - console.log('商品------++') - console.log(res) - th.setData({ - giftImage: th.data.iurl + res.data.data.lbUrl, - giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), - giftTitle: res.data.data.giftTitle, - default_color: res.data.data.bgcolor - }) - - if (res.data.data.iswarelbtype == 1) { - th.setData({iswarelbtype: 1}) - } - - if (!res.data.data.giftRemark || res.data.data.giftRemark == '') { - th.setData({ - giftRemark: '暂无详情......' - }) - } else { - th.setData({ - giftRemark: res.data.data.giftRemark.replace(/\ t_now) - th.setData({ - c_state: -1 - }) - th.setData({ - giftDate: res.data.data.endTime, - giftPosPrice: res.data.data.giftPosPrice, - giftQty: res.data.data.giftQty, - giftIntegral: res.data.data.payIntegral, - giftPrice: res.data.data.payMoney, - giftType: res.data.data.actType, - actTitle: res.data.data.actTitle, - wareCard: res.data.data.wareCard, - lbId: res.data.data.lbId - }) - //判断是否有礼包 - for (var i = 0; i < res.data.data.wareCard.length; i++) { - if (res.data.data.wareCard[i].lbType == 1) { - th.setData({ - is_lb: 1 - }) - break; - } - } - - if (res.data.data.pickup_id) { - getApp().request.get("/api/weshop/pickup/get/" + os.stoid + "/" + res.data.data.pickup_id, { - success: function (res) { - if (res.data.code == 0) { - th.setData({pick_up: res.data.data}); - } - } - }); - - } - - - } else { - getApp().my_warnning(res.data.msg, 0, th); - return false; - } - } - }); - - }, - - check_guide(func){ - var first_leader=this.data.first_leader; - if(!first_leader){ - func(); - return false; - } - if(this.data.is_geted_guide_pick){ - func(); - return false; - } - if(getApp().globalData.guide_pick_id){ - func(); - return false; - } - var th=this; - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { - if (res.data.code == 0) { - getApp().globalData.guide_pick_id= res.data.data.pickup_id; - } - th.data.is_geted_guide_pick=1; - func(); - }) - }, - - GetBuyGiftList: function () { - var _this2 = this; - var th = this.data; - getApp().request.get('/api/weshop/marketing/giftbag/detail/get', { - isShowLoading: true, - data: { - "storeId": a.stoid, //商家ID - "userId": d.user_id, //用户ID - "giftBagId": th.getGiftID, - isnNewUserLb:1 - }, - success: function success(res) { - if (res.data.code == 0) { - _this2.setData({ - giftImage: th.iurl + res.data.data.lbUrl, - giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl), - giftTitle: res.data.data.giftTitle, - default_color: res.data.data.bgcolor - }) - if (res.data.data.giftRemark == '') { - _this2.setData({ - giftRemark: '暂无详情......' - }) - } else { - _this2.setData({ - giftRemark: res.data.data.giftRemark.replace(/\ { - setTimeout(()=>{ - wx.setClipboardData({ - data: '暂不支持分享', - success (res) { } - }) - },500) - return { query: 'a=1&b=2' } - }) - } - - - var isStart = 0; - var now = ut.gettimestamp(); - - var str = res.data.data.starTime.replace(/-/g, '/'); - var start = Date.parse(new Date(str)); - start = start / 1000; - if (start < now) isStart = 1; - - _this2.setData({ - giftDate: res.data.data.endTime, - giftStart: res.data.data.starTime, - giftPosPrice: res.data.data.giftPosPrice, - giftQty: res.data.data.giftQty, - giftIntegral: res.data.data.payIntegral, - giftPrice: res.data.data.payMoney, - giftType: res.data.data.actType, - actTitle: res.data.data.actTitle, - wareCard: res.data.data.wareCard, - isStart: isStart, - sele_g: res.data.data, - is_share:res.data.data.is_share - }) - - - var sele_g = res.data.data; - //需不需要门店,不需要门店返回 - if (!sele_g.is_pickup) return false; - - //-- 检测一下有没有门店 -- - _this2.check_guide(function (){ - com.wait_for_store_config(_this2); - com.set_user_mo_store(_this2, os, function () { - if (sele_g.pickup_list && _this2.data.def_pick_store) { - com.check_def_pk(_this2); - } - }); - com.get_sto(_this2, os); - }) - - } else { - getApp().my_warnning(res.data.msg, 0, _this2); - - setTimeout(()=>{ - getApp().goto('/pages/index/index/index') - },2000) - - return false; - } - } - }); - - }, - - getZxlbDetails: function () { - - var th = this; - getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', { - isShowLoading: true, - data: { - "storeId": a.stoid, //商家ID - //"userId": d.user_id, //用户ID - "giftBagId": th.data.lbId - }, - success: function (res) { - if (res.data.code == 0) { - th.setData({ - giftImage: th.data.iurl + res.data.data.lbUrl, - giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), - giftTitle: res.data.data.lbTitle, - default_color: res.data.data.bgcolor - }) - if (res.data.data.lbIntro == '') { - th.setData({ - giftRemark: '暂无详情......' - }) - } else { - th.setData({ - giftRemark: res.data.data.lbIntro.replace(/\ 0) { - scene += "_" + user_id; - } - ///二微码 - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; - - // 读取文件成功则OK-- - wx.getImageInfo({ - src: path3, - success: function (res) { - th.get_goods_temp(function () { - var vpath = res.path; - var context = wx.createCanvasContext('share'); - // let share_goods_img = th.params.cover_img - th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0); - - //把画板内容绘制成图片,并回调 画板图片路径 - context.draw(false, function () { - setTimeout(function () { - wx.canvasToTempFilePath({ - x: 0, - y: 0, - width: 750, - height: 1217, - destWidth: 1.2 * 750 * 750 / that.data.screenWidth, - destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, - canvasId: 'share', - success: function (res) { - - that.setData({ - shareImgPath: res.tempFilePath, - canvasHidden: true - }) - - if (!res.tempFilePath) { - wx.showModal({ - title: '提示', - content: '图片绘制中,请稍后重试', - showCancel: false - }) - return false; - } - - that.setData({ - showPoster: true, - }); - wx.hideLoading(); - } - }) - }, 800) - - }); - }) - }, - fail: function (res) { - console.log(res); - wx.hideLoading(); - - } - }); - }, - - //-- 小程序绘制海报 -- - drawPoster(context, unit, img, vpath, type) { - // 1.灰色背景 - context.setFillStyle('#f2f1f6'); - context.rect(0, 0, 554 * unit, 899 * unit); - context.fill(); - - // 2.商城名称 - let shopName = this.data.sto_sele_name_1; - context.setTextAlign('center'); - context.setFontSize(26 * unit); - context.setFillStyle('black'); - context.fillText(shopName, 277 * unit, 60 * unit); - - // 3.推荐来源 - let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; - context.setTextAlign('center'); - context.setFontSize(22 * unit); - context.setFillStyle('#96959a'); - context.fillText(fromText, 277 * unit, 105 * unit); - - // 4.海报背景 - context.setFillStyle('white'); - context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); - - // 5.商品图片 - // 图片的x坐标 - let bg_x = 37 * unit - // 图片的y坐标 - let bg_y = 157 * unit - // 图片宽度 - let bg_w = 480 * unit - // 图片高度 - let bg_h = 474 * unit - // 图片圆角 - let bg_r = 4 - // 绘制海报背景图片圆角 - context.save() - context.beginPath() - context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) - context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) - context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) - context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) - context.clip() - context.drawImage(img, bg_x, bg_y, bg_w, bg_h); - context.restore(); - - // 6.强烈推荐 - let src = ''; - context.beginPath(); - if (type == 0) { // 普通 - src = '../../../images/share/q_tj.png'; - context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); - context.setFontSize(16 * unit) - context.setFillStyle("white") - context.setTextAlign('left'); - context.fillText('强烈推荐', 64 * unit, 668 * unit); - } - - - let price = this.data.giftPrice; - let giftIntegral = this.data.giftIntegral; - context.setFontSize(32 * unit); - context.setFillStyle('#DE1117'); - - var price_txt=""; - if(price || giftIntegral){ - if(price){ - price_txt='¥' + price; - if(giftIntegral) price_txt+='+'; - } - if(giftIntegral) price_txt+=giftIntegral+'积分'; - }else{ - price_txt="¥0"; - } - - context.fillText(price_txt, 54 * unit, 735 * unit); - - - var wp= 62 * unit; - var hp=765 * unit - this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit); - - // 8.商品标题 - context.setFontSize(20 * unit); - context.setFillStyle('#898989'); - getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1); - - // 9.小程序码 - context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); - context.setFontSize(16 * unit); - context.setFillStyle('#777'); - context.fillText('长按识别二维码', 378 * unit, 810 * unit); - - // 10.竖线 - context.beginPath(); - context.setFillStyle('#eee'); - context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); - context.fill(); - }, - - - //---市场价划掉--- - draw_pos_price(context,w,h,market_price,unit){ - - if(!this.is_retail_price) return false; - - context.setFillStyle("gray") - context.setFontSize(22 * unit) - var pri0 = "¥" + market_price.toFixed(2); - context.fillText(pri0, w, h); - - var c_h=h-6; - context.setStrokeStyle('gray'); - context.setLineWidth(1 * unit); - context.moveTo(w - 5, c_h); - context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); - context.stroke(); - - }, - - //--获取商品图片的本地缓存,回调写法-- - get_goods_temp: function (tt) { - var ee = this; - if (ee.data.share_goods_img) { - tt(); - return false; - } - var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage; - //获取商品是分享图信息 - wx.getImageInfo({ - src: img_url, - success: function (res) { - //res.path是网络图片的本地地址 - ee.data.share_goods_img = res.path; - tt(); - }, - fail: function (res) { - //获取默认空白图 - wx.getImageInfo({ - src: ee.data.iurl+'/miniapp/images/default_g_img.gif', - success: function(res) { - ee.data.share_goods_img = res.path; //分享的图片不能用网络的 - tt(); - } - }) - } - }); - }, - - closePoster() { - this.setData({ - showPoster: false, - }); - }, - // 保存图片到手机 - savePic() { - getApp().savePic(this); - }, - // 预览海报 - previewPoster() { - getApp().globalData.no_clear=1; - wx.previewImage({ - current: this.data.shareImgPath, // 当前显示图片的http链接 - urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 - }); - }, - - - -}); \ No newline at end of file + data: {}, + onLoad: async function(options) { + getApp().globalData.ts_trans_data=options; + getApp().goto('/packageF/pages/giftpack/giftpacklist/giftpacklist'); + }, + //显示加载 + onShow:function(){ }, + +}) \ No newline at end of file diff --git a/pages/giftpack/giftpacklist/giftpacklist.json b/pages/giftpack/giftpacklist/giftpacklist.json index dffdf6a..0b59e95 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.json +++ b/pages/giftpack/giftpacklist/giftpacklist.json @@ -1,12 +1,10 @@ { - "navigationBarTitleText": "礼包详情", - "usingComponents": { - "warn": "/components/long_warn/long_warn", - "my_confirm": "/components/my_confirm/my_confirm", - "qr_code": "/components/qr_code/qr_code", - "nav_b": "/components/nav_b/nav_b", - "share": "/components/share/share", - "com_top_nav": "/components/com_top_nav/com_top_nav" - }, - "navigationStyle": "custom" + "windom": { + "navigationBarTitleText": "加载中.", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" + } + } \ No newline at end of file diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxml b/pages/giftpack/giftpacklist/giftpacklist.wxml index 701c8be..7ce57f8 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxml +++ b/pages/giftpack/giftpacklist/giftpacklist.wxml @@ -1,249 +1,4 @@ - - - - - - - - - - - {{pick_up.pickup_name}} - - - - {{giftTitle}} - - - - - - - - - - {{"活动开始时间:"+giftStart}} - - - - - {{"兑换结束时间:"+giftDate}} - - {{"活动结束时间:"+giftDate}} - - - - - - {{"兑换时间:领取后"+exchangeDay+"天内兑换"}} - - - {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}} - - - - - - - - {{"¥"+giftPrice}} - - - / - - - {{giftIntegral+"积分"}} - - - {{actTitle}} - - - - - - {{is_retail_price?'零售价:':''}}{{giftPosPrice+"元"}} - - - {{"已售:"+giftQty+"件"}} - {{"数量:"+giftQty+"件"}} - - - - - - 礼包内容 - - - - - - - - - - - - - - - - - - - - - - - {{item.couponName}} - - - - - - - {{"数量:"+item.num}} - - - - 已核销 - - - 未核销 - - - - - - - - - - - - - - - - - - - 奖励已发放 - - - - - - - - - 活动说明 - - - - - - - - - - - - - - - - 立即购买 - - - 立即兑换 - - - - - 立即购买 - - - - - 立即兑换 - - - - - - 免费领取 - - - - - - - - - - 活动还未开始 - - - - - - - - - - 无核销商品 - - - - - 兑换未开始 - - - 立即使用 - - - 商品已核销 - - - 商品兑换时间已过 - - - - - - + + + 加载中。。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss index 31032ef..cc6cc05 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxss +++ b/pages/giftpack/giftpacklist/giftpacklist.wxss @@ -1,275 +1,5 @@ -@charset "UTF-8"; -@import '../../goods/goodsInfo/goodsInfo.wxss'; - -.box.data-v-3a5b7e36 { - -webkit-align-content: center; - align-content: center; - background-color: #e85f93; -} - -.box_top.data-v-3a5b7e36 { - width: 100%; -} - -.box_top image.data-v-3a5b7e36 { - width: 100%; - max-height: 540rpx; -} - -.box_title.data-v-3a5b7e36 { - margin: 10rpx 20rpx 20rpx 20rpx; - padding: 35rpx; - background-color: #fff; - border-radius: 40rpx; -} - -.top_title.data-v-3a5b7e36 { - font-size: 30rpx; - margin-bottom: 10rpx; - position: relative; -} - -.top_time.data-v-3a5b7e36 { - font-size: 27rpx; - color: #b9b5b5; -} - -.top_price.data-v-3a5b7e36 { - font-size: 35rpx; - color: #d61b30; - margin-top: 30rpx; - margin-bottom: 5rpx; - position: relative; -} - -.top_foot.data-v-3a5b7e36 { - display: -webkit-box; - display: -webkit-flex; - display: flex; -} - -.top_foot_price.data-v-3a5b7e36 { - font-size: 22rpx; - color: #b9b5b5; - width: 50%; - text-decoration: line-through; -} - -.top_foot_qty.data-v-3a5b7e36 { - font-size: 22rpx; - color: #b9b5b5; - width: 50%; - -webkit-align-content: flex-end; - align-content: flex-end; - text-align: right; -} - -.box_ware.data-v-3a5b7e36 { - margin: 10rpx 20rpx 20rpx 20rpx; - padding: 35rpx; - background-color: #fff; - border-radius: 40rpx; -} - -.box_ware_title.data-v-3a5b7e36 { - font-size: 35rpx; - margin: 5rpx 0rpx 30rpx 0rpx; -} - -.box_ware_box.data-v-3a5b7e36 { - display: -webkit-box; - display: -webkit-flex; - display: flex; - margin: 10rpx 0rpx 25rpx 0rpx; -} - -/* .box_ware_img.data-v-3a5b7e36 { - width: 30%; - height: 180rpx; - border: #999999 solid 1rpx; -} */ - -.box_ware_img image.data-v-3a5b7e36 { - /* width: 185rpx; - height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */ - border: 2rpx solid #fafaf9; - border-radius: 4rpx; - width: 120rpx; - height: 120rpx; - background-color: #f8f8f8; -} - -.box_ware_item.data-v-3a5b7e36 { - width: 70%; - margin-left: 25rpx; - position: relative; -} - -.box_ware_item_title.data-v-3a5b7e36 { - font-size: 24rpx; - word-break: break-all; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; -} - -.box_ware_count.data-v-3a5b7e36 { - display: -webkit-box; - display: -webkit-flex; - display: flex; -} - -.box_ware_item_price.data-v-3a5b7e36 { - font-size: 25rpx; - color: #b9b5b5; - position: absolute; - bottom: 60rpx; - left: 0; -} - -.box_ware_item_qty.data-v-3a5b7e36 { - font-size: 22rpx; - position: absolute; - bottom: 15rpx; - left: 0; -} - -.box_ware_code.data-v-3a5b7e36 { - position: absolute; - right: 10rpx; - bottom: 10rpx; -} - -.box_ware_code image.data-v-3a5b7e36 { - width: 50rpx; - height: 50rpx; -} - -.box_ware_code text.data-v-3a5b7e36 { - font-size: 20rpx; -} - -.foot_box.data-v-3a5b7e36 { - margin: 10rpx 20rpx 50rpx 20rpx; - padding: 35rpx; - background-color: #fff; - border-radius: 40rpx; -} - -.foot_box_title.data-v-3a5b7e36 { - font-size: 35rpx; - margin-bottom: 30rpx; -} - -.foot_box_remark.data-v-3a5b7e36 { - font-size: 27rpx; - line-height: 40rpx; -} - -.foot_empty.data-v-3a5b7e36 { - height: 90rpx; -} - -.foot_button.data-v-3a5b7e36 { - display: -webkit-box; - display: -webkit-flex; - display: flex; - margin: 20rpx 0rpx 0rpx 0rpx; - padding: 25rpx 0rpx; - background: #fff; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - position: fixed; - bottom: 0; - left: 0; - width: 100%; -} - -.foot_button_left.data-v-3a5b7e36 { - background: #e4010c; - color: #fff; - width: 250rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; - margin-right: 20rpx; -} - -.foot_button_right.data-v-3a5b7e36 { - background: #ffbb42; - color: #fff; - width: 250rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -.foot_button_buy.data-v-3a5b7e36 { - background: #e4010c; - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -.foot_button_intalge.data-v-3a5b7e36 { - background: #ffbb42; - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -page.data-v-3a5b7e36 { - background-color: #e85f93; -} - -.foot_box_remark.data-v-3a5b7e36 ._img { - width: 100%; -} - -.foot_box_remark.data-v-3a5b7e36 .img { - line-height: 0; -} -.overdue.data-v-3a5b7e36{ - background-color: rgb(153,153,153); -} - -.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; } - -.xc-share-frame { - position: absolute; right:0; top: -10rpx; -} -.searchbar { - height: 95rpx; - border-bottom: 2rpx solid rgb(238, 238, 238); -} -.storeListpadd { - padding: 0rpx 31rpx; -} -.search { - width: 125rpx; - height: 45rpx; - line-height: 45rpx; - background-color: rgb(219, 27, 52); - border-radius: 30rpx; - color: rgb(255, 255, 255); -} -.inputstore { - width: 510rpx; - height: 43rpx; - line-height: 43rpx; - border-radius: 30rpx; - border: 2rpx solid rgb(238, 238, 238); - padding-left: 30rpx; -} +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% +} \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.js b/pages/giftpack/mygiftpack/mygiftpack.js index 4597bca..5bb14a5 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.js +++ b/pages/giftpack/mygiftpack/mygiftpack.js @@ -1,261 +1,10 @@ -var i = require("../../../utils/util.js") -const ut = require("../../../utils/util.js"); -var e = getApp(), - a = e.globalData.setting, - os = a, - t = e.request, - d = e.globalData; Page({ - data: { - iurl: a.imghost, //图片前缀网址 - getDate: "", - getStorageID: '', - getUserID: '', - wareCard: [], - // pages: 0, - // pageSize: 10, - isEmpty: false, - loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore - contentText: { - contentdown: '加载更多', - contentrefresh: '加载中...', - contentnomore: '已加载全部' - }, - ismore: 0, //数据是否全部加载完成 - is_read: 0, //是否查询过我的礼包接口 - curpage: 1, //当前分页数 - pageSize: 10, //页大小 - total: 0, //总数量 - ad_data: null, - first_leader: e.globalData.first_leader || 0, // 推荐人ID - - sear_key:'' //顶部搜索关键子 - }, - onLoad: function (options) { - this.setData({ - params: options, - }) - }, - - init() { - let options = this.data?.params; - var th = this; - this.setData({ - getStorageID: a.stoid, - getUserID: d.user_id, - loadingType: 0, - getDate: i.formatTime(new Date().getTime()) - }); - //-- 获取分享人的ID -- - var first_leader = options.first_leader || getApp().globalData.first_leader; - if (first_leader) { - this.setData({ - first_leader, - }) - //-- user_id代过来免登录 -- - getApp().globalData.first_leader = first_leader; - //调用接口判断是不是会员 - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { - if (res.data.code == 0) { - getApp().globalData.guide_id = res.data.data.id; - getApp().globalData.guide_pick_id= res.data.data.pickup_id - } - }) - } - - getApp().request.promiseGet("/api/weshop/ad/page?pid=902&store_id=" + os.stoid, { - data: { - enabled: 1 - } - }).then(res => { - if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { - var a = res.data.data.pageData; - var tt = { - 'ad_code': os.imghost + a[0].ad_code, - 'media_link': '', - 'ad_weapplink': a[0].ad_weapplink, - 'bgcolor': a[0].bgcolor, - }; - th.setData({ ad_data: tt }); - } - }) - this.getList(); + data: {}, + onLoad: async function(options) { + getApp().globalData.ts_trans_data=options; + getApp().goto('/packageF/pages/giftpack/mygiftpack/mygiftpack'); }, - onShow: function () { - getApp().check_can_share(); - //--先判断会员状态-- - getApp().is_Single_page(this, function () { - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - getApp().goto('/packageE/pages/togoin/togoin'); - return false; - } - this.init() - }) - - - }, - getList: function () { - - if(this.data.ismore) return false; - if(this.data.searching) return false; - this.data.searching=1; - - wx.showLoading({ - title: '加载中.', - }) - - var th = this; - let r_q={ - storeId: th.data.getStorageID, //商家ID - userId: th.data.getUserID, //用户ID - page: th.data.curpage, - pageSize: th.data.pageSize - } - - if(this.data.sear_key){ - r_q.key_str=this.data.sear_key; - } - - getApp().request.get('/api/weshop/marketing/my/giftbag/page', { - isShowLoading: true, - data: r_q, - success: function (res) { - - th.data.searching=0; - - if (res.data.code == 0) { - th.data.curpage++; - var arr1 = th.data.wareCard; - var arr2 = res.data.data.pageData; - - for (let j = 0; j t_now) - arr2[j].c_state=-1 //未开始 - else - arr2[j].c_state=0 //正常 - } - - - var arr3 = [...arr1, ...arr2]; - var ismore = 0; - if (arr3.length == res.data.data.total) ismore = 1 - th.setData({ - wareCard: arr3, - total: res.data.data.total, - ismore: ismore, - is_read: 1, - is_get:1, - }), wx.stopPullDownRefresh(); //停止下拉刷新 - } else { - th.setData({ - is_read: 1, - ismore: 1, - is_get:1, - }) - } - - wx.hideLoading(); - - } - - }); - - }, - //销毁界面跳转 - redirectTo: function (e) { - var th = this; - var url = e.currentTarget.dataset.url; - //销毁跳转 - wx.redirectTo({ - url: url - }); - }, - //不销毁界面跳转 - navigateTo: function (e) { - var th = this; - var url = e.currentTarget.dataset.url; - let is_back = e.currentTarget.dataset.is_back - if (is_back==1) { - wx.showToast({ - title: '该礼包已退款', - icon: 'none', - duration: 2000 - }) - }else { - getApp().goto(url); - } - }, - //下拉事件 - onReachBottom: function () { - var th = this; - if (th.data.total <= th.data.pageSize) return; - if (th.data.ismore) return; - th.getList(); - }, - - //图片失败,默认图片 - bind_bnerr2: function (e) { - var _errImg = e.target.dataset.errorimg; - var _errObj = {}; - _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; - }, - - - //--- 分享设置 -- - onShareAppMessage: function (e) { - getApp().globalData.no_clear=1; - var curPage = this; - var pagePath = curPage.route; //当前页面url - if (pagePath.indexOf('/') != 0) { - pagePath = '/' + pagePath; - } - pagePath += "?first_leader=" + this.data.getUserID; - return { - title: "专享礼包", - path: pagePath, - } - }, - - onShareTimeline() { - getApp().globalData.no_clear=1; - return { - title: '专享礼包', - imageUrl: this.data.ad_data.ad_code, - query: "first_leader=" + this.data.getUserID - } - }, - - search_lb(){ - this.data.curpage=0; - this.searching=0; - this.setData({ismore:0,is_get:0,wareCard:[]}); - this.getList(); - }, - - input_sear(e){ - let value = e.detail; - this.data.sear_key=value; - } + //显示加载 + onShow:function(){ }, -}); \ No newline at end of file +}) \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.json b/pages/giftpack/mygiftpack/mygiftpack.json index bd6784b..0b59e95 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.json +++ b/pages/giftpack/mygiftpack/mygiftpack.json @@ -1,9 +1,10 @@ { - "navigationBarTitleText": "我的礼包", - "enablePullDownRefresh": false, - "usingComponents": { - "warn": "/components/long_warn/long_warn", - "my_confirm": "/components/my_confirm/my_confirm", - "lb_sear": "/components/lb_sear/lb_sear" - } + "windom": { + "navigationBarTitleText": "加载中.", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" + } + } \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxml b/pages/giftpack/mygiftpack/mygiftpack.wxml index 5cc0131..7ce57f8 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.wxml +++ b/pages/giftpack/mygiftpack/mygiftpack.wxml @@ -1,135 +1,4 @@ - - - - - - - - - - - - - - - - - - 礼包列表 - - - - 我的礼包 - - - - - - - - - - - - - - - - 新人有礼 - - - 评价有礼 - - - 节日营销 - - - 生日营销 - - - 助力礼包 - - - - - - - {{item.giftTitle}} - - - - {{"¥"+item.payMoney}} - - - {{item.payIntegral+"积分"}} - - - - - - - - {{"零售价:¥"+item.giftPosPrice}} - - - - - {{"兑换截至日期:"+item.endTime}} - - - {{"距兑换开始时间: "+item.starTime}} - - - - - - - - - - - - - 已退款 - - - - - - - - - 当前暂无礼包 - - - 去获取 - - - - - - - - 到底了 - - - + + + 加载中。。 - - - \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxss b/pages/giftpack/mygiftpack/mygiftpack.wxss index 74560e2..cc6cc05 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.wxss +++ b/pages/giftpack/mygiftpack/mygiftpack.wxss @@ -1,266 +1,5 @@ -/*引用样式路径*/ -@charset "UTF-8"; - -/* Author XGQ - * 2019-11-12 - */ - -.top_img { - -webkit-align-content: center; - align-content: center; -} - -.top_img image { - width: 100%; -} - -.top_title { - display: -webkit-box; - display: -webkit-flex; - display: flex; - background-color: #fff; - height: 85rpx; - border-radius: 10rpx 10rpx 0rpx 0rpx; - margin: 0rpx 20rpx 0rpx 20rpx; - -webkit-align-content: center; - align-content: center; - margin-bottom: 10rpx; -} - -.top_title_box { - width: 49%; - -webkit-align-content: center; - align-content: center; - text-align: center; - padding: 15rpx; -} - -.top_title_box_S { - width: 1%; - -webkit-align-content: center; - align-content: center; - text-align: center; - margin: 20rpx 0rpx 20rpx 0rpx; - border-left: #000 solid 3rpx; -} - -.top_title_redtext { - font-size: 30rpx; - color: #d61b30; -} - -.top_title_blacktext { - font-size: 30rpx; - color: #000; -} - -.content_box { - background-color: #fff; - height: 375rpx; - margin: 0rpx 20rpx; - border-radius: 10rpx; - margin-bottom: 10rpx; -} - -.content_box_ware { - border-bottom: #f5f5f5 solid 2rpx; - display: -webkit-box; - display: -webkit-flex; - display: flex; -} - -.content_box_img { - margin: 20rpx 20rpx 20rpx 25rpx; - width: 35%; - display: -webkit-box; - display: -webkit-flex; - display: flex; - font-size: 8rpx; - position: relative; -} - -.content_box_img image { - width: 230rpx; - height: 230rpx; -} - -.content_box_img_title { - position: absolute; - background: #d01119; - display: -webkit-box; - display: -webkit-flex; - display: flex; - padding: 8rpx; - border-radius: 0rpx 0rpx 10rpx 0rpx; -} - -.content_box_img_ground1 { - background: #fb6451; -} - -.content_box_img_ground2 { - background: #ffb72d; -} - -.content_box_img_ground3 { - background: #9be0e5; -} - -.content_box_img_ground4 { - background: #4784ef; -} - -.content_box_img_title image { - width: 30rpx; - height: 30rpx; -} - -.content_box_img_title text { - font-size: 20rpx; - color: #fff; - line-height: 25rpx; - padding-top: 5rpx; -} - -.content_box_title { - width: 65%; - margin: 25rpx 25rpx 10rpx 0rpx; - position: relative; -} - -.content_ware_title { - font-size: 30rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} - -.content_ware_type { - font-size: 32rpx; - color: #c61a34; - margin-top: 10rpx; - position: absolute; - left: 0; - bottom: 100rpx; -} - -.content_ware_price { - font-size: 26rpx; - color: #b9b5b5; - margin-top: 2rpx; - text-decoration: line-through; - position: absolute; - left: 0; - bottom: 70rpx; -} - -.content_ware_time { - font-size: 24rpx; - color: #c61a34; - margin-top: 20rpx; - position: absolute; - left: 0; - bottom: 25rpx; -} - -.content_box_button { - text-align: right; - margin: 20rpx 25rpx 20rpx 20rpx; -} - -.content_box_button button { - display: inline-block; - min-width: 160rpx; - height: 50rpx; - font-size: 25rpx; - background: #d41c34; - color: #fff; - line-height: 50rpx; - padding: 0 8rpx; -} - -.foot_box { - -webkit-align-content: center; - align-content: center; - text-align: center; - margin-top: 15rpx; - margin-bottom: 50rpx; -} - -.foot_box text { - font-size: 25rpx; - color: #fff; -} - -.foot_empty { - background-color: #fff; - height: 375rpx; - margin: 10rpx 20rpx 0rpx 20rpx; - border-radius: 10rpx; - text-align: center; - padding: 150rpx 0rpx 300rpx 0rpx; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.foot_empty image { - width: 400rpx; - height: 273rpx; -} - -.foot_empty text { - font-size: 30rpx; - color: #999; -} - -.foot_empty_button { - background: #ff6363; - margin: 60rpx 230rpx 0rpx 230rpx; - padding: 10rpx; - border-radius: 70rpx; - line-height: 40rpx; -} - -.foot_empty_button text { - font-size: 28rpx; - color: #fff; -} - -page { - /* background-color: rgb(250, 120, 88); */ -} -.After_all { - height: 80rpx; - margin-bottom: 10rpx; - color: rgb(255, 255, 255); -} - -.After_all .Line { - border-top: 3rpx solid rgb(255, 255, 255); - width: 130rpx; -} - -.After_all .end { - margin: 0rpx 15rpx; -} - -button{ - border-radius: 8rpx !important; overflow: hidden; -} - -.overdue{ - background-color: rgb(153,153,153) !important; -} - -button::after{ - border: none; -} +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% +} \ No newline at end of file diff --git a/pages/giftpack/newvipgift/newvipgift.js b/pages/giftpack/newvipgift/newvipgift.js index f6ef5e3..1069faa 100644 --- a/pages/giftpack/newvipgift/newvipgift.js +++ b/pages/giftpack/newvipgift/newvipgift.js @@ -1,193 +1,10 @@ -var i = require("../../../utils/util.js") -var e = getApp(), - a = e.globalData.setting, - os = a, - t = e.request, - d = e.globalData; Page({ - data: { - url: a.url, //接口网址 - iurl: a.imghost, //图片前缀网址 - itemShow: false, //项目栏目是否显示 - cardShow: false, //代金券栏目是否显示 - packShow: false, //福利栏目是否显示 - textShow: false, //规则是否显示 - integralShow: true, //积分领取是否显示 - growUpShow: true, //成长值领取是否显示 - itemButton: '', - cardButton: '', - getActId: '', - getActType: '', - giftID: '', - receiveState: '一键全部领取', - textTitle: '', - getUrl: '', - noShow: false, - cards: [], //礼包内容--礼券 - itemWare: [], //礼包内容--服务项目 - integralTitle: "", - growUpTitle: "", - is_sub: 0, //是否重复领取 - - }, - GetList: function() { - var th = this; - var url = "/api/weshop/marketing/giftbag/bound/get"; - getApp().request.promiseGet(url, { - isShowLoading: true, - data: { - "actId": th.data.getActId, //活动id - "actType": 1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 - "giftBagId": th.data.giftID, //礼包ID - "storeId": a.stoid, //商家ID - "userId": d.user_id //用户ID - } - }).then(res => { - if (res.data.code == 0) { - if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length > 0) { - //礼包内容--礼券 - th.setData({ - cardShow: true, - cards: res.data.data.lbCoupons - }) - } - if (res.data.data.lbSM != null && res.data.data.lbSM.length > 0) { - //礼包内容--服务项目 - th.setData({ - itemShow: true, - itemWare: res.data.data.lbSM - }) - } - //礼包积分 - if (res.data.data.lbIntegral <= 0) { - if (res.data.data.lbGrowthValue <= 0) { - th.setData({ - packShow: false - }) - } else { - th.setData({ - packShow: false, - integralShow: false, - growUpShow: true - }) - } - - } else { - if (res.data.data.lbGrowthValue > 0) { - th.setData({ - packShow: true - }) - } else { - th.setData({ - packShow: true, - integralShow: true, - growUpShow: false - }) - } - } - th.setData({ - integralTitle: '价值' + res.data.data.lbIntegral + '积分', - growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值' - }) - if (res.data.data.receiveState == 0) { - th.setData({ - receiveState: '一键全部领取' - }) - } else { - th.setData({ - receiveState: '已领取' - }) - } - - if (res.data.data.actIntro != '') { - th.setData({ - textShow: true, - textTitle: res.data.data.actIntro.replace(/\/g, '\div>') - }) - } - } else { - getApp().my_warnning(res.data.msg, 0, th); - return false; - } - }) - }, - - onLoad: function(options) { - - var th = this; - th.setData({ - getActId: options.actId, - giftID: options.giftBagId - }) - - }, - onShow: function() { - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - getApp().goto('/packageE/pages/togoin/togoin'); - return false; - } - this.GetList(); - + data: {}, + onLoad: async function(options) { + getApp().globalData.ts_trans_data=options; + getApp().goto('/packageF/pages/giftpack/newvipgift/newvipgift'); }, - GetReceive: function() { - var th = this; - if (th.data.receiveState == '已领取') { - return false; - } - var is_sub = th.data.is_sub; //判断是否重复提交 - if (is_sub == 0) { - th.setData({ - is_sub: 1 - }) - var json = { - "actId": th.data.getActId, //活动Id - "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "giftBagId": th.data.giftID, //礼包Id - "storeId": a.stoid, //商家Id - "userId": d.user_id, //用户ID - "buyFrom": 2 - }; - var data = JSON.stringify(json); - var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert"; - getApp().request.json_post(url, json, - function(res) { - th.setData({ - is_sub: 0 - }) - if (res.data.code == 0) { - th.setData({ - receiveState: '已领取' - }) - getApp().my_warnning("领取成功", 1, th); - } else { - getApp().my_warnning(res.data.msg, 0, th); - } - }, - function(res) { - - }, "post" + //显示加载 + onShow:function(){ }, - ) - - } - }, - //界面跳转 - goto: function(e) { - var url = e.currentTarget.dataset.url; - getApp().goto(url); - }, - //图片失败,默认图片 - bind_bnerr1: function(e) { - var th = this; - var _errImg = e.target.dataset.errorimg; - var _Img = e.target.dataset.img; - if (_Img != undefined) { - var _errObj = {}; - _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; - th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; - } - }, -}); \ No newline at end of file +}) \ No newline at end of file diff --git a/pages/giftpack/newvipgift/newvipgift.json b/pages/giftpack/newvipgift/newvipgift.json index 807b825..0b59e95 100644 --- a/pages/giftpack/newvipgift/newvipgift.json +++ b/pages/giftpack/newvipgift/newvipgift.json @@ -1,7 +1,10 @@ { - "navigationBarTitleText": "新人礼", - "usingComponents": { - "warn": "/components/long_warn/long_warn", - "my_confirm": "/components/my_confirm/my_confirm" + "windom": { + "navigationBarTitleText": "加载中.", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" } + } \ No newline at end of file diff --git a/pages/giftpack/newvipgift/newvipgift.wxml b/pages/giftpack/newvipgift/newvipgift.wxml index 12078a6..cc6cc05 100644 --- a/pages/giftpack/newvipgift/newvipgift.wxml +++ b/pages/giftpack/newvipgift/newvipgift.wxml @@ -1,176 +1,5 @@ - - - - - - - - - ______ - - - 新人专享\n你的美丽我来缔造 - - - ______ - - - - - - - - - - - - - - - - - - 免费领取 - - - {{item.fromName}} - - - - - {{item.fromName}} - - - {{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}} - - - 数量: - {{item.num}} - - - - - - - - - - - - - - - - - - - ——— - - - 新人专享优惠券 - - - ——— - - - - - - - - - 全场通用 - - - 品牌限定 - - - 品类限定 - - - 用途限定 - - - 分类限定 - - - - 包邮券 - - - {{item.sum+"元券"}} - - {{"满"+item.buySum+"元可以用"}} - - - - - - - - - - - - - - - - - - ——— - - - 新人专享福利 - - - ——— - - - - - - - - - - - - - - - - - - - - - - - - - 活动规则: - - - - - - - - - - - - 本活动最终解释权归公司所有,如果有问题请联系客服 - - - - - - {{receiveState}} - - - - - - \ No newline at end of file +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% +} \ No newline at end of file diff --git a/pages/giftpack/newvipgift/newvipgift.wxss b/pages/giftpack/newvipgift/newvipgift.wxss index 02ac52f..cc6cc05 100644 --- a/pages/giftpack/newvipgift/newvipgift.wxss +++ b/pages/giftpack/newvipgift/newvipgift.wxss @@ -1,417 +1,5 @@ -@charset "UTF-8"; - -/* Author XGQ - * 2019-10-27 - */ - -.image_box { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.image_box image { - width: 100%; - height: 690rpx; -} - -.top { - margin: -20rpx 28rpx 45rpx 28rpx; - padding: 10rpx 10rpx 70rpx 10rpx; - background-color: #fff; - border-radius: 0rpx 0rpx 15rpx 15rpx; -} - -.top_box { - display: -webkit-box; - display: -webkit-flex; - display: flex; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; -} - -.top_box_text { - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - margin: 50rpx 15rpx 20rpx 15rpx; -} - -.top_box_text text { - color: #fb6451; - font-size: 40rpx; -} - -.top_item { - display: -webkit-box; - display: -webkit-flex; - display: flex; - width: 100%; - margin: 60rpx 0 0 0; -} - -.top_item_img { - float: left; - width: 28%; - margin: 0rpx 10rpx 0rpx 20rpx; -} - -.top_item_img image { - width: 150rpx; - height: 150rpx; - border-radius: 50%; - border: #f96865 solid 3rpx; -} - -.top_item_center { - float: left; - width: 50%; -} - -.top_item_center_title { - font-size: 35rpx; - color: #fb6451; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - padding: 0 10rpx 15rpx 0rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} - -.top_item_center_ramke { - font-size: 25rpx; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - justify-content: flex-start; - line-height: 35rpx; - letter-spacing: 0.5rpx; - word-break: break-all; - /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ - text-overflow: ellipsis; - display: -webkit-box; - /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; - /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 2; - /** 显示的行数 **/ - overflow: hidden; - /** 隐藏超出的内容 **/ -} - -.top_item_button { - float: right; - width: 22%; - padding: 65rpx 20rpx 0 1rpx; -} - -.top_item_button button { - font-size: 25rpx; - background: #fd6969; - color: #fff; - border-radius: 50rpx; - height: 45rpx; - line-height: 45rpx; -} - -.top_card { - width: 309rpx; - display: inline-block; - margin: 15rpx; - vertical-align:top; -} - -.top_card_box { - background-size: cover; - background-position: center; - background-repeat: no-repeat; - border-radius: 20rpx; - height: 250rpx; - margin: 5rpx; -} - -.img1 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); -} - -.img2 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); -} - -.img3 { - background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); -} - -.top_card_tite_box { - width: 100%; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: end; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} - -.top_card_tite_a { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #ffa7c0; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_b { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #50dfdb; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_c { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - background: #92cbff; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_tite_d { - padding: 5rpx 25rpx 5rpx 25rpx; - line-height: 29rpx; - font-size: 25rpx; - color: #fff; - border-radius: 0rpx 20rpx 0rpx 6rpx; -} - -.top_card_counte { - padding: 40rpx 20rpx 0 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - color: #fff; - font-size: 40rpx; -} - -.top_card_remak { - padding: 20rpx 0 40rpx 0; - text-align: center; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - align-items: center; - font-size: 20rpx; - color: #fff; -} - -.top_card_button_a button { - margin: 0 85rpx; - background: #ffa6bc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_b button { - margin: 0 85rpx; - background: #50dfdb; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_c button { - margin: 0 85rpx; - background: #75bcfc; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_card_button_d button { - margin: 0 85rpx; - border-radius: 50rpx; - line-height: 40rpx; - height: 40rpx; - color: white; - font-size: 25rpx; -} - -.top_box_image { - padding: 20rpx 20rpx 20rpx 20rpx; -} - -.top_box_image image { - height: 216rpx; - width: 100%; -} - -.top_box_image button { - margin: 15rpx 95rpx 0rpx 95rpx; - background: #fe6a6a; - border-radius: 50rpx; - line-height: 60rpx; - height: 60rpx; - color: white; - font-size: 30rpx; -} - -.foot_box { - margin: 0 30rpx 40rpx 30rpx; - background: #fff; - border-radius: 20rpx; -} - -.foot_box_title { - color: #000; - padding: 20rpx 30rpx 20rpx 30rpx; -} - -.foot_box_text { - font-size: 30rpx; - color: #000; - line-height: 48rpx; - padding: 20rpx 35rpx 50rpx 30rpx; -} - -.button_box { - margin: 50rpx 50rpx 50rpx 50rpx; - text-align: center; -} - -.button { - margin: 0 30rpx; - background: #ff9a8c; - border-radius: 50rpx; - line-height: 80rpx; - height: 80rpx; - color: white; - font-size: 35rpx; -} - -.button_text { - padding-top: 20rpx; - font-size: 20rpx; - color: white; - height: 100rpx; -} - -.foot_empty { - height: 90rpx; -} - -.foot_button { - display: -webkit-box; - display: -webkit-flex; - display: flex; - margin: 20rpx 0rpx 0rpx 0rpx; - padding: 25rpx 0rpx; - background: #fff; - text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; - justify-content: center; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - z-index: 10; -} - -.foot_button_buy { - background: #e4010c; - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -.foot_button_notbuy { - background: #999; - color: #fff; - width: 400rpx; - height: 70rpx; - font-size: 28rpx; - line-height: 70rpx; - border-radius: 40rpx; -} - -page { - background-color: #fb6451; -} - -button::after { - border: none; -} - -.foot_box_text ._img { - width: 100%; -} -.foot_box_text .p{ - width: 100%; -} - -.foot_box_text .img { - line-height: 0; -} -.image { - width: 400rpx; - height: 200rpx; -} -.div_class{ - width: 600rpx; -} - -.num { - color: #fb6451; -} - -.lvip { - left: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; -} - -.rvip { - right: 30rpx; - bottom: -58rpx; - width: 20rpx; - height: 90rpx; - z-index: 5; +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% } \ No newline at end of file diff --git a/pages/giftpack/payment/payment.js b/pages/giftpack/payment/payment.js deleted file mode 100644 index 908a6ed..0000000 --- a/pages/giftpack/payment/payment.js +++ /dev/null @@ -1,42 +0,0 @@ -var e = getApp(); -var regeneratorRuntime = require('../../../utils/runtime.js'); -Page({ - /** - * 页面的初始数据 - */ - data: { - url: e.globalData.setting.imghost, - resourceUrl: e.globalData.setting.resourceUrl, - iurl: e.globalData.setting.imghost, - allmoney: 0, - order_sn: "", - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - wx.setNavigationBarTitle({ - title: '支付成功', - }); - var money = parseFloat(options.money), order_sn = options.order_sn; - this.setData({allmoney:money,order_sn:order_sn}) - - - - }, - onReady(){ - // console.error(6666); - if (this.data.allmoney*1 > 0) { - var encourage = this.selectComponent("#encourage"); //组件的id - if (encourage){ - encourage.get_encourage(); - } - } - }, - - goto: function () { - var url = '/pages/index/index/index'; - getApp().goto(url) - }, -}) \ No newline at end of file diff --git a/pages/giftpack/payment/payment.json b/pages/giftpack/payment/payment.json deleted file mode 100644 index b8252b8..0000000 --- a/pages/giftpack/payment/payment.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "支付成功", - "usingComponents": { - "show_encourage": "/components/show_encourage/show_encourage" - } -} \ No newline at end of file diff --git a/pages/giftpack/payment/payment.wxml b/pages/giftpack/payment/payment.wxml deleted file mode 100644 index abf8841..0000000 --- a/pages/giftpack/payment/payment.wxml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - 订单支付成功! - - - - - - - - 订单编号 : - {{order_sn}} - - - - - 实付金额 : - - {{filters.toFix(allmoney,2)}}元 - - - - - 支付方式 : - 微信支付 - - - - - - - - - - - - - - 我的礼包 - - - - - 回到首页 - - - - - - - - - \ No newline at end of file diff --git a/pages/giftpack/payment/payment.wxss b/pages/giftpack/payment/payment.wxss deleted file mode 100644 index f69e931..0000000 --- a/pages/giftpack/payment/payment.wxss +++ /dev/null @@ -1,84 +0,0 @@ -page { - border-top: 2rpx solid rgb(245, 245, 245); -} -.line { - border-top: 2rpx solid rgb(245, 245, 245); - width: 700rpx; -} - -.payradio .Success_box { - padding-top: 45rpx; - padding-bottom: 45rpx; -} - -.payradio .Success_box .Success_box_title { - margin-top: 45rpx; - color: rgb(8, 8, 8); -} - -.payradio image { - width: 140rpx; - height: 140rpx; - display: flex; -} - -.payitem_max { - padding: 0rpx 55rpx; - color: rgb(104, 104, 104); - padding-bottom: 30rpx; -} - -.payitem_max .payitem { - margin-top: 30rpx; -} - -.payitem_max .payitem .pay_nam { - width: 200rpx; -} - -.payitem_max .payitem view { - margin-right: 50rpx; -} -.pay_money{ - color: rgb(219, 27, 52); -} - -.pay_User { - padding-left: 55rpx; - color: rgb(104, 104, 104); -} - -.pay_User .payitem { - margin-top: 30rpx; -} - -.pay_User .payitem .pay_Receiving { - width: 128rpx; - margin-right: 50rpx; -} - -.pay_User .payitem .pay_name { - margin-right: 38rpx; - max-width: 250rpx; -} - -.pay_order { - margin-top: 115rpx; - color: rgb(104, 104, 104); - width: 560rpx; - height: 62rpx; - border-radius: 30rpx; - border: 3rpx solid rgb(209, 209, 209); -} - -.pay_home { - margin-top: 35rpx; - color: rgb(255, 255, 255); - width: 566rpx; - height: 68rpx; - border-radius: 30rpx; - background-color: rgb(219, 27, 52); -} -.address{ - width: 470rpx; -} \ No newline at end of file diff --git a/pages/giftpack/public/buy_com.js b/pages/giftpack/public/buy_com.js deleted file mode 100644 index 3f9ed74..0000000 --- a/pages/giftpack/public/buy_com.js +++ /dev/null @@ -1,536 +0,0 @@ -const t_pay = require("../../../utils/pay2.js"); -module.exports = { - set_py_fir(){ - t_pay.set_fir(); - }, - //开启定位 - wait_for_store_config: function (th) { - var t_time = setInterval(function () { - if (th.data.bconfig == null) false; - var e = th.data.bconfig; - if (e && e.is_sort_storage) { - wx.getLocation({ - type: 'gcj02', - success: function (res) { - th.data.lat = res.latitude; - th.data.lon = res.longitude; - th.data.is_get_local_ok = 1; - }, - fail: function (res) { - if (res.errCode == 2) { - th.setData({ - is_gps: 0 - }); - if (th.data.is_gps == 0) { - getApp().confirmBox("请开启GPS定位", null, 10000, !1); - } - - } else { - th.setData({ - is_gps: "3" - }); - } - - th.data.is_get_local_ok = 1; - } - }) - } else { - th.data.is_get_local_ok = 1; - } - clearInterval(t_time); - }, 500) - }, - set_user_mo_store(th,os,func){ - var that=th; - //获取用户的默认门店 - getApp().get_user_store(function (e) { - if (!e) { - th.data.fir_def_store = {}; //赋值空对象 - return false; - } - - if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) - - var ee = JSON.parse(JSON.stringify(e)); - //--定时器推迟一下-- - setTimeout(function () { - if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type; - //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对-- - if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) { - ee.is_no_dis = 1; - } - - var appd = getApp().globalData; - var w_time = setInterval(function () { - if (that.data.is_get_local_ok == 0) return false; - clearInterval(w_time); - var distance = null; - var e = JSON.parse(JSON.stringify(ee)); - - //如果有开启近距离的话,同时距离优不一样了 - if (that.data.lat != null) { - //如果经纬度有变化的话 - if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) { - that.set_def_storage(e); - if(func) func(); - } else { - //要用接口是获取距离,js的计算不准 - getApp().request.promiseGet("/api/weshop/pickup/list", { - data: { - store_id: os.stoid, - pickup_id: e.pickup_id, - lat: th.data.lat, - lon: th.data.lon, - isstop: 0, - is_pos: 1 - }, - }).then(res => { - if (res.data.code == 0) { - e = res.data.data.pageData[0]; - if (e) { - e.is_no_dis = ee.is_no_dis; - appd.pk_store = e; - that.set_def_storage(e); - } - - } - if(func) func(); - }) - } - //e.distance = distance; - appd.lat = that.data.lat; - appd.lon = that.data.lon; - - } else { - if (e) { - e.distance = null; - that.set_def_storage(e); - } - if(func) func(); - } - }, 500) - }, 700) - }) - - }, - - //---------拿出门店分类和门店------------ - get_sto(th,os) { - var that = th; - var self=this; - var timer_get = setInterval(function () { - if (th.data.is_get_local_ok == 0) return false; - var dd = null; - - dd = { - store_id: os.stoid, - isstop: 0, - is_pos: 1, - pageSize: 2000, - } - - //如果有距离的话 - if (th.data.lat != null) { - dd.lat = th.data.lat; - dd.lon = th.data.lon; - } - - if(th.data.sele_g && th.data.sele_g.pickup_list){ - dd.ids=th.data.sele_g.pickup_list - } - - clearInterval(timer_get); - - //如果会员是有默认的门店话 - if (!th.data.def_pick_store && th.data.fir_def_store) { - th.setData({def_pick_store: th.data.fir_def_store}); - } - wx.showLoading({ - title: '加载中.' - }); - //----------获取门店---------------- - getApp().request.promiseGet("/api/weshop/pickup/list", { - data: dd, - }).then(res => { - var e = res; - - if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { - - var his_cate_num = 0; - for (let i in e.data.data.pageData) { - let item = e.data.data.pageData[i]; - if (item.category_id > 0) { - his_cate_num = 1; - break; - } - } - e.his_cate_num = his_cate_num; - - //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 - if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { - th.setData({ - def_pick_store: e.data.data.pageData[0], - sto_sele_name: e.data.data.pageData[0].pickup_name, - sto_sele_id: e.data.data.pageData[0].pickup_id, - sto_sele_distr: e.data.data.pageData[0].distr_type - }); - th.data.fir_def_store = e.data.data.pageData[0]; - } - - //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { - for (var k = 0; k < e.data.data.pageData.length; k++) { - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { - e.data.data.pageData.splice(k, 1); //删除 - break; - } - } - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 - } - - th.setData({all_pick_list: e.data.data.pageData}); - - setTimeout(function () { - self.deal_pickup(e,th,os); //--普通门店排版-- - }, 800) - - } - }) - }, 200) - - }, - - //-- 统一购买 -- - buy_libao:function (th) { - var _that=this; - if(th.data.sele_g.is_pickup){ - if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id)){ - getApp().my_warnning("请先选择门店", 1, th); - return false; - } - - if(th.data.def_pick_store.is_no_dis){ - getApp().my_warnning("门店不匹配,请重新选择", 1, th); - return false; - } - } - - if(th.data.submit) return false; - th.setData({submit:1}) - - if(th.pp_bacK_func){ - th.pp_bacK_func(); - return false; - } - - var id=th.data.sele_g.lbId; - var that=th; - var json = { - "actId": '', //活动Id - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 - "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买 - "giftBagId": id, //礼包Id - "storeId": that.data.getStorageID, //商家Id - "userId": that.data.getUserID, //用户ID - "buyFrom": 2, - }; - - if(that.data.first_leader){ - json.first_leader=that.data.first_leader - } - if(that.data.guide_id){ - json.guide_id=that.data.guide_id - } - - if(th.data.sele_g.is_pickup && that.data.def_pick_store){ - json.pickup_id=that.data.def_pick_store.pickup_id; - } - - //-- 分享导购要记录 -- - if (getApp().globalData.guide_id) { - json.guide_id = getApp().globalData.guide_id; - } - - var url ="/api/weshop/marketing/buy/receive/gift/record/insert"; - getApp().request.json_post(url, json, - function (res) { - if (res.data.code == 0 && res.data.data) { - - switch(that.data.buyType){ - case 1://立即兑换 - var order_sn = res.data.data; - - th.setData({submit:0}) - getApp().my_warnning("兑换成功!", 1, th); - th.closeSpecModal(); - _that.go_detail(id,order_sn,th); - break; - case 2://立即购买 - - var order_sn = res.data.data.orderSn; - that.data.ok_order_sn=order_sn; - - var money=that.data.payMoney; - var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; - getApp().globalData.no_clear=1; - - t_pay.pay_data(res,function (){ - th.setData({submit:0}) - getApp().goto(url); - },function (e){ - th.setData({submit:0}) - wx.showToast({ - title:e, - icon:'none', - duration:2500 - }) - }) - - break; - case 3://立即领取 - - var order_sn = res.data.data; - th.setData({submit:0}) - getApp().my_warnning("领取成功!", 1, th); - th.closeSpecModal(); - _that.go_detail(id,order_sn,th); - break; - } - - } else { - th.setData({submit:0}) - getApp().my_warnning(res.data.msg, 0, th); - } - }, - function (res) { - th.setData({submit:0}) - } - ) - }, - - //-- 跳转到商品使用页面 -- - go_detail(id,orderSn,th){ - //不是详情页面,就不跳转了 - if(!th.data.is_detail) return false; - - var url='/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId='+id+'&orderSn='+orderSn; - getApp().goto(url); - }, - - //------------处理门店--------------- - deal_pickup(e,th,os) { - - if (!th.data.sele_g) return false - wx.hideLoading(); - - //单总量超出10个的时候,同时门店有分类 - if (e.data.data.total > 10 && e.his_cate_num) { - getApp().request.get("/api/weshop/storagecategory/page", { - data: { - store_id: os.stoid, - pageSize: 1000, - orderField: "sort", - orderType: 'asc', - }, - success: function (ee) { - if (ee.data.code == 0) { - var check_all_cate = 0; - if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { - for (let i in ee.data.data.pageData) { - let item = ee.data.data.pageData[i]; - if (item.is_show == 1) { - check_all_cate = 1; - break - } - } - } - if (check_all_cate) { - var sto_cate = ee.data.data.pageData; - var sto_arr = e.data.data.pageData; - var newarr = new Array(); - var qita = new Array(); - - - var is_del_pk = 0; - //----要进行门店分组-------- - for (var i = 0; i < sto_arr.length; i++) { - //找一下这个门店有没有在分类数组内 - var find2 = 0, find2name = "", sort = 0; - is_del_pk = 0; - for (var m = 0; m < sto_cate.length; m++) { - if (sto_arr[i].category_id == sto_cate[m].cat_id) { - if (sto_cate[m].is_show != 1) { - is_del_pk = 1; - sto_arr.splice(i, 1); - i--; - } else { - find2 = sto_cate[m].cat_id; - find2name = sto_cate[m].cat_name; - sort = sto_cate[m].sort; - is_del_pk = 0; - } - break; - } - } - if (is_del_pk) continue; - - if (newarr.length > 0) { - var find = 0; - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 - if (find2 != 0) { - for (var ii = 0; ii < newarr.length; ii++) { - if (sto_arr[i].category_id == newarr[ii].cat_id) { - newarr[ii].s_arr.push(sto_arr[i]); - find = 1; - break; - } - } - if (find == 0) { - var arr0 = new Array(); - arr0.push(sto_arr[i]); - var item = { - cat_id: find2, - name: find2name, - sort: sort, - s_arr: arr0 - }; - newarr.push(item); - } - } else { - qita.push(sto_arr[i]); - } - } else { - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 - if (find2 != 0) { - var arr0 = new Array(); - arr0.push(sto_arr[i]); - var item = { - cat_id: find2, - name: find2name, - sort: sort, - s_arr: arr0 - }; - newarr.push(item); - } else { - qita.push(sto_arr[i]); - } - } - } - - var def_arr = new Array(); - //-- 开始就看10个门店 -- - for (var k = 0; k < 10; k++) { - if (k == sto_arr.length) break; - def_arr.push(sto_arr[k]); - } - - th.setData({ - def_pickpu_list: def_arr, - pickpu_list: ee.data.data.pageData - }); - - - //门店分类要排序下 - function compare(property) { - return function (a, b) { - var value1 = a[property]; - var value2 = b[property]; - return value1 - value2; - } - } - - if (newarr.length > 0) - newarr.sort(compare("sort")); - - - //----安排其他的分类----- - if (qita.length > 0) { - var item = { - cat_id: -1, - name: "其他", - s_arr: qita - }; - newarr.push(item); - } - - var sd = { - all_sto: newarr, - is_show_sto_cat: 1 - } - if (!sto_arr || sto_arr.length <= 10) { - sd.is_show_sto_cat = -1; - sd.only_pk = sto_arr; - } - th.setData(sd); - - } else { - th.setData({ - is_show_sto_cat: -1, - only_pk: e.data.data.pageData - }); - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ - if (!th.data.def_pick_store) { - th.setData({ - def_pick_store: e.data.data.pageData[0], - sto_sele_name: e.data.data.pageData[0].pickup_name, - sto_sele_id: e.data.data.pageData[0].pickup_id, - sto_sele_distr: e.data.data.pageData[0].distr_type - }) - } - } - } else { - th.setData({ - is_show_sto_cat: -1, - only_pk: e.data.data.pageData - }); - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ - if (!th.data.def_pick_store) { - th.setData({ - def_pick_store: e.data.data.pageData[0], - sto_sele_name: e.data.data.pageData[0].pickup_name, - sto_sele_id: e.data.data.pageData[0].pickup_id, - sto_sele_distr: e.data.data.pageData[0].distr_type - }) - } - - } - } - }); - } else { - th.setData({ - is_show_sto_cat: 0, - only_pk: e.data.data.pageData - }); - //-----如果没有默认门店,要取第一个门店作为默认店------ - if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { - th.setData({ - def_pick_store: e.data.data.pageData[0], - sto_sele_name: e.data.data.pageData[0].pickup_name, - sto_sele_id: e.data.data.pageData[0].pickup_id, - sto_sele_distr: e.data.data.pageData[0].distr_type - }) - } - } - }, - - check_def_pk:function (th) { - th.data.def_pick_store.is_no_dis=0; - var def_pick_store=th.data.def_pick_store - var sele_g=th.data.sele_g; - var arr=sele_g.pickup_list.split(','); - - var idx=arr.findIndex(function (e) { - return e==def_pick_store.pickup_id; - }) - - if(idx==-1){ - def_pick_store.is_no_dis=1; - } - th.setData({def_pick_store}) - - } - - - - -} \ No newline at end of file diff --git a/pages/giftpack/public/buy_com.wxml b/pages/giftpack/public/buy_com.wxml deleted file mode 100644 index 278e882..0000000 --- a/pages/giftpack/public/buy_com.wxml +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - {{choice_sort_store==0?'附近的门店':region_name}} - - - - - - {{choice_sort_store==0?'更多门店':'返回'}} - - - - - - - 搜索 - - - - - - - - - - - - - Г - - - - - - - - {{item.pickup_name}} - - - - 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}} - - - - 地址:{{item.fulladdress}} - - - - - - - - - - Г - - - - - - - - {{item.pickup_name}} - - - - 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} - - - - 地址:{{item.fulladdress}} - - - - - - - - - - - - Г - - - - - - - - {{item.pickup_name}} - - - - 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} - - - - 地址:{{item.fulladdress}} - - - - - - - - - - 确定 - - - 设为默认 - - - - - - - 门店分类选择 - - - - - - 返回 - - - - - - - {{item.name}} - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 034bdf8..4ade134 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -9137,7 +9137,7 @@ Page({ let url = ''; if (flag == 2) { // flag =1 控制跳转到专享礼包 url = `/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id=${id}&is_act=1`; - // url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; + } else if (flag == 1) { // flag =1 控制跳转到专享礼包 url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; } else { diff --git a/pages/index/index/index.js b/pages/index/index/index.js index 47694d5..494f3ef 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -1384,7 +1384,7 @@ Page({ if (res.data.code == 0) { var actid = res.data.data.id; //活动id var giftBagId = res.data.data.giftBagId; //礼包id - var new_nav = "/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId; + var new_nav = "/packageF/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId; var new_image = res.data.data.imageurl; var swiperimage = th.data.swiperimage; var img = { diff --git a/pages/user/index/index.js b/pages/user/index/index.js index d1021cb..baf980a 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -1018,7 +1018,7 @@ Page({ if (actId != "" && giftbagid != "") { - getApp().goto("/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3); + getApp().goto("/packageF/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3); } else { getApp().showWarning("请稍后重试"); -- libgit2 0.21.4