diff --git a/app.json b/app.json index 16225fb..eaaf0a6 100644 --- a/app.json +++ b/app.json @@ -221,7 +221,12 @@ "pages/user/labels/labels", "pages/cart/cart2/cart2", "pages/barCodeBank/barCodeBank", - "pages/qy/contactMe/contactMe" + "pages/qy/contactMe/contactMe", + "pages/user/monthgiftbag/payment/payment", + "pages/user/monthgiftbag/monthgiftbag", + "pages/user/monthgiftbag/giftpacklist/giftpacklist", + "pages/user/monthgiftbag/giftpackinfo/giftpackinfo", + "pages/user/monthgiftbag/giftpackbuy/giftpackbuy" ] } diff --git a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js new file mode 100644 index 0000000..7ffa588 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js @@ -0,0 +1,672 @@ +var i = require("../../../../../utils/util.js"); +var com = require("../public/buy_com.js"); +var e = getApp(), + a = e.globalData.setting, + os = a, + t = e.request, + d = e.globalData; +Page({ + data: { + url: a.url, //接口网址 + iurl: a.imghost, //图片前缀网址 + getStorageID: '', + getUserID: '', + wareCard: [], + // page: 0, + // pageSize: 10, + isEmpty: false, + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore + contentText: { + contentdown: '加载更多', + contentrefresh: '加载中...', + contentnomore: '已加载全部' + }, + ismore: 0, //数据是否全部加载完成 + is_read: 0, //是否查询过我的礼包接口 + curpage: 1, //当前分页数 + pageSize: 10, //页大小 + total: 0, //总数量 + ad_data: null, + first_leader: e.globalData.first_leader || 0, // 推荐人ID + + //门店相关 + ismend: 0, + is_sec_mend: 0, + sto_sele_name: "", //选中的门店名称 + sto_sele_id: "", //选中的门店id + sto_sele_distr: "", //选择的门店的配送方式 + is_show_sto_cat: 1, //是否显示门店分类 + only_pk: null, + all_sto: null, + sec_sto: null, //选择了的门店分类 + pickpu_list: null, //读出的所有门店list + def_pickpu_list: null, //一开始5个门店list + sec_pick_index: 0, //第二级门店选择ID + fir_pick_index: 0, //第一级门店选择ID + all_pick_list: null,//所有的门店先记录起来 + + select_store: 0, //选择更多 + index: 1, + more_store: 0, //选择门店 + sort_store: 0, //门店分类 + choice_sort_store: 0, //选择分类门店 + new_user: 0, //新用户 + + def_pick_store: null, // 默认的门店 + fir_def_store: null, //客户默认的门店的 + lat: null, //维度 + lon: null, //经度 + + is_get_local_ok: 0, //获取坐标是否完成 + region_name: "门店分类", //区域的名字 + is_gps: 1, + open_ind_store: 0, //哪里打开的门店列表的控制属性 + default_store: {}, //创建添加默认门店地址的对象 + + store:0, + openSpecModal:0, + + is_get_guide:0, + + }, + onLoad: function (options) { + var th=this; + + 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=1208&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(); + var th=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; + } + + 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(); + }, + + //购买礼包 + 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{ + 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 { + 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 { + + + 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) { + var th = this; + getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', { + isShowLoading: true, + data: { + store_id: th.data.getStorageID, //商家ID + user_id: th.data.getUserID, //用户ID + page: th.data.curpage, + pageSize: th.data.pageSize, + is_end:0 + }, + success: function (res) { + 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].begindate.replace(/-/g, "/")))/1000 + arr2[j].starTime1=arr2[j].begindate + arr2[j].starTime=i.formatTime(arr2[j].begindate, "yyyy-MM-dd hh:mm:ss"); + arr2[j].endTime=i.formatTime(arr2[j].enddate, "yyyy-MM-dd hh:mm:ss"); + arr2[j].giftPosPrice=arr2[j].oldPrice + arr2[j].payMoney=arr2[j].lbPrice + arr2[j].payIntegral=arr2[j].exchangeIntegral + arr2[j].giftQty=arr2[j].buynum + arr2[j].cover_img=arr2[j].imageurl + arr2[j].giftTitle=arr2[j].act_name + arr2[j].virtualsales=arr2[j].virtualSales + arr2[j].lbnum=arr2[j].lbNum + } + + 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 + }) + } + } + }) + + }, + //销毁界面跳转 + 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; + var index=e.currentTarget.dataset.index + console.log(url); + wx.setStorageSync('monthgiftbag', th.data.wareCard[index]) + 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) { + //--先判断会员状态-- + 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_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) + } +}) \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.json b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.json new file mode 100644 index 0000000..6acc1c4 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.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/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml new file mode 100644 index 0000000..156357b --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + 礼包列表 + + + + 我的礼包 + + + + + + + + + + + + + {{items.giftTitle}} + + + + {{"¥"+items.payMoney}} + + + / + + + + {{items.payIntegral}} + 积分 + + + + + {{"零售价:¥"+items.giftPosPrice}} + + + {{"活动开始时间:"+items.starTime}} + + + {{"活动结束时间:"+items.endTime}} + + + + + + {{"已售:"+items.giftQty+"件"}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 当前暂无礼包 + + + 回到首页 + + + + + + + 到底了 + + + + + + + + \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxss b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxss new file mode 100644 index 0000000..b56fba2 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxss @@ -0,0 +1,233 @@ +/*引用样式路径*/ +@charset "UTF-8"; +@import './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; +} \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpackbuy/goodsInfo.wxss b/packageE/pages/user/monthgiftbag/giftpackbuy/goodsInfo.wxss new file mode 100644 index 0000000..13012ba --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/goodsInfo.wxss @@ -0,0 +1,4020 @@ +@import "../../../../../utils/wxParse/wxParse.wxss"; + +.container { + margin-bottom: 100rpx; + overflow: hidden; + padding-top: 80rpx; +} + +image { + vertical-align: top; +} +.rules { + position: fixed; + background-color: rgba(0,0,0,.2); + color: white; + top: 22rpx; + right: 0; + z-index: 100; + font-size: 26rpx; + padding: 0 20rpx; + z-index: 99999; + border-radius: 20rpx 0 0 20rpx; +} + +.rule-pop-container { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + background-color: white; + z-index: 99999; + border-radius: 16rpx 16rpx 0 0; + padding: 0 40rpx; + box-sizing: border-box; + font-size: 28rpx; + color: #444; +} + +.pop-title { + padding: 20rpx 0; + text-align: center; + font-size: 32rpx; + position: relative; +} +.icon-guan { + position: absolute; + right: 0; + font-size: 26rpx; + top: 50%; + transform: translateY(-50%); + color: #ccc; +} +.btn { + color: white; + padding: 20rpx 0; + text-align: center; + border-radius: 40rpx; + background: -webkit-linear-gradient(left,#ff5000,#ff2000) no-repeat; +} + +.goods-detail { + overflow: hidden +} +.popup-content { + max-height: 600rpx; + overflow-y: auto; +} + +.type-navbar { + display: flex; + justify-content: center; + width: 100%; + position: fixed; + top: 0; + z-index: 999; + /* height: 80rpx; */ + /* margin-bottom: 20rpx; */ + background-color: #fff; + border-top: 2rpx solid #ebedf0; + /* border-bottom: 1rpx #fafafa solid; */ +} + +.type-box { + width: 25%; + box-sizing: border-box; + font-size: 32rpx; + line-height: 76rpx; + padding: 0 20rpx; + text-align: center; + display: inline-block; + overflow: hidden; +} + +.type-navbar-item { + /* border-bottom: 4rpx solid #fff; */ + display: flex; + justify-content: center; + width: 100%; + font-size: 26rpx; +} + +.type-item-on { + color: #F95D74; + font-weight: bold; + /* border-bottom: 4rpx solid #F95D74; */ + position: relative; + font-size: 30rpx; +} + +.type-item-on:after { + content: ''; + position: absolute; + width: 50%; + height: 4rpx; + background-color: #F95D74; + left: 0; + right: 0; + bottom: 0; + margin: 0 auto; +} + +.swiper_box { + width: 100%; + height: 750rpx; +} + +.goods-title { + display: flex; + justify-content: space-between; + align-items: center; + vertical-align: middle; + /* overflow: hidden; */ + /* height: 108rpx; */ +} + +.goods-name { + /* width: 560rpx; */ + /* line-height: 46rpx; */ + font-size: 32rpx; + font-weight: bold; + color: #333; + /* margin-top: 30rpx; + margin-bottom:30rpx; */ + flex: 1; + text-align: justify; + margin: 10rpx 0 20rpx; +} + +.goods-collect { + width: 112rpx; + padding-top: 30rpx; +} + +.collect-img { + width: 50rpx; + height: 44rpx; + margin: 0 auto; + overflow: hidden; +} + +.collect-des { + text-align: center; + font-size: 24rpx; + color: #333; +} + +.goods-price { + font-size: 60rpx; + /* padding: 20rpx 34rpx; */ + /* padding:0rpx 34rpx; */ + /* line-height: 60rpx; */ + color: #999; + padding: 20rpx; + /* margin-top: 46rpx; */ + /* margin-top:26rpx; + padding-bottom:20rpx; */ +} + +.prom-info { + margin: 10rpx 0; + color: #f23030; +} + +.prom-info>.prom-type { + color: white; + background-color: #f23030; + margin-right: 14rpx; + padding: 2rpx 8rpx; + border-radius: 4rpx; +} + +.market-price { + /* display: flex; + margin-left: -5rpx; */ +} + +.market-price .yuan { + /* top:24rpx; */ + font-size: 30rpx +} + +.market-price>view>text { + text-decoration: line-through; +} + +.market-price>.yj { + color: #999999; + font-size: 24rpx; + /* margin-left: 16rpx;position: relative;top:30rpx; */ + display: inline-block; +} + +.goods-price>.tm { + color: #999999; + font-size: 26rpx; + margin-top: 10rpx; +} + +.goods-num { + display: flex; + font-size: 24rpx; + justify-content: space-between; +} + +.goods-detail .twen { + background: #fff; + height: 60rpx; + line-height: 60rpx; + font-size: 30rpx; + padding-left: 30rpx; + display: flex; +} + +.goods-detail .twen .img { + width: 32rpx; + height: 32rpx; + margin-left: 200rpx; + background: #fff +} + +.goods-detail .twen image.img { + vertical-align: auto; +} + + +.logistics-item { + display: flex; + justify-content: space-between; + align-items: center; + height: 90rpx; + /*border-bottom: 1px solid #f5f5f5;*/ + font-size: 32rpx; + color: #666; +} + +.logistics-item .small { + color: #999; + font-size: 24rpx; +} + +.item-title { + width: 180rpx; +} + +.item-mes { + color: #333; + width: 420rpx; + height: 90rpx; + line-height: 90rpx; +} + +.item-img { + width: 32rpx; + height: 32rpx; +} + +.prom-item { + color: #f23030; + border: 1px solid #f23030; + border-radius: 18rpx; + line-height: 40rpx; + height: 40rpx; + padding: 2rpx 8rpx; +} + +.guarantee { + justify-content: space-around; +} + +.ico-item { + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; +} + +.guarantee>view { + display: flex; + align-items: center; + height: 32rpx; + color: #666; +} + +.user-comment { + margin: 10rpx 0; + font-size: 28rpx; +} + +.good-comment, +.comment-num { + display: flex; +} + +.recommend { + background-color: #fff; + border-bottom: 1px solid #ddd; + padding-bottom: 20rpx; +} + +.recommend-title { + height: 70rpx; + line-height: 70rpx; + font-size: 28rpx; + padding: 0 30rpx; +} + +.recommend-ul { + display: flex; + justify-content: flex-start; +} + +.recommend-ul .li { + width: 25%; + box-sizing: border-box; + text-align: center; + font-size: 28rpx; + color: #333; +} + +.li-img { + width: 120rpx; + height: 120rpx; + margin: 0 auto; +} + +.li-title { + height: 58rpx; + line-height: 30rpx; + margin: 10rpx 0; +} + +.comment-item { + background-color: #fff; + font-size: 28rpx; +} + +.comment-title { + display: flex; + justify-content: space-between; + align-items: center; + height: 102rpx; + margin: 0 30rpx; + color: #333; + border-bottom: 1px solid #eee; +} + +.user-name { + display: flex; + align-items: center; +} + +.user-pic { + width: 54rpx; + height: 54rpx; + margin-right: 10rpx; + border-radius: 50%; + overflow: hidden; +} + +.stars { + float: left; + display: flex; + height: 42rpx; + line-height: 42rpx; + margin: 15rpx 0; + width: 200rpx; +} + +.star { + width: 26rpx; + height: 26rpx; + margin-right: 5rpx; +} + +.state-spec { + margin: 15rpx 0; + float: right; + font-size: 24rpx; + color: #666; + width: 460rpx; + text-align: right; +} + +.comment-cont { + padding: 0 30rpx 30rpx; + border-bottom: 1px solid #eee; +} + +.comment-mes { + line-height: 42rpx; +} + +.img-ul { + display: flex; + flex-wrap: wrap; +} + +.img-li { + width: 150rpx; + height: 150rpx; + margin-top: 8rpx; + margin-right: 10rpx; +} + +.comment-btn { + height: 60rpx; + padding: 20rpx 30rpx; +} + +.comment-btn .btn { + display: flex; + justify-content: center; + align-items: center; + height: 60rpx; + width: 45%; + border: 1px solid #eee; +} + +.comment-btn .btn-img { + width: 30rpx; + height: 28rpx; + margin: 0 10rpx; +} + +.reply-ul { + margin-top: 20rpx; +} + +.reply-li { + color: #aaa; +} + +.join-cart { + position: fixed; + left: 0; + bottom: 0; + display: flex; + width: 100%; + height: 100rpx; + background-color: #fff; + z-index: 9; + border-top: 4rpx solid #eee; + +} + +.join-cart>view { + width: 29%; +} + +.join-cart>.new_split { + width: 13%; + text-align: center; + padding: 0; + margin: 0; +} + +.cart-ico { + font-size: 24rpx; + color: #333; +} + +.shopping-cart { + position: relative; +} + +.cs-img { + width: 45rpx; + height: 40rpx; + margin-top: 15rpx; +} + +.sc-img { + width: 42rpx; + height: 40rpx; + margin-top: 15rpx; +} + +.cart-num { + position: absolute; + left: 50%; + top: 1rpx; + width: 40rpx; + height: 40rpx; + line-height: 40rpx; + text-align: center; + border-radius: 50%; + color: #fff; + background-color: rgba(217, 81, 99, 0.9); +} + +.cart-btn { + font-size: 28rpx; + color: #fff; + line-height: 70rpx; + margin-top: 16rpx; + text-align: center; + + +} + +.join-btn { + background-color: #ffb03f; + height: 70rpx; + border-radius: 55rpx 0rpx 0rpx 55rpx; + margin-top: 16rpx; + + +} + +view.cart-btn-lg { + width: 50%; +} + +.buy-btn { + background-color: #f23030; + height: 70rpx; + border-radius: 0 56rpx 55rpx 0; + +} + +.buy-btn-all { + background-color: #f23030; + height: 70rpx; + border-radius: 56rpx; +} + + +.toTop { + position: fixed; + z-index: 3; + right: 20rpx; + bottom: 160rpx; + width: 68rpx; + height: 68rpx; + border: 1px solid #ddd; + border-radius: 50%; + overflow: hidden; + cursor: pointer; +} + +.comment-more { + height: 56rpx; + line-height: 56rpx; + font-size: 26rpx; + color: #999; + text-align: center; + background-color: #eee; +} + +.goods-more { + background-color: #fff; +} + +.goods-norms { + background-color: #fff; +} + +.type-navbar2 { + display: flex; + height: 72rpx; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +.type-box2 { + width: 50%; + font-size: 26rpx; + line-height: 72rpx; + text-align: center; + overflow: hidden; +} + +.type-item2-on { + color: #f23030; +} + +.parameter { + padding: 40rpx 0; +} + +.table { + width: 698rpx; + margin: 0 auto; + border: 1px solid #ddd; + border-bottom: none; +} + +.tb { + width: 100%; + min-height: 69rpx; + line-height: 69rpx; + border-bottom: 1px solid #ddd; + font-size: 28rpx; + text-align: center; + color: #333; +} + +.th-thitle { + font-weight: bold; + background-color: #f5fafe; +} + +.td-cont { + display: flex; +} + +.td-title { + width: 259rpx; + background-color: #f5fafe; + border-right: 1px solid #ddd; +} + +.td-text { + width: 439rpx; +} + +.goods-comment { + background-color: #fff; +} + +.type-navbar3 { + display: flex; + height: 88rpx; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + padding: 10rpx 0; +} + +.type-box3 { + width: 20%; + font-size: 30rpx; + line-height: 44rpx; + text-align: center; + overflow: hidden; +} + +.type-item3-on { + color: #f23030; +} + +.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; +} + +.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; +} + +.quhuo { + font-size: 30rpx; + color: #000 +} + +.b_num { + display: flex; + font-size: 30rpx; + color: #333; + justify-content: space-between; + align-items: center; + padding: 20rpx 0; +} + +.count { + /* position: fixed; */ + display: flex; + height: 50rpx; + /* border: 1rpx solid #000; */ + font-size: 28rpx; + right: 30rpx; +} + + +.count>view, +.count>input { + width: 60rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; +} + +.spec_bt { + background: fff; + color: #333; + margin-left: 10rpx; + padding: 4rpx 15rpx 4rpx; + display: inline-block; + border-radius: 30rpx; + font-size: 24rpx; + border: 1rpx solid #ccc; + margin: 10rpx; + height: 40rpx; + line-height: 40rpx; +} + +.spec_bt.act { + background: #d60021; + color: #fff; + border: 1rpx solid #d60021; +} + +.sub, +.add, +.count>input { + /* border-right: 1px solid #000; */ + background-color: #f8f8f8; + border-radius: 8rpx; +} + +.sub.active { + /* background-color: #ddd; */ + color: #ccc; +} + +.count>input { + margin: 0 10rpx; +} + +.add { + /* background-color: #f8f8f8; */ + /* border-left: 1px solid #000; */ +} + +.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; +} + +.prom-model { + position: fixed; + bottom: 0; + z-index: 20; + background: white; + width: 100%; + padding: 0 30rpx 30rpx; + font-size: 32rpx; + box-sizing: border-box; + overflow-x: hidden; +} + +.prom-model .prom-title { + text-align: center; + margin: 30rpx 0; +} + +.prom-model .logistics-item { + border: 0; +} + +.prom-model .item-mes { + width: 500rpx; +} + +.integral-btn { + width: 100%; + padding: 0rpx; + margin: 0rpx; +} + +.clear { + clear: both; +} + +.sto_v .title, +.sto_v .stitle { + border-top: 1rpx solid #dedede; + border-bottom: 1rpx solid #dedede; + height: 78rpx; + line-height: 78rpx; +} + +.sto_v .title .tubiao, +.sto_v .stitle .tubiao { + width: 32rpx; + height: 32rpx; + margin-top: 23rpx; +} + +.itemlists .item { + border-bottom: 1rpx solid #dedede; + height: 72rpx; + line-height: 72rpx; + font-size: 28rpx; + margin: 0 10rpx; +} + +.cshu { + margin-bottom: 30rpx; + margin-top: 20rpx; +} + +.cshu view { + color: #999; + font-size: 30rpx; + margin-left: 26rpx; +} + + +/*---活动特殊显示---*/ +.prom_show { + height: 120rpx; + display: flex; +} + +.prom_show .secondkill-img { + width: 100%; + height: 100%; +} + +.prom_show .spike-img { + width: 283rpx; + height: 57rpx; + top: 35rpx; + left: 31rpx; +} + +.prom_show .stop { + color: #d81731; + top: 17rpx; + right: 65rpx; + font-weight: 600; +} + +.prom_show .start { + color: #009ae2; + top: 17rpx; + right: 65rpx; + font-weight: 600; +} + +.prom_show .timeac { + font-size: 32rpx; + height: 120rpx; + color: #333; +} + +.prom_show .timeac.left { + width: 66%; + color: #fff; + background: #f23030; +} + +.prom_show .timeac.right { + width: 34%; + background-color: #d7d7d7; + text-align: center +} + +.prom_show .secview .day { + padding-right: 10rpx; +} + +.prom_show .secview .time-val { + width: 36rpx; + height: 36rpx; + border-radius: 7rpx; + line-height: 36rpx; +} + +.prom_show .secview .time { + margin-right: 10rpx; + margin-left: 10rpx; +} + + +.prom_show .timeac.left view { + margin-left: 20rpx +} + +.prom_show .timeac.left view.firview { + margin-top: 10rpx +} + +.prom_show .timeac.left view .tr_line { + text-decoration: line-through; + font-size: 28rpx; +} + +.prom_show .timeac.left view .bprice { + font-size: 50rpx; +} + +.prom_show .timeac.right view.firview { + margin-top: 12rpx; + margin-bottom: 10rpx +} + +.prom_show .timeac.right view.secview { + display: flex; + text-align: center; + justify-content: center; + flex-direction: row; +} + +.prom_show .timeac.right view .tui-conutdown-box { + /* background: #6b6b6b; */ + width: auto; + /* min-width: 45rpx; */ + height: 45rpx; + color: #c4182e; + font-size: 27rpx; + text-align: center; + line-height: 46rpx; +} + +.huise { + background: gray +} + +.lanse { + background: #0199e2 +} + + +/*------拼单------*/ +.pt_view { + text-align: center; + width: 100%; + height: 100rpx; + line-height: 100rpx; + font-size: 26rpx +} + +.pt_view .secondkill-img { + width: 100%; + height: 100%; +} + +.pt_fir { + background: #fff; + /* margin-bottom: 10rpx; */ +} + +.pt_fir .pt_fir_title { + display: flex; + align-items: center; + /* margin-left: 10rpx; margin-top: 20rpx; */ + font-size: 28rpx; + position: relative; +} + +.pt_fir .pt_fir_title .kt_type { + color: #fff; + background: #e9030d; + width: 100rpx; + line-height: 40rpx; + border-radius: 6rpx; + margin: 0 10rpx; + height: 40rpx; + font-size: 24rpx; + text-align: center; +} + +.pt_fir .pt_fir_title .price { + color: #e9030d; + font-size: 26rpx; +} + +.pt_fir .pt_fir_title .bigw { + font-size: 36rpx; +} + +.pt_fir .pt_fir_title .tprice { + text-decoration: line-through; + color: #949494 +} + +.pt_fir .pt_fir_title .tprice.ml50 { + margin-left: 50rpx +} + +.pt_fir .pt_fir_title .js { + padding: 0 15rpx; + height: 40rpx; + background: #e9030d; + text-align: center; + border-radius: 8rpx; + color: #fff; + margin-left: 10rpx; +} + +.pt_fir .pt_fir_title .tuannum { + color: #e9030d; + position: absolute; + right: 20rpx; + font-size: 26rpx; +} + +.pding { + padding-top: 20rpx; + padding-left: 20rpx; + height: 81%; + padding-right: 20rpx; + font-size: 26rpx; + color: #ea120f +} + +.pdres { + margin-left: 10rpx; + color: #8f8f94 +} + +.ptgz { + position: relative; + font-size: 30rpx; + padding-left: 20rpx; + margin-top: 10rpx; + overflow: hidden +} + +.shuxian { + width: 6rpx; + height: 28rpx; + background: #ea120f; + display: inline-block; + top: 5rpx; + position: relative; + margin-right: 5rpx +} + +.ptgz_an { + position: absolute; + top: 5rpx; + right: 6rpx +} + +.ptgz_an .arrow-two { + width: 18rpx; + height: 18rpx; + border-color: #da0b31; + margin-top: 30rpx; +} + +.pt_fir.se { + height: auto; + margin-bottom: 10rpx +} + +.t_gz { + padding: 10rpx 20rpx; + font-size: 28rpx +} + +.pt_fir.se1 { + height: auto; + margin: 0 +} + +.pt_fir.se2 { + height: auto; + margin: 0; + /* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */ +} + +.pt_hb { + height: 78rpx; + line-height: 75rpx; + position: relative; + font-size: 32rpx; + overflow: hidden; + width: 695rpx; + margin-left: 28rpx; + border-bottom: 1rpx solid #E5E5E5 +} + +.ptgz_an.xq { + font-size: 32rpx; + color: #d40024 +} + +.wf { + display: flex; + padding: 20rpx 0; +} + +.wf .item { + width: 24.5%; + text-align: center; + font-size: 26rpx; + color: #666 +} + +.wf .item .item_txy { + position: relative; + width: 60rpx; + height: 60rpx; + background: #ea120f; + border-radius: 50%; + left: 50%; + margin-left: -30rpx; + border: 3px #dfdfdf solid; + text-align: center; + line-height: 60rpx; + color: #fff; + margin-bottom: 10rpx; +} + +.wf .item .item_txy.hs { + background: #cbcbcb; +} + +.po { + margin-bottom: 20rpx; +} + +.cart-btn.line-h { + line-height: 26rpx; +} + +.cart-btn .fir-v { + margin-top: 10rpx; +} + +.hyt { + padding: 0 20rpx; + font-size: 30rpx; + display: flex; + align-items: center; + margin-top: 10rpx; +} + +.hyt .r_f { + color: #e9120f; + font-size: 26rpx; + position: relative; + top: 3rpx +} + +.hyt .byj { + color: #e9120f; + font-size: 32rpx; + position: relative; + top: 5rpx +} + +.pt_fir .pt_fir_title.no-mar-b { + margin-bottom: 0; + padding-bottom: 10rpx; + margin-left: 20rpx +} + +.pt_fir .pt_fir_title.boder-1 { + border-bottom: 1rpx #e7e7e7 solid +} + +.jie_price { + /* padding: 10rpx 30rpx; */ +} + +.jie_price_title { + font-size: 30rpx; + color: #a26270; + margin-bottom: 10rpx +} + +.price_list { + display: flex; + width: 100%; +} + +.price_item { + width: 25%; + font-size: 28rpx; + color: #4c336c +} + +.pt_fir.se2 .zzk-1 { + /* margin-top: 23rpx; */ + font-size: 30rpx; + position: relative; + /* margin-bottom: 30rpx; */ + border-left: 4rpx solid red; + /* margin-left:14rpx; */ + height: 30rpx; + line-height: 30rpx; + /* padding-left:5rpx; */ +} + +.ckgd { + /* position: absolute;top:0;right:57rpx; */ + color: #d70025; + font-size: 26rpx; +} + +.ckgd .arrow-one { + width: 14rpx; + height: 14rpx; + border-color: #da0b31; + /* margin-top:5rpx; */ + margin: auto; +} + +.bview { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); +} + +.juzhong { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.juzhong .xq { + padding: 0 20rpx; + background: #fff; + font-size: 30rpx; + padding-bottom: 20rpx; +} + +.juzhong .xq .title { + text-align: center; + margin: 20rpx 0; + position: relative; + height: 50rpx; +} + +.juzhong .xq .hs1 { + font-size: 28rpx; + color: #ab8f9e +} + +.juzhong .xq .title .close { + position: absolute; + top: 0; + right: 0; + width: 45rpx; + height: 45rpx; +} + +.pt_qd { + /* margin-top: 40rpx; height: auto; */ + padding: 20rpx; +} + +.spec-cart-btn.w100 { + width: 95%; + margin-left: 0; + height: 75rpx; + line-height: 75rpx; + margin: auto; +} + +.sto_v { + color: #333; +} + +.ellipsis { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + + +/*---多少人参加团--*/ +.group { + padding-top: 20rpx; + padding-bottom: 20rpx; + width: 100%; + /* min-height: 92rpx; */ + border-bottom: 2rpx solid #ebedf0; + +} + +.group .group-list { + display: flex; + align-items: center; + justify-content: space-around; + /* height: 90rpx; */ + /* padding: 0 130rpx 0 100rpx; */ + /* width: 470rpx; + + position: absolute; */ +} + +.group .group-list .gtou { + width: 70rpx; + height: 70rpx; + /* float: left; + position: relative; + top: 6rpx; + left: -96rpx; */ +} + +.group .group-list .gtou image { + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: #f0f0f0; +} + +.group .group-list .gdn { + width: 140rpx; + text-align: center; + /* float: left; */ + font-size: 26rpx; + /* padding-left: 20rpx; */ + /* line-height: 48rpx; + height: 48rpx; + width: 168rpx; + position: relative; + left: -80rpx; + top:20rpx; */ + font-weight: bold; +} + +.group .group-list .ghaicha { + /* width:300rpx; */ + font-size: 27rpx; + /* margin-left:180rpx; + top:13rpx; + left:-3rpx; */ + font-weight: bold; + + +} + +.group .group-list .ghaicha .gred { + /* height: 48rpx; + width: 300rpx; */ +} + +.gsj { + float: left; + color: #8f8f94; +} + +.group .group-list .cjt { + height: 42rpx; + width: 137rpx; + /* position: absolute; + right: 4rpx; + top:25rpx; */ + line-height: 42rpx; + font-size: 24rpx; + color: #fff; + border: 2rpx solid #d60024; + background-color: #d60024; + border-radius: 25rpx; + +} + +.gbody { + background-color: white; +} + +.t_show { + /* overflow: hidden; */ + display: flex; + /* width: 300rpx; */ + color: #292929; + /* line-height: 36rpx; */ + font-size: 26rpx; +} + +.join-cart>view.set_width { + width: 58%; +} + +/*秒杀样式zwp*/ +#zwpMs { + width: 31%; + color: #fff; + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; + background-size: 100% 60px; +} + + +/*--------- 修改后的样式 -----------*/ +.elli { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.one_elli { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.tuwen_title { + /* height: 86rpx; */ + background-color: #eeeeee; + /* margin-bottom: 32rpx; */ + position: relative; + display: flex; + justify-content: center; + align-items: center; + padding: 20rpx; +} + +.tuwen_title .g_line { + width: 496rpx; + height: 1rpx; + border-bottom: #ababab 1rpx solid; +} + +.tuwen_title .center_s { + width: 124rpx; + position: absolute; + height: 34rpx; + background-color: #eeeeee; + font-size: 32rpx; + display: flex; + overflow: hidden; + justify-content: center; + align-items: center; +} + +.tuwen_title .center_s image { + width: 34rpx; + height: 26rpx; + margin-right: 10rpx +} + +.t_g_info { + /* margin: 0 34rpx;margin-bottom: 20rpx; */ + display: flex; + align-items: center; + padding: 20rpx; +} + +.red_shu { + width: 10rpx; + height: 36rpx; + background-color: #da0035; + margin-right: 8rpx; +} + +.tb-l { + /* line-height: 96rpx; */ +} + +.table_s { + border: #e4e4e4 1rpx solid; + box-sizing: border-box; + font-size: 26rpx; +} + +.tb_item { + display: flex; + /* height: 96rpx; */ + border-bottom: 1rpx solid #e4e4e4 +} + +.item_left { + width: 210rpx; + height: 100%; + box-sizing: border-box; + text-align: center; + padding: 20rpx; + background: #f9f9f9; + border-right: 2rpx solid #e4e4e4 +} + +.item_left text { + /* margin-left: 44rpx; */ +} + +.item_right { + flex: 1; + height: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding: 20rpx; +} + +.item_right text { + /* margin-left: 66rpx; */ +} + +.table_s .tb-l:last-child { + border-bottom: none; +} + +.bzfu_img { + width: 164rpx; + height: 34rpx; + /* margin-right: 18rpx; margin-left: 12rpx */ +} + +.bz_view { + /* height:100rpx; padding: 0 34rpx 0 13rpx; */ + color: #333; + font-size: 28rpx; + padding: 20rpx 20rpx 20rpx 10rpx; + /* border-bottom: 3rpx solid #eee; */ + /* border-top: 3rpx solid #eee; */ +} + +.bz_view view { + width: 520rpx; + /* max-height: 70rpx; */ + /* overflow: hidden; */ +} + +.bb_view { + display: flex; + align-items: center; + justify-content: space-between; + padding: 20rpx; + color: #333; + font-size: 30rpx; + /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ +} + +.red_bb { + color: #d70026; + /* min-width:158rpx;width: auto; */ +} + +.bg_jj { + width: 14rpx; + height: 14rpx; + border-top: 2rpx solid #d70026; + border-right: 2rpx solid #d70026; + transform: rotateZ(45deg); + display: inline-block; + margin-bottom: 3rpx; +} + +.bg_jj.down { + transform: rotateZ(135deg); +} + +.bg_jj.up { + transform: rotateZ(-45deg); + margin-top: 6rpx; +} + +.bz-content { + padding: 0 0 0 20rpx; +} + + + + +/* 顶部边框 */ +.topframe { + width: 100%; + height: 172rpx; + flex-direction: row; + justify-content: space-between; + border-bottom: 6rpx solid #eeeeee; + overflow: hidden; +} + +/* 评价人边框*/ +.topframe .topframe-top { + display: flex; + margin-top: 40rpx; + margin-bottom: 36rpx; + color: #7d7d7d; + padding-left: 20rpx; + font-size: 32rpx; +} + +/*评价人数量*/ +.topframe .topframe-top .topframe-top-val { + margin-left: 15rpx; + +} + +.topframe-top-content { + display: flex; + width: 36%; +} + +/* 好评 */ +.topframe-praise { + width: 61%; + text-align: right; + color: #dc4355; + font-size: 28rpx; +} + +/* 按钮列表 */ +.buttem-list { + width: 100%; + display: flex; + font-size: 20rpx; + overflow: hidden; +} + +.buttem-list .item { + min-width: 17%; + font-size: 24rpx; + border-radius: 20rpx; + background: #ffe3e2; + height: 38rpx; + text-align: center; + line-height: 38rpx; + margin-left: 20rpx; + justify-content: center; +} + +.buttem-list .item.red { + color: #fff; + background: #d60022; +} + +/* 用户评价 */ +.middle { + width: 95%; + margin: 0 auto; +} + +.middle-img-frame { + height: 65rpx; + display: flex; + margin-top: 32rpx; + +} + +/* 评价的用户图片 */ +.middle-img { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + margin-right: 15rpx; +} + +/* 评价的用户边框 */ +.middle-user-frame { + height: 65rpx; + overflow: hidden; +} + +.middle-user { + height: 25; + font-size: 28rpx; +} + +/* 评价图片 */ +.middle-img-two { + width: 115rpx; + height: 25rpx; + text-align: center; + margin-bottom: 20rpx; + margin-left: 5rpx; +} + +.xc-pirces { + margin-top: 14rpx; +} + +/* 评价文字 */ +.middle-font { + font-size: 30rpx; + +} + +.iddle-goods-img { + width: 100%; + display: flex; + margin-top: 22rpx; +} + +/* 商品图片 */ +.goods-img { + width: 156rpx; + height: 156rpx; + margin-left: 22rpx; + height: 100%; +} + +.parameter-frame { + margin-top: 14rxp; + margin-bottom: 14rpx; + width: 50%; + height: 30rpx; +} + +.z_parameter { + width: 98%; + height: 45rpx; + display: flex; + line-height: 45rpx; + margin-top: 20rpx; + margin-bottom: 14rpx; + justify-content: space-between; +} + +.parameter-font { + font-size: 26rpx; + +} + +/* 规格 */ +.parameter-state { + width: 100rpx; + font-size: 24rpx; + color: #c4c4c4; +} + +.parameter-dian { + display: flex; + width: 94rpx; + height: 33rpx; + font-size: 20rpx; + border-radius: 20rpx; + line-height: 33rpx; + padding-left: 25rpx; + border: 4rpx solid #eeeeee; + +} + +/* 点赞图片 */ +.parameter-img { + width: 27rpx; + height: 27rpx; + margin-top: 3rpx; +} + +.parameter-val { + margin-left: 25rpx; + font-size: 26rpx; + color: #999; +} + +/* 回复 */ +.reply { + width: 95%; + height: 120rpx; + padding-top: 14rpx; + border-top: 3rpx solid #eeeeee; + margin: 0 auto; + +} + +.shop-reply { + height: 30rpx; + color: #d60022; + font-size: 24rpx; + overflow: hidden; +} + +.shop-font { + width: 94%; + font-size: 24rpx; + padding-top: 10rpx; + +} + +.line_bulge { + width: 17rpx; + height: 17rpx; + border-top: 1rpx solid #eeeeee; + border-left: 1rpx solid #eeeeee; + transform: rotate(45deg); + position: absolute; + top: -12rpx; + left: 50rpx; + background: #fff; +} + + +.xc_comment { + display: flex; + justify-content: space-around; + width: 100%; + box-sizing: border-box; + padding: 10rpx 20rpx; + /* height: 42rpx; + padding-left: 34rpx; */ + color: #333; + +} + +.xc_comment-have-pictures { + width: 153rpx; + /* height: 42rpx; */ + line-height: 42rpx; + text-align: center; + background: #ffe3e2; + color: 28rpx; + border-radius: 21rpx; + font-size: 24rpx; +} + +.xc_comment-discuss { + width: 152rpx; + height: 42rpx; + line-height: 42rpx; + text-align: center; + background: #ffe3e2; + color: 28rpx; + border-radius: 20rpx; + font-size: 24rpx; + margin-left: 28rpx +} + +.xc_comment-detail { + display: flex; + /* margin-top: 40rpx; */ + /* width: 524rpx; */ + /* margin-left: 34rpx; */ + border-radius: 24rpx; + border: 2rpx solid #ebedf0; + margin-left: 20rpx; + box-sizing: border-box; + /* overflow: hidden; */ +} + +.xc_user-img { + border-radius: 50%; + margin: auto 0; +} + +.xc_comment-user { + display: flex; + /* margin-top: 22rpx; + margin-left: 22rpx; */ +} + +.xc_user { + width: 170rpx; + height: 60rpx; + margin-left: 6rpx; + overflow: hidden; +} + +.xc_user-name { + /* height: 25rpx; */ +} + +.xc_comment-img { + width: 22rpx; + height: 22rpx; + /* margin-top: 14rpx; */ + margin-right: 5rpx +} + +.xc_comment-font { + /* height: 75rpx; */ + /* margin-left: 22rpx; */ + white-space: normal; + overflow: hidden; + /* margin-top: 8rpx; + line-height: 38rpx; */ + +} + +.xc_comment-val { + /* width: 88%; + height: 30rpx; + margin-left: 22rpx; + display: flex; + margin-top: 15rpx; + margin-bottom:15rpx; */ +} + +.xc_comment-time { + /* height: 30rpx; */ + font-size: 22rpx; + color: #a5a5a5; + overflow: hidden; +} + +.xc_goods-img { + width: 180rpx; + height: 180rpx; +} + +.xc_comment-left { + display: inline-block; + width: 312rpx; + padding: 20rpx; +} + +.xc_goods-img-frame { + border-radius: 0 22rpx 22rpx 0; + overflow: hidden; + /* display:inline-block; */ + /* width: 40%; + height: 90%; + text-align: center; + padding-top: 30rpx; + vertical-align: top; */ +} + +.xc_imgs { + width: 50rpx; + height: 50rpx; + border-radius: 50%; + margin-right: 5rpx; +} + +.pj_word_size { + font-size: 28rpx +} + +.pj_scroll { + /* white-space: nowrap; */ + /* height: 324rpx; */ + /* margin-bottom: 50rpx; */ + display: flex; + align-items: center; + padding: 20rpx 0; + /* box-sizing: border-box; */ + /* box-shadow: 0 8px 12px #e7e9eb; */ +} + + +/*领券*/ +.three-level-word { + font-size: 25rpx; +} + +.four-level-word { + font-size: 23rpx; +} + +.cx-frame { + /* border-top:3rpx solid #eee; */ + /* width:99%; + height: 95rpx; + line-height: 95rpx; + padding-left:24rpx; */ + padding: 20rpx; +} + +.cx-frame .cx-sizs { + /* width: 68rpx; */ + /* height: 100%; */ + /* line-height: 100rpx; */ + /* overflow: hidden; */ + /* margin-left: 10rpx; */ +} + +.xc-coupon-fram { + position: relative; + margin-right: 16rpx; + /* width:200rpx; */ + /* padding-top:30rpx; */ + +} + +.xc-coupon-fram .xc-coupon { + /* width:175rpx ; + height: 40rpx; + line-height: 40rpx; */ + background-color: #d60021; + /* margin:0 auto; */ + color: #fff; + padding: 6rpx 20rpx; + +} + +.xc-coupon-fram .xc-circular { + width: 16rpx; + height: 16rpx; + background-color: white; + position: absolute; + top: 50%; + /* left: -10rpx; */ + transform: translateY(-50%); +} + +.xc-coupon-fram .xc-one { + left: -8rpx; +} + +.xc-coupon-fram .xc-two { + right: -8rpx; +} + +.cx-obtain-coupon { + /* width: 65rpx; + height: 100%; + padding-left:15rpx; */ + color: #d70025; + display: flex; + align-items: center; + /* position: absolute; + right: 5rpx; */ +} + +/* 自定义弹出窗口 */ +.cx-popup { + width: 100%; + background: #fff; + z-index: 35; + border-top-left-radius: 25rpx; + border-top-right-radius: 25rpx; + position: fixed; + bottom: 0; +} + +.cx-popup .top { + /* width: 90%; + height:85rpx; */ + font-size: 32rpx; + padding: 20rpx 0; + border-bottom: 2rpx solid #ebedf0; + /* padding-top: 50rpx; + font-weight:600; */ + +} + +.cx-popup .top-frame { + /* width: 100%; + display: flex; + justify-content: center; + overflow: hidden; */ +} + +.xc-valid-coupon { + width: 90%; + height: 40rpx; + padding-top: 24rpx; + overflow: hidden; +} + +.xc-frame { + position: relative; +} + +.xc-coupon-frame { + width: 100%; + max-height: 560rpx; + overflow: auto; + +} + +.xc-coupon-frame .rel:not(:first-child) { + margin-top: 20rpx; +} + +.xc-coupon-frame .coupon { + width: 100%; + height: 168rpx; + border-radius: 25rpx; + border: 2rpx solid #ffdcdc; + overflow: hidden; + /* margin-top:16rpx; */ + box-sizing: border-box; + +} + +/* .xc-coupon-frame .coupon ~ .coupon { + margin-top:16rpx; +} */ +.xc-coupon-left { + width: 216rpx; + /* height: 100%; */ + background-color: #ffeeef; + border-right: 4rpx dashed #ffdbd9; + overflow: hidden; + /* line-height: 100%; */ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + flex-shrink: 0; +} + +.xc-money { + color: #f30026; + text-align: center; +} + +.xc-rmb { + /* width:44rpx; + padding-top:7rpx; */ +} + +.xc-money-frame { + /* margin-left:35rpx; + margin-top:48rpx; */ + +} + +.xc-spacing { + letter-spacing: 4rpx; +} + +.xc-circular-one { + position: absolute; + top: -15rpx; + left: 205rpx; + width: 30rpx; + height: 30rpx; + background: #fff; + overflow: hidden; +} + +.xc-circular-two { + position: absolute; + bottom: -15rpx; + /* top:150rpx; */ + left: 205rpx; + width: 30rpx; + height: 30rpx; + background: #fff; +} + +.xc-detail-coupon { + /* margin-left: 22rpx; + overflow: hidden; + padding-top: 43rpx; */ + /* display: flex; + align-items: center; */ +} + +.xc-coupon-right { + /* width: 455rpx; + height: 100%; */ + background: #fffaf9; + padding: 20rpx; + box-sizing: border-box; + width: 100%; + justify-content: space-between; + align-items: center; +} + +.xc-below { + margin-top: 20rpx; + +} + +.xc-get { + + width: 140rpx; + /* height: 48rpx; */ + color: #fff; + text-align: center; + border-radius: 27rpx; + line-height: 54rpx; + /* margin-left:20rpx; */ +} + +.background { + background: #f40028; +} + +/*--不可使用--*/ +.background.nouse { + background: gainsboro; +} + +.xc-background { + background: #b9b9b9; +} + + +.cx-confirm { + width: 100%; + padding: 20rpx; + box-sizing: border-box; + /* height: 160rpx; */ + +} + +.cx-confirm .confirm { + /* width: 372rpx; + height: 60rpx; */ + background-color: #f40026; + color: #fff; + border-radius: 10rpx; + line-height: 80rpx; + font-size: 28rpx; + +} + +.up { + animation: up .7s; +} + +.down { + animation: down 1s; +} + +@keyframes up { + 0% { + transform: translateY(550rpx); + } + + 100% { + transform: translateY(0); + } +} + +@keyframes down { + 0% { + transform: translateY(0); + } + + 100% { + transform: translateY(550rpx); + } +} + + +/* 分享 */ +.icon-share { + font-size: 42rpx; + color: #d60021; + line-height: 1; +} + +.xc-share-frame { + /* width: 129rpx; + height: 48rpx; + border-top-left-radius: 18rpx; + border-bottom-left-radius: 18rpx; */ + /* background: #d60021; */ + /* position:absolute; + left:622rpx; + top:-37rpx; + line-height:50rpx; + margin-top:52rpx; */ +} + +.xc-share-frame-jieti { + width: 129rpx; + height: 48rpx; + border-top-left-radius: 18rpx; + border-bottom-left-radius: 18rpx; + background: #d60021; + line-height: 50rpx; +} + +.xc-share-frame .share-font, +.xc-share-frame-jieti .share-font { + font-size: 32rpx; + color: #fff; + margin-left: 10rpx; + +} + + +.xc-share-frame .share-frame, +.xc-share-frame-jieti .share-frame { + width: 30rpx; + height: 30rpx; + margin-top: 9rpx; + margin-left: 10rpx; + +} + +.xc-share { + width: 90%; + height: 800rpx; + background: #fff; + z-index: 35; +} + +.img-frame { + position: absolute; + top: 175rpx; + left: 100rpx; + z-index: 55; + overflow: hidden; + +} + +.img-frame .img { + width: 100rpx; + height: 100rpx; + +} + +.xc-share .top { + height: 85rpx; + width: 100%; + border-bottom: 4rpx dashed #f5f5f5; + overflow: hidden; + +} + +.xc-share .name { + font-size: 25rpx; + margin-left: 180rpx; + color: #000; + +} + +.xc-share .recommend { + width: 110rpx; + height: 12rpx; + color: #fff; + background: #d60021; + font-size: 20rpx; + border-radius: 25rpx; + margin-left: 10rpx; + line-height: 37rpx; +} + +.xc-left-circle { + width: 40rpx; + height: 25rpx; + position: absolute; + top: 280rpx; + left: 29rpx; + z-index: 55; + background: #727272; + border-radius: 50rpx 50rpx 0 0; + transform: rotate(90deg); + +} + +.xc-right-circle { + width: 40rpx; + height: 25rpx; + position: absolute; + top: 280rpx; + left: 683rpx; + z-index: 55; + background: #727272; + border-radius: 50rpx 50rpx 0 0; + transform: rotate(270deg); + +} + +.xc-circle-frame { + width: 25rpx; + height: 40rpx; + overflow: hidden; +} + +.xc-goods-name { + width: 95%; + font-size: 35rpx; + padding-left: 75rpx; + height: 50rpx; + padding-top: 10rpx; + color: #000; + +} + +.xc-good-img { + width: 100%; + height: 381rpx; + margin-top: 5rpx; + +} + +.xc-good-img .img { + width: 90%; + height: 381rpx; +} + +.xc-ensure-frame { + width: 90%; + height: 60rpx; + border-bottom: 2rpx solid #d8d6d7; +} + +.xc-ensure { + width: 30%; + height: 60rpx; + line-height: 60rpx; +} + +xc-ensure-div { + width: 100%; + height: 60rpx; +} + +.xc-ensure .word { + font-size: 25rpx; + color: #d30025; + margin-left: 9rpx; + +} + +.xc-ensure .img { + width: 25rpx; + height: 25rpx; + margin-top: 18rpx; + +} + +.xc-bottmon { + width: 100%; +} + +.xc-bottmon .xc-left { + width: 55%; + margin-top: 30rpx; + padding-left: 20rpx; + +} + +.xc-left .xc-top { + font-size: 25rpx; + height: 40rpx; + line-height: 40rpx; + color: #000; +} + +.xc-left .xc-middle { + font-size: 25rpx; + color: #b2b2b2; + height: 30rpx; + line-height: 30rpx; +} + +.xc-left .xc-buttem { + font-size: 25rpx; + height: 100rpx; + line-height: 100rpx; + color: #000; +} + +.xc-ensure-right { + width: 30%; +} + +.xc-qrcode { + width: 120rpx; + height: 120rpx; + margin-top: 43rpx; + margin-left: 80rpx; + +} + +.xc-close { + width: 50rpx; + height: 50rpx; + border-radius: 50%; + border: 3rpx solid #fff; + text-align: center; + line-height: 41rpx; + font-size: 50rpx; + color: #fff; + font-weight: lighter; + font-family: MingLiU; + transform: rotate(270deg); + overflow: auto; + margin-top: 6rpx; + margin-bottom: 1rpx; + +} + +.xc-close-frame { + position: absolute; + margin-top: 30rpx; + width: 90%; + display: flex; + justify-content: center; + overflow: auto; + +} + +.xc-guanbi { + width: 100%; + height: 80rpx; + overflow: hidden; +} + + +/* 自定义弹出窗口 */ +.cx-popup { + width: 100%; + background: #fff; + z-index: 35; + border-top-left-radius: 10rpx; + border-top-right-radius: 10rpx; + position: fixed; + bottom: 0; +} + +.xc-top-content { + width: 88%; + height: 85rpx; + padding-top: 50rpx; + font-size: 36rpx; +} + + +.xc-valid-coupon { + width: 90%; + height: 40rpx; + padding-top: 24rpx; + overflow: hidden; +} + +.xc-frame { + /* width: 100%; + margin-top:20rpx; */ + padding: 20rpx; +} + +.xc-frame .list-frame { + width: 90%; + height: 100%; + overflow-y: scroll; + + margin-top: 20rpx; + +} + +.xc-close-frame { + margin-top: 30rpx; + width: 15%; + display: flex; +} + +.xc-close { + width: 70rpx; + height: 70rpx; + border-radius: 50%; + border: 5rpx solid #a5a5a7; + text-align: center; + line-height: 55rpx; + font-size: 80rpx; + color: #a5a5a7; + font-family: "微软正黑体"; + margin-top: 8rpx; + +} + +.xc-money { + color: #ff0013; +} + +.xc-money-frame { + /* margin-left:35rpx; */ + +} + +.xc-coupon-effect { + width: 99%; + height: 128rpx; + border-bottom: 3rpx solid #ddd; + + +} + +.xc-goods-coupon { + width: 80%; + height: 100%; + +} + +.xc-title { + width: 50%; + margin-left: 222rpx; + +} + +.xc-coupon-money { + color: #c91e31; + font-size: 35rpx; + margin-top: 20rpx; + +} + +.xc-coupon-time { + height: 50rpx; + font-size: 27rpx; + color: #a4a4a4; +} + +.xc-coupon-time .time { + margin-left: 15rpx; + font-size: 27rpx; +} + +.xc-coupon-selection { + width: 99%; + height: 100%; + + +} + +.xc-confirm { + width: 90%; + height: 75rpx; + margin: 0 auto; + background: #c41830; + color: #fff; + border-radius: 10rpx; + font-size: 30rpx; + margin-top: 50rpx; +} + +.xc-not-Selection { + width: 60rpx; + height: 60rpx; + background: #eeeeee; +} + +/*---------------视频图片---------------*/ +.xc-imageCount { + width: 95rpx; + height: 50rpx; + background-color: rgba(0, 0, 0, 0.3); + border-radius: 40rpx; + line-height: 50rpx; + color: #fff; + text-align: center; + font-size: 26rpx; + position: absolute; + + right: 23rpx; + bottom: 21rpx; +} + + +/* 视频图片的边框 */ +.xc-videos-picture { + width: 100%; + height: 750rpx; +} + +/* 视频 */ +.xc-videos { + width: 100%; + height: 544rpx; + + +} + +/* 点击视频或图片 */ +.xc-video-picture { + + bottom: 20rpx; + left: 0rpx; + display: flex; + align-items: center; + justify-content: center; + width: 45%; + height: 60rpx; + margin-left: 215rpx; + +} + +.xc-video-button:before { + content: ""; + position: absolute; + left: 48%; + top: 40%; + width: 0; + height: 0; + margin-left: -36rpx; + margin-top: -10rpx; + border-width: 13rpx; + border-style: dashed; + border-color: transparent transparent transparent #fff; + font-size: 0; + line-height: 0; + z-index: 2; + -webkit-backface-visibility: hidden; +} + +.xc-video-buttons:before { + content: ""; + position: absolute; + left: 50%; + top: 41%; + width: 0; + height: 0; + margin-left: -36rpx; + margin-top: -10rpx; + border-width: 13rpx; + border-style: dashed; + border-color: transparent transparent transparent #000; + font-size: 0; + line-height: 0; + z-index: 2; + -webkit-backface-visibility: hidden; +} + +.xc-video { + /* width:100rpx; */ + /* height: 50rpx; + line-height: 50rpx; */ + text-align: center; + /* margin-left:-30rpx; */ + + +} + +/* 图片 */ +.xc-picture { + color: #000; + background: #dcdcdc; + width: 94rpx; + height: 45rpx; + font-size: 25rpx; + border-radius: 25rpx; + font-family: 'SimHei', Arial; + text-align: center; + line-height: 45rpx; + margin-left: 53rpx +} + +/* 点击视频 */ +.xc-video-button { + position: relative; + color: #000; + background: #dcdcdc; + width: 85rpx; + height: 45rpx; + line-height: 45rpx; + font-size: 30rpx; + border-radius: 25rpx; + font-family: 'SimHei', Arial; + padding-left: 11rpx; +} + + +.xc-sn { + color: #fff; + background: #c7161e; + border-color: transparent transparent transparent #fff; +} + +/* 图片 */ +.xc-pictures { + width: 100%; + height: 529rpx; + +} + +/*视频封面的图片 */ +.xc-picturess { + position: relative; + width: 100%; + height: 529rpx; +} + +/* 播放 */ +.xc-play { + width: 130rpx; + height: 130rpx; + position: absolute; + top: 207rpx; + left: 309rpx; +} + +.xc-video-buttons { + position: relative; + color: #000; + background: #dcdcdc; + width: 85rpx; + height: 45rpx; + line-height: 45rpx; + font-size: 30rpx; + border-radius: 25rpx; + font-family: 'SimHei', Arial; + padding-left: 11rpx; +} + + +.wsize { + font-size: 32rpx +} + +.five-level-word { + font-size: 24rpx; +} + + +/*-- 推荐商品 --*/ +.xc-goods { + height: auto; + background: #f2f2f2; + padding: 0 20rpx; + margin-top: -25rpx; + padding-bottom: 20rpx +} + +.xc-goods-recommend { + border-radius: 20rpx; + width: 345rpx; + height: 450rpx; + margin-top: 25rpx; + display: inline-block; + +} + +.xc-goods-recommend.ml { + margin-left: 22rpx +} + +.xc-goods-recommend .xc-goods-imgs { + width: 100%; + height: 325rpx; + border-radius: 20rpx 20rpx 0 0; +} + +.xc-goods-bottom { + width: 345rpx; + height: 134rpx; + background: #fff; + border-radius: 0 0 20rpx 20rpx; + bottom: -8rpx; + left: 0rpx; +} + +.xc-goods-bottom .monry-frame { + width: 283rpx; + height: 52rpx; + padding-left: 24rpx; + +} + +.xc-good-explain { + width: 283rpx; + height: 60rpx; + word-break: normal; + margin-left: 30rpx; + font-size: 26rpx; + line-height: 30rpx; + margin-top: 5rpx; +} + +.money-color-val { + color: #c6172f; +} + +.rmb-symbol { + line-height: 81rpx; + height: 53rpx; + font-size: 28rpx; +} + +.xc-original-price { + color: #c0c0c0; +} + +/* 文字中间加线条 */ +.word-lines { + text-decoration: line-through; + line-height: 90rpx; + margin-left: 10rpx; + font-size: 20rpx; +} + +.xc-linellae-frame { + width: 100%; + height: 70rpx; + background: #f2f2f2; +} + +.xc-linellae-frame .xc-linellae { + width: 386rpx; + height: 1rpx; + border-bottom: 1rpx solid #ebedf0; +} + +.xc-recommend-frame { + background: #f2f2f2; + width: 97rpx; + height: 100%; + padding-left: 10rpx; +} + +.xc-recommend-frame .xc-recommend { + width: 35rpx; + height: 27rpx; +} + +.xc-recommend-frame .xc-recommend-word { + width: 58rpx; + font-size: 24rpx; + color: #a9a9a9; + margin-left: 5rpx; + margin-bottom: 5rpx; + margin-top: 1rpx; + +} + +.xc-price-frame { + color: #ec0022; + align-items: baseline; + /* height:44rpx; */ +} + +.xc-price-frame .sign { + margin-top: 19rpx; + margin-left: -4px; +} + +.xc-val-price { + margin-left: 24rpx; + color: #ec0022; + padding-top: 13rpx; +} + +.xc-val-price .save { + border-radius: 10rpx; + margin-top: 5rpx; + background: #fed2d9; + min-width: 230rpx; + height: 40rpx; + line-height: 40rpx; + width: auto; + padding-left: 12rpx; + padding-right: 12rpx; + +} + +.xc-unit-price { + margin-top: 25rpx; + padding-left: -4rpx; + +} + +.xc-explain { + color: #292929; + width: 542rpx; + margin: 10rpx 0 20rpx; + width: 100%; + font-weight: bold; +} + +.xc-item { + width: 16%; + font-size: 26rpx; + color: #666; + margin-right: 5rpx; +} + +.xc-item .yuan { + width: 38rpx; + height: 38rpx; + line-height: 38rpx; + border: 1rpx solid #f3f1f2; + margin-left: 33rpx; + +} + +.xc-item .word { + width: 104rpx; + margin-top: 16rpx; + color: #363636; + font-weight: 600; + +} + +.xc-item .circle-color { + background: #d60024; + color: #fff; +} + +.xc-item .circle-color1 { + background: #fefefe; + color: #666666; +} + +.link { + height: 6rpx; + width: 180rpx; + top: 54rpx; + left: 32px; +} + +.link1 { + height: 6rpx; + width: 166rpx; + top: 54rpx; + left: 264rpx; +} + +.link2 { + height: 6rpx; + width: 157rpx; + top: 54rpx; + right: 87rpx; +} + +.link-color-red { + background: #d60024; +} + +.link-color { + background: #e5e5e5; +} + +.xc-qt-price { + top: -15rpx; + left: 25rpx; + color: #fff; +} + +.xc-qt-price .xc-qtunit-price { + margin-left: 6rpx; + margin-top: -4rpx; +} + +.xc-nanber { + top: -25rpx; + left: 289rpx; + +} + +.xc-qtsign { + margin-top: 5rpx; + +} + +.xc-people-img { + height: 36rpx; + width: 36rpx; + background: #fff; + border-radius: 7rpx; + +} + +.xc-people-img .imgs { + width: 28rpx; + height: 28rpx; + margin-top: 4rpx; + +} + +.xc-people-val { + + height: 32rpx; + border-top: 1rpx solid #fff; + border-bottom: 1rpx solid #fff; + border-right: 1rpx solid #fff; + border-radius: 0 7rpx 7rpx 0; + line-height: 32rpx; + margin-left: -6rpx; + padding: 0 12rpx; +} + +.word-color { + color: #d70024; +} + +.word-color-lan { + color: #0393e1; +} + +.pt_view .hy-stop { + top: -23rpx; + right: 56rpx; +} + +.xc-time-val { + width: 36rpx; + height: 36rpx; + border-radius: 7rpx; + line-height: 36rpx; +} + +.xc-time { + margin-right: 10rpx; + margin-left: 10rpx; + margin-top: -32rpx; +} + +.xc-goods-explain { + width: 100%; + /* padding-left:30rpx; + margin-left:-9rpx; + height: 150rpx */ +} + +.xc-partner-frame { + border-bottom: 2rpx solid #eee; + width: 100%; + padding: 20rpx; + /* height:56rpx; */ + box-sizing: border-box; +} + +.xc-person-number { + width: 120rpx; + color: #999999; + padding-left: 8rpx; + text-align: left +} + +.xc-miaosha-time { + right: 17rpx; + top: 55rpx; +} + +.pd_top1 { + padding-top: 10rpx +} + +.s_ms_bth { + margin-top: 85rpx +} + + +.no_pj_list { + text-align: center; + width: 100%; + color: #999; + margin: 30rpx 0; + display: inline-block; + font-size: 28rpx +} + +/* 门店地址 */ +.xc-address_frame { + /* border-top:1rpx solid #eee; */ + width: 100%; + height: auto; + padding: 20rpx; + box-sizing: border-box; +} + +.on_height { + height: 90rpx; +} + +.sn_height { + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */ +} + +.xc-address_frame .address_frame { + width: 100%; + /* padding-left: 10rpx; +margin: auto; */ + +} + +.shop_name {} + +.stores-img { + width: 28rpx; + height: 28rpx; + margin-right: 10rpx; +} + +.shop_name { + margin-right: 10rpx; +} +.shop_name.max{ + max-width:370rpx; flex-shrink: 0; +} + + +.address { + /* width: 100%; + margin-top: 5rpx; + margin-bottom: 5rpx; */ +} + +.distance { + padding-left: 20rpx; + padding-right: 20rpx; + background: #eee; + border-radius: 20rpx; + /* margin-right: 5rpx; */ + color: #999; + height: 38rpx; + line-height: 38rpx; + position: relative; + top: 5rpx; + +} + +/* 选择门店的弹窗 */ +.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: 300rpx; + overflow-y: scroll; + margin: auto; + max-height: 610rpx; +} + +.store-list .store_choose { + width: 100%; + height: 120rpx; + line-height: 125rpx; + border-bottom: 1rpx solid #eee; + +} + +.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; +} + +.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; + 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; +} + +.black_rights-frame { + width: 50%; +} + +.black_rights-frame .black_rights { + border-top: 3rpx solid; + border-right: 3rpx solid; + transform: rotate(45deg); + display: inline-block; + width: 20rpx; + height: 20rpx; +} + +.xc-val-money { + height: 55rpx; +} + +.xc-distance-bottom { + margin-bottom: 40rpx; +} + +.xc-distance-top { + margin-top: 10rpx; +} + +.xc-width { + width: 100%; +} + +.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; +} + +.xc-goods-attribute { + border-bottom: 1px solid #eee; + padding-bottom: 20rpx; + /* margin-bottom:40rpx; */ +} + +.xc-val-fream { + width: 105rpx; +} + +.is_stock { + width: 58%; + height: 70rpx; + border-radius: 55rpx; +} + +.select_store_height { + height: 50rpx; +} + +.butttem5 { + margin-bottom: 5rpx; +} + +.no_pj_list { + text-align: center; + width: 100%; + color: #999; + margin-top: 30rpx; + display: inline-block; + font-size: 28rpx +} + + +.join-cart>view.no_store { + width: 58%; + background-color: #adadad; +} + +.s_btn { + margin-top: 25rpx; +} + +/* 美妆价的样式 */ +.beauty-makeup-frame { + /* width: 101.5%; + margin: auto; */ + height: 120rpx; + border-radius: 15rpx; + margin-top: 10px; + +} + +.beauty-makeup-frame .left { + width: 80%; + height: 100%; + background: #f7f7f7; + border-radius: 20rpx 0rpx 0rpx 20rpx; + /* padding: 0 10rpx; */ +} + +.card-frame { + margin-top: 0rpx; + /* padding-right: 23rpx; + margin-right: 15rpx; */ +} + +.advert-card { + margin-top: 0rpx !important; + +} + +.beauty-makeup-frame .right { + width: 20%; + height: 100%; + background: #f3efe3; + border-radius: 0rpx 20rpx 20rpx 0rpx; +} + +.grade-card-frame { + + /* height:45rpx ; */ + background: #3c300a; + border-radius: 20rpx; + /* margin-top: 10px; + margin-left: 7rpx; */ + justify-content: center; + padding: 4rpx 12rpx; +} + +.grade-card-frame .img { + width: 24rpx; + height: 24rpx; + margin-top: 2px; + +} + +.grade-card-frame .card-name { + margin-left: 8rpx; + /* max-width: 120rpx; */ + max-width: 165rpx; +} + +.card-effect { + /* margin-left: 15rpx; */ +} + +.at_once_carde { + width: 65rpx; + height: 75rpx; + line-height: 38rpx; +} + +.bg_right { + width: 18rpx; + height: 18rpx; + border-top: 2rpx solid #333; + border-right: 2rpx solid #333; + transform: rotate(45deg); + display: inline-block; + margin-bottom: 3rpx; + +} + +.carde_frame { + height: 50rpx; + /* line-height: 18rpx */ +} + +button.custom-service { + line-height: normal; + border: 0; +} + +button.custom-service::after { + border: 0; +} + +.no_store,.c-red22 { + color: #d60021; + font-size: 26rpx; +} + + +.cx_show_view { + width: 580rpx; + /* line-height: 30rpx; margin-bottom: 6rpx; */ +} + +.cx_show_view .word { + width: 400rpx +} + +.prom_condition { + color: #f23030; + /* width: 180rpx; */ + /* height: 30rpx; */ + /* font-size: 20rpx; */ + /* padding-top: 0.01rpx; */ + /* display: flex; + justify-content: center; + align-items: center; */ + border: 2rpx solid #f23030; + border-radius: 6rpx; + /* margin-right: 10rpx; */ + /* margin-left: 10rpx; */ + font-size: 24rpx; + padding-right: 6rpx; + /* padding: 0 10rpx; */ +} + +.hui_img { + width: 44rpx; + height: 44rpx; + margin-right: 8rpx +} + +.order_hui { + color: #444; + width: 420rpx +} + +.order_hui view { + height: 34rpx; + line-height: 34rpx; +} + +.dp_img { + width: 240rpx; + height: 240rpx; + margin: 0 40rpx +} + +.dp_cx_view { + border-bottom: 0.02rpx solid #eee; + padding-bottom: 40rpx +} + +.act_content { + margin-top: 40rpx +} + +.act_content view { + margin-bottom: 12rpx +} + +.color_b { + color: #ff9c00 +} + +.poster-container { + box-sizing: border-box; + position: fixed; + width: 610rpx; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + /* width: calc(100% - 210rpx); */ + z-index: 1000; +} + +.mask { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + background-color: rgba(0, 0, 0, .6); +} + +.poster-wrapper { + width: 100%; +} + +.poster { + box-sizing: border-box; + width: 100%; + height: 980rpx; + border-radius: 16rpx; + /* box-shadow: 0 8px 12px #666; */ + position: relative; + z-index: 999; + overflow: hidden; +} + +.poster-img { + display: block; + width: 100%; + height: 100%; +} + +.btn-container { + display: flex; + justify-content: space-around; +} + +.btn-share { + display: block; + background-color: #FE6867; + color: white; + border-radius: 8rpx; + line-height: 80rpx; + margin-top: 28rpx; + padding: 0 60rpx; +} + +/* .btn-close { + background-color: rgba(0,0,0,.5); + color: white; + width: 40rpx; + height: 40rpx; + line-height: 40rpx; + text-align: center; + border-radius: 50%; + position: absolute; + right: 20rpx; + top: 10rpx; +} */ + +.goods-price .rel_txt { + /* position: relative; top: 32rpx; */ + font-size: 30rpx; +} + +.goods-price .rel_img { + width: 62rpx; + height: 62rpx; + position: relative; + top: 8rpx; +} + +.btn-close { + /* background-color: rgba(0,0,0,.5); */ + color: #ccc; + /* width: 50rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; */ + border-radius: 50%; + position: absolute; + right: 20rpx; + top: 20rpx; +} + +.icon-close { + font-size: 36rpx; +} + +.quan_price { + background-color: #ff4700; + color: #fff; + padding: 10rpx 25rpx; + margin-left: 10rpx; + border-radius: 30rpx; +} + +/*--闪白屏--*/ +.g_img_box { + background-position: center center; + background-repeat: no-repeat; + -webkit-background-size: cover; + -moz-background-size: cover; + background-size: cover; +} + + + +.arrow { + width: auto !important; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); +} + + +.logo-container { + -webkit-filter: brightness(80%); + filter: brightness(80%); +} + +.logo { + width: 132rpx; + height: 37rpx; + margin-right: 10rpx; +} + +.miao_lab { + width: 36rpx; + height: 36rpx; + border: 4rpx solid #e71f19; + color: #e71f19; + text-align: center; + margin-right: 10rpx; + line-height: 36rpx; + font-size: 22rpx; + font-weight: bolder; + border-radius: 50%; +} + +.pop_more_act .content { + position: fixed; + background: #fff; + width: 100%; + left: 0; + bottom: 0; + z-index: 1000; +} + +.p_btn { + background-color: #f23030; + height: 70rpx; + line-height: 70rpx; + color: #fff; +} + +.mt20 { + margin-top: 20rpx +} + +.group .group-list.luck { + padding: 0 20rpx; + justify-content: flex-start; +} + +.group-list.luck .gtou~.gtou { + margin-left: -16rpx; +} + +.gtou.more { + background-color: #ddd; + text-align: center; + line-height: 70rpx; + border-radius: 50%; + color: #aaa; +} + + +.tick { + position: relative; +} + +.tick:before { + content: ''; + display: inline-block; + vertical-align: middle; + margin-top: -4rpx; + margin-right: 12rpx; + width: 22rpx; + height: 22rpx; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat; + background-size: 22rpx auto; +} + +.details::after { + content: ''; + position: absolute; + right: 0; + top: 0; + bottom: 0; + margin: auto; + display: inline-block; + width: 40rpx; + height: 40rpx; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=); + background-repeat: no-repeat; + background-size: 40rpx auto; +} + +.lh2 { + line-height: 2; +} + +.fill-box { + background-color: #f23030; + color: white; + padding: 0 6rpx; + border-radius: 0 0 10rpx 0; + margin-right: 4rpx; +} + +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx } + +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx } +/* 历史购买 */ +.swiper-container { + position: absolute; + top: 0; + left: 0; + padding: 20rpx 10rpx; + width: 100%; + box-sizing: border-box; + z-index: 98; +} + +.swiper { + height: 60rpx; + color: white; + font-size: 26rpx; +} + +.swiper-item { + /* width: auto !important; + background-color: rgba(0,0,0,.4); + border-radius: 60rpx; */ + position: relative; +} + +.swiper-item .item { + position: absolute; +} + +.item { + /* position: absolute; */ + display: flex; + align-items: center; + /* justify-content: center; */ + border-radius: 60rpx; + background-color: rgba(0,0,0,.4); + /* position: absolute; */ +} + +.avatar-container { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + overflow: hidden; + flex-shrink: 0; +} +.avatar-container image { + width: 100%; + height: 100%; +} + +.hideArea { + position: absolute; + left: -1000px; + top: -1000px; +} diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js new file mode 100644 index 0000000..6f912a1 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js @@ -0,0 +1,1293 @@ +var e = getApp(), + a = e.globalData.setting, + os = a, + t = e.request, + d = e.globalData; +var ut = require("../../../../../utils/util.js"); +var com = require("../public/buy_com.js"); + +Page({ + data: { + url: a.url, //接口网址 + iurl: a.imghost, //图片前缀网址 + isBuy: 0, + getGiftID: '', //礼包id + giftImage: '', + giftTitle: '', + giftDate: '', + giftPrice: '', + giftIntegral: '', + giftPosPrice: '', + giftQty: '', + giftRemark: '', + giftType: '', + actTitle: '', + getUrl: '', + wareCard: [], + orderSn: "", //订单编号 + lbId: "", + code: "", //核销码 + c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期 + is_lb: 0, //是否有礼包 + default_color: null, + first_leader: e.globalData.first_leader || 0, // 推荐人ID + + //门店相关 + ismend: 0, + is_sec_mend: 0, + sto_sele_name: "", //选中的门店名称 + sto_sele_id: "", //选中的门店id + sto_sele_distr: "", //选择的门店的配送方式 + is_show_sto_cat: 1, //是否显示门店分类 + only_pk: null, + all_sto: null, + sec_sto: null, //选择了的门店分类 + pickpu_list: null, //读出的所有门店list + def_pickpu_list: null, //一开始5个门店list + sec_pick_index: 0, //第二级门店选择ID + fir_pick_index: 0, //第一级门店选择ID + all_pick_list: null,//所有的门店先记录起来 + + select_store: 0, //选择更多 + index: 1, + more_store: 0, //选择门店 + sort_store: 0, //门店分类 + choice_sort_store: 0, //选择分类门店 + new_user: 0, //新用户 + + def_pick_store: null, // 默认的门店 + fir_def_store: null, //客户默认的门店的 + lat: null, //维度 + lon: null, //经度 + + is_get_local_ok: 0, //获取坐标是否完成 + region_name: "门店分类", //区域的名字 + is_gps: 1, + open_ind_store: 0, //哪里打开的门店列表的控制属性 + default_store: {}, //创建添加默认门店地址的对象 + + store: 0, + openSpecModal: 0, + + sto_sele_name_1: '', + share_goods_img:'', //礼包的分享图 + giftImageCover:null, + canvasHidden:true, + is_receive:0, + screenWidth: 0, + monthgiftbag:{}, + }, + onLoad: function (options) { + + 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 + }) + } + }); + + let monthgiftbag=wx.getStorageSync('monthgiftbag') + + var now = ut.gettimestamp(); + var isStart=0; + // var str = res.data.data.starTime; + var start = monthgiftbag.begindate; + // start = start / 1000; + if (start < now) isStart = 1; + this.setData({ + isStart, + monthgiftbag, + sele_g:monthgiftbag + }) + + }, + 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 + record_list_id:options.record_list_id, + is_receive:options.is_receive + }) + 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 () { + 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(); + }) + }, + 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/getNew', { + isShowLoading: true, + data: { + "storeId": a.stoid, //商家ID + "userId": d.user_id, //用户ID + "giftBagId": th.getGiftID + }, + 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, + giftTitle: res.data.data.lbTitle, + default_color: res.data.data.bgcolor + }) + if (!res.data.data.giftRemark) { + _this2.setData({ + giftRemark: '暂无详情......' + }) + } else { + _this2.setData({ + giftRemark: res.data.data.giftRemark.replace(/\{ + wx.navigateBack({ + delta: 0, + }) + },500) + } else { + that.setData({submit:0}) + getApp().my_warnning(res.data.msg, 0, that); + } + }, + function (res) { + that.setData({submit:0}) + } + ) + }, + + //--- 设置一下默认库存的数量 ---- + 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) { + + //--先判断会员状态-- + 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_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) + }, + + + clickShare() { + if (!getApp().globalData.user_id) { + getApp().goto("/packageE/pages/togoin/togoin"); + return false; + } + this.setData({ + share_hidden: true, + }); + }, + + send() { + this.setData({ + share_hidden: false, + }); + }, + + cancel() { + this.setData({ + share_hidden: false, + }); + }, + + + //--定义的保存图片方法,分享团--- + saveImageToPhotosAlbum: function () { + //--先判断会员状态-- + var user_info = getApp().globalData.userInfo; + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { + //getApp().my_warnning("请先登录",0,this); + wx.navigateTo({url: '/packageE/pages/togoin/togoin',}) + return false; + } + + if (this.data.share_hidden) { + this.setData({share_hidden: false,}); + } + + wx.showLoading({title: '生成中...',}) + var that = this, th = that; + //设置画板显示,才能开始绘图 + that.setData({ + canvasHidden: false + }) + + var app = getApp(); + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, + var scene = th.data.lbId + ""; + + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; + if (user_id > 0) { + scene += "_" + user_id; + } + ///二微码 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; + + // 读取文件成功则OK-- + wx.getImageInfo({ + src: path3, + success: function (res) { + th.get_goods_temp(function () { + var vpath = res.path; + var context = wx.createCanvasContext('share'); + // let share_goods_img = th.params.cover_img + th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0); + + //把画板内容绘制成图片,并回调 画板图片路径 + context.draw(false, function () { + setTimeout(function () { + wx.canvasToTempFilePath({ + x: 0, + y: 0, + width: 750, + height: 1217, + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, + canvasId: 'share', + success: function (res) { + + that.setData({ + shareImgPath: res.tempFilePath, + canvasHidden: true + }) + + if (!res.tempFilePath) { + wx.showModal({ + title: '提示', + content: '图片绘制中,请稍后重试', + showCancel: false + }) + return false; + } + + that.setData({ + showPoster: true, + }); + wx.hideLoading(); + } + }) + }, 800) + + }); + }) + }, + fail: function (res) { + console.log(res); + wx.hideLoading(); + + } + }); + }, + + //-- 小程序绘制海报 -- + drawPoster(context, unit, img, vpath, type) { + // 1.灰色背景 + context.setFillStyle('#f2f1f6'); + context.rect(0, 0, 554 * unit, 899 * unit); + context.fill(); + + // 2.商城名称 + let shopName = this.data.sto_sele_name_1; + context.setTextAlign('center'); + context.setFontSize(26 * unit); + context.setFillStyle('black'); + context.fillText(shopName, 277 * unit, 60 * unit); + + // 3.推荐来源 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; + context.setTextAlign('center'); + context.setFontSize(22 * unit); + context.setFillStyle('#96959a'); + context.fillText(fromText, 277 * unit, 105 * unit); + + // 4.海报背景 + context.setFillStyle('white'); + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); + + // 5.商品图片 + // 图片的x坐标 + let bg_x = 37 * unit + // 图片的y坐标 + let bg_y = 157 * unit + // 图片宽度 + let bg_w = 480 * unit + // 图片高度 + let bg_h = 474 * unit + // 图片圆角 + let bg_r = 4 + // 绘制海报背景图片圆角 + context.save() + context.beginPath() + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) + context.clip() + context.drawImage(img, bg_x, bg_y, bg_w, bg_h); + context.restore(); + + // 6.强烈推荐 + let src = ''; + context.beginPath(); + if (type == 0) { // 普通 + src = '../../../images/share/q_tj.png'; + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); + context.setFontSize(16 * unit) + context.setFillStyle("white") + context.setTextAlign('left'); + context.fillText('强烈推荐', 64 * unit, 668 * unit); + } + + + let price = this.data.giftPrice; + let giftIntegral = this.data.giftIntegral; + context.setFontSize(32 * unit); + context.setFillStyle('#DE1117'); + + var price_txt=""; + if(price || giftIntegral){ + if(price){ + price_txt='¥' + price; + if(giftIntegral) price_txt+='+'; + } + if(giftIntegral) price_txt+=giftIntegral+'积分'; + }else{ + price_txt="¥0"; + } + + context.fillText(price_txt, 54 * unit, 735 * unit); + + + var wp= 62 * unit; + var hp=765 * unit + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit); + + // 8.商品标题 + context.setFontSize(20 * unit); + context.setFillStyle('#898989'); + getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1); + + // 9.小程序码 + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); + context.setFontSize(16 * unit); + context.setFillStyle('#777'); + context.fillText('长按识别二维码', 378 * unit, 810 * unit); + + // 10.竖线 + context.beginPath(); + context.setFillStyle('#eee'); + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); + context.fill(); + }, + + + //---市场价划掉--- + draw_pos_price(context,w,h,market_price,unit){ + + if(!this.is_retail_price) return false; + + context.setFillStyle("gray") + context.setFontSize(22 * unit) + var pri0 = "¥" + market_price.toFixed(2); + context.fillText(pri0, w, h); + + var c_h=h-6; + context.setStrokeStyle('gray'); + context.setLineWidth(1 * unit); + context.moveTo(w - 5, c_h); + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); + context.stroke(); + + }, + + //--获取商品图片的本地缓存,回调写法-- + get_goods_temp: function (tt) { + var ee = this; + if (ee.data.share_goods_img) { + tt(); + return false; + } + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage; + //获取商品是分享图信息 + wx.getImageInfo({ + src: img_url, + success: function (res) { + //res.path是网络图片的本地地址 + ee.data.share_goods_img = res.path; + tt(); + }, + fail: function (res) { + //获取默认空白图 + wx.getImageInfo({ + src: ee.data.iurl+'/miniapp/images/default_g_img.gif', + success: function(res) { + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 + tt(); + } + }) + } + }); + }, + + closePoster() { + this.setData({ + showPoster: false, + }); + }, + // 保存图片到手机 + savePic() { + getApp().savePic(this); + }, + // 预览海报 + previewPoster() { + getApp().globalData.no_clear=1; + wx.previewImage({ + current: this.data.shareImgPath, // 当前显示图片的http链接 + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 + }); + }, + + + +}); \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.json b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.json new file mode 100644 index 0000000..0841c16 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "礼包详情", + "usingComponents": { + "warn": "/components/long_warn/long_warn", + "my_confirm": "/components/my_confirm/my_confirm", + "qr_code": "/components/qr_code/qr_code", + "nav_b": "/components/nav_b/nav_b", + "share": "/components/share/share" + } +} \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml new file mode 100644 index 0000000..b3446bc --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml @@ -0,0 +1,249 @@ + + + + + + + + {{pick_up.pickup_name}} + + + + {{monthgiftbag.giftTitle}} + + + + + + + + + + + + + {{"¥"+monthgiftbag.lbPrice}} + + + / + + + {{monthgiftbag.payIntegral+"积分"}} + + + + + + + + + + {{monthgiftbag.oldPrice?'零售价:':''}}{{monthgiftbag.oldPrice+"元"}} + + + + + + + 礼包内容 + + + + + + + + + + + + + + + + + + + + + + + {{item.couponName}} + + + + + + + {{"数量:"+item.num}} + + + + 已核销 + + + 未核销 + + + + + + + + + + + + + + + + + + + 奖励已发放 + + + + + + + + + 活动说明 + + + + + + + + + + + + + + + + 立即购买 + + + 立即兑换 + + + + + 立即购买 + + + + + 立即兑换 + + + + + + + + + 活动还未开始 + + + + + + + + + + 无核销商品 + + + + + 兑换未开始 + + + 立即使用 + + + 商品已核销 + + + 商品兑换时间已过 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxss b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxss new file mode 100644 index 0000000..28bd743 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxss @@ -0,0 +1,252 @@ +@charset "UTF-8"; +@import '../giftpackbuy/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 #999; + 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; +} + diff --git a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js new file mode 100644 index 0000000..8c9f13b --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js @@ -0,0 +1,1287 @@ +var e = getApp(), + a = e.globalData.setting, + os = a, + t = e.request, + d = e.globalData; +var ut = require("../../../../../utils/util.js"); +var com = require("../public/buy_com.js"); + +Page({ + data: { + url: a.url, //接口网址 + iurl: a.imghost, //图片前缀网址 + isBuy: 0, + getGiftID: '', //礼包id + giftImage: '', + giftTitle: '', + giftDate: '', + giftPrice: '', + giftIntegral: '', + giftPosPrice: '', + giftQty: '', + giftRemark: '', + giftType: '', + actTitle: '', + getUrl: '', + wareCard: [], + orderSn: "", //订单编号 + lbId: "", + code: "", //核销码 + c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期 + is_lb: 0, //是否有礼包 + default_color: null, + first_leader: e.globalData.first_leader || 0, // 推荐人ID + + //门店相关 + ismend: 0, + is_sec_mend: 0, + sto_sele_name: "", //选中的门店名称 + sto_sele_id: "", //选中的门店id + sto_sele_distr: "", //选择的门店的配送方式 + is_show_sto_cat: 1, //是否显示门店分类 + only_pk: null, + all_sto: null, + sec_sto: null, //选择了的门店分类 + pickpu_list: null, //读出的所有门店list + def_pickpu_list: null, //一开始5个门店list + sec_pick_index: 0, //第二级门店选择ID + fir_pick_index: 0, //第一级门店选择ID + all_pick_list: null,//所有的门店先记录起来 + + select_store: 0, //选择更多 + index: 1, + more_store: 0, //选择门店 + sort_store: 0, //门店分类 + choice_sort_store: 0, //选择分类门店 + new_user: 0, //新用户 + + def_pick_store: null, // 默认的门店 + fir_def_store: null, //客户默认的门店的 + lat: null, //维度 + lon: null, //经度 + + is_get_local_ok: 0, //获取坐标是否完成 + region_name: "门店分类", //区域的名字 + is_gps: 1, + open_ind_store: 0, //哪里打开的门店列表的控制属性 + default_store: {}, //创建添加默认门店地址的对象 + + store: 0, + openSpecModal: 0, + + sto_sele_name_1: '', + share_goods_img:'', //礼包的分享图 + giftImageCover:null, + canvasHidden:true, + is_receive:1, //是否已经领取 + screenWidth: 0, + + }, + onLoad: function (options) { + + 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 + record_list_id:options.record_list_id, + is_receive:options.is_receive + }) + 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 () { + 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(); + }) + }, + 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; + let url='/api/weshop/marketing/giftbag/detail/getNew' + let data={ + "storeId": a.stoid, //商家ID + "userId": d.user_id, //用户ID + } + // if (th.orderSn) { + // url='/api/weshop/marketing/my/giftbag/detail/get' + // data.orderSn=th.orderSn + // }else{ + // data.giftBagId=th.getGiftID + // } + data.giftBagId=th.getGiftID + getApp().request.get(url, { + isShowLoading: true, + data:data, + 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, + giftTitle: res.data.data.lbTitle, + default_color: res.data.data.bgcolor + }) + if (!res.data.data.giftRemark) { + _this2.setData({ + giftRemark: '暂无详情......' + }) + } else { + _this2.setData({ + giftRemark: res.data.data.giftRemark.replace(/\{ + wx.navigateBack({ + delta: 0, + }) + },500) + } else { + that.setData({submit:0}) + getApp().my_warnning(res.data.msg, 0, that); + } + }, + function (res) { + that.setData({submit:0}) + } + ) + }, + + //--- 设置一下默认库存的数量 ---- + 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) { + + //--先判断会员状态-- + 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_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) + }, + + + clickShare() { + if (!getApp().globalData.user_id) { + getApp().goto("/packageE/pages/togoin/togoin"); + return false; + } + this.setData({ + share_hidden: true, + }); + }, + + send() { + this.setData({ + share_hidden: false, + }); + }, + + cancel() { + this.setData({ + share_hidden: false, + }); + }, + + + //--定义的保存图片方法,分享团--- + saveImageToPhotosAlbum: function () { + //--先判断会员状态-- + var user_info = getApp().globalData.userInfo; + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { + //getApp().my_warnning("请先登录",0,this); + wx.navigateTo({url: '/packageE/pages/togoin/togoin',}) + return false; + } + + if (this.data.share_hidden) { + this.setData({share_hidden: false,}); + } + + wx.showLoading({title: '生成中...',}) + var that = this, th = that; + //设置画板显示,才能开始绘图 + that.setData({ + canvasHidden: false + }) + + var app = getApp(); + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, + var scene = th.data.lbId + ""; + + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; + if (user_id > 0) { + scene += "_" + user_id; + } + ///二微码 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist"; + + // 读取文件成功则OK-- + wx.getImageInfo({ + src: path3, + success: function (res) { + th.get_goods_temp(function () { + var vpath = res.path; + var context = wx.createCanvasContext('share'); + // let share_goods_img = th.params.cover_img + th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0); + + //把画板内容绘制成图片,并回调 画板图片路径 + context.draw(false, function () { + setTimeout(function () { + wx.canvasToTempFilePath({ + x: 0, + y: 0, + width: 750, + height: 1217, + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, + canvasId: 'share', + success: function (res) { + + that.setData({ + shareImgPath: res.tempFilePath, + canvasHidden: true + }) + + if (!res.tempFilePath) { + wx.showModal({ + title: '提示', + content: '图片绘制中,请稍后重试', + showCancel: false + }) + return false; + } + + that.setData({ + showPoster: true, + }); + wx.hideLoading(); + } + }) + }, 800) + + }); + }) + }, + fail: function (res) { + console.log(res); + wx.hideLoading(); + + } + }); + }, + + //-- 小程序绘制海报 -- + drawPoster(context, unit, img, vpath, type) { + // 1.灰色背景 + context.setFillStyle('#f2f1f6'); + context.rect(0, 0, 554 * unit, 899 * unit); + context.fill(); + + // 2.商城名称 + let shopName = this.data.sto_sele_name_1; + context.setTextAlign('center'); + context.setFontSize(26 * unit); + context.setFillStyle('black'); + context.fillText(shopName, 277 * unit, 60 * unit); + + // 3.推荐来源 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; + context.setTextAlign('center'); + context.setFontSize(22 * unit); + context.setFillStyle('#96959a'); + context.fillText(fromText, 277 * unit, 105 * unit); + + // 4.海报背景 + context.setFillStyle('white'); + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); + + // 5.商品图片 + // 图片的x坐标 + let bg_x = 37 * unit + // 图片的y坐标 + let bg_y = 157 * unit + // 图片宽度 + let bg_w = 480 * unit + // 图片高度 + let bg_h = 474 * unit + // 图片圆角 + let bg_r = 4 + // 绘制海报背景图片圆角 + context.save() + context.beginPath() + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) + context.clip() + context.drawImage(img, bg_x, bg_y, bg_w, bg_h); + context.restore(); + + // 6.强烈推荐 + let src = ''; + context.beginPath(); + if (type == 0) { // 普通 + src = '../../../images/share/q_tj.png'; + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); + context.setFontSize(16 * unit) + context.setFillStyle("white") + context.setTextAlign('left'); + context.fillText('强烈推荐', 64 * unit, 668 * unit); + } + + + let price = this.data.giftPrice; + let giftIntegral = this.data.giftIntegral; + context.setFontSize(32 * unit); + context.setFillStyle('#DE1117'); + + var price_txt=""; + if(price || giftIntegral){ + if(price){ + price_txt='¥' + price; + if(giftIntegral) price_txt+='+'; + } + if(giftIntegral) price_txt+=giftIntegral+'积分'; + }else{ + price_txt="¥0"; + } + + context.fillText(price_txt, 54 * unit, 735 * unit); + + + var wp= 62 * unit; + var hp=765 * unit + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit); + + // 8.商品标题 + context.setFontSize(20 * unit); + context.setFillStyle('#898989'); + getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1); + + // 9.小程序码 + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); + context.setFontSize(16 * unit); + context.setFillStyle('#777'); + context.fillText('长按识别二维码', 378 * unit, 810 * unit); + + // 10.竖线 + context.beginPath(); + context.setFillStyle('#eee'); + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); + context.fill(); + }, + + + //---市场价划掉--- + draw_pos_price(context,w,h,market_price,unit){ + + if(!this.is_retail_price) return false; + + context.setFillStyle("gray") + context.setFontSize(22 * unit) + var pri0 = "¥" + market_price.toFixed(2); + context.fillText(pri0, w, h); + + var c_h=h-6; + context.setStrokeStyle('gray'); + context.setLineWidth(1 * unit); + context.moveTo(w - 5, c_h); + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); + context.stroke(); + + }, + + //--获取商品图片的本地缓存,回调写法-- + get_goods_temp: function (tt) { + var ee = this; + if (ee.data.share_goods_img) { + tt(); + return false; + } + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage; + //获取商品是分享图信息 + wx.getImageInfo({ + src: img_url, + success: function (res) { + //res.path是网络图片的本地地址 + ee.data.share_goods_img = res.path; + tt(); + }, + fail: function (res) { + //获取默认空白图 + wx.getImageInfo({ + src: ee.data.iurl+'/miniapp/images/default_g_img.gif', + success: function(res) { + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 + tt(); + } + }) + } + }); + }, + + closePoster() { + this.setData({ + showPoster: false, + }); + }, + // 保存图片到手机 + savePic() { + getApp().savePic(this); + }, + // 预览海报 + previewPoster() { + getApp().globalData.no_clear=1; + wx.previewImage({ + current: this.data.shareImgPath, // 当前显示图片的http链接 + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 + }); + }, + + + +}); \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.json b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.json new file mode 100644 index 0000000..0841c16 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "礼包详情", + "usingComponents": { + "warn": "/components/long_warn/long_warn", + "my_confirm": "/components/my_confirm/my_confirm", + "qr_code": "/components/qr_code/qr_code", + "nav_b": "/components/nav_b/nav_b", + "share": "/components/share/share" + } +} \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxml b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxml new file mode 100644 index 0000000..8db968f --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxml @@ -0,0 +1,249 @@ + + + + + + + + {{pick_up.pickup_name}} + + + + {{giftTitle}} + + + + + + + + + + {{"活动开始时间:"+giftStart}} + + + + + {{"兑换结束时间:"+giftDate}} + + {{"活动结束时间:"+giftDate}} + + + + + + {{"兑换时间:领取后"+exchangeDay+"天内兑换"}} + + + {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}} + + + + + + + + {{"¥"+giftPrice}} + + + / + + + {{giftIntegral+"积分"}} + + + {{actTitle}} + + + + + + + + + {{is_retail_price?'零售价:':''}}{{giftPosPrice+"元"}} + + + + + + + 礼包内容 + + + + + + + + + + + + + + + + + + + + + + + {{item.couponName}} + + + + + + + {{"数量:"+item.num}} + + + + 已核销 + + + 未核销 + + + + + + + + + + + + + + + + + + + 奖励已发放 + + + + + + + + + 活动说明 + + + + + + + + + + + + + + + + + + + 已领取 + + + 领取 + + + + + + + + 活动还未开始 + + + + + + + + + + 无核销商品 + + + + + 兑换未开始 + + + 立即使用 + + + 商品已核销 + + + 商品兑换时间已过 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxss b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxss new file mode 100644 index 0000000..28bd743 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxss @@ -0,0 +1,252 @@ +@charset "UTF-8"; +@import '../giftpackbuy/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 #999; + 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; +} + diff --git a/packageE/pages/user/monthgiftbag/monthgiftbag.js b/packageE/pages/user/monthgiftbag/monthgiftbag.js new file mode 100644 index 0000000..48d8a7b --- /dev/null +++ b/packageE/pages/user/monthgiftbag/monthgiftbag.js @@ -0,0 +1,221 @@ +var i = 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 + }, + onLoad: function (options) { + this.setData({ + params: options, + }) + }, + + init() { + let options = this.data?.params; + var th = this; + this.setData({ + getStorageID: a.stoid, + getUserID: d.user_id, + loadingType: 0, + getDate: i.formatTime(new Date().getTime()) + }); + //-- 获取分享人的ID -- + var first_leader = options.first_leader || getApp().globalData.first_leader; + if (first_leader) { + this.setData({ + first_leader, + }) + //-- user_id代过来免登录 -- + getApp().globalData.first_leader = first_leader; + //调用接口判断是不是会员 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { + if (res.data.code == 0) { + getApp().globalData.guide_id = res.data.data.id; + getApp().globalData.guide_pick_id= res.data.data.pickup_id + } + }) + } + + getApp().request.promiseGet("/api/weshop/ad/page?pid=1208&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(); + this.setData({ + curpage:1 + }) + //--先判断会员状态-- + 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.setData({ + wareCard:[] + }) + this.init() + }) + + + }, + getList: function () { + var th = this; + + getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagRecord/page', { + isShowLoading: true, + data: { + store_id: th.data.getStorageID, //商家ID + user_id: th.data.getUserID, //用户ID + page: th.data.curpage, + pageSize: th.data.pageSize, + pay_state:1 + }, + success: function (res) { + if (res.data.code == 0) { + + var arr1 = th.data.wareCard; + var arr2 = res.data.data.pageData; + if (arr2.length>=th.data.pageSize) { + th.data.curpage++; + } + for (let j = 0; j < arr2.length; j++) { + // arr2[j].starTime1=Date.parse(new Date(arr2[j].begindate.replace(/-/g, "/")))/1000 + // arr2[j].starTime1=arr2[j].begindate + // arr2[j].starTime=i.formatTime(arr2[j].begindate, "yyyy-MM-dd hh:mm:ss"); + // arr2[j].endTime=i.formatTime(arr2[j].enddate, "yyyy-MM-dd hh:mm:ss"); + arr2[j].giftPosPrice=arr2[j].oldPrice + arr2[j].payMoney=arr2[j].pay_money + arr2[j].payIntegral=arr2[j].pay_integral + // arr2[j].giftQty=arr2[j].buynum + arr2[j].cover_img=arr2[j].imageurl + arr2[j].giftTitle=arr2[j].act_name + arr2[j].lbId=arr2[j].cur_giftid + arr2[j].orderSn=arr2[j].order_sn + arr2[j].pay_time=i.formatTime(arr2[j].paytime, "yyyy-MM-dd hh:mm:ss"); + + // arr2[j].virtualsales=arr2[j].virtualSales + // arr2[j].lbnum=arr2[j].lbNum + } + + + 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, + }) + } + + } + + }); + + }, + //销毁界面跳转 + 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) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; + }, + + + //--- 分享设置 -- + 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 + } + }, + + +}); \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/monthgiftbag.json b/packageE/pages/user/monthgiftbag/monthgiftbag.json new file mode 100644 index 0000000..c5d51ee --- /dev/null +++ b/packageE/pages/user/monthgiftbag/monthgiftbag.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "每月礼包", + "enablePullDownRefresh": false, + "usingComponents": { + "warn": "/components/long_warn/long_warn", + "my_confirm": "/components/my_confirm/my_confirm" + } +} \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/monthgiftbag.wxml b/packageE/pages/user/monthgiftbag/monthgiftbag.wxml new file mode 100644 index 0000000..1788c11 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/monthgiftbag.wxml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + 礼包列表 + + + + 我的礼包 + + + + + + + + + + + + + + + + 新人有礼 + + + 评价有礼 + + + 节日营销 + + + 生日营销 + + + 助力礼包 + + + + + + + {{item.giftTitle}} + + + + {{"¥"+item.payMoney}} + + + {{item.payIntegral+"积分"}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + + {{"购买时间:"+item.pay_time}} + + + + + + + + + + + + + + + + + 当前暂无礼包 + + + 去获取 + + + + + + + + 到底了 + + + + + + + \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/monthgiftbag.wxss b/packageE/pages/user/monthgiftbag/monthgiftbag.wxss new file mode 100644 index 0000000..f82a934 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/monthgiftbag.wxss @@ -0,0 +1,253 @@ +/*引用样式路径*/ +@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: 40rpx; +} + +.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; + width: 160rpx; + height: 50rpx; + font-size: 25rpx; + background: #d41c34; + color: #fff; + line-height: 50rpx; +} + +.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; +} diff --git a/packageE/pages/user/monthgiftbag/payment/payment.js b/packageE/pages/user/monthgiftbag/payment/payment.js new file mode 100644 index 0000000..63341a7 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/payment/payment.js @@ -0,0 +1,30 @@ +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).toFixed(2), order_sn = options.order_sn; + this.setData({allmoney:money,order_sn:order_sn}) + }, + + goto: function () { + var url = '/pages/index/index/index'; + getApp().goto(url) + }, +}) \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/payment/payment.json b/packageE/pages/user/monthgiftbag/payment/payment.json new file mode 100644 index 0000000..1111654 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/payment/payment.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "支付成功", + "usingComponents": {} +} \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/payment/payment.wxml b/packageE/pages/user/monthgiftbag/payment/payment.wxml new file mode 100644 index 0000000..af17cce --- /dev/null +++ b/packageE/pages/user/monthgiftbag/payment/payment.wxml @@ -0,0 +1,57 @@ + + + + + + + + + + + 订单支付成功! + + + + + + + + 订单编号 : + {{order_sn}} + + + + + 实付金额 : + + {{allmoney}}元 + + + + + 支付方式 : + 微信支付 + + + + + + + + + + + + + + 每月礼包 + + + + + 回到首页 + + + + + \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/payment/payment.wxss b/packageE/pages/user/monthgiftbag/payment/payment.wxss new file mode 100644 index 0000000..f69e931 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/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 diff --git a/packageE/pages/user/monthgiftbag/public/buy_com.js b/packageE/pages/user/monthgiftbag/public/buy_com.js new file mode 100644 index 0000000..11e0832 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/public/buy_com.js @@ -0,0 +1,531 @@ +module.exports = { + //开启定位 + wait_for_store_config: function (th) { + var t_time = setInterval(function () { + if (th.data.bconfig == null) false; + var e = th.data.bconfig; + if (e && e.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function (res) { + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + }, + fail: function (res) { + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 10000, !1); + } + + } else { + th.setData({ + is_gps: "3" + }); + } + + th.data.is_get_local_ok = 1; + } + }) + } else { + th.data.is_get_local_ok = 1; + } + clearInterval(t_time); + }, 500) + }, + set_user_mo_store(th,os,func){ + var that=th; + //获取用户的默认门店 + getApp().get_user_store(function (e) { + if (!e) { + th.data.fir_def_store = {}; //赋值空对象 + return false; + } + + if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) + + var ee = JSON.parse(JSON.stringify(e)); + //--定时器推迟一下-- + setTimeout(function () { + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type; + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对-- + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) { + ee.is_no_dis = 1; + } + + var appd = getApp().globalData; + var w_time = setInterval(function () { + if (that.data.is_get_local_ok == 0) return false; + clearInterval(w_time); + var distance = null; + var e = JSON.parse(JSON.stringify(ee)); + + //如果有开启近距离的话,同时距离优不一样了 + if (that.data.lat != null) { + //如果经纬度有变化的话 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) { + that.set_def_storage(e); + if(func) func(); + } else { + //要用接口是获取距离,js的计算不准 + getApp().request.promiseGet("/api/weshop/pickup/list", { + data: { + store_id: os.stoid, + pickup_id: e.pickup_id, + lat: th.data.lat, + lon: th.data.lon, + isstop: 0, + is_pos: 1 + }, + }).then(res => { + if (res.data.code == 0) { + e = res.data.data.pageData[0]; + if (e) { + e.is_no_dis = ee.is_no_dis; + appd.pk_store = e; + that.set_def_storage(e); + } + + } + if(func) func(); + }) + } + //e.distance = distance; + appd.lat = that.data.lat; + appd.lon = that.data.lon; + + } else { + if (e) { + e.distance = null; + that.set_def_storage(e); + } + if(func) func(); + } + }, 500) + }, 700) + }) + + }, + + //---------拿出门店分类和门店------------ + get_sto(th,os) { + var that = th; + var self=this; + var timer_get = setInterval(function () { + if (th.data.is_get_local_ok == 0) return false; + var dd = null; + + dd = { + store_id: os.stoid, + isstop: 0, + is_pos: 1, + pageSize: 2000, + } + + //如果有距离的话 + if (th.data.lat != null) { + dd.lat = th.data.lat; + dd.lon = th.data.lon; + } + + if(th.data.sele_g && th.data.sele_g.pickup_list){ + dd.ids=th.data.sele_g.pickup_list + } + + clearInterval(timer_get); + + //如果会员是有默认的门店话 + if (!th.data.def_pick_store && th.data.fir_def_store) { + th.setData({def_pick_store: th.data.fir_def_store}); + } + wx.showLoading({ + title: '加载中.' + }); + //----------获取门店---------------- + getApp().request.promiseGet("/api/weshop/pickup/list", { + data: dd, + }).then(res => { + var e = res; + + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { + + var his_cate_num = 0; + for (let i in e.data.data.pageData) { + let item = e.data.data.pageData[i]; + if (item.category_id > 0) { + his_cate_num = 1; + break; + } + } + e.his_cate_num = his_cate_num; + + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { + th.setData({ + def_pick_store: e.data.data.pageData[0], + sto_sele_name: e.data.data.pageData[0].pickup_name, + sto_sele_id: e.data.data.pageData[0].pickup_id, + sto_sele_distr: e.data.data.pageData[0].distr_type + }); + th.data.fir_def_store = e.data.data.pageData[0]; + } + + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { + for (var k = 0; k < e.data.data.pageData.length; k++) { + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { + e.data.data.pageData.splice(k, 1); //删除 + break; + } + } + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 + } + + th.setData({all_pick_list: e.data.data.pageData}); + + setTimeout(function () { + self.deal_pickup(e,th,os); //--普通门店排版-- + }, 800) + + } + }) + }, 200) + + }, + + //-- 统一购买 -- + buy_libao:function (th) { + let then1=this + if(th.data.sele_g.is_pickup){ + if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id) ){ + getApp().my_warnning("请先选择门店", 1, th); + return false; + } + + if(th.data.def_pick_store.is_no_dis){ + getApp().my_warnning("门店不匹配,请重新选择", 1, th); + return false; + } + } + + th.setData({submit:1}) + var id=th.data.sele_g.id; + var that=th; + var json = { + "actId": '', //活动Id + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 + "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买 + "giftBagId": id, //每月礼包主表id + "storeId": that.data.getStorageID, //商家Id + "userId": that.data.getUserID, //用户ID + "buyFrom": 2, + }; + + if(that.data.first_leader){ + json.first_leader=that.data.first_leader + } + if(that.data.guide_id){ + json.guide_id=that.data.guide_id + } + + if(th.data.sele_g.is_pickup && that.data.def_pick_store){ + json.pickup_id=that.data.def_pick_store.pickup_id; + } + + //-- 分享导购要记录 -- + if (getApp().globalData.guide_id) { + json.guide_id = getApp().globalData.guide_id; + } + + // var url ="/api/weshop/marketing/buy/receive/gift/record/insert"; + var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder"; + getApp().request.json_post(url, json, + function (res) { + if (res.data.code == 0 && res.data.data) { + switch(that.data.buyType){ + case 1://立即兑换 + th.setData({submit:0}) + getApp().my_warnning("兑换成功!", 1, th); + th.closeSpecModal(); + break; + case 2://立即购买 + var order_sn = res.data.data.orderSn; + res = res.data.data.result; + if (!res) return false; + var money=that.data.payMoney; + var url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + order_sn; + getApp().globalData.no_clear=1; + wx.requestPayment({ + timeStamp: String(res.timeStamp), + nonceStr: res.nonceStr, + package: res.packageValue, + signType: res.signType, + paySign: res.paySign, + success: function (res) { + th.setData({submit:0}) + getApp().goto(url); + }, + fail: function (res) { + th.setData({submit:0}) + getApp().my_warnning("取消支付", 0, th); + then1.reduce(order_sn,that.data.getStorageID) + } + }); + break; + case 3://立即领取 + th.setData({submit:0}) + getApp().my_warnning("领取成功!", 1, th); + th.closeSpecModal(); + break; + } + + } else { + th.setData({submit:0}) + getApp().my_warnning(res.data.msg, 0, th); + } + }, + function (res) { + th.setData({submit:0}) + } + ) + + }, + + + //每月礼包减少购买数量 + reduce(order_sn,stoid){ + wx.showLoading({ + title: '加载中.' + }); + getApp().request.put("/api/weshop/marketing/marketingMonthgiftbagRecord/updateSubBuyNum", { + data: { + store_id: stoid, + order_sn + }, + success: function (ee) { + wx.hideLoading() + }, + + }); + }, + + //------------处理门店--------------- + deal_pickup(e,th,os) { + + if (!th.data.sele_g) return false + wx.hideLoading(); + + //单总量超出10个的时候,同时门店有分类 + if (e.data.data.total > 10 && e.his_cate_num) { + getApp().request.get("/api/weshop/storagecategory/page", { + data: { + store_id: os.stoid, + pageSize: 1000, + orderField: "sort", + orderType: 'asc', + }, + success: function (ee) { + if (ee.data.code == 0) { + var check_all_cate = 0; + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { + for (let i in ee.data.data.pageData) { + let item = ee.data.data.pageData[i]; + if (item.is_show == 1) { + check_all_cate = 1; + break + } + } + } + if (check_all_cate) { + var sto_cate = ee.data.data.pageData; + var sto_arr = e.data.data.pageData; + var newarr = new Array(); + var qita = new Array(); + + + var is_del_pk = 0; + //----要进行门店分组-------- + for (var i = 0; i < sto_arr.length; i++) { + //找一下这个门店有没有在分类数组内 + var find2 = 0, find2name = "", sort = 0; + is_del_pk = 0; + for (var m = 0; m < sto_cate.length; m++) { + if (sto_arr[i].category_id == sto_cate[m].cat_id) { + if (sto_cate[m].is_show != 1) { + is_del_pk = 1; + sto_arr.splice(i, 1); + i--; + } else { + find2 = sto_cate[m].cat_id; + find2name = sto_cate[m].cat_name; + sort = sto_cate[m].sort; + is_del_pk = 0; + } + break; + } + } + if (is_del_pk) continue; + + if (newarr.length > 0) { + var find = 0; + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 + if (find2 != 0) { + for (var ii = 0; ii < newarr.length; ii++) { + if (sto_arr[i].category_id == newarr[ii].cat_id) { + newarr[ii].s_arr.push(sto_arr[i]); + find = 1; + break; + } + } + if (find == 0) { + var arr0 = new Array(); + arr0.push(sto_arr[i]); + var item = { + cat_id: find2, + name: find2name, + sort: sort, + s_arr: arr0 + }; + newarr.push(item); + } + } else { + qita.push(sto_arr[i]); + } + } else { + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 + if (find2 != 0) { + var arr0 = new Array(); + arr0.push(sto_arr[i]); + var item = { + cat_id: find2, + name: find2name, + sort: sort, + s_arr: arr0 + }; + newarr.push(item); + } else { + qita.push(sto_arr[i]); + } + } + } + + var def_arr = new Array(); + //-- 开始就看10个门店 -- + for (var k = 0; k < 10; k++) { + if (k == sto_arr.length) break; + def_arr.push(sto_arr[k]); + } + + th.setData({ + def_pickpu_list: def_arr, + pickpu_list: ee.data.data.pageData + }); + + + //门店分类要排序下 + function compare(property) { + return function (a, b) { + var value1 = a[property]; + var value2 = b[property]; + return value1 - value2; + } + } + + if (newarr.length > 0) + newarr.sort(compare("sort")); + + + //----安排其他的分类----- + if (qita.length > 0) { + var item = { + cat_id: -1, + name: "其他", + s_arr: qita + }; + newarr.push(item); + } + + var sd = { + all_sto: newarr, + is_show_sto_cat: 1 + } + if (!sto_arr || sto_arr.length <= 10) { + sd.is_show_sto_cat = -1; + sd.only_pk = sto_arr; + } + th.setData(sd); + + } else { + th.setData({ + is_show_sto_cat: -1, + only_pk: e.data.data.pageData + }); + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ + if (!th.data.def_pick_store) { + th.setData({ + def_pick_store: e.data.data.pageData[0], + sto_sele_name: e.data.data.pageData[0].pickup_name, + sto_sele_id: e.data.data.pageData[0].pickup_id, + sto_sele_distr: e.data.data.pageData[0].distr_type + }) + } + } + } else { + th.setData({ + is_show_sto_cat: -1, + only_pk: e.data.data.pageData + }); + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ + if (!th.data.def_pick_store) { + th.setData({ + def_pick_store: e.data.data.pageData[0], + sto_sele_name: e.data.data.pageData[0].pickup_name, + sto_sele_id: e.data.data.pageData[0].pickup_id, + sto_sele_distr: e.data.data.pageData[0].distr_type + }) + } + + } + } + }); + } else { + th.setData({ + is_show_sto_cat: 0, + only_pk: e.data.data.pageData + }); + //-----如果没有默认门店,要取第一个门店作为默认店------ + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { + th.setData({ + def_pick_store: e.data.data.pageData[0], + sto_sele_name: e.data.data.pageData[0].pickup_name, + sto_sele_id: e.data.data.pageData[0].pickup_id, + sto_sele_distr: e.data.data.pageData[0].distr_type + }) + } + } + }, + + check_def_pk:function (th) { + th.data.def_pick_store.is_no_dis=0; + var def_pick_store=th.data.def_pick_store + var sele_g=th.data.sele_g; + var arr=sele_g.pickup_list.split(','); + + var idx=arr.findIndex(function (e) { + return e==def_pick_store.pickup_id; + }) + + if(idx==-1){ + def_pick_store.is_no_dis=1; + } + th.setData({def_pick_store}) + + } + + + + +} \ No newline at end of file diff --git a/packageE/pages/user/monthgiftbag/public/buy_com.wxml b/packageE/pages/user/monthgiftbag/public/buy_com.wxml new file mode 100644 index 0000000..2d984d1 --- /dev/null +++ b/packageE/pages/user/monthgiftbag/public/buy_com.wxml @@ -0,0 +1,258 @@ + + + + + + + + {{choice_sort_store==0?'附近的门店':region_name}} + + + + + + {{choice_sort_store==0?'更多门店':'返回'}} + + + + + + + + + + + + + + Г + + + + + + + + {{item.pickup_name}} + + + + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}} + + + + 地址:{{item.fulladdress}} + + + + + + + + + + Г + + + + + + + + {{item.pickup_name}} + + + + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} + + + + 地址:{{item.fulladdress}} + + + + + + + + + + + + Г + + + + + + + + {{item.pickup_name}} + + + + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} + + + + 地址:{{item.fulladdress}} + + + + + + + + + + 确定 + + + 设为默认 + + + + + + + 门店分类选择 + + + + + + 返回 + + + + + + + {{item.name}} + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/giftpack/public/buy_com.js b/pages/giftpack/public/buy_com.js index 9c9dbbb..c8511cc 100644 --- a/pages/giftpack/public/buy_com.js +++ b/pages/giftpack/public/buy_com.js @@ -199,7 +199,7 @@ module.exports = { //-- 统一购买 -- buy_libao:function (th) { if(th.data.sele_g.is_pickup){ - if(!th.data.def_pick_store && !th.data.def_pick_store.pickup_id){ + if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id)){ getApp().my_warnning("请先选择门店", 1, th); return false; }