diff --git a/code_obfuscation_config.json b/code_obfuscation_config.json
new file mode 100644
index 0000000..bf37476
--- /dev/null
+++ b/code_obfuscation_config.json
@@ -0,0 +1,30 @@
+{
+ "desc": "关于本文件的更多信息,请参考文档 代码加固开发者文档: https://developers.weixin.qq.com/miniprogram/dev/devtools/code_obfuscation.html",
+ "switch": true,
+ "configs": [
+ {
+ "path": "app.js",
+ "sub_switch": true
+ },
+ {
+ "path": "utils/pay.js",
+ "sub_switch": true
+ },
+ {
+ "path": "utils/pay2.js",
+ "sub_switch": true
+ },
+ {
+ "path": "utils/request.js",
+ "sub_switch": true
+ },
+ {
+ "path": "utils/util.js",
+ "sub_switch": true
+ },
+ {
+ "path": "utils/auth.js",
+ "sub_switch": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/birthdaygift/birthdaygift.js b/packageF/pages/giftpack/birthdaygift/birthdaygift.js
new file mode 100644
index 0000000..7d2fb36
--- /dev/null
+++ b/packageF/pages/giftpack/birthdaygift/birthdaygift.js
@@ -0,0 +1,722 @@
+var i = require("../../../../utils/util.js")
+const com = require("../../../../pages/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
+ })
+ }
+
+
+ },
+ //选择更多门店
+ 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();
+ })
+ },
+
+
+});
\ No newline at end of file
diff --git a/packageF/pages/giftpack/birthdaygift/birthdaygift.json b/packageF/pages/giftpack/birthdaygift/birthdaygift.json
new file mode 100644
index 0000000..ebd948e
--- /dev/null
+++ b/packageF/pages/giftpack/birthdaygift/birthdaygift.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "生日礼包",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm"
+ }
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/birthdaygift/birthdaygift.wxml b/packageF/pages/giftpack/birthdaygift/birthdaygift.wxml
new file mode 100644
index 0000000..fd909f9
--- /dev/null
+++ b/packageF/pages/giftpack/birthdaygift/birthdaygift.wxml
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+ ______
+
+
+ 生日专享\n你的美丽我来缔造
+
+
+ ______
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 免费领取
+
+
+ {{item.fromName}}
+
+
+
+
+ {{item.fromName}}
+
+
+ {{"生日可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}
+
+
+ 数量:
+ {{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 生日专享优惠券
+
+
+ ———
+
+
+
+
+
+
+
+
+ 全场通用
+
+
+ 品牌限定
+
+
+ 品类限定
+
+
+ 用途限定
+
+
+ 分类限定
+
+
+
+ 包邮券
+
+
+ {{item.sum+"元券"}}
+
+ {{"满"+item.buySum+"元可以用"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 生日专享福利
+
+
+ ———
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageF/pages/giftpack/birthdaygift/birthdaygift.wxss b/packageF/pages/giftpack/birthdaygift/birthdaygift.wxss
new file mode 100644
index 0000000..3705d65
--- /dev/null
+++ b/packageF/pages/giftpack/birthdaygift/birthdaygift.wxss
@@ -0,0 +1,718 @@
+@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;
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/buygiftpack/giftpackbuy.js b/packageF/pages/giftpack/buygiftpack/giftpackbuy.js
new file mode 100644
index 0000000..134fefd
--- /dev/null
+++ b/packageF/pages/giftpack/buygiftpack/giftpackbuy.js
@@ -0,0 +1,872 @@
+var i = require("../../../../utils/util.js");
+var ut=i;
+var com = require("../../../../pages/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, //图片前缀网址
+ 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) {
+ if(options.transfer){
+ let obj=getApp().globalData.ts_trans_data;
+ options= JSON.parse(JSON.stringify(obj));
+ getApp().globalData.ts_trans_data=null;
+ }
+
+ 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 = "/packageF/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)
+ })
+ }
+ },
+
+ 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;
+ }
+
+})
\ No newline at end of file
diff --git a/packageF/pages/giftpack/buygiftpack/giftpackbuy.json b/packageF/pages/giftpack/buygiftpack/giftpackbuy.json
new file mode 100644
index 0000000..2ea7afc
--- /dev/null
+++ b/packageF/pages/giftpack/buygiftpack/giftpackbuy.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "礼包列表",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "lb_sear": "/components/lb_sear/lb_sear"
+ }
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/buygiftpack/giftpackbuy.wxml b/packageF/pages/giftpack/buygiftpack/giftpackbuy.wxml
new file mode 100644
index 0000000..da422ba
--- /dev/null
+++ b/packageF/pages/giftpack/buygiftpack/giftpackbuy.wxml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 礼包列表
+
+
+
+ 我的礼包
+
+
+
+
+
+
+
+
+
+
+
+
+ {{items.giftTitle}}
+
+
+
+ {{"¥"+items.payMoney}}
+
+
+ /
+
+
+
+ {{items.payIntegral}}
+ 积分
+
+
+
+
+ {{"零售价:¥"+items.giftPosPrice}}
+
+
+ {{"活动开始时间:"+items.starTime}}
+
+
+ {{"活动结束时间:"+items.endTime}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 到底了
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageF/pages/giftpack/buygiftpack/giftpackbuy.wxss b/packageF/pages/giftpack/buygiftpack/giftpackbuy.wxss
new file mode 100644
index 0000000..4d5191b
--- /dev/null
+++ b/packageF/pages/giftpack/buygiftpack/giftpackbuy.wxss
@@ -0,0 +1,257 @@
+/*引用样式路径*/
+@charset "UTF-8";
+@import '/pages/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;
+}
diff --git a/packageF/pages/giftpack/evaluategift/evaluategift.js b/packageF/pages/giftpack/evaluategift/evaluategift.js
new file mode 100644
index 0000000..dc668fd
--- /dev/null
+++ b/packageF/pages/giftpack/evaluategift/evaluategift.js
@@ -0,0 +1,240 @@
+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/packageF/pages/giftpack/evaluategift/evaluategift.wxss b/packageF/pages/giftpack/evaluategift/evaluategift.wxss
new file mode 100644
index 0000000..a9d2a14
--- /dev/null
+++ b/packageF/pages/giftpack/evaluategift/evaluategift.wxss
@@ -0,0 +1,401 @@
+@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;
+}
diff --git a/packageF/pages/giftpack/festival/festival.js b/packageF/pages/giftpack/festival/festival.js
new file mode 100644
index 0000000..17ad842
--- /dev/null
+++ b/packageF/pages/giftpack/festival/festival.js
@@ -0,0 +1,224 @@
+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: "", //背景颜色
+ },
+ 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
+ })
+ }
+
+ } 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
diff --git a/packageF/pages/giftpack/festival/festival.json b/packageF/pages/giftpack/festival/festival.json
new file mode 100644
index 0000000..3e38fd3
--- /dev/null
+++ b/packageF/pages/giftpack/festival/festival.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "节日有礼",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm"
+ }
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/festival/festival.wxml b/packageF/pages/giftpack/festival/festival.wxml
new file mode 100644
index 0000000..c50539e
--- /dev/null
+++ b/packageF/pages/giftpack/festival/festival.wxml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+ ______
+
+
+ 节日专享\n你的美丽我来缔造
+
+
+ ______
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 免费领取
+
+
+ {{item.fromName}}
+
+
+
+
+ {{item.fromName}}
+
+
+ {{"节日可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}
+
+
+ 数量:
+ {{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 节日专享优惠券
+
+
+ ———
+
+
+
+
+
+
+
+
+ 全场通用
+
+
+ 品牌限定
+
+
+ 品类限定
+
+
+ 用途限定
+
+
+ 分类限定
+
+
+
+ 包邮券
+
+
+ {{item.sum+"元券"}}
+
+ {{"满"+item.buySum+"元可以用"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 节日专享福利
+
+
+ ———
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageF/pages/giftpack/festival/festival.wxss b/packageF/pages/giftpack/festival/festival.wxss
new file mode 100644
index 0000000..d7ae42b
--- /dev/null
+++ b/packageF/pages/giftpack/festival/festival.wxss
@@ -0,0 +1,411 @@
+@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;
+}
diff --git a/packageF/pages/giftpack/giftpacklist/giftpacklist.js b/packageF/pages/giftpack/giftpacklist/giftpacklist.js
new file mode 100644
index 0000000..008ab26
--- /dev/null
+++ b/packageF/pages/giftpack/giftpacklist/giftpacklist.js
@@ -0,0 +1,1427 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+var ut = require("../../../../utils/util.js");
+var com = require("../../../../pages/giftpack/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) {
+ if(options.transfer){
+ let obj=getApp().globalData.ts_trans_data;
+ options= JSON.parse(JSON.stringify(obj));
+ getApp().globalData.ts_trans_data=null;
+ }
+
+ //定义第一次进入
+ 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 = "/packageF/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=packageF/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
diff --git a/packageF/pages/giftpack/giftpacklist/giftpacklist.json b/packageF/pages/giftpack/giftpacklist/giftpacklist.json
new file mode 100644
index 0000000..dffdf6a
--- /dev/null
+++ b/packageF/pages/giftpack/giftpacklist/giftpacklist.json
@@ -0,0 +1,12 @@
+{
+ "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"
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/giftpacklist/giftpacklist.wxml b/packageF/pages/giftpack/giftpacklist/giftpacklist.wxml
new file mode 100644
index 0000000..0885ccc
--- /dev/null
+++ b/packageF/pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+
+
+
+ {{pick_up.pickup_name}}
+
+
+
+ {{giftTitle}}
+
+
+
+
+ 分享
+
+
+
+
+
+
+
+ {{"活动开始时间:"+giftStart}}
+
+
+
+
+ {{"兑换结束时间:"+giftDate}}
+
+ {{"活动结束时间:"+giftDate}}
+
+
+
+
+
+ {{"兑换时间:领取后"+exchangeDay+"天内兑换"}}
+
+
+ {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}}
+
+
+
+
+
+
+
+ {{"¥"+giftPrice}}
+
+
+ /
+
+
+ {{giftIntegral+"积分"}}
+
+
+ {{actTitle}}
+
+
+
+
+
+
+
+ 礼包内容
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.couponName}}
+
+
+
+
+
+
+ {{"数量:"+item.num}}
+
+
+
+ 已核销
+
+
+ 未核销
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 奖励已发放
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageF/pages/giftpack/giftpacklist/giftpacklist.wxss b/packageF/pages/giftpack/giftpacklist/giftpacklist.wxss
new file mode 100644
index 0000000..aef5685
--- /dev/null
+++ b/packageF/pages/giftpack/giftpacklist/giftpacklist.wxss
@@ -0,0 +1,275 @@
+@charset "UTF-8";
+@import '/pages/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;
+}
diff --git a/packageF/pages/giftpack/mygiftpack/mygiftpack.js b/packageF/pages/giftpack/mygiftpack/mygiftpack.js
new file mode 100644
index 0000000..e6a7141
--- /dev/null
+++ b/packageF/pages/giftpack/mygiftpack/mygiftpack.js
@@ -0,0 +1,267 @@
+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) {
+ if(options.transfer){
+ let obj=getApp().globalData.ts_trans_data;
+ options= JSON.parse(JSON.stringify(obj));
+ getApp().globalData.ts_trans_data=null;
+ }
+
+ 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();
+ },
+ 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;
+ }
+
+});
\ No newline at end of file
diff --git a/packageF/pages/giftpack/mygiftpack/mygiftpack.json b/packageF/pages/giftpack/mygiftpack/mygiftpack.json
new file mode 100644
index 0000000..bd6784b
--- /dev/null
+++ b/packageF/pages/giftpack/mygiftpack/mygiftpack.json
@@ -0,0 +1,9 @@
+{
+ "navigationBarTitleText": "我的礼包",
+ "enablePullDownRefresh": false,
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "lb_sear": "/components/lb_sear/lb_sear"
+ }
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/mygiftpack/mygiftpack.wxml b/packageF/pages/giftpack/mygiftpack/mygiftpack.wxml
new file mode 100644
index 0000000..609712d
--- /dev/null
+++ b/packageF/pages/giftpack/mygiftpack/mygiftpack.wxml
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 礼包列表
+
+
+
+ 我的礼包
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新人有礼
+
+
+ 评价有礼
+
+
+ 节日营销
+
+
+ 生日营销
+
+
+ 助力礼包
+
+
+
+
+
+
+ {{item.giftTitle}}
+
+
+
+ {{"¥"+item.payMoney}}
+
+
+ {{item.payIntegral+"积分"}}
+
+
+
+
+
+
+
+ {{"零售价:¥"+item.giftPosPrice}}
+
+
+
+
+ {{"兑换截至日期:"+item.endTime}}
+
+
+ {{"距兑换开始时间: "+item.starTime}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 已退款
+
+
+
+
+
+
+
+
+
+ 到底了
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageF/pages/giftpack/mygiftpack/mygiftpack.wxss b/packageF/pages/giftpack/mygiftpack/mygiftpack.wxss
new file mode 100644
index 0000000..74560e2
--- /dev/null
+++ b/packageF/pages/giftpack/mygiftpack/mygiftpack.wxss
@@ -0,0 +1,266 @@
+/*引用样式路径*/
+@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;
+}
diff --git a/packageF/pages/giftpack/newvipgift/newvipgift.js b/packageF/pages/giftpack/newvipgift/newvipgift.js
new file mode 100644
index 0000000..ad8ff73
--- /dev/null
+++ b/packageF/pages/giftpack/newvipgift/newvipgift.js
@@ -0,0 +1,198 @@
+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) {
+ if(options.transfer){
+ let obj=getApp().globalData.ts_trans_data;
+ options= JSON.parse(JSON.stringify(obj));
+ getApp().globalData.ts_trans_data=null;
+ }
+
+ 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();
+
+ },
+ 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"
+
+ )
+
+ }
+ },
+ //界面跳转
+ 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
diff --git a/packageF/pages/giftpack/newvipgift/newvipgift.json b/packageF/pages/giftpack/newvipgift/newvipgift.json
new file mode 100644
index 0000000..807b825
--- /dev/null
+++ b/packageF/pages/giftpack/newvipgift/newvipgift.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "新人礼",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm"
+ }
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/newvipgift/newvipgift.wxml b/packageF/pages/giftpack/newvipgift/newvipgift.wxml
new file mode 100644
index 0000000..12078a6
--- /dev/null
+++ b/packageF/pages/giftpack/newvipgift/newvipgift.wxml
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+ ______
+
+
+ 新人专享\n你的美丽我来缔造
+
+
+ ______
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 免费领取
+
+
+ {{item.fromName}}
+
+
+
+
+ {{item.fromName}}
+
+
+ {{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}
+
+
+ 数量:
+ {{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享优惠券
+
+
+ ———
+
+
+
+
+
+
+
+
+ 全场通用
+
+
+ 品牌限定
+
+
+ 品类限定
+
+
+ 用途限定
+
+
+ 分类限定
+
+
+
+ 包邮券
+
+
+ {{item.sum+"元券"}}
+
+ {{"满"+item.buySum+"元可以用"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享福利
+
+
+ ———
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageF/pages/giftpack/newvipgift/newvipgift.wxss b/packageF/pages/giftpack/newvipgift/newvipgift.wxss
new file mode 100644
index 0000000..02ac52f
--- /dev/null
+++ b/packageF/pages/giftpack/newvipgift/newvipgift.wxss
@@ -0,0 +1,417 @@
+@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;
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/payment/payment.js b/packageF/pages/giftpack/payment/payment.js
new file mode 100644
index 0000000..836fc6c
--- /dev/null
+++ b/packageF/pages/giftpack/payment/payment.js
@@ -0,0 +1,42 @@
+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/packageF/pages/giftpack/payment/payment.json b/packageF/pages/giftpack/payment/payment.json
new file mode 100644
index 0000000..b8252b8
--- /dev/null
+++ b/packageF/pages/giftpack/payment/payment.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "支付成功",
+ "usingComponents": {
+ "show_encourage": "/components/show_encourage/show_encourage"
+ }
+}
\ No newline at end of file
diff --git a/packageF/pages/giftpack/payment/payment.wxml b/packageF/pages/giftpack/payment/payment.wxml
new file mode 100644
index 0000000..438e74f
--- /dev/null
+++ b/packageF/pages/giftpack/payment/payment.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+ 订单支付成功!
+
+
+
+
+
+
+
+ 订单编号 :
+ {{order_sn}}
+
+
+
+
+ 实付金额 :
+
+ {{filters.toFix(allmoney,2)}}元
+
+
+
+
+ 支付方式 :
+ 微信支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我的礼包
+
+
+
+
+ 回到首页
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageF/pages/giftpack/payment/payment.wxss b/packageF/pages/giftpack/payment/payment.wxss
new file mode 100644
index 0000000..f69e931
--- /dev/null
+++ b/packageF/pages/giftpack/payment/payment.wxss
@@ -0,0 +1,84 @@
+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