Commit 7be94812ae9a1985deacf6de270d5771f549ffd3

Authored by WXD-SEASON\season
2 parents b4228d07 6724fe13

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into test

Showing 36 changed files with 10965 additions and 161 deletions
app.json
... ... @@ -221,7 +221,12 @@
221 221 "pages/user/labels/labels",
222 222 "pages/cart/cart2/cart2",
223 223 "pages/barCodeBank/barCodeBank",
224   - "pages/qy/contactMe/contactMe"
  224 + "pages/qy/contactMe/contactMe",
  225 + "pages/user/monthgiftbag/payment/payment",
  226 + "pages/user/monthgiftbag/monthgiftbag",
  227 + "pages/user/monthgiftbag/giftpacklist/giftpacklist",
  228 + "pages/user/monthgiftbag/giftpackinfo/giftpackinfo",
  229 + "pages/user/monthgiftbag/giftpackbuy/giftpackbuy"
225 230 ]
226 231 }
227 232  
... ...
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
... ... @@ -75,6 +75,7 @@ Page({
75 75 card_name: '', //显示的卡的名称
76 76 card_cut_price: null, //减价多少钱
77 77 is_pre_cut:0, //是否可以使用预存 0是不可以1的可以
  78 + act:null, //幸运购的活动
78 79 },
79 80  
80 81 onLoad: function (t) {
... ... @@ -95,11 +96,11 @@ Page({
95 96  
96 97  
97 98 // 获取幸运购活动团team_id
98   - this.get_teamId({
99   - store_id: oo.stoid,
100   - user_id: getApp().globalData.user_id,
101   - aid: t.group_id,
102   - });
  99 + // this.get_teamId({
  100 + // store_id: oo.stoid,
  101 + // user_id: getApp().globalData.user_id,
  102 + // aid: t.group_id,
  103 + // });
103 104  
104 105  
105 106  
... ... @@ -335,7 +336,19 @@ Page({
335 336 userinfo: e.data.data
336 337 });
337 338 //获取立即购买的商品信息
338   - th.get_buy_goods();
  339 +
  340 +
  341 + var op_data={
  342 + store_id: oo.stoid,
  343 + user_id: getApp().globalData.user_id,
  344 + aid: th.data.param.group_id,
  345 + };
  346 +
  347 + th.get_teamId(op_data,function (){
  348 + th.get_buy_goods();
  349 + })
  350 +
  351 +
339 352  
340 353 //获取提现金额
341 354 getApp().request.get("/api/weshop/withdrawals/summoney", {
... ... @@ -715,7 +728,10 @@ Page({
715 728 good = this.data.bn_goods;
716 729  
717 730 //-----------计算商品总价--------------
718   - var allpice = th.data.param.goods_price;
  731 + //var allpice = th.data.param.goods_price;
  732 + var allpice = (th.data.act.group_price/100).toFixed(2);
  733 +
  734 +
719 735 allpice = parseFloat(allpice).toFixed(2);
720 736 var txt = "formData.all_price";
721 737 th.setData({
... ... @@ -735,6 +751,22 @@ Page({
735 751 goods_piece = -1;
736 752 var out_of_weight = null; //超出多少重量
737 753  
  754 +
  755 + //-- 判断订单优惠的叠加 --
  756 + var ord_prom=null;
  757 + var o_condition=allpice;
  758 + if(th.data.act.is_order_yh){
  759 +
  760 + await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", {
  761 + data: { store_id: os.stoid, orderAmount: o_condition, user_id: getApp().globalData.user_id }
  762 + }).then(res => {
  763 + if (res.data.code == 0) {
  764 + ord_prom = res.data.data;
  765 + }
  766 + })
  767 + }
  768 +
  769 +
738 770 //-----------当地址不为空,且是物流时,计算物流费用,同时阶梯团不计算拼团价格----------
739 771 if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 && (th.data.kt_type !=
740 772 3 || th.data.bn_goods.is_normal == 1)) {
... ... @@ -744,12 +776,18 @@ Page({
744 776 province: user_addr.province, city: user_addr.city, district: user_addr.district,
745 777 wuliu: parseFloat(allpice).toFixed(2), store_id: os.stoid
746 778 }
  779 +
  780 + //-- 判断包邮 --
747 781 var back_data = null;
748   - await getApp().request.promisePost("/api/weshop/order/areaFreight", {
749   - is_json: 1, data: req_d
750   - }).then(rs => {
751   - if (rs.data.code == 0) back_data = rs.data.data;
752   - });
  782 + if(!ord_prom || ord_prom.is_post_temp) {
  783 + if (th.data.act.is_post_temp ) {
  784 + await getApp().request.promisePost("/api/weshop/order/areaFreight", {
  785 + is_json: 1, data: req_d
  786 + }).then(rs => {
  787 + if (rs.data.code == 0) back_data = rs.data.data;
  788 + });
  789 + }
  790 + }
753 791  
754 792 var gd_arr_list = [];
755 793 gd_arr_list.push(good);
... ... @@ -893,11 +931,43 @@ Page({
893 931 if (!is_next) return false
894 932 }
895 933  
  934 + //-- 如果是订单优惠的时候,allpice要拿来减掉一些 --
  935 + var order_prom_id=0;
  936 + var order_prom_amount=0;
  937 + if(ord_prom){
  938 + order_prom_id = ord_prom['id'];
  939 + switch (ord_prom['type']) {
  940 + case 0:
  941 + allpice = Math.round(o_condition * ord_prom['expression']) / 100;//满额打折
  942 + order_prom_amount = (o_condition - allpice).toFixed(2);
  943 + break;
  944 + case 1:
  945 + //-- 如果有优惠促销倍减的时候 --
  946 + var bs = 1;
  947 + if (ord_prom.is_bz) {
  948 + bs = Math.floor(o_condition / ord_prom.money);
  949 + }
  950 + allpice = o_condition - bs * ord_prom['expression'];//满额优惠金额
  951 + order_prom_amount = ord_prom['expression'];
  952 + break;
  953 + }
  954 + }
  955 +
  956 + //--订单优惠的显示--
  957 + var order_prom_txt1 = "formData.order_prom_id";
  958 + var order_prom_txt2 = "formData.order_prom_amount";
  959 + if (order_prom_amount > 0) {
  960 + th.setData({ [order_prom_txt1]: order_prom_id, [order_prom_txt2]: order_prom_amount })
  961 + } else {
  962 + th.setData({ [order_prom_txt1]: 0, [order_prom_txt2]: 0 })
  963 + }
  964 +
  965 +
896 966  
897 967 //-----------------总价-----------------
898 968 // 幸运购 01
899   - // var total_m = parseFloat(allpice) + parseFloat( th.data.formData.shipping_price);
900   - var total_m = parseFloat(th.data.param.goods_price) + parseFloat(th.data.formData.shipping_price);
  969 + var total_m = parseFloat(allpice) + parseFloat( th.data.formData.shipping_price);
  970 + //var total_m = parseFloat(th.data.param.goods_price) + parseFloat(th.data.formData.shipping_price);
901 971 total_m = parseFloat(total_m).toFixed(2);
902 972  
903 973 var atxt = "formData.total_amount";
... ... @@ -1151,6 +1221,15 @@ Page({
1151 1221 'order_goods': new Array(),
1152 1222 };
1153 1223  
  1224 + //--判断有没有优惠活动--
  1225 + if (th.data.formData.order_prom_amount > 0) {
  1226 + var order_prom_list = {};
  1227 + order_prom_list.order_prom_id = th.data.formData.order_prom_id;
  1228 + order_prom_list.order_prom_amount = th.data.formData.order_prom_amount;
  1229 + item.order_prom_list = order_prom_list;
  1230 + }
  1231 +
  1232 +
1154 1233 //如果不是阶梯团,或者是普通购买,01
1155 1234 // if ((th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) {
1156 1235 if (th.data.bn_goods.is_normal == 1) {
... ... @@ -1805,7 +1884,8 @@ Page({
1805 1884  
1806 1885  
1807 1886 // 获取team_id
1808   - get_teamId(options) {
  1887 + get_teamId(options,func) {
  1888 + var th=this;
1809 1889 let aid = options.aid;
1810 1890 let store_id = options.store_id;
1811 1891 let user_id = options.user_id;
... ... @@ -1814,10 +1894,16 @@ Page({
1814 1894 success: function (res) {
1815 1895 if (res.data.code == 0) {
1816 1896 let team_id = res.data.data.pageData[0]['team_id'];
  1897 + th.setData({
  1898 + act:res.data.data.pageData[0]
  1899 + })
  1900 +
1817 1901 wx.setStorage({
1818 1902 key: 'team_id',
1819 1903 data: team_id,
1820 1904 });
  1905 +
  1906 + func();
1821 1907 };
1822 1908 }
1823 1909 });
... ...
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
... ... @@ -189,6 +189,13 @@
189 189 <view class="co-red">- ¥ {{formData.user_money}}元</view>
190 190 </view>
191 191  
  192 + <!-- 订单优惠优惠金额 -->
  193 + <view class="item" wx:if="{{formData.order_prom_amount>0}}">
  194 + <view>订单优惠</view>
  195 + <view class="co-red">- ¥ {{filters.toFix(formData.order_prom_amount,2)}}元</view>
  196 + </view>
  197 +
  198 +
192 199 </view>
193 200 </view>
194 201  
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -2017,6 +2017,113 @@ Page({
2017 2017 // e.prom_id = 0;
2018 2018 }
2019 2019  
  2020 + //-- 这一步主要是要让立即购买 走 购物车的逻辑 参与活动,如果有zh_act就强制组合购购买,要计算一下组合购的总数量 --
  2021 + if(th.data.zh_act && (!th.data.zh_act.zh_num || th.data.zh_act.zh_buy_num<th.data.zh_act.zh_num )
  2022 + && th.data.zh_act.zhbuyqty <= th.data.goodsInputNum){
  2023 + wx.hideLoading();
  2024 +
  2025 + if((th.data.zh_act.buy_limit !=0 && th.data.zh_act.buy_limit <= th.data.userbuynum)){
  2026 + wx.showModal({
  2027 + title: '提示',
  2028 + // content: `商品${str},组合购活动,购买次数已超,将以普通商品购买?`,
  2029 + content: `${th.data.data.goods_name}超出组合购限购次数,将以普通商品购买`,
  2030 + success:res=>{
  2031 + if (res.confirm) {
  2032 + console.log('用户点击确定')
  2033 + //----先看会员在购物车中是否加入了该商品,立即购买的-----
  2034 + getApp().request.get("/api/weshop/cart/page", {
  2035 + data: {
  2036 + store_id: os.stoid,
  2037 + user_id: oo.user_id,
  2038 + state: 1
  2039 + },
  2040 + success: function (res) {
  2041 + //-------如果购物车中有相关的数据---------
  2042 + if (res.data.code == 0 && res.data.data.total > 0) {
  2043 + for (let j in res.data.data.pageData) {
  2044 + let item_j = res.data.data.pageData[j];
  2045 + var url = '/api/weshop/cart/del/' + e.data.stoid + '/' + item_j.id;
  2046 + getApp().request.delete(url, {});
  2047 + }
  2048 + }
  2049 + e.state = 1;
  2050 + e.prom_type=0;
  2051 + e.prom_id=0
  2052 + getApp().request.post("/api/weshop/cart/save", {
  2053 + data: e,
  2054 + success: function (t) {
  2055 + th.closeSpecModal();
  2056 + getApp().goto("/packageE/pages/cart/cart2/cart2?state=1");
  2057 + }
  2058 + });
  2059 + }
  2060 + })
  2061 + } else if (res.cancel) {
  2062 +
  2063 + console.log('用户点击取消')
  2064 + }
  2065 + }
  2066 + })
  2067 + }else{
  2068 +
  2069 +
  2070 + //----先看会员在购物车中是否加入了该商品,立即购买的-----
  2071 + getApp().request.get("/api/weshop/cart/page", {
  2072 + data: {
  2073 + store_id: os.stoid,
  2074 + user_id: oo.user_id,
  2075 + state: 1
  2076 + },
  2077 + success: function (res) {
  2078 + //-------如果购物车中有相关的数据,先清理掉---------
  2079 + if (res.data.code == 0 && res.data.data.total > 0) {
  2080 + for (let j in res.data.data.pageData) {
  2081 + let item_j = res.data.data.pageData[j];
  2082 + var url = '/api/weshop/cart/del/' + os.stoid + '/' + item_j.id;
  2083 + getApp().request.delete(url, {});
  2084 + }
  2085 + }
  2086 +
  2087 + e.state = 1;
  2088 + e.prom_type=7;
  2089 + e.prom_id=th.data.zh_act.id;
  2090 + getApp().request.post("/api/weshop/cart/save", {
  2091 + data: e,
  2092 + success: function (t) {
  2093 + th.closeSpecModal();
  2094 + getApp().goto("/packageE/pages/cart/cart2/cart2?state=1");
  2095 + }
  2096 + });
  2097 +
  2098 + }
  2099 + })
  2100 + }
  2101 +
  2102 +
  2103 + return false
  2104 + }else{
  2105 + //----先看会员在购物车中是否加入了该商品,立即购买的-----
  2106 + getApp().request.get("/api/weshop/cart/page", {
  2107 + data: {
  2108 + store_id: os.stoid,
  2109 + user_id: oo.user_id,
  2110 + state: 1
  2111 + },
  2112 + success: function (res) {
  2113 + //-------如果购物车中有相关的数据---------
  2114 + if (res.data.code == 0 && res.data.data.total > 0) {
  2115 + for (let j in res.data.data.pageData) {
  2116 + let item_j = res.data.data.pageData[j];
  2117 + var url = '/api/weshop/cart/del/' + e.data.stoid + '/' + item_j.id;
  2118 + getApp().request.delete(url, {});
  2119 + }
  2120 + }
  2121 +
  2122 + }
  2123 + })
  2124 +
  2125 + }
  2126 +
2020 2127  
2021 2128 if(e.prom_type==10){
2022 2129 //----先看会员在购物车中是否加入了该商品,立即购买的-----
... ... @@ -2031,7 +2138,7 @@ Page({
2031 2138 if (res.data.code == 0 && res.data.data.total > 0) {
2032 2139 for (let j in res.data.data.pageData) {
2033 2140 let item_j = res.data.data.pageData[j];
2034   - var url = '/api/weshop/cart/del/' + e.data.stoid + '/' + item_j.id;
  2141 + var url = '/api/weshop/cart/del/' + os.stoid + '/' + item_j.id;
2035 2142 getApp().request.delete(url, {});
2036 2143 }
2037 2144 }
... ... @@ -4514,15 +4621,9 @@ Page({
4514 4621 newd['is_normal'] = th.data.is_normal;
4515 4622  
4516 4623 if (newd['is_normal']) {
4517   - newd['is_pd_normal'] = 1;
4518   - //判断一下有没有全局优惠活动
4519   - th.check_nor_promgood(newd.goods_id, function (e) {
4520   - if (e && e.act_id) {
4521   - newd['prom_type'] = e.prom_type;
4522   - newd['prom_id'] = e.act_id;
4523   - }
  4624 + newd['is_pd_normal'] = 1;
  4625 + //判断一下有没有全局优惠活动
4524 4626 th.buyNow(newd);
4525   - });
4526 4627 }
4527 4628 else {
4528 4629 // 点击立即参团
... ... @@ -6106,52 +6207,139 @@ Page({
6106 6207 },
6107 6208  
6108 6209 //---检查有没有优惠活动---
6109   - check_is_youhui: function (gid, is_nor) {
  6210 + check_is_youhui:async function (gid, is_nor) {
6110 6211 var th = this;
6111   - //如果是普通购买的时候,要进行调用
6112   - if (is_nor) {
6113   - getApp().request.get("/api/weshop/goods/getGoodsPromNormal/" + os.stoid + "/" + gid, {
6114   - success: function (res) {
6115   - if (res.data.code == 0) {
6116   - var r_data = res.data.data;
6117   - th.setData({
6118   - prom_goods: r_data.promGoodsLists,
  6212 + var user_id = getApp().globalData.user_id;
  6213 + if (!user_id) user_id = 0;
  6214 +
  6215 + //普通购买的时候,重新算一下组合购有没有
  6216 + if(is_nor){
  6217 + var arr3=null;
  6218 + var url = '/api/weshop/activitylist/listGoodActInfo2New';
  6219 + var req_d = {
  6220 + "store_id": os.stoid,
  6221 + "goods_id": this.data.gid,
  6222 + "user_id": user_id,
  6223 + }
  6224 + await getApp().request.promiseGet(url, {
  6225 + data: req_d,
  6226 + }).then(e=>{
  6227 + if (e.data.code == 0 && e.data.data && e.data.data.length > 0) {
  6228 + var arr = e.data.data;
  6229 + if(arr.length){
  6230 + arr3 = arr.filter(function (e) {
  6231 + return e.s_time < ut.gettimestamp() && e.prom_type==7;
6119 6232 })
6120   - th.is_show_more_buy();
6121 6233 }
6122   - },
  6234 + }
6123 6235 })
6124 6236  
6125   - } else {
6126   - //调用接口判断订单优惠,
6127   - getApp().request.get("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + gid + "/0", {
6128   - success: function (res) {
6129   - console.log(res);
6130   - if (res.data.code == 0) {
6131   - var r_data = res.data.data;
6132   - var max = 0, min = 0;
6133   - if (r_data.collocationList) {
6134   - for (var i in r_data.collocationList) {
6135   - if (max == 0) max = r_data.collocationList[i].price;
6136   - if (min == 0) min = r_data.collocationList[i].price;
6137   -
6138   - if (max < parseFloat(r_data.collocationList[i].price)) max = r_data.collocationList[i].price;
6139   - if (min > parseFloat(r_data.collocationList[i].price)) min = r_data.collocationList[i].price;
6140   - }
6141   - r_data.collocationPromList.max = (max + th.data.data.shop_price).toFixed(2);
6142   - r_data.collocationPromList.min = (min + th.data.data.shop_price).toFixed(2);
  6237 + if(arr3 && arr3.length>0){
  6238 + //获取活动信息
  6239 + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" +arr3[0].act_id + "/" + getApp().globalData.user_id;
  6240 + await getApp().request.promiseGet(url, {
  6241 +
  6242 + }).then(e=>{
  6243 + if (e.data.code == 0 && e.data.data) {
  6244 + if (ut.gettimestamp() < e.data.data.start_time) {
  6245 + return false;
  6246 + }
  6247 +
  6248 + //判断组合购总数够不够
  6249 + var is_has_zh_num=(!e.data.data.zh_num || e.data.data.zh_buy_num<e.data.data.zh_num );
  6250 +
  6251 + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time && is_has_zh_num) {
  6252 + //-- 获取商品列表 --
  6253 + th.data.zh_act=e.data.data;
  6254 + th.getUserBuyPromNum(e.data.data.id)
6143 6255 }
6144   - th.setData({
6145   - order_prom: r_data.promOrder,
6146   - collocationGoods: r_data.collocationPromList,
6147   - prom_goods: r_data.promGoodsLists,
6148   - })
6149   - th.is_show_more_buy();
6150 6256 }
  6257 + })
  6258 + }
  6259 + }
  6260 +
  6261 +
  6262 + //调用接口判断订单优惠,
  6263 + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromListNew1/" + os.stoid + "/" + gid + "/0" + "/" + user_id, {
  6264 + }).then(async res=>{
  6265 + if (res.data.code == 0 && res.data.data) {
  6266 + var r_data = res.data.data;
  6267 + var max = 0, min = 0;
  6268 + //暂时积分够 不和 优惠,阶梯重叠
  6269 + if(th.data.zh_act){
  6270 + r_data.collocationList=null;
  6271 + r_data.ladderLists=null;
  6272 + r_data.promGoodsLists=null;
6151 6273 }
6152 6274  
6153   - })
6154   - }
  6275 + if (r_data.collocationList) {
  6276 + for (var i in r_data.collocationList) {
  6277 + if (max == 0) max = r_data.collocationList[i].price;
  6278 + if (min == 0) min = r_data.collocationList[i].price;
  6279 +
  6280 + if (max < parseFloat(r_data.collocationList[i].price)) max = r_data.collocationList[i].price;
  6281 + if (min > parseFloat(r_data.collocationList[i].price)) min = r_data.collocationList[i].price;
  6282 + }
  6283 + r_data.collocationPromList.max = (max + th.data.data.shop_price).toFixed(2);
  6284 + r_data.collocationPromList.min = (min + th.data.data.shop_price).toFixed(2);
  6285 +
  6286 + //如果有搭配促销先不和 阶梯促销和优惠测序重合,做到后台可以重合
  6287 + r_data.ladderLists=null;
  6288 + r_data.promGoodsLists=null;
  6289 + }
  6290 +
  6291 +
  6292 + if (r_data.ladderLists) {
  6293 + var act_id = r_data.ladderLists[0].form_id;
  6294 + //-- 判断会员能不能参与阶梯促销 --
  6295 + await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => {
  6296 + if (res.data.code == 0 && res.data.data) {
  6297 + var prom_content = "";
  6298 +
  6299 + //暂定优惠促销还不能重叠
  6300 + if(res.data.data.good_object==0 && (r_data.promGoodsLists || th.data.zh_act)){
  6301 + return false;
  6302 + }
  6303 +
  6304 + if(res.data.data.good_object==1){
  6305 + r_data.promGoodsLists=null;
  6306 + }
  6307 +
  6308 + for (let jj in r_data.ladderLists) {
  6309 + if (r_data.ladderLists[jj].discount == 10) {
  6310 + prom_content += "第" + (parseInt(jj) + 1) + "件原价,";
  6311 + } else {
  6312 + prom_content += "第" + (parseInt(jj) + 1) + "件" + r_data.ladderLists[jj].discount + "折,";
  6313 + }
  6314 + }
  6315 + prom_content = ut.sub_last(prom_content);
  6316 + th.data.prom_type = 10;
  6317 + th.data.prom_id = act_id;
  6318 + th.setData({
  6319 + jieti_prom: prom_content,
  6320 + ladder_act_id: act_id
  6321 + })
  6322 + }
  6323 + })
  6324 + }
  6325 +
  6326 +
  6327 + //普通购买不在界面显示
  6328 + if(is_nor){
  6329 + th.data.collocationGoods=r_data.collocationPromList;
  6330 + th.data.prom_goods=r_data.promGoodsLists;
  6331 + }else{
  6332 + th.setData({
  6333 + order_prom: r_data.promOrder,
  6334 + collocationGoods: r_data.collocationPromList,
  6335 + prom_goods: r_data.promGoodsLists,
  6336 + })
  6337 + }
  6338 + th.is_show_more_buy();
  6339 + }
  6340 + })
  6341 +
  6342 +
6155 6343  
6156 6344  
6157 6345 },
... ... @@ -6399,25 +6587,81 @@ Page({
6399 6587  
6400 6588 //积分购和拼团的普通购买的的时候,要判断有没有全场优惠活动
6401 6589 check_nor_promgood(goods_id, back) {
6402   - getApp().request.get("/api/weshop/goods/getGoodsPromNormal/" + os.stoid + "/" + goods_id, {
6403   - success: function (res) {
  6590 + var th=this;
  6591 + var user_id=getApp().globalData.user_id;
  6592 + //调用接口判断订单优惠,
  6593 + getApp().request.get("/api/weshop/goods/getGoodsPromListNew1/" + os.stoid + "/" + goods_id + "/0" + "/" + user_id, {
  6594 + success: async function (res) {
6404 6595 if (res.data.code == 0 && res.data.data) {
  6596 +
6405 6597 var obj = {};
6406   - if(res.data.data.promGoodsLists && res.data.data.promGoodsLists.length > 0){
  6598 + var r_data = res.data.data;
  6599 + //暂时积分够 不和 优惠,阶梯重叠
  6600 + if(th.data.zh_act){
6407 6601 obj = {
6408   - act_id: res.data.data.promGoodsLists[0].prom_id,
6409   - prom_type:3
  6602 + act_id: th.data.zh_act.id,
  6603 + prom_type:7
6410 6604 }
6411   - }else if(res.data.data.ladderLists){
  6605 + back(obj);
  6606 + return false;
  6607 + }
  6608 +
  6609 + if (r_data.collocationList) {
  6610 + obj = {
  6611 + act_id: r_data.collocationList[0].prom_id,
  6612 + prom_type:5
  6613 + }
  6614 + obj.is_coupon=r_data.collocationPromList.is_coupon;
  6615 + back(obj);
  6616 + return false;
  6617 + }
  6618 +
  6619 +
  6620 + var is_ok=1;
  6621 + if (r_data.ladderLists) {
  6622 + var act_id = r_data.ladderLists[0].form_id;
  6623 + //-- 判断会员能不能参与阶梯促销 --
  6624 + await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => {
  6625 +
  6626 +
  6627 + if (res.data.code == 0 && res.data.data) {
  6628 + var prom_content = "";
  6629 + //暂定优惠促销还不能重叠
  6630 + if(res.data.data.good_object==0 && (r_data.promGoodsLists || th.data.zh_act)){
  6631 + return false;
  6632 + }
  6633 +
  6634 + if(res.data.data.good_object==1){
  6635 + r_data.promGoodsLists=null;
  6636 + }
  6637 + obj = {
  6638 + act_id: act_id,
  6639 + prom_type:10
  6640 + }
  6641 + back(obj);
  6642 + is_ok=0
  6643 + return false;
  6644 + }
  6645 + })
  6646 + }
  6647 +
  6648 + if(!is_ok) return false;
  6649 + if(r_data.promGoodsLists){
6412 6650 obj = {
6413   - act_id: res.data.data.ladderLists[0].form_id,
6414   - prom_type:10
  6651 + act_id: r_data.promGoodsLists[0].prom_id,
  6652 + prom_type:3
6415 6653 }
  6654 + back(obj);
  6655 + return false;
6416 6656 }
6417 6657  
  6658 + obj = {
  6659 + act_id: 0,
  6660 + prom_type:0
  6661 + }
6418 6662 back(obj);
6419   - } else {
6420   - back(0)
  6663 +
  6664 +
6421 6665 }
6422 6666 }
6423 6667 })
... ... @@ -6788,5 +7032,22 @@ Page({
6788 7032 },
6789 7033  
6790 7034  
  7035 + async getUserBuyPromNum(prom_id){
  7036 + var userInfo = getApp().globalData.userInfo;
  7037 + var url = `/api/weshop/ordergoods/getUserBuyPromNum?store_id=${os.stoid}&user_id=${userInfo.user_id}&prom_type=7&prom_id=${prom_id}`;
  7038 + let res = await getApp().request.promiseGet(url, {
  7039 + data:{}
  7040 + });
  7041 + let userbuynum=0
  7042 + if(res.data.code==0 && res.data.data){
  7043 + userbuynum=res.data.data.userbuynum
  7044 + }
  7045 + this.setData({
  7046 + userbuynum
  7047 + })
  7048 + // return userbuynum
  7049 + },
  7050 +
  7051 +
6791 7052  
6792 7053 });
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
... ... @@ -530,9 +530,6 @@
530 530 </view>
531 531 </block> -->
532 532 <!-- 判断是不是有秒杀 -->
533   -
534   -
535   -
536 533  
537 534 <!-- <view class="bz_view flex bdt16" wx:if="{{bconfig}}">
538 535 <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image>
... ... @@ -545,30 +542,8 @@
545 542 <!-- <text class="iconfont icon-shuangjiantouxia c-db"></text> -->
546 543 <!-- </view>
547 544 </view> -->
548   - <!-- - 搭配促销 -- -->
549   - <view class="dp_cx_view" wx:if="{{collocationGoods}}">
550   - <view class="bb_view">
551   - <view>优惠热配</view>
552   - <view class="red_bb" bindtap="go_prom_list">
553   - 查看全部
554   - <text class="bg_jj"></text>
555   - </view>
556   - </view>
557   - <!-- 搭配的显示 -->
558   - <view class="flex" bindtap="go_prom_list">
559   - <image class="dp_img" src="{{iurl+collocationGoods.img_url}}"></image>
560   - <view class="act_content">
561   - <view class="fs32">{{collocationGoods.title}}</view>
562   - <view class="fs30 color_b" wx:if="{{collocationGoods.max!=collocationGoods.min}}">
563   - 搭配价¥{{collocationGoods.min}}-{{collocationGoods.max}}
564   - </view>
565   - <view class="fs30 color_b" wx:else>搭配价¥{{collocationGoods.min}}</view>
566   - <view class="fs30 color-gray">
567   - 活动至{{filters.format_time(collocationGoods.end_time,1)}}
568   - </view>
569   - </view>
570   - </view>
571   - </view>
  545 +
  546 +
572 547 <!-- - 宝贝评价 -- -->
573 548 <view class="bdt16">
574 549 <view class="bb_view">
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js 0 → 100644
  1 +var i = require("../../../../../utils/util.js");
  2 +var com = require("../public/buy_com.js");
  3 +var e = getApp(),
  4 + a = e.globalData.setting,
  5 + os = a,
  6 + t = e.request,
  7 + d = e.globalData;
  8 +Page({
  9 + data: {
  10 + url: a.url, //接口网址
  11 + iurl: a.imghost, //图片前缀网址
  12 + getStorageID: '',
  13 + getUserID: '',
  14 + wareCard: [],
  15 + // page: 0,
  16 + // pageSize: 10,
  17 + isEmpty: false,
  18 + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
  19 + contentText: {
  20 + contentdown: '加载更多',
  21 + contentrefresh: '加载中...',
  22 + contentnomore: '已加载全部'
  23 + },
  24 + ismore: 0, //数据是否全部加载完成
  25 + is_read: 0, //是否查询过我的礼包接口
  26 + curpage: 1, //当前分页数
  27 + pageSize: 10, //页大小
  28 + total: 0, //总数量
  29 + ad_data: null,
  30 + first_leader: e.globalData.first_leader || 0, // 推荐人ID
  31 +
  32 + //门店相关
  33 + ismend: 0,
  34 + is_sec_mend: 0,
  35 + sto_sele_name: "", //选中的门店名称
  36 + sto_sele_id: "", //选中的门店id
  37 + sto_sele_distr: "", //选择的门店的配送方式
  38 + is_show_sto_cat: 1, //是否显示门店分类
  39 + only_pk: null,
  40 + all_sto: null,
  41 + sec_sto: null, //选择了的门店分类
  42 + pickpu_list: null, //读出的所有门店list
  43 + def_pickpu_list: null, //一开始5个门店list
  44 + sec_pick_index: 0, //第二级门店选择ID
  45 + fir_pick_index: 0, //第一级门店选择ID
  46 + all_pick_list: null,//所有的门店先记录起来
  47 +
  48 + select_store: 0, //选择更多
  49 + index: 1,
  50 + more_store: 0, //选择门店
  51 + sort_store: 0, //门店分类
  52 + choice_sort_store: 0, //选择分类门店
  53 + new_user: 0, //新用户
  54 +
  55 + def_pick_store: null, // 默认的门店
  56 + fir_def_store: null, //客户默认的门店的
  57 + lat: null, //维度
  58 + lon: null, //经度
  59 +
  60 + is_get_local_ok: 0, //获取坐标是否完成
  61 + region_name: "门店分类", //区域的名字
  62 + is_gps: 1,
  63 + open_ind_store: 0, //哪里打开的门店列表的控制属性
  64 + default_store: {}, //创建添加默认门店地址的对象
  65 +
  66 + store:0,
  67 + openSpecModal:0,
  68 +
  69 + is_get_guide:0,
  70 +
  71 + },
  72 + onLoad: function (options) {
  73 + var th=this;
  74 +
  75 + this.setData({
  76 + params: options,
  77 + now:Date.parse(new Date()) / 1000,
  78 + })
  79 +
  80 + getApp().getConfig2(function (e) {
  81 + var json_d = JSON.parse(e.switch_list);
  82 + th.setData({
  83 + bconfig: e,
  84 + sys_switch:json_d
  85 + });
  86 + })
  87 +
  88 + },
  89 + init() {
  90 + var th = this;
  91 + let options = this.data?.params;
  92 + this.setData({
  93 + getStorageID: a.stoid,
  94 + getUserID: d.user_id
  95 + });
  96 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  97 + my_confirm.open_cancel(0);
  98 + //-- 获取分享人的ID --
  99 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  100 + if (first_leader) {
  101 +
  102 + this.data.is_get_guide=1;
  103 + this.setData({
  104 + first_leader,
  105 + })
  106 + //-- user_id代过来免登录 --
  107 + getApp().globalData.first_leader = first_leader;
  108 + //调用接口判断是不是会员
  109 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  110 + if (res.data.code == 0) {
  111 + getApp().globalData.guide_id = res.data.data.id;
  112 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  113 + }
  114 +
  115 + com.wait_for_store_config(th);
  116 + com.set_user_mo_store(th,os);
  117 +
  118 + })
  119 + }
  120 +
  121 + getApp().request.promiseGet("/api/weshop/ad/page?pid=1208&store_id=" + os.stoid, {
  122 + data: {
  123 + enabled: 1
  124 + }
  125 + }).then(res => {
  126 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  127 + var a = res.data.data.pageData;
  128 + var tt = {
  129 + 'ad_code': os.imghost + a[0].ad_code,
  130 + 'media_link': '',
  131 + 'ad_weapplink': a[0].ad_weapplink,
  132 + 'bgcolor': a[0].bgcolor,
  133 + };
  134 + th.setData({
  135 + ad_data: tt
  136 + });
  137 + }
  138 + })
  139 + this.getList();
  140 + },
  141 + onShow: function () {
  142 + getApp().check_can_share();
  143 + var th=this;
  144 + //--先判断会员状态--
  145 + getApp().is_Single_page(this, function () {
  146 + var user_info = getApp().globalData.userInfo;
  147 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  148 + getApp().goto('/packageE/pages/togoin/togoin');
  149 + return false;
  150 + }
  151 +
  152 + if(!th.data.is_get_guide) {
  153 + com.wait_for_store_config(th);
  154 + com.set_user_mo_store(th, os);
  155 + }
  156 + th.data.is_get_guide=0;
  157 +
  158 + })
  159 + this.init();
  160 + },
  161 +
  162 + //购买礼包
  163 + GetBuyPrice: function (e) {
  164 +
  165 + var th = this;
  166 + var index = e.currentTarget.dataset.index; //活动id
  167 + var sele_g=th.data.wareCard[index];
  168 + this.data.payMoney=sele_g.payMoney;
  169 +
  170 + th.setData({sele_g:sele_g,buyType:2,})
  171 + if(sele_g.is_pickup){
  172 + if(sele_g.pickup_list && th.data.def_pick_store){
  173 + com.check_def_pk(th);
  174 + }
  175 + com.get_sto(th,os)
  176 + th.setData({
  177 + openSpecModal:1
  178 + })
  179 + }else{
  180 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  181 + my_confirm.open(
  182 + "是否确定购买该礼包",
  183 + "取消",
  184 + "确定",
  185 + function () {
  186 + my_confirm.open_cancel(0);
  187 + },
  188 + function () {
  189 + my_confirm.open_cancel(0);
  190 + com.buy_libao(th)
  191 + }
  192 +
  193 + )
  194 + }
  195 +
  196 +
  197 +
  198 +
  199 +
  200 + },
  201 + // 积分兑换
  202 + GetBuyIntegral: function (e) {
  203 + var th = this;
  204 + var index = e.currentTarget.dataset.index; //活动id
  205 + var sele_g=th.data.wareCard[index];
  206 + th.setData({sele_g:sele_g, buyType:1,})
  207 + if(sele_g.is_pickup){
  208 + if(sele_g.pickup_list && th.data.def_pick_store){
  209 + com.check_def_pk(th);
  210 + }
  211 + com.get_sto(th,os)
  212 + th.setData({
  213 + openSpecModal:1
  214 + })
  215 + }else {
  216 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  217 + my_confirm.open(
  218 + "是否确定兑换该礼包",
  219 + "取消",
  220 + "确定",
  221 + function () {
  222 + my_confirm.open_cancel(0);
  223 + },
  224 + function () {
  225 + my_confirm.open_cancel(0);
  226 + com.buy_libao(th)
  227 + })
  228 + }
  229 +
  230 + },
  231 + //免费领取
  232 + GetFree: function (e) {
  233 +
  234 + var th = this;
  235 + var index = e.currentTarget.dataset.index; //活动id
  236 + var sele_g=th.data.wareCard[index];
  237 + th.setData({sele_g:sele_g, buyType:3,})
  238 +
  239 + if(sele_g.is_pickup){
  240 + if(sele_g.pickup_list && th.data.def_pick_store){
  241 + com.check_def_pk(th);
  242 + }
  243 + com.get_sto(th,os)
  244 + th.setData({
  245 + openSpecModal:1
  246 + })
  247 + }else {
  248 +
  249 +
  250 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  251 + my_confirm.open(
  252 + "是否确定领取该礼包",
  253 + "取消",
  254 + "确定",
  255 + function () {
  256 + my_confirm.open_cancel(0);
  257 + },
  258 + function () {
  259 + my_confirm.open_cancel(0);
  260 + com.buy_libao(th)
  261 + })
  262 + }
  263 + },
  264 +
  265 + getList: function (e) {
  266 + var th = this;
  267 + getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', {
  268 + isShowLoading: true,
  269 + data: {
  270 + store_id: th.data.getStorageID, //商家ID
  271 + user_id: th.data.getUserID, //用户ID
  272 + page: th.data.curpage,
  273 + pageSize: th.data.pageSize,
  274 + is_end:0,
  275 + timetype:1
  276 + },
  277 + success: function (res) {
  278 + if (res.data.code == 0) {
  279 + th.data.curpage++;
  280 + var arr1 = th.data.wareCard;
  281 + var arr2 = res.data.data.pageData;
  282 + for (let j = 0; j < arr2.length; j++) {
  283 + // arr2[j].starTime1=Date.parse(new Date(arr2[j].begindate.replace(/-/g, "/")))/1000
  284 + arr2[j].starTime1=arr2[j].begindate
  285 + arr2[j].starTime=i.formatTime(arr2[j].begindate, "yyyy-MM-dd hh:mm:ss");
  286 + arr2[j].endTime=i.formatTime(arr2[j].enddate, "yyyy-MM-dd hh:mm:ss");
  287 + arr2[j].giftPosPrice=arr2[j].oldPrice
  288 + arr2[j].payMoney=arr2[j].lbPrice
  289 + arr2[j].payIntegral=arr2[j].exchangeIntegral
  290 + arr2[j].giftQty=arr2[j].buynum
  291 + arr2[j].cover_img=arr2[j].imageurl
  292 + arr2[j].giftTitle=arr2[j].act_name
  293 + arr2[j].virtualsales=arr2[j].virtualSales
  294 + arr2[j].lbnum=arr2[j].lbNum
  295 + }
  296 +
  297 + var arr3 = [...arr1, ...arr2];
  298 + var ismore = 0;
  299 + if (arr3.length == res.data.data.total) ismore = 1
  300 + th.setData({
  301 + wareCard: arr3,
  302 + total: res.data.data.total,
  303 + ismore: ismore,
  304 + is_read: 1,
  305 + is_get:1
  306 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  307 + } else {
  308 + th.setData({
  309 + is_read: 1,
  310 + ismore: 1,
  311 + is_get:1
  312 + })
  313 + }
  314 + }
  315 + })
  316 +
  317 + },
  318 + //销毁界面跳转
  319 + redirectTo: function (e) {
  320 + var th = this;
  321 + var url = e.currentTarget.dataset.url;
  322 + //销毁跳转
  323 + wx.redirectTo({
  324 + url: url
  325 + });
  326 + },
  327 + //不销毁界面跳转
  328 + navigateTo: function (e) {
  329 +
  330 + var th = this;
  331 + var url = e.currentTarget.dataset.url;
  332 + var index=e.currentTarget.dataset.index
  333 + console.log(url);
  334 + wx.setStorageSync('monthgiftba_defpick', th.data.def_pick_store)
  335 + wx.setStorageSync('monthgiftbag', th.data.wareCard[index])
  336 + getApp().goto(url);
  337 +
  338 + },
  339 + //下拉事件
  340 + onReachBottom: function () {
  341 + var th = this;
  342 + if (th.data.total <= th.data.pageSize) return;
  343 + if (th.data.ismore) return;
  344 +
  345 + th.getList();
  346 + },
  347 + //图片失败,默认图片
  348 + bind_bnerr2: function (e) {
  349 + var _errImg = e.target.dataset.errorimg;
  350 + var _errObj = {};
  351 + _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
  352 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  353 + },
  354 + goto: function (e) {
  355 + var th = this;
  356 + var url = e.currentTarget.dataset.url;
  357 + getApp().goto(url);
  358 + },
  359 +
  360 + onShareAppMessage: function (e) {
  361 + getApp().globalData.no_clear=1;
  362 + var curPage = this;
  363 + var pagePath = curPage.route; //当前页面url
  364 + if (pagePath.indexOf('/') != 0) {
  365 + pagePath = '/' + pagePath;
  366 + }
  367 + pagePath += "?first_leader=" + this.data.getUserID;
  368 + return {
  369 + title: "专享礼包",
  370 + path: pagePath,
  371 + }
  372 + },
  373 +
  374 + // 分享朋友圈
  375 + onShareTimeline() {
  376 + getApp().globalData.no_clear=1;
  377 +
  378 + var user_id=getApp().globalData.user_id;
  379 + if(!user_id) user_id=0;
  380 +
  381 + return {
  382 + title: '专享礼包',
  383 + imageUrl: this.data.ad_data.ad_code,
  384 + query: 'first_leader='+user_id
  385 + }
  386 + },
  387 +
  388 +
  389 +
  390 + //--- 设置一下默认库存的数量 ----
  391 + set_def_storage(ee) {
  392 + var that = this, th = this;
  393 + that.data.fir_def_store = ee;
  394 + that.setData({
  395 + def_pick_store: ee,
  396 + sto_sele_name: ee.pickup_name,
  397 + sto_sele_id: ee.pickup_id,
  398 + sto_sele_distr: ee.distr_type
  399 + })
  400 + },
  401 + // 选择门店
  402 + choice_store: function (ee) {
  403 + //--先判断会员状态--
  404 + var user_info = getApp().globalData.userInfo;
  405 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  406 + wx.navigateTo({
  407 + url: '/packageE/pages/togoin/togoin',
  408 + })
  409 + return false;
  410 + }
  411 +
  412 + var th = this;
  413 + var ind = ee.currentTarget.dataset.ind;
  414 + var bconfig = th.data.bconfig;
  415 +
  416 + //如果开启了,则不在选择门店
  417 + if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){
  418 + return false;
  419 + }
  420 +
  421 + if (!th.data.only_pk && !th.data.def_pickpu_list) {
  422 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  423 + return false;
  424 + }
  425 +
  426 + if (th.data.only_pk && !th.data.only_pk.length) {
  427 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  428 + return false;
  429 + }
  430 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  431 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  432 + return false;
  433 + }
  434 +
  435 +
  436 + if (bconfig && bconfig.is_sort_storage) {
  437 + wx.getLocation({
  438 + type: 'gcj02',
  439 + success: function (res) {
  440 +
  441 + th.data.lat = res.latitude;
  442 + th.data.lon = res.longitude;
  443 + th.data.is_get_local_ok = 1;
  444 + th.setData({
  445 + is_gps: 1
  446 + });
  447 + //th.onShow();
  448 + com.get_sto(th,os);
  449 + },
  450 + fail: function (res) {
  451 + //th.onShow();
  452 + th.data.is_get_local_ok = 1;
  453 + com.get_sto(th,os);
  454 + if (res.errCode == 2) {
  455 + th.setData({
  456 + is_gps: 0
  457 + });
  458 + if (th.data.is_gps == 0) {
  459 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  460 + }
  461 + } else {
  462 + th.setData({
  463 + is_gps: "3"
  464 + });
  465 + }
  466 +
  467 + }
  468 + })
  469 + } else {
  470 + th.data.is_get_local_ok = 1;
  471 + com.get_sto(th,os);
  472 + }
  473 +
  474 + if (ind != undefined && ind != null) {
  475 + this.setData({
  476 + open_ind_store: ind,
  477 + store: 1,
  478 + openSpecModal: !1,
  479 + openSpecModal_pt: !1,
  480 + openSpecModal_flash_normal: !1,
  481 + })
  482 + } else {
  483 + this.setData({
  484 + store: 1,
  485 + openSpecModal: !1,
  486 + openSpecModal_pt: !1,
  487 + openSpecModal_flash_normal: !1
  488 +
  489 + })
  490 + }
  491 + },
  492 + //关闭选择门店
  493 + close_popup: function (e) {
  494 + var th = this;
  495 + this.setData({
  496 + store: 0,
  497 + choice_sort_store: 0,
  498 + sort_store: 0,
  499 + fir_pick_index: 0,
  500 + sec_pick_index: 0
  501 + })
  502 +
  503 + var openindstore = this.data.open_ind_store;
  504 + if (openindstore == 1) {
  505 + th.setData({
  506 + openSpecModal: !0,
  507 + openSpecModal_ind: openindstore,
  508 + });
  509 + } else if (openindstore == 2) {
  510 + th.setData({
  511 + openSpecModal: !0,
  512 + openSpecModal_ind: openindstore,
  513 + });
  514 + }
  515 + else if (openindstore == 4) { //4就是拼团
  516 + th.setData({
  517 + openSpecModal_pt: 1, //打开拼团购买界面
  518 + store: 0, //关闭门店
  519 + choice_sort_store: 0, //关闭门店2级
  520 + sort_store: 0, //关闭门店2级
  521 + });
  522 + }
  523 + else {
  524 + th.setData({
  525 + store: 0,
  526 + choice_sort_store: 0,
  527 + sort_store: 0
  528 + })
  529 + }
  530 +
  531 +
  532 + },
  533 +
  534 + //选择更多门店
  535 + more_store: function () {
  536 + this.setData({
  537 + sort_store: 1
  538 + });
  539 + },
  540 + // 返回按钮
  541 + returns: function () {
  542 + this.setData({
  543 + sort_store: 0,
  544 + choice_sort_store: 0
  545 + });
  546 + },
  547 + //---选择分类门店---
  548 + choice_sort_store: function (e) {
  549 + var index = e.currentTarget.dataset.index;
  550 + var region_name = e.currentTarget.dataset.region;
  551 + var item = this.data.all_sto[index];
  552 + this.setData({
  553 + region_name: region_name,
  554 + sort_store: 0,
  555 + choice_sort_store: 1,
  556 + sec_sto: item,
  557 + sec_pick_index: 0
  558 + });
  559 + },
  560 +
  561 + choose_for_store_fir: function (e) {
  562 + var index_c = e.currentTarget.dataset.ind;
  563 + var th = this;
  564 + th.setData({
  565 + fir_pick_index: index_c
  566 + })
  567 +
  568 + },
  569 +
  570 + //确定def_pick为选择的门店
  571 + sure_pick: function (e) {
  572 + var th = this;
  573 + var item = null;
  574 + var openindstore = th.data.open_ind_store;
  575 +
  576 + if (th.data.choice_sort_store == 0) {
  577 + var index = th.data.fir_pick_index;
  578 + if (th.data.is_show_sto_cat == 1) {
  579 + item = th.data.def_pickpu_list[index];
  580 + } else {
  581 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  582 + }
  583 +
  584 + } else {
  585 + var index = th.data.sec_pick_index;
  586 + item = th.data.sec_sto.s_arr[index];
  587 + }
  588 +
  589 + if(!item) return false;
  590 +
  591 + if (!th.data.sele_g) return false;
  592 +
  593 + th.setData({
  594 + def_pick_store: item,
  595 + sto_sele_name: item.pickup_name,
  596 + sto_sele_id: item.pickup_id,
  597 + sto_sele_distr: item.distr_type,
  598 + store: 0,
  599 + choice_sort_store: 0,
  600 + fir_pick_index: 0,
  601 + openSpecModal: !0,
  602 + });
  603 +
  604 +
  605 + },
  606 + //---点击二级之后的选择---
  607 + choose_for_store: function (e) {
  608 + var index_c = e.currentTarget.dataset.ind;
  609 + var th = this;
  610 + th.setData({
  611 + sec_pick_index: index_c,
  612 + fir_pick_index: index_c
  613 + })
  614 +
  615 + },
  616 + //把选择的门店设置成默认的门店def_pick
  617 + set_def_pick: function (e) {
  618 + var th = this;
  619 + var item = null;
  620 + if (th.data.choice_sort_store == 0) {
  621 + var index = th.data.fir_pick_index;
  622 + if (th.data.is_show_sto_cat == 1) {
  623 + item = th.data.def_pickpu_list[index];
  624 + } else {
  625 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  626 + }
  627 + } else {
  628 + var index = th.data.sec_pick_index;
  629 + item = th.data.sec_sto.s_arr[index];
  630 + }
  631 +
  632 + if(!item) return false;
  633 +
  634 + th.setData({
  635 + def_pick_store: item,
  636 + sto_sele_name: item.pickup_name,
  637 + sto_sele_id: item.pickup_id,
  638 + sto_sele_distr: item.distr_type,
  639 + store: 0,
  640 + choice_sort_store: 0,
  641 + openSpecModal: !0,
  642 + });
  643 +
  644 + var user_id=getApp().globalData.user_id;
  645 + var def_pickup_id = item.pickup_id;
  646 + getApp().request.put('/api/weshop/users/update', {
  647 + data: {
  648 + user_id: user_id,
  649 + def_pickup_id: def_pickup_id
  650 + },
  651 + success: function (res) {
  652 + if (res.data.code == 0) {
  653 + if (th.data.choice_sort_store == 0) th.setData({
  654 + fir_pick_index: 0
  655 + });
  656 + getApp().globalData.pk_store = item;
  657 + } else {
  658 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  659 + }
  660 +
  661 + }
  662 + });
  663 +
  664 +
  665 +
  666 + },
  667 + closeSpecModal: function () {
  668 + this.setData({openSpecModal: 0});
  669 + },
  670 +
  671 + buy_libao:function () {
  672 + com.buy_libao(this)
  673 + }
  674 +})
0 675 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "礼包列表",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml 0 → 100644
  1 +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;">
  2 + <block wx:if="{{ad_data}}">
  3 + <view class="top_img">
  4 + <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  5 + </view>
  6 + </block>
  7 + <block wx:else>
  8 + <view class="top_img">
  9 + <image src="{{iurl+'/miniapp/images/monthgiftbagtop.png?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  10 + </view>
  11 + </block>
  12 +
  13 +
  14 + <view class="top_title">
  15 + <view class="top_title_box">
  16 + <text class="top_title_redtext">礼包列表</text>
  17 + </view>
  18 + <view class="top_title_box_S"></view>
  19 + <view class="top_title_box">
  20 + <a class="top_title_blacktext" bindtap="redirectTo" data-url="/packageE/pages/user/monthgiftbag/monthgiftbag">我的礼包</a>
  21 + </view>
  22 + </view>
  23 + <!--<block wx:for="{{wareCard}}" wx:if="{{now > filter.gettimestamp(items.starTime) || (items.is_show && now > items.show_time)}}" wx:for-item="items" wx:for-index="index" wx:key="index">-->
  24 + <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index">
  25 + <view class="content_box">
  26 + <view class="content_box_ware" catchtap="navigateTo" data-index="{{index}}" data-url="/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id={{items.id}}&cover_img={{items.cover_img}}&orderSn=''">
  27 + <view class="content_box_img">
  28 + <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}" data-errorimg="wareCard[{{index}}].cover_img"></image>
  29 + <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else data-errorimg="wareCard[{{index}}].lbUrl"></image>
  30 + </view>
  31 + <view class="content_box_title">
  32 + <view class="content_ware_title">
  33 + <text>{{items.giftTitle}}</text>
  34 + </view>
  35 + <view class="content_ware_type flex">
  36 + <block wx:if="{{items.payMoney>0}}">
  37 + <text>{{"¥"+items.payMoney}}</text>
  38 + </block>
  39 + <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}">
  40 + <text>/</text>
  41 + </block>
  42 + <block wx:if="{{items.payIntegral>0}}">
  43 + <view class="flex">
  44 + <text class="ellipsis-1">{{items.payIntegral}}</text>
  45 + <view>积分</view>
  46 + </view>
  47 + </block>
  48 + </view>
  49 + <view class="content_ware_price no_line_c">
  50 + <text class="ellipsis-1">{{"零售价:¥"+items.giftPosPrice}}</text>
  51 + </view>
  52 + <block wx:if="{{items.is_show}}">
  53 + <view wx:if="{{ now < items.starTime1 }}" class="content_ware_time">
  54 + <text class="ellipsis-1">{{"活动开始时间:"+items.starTime}}</text>
  55 + </view>
  56 + <view wx:else class="content_ware_time">
  57 + <text class="ellipsis-1">{{"活动结束时间:"+items.endTime}}</text>
  58 + </view>
  59 + </block>
  60 + <view wx:else class="content_ware_time">
  61 + <text class="ellipsis-1">{{"活动结束时间:"+items.endTime}}</text>
  62 + </view>
  63 + </view>
  64 + </view>
  65 + <view class="content_box_button">
  66 + <view class="box_button_remark" >
  67 + <text wx:if="{{ items.starTime1 < now}}">{{"已售:"+(items.giftQty+items.virtualSales)+"件"}}</text>
  68 + </view>
  69 + <block wx:if="{{now > items.starTime1}}">
  70 + <view class="flex-vertical">
  71 + <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}">
  72 + <block wx:if="{{items.payMoney>0}}">
  73 + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
  74 + <button class="box_button_dui">立即购买</button>
  75 + </view>
  76 + </block>
  77 + <block wx:if="{{items.payIntegral>0}}">
  78 + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
  79 + <button class="box_button_dui box_button_buy">立即兑换</button>
  80 + </view>
  81 + </block>
  82 + </block>
  83 + <block wx:else>
  84 + <block wx:if="{{items.payMoney>0}}">
  85 + <view class="flex" bindtap="GetBuyPrice" data-index="{{index}}">
  86 + <button class="box_button_dui box_button_buy">立即购买</button>
  87 + </view>
  88 + </block>
  89 + <block wx:if="{{items.payIntegral>0}}">
  90 + <view class="flex" bindtap="GetBuyIntegral" data-index="{{index}}">
  91 + <button class="box_button_dui box_button_buy">立即兑换</button>
  92 + </view>
  93 + </block>
  94 + </block>
  95 + <block wx:if="{{!items.payMoney && !items.payIntegral}}">
  96 + <view class="flex" bindtap="GetFree" data-index="{{index}}">
  97 + <button class="box_button_dui box_button_buy">免费领取</button>
  98 + </view>
  99 + </block>
  100 + </view>
  101 + </block>
  102 + <block wx:else>
  103 + <view class="flex-vertical" style="color: #666;">
  104 + <button class="box_button_dui box_button_buy" style="background-color: #666;">活动还未开始</button>
  105 + </view>
  106 + </block>
  107 + </view>
  108 + </view>
  109 + </block>
  110 + <block wx:if="{{is_read && wareCard.length<1 && is_get}}">
  111 + <view class="foot_empty">
  112 + <view>
  113 + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>
  114 + </view>
  115 + <view>
  116 + <text>当前暂无礼包</text>
  117 + </view>
  118 + <view class="foot_empty_button">
  119 + <text bindtap="goto" data-url="/pages/index/index/index">回到首页</text>
  120 + </view>
  121 + </view>
  122 + </block>
  123 + <!-- 加载完毕并且数据大于=页大小 -->
  124 + <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}">
  125 + <view class="Line"></view>
  126 + <view class="end fs26">到底了</view>
  127 + <view class="Line"></view>
  128 + </view>
  129 +</view>
  130 +<!-- 引入提示组件 -->
  131 +<warn id="warn"></warn>
  132 +<my_confirm id="my_confirm"></my_confirm>
  133 +
  134 +<include src="../public/buy_com.wxml"></include>
0 135 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxss 0 → 100644
  1 +/*引用样式路径*/
  2 +@charset "UTF-8";
  3 +@import './goodsInfo.wxss';
  4 +
  5 +page {
  6 + /* background-color: #fb7454; */
  7 +}
  8 +
  9 +.top_img {
  10 + -webkit-align-content: center;
  11 + align-content: center;
  12 +}
  13 +
  14 +.top_img image {
  15 + width: 100%;
  16 +
  17 +}
  18 +
  19 +.top_title {
  20 + display: -webkit-box;
  21 + display: -webkit-flex;
  22 + display: flex;
  23 + background-color: #fff;
  24 + height: 85rpx;
  25 + border-radius: 10rpx 10rpx 0rpx 0rpx;
  26 + margin: 0rpx 20rpx 0rpx 20rpx;
  27 + -webkit-align-content: center;
  28 + align-content: center;
  29 + margin-bottom: 10rpx;
  30 +}
  31 +
  32 +.top_title_box {
  33 + width: 49%;
  34 + -webkit-align-content: center;
  35 + align-content: center;
  36 + text-align: center;
  37 + padding: 15rpx;
  38 +}
  39 +
  40 +.top_title_box_S {
  41 + width: 1%;
  42 + -webkit-align-content: center;
  43 + align-content: center;
  44 + text-align: center;
  45 + margin: 20rpx 0rpx 20rpx 0rpx;
  46 + border-left: #000 solid 3rpx;
  47 +}
  48 +
  49 +.top_title_redtext {
  50 + font-size: 30rpx;
  51 + color: #d61b30;
  52 +}
  53 +
  54 +.top_title_blacktext {
  55 + font-size: 30rpx;
  56 + color: #000;
  57 +}
  58 +
  59 +.content_box {
  60 + background-color: #fff;
  61 + margin: 0rpx 20rpx;
  62 + border-radius: 10rpx;
  63 + margin-bottom: 10rpx;
  64 +}
  65 +
  66 +.content_box_ware {
  67 + border-bottom: #f5f5f5 solid 2rpx;
  68 + display: -webkit-box;
  69 + display: -webkit-flex;
  70 + display: flex;
  71 +}
  72 +
  73 +.content_box_img {
  74 + margin: 20rpx 20rpx 20rpx 25rpx;
  75 + width: 35%;
  76 + display: -webkit-box;
  77 + display: -webkit-flex;
  78 + display: flex;
  79 + font-size: 8rpx;
  80 + position: relative;
  81 +}
  82 +
  83 +.content_box_img image {
  84 + width: 230rpx;
  85 + height: 230rpx;
  86 +}
  87 +
  88 +.content_box_title {
  89 + width: 65%;
  90 + margin: 25rpx 25rpx 10rpx 0rpx;
  91 + position: relative;
  92 +}
  93 +
  94 +.content_ware_title {
  95 + font-size: 30rpx;
  96 + word-break: break-all;
  97 + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
  98 + text-overflow: ellipsis;
  99 + display: -webkit-box;
  100 + /** 对象作为伸缩盒子模型显示 **/
  101 + -webkit-box-orient: vertical;
  102 + /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  103 + -webkit-line-clamp: 2;
  104 + /** 显示的行数 **/
  105 + overflow: hidden;
  106 + /** 隐藏超出的内容 **/
  107 +}
  108 +
  109 +.content_ware_type {
  110 + font-size: 32rpx;
  111 + color: #c61a34;
  112 + margin-top: 10rpx;
  113 + position: absolute;
  114 + left: 0;
  115 + bottom: 100rpx;
  116 +}
  117 +
  118 +.content_ware_price {
  119 + font-size: 26rpx;
  120 + color: #b9b5b5;
  121 + margin-top: 2rpx;
  122 + text-decoration: line-through;
  123 + position: absolute;
  124 + left: 0;
  125 + bottom: 70rpx;
  126 +}
  127 +
  128 +.content_ware_time {
  129 + font-size: 25rpx;
  130 + color: #000;
  131 + margin-top: 20rpx;
  132 + position: absolute;
  133 + left: 0;
  134 + bottom: 25rpx;
  135 +}
  136 +.box_button_buy{
  137 + display: flex;
  138 + align-items: center;
  139 +}
  140 +.content_box_button {
  141 + display: flex;
  142 + height: 110rpx;
  143 + justify-content: space-between;
  144 + align-items: center;
  145 + padding-left: 20rpx;
  146 + padding-right: 25rpx;
  147 + line-height: 110rpx;
  148 +}
  149 +
  150 +.box_button_remark text {
  151 + font-size: 28rpx;
  152 + color: #b9b5b5;
  153 +}
  154 +
  155 +.box_button_dui {
  156 + display: inline-block;
  157 + width: 160rpx;
  158 + height: 50rpx;
  159 + font-size: 20rpx;
  160 + background: #fff;
  161 + color: #000;
  162 + line-height: 50rpx;
  163 + margin-left: 20rpx;
  164 + border-radius: 10rpx;
  165 +}
  166 +
  167 +.box_button_buy {
  168 + background: #d41c34;
  169 + color: #fff;
  170 + border-radius: 10rpx;
  171 +}
  172 +
  173 +.foot_box {
  174 + -webkit-align-content: center;
  175 + align-content: center;
  176 + text-align: center;
  177 + margin-top: 15rpx;
  178 + margin-bottom: 50rpx;
  179 +}
  180 +
  181 +.foot_box text {
  182 + font-size: 25rpx;
  183 + color: #fff;
  184 +}
  185 +
  186 +.foot_empty {
  187 + background-color: #fff;
  188 + height: 375rpx;
  189 + margin: 10rpx 20rpx 0rpx 20rpx;
  190 + border-radius: 10rpx;
  191 + text-align: center;
  192 + padding: 150rpx 0rpx 300rpx 0rpx;
  193 + -webkit-box-pack: center;
  194 + -webkit-justify-content: center;
  195 + justify-content: center;
  196 +}
  197 +
  198 +.foot_empty image {
  199 + width: 400rpx;
  200 + height: 273rpx;
  201 +}
  202 +
  203 +.foot_empty text {
  204 + font-size: 30rpx;
  205 + color: #999;
  206 +}
  207 +
  208 +.foot_empty_button {
  209 + background: #ff6363;
  210 + margin: 60rpx 230rpx 0rpx 230rpx;
  211 + padding: 10rpx;
  212 + border-radius: 70rpx;
  213 + line-height: 40rpx;
  214 +}
  215 +
  216 +.foot_empty_button text {
  217 + font-size: 28rpx;
  218 + color: #fff;
  219 +}
  220 +.After_all {
  221 + height: 80rpx;
  222 + margin-bottom: 10rpx;
  223 + color: rgb(255, 255, 255);
  224 +}
  225 +
  226 +.After_all .Line {
  227 + border-top: 3rpx solid rgb(255, 255, 255);
  228 + width: 130rpx;
  229 +}
  230 +
  231 +.After_all .end {
  232 + margin: 0rpx 15rpx;
  233 +}
0 234 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackbuy/goodsInfo.wxss 0 → 100644
  1 +@import "../../../../../utils/wxParse/wxParse.wxss";
  2 +
  3 +.container {
  4 + margin-bottom: 100rpx;
  5 + overflow: hidden;
  6 + padding-top: 80rpx;
  7 +}
  8 +
  9 +image {
  10 + vertical-align: top;
  11 +}
  12 +.rules {
  13 + position: fixed;
  14 + background-color: rgba(0,0,0,.2);
  15 + color: white;
  16 + top: 22rpx;
  17 + right: 0;
  18 + z-index: 100;
  19 + font-size: 26rpx;
  20 + padding: 0 20rpx;
  21 + z-index: 99999;
  22 + border-radius: 20rpx 0 0 20rpx;
  23 +}
  24 +
  25 +.rule-pop-container {
  26 + position: fixed;
  27 + left: 0;
  28 + bottom: 0;
  29 + width: 100%;
  30 + background-color: white;
  31 + z-index: 99999;
  32 + border-radius: 16rpx 16rpx 0 0;
  33 + padding: 0 40rpx;
  34 + box-sizing: border-box;
  35 + font-size: 28rpx;
  36 + color: #444;
  37 +}
  38 +
  39 +.pop-title {
  40 + padding: 20rpx 0;
  41 + text-align: center;
  42 + font-size: 32rpx;
  43 + position: relative;
  44 +}
  45 +.icon-guan {
  46 + position: absolute;
  47 + right: 0;
  48 + font-size: 26rpx;
  49 + top: 50%;
  50 + transform: translateY(-50%);
  51 + color: #ccc;
  52 +}
  53 +.btn {
  54 + color: white;
  55 + padding: 20rpx 0;
  56 + text-align: center;
  57 + border-radius: 40rpx;
  58 + background: -webkit-linear-gradient(left,#ff5000,#ff2000) no-repeat;
  59 +}
  60 +
  61 +.goods-detail {
  62 + overflow: hidden
  63 +}
  64 +.popup-content {
  65 + max-height: 600rpx;
  66 + overflow-y: auto;
  67 +}
  68 +
  69 +.type-navbar {
  70 + display: flex;
  71 + justify-content: center;
  72 + width: 100%;
  73 + position: fixed;
  74 + top: 0;
  75 + z-index: 999;
  76 + /* height: 80rpx; */
  77 + /* margin-bottom: 20rpx; */
  78 + background-color: #fff;
  79 + border-top: 2rpx solid #ebedf0;
  80 + /* border-bottom: 1rpx #fafafa solid; */
  81 +}
  82 +
  83 +.type-box {
  84 + width: 25%;
  85 + box-sizing: border-box;
  86 + font-size: 32rpx;
  87 + line-height: 76rpx;
  88 + padding: 0 20rpx;
  89 + text-align: center;
  90 + display: inline-block;
  91 + overflow: hidden;
  92 +}
  93 +
  94 +.type-navbar-item {
  95 + /* border-bottom: 4rpx solid #fff; */
  96 + display: flex;
  97 + justify-content: center;
  98 + width: 100%;
  99 + font-size: 26rpx;
  100 +}
  101 +
  102 +.type-item-on {
  103 + color: #F95D74;
  104 + font-weight: bold;
  105 + /* border-bottom: 4rpx solid #F95D74; */
  106 + position: relative;
  107 + font-size: 30rpx;
  108 +}
  109 +
  110 +.type-item-on:after {
  111 + content: '';
  112 + position: absolute;
  113 + width: 50%;
  114 + height: 4rpx;
  115 + background-color: #F95D74;
  116 + left: 0;
  117 + right: 0;
  118 + bottom: 0;
  119 + margin: 0 auto;
  120 +}
  121 +
  122 +.swiper_box {
  123 + width: 100%;
  124 + height: 750rpx;
  125 +}
  126 +
  127 +.goods-title {
  128 + display: flex;
  129 + justify-content: space-between;
  130 + align-items: center;
  131 + vertical-align: middle;
  132 + /* overflow: hidden; */
  133 + /* height: 108rpx; */
  134 +}
  135 +
  136 +.goods-name {
  137 + /* width: 560rpx; */
  138 + /* line-height: 46rpx; */
  139 + font-size: 32rpx;
  140 + font-weight: bold;
  141 + color: #333;
  142 + /* margin-top: 30rpx;
  143 + margin-bottom:30rpx; */
  144 + flex: 1;
  145 + text-align: justify;
  146 + margin: 10rpx 0 20rpx;
  147 +}
  148 +
  149 +.goods-collect {
  150 + width: 112rpx;
  151 + padding-top: 30rpx;
  152 +}
  153 +
  154 +.collect-img {
  155 + width: 50rpx;
  156 + height: 44rpx;
  157 + margin: 0 auto;
  158 + overflow: hidden;
  159 +}
  160 +
  161 +.collect-des {
  162 + text-align: center;
  163 + font-size: 24rpx;
  164 + color: #333;
  165 +}
  166 +
  167 +.goods-price {
  168 + font-size: 60rpx;
  169 + /* padding: 20rpx 34rpx; */
  170 + /* padding:0rpx 34rpx; */
  171 + /* line-height: 60rpx; */
  172 + color: #999;
  173 + padding: 20rpx;
  174 + /* margin-top: 46rpx; */
  175 + /* margin-top:26rpx;
  176 + padding-bottom:20rpx; */
  177 +}
  178 +
  179 +.prom-info {
  180 + margin: 10rpx 0;
  181 + color: #f23030;
  182 +}
  183 +
  184 +.prom-info>.prom-type {
  185 + color: white;
  186 + background-color: #f23030;
  187 + margin-right: 14rpx;
  188 + padding: 2rpx 8rpx;
  189 + border-radius: 4rpx;
  190 +}
  191 +
  192 +.market-price {
  193 + /* display: flex;
  194 + margin-left: -5rpx; */
  195 +}
  196 +
  197 +.market-price .yuan {
  198 + /* top:24rpx; */
  199 + font-size: 30rpx
  200 +}
  201 +
  202 +.market-price>view>text {
  203 + text-decoration: line-through;
  204 +}
  205 +
  206 +.market-price>.yj {
  207 + color: #999999;
  208 + font-size: 24rpx;
  209 + /* margin-left: 16rpx;position: relative;top:30rpx; */
  210 + display: inline-block;
  211 +}
  212 +
  213 +.goods-price>.tm {
  214 + color: #999999;
  215 + font-size: 26rpx;
  216 + margin-top: 10rpx;
  217 +}
  218 +
  219 +.goods-num {
  220 + display: flex;
  221 + font-size: 24rpx;
  222 + justify-content: space-between;
  223 +}
  224 +
  225 +.goods-detail .twen {
  226 + background: #fff;
  227 + height: 60rpx;
  228 + line-height: 60rpx;
  229 + font-size: 30rpx;
  230 + padding-left: 30rpx;
  231 + display: flex;
  232 +}
  233 +
  234 +.goods-detail .twen .img {
  235 + width: 32rpx;
  236 + height: 32rpx;
  237 + margin-left: 200rpx;
  238 + background: #fff
  239 +}
  240 +
  241 +.goods-detail .twen image.img {
  242 + vertical-align: auto;
  243 +}
  244 +
  245 +
  246 +.logistics-item {
  247 + display: flex;
  248 + justify-content: space-between;
  249 + align-items: center;
  250 + height: 90rpx;
  251 + /*border-bottom: 1px solid #f5f5f5;*/
  252 + font-size: 32rpx;
  253 + color: #666;
  254 +}
  255 +
  256 +.logistics-item .small {
  257 + color: #999;
  258 + font-size: 24rpx;
  259 +}
  260 +
  261 +.item-title {
  262 + width: 180rpx;
  263 +}
  264 +
  265 +.item-mes {
  266 + color: #333;
  267 + width: 420rpx;
  268 + height: 90rpx;
  269 + line-height: 90rpx;
  270 +}
  271 +
  272 +.item-img {
  273 + width: 32rpx;
  274 + height: 32rpx;
  275 +}
  276 +
  277 +.prom-item {
  278 + color: #f23030;
  279 + border: 1px solid #f23030;
  280 + border-radius: 18rpx;
  281 + line-height: 40rpx;
  282 + height: 40rpx;
  283 + padding: 2rpx 8rpx;
  284 +}
  285 +
  286 +.guarantee {
  287 + justify-content: space-around;
  288 +}
  289 +
  290 +.ico-item {
  291 + width: 32rpx;
  292 + height: 32rpx;
  293 + margin-right: 10rpx;
  294 +}
  295 +
  296 +.guarantee>view {
  297 + display: flex;
  298 + align-items: center;
  299 + height: 32rpx;
  300 + color: #666;
  301 +}
  302 +
  303 +.user-comment {
  304 + margin: 10rpx 0;
  305 + font-size: 28rpx;
  306 +}
  307 +
  308 +.good-comment,
  309 +.comment-num {
  310 + display: flex;
  311 +}
  312 +
  313 +.recommend {
  314 + background-color: #fff;
  315 + border-bottom: 1px solid #ddd;
  316 + padding-bottom: 20rpx;
  317 +}
  318 +
  319 +.recommend-title {
  320 + height: 70rpx;
  321 + line-height: 70rpx;
  322 + font-size: 28rpx;
  323 + padding: 0 30rpx;
  324 +}
  325 +
  326 +.recommend-ul {
  327 + display: flex;
  328 + justify-content: flex-start;
  329 +}
  330 +
  331 +.recommend-ul .li {
  332 + width: 25%;
  333 + box-sizing: border-box;
  334 + text-align: center;
  335 + font-size: 28rpx;
  336 + color: #333;
  337 +}
  338 +
  339 +.li-img {
  340 + width: 120rpx;
  341 + height: 120rpx;
  342 + margin: 0 auto;
  343 +}
  344 +
  345 +.li-title {
  346 + height: 58rpx;
  347 + line-height: 30rpx;
  348 + margin: 10rpx 0;
  349 +}
  350 +
  351 +.comment-item {
  352 + background-color: #fff;
  353 + font-size: 28rpx;
  354 +}
  355 +
  356 +.comment-title {
  357 + display: flex;
  358 + justify-content: space-between;
  359 + align-items: center;
  360 + height: 102rpx;
  361 + margin: 0 30rpx;
  362 + color: #333;
  363 + border-bottom: 1px solid #eee;
  364 +}
  365 +
  366 +.user-name {
  367 + display: flex;
  368 + align-items: center;
  369 +}
  370 +
  371 +.user-pic {
  372 + width: 54rpx;
  373 + height: 54rpx;
  374 + margin-right: 10rpx;
  375 + border-radius: 50%;
  376 + overflow: hidden;
  377 +}
  378 +
  379 +.stars {
  380 + float: left;
  381 + display: flex;
  382 + height: 42rpx;
  383 + line-height: 42rpx;
  384 + margin: 15rpx 0;
  385 + width: 200rpx;
  386 +}
  387 +
  388 +.star {
  389 + width: 26rpx;
  390 + height: 26rpx;
  391 + margin-right: 5rpx;
  392 +}
  393 +
  394 +.state-spec {
  395 + margin: 15rpx 0;
  396 + float: right;
  397 + font-size: 24rpx;
  398 + color: #666;
  399 + width: 460rpx;
  400 + text-align: right;
  401 +}
  402 +
  403 +.comment-cont {
  404 + padding: 0 30rpx 30rpx;
  405 + border-bottom: 1px solid #eee;
  406 +}
  407 +
  408 +.comment-mes {
  409 + line-height: 42rpx;
  410 +}
  411 +
  412 +.img-ul {
  413 + display: flex;
  414 + flex-wrap: wrap;
  415 +}
  416 +
  417 +.img-li {
  418 + width: 150rpx;
  419 + height: 150rpx;
  420 + margin-top: 8rpx;
  421 + margin-right: 10rpx;
  422 +}
  423 +
  424 +.comment-btn {
  425 + height: 60rpx;
  426 + padding: 20rpx 30rpx;
  427 +}
  428 +
  429 +.comment-btn .btn {
  430 + display: flex;
  431 + justify-content: center;
  432 + align-items: center;
  433 + height: 60rpx;
  434 + width: 45%;
  435 + border: 1px solid #eee;
  436 +}
  437 +
  438 +.comment-btn .btn-img {
  439 + width: 30rpx;
  440 + height: 28rpx;
  441 + margin: 0 10rpx;
  442 +}
  443 +
  444 +.reply-ul {
  445 + margin-top: 20rpx;
  446 +}
  447 +
  448 +.reply-li {
  449 + color: #aaa;
  450 +}
  451 +
  452 +.join-cart {
  453 + position: fixed;
  454 + left: 0;
  455 + bottom: 0;
  456 + display: flex;
  457 + width: 100%;
  458 + height: 100rpx;
  459 + background-color: #fff;
  460 + z-index: 9;
  461 + border-top: 4rpx solid #eee;
  462 +
  463 +}
  464 +
  465 +.join-cart>view {
  466 + width: 29%;
  467 +}
  468 +
  469 +.join-cart>.new_split {
  470 + width: 13%;
  471 + text-align: center;
  472 + padding: 0;
  473 + margin: 0;
  474 +}
  475 +
  476 +.cart-ico {
  477 + font-size: 24rpx;
  478 + color: #333;
  479 +}
  480 +
  481 +.shopping-cart {
  482 + position: relative;
  483 +}
  484 +
  485 +.cs-img {
  486 + width: 45rpx;
  487 + height: 40rpx;
  488 + margin-top: 15rpx;
  489 +}
  490 +
  491 +.sc-img {
  492 + width: 42rpx;
  493 + height: 40rpx;
  494 + margin-top: 15rpx;
  495 +}
  496 +
  497 +.cart-num {
  498 + position: absolute;
  499 + left: 50%;
  500 + top: 1rpx;
  501 + width: 40rpx;
  502 + height: 40rpx;
  503 + line-height: 40rpx;
  504 + text-align: center;
  505 + border-radius: 50%;
  506 + color: #fff;
  507 + background-color: rgba(217, 81, 99, 0.9);
  508 +}
  509 +
  510 +.cart-btn {
  511 + font-size: 28rpx;
  512 + color: #fff;
  513 + line-height: 70rpx;
  514 + margin-top: 16rpx;
  515 + text-align: center;
  516 +
  517 +
  518 +}
  519 +
  520 +.join-btn {
  521 + background-color: #ffb03f;
  522 + height: 70rpx;
  523 + border-radius: 55rpx 0rpx 0rpx 55rpx;
  524 + margin-top: 16rpx;
  525 +
  526 +
  527 +}
  528 +
  529 +view.cart-btn-lg {
  530 + width: 50%;
  531 +}
  532 +
  533 +.buy-btn {
  534 + background-color: #f23030;
  535 + height: 70rpx;
  536 + border-radius: 0 56rpx 55rpx 0;
  537 +
  538 +}
  539 +
  540 +.buy-btn-all {
  541 + background-color: #f23030;
  542 + height: 70rpx;
  543 + border-radius: 56rpx;
  544 +}
  545 +
  546 +
  547 +.toTop {
  548 + position: fixed;
  549 + z-index: 3;
  550 + right: 20rpx;
  551 + bottom: 160rpx;
  552 + width: 68rpx;
  553 + height: 68rpx;
  554 + border: 1px solid #ddd;
  555 + border-radius: 50%;
  556 + overflow: hidden;
  557 + cursor: pointer;
  558 +}
  559 +
  560 +.comment-more {
  561 + height: 56rpx;
  562 + line-height: 56rpx;
  563 + font-size: 26rpx;
  564 + color: #999;
  565 + text-align: center;
  566 + background-color: #eee;
  567 +}
  568 +
  569 +.goods-more {
  570 + background-color: #fff;
  571 +}
  572 +
  573 +.goods-norms {
  574 + background-color: #fff;
  575 +}
  576 +
  577 +.type-navbar2 {
  578 + display: flex;
  579 + height: 72rpx;
  580 + border-top: 1px solid #ddd;
  581 + border-bottom: 1px solid #ddd;
  582 +}
  583 +
  584 +.type-box2 {
  585 + width: 50%;
  586 + font-size: 26rpx;
  587 + line-height: 72rpx;
  588 + text-align: center;
  589 + overflow: hidden;
  590 +}
  591 +
  592 +.type-item2-on {
  593 + color: #f23030;
  594 +}
  595 +
  596 +.parameter {
  597 + padding: 40rpx 0;
  598 +}
  599 +
  600 +.table {
  601 + width: 698rpx;
  602 + margin: 0 auto;
  603 + border: 1px solid #ddd;
  604 + border-bottom: none;
  605 +}
  606 +
  607 +.tb {
  608 + width: 100%;
  609 + min-height: 69rpx;
  610 + line-height: 69rpx;
  611 + border-bottom: 1px solid #ddd;
  612 + font-size: 28rpx;
  613 + text-align: center;
  614 + color: #333;
  615 +}
  616 +
  617 +.th-thitle {
  618 + font-weight: bold;
  619 + background-color: #f5fafe;
  620 +}
  621 +
  622 +.td-cont {
  623 + display: flex;
  624 +}
  625 +
  626 +.td-title {
  627 + width: 259rpx;
  628 + background-color: #f5fafe;
  629 + border-right: 1px solid #ddd;
  630 +}
  631 +
  632 +.td-text {
  633 + width: 439rpx;
  634 +}
  635 +
  636 +.goods-comment {
  637 + background-color: #fff;
  638 +}
  639 +
  640 +.type-navbar3 {
  641 + display: flex;
  642 + height: 88rpx;
  643 + border-top: 1px solid #ddd;
  644 + border-bottom: 1px solid #ddd;
  645 + padding: 10rpx 0;
  646 +}
  647 +
  648 +.type-box3 {
  649 + width: 20%;
  650 + font-size: 30rpx;
  651 + line-height: 44rpx;
  652 + text-align: center;
  653 + overflow: hidden;
  654 +}
  655 +
  656 +.type-item3-on {
  657 + color: #f23030;
  658 +}
  659 +
  660 +.spec-model {
  661 + position: fixed;
  662 + bottom: 0;
  663 + z-index: 20;
  664 + background: white;
  665 + width: 100%;
  666 + /* padding: 0 30rpx; */
  667 + font-size: 32rpx;
  668 + box-sizing: border-box;
  669 + border-radius: 20rpx 20rpx 0 0;
  670 + /* height: 72%; */
  671 +}
  672 +
  673 +.spec-model .pding {
  674 + padding: 0 20rpx;
  675 +}
  676 +
  677 +.spec-goods {
  678 + padding: 30rpx 0 20rpx;
  679 + /* float: left; */
  680 + width: 100%;
  681 + /* border-bottom:2rpx solid #eee; */
  682 +}
  683 +
  684 +.spec-img {
  685 + float: left;
  686 + height: 186rpx;
  687 + width: 186rpx;
  688 + border: 4rpx solid #eee
  689 +}
  690 +
  691 +.spec-goods-info {
  692 + float: left;
  693 + padding: 0 25rpx;
  694 + width: 400rpx;
  695 +}
  696 +
  697 +.spec-goods-name {
  698 + font-size: 30rpx;
  699 + line-height: 35rpx;
  700 + height: 70rpx;
  701 + margin: 15rpx 20rpx 25rpx 0;
  702 + overflow: hidden;
  703 + text-overflow: ellipsis;
  704 + color: #333;
  705 +}
  706 +
  707 +.spec-goods-price {
  708 + color: #d60021;
  709 + font-size: 33rpx;
  710 + font-weight: bold;
  711 + /* display: flex; */
  712 +}
  713 +
  714 +.spec-goods-stock {
  715 + margin-top: 3rpx;
  716 + font-size: 24rpx;
  717 + color: #999999;
  718 + margin-right: 15rpx;
  719 +}
  720 +
  721 +.spec-name {
  722 + clear: both;
  723 + padding: 20rpx 0;
  724 + font-size: 30rpx;
  725 + color: #333;
  726 +}
  727 +
  728 +
  729 +.spec-name+view{
  730 + flex-wrap: wrap;
  731 +}
  732 +
  733 +.quhuo {
  734 + font-size: 30rpx;
  735 + color: #000
  736 +}
  737 +
  738 +.b_num {
  739 + display: flex;
  740 + font-size: 30rpx;
  741 + color: #333;
  742 + justify-content: space-between;
  743 + align-items: center;
  744 + padding: 20rpx 0;
  745 +}
  746 +
  747 +.count {
  748 + /* position: fixed; */
  749 + display: flex;
  750 + height: 50rpx;
  751 + /* border: 1rpx solid #000; */
  752 + font-size: 28rpx;
  753 + right: 30rpx;
  754 +}
  755 +
  756 +
  757 +.count>view,
  758 +.count>input {
  759 + width: 60rpx;
  760 + height: 50rpx;
  761 + line-height: 50rpx;
  762 + text-align: center;
  763 +}
  764 +
  765 +.spec_bt {
  766 + background: fff;
  767 + color: #333;
  768 + margin-left: 10rpx;
  769 + padding: 4rpx 15rpx 4rpx;
  770 + display: inline-block;
  771 + border-radius: 30rpx;
  772 + font-size: 24rpx;
  773 + border: 1rpx solid #ccc;
  774 + margin: 10rpx;
  775 + height: 40rpx;
  776 + line-height: 40rpx;
  777 +}
  778 +
  779 +.spec_bt.act {
  780 + background: #d60021;
  781 + color: #fff;
  782 + border: 1rpx solid #d60021;
  783 +}
  784 +
  785 +.sub,
  786 +.add,
  787 +.count>input {
  788 + /* border-right: 1px solid #000; */
  789 + background-color: #f8f8f8;
  790 + border-radius: 8rpx;
  791 +}
  792 +
  793 +.sub.active {
  794 + /* background-color: #ddd; */
  795 + color: #ccc;
  796 +}
  797 +
  798 +.count>input {
  799 + margin: 0 10rpx;
  800 +}
  801 +
  802 +.add {
  803 + /* background-color: #f8f8f8; */
  804 + /* border-left: 1px solid #000; */
  805 +}
  806 +
  807 +.spec-btn {
  808 + color: black;
  809 + background-color: white;
  810 + padding: 10rpx 10rpx;
  811 + font-size: 26rpx;
  812 + line-height: 28rpx;
  813 + float: left;
  814 + border: 1rpx solid #dedede;
  815 + margin: 4rpx 10rpx 4rpx 0;
  816 + border-radius: 4rpx;
  817 +}
  818 +
  819 +.spec-btn-click {
  820 + color: white;
  821 + background-color: #f23030;
  822 + border: 1rpx solid #f23030;
  823 +}
  824 +
  825 +.spec-cart-btns {
  826 + /* width: 92%; */
  827 + line-height: 70rpx;
  828 + /* margin: 0rpx auto;
  829 + margin-top: 160rpx; */
  830 + /* border-radius: 20rpx; */
  831 + /* position: fixed; */
  832 + /* bottom: 50rpx; */
  833 + /* left: 4%; */
  834 + padding: 20rpx;
  835 +}
  836 +
  837 +.spec-cart-btn {
  838 +
  839 + width: 100%;
  840 + font-size: 30rpx;
  841 + text-align: center;
  842 + color: white;
  843 + border-radius: 40rpx;
  844 +}
  845 +
  846 +.spec-cart-btn.w40 {
  847 + width: 46%;
  848 +}
  849 +
  850 +.spec-add-cart {
  851 + background-color: #ffb03f;
  852 +}
  853 +
  854 +.spec-buy {
  855 + background-color: #f23030;
  856 + /* margin-left: 34rpx; */
  857 +}
  858 +
  859 +.spec-cart-disable {
  860 + background: #bbbbbb;
  861 +}
  862 +
  863 +.spec-cart-btn-lg {
  864 + width: 614rpx;
  865 +}
  866 +
  867 +.prom-model {
  868 + position: fixed;
  869 + bottom: 0;
  870 + z-index: 20;
  871 + background: white;
  872 + width: 100%;
  873 + padding: 0 30rpx 30rpx;
  874 + font-size: 32rpx;
  875 + box-sizing: border-box;
  876 + overflow-x: hidden;
  877 +}
  878 +
  879 +.prom-model .prom-title {
  880 + text-align: center;
  881 + margin: 30rpx 0;
  882 +}
  883 +
  884 +.prom-model .logistics-item {
  885 + border: 0;
  886 +}
  887 +
  888 +.prom-model .item-mes {
  889 + width: 500rpx;
  890 +}
  891 +
  892 +.integral-btn {
  893 + width: 100%;
  894 + padding: 0rpx;
  895 + margin: 0rpx;
  896 +}
  897 +
  898 +.clear {
  899 + clear: both;
  900 +}
  901 +
  902 +.sto_v .title,
  903 +.sto_v .stitle {
  904 + border-top: 1rpx solid #dedede;
  905 + border-bottom: 1rpx solid #dedede;
  906 + height: 78rpx;
  907 + line-height: 78rpx;
  908 +}
  909 +
  910 +.sto_v .title .tubiao,
  911 +.sto_v .stitle .tubiao {
  912 + width: 32rpx;
  913 + height: 32rpx;
  914 + margin-top: 23rpx;
  915 +}
  916 +
  917 +.itemlists .item {
  918 + border-bottom: 1rpx solid #dedede;
  919 + height: 72rpx;
  920 + line-height: 72rpx;
  921 + font-size: 28rpx;
  922 + margin: 0 10rpx;
  923 +}
  924 +
  925 +.cshu {
  926 + margin-bottom: 30rpx;
  927 + margin-top: 20rpx;
  928 +}
  929 +
  930 +.cshu view {
  931 + color: #999;
  932 + font-size: 30rpx;
  933 + margin-left: 26rpx;
  934 +}
  935 +
  936 +
  937 +/*---活动特殊显示---*/
  938 +.prom_show {
  939 + height: 120rpx;
  940 + display: flex;
  941 +}
  942 +
  943 +.prom_show .secondkill-img {
  944 + width: 100%;
  945 + height: 100%;
  946 +}
  947 +
  948 +.prom_show .spike-img {
  949 + width: 283rpx;
  950 + height: 57rpx;
  951 + top: 35rpx;
  952 + left: 31rpx;
  953 +}
  954 +
  955 +.prom_show .stop {
  956 + color: #d81731;
  957 + top: 17rpx;
  958 + right: 65rpx;
  959 + font-weight: 600;
  960 +}
  961 +
  962 +.prom_show .start {
  963 + color: #009ae2;
  964 + top: 17rpx;
  965 + right: 65rpx;
  966 + font-weight: 600;
  967 +}
  968 +
  969 +.prom_show .timeac {
  970 + font-size: 32rpx;
  971 + height: 120rpx;
  972 + color: #333;
  973 +}
  974 +
  975 +.prom_show .timeac.left {
  976 + width: 66%;
  977 + color: #fff;
  978 + background: #f23030;
  979 +}
  980 +
  981 +.prom_show .timeac.right {
  982 + width: 34%;
  983 + background-color: #d7d7d7;
  984 + text-align: center
  985 +}
  986 +
  987 +.prom_show .secview .day {
  988 + padding-right: 10rpx;
  989 +}
  990 +
  991 +.prom_show .secview .time-val {
  992 + width: 36rpx;
  993 + height: 36rpx;
  994 + border-radius: 7rpx;
  995 + line-height: 36rpx;
  996 +}
  997 +
  998 +.prom_show .secview .time {
  999 + margin-right: 10rpx;
  1000 + margin-left: 10rpx;
  1001 +}
  1002 +
  1003 +
  1004 +.prom_show .timeac.left view {
  1005 + margin-left: 20rpx
  1006 +}
  1007 +
  1008 +.prom_show .timeac.left view.firview {
  1009 + margin-top: 10rpx
  1010 +}
  1011 +
  1012 +.prom_show .timeac.left view .tr_line {
  1013 + text-decoration: line-through;
  1014 + font-size: 28rpx;
  1015 +}
  1016 +
  1017 +.prom_show .timeac.left view .bprice {
  1018 + font-size: 50rpx;
  1019 +}
  1020 +
  1021 +.prom_show .timeac.right view.firview {
  1022 + margin-top: 12rpx;
  1023 + margin-bottom: 10rpx
  1024 +}
  1025 +
  1026 +.prom_show .timeac.right view.secview {
  1027 + display: flex;
  1028 + text-align: center;
  1029 + justify-content: center;
  1030 + flex-direction: row;
  1031 +}
  1032 +
  1033 +.prom_show .timeac.right view .tui-conutdown-box {
  1034 + /* background: #6b6b6b; */
  1035 + width: auto;
  1036 + /* min-width: 45rpx; */
  1037 + height: 45rpx;
  1038 + color: #c4182e;
  1039 + font-size: 27rpx;
  1040 + text-align: center;
  1041 + line-height: 46rpx;
  1042 +}
  1043 +
  1044 +.huise {
  1045 + background: gray
  1046 +}
  1047 +
  1048 +.lanse {
  1049 + background: #0199e2
  1050 +}
  1051 +
  1052 +
  1053 +/*------拼单------*/
  1054 +.pt_view {
  1055 + text-align: center;
  1056 + width: 100%;
  1057 + height: 100rpx;
  1058 + line-height: 100rpx;
  1059 + font-size: 26rpx
  1060 +}
  1061 +
  1062 +.pt_view .secondkill-img {
  1063 + width: 100%;
  1064 + height: 100%;
  1065 +}
  1066 +
  1067 +.pt_fir {
  1068 + background: #fff;
  1069 + /* margin-bottom: 10rpx; */
  1070 +}
  1071 +
  1072 +.pt_fir .pt_fir_title {
  1073 + display: flex;
  1074 + align-items: center;
  1075 + /* margin-left: 10rpx; margin-top: 20rpx; */
  1076 + font-size: 28rpx;
  1077 + position: relative;
  1078 +}
  1079 +
  1080 +.pt_fir .pt_fir_title .kt_type {
  1081 + color: #fff;
  1082 + background: #e9030d;
  1083 + width: 100rpx;
  1084 + line-height: 40rpx;
  1085 + border-radius: 6rpx;
  1086 + margin: 0 10rpx;
  1087 + height: 40rpx;
  1088 + font-size: 24rpx;
  1089 + text-align: center;
  1090 +}
  1091 +
  1092 +.pt_fir .pt_fir_title .price {
  1093 + color: #e9030d;
  1094 + font-size: 26rpx;
  1095 +}
  1096 +
  1097 +.pt_fir .pt_fir_title .bigw {
  1098 + font-size: 36rpx;
  1099 +}
  1100 +
  1101 +.pt_fir .pt_fir_title .tprice {
  1102 + text-decoration: line-through;
  1103 + color: #949494
  1104 +}
  1105 +
  1106 +.pt_fir .pt_fir_title .tprice.ml50 {
  1107 + margin-left: 50rpx
  1108 +}
  1109 +
  1110 +.pt_fir .pt_fir_title .js {
  1111 + padding: 0 15rpx;
  1112 + height: 40rpx;
  1113 + background: #e9030d;
  1114 + text-align: center;
  1115 + border-radius: 8rpx;
  1116 + color: #fff;
  1117 + margin-left: 10rpx;
  1118 +}
  1119 +
  1120 +.pt_fir .pt_fir_title .tuannum {
  1121 + color: #e9030d;
  1122 + position: absolute;
  1123 + right: 20rpx;
  1124 + font-size: 26rpx;
  1125 +}
  1126 +
  1127 +.pding {
  1128 + padding-top: 20rpx;
  1129 + padding-left: 20rpx;
  1130 + height: 81%;
  1131 + padding-right: 20rpx;
  1132 + font-size: 26rpx;
  1133 + color: #ea120f
  1134 +}
  1135 +
  1136 +.pdres {
  1137 + margin-left: 10rpx;
  1138 + color: #8f8f94
  1139 +}
  1140 +
  1141 +.ptgz {
  1142 + position: relative;
  1143 + font-size: 30rpx;
  1144 + padding-left: 20rpx;
  1145 + margin-top: 10rpx;
  1146 + overflow: hidden
  1147 +}
  1148 +
  1149 +.shuxian {
  1150 + width: 6rpx;
  1151 + height: 28rpx;
  1152 + background: #ea120f;
  1153 + display: inline-block;
  1154 + top: 5rpx;
  1155 + position: relative;
  1156 + margin-right: 5rpx
  1157 +}
  1158 +
  1159 +.ptgz_an {
  1160 + position: absolute;
  1161 + top: 5rpx;
  1162 + right: 6rpx
  1163 +}
  1164 +
  1165 +.ptgz_an .arrow-two {
  1166 + width: 18rpx;
  1167 + height: 18rpx;
  1168 + border-color: #da0b31;
  1169 + margin-top: 30rpx;
  1170 +}
  1171 +
  1172 +.pt_fir.se {
  1173 + height: auto;
  1174 + margin-bottom: 10rpx
  1175 +}
  1176 +
  1177 +.t_gz {
  1178 + padding: 10rpx 20rpx;
  1179 + font-size: 28rpx
  1180 +}
  1181 +
  1182 +.pt_fir.se1 {
  1183 + height: auto;
  1184 + margin: 0
  1185 +}
  1186 +
  1187 +.pt_fir.se2 {
  1188 + height: auto;
  1189 + margin: 0;
  1190 + /* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */
  1191 +}
  1192 +
  1193 +.pt_hb {
  1194 + height: 78rpx;
  1195 + line-height: 75rpx;
  1196 + position: relative;
  1197 + font-size: 32rpx;
  1198 + overflow: hidden;
  1199 + width: 695rpx;
  1200 + margin-left: 28rpx;
  1201 + border-bottom: 1rpx solid #E5E5E5
  1202 +}
  1203 +
  1204 +.ptgz_an.xq {
  1205 + font-size: 32rpx;
  1206 + color: #d40024
  1207 +}
  1208 +
  1209 +.wf {
  1210 + display: flex;
  1211 + padding: 20rpx 0;
  1212 +}
  1213 +
  1214 +.wf .item {
  1215 + width: 24.5%;
  1216 + text-align: center;
  1217 + font-size: 26rpx;
  1218 + color: #666
  1219 +}
  1220 +
  1221 +.wf .item .item_txy {
  1222 + position: relative;
  1223 + width: 60rpx;
  1224 + height: 60rpx;
  1225 + background: #ea120f;
  1226 + border-radius: 50%;
  1227 + left: 50%;
  1228 + margin-left: -30rpx;
  1229 + border: 3px #dfdfdf solid;
  1230 + text-align: center;
  1231 + line-height: 60rpx;
  1232 + color: #fff;
  1233 + margin-bottom: 10rpx;
  1234 +}
  1235 +
  1236 +.wf .item .item_txy.hs {
  1237 + background: #cbcbcb;
  1238 +}
  1239 +
  1240 +.po {
  1241 + margin-bottom: 20rpx;
  1242 +}
  1243 +
  1244 +.cart-btn.line-h {
  1245 + line-height: 26rpx;
  1246 +}
  1247 +
  1248 +.cart-btn .fir-v {
  1249 + margin-top: 10rpx;
  1250 +}
  1251 +
  1252 +.hyt {
  1253 + padding: 0 20rpx;
  1254 + font-size: 30rpx;
  1255 + display: flex;
  1256 + align-items: center;
  1257 + margin-top: 10rpx;
  1258 +}
  1259 +
  1260 +.hyt .r_f {
  1261 + color: #e9120f;
  1262 + font-size: 26rpx;
  1263 + position: relative;
  1264 + top: 3rpx
  1265 +}
  1266 +
  1267 +.hyt .byj {
  1268 + color: #e9120f;
  1269 + font-size: 32rpx;
  1270 + position: relative;
  1271 + top: 5rpx
  1272 +}
  1273 +
  1274 +.pt_fir .pt_fir_title.no-mar-b {
  1275 + margin-bottom: 0;
  1276 + padding-bottom: 10rpx;
  1277 + margin-left: 20rpx
  1278 +}
  1279 +
  1280 +.pt_fir .pt_fir_title.boder-1 {
  1281 + border-bottom: 1rpx #e7e7e7 solid
  1282 +}
  1283 +
  1284 +.jie_price {
  1285 + /* padding: 10rpx 30rpx; */
  1286 +}
  1287 +
  1288 +.jie_price_title {
  1289 + font-size: 30rpx;
  1290 + color: #a26270;
  1291 + margin-bottom: 10rpx
  1292 +}
  1293 +
  1294 +.price_list {
  1295 + display: flex;
  1296 + width: 100%;
  1297 +}
  1298 +
  1299 +.price_item {
  1300 + width: 25%;
  1301 + font-size: 28rpx;
  1302 + color: #4c336c
  1303 +}
  1304 +
  1305 +.pt_fir.se2 .zzk-1 {
  1306 + /* margin-top: 23rpx; */
  1307 + font-size: 30rpx;
  1308 + position: relative;
  1309 + /* margin-bottom: 30rpx; */
  1310 + border-left: 4rpx solid red;
  1311 + /* margin-left:14rpx; */
  1312 + height: 30rpx;
  1313 + line-height: 30rpx;
  1314 + /* padding-left:5rpx; */
  1315 +}
  1316 +
  1317 +.ckgd {
  1318 + /* position: absolute;top:0;right:57rpx; */
  1319 + color: #d70025;
  1320 + font-size: 26rpx;
  1321 +}
  1322 +
  1323 +.ckgd .arrow-one {
  1324 + width: 14rpx;
  1325 + height: 14rpx;
  1326 + border-color: #da0b31;
  1327 + /* margin-top:5rpx; */
  1328 + margin: auto;
  1329 +}
  1330 +
  1331 +.bview {
  1332 + position: fixed;
  1333 + top: 0;
  1334 + left: 0;
  1335 + width: 100%;
  1336 + height: 100%;
  1337 + background-color: rgba(0, 0, 0, 0.5);
  1338 +}
  1339 +
  1340 +.juzhong {
  1341 + position: fixed;
  1342 + top: 0;
  1343 + left: 0;
  1344 + width: 100%;
  1345 + height: 100%;
  1346 + display: flex;
  1347 + flex-direction: row;
  1348 + justify-content: center;
  1349 + align-items: center;
  1350 +}
  1351 +
  1352 +.juzhong .xq {
  1353 + padding: 0 20rpx;
  1354 + background: #fff;
  1355 + font-size: 30rpx;
  1356 + padding-bottom: 20rpx;
  1357 +}
  1358 +
  1359 +.juzhong .xq .title {
  1360 + text-align: center;
  1361 + margin: 20rpx 0;
  1362 + position: relative;
  1363 + height: 50rpx;
  1364 +}
  1365 +
  1366 +.juzhong .xq .hs1 {
  1367 + font-size: 28rpx;
  1368 + color: #ab8f9e
  1369 +}
  1370 +
  1371 +.juzhong .xq .title .close {
  1372 + position: absolute;
  1373 + top: 0;
  1374 + right: 0;
  1375 + width: 45rpx;
  1376 + height: 45rpx;
  1377 +}
  1378 +
  1379 +.pt_qd {
  1380 + /* margin-top: 40rpx; height: auto; */
  1381 + padding: 20rpx;
  1382 +}
  1383 +
  1384 +.spec-cart-btn.w100 {
  1385 + width: 95%;
  1386 + margin-left: 0;
  1387 + height: 75rpx;
  1388 + line-height: 75rpx;
  1389 + margin: auto;
  1390 +}
  1391 +
  1392 +.sto_v {
  1393 + color: #333;
  1394 +}
  1395 +
  1396 +.ellipsis {
  1397 + overflow: hidden;
  1398 + white-space: nowrap;
  1399 + text-overflow: ellipsis;
  1400 +}
  1401 +
  1402 +
  1403 +/*---多少人参加团--*/
  1404 +.group {
  1405 + padding-top: 20rpx;
  1406 + padding-bottom: 20rpx;
  1407 + width: 100%;
  1408 + /* min-height: 92rpx; */
  1409 + border-bottom: 2rpx solid #ebedf0;
  1410 +
  1411 +}
  1412 +
  1413 +.group .group-list {
  1414 + display: flex;
  1415 + align-items: center;
  1416 + justify-content: space-around;
  1417 + /* height: 90rpx; */
  1418 + /* padding: 0 130rpx 0 100rpx; */
  1419 + /* width: 470rpx;
  1420 +
  1421 + position: absolute; */
  1422 +}
  1423 +
  1424 +.group .group-list .gtou {
  1425 + width: 70rpx;
  1426 + height: 70rpx;
  1427 + /* float: left;
  1428 + position: relative;
  1429 + top: 6rpx;
  1430 + left: -96rpx; */
  1431 +}
  1432 +
  1433 +.group .group-list .gtou image {
  1434 + display: block;
  1435 + width: 100%;
  1436 + height: 100%;
  1437 + border-radius: 50%;
  1438 + background-color: #f0f0f0;
  1439 +}
  1440 +
  1441 +.group .group-list .gdn {
  1442 + width: 140rpx;
  1443 + text-align: center;
  1444 + /* float: left; */
  1445 + font-size: 26rpx;
  1446 + /* padding-left: 20rpx; */
  1447 + /* line-height: 48rpx;
  1448 + height: 48rpx;
  1449 + width: 168rpx;
  1450 + position: relative;
  1451 + left: -80rpx;
  1452 + top:20rpx; */
  1453 + font-weight: bold;
  1454 +}
  1455 +
  1456 +.group .group-list .ghaicha {
  1457 + /* width:300rpx; */
  1458 + font-size: 27rpx;
  1459 + /* margin-left:180rpx;
  1460 + top:13rpx;
  1461 + left:-3rpx; */
  1462 + font-weight: bold;
  1463 +
  1464 +
  1465 +}
  1466 +
  1467 +.group .group-list .ghaicha .gred {
  1468 + /* height: 48rpx;
  1469 + width: 300rpx; */
  1470 +}
  1471 +
  1472 +.gsj {
  1473 + float: left;
  1474 + color: #8f8f94;
  1475 +}
  1476 +
  1477 +.group .group-list .cjt {
  1478 + height: 42rpx;
  1479 + width: 137rpx;
  1480 + /* position: absolute;
  1481 + right: 4rpx;
  1482 + top:25rpx; */
  1483 + line-height: 42rpx;
  1484 + font-size: 24rpx;
  1485 + color: #fff;
  1486 + border: 2rpx solid #d60024;
  1487 + background-color: #d60024;
  1488 + border-radius: 25rpx;
  1489 +
  1490 +}
  1491 +
  1492 +.gbody {
  1493 + background-color: white;
  1494 +}
  1495 +
  1496 +.t_show {
  1497 + /* overflow: hidden; */
  1498 + display: flex;
  1499 + /* width: 300rpx; */
  1500 + color: #292929;
  1501 + /* line-height: 36rpx; */
  1502 + font-size: 26rpx;
  1503 +}
  1504 +
  1505 +.join-cart>view.set_width {
  1506 + width: 58%;
  1507 +}
  1508 +
  1509 +/*秒杀样式zwp*/
  1510 +#zwpMs {
  1511 + width: 31%;
  1512 + color: #fff;
  1513 + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat;
  1514 + background-size: 100% 60px;
  1515 +}
  1516 +
  1517 +
  1518 +/*--------- 修改后的样式 -----------*/
  1519 +.elli {
  1520 + overflow: hidden;
  1521 + text-overflow: ellipsis;
  1522 + display: -webkit-box;
  1523 + -webkit-line-clamp: 2;
  1524 + -webkit-box-orient: vertical;
  1525 +}
  1526 +
  1527 +.one_elli {
  1528 + overflow: hidden;
  1529 + text-overflow: ellipsis;
  1530 + white-space: nowrap;
  1531 +}
  1532 +
  1533 +.tuwen_title {
  1534 + /* height: 86rpx; */
  1535 + background-color: #eeeeee;
  1536 + /* margin-bottom: 32rpx; */
  1537 + position: relative;
  1538 + display: flex;
  1539 + justify-content: center;
  1540 + align-items: center;
  1541 + padding: 20rpx;
  1542 +}
  1543 +
  1544 +.tuwen_title .g_line {
  1545 + width: 496rpx;
  1546 + height: 1rpx;
  1547 + border-bottom: #ababab 1rpx solid;
  1548 +}
  1549 +
  1550 +.tuwen_title .center_s {
  1551 + width: 124rpx;
  1552 + position: absolute;
  1553 + height: 34rpx;
  1554 + background-color: #eeeeee;
  1555 + font-size: 32rpx;
  1556 + display: flex;
  1557 + overflow: hidden;
  1558 + justify-content: center;
  1559 + align-items: center;
  1560 +}
  1561 +
  1562 +.tuwen_title .center_s image {
  1563 + width: 34rpx;
  1564 + height: 26rpx;
  1565 + margin-right: 10rpx
  1566 +}
  1567 +
  1568 +.t_g_info {
  1569 + /* margin: 0 34rpx;margin-bottom: 20rpx; */
  1570 + display: flex;
  1571 + align-items: center;
  1572 + padding: 20rpx;
  1573 +}
  1574 +
  1575 +.red_shu {
  1576 + width: 10rpx;
  1577 + height: 36rpx;
  1578 + background-color: #da0035;
  1579 + margin-right: 8rpx;
  1580 +}
  1581 +
  1582 +.tb-l {
  1583 + /* line-height: 96rpx; */
  1584 +}
  1585 +
  1586 +.table_s {
  1587 + border: #e4e4e4 1rpx solid;
  1588 + box-sizing: border-box;
  1589 + font-size: 26rpx;
  1590 +}
  1591 +
  1592 +.tb_item {
  1593 + display: flex;
  1594 + /* height: 96rpx; */
  1595 + border-bottom: 1rpx solid #e4e4e4
  1596 +}
  1597 +
  1598 +.item_left {
  1599 + width: 210rpx;
  1600 + height: 100%;
  1601 + box-sizing: border-box;
  1602 + text-align: center;
  1603 + padding: 20rpx;
  1604 + background: #f9f9f9;
  1605 + border-right: 2rpx solid #e4e4e4
  1606 +}
  1607 +
  1608 +.item_left text {
  1609 + /* margin-left: 44rpx; */
  1610 +}
  1611 +
  1612 +.item_right {
  1613 + flex: 1;
  1614 + height: 100%;
  1615 + overflow: hidden;
  1616 + white-space: nowrap;
  1617 + text-overflow: ellipsis;
  1618 + padding: 20rpx;
  1619 +}
  1620 +
  1621 +.item_right text {
  1622 + /* margin-left: 66rpx; */
  1623 +}
  1624 +
  1625 +.table_s .tb-l:last-child {
  1626 + border-bottom: none;
  1627 +}
  1628 +
  1629 +.bzfu_img {
  1630 + width: 164rpx;
  1631 + height: 34rpx;
  1632 + /* margin-right: 18rpx; margin-left: 12rpx */
  1633 +}
  1634 +
  1635 +.bz_view {
  1636 + /* height:100rpx; padding: 0 34rpx 0 13rpx; */
  1637 + color: #333;
  1638 + font-size: 28rpx;
  1639 + padding: 20rpx 20rpx 20rpx 10rpx;
  1640 + /* border-bottom: 3rpx solid #eee; */
  1641 + /* border-top: 3rpx solid #eee; */
  1642 +}
  1643 +
  1644 +.bz_view view {
  1645 + width: 520rpx;
  1646 + /* max-height: 70rpx; */
  1647 + /* overflow: hidden; */
  1648 +}
  1649 +
  1650 +.bb_view {
  1651 + display: flex;
  1652 + align-items: center;
  1653 + justify-content: space-between;
  1654 + padding: 20rpx;
  1655 + color: #333;
  1656 + font-size: 30rpx;
  1657 + /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */
  1658 +}
  1659 +
  1660 +.red_bb {
  1661 + color: #d70026;
  1662 + /* min-width:158rpx;width: auto; */
  1663 +}
  1664 +
  1665 +.bg_jj {
  1666 + width: 14rpx;
  1667 + height: 14rpx;
  1668 + border-top: 2rpx solid #d70026;
  1669 + border-right: 2rpx solid #d70026;
  1670 + transform: rotateZ(45deg);
  1671 + display: inline-block;
  1672 + margin-bottom: 3rpx;
  1673 +}
  1674 +
  1675 +.bg_jj.down {
  1676 + transform: rotateZ(135deg);
  1677 +}
  1678 +
  1679 +.bg_jj.up {
  1680 + transform: rotateZ(-45deg);
  1681 + margin-top: 6rpx;
  1682 +}
  1683 +
  1684 +.bz-content {
  1685 + padding: 0 0 0 20rpx;
  1686 +}
  1687 +
  1688 +
  1689 +
  1690 +
  1691 +/* 顶部边框 */
  1692 +.topframe {
  1693 + width: 100%;
  1694 + height: 172rpx;
  1695 + flex-direction: row;
  1696 + justify-content: space-between;
  1697 + border-bottom: 6rpx solid #eeeeee;
  1698 + overflow: hidden;
  1699 +}
  1700 +
  1701 +/* 评价人边框*/
  1702 +.topframe .topframe-top {
  1703 + display: flex;
  1704 + margin-top: 40rpx;
  1705 + margin-bottom: 36rpx;
  1706 + color: #7d7d7d;
  1707 + padding-left: 20rpx;
  1708 + font-size: 32rpx;
  1709 +}
  1710 +
  1711 +/*评价人数量*/
  1712 +.topframe .topframe-top .topframe-top-val {
  1713 + margin-left: 15rpx;
  1714 +
  1715 +}
  1716 +
  1717 +.topframe-top-content {
  1718 + display: flex;
  1719 + width: 36%;
  1720 +}
  1721 +
  1722 +/* 好评 */
  1723 +.topframe-praise {
  1724 + width: 61%;
  1725 + text-align: right;
  1726 + color: #dc4355;
  1727 + font-size: 28rpx;
  1728 +}
  1729 +
  1730 +/* 按钮列表 */
  1731 +.buttem-list {
  1732 + width: 100%;
  1733 + display: flex;
  1734 + font-size: 20rpx;
  1735 + overflow: hidden;
  1736 +}
  1737 +
  1738 +.buttem-list .item {
  1739 + min-width: 17%;
  1740 + font-size: 24rpx;
  1741 + border-radius: 20rpx;
  1742 + background: #ffe3e2;
  1743 + height: 38rpx;
  1744 + text-align: center;
  1745 + line-height: 38rpx;
  1746 + margin-left: 20rpx;
  1747 + justify-content: center;
  1748 +}
  1749 +
  1750 +.buttem-list .item.red {
  1751 + color: #fff;
  1752 + background: #d60022;
  1753 +}
  1754 +
  1755 +/* 用户评价 */
  1756 +.middle {
  1757 + width: 95%;
  1758 + margin: 0 auto;
  1759 +}
  1760 +
  1761 +.middle-img-frame {
  1762 + height: 65rpx;
  1763 + display: flex;
  1764 + margin-top: 32rpx;
  1765 +
  1766 +}
  1767 +
  1768 +/* 评价的用户图片 */
  1769 +.middle-img {
  1770 + width: 60rpx;
  1771 + height: 60rpx;
  1772 + border-radius: 50%;
  1773 + -moz-border-radius: 50%;
  1774 + -webkit-border-radius: 50%;
  1775 + margin-right: 15rpx;
  1776 +}
  1777 +
  1778 +/* 评价的用户边框 */
  1779 +.middle-user-frame {
  1780 + height: 65rpx;
  1781 + overflow: hidden;
  1782 +}
  1783 +
  1784 +.middle-user {
  1785 + height: 25;
  1786 + font-size: 28rpx;
  1787 +}
  1788 +
  1789 +/* 评价图片 */
  1790 +.middle-img-two {
  1791 + width: 115rpx;
  1792 + height: 25rpx;
  1793 + text-align: center;
  1794 + margin-bottom: 20rpx;
  1795 + margin-left: 5rpx;
  1796 +}
  1797 +
  1798 +.xc-pirces {
  1799 + margin-top: 14rpx;
  1800 +}
  1801 +
  1802 +/* 评价文字 */
  1803 +.middle-font {
  1804 + font-size: 30rpx;
  1805 +
  1806 +}
  1807 +
  1808 +.iddle-goods-img {
  1809 + width: 100%;
  1810 + display: flex;
  1811 + margin-top: 22rpx;
  1812 +}
  1813 +
  1814 +/* 商品图片 */
  1815 +.goods-img {
  1816 + width: 156rpx;
  1817 + height: 156rpx;
  1818 + margin-left: 22rpx;
  1819 + height: 100%;
  1820 +}
  1821 +
  1822 +.parameter-frame {
  1823 + margin-top: 14rxp;
  1824 + margin-bottom: 14rpx;
  1825 + width: 50%;
  1826 + height: 30rpx;
  1827 +}
  1828 +
  1829 +.z_parameter {
  1830 + width: 98%;
  1831 + height: 45rpx;
  1832 + display: flex;
  1833 + line-height: 45rpx;
  1834 + margin-top: 20rpx;
  1835 + margin-bottom: 14rpx;
  1836 + justify-content: space-between;
  1837 +}
  1838 +
  1839 +.parameter-font {
  1840 + font-size: 26rpx;
  1841 +
  1842 +}
  1843 +
  1844 +/* 规格 */
  1845 +.parameter-state {
  1846 + width: 100rpx;
  1847 + font-size: 24rpx;
  1848 + color: #c4c4c4;
  1849 +}
  1850 +
  1851 +.parameter-dian {
  1852 + display: flex;
  1853 + width: 94rpx;
  1854 + height: 33rpx;
  1855 + font-size: 20rpx;
  1856 + border-radius: 20rpx;
  1857 + line-height: 33rpx;
  1858 + padding-left: 25rpx;
  1859 + border: 4rpx solid #eeeeee;
  1860 +
  1861 +}
  1862 +
  1863 +/* 点赞图片 */
  1864 +.parameter-img {
  1865 + width: 27rpx;
  1866 + height: 27rpx;
  1867 + margin-top: 3rpx;
  1868 +}
  1869 +
  1870 +.parameter-val {
  1871 + margin-left: 25rpx;
  1872 + font-size: 26rpx;
  1873 + color: #999;
  1874 +}
  1875 +
  1876 +/* 回复 */
  1877 +.reply {
  1878 + width: 95%;
  1879 + height: 120rpx;
  1880 + padding-top: 14rpx;
  1881 + border-top: 3rpx solid #eeeeee;
  1882 + margin: 0 auto;
  1883 +
  1884 +}
  1885 +
  1886 +.shop-reply {
  1887 + height: 30rpx;
  1888 + color: #d60022;
  1889 + font-size: 24rpx;
  1890 + overflow: hidden;
  1891 +}
  1892 +
  1893 +.shop-font {
  1894 + width: 94%;
  1895 + font-size: 24rpx;
  1896 + padding-top: 10rpx;
  1897 +
  1898 +}
  1899 +
  1900 +.line_bulge {
  1901 + width: 17rpx;
  1902 + height: 17rpx;
  1903 + border-top: 1rpx solid #eeeeee;
  1904 + border-left: 1rpx solid #eeeeee;
  1905 + transform: rotate(45deg);
  1906 + position: absolute;
  1907 + top: -12rpx;
  1908 + left: 50rpx;
  1909 + background: #fff;
  1910 +}
  1911 +
  1912 +
  1913 +.xc_comment {
  1914 + display: flex;
  1915 + justify-content: space-around;
  1916 + width: 100%;
  1917 + box-sizing: border-box;
  1918 + padding: 10rpx 20rpx;
  1919 + /* height: 42rpx;
  1920 + padding-left: 34rpx; */
  1921 + color: #333;
  1922 +
  1923 +}
  1924 +
  1925 +.xc_comment-have-pictures {
  1926 + width: 153rpx;
  1927 + /* height: 42rpx; */
  1928 + line-height: 42rpx;
  1929 + text-align: center;
  1930 + background: #ffe3e2;
  1931 + color: 28rpx;
  1932 + border-radius: 21rpx;
  1933 + font-size: 24rpx;
  1934 +}
  1935 +
  1936 +.xc_comment-discuss {
  1937 + width: 152rpx;
  1938 + height: 42rpx;
  1939 + line-height: 42rpx;
  1940 + text-align: center;
  1941 + background: #ffe3e2;
  1942 + color: 28rpx;
  1943 + border-radius: 20rpx;
  1944 + font-size: 24rpx;
  1945 + margin-left: 28rpx
  1946 +}
  1947 +
  1948 +.xc_comment-detail {
  1949 + display: flex;
  1950 + /* margin-top: 40rpx; */
  1951 + /* width: 524rpx; */
  1952 + /* margin-left: 34rpx; */
  1953 + border-radius: 24rpx;
  1954 + border: 2rpx solid #ebedf0;
  1955 + margin-left: 20rpx;
  1956 + box-sizing: border-box;
  1957 + /* overflow: hidden; */
  1958 +}
  1959 +
  1960 +.xc_user-img {
  1961 + border-radius: 50%;
  1962 + margin: auto 0;
  1963 +}
  1964 +
  1965 +.xc_comment-user {
  1966 + display: flex;
  1967 + /* margin-top: 22rpx;
  1968 + margin-left: 22rpx; */
  1969 +}
  1970 +
  1971 +.xc_user {
  1972 + width: 170rpx;
  1973 + height: 60rpx;
  1974 + margin-left: 6rpx;
  1975 + overflow: hidden;
  1976 +}
  1977 +
  1978 +.xc_user-name {
  1979 + /* height: 25rpx; */
  1980 +}
  1981 +
  1982 +.xc_comment-img {
  1983 + width: 22rpx;
  1984 + height: 22rpx;
  1985 + /* margin-top: 14rpx; */
  1986 + margin-right: 5rpx
  1987 +}
  1988 +
  1989 +.xc_comment-font {
  1990 + /* height: 75rpx; */
  1991 + /* margin-left: 22rpx; */
  1992 + white-space: normal;
  1993 + overflow: hidden;
  1994 + /* margin-top: 8rpx;
  1995 + line-height: 38rpx; */
  1996 +
  1997 +}
  1998 +
  1999 +.xc_comment-val {
  2000 + /* width: 88%;
  2001 + height: 30rpx;
  2002 + margin-left: 22rpx;
  2003 + display: flex;
  2004 + margin-top: 15rpx;
  2005 + margin-bottom:15rpx; */
  2006 +}
  2007 +
  2008 +.xc_comment-time {
  2009 + /* height: 30rpx; */
  2010 + font-size: 22rpx;
  2011 + color: #a5a5a5;
  2012 + overflow: hidden;
  2013 +}
  2014 +
  2015 +.xc_goods-img {
  2016 + width: 180rpx;
  2017 + height: 180rpx;
  2018 +}
  2019 +
  2020 +.xc_comment-left {
  2021 + display: inline-block;
  2022 + width: 312rpx;
  2023 + padding: 20rpx;
  2024 +}
  2025 +
  2026 +.xc_goods-img-frame {
  2027 + border-radius: 0 22rpx 22rpx 0;
  2028 + overflow: hidden;
  2029 + /* display:inline-block; */
  2030 + /* width: 40%;
  2031 + height: 90%;
  2032 + text-align: center;
  2033 + padding-top: 30rpx;
  2034 + vertical-align: top; */
  2035 +}
  2036 +
  2037 +.xc_imgs {
  2038 + width: 50rpx;
  2039 + height: 50rpx;
  2040 + border-radius: 50%;
  2041 + margin-right: 5rpx;
  2042 +}
  2043 +
  2044 +.pj_word_size {
  2045 + font-size: 28rpx
  2046 +}
  2047 +
  2048 +.pj_scroll {
  2049 + /* white-space: nowrap; */
  2050 + /* height: 324rpx; */
  2051 + /* margin-bottom: 50rpx; */
  2052 + display: flex;
  2053 + align-items: center;
  2054 + padding: 20rpx 0;
  2055 + /* box-sizing: border-box; */
  2056 + /* box-shadow: 0 8px 12px #e7e9eb; */
  2057 +}
  2058 +
  2059 +
  2060 +/*领券*/
  2061 +.three-level-word {
  2062 + font-size: 25rpx;
  2063 +}
  2064 +
  2065 +.four-level-word {
  2066 + font-size: 23rpx;
  2067 +}
  2068 +
  2069 +.cx-frame {
  2070 + /* border-top:3rpx solid #eee; */
  2071 + /* width:99%;
  2072 + height: 95rpx;
  2073 + line-height: 95rpx;
  2074 + padding-left:24rpx; */
  2075 + padding: 20rpx;
  2076 +}
  2077 +
  2078 +.cx-frame .cx-sizs {
  2079 + /* width: 68rpx; */
  2080 + /* height: 100%; */
  2081 + /* line-height: 100rpx; */
  2082 + /* overflow: hidden; */
  2083 + /* margin-left: 10rpx; */
  2084 +}
  2085 +
  2086 +.xc-coupon-fram {
  2087 + position: relative;
  2088 + margin-right: 16rpx;
  2089 + /* width:200rpx; */
  2090 + /* padding-top:30rpx; */
  2091 +
  2092 +}
  2093 +
  2094 +.xc-coupon-fram .xc-coupon {
  2095 + /* width:175rpx ;
  2096 + height: 40rpx;
  2097 + line-height: 40rpx; */
  2098 + background-color: #d60021;
  2099 + /* margin:0 auto; */
  2100 + color: #fff;
  2101 + padding: 6rpx 20rpx;
  2102 +
  2103 +}
  2104 +
  2105 +.xc-coupon-fram .xc-circular {
  2106 + width: 16rpx;
  2107 + height: 16rpx;
  2108 + background-color: white;
  2109 + position: absolute;
  2110 + top: 50%;
  2111 + /* left: -10rpx; */
  2112 + transform: translateY(-50%);
  2113 +}
  2114 +
  2115 +.xc-coupon-fram .xc-one {
  2116 + left: -8rpx;
  2117 +}
  2118 +
  2119 +.xc-coupon-fram .xc-two {
  2120 + right: -8rpx;
  2121 +}
  2122 +
  2123 +.cx-obtain-coupon {
  2124 + /* width: 65rpx;
  2125 + height: 100%;
  2126 + padding-left:15rpx; */
  2127 + color: #d70025;
  2128 + display: flex;
  2129 + align-items: center;
  2130 + /* position: absolute;
  2131 + right: 5rpx; */
  2132 +}
  2133 +
  2134 +/* 自定义弹出窗口 */
  2135 +.cx-popup {
  2136 + width: 100%;
  2137 + background: #fff;
  2138 + z-index: 35;
  2139 + border-top-left-radius: 25rpx;
  2140 + border-top-right-radius: 25rpx;
  2141 + position: fixed;
  2142 + bottom: 0;
  2143 +}
  2144 +
  2145 +.cx-popup .top {
  2146 + /* width: 90%;
  2147 + height:85rpx; */
  2148 + font-size: 32rpx;
  2149 + padding: 20rpx 0;
  2150 + border-bottom: 2rpx solid #ebedf0;
  2151 + /* padding-top: 50rpx;
  2152 + font-weight:600; */
  2153 +
  2154 +}
  2155 +
  2156 +.cx-popup .top-frame {
  2157 + /* width: 100%;
  2158 + display: flex;
  2159 + justify-content: center;
  2160 + overflow: hidden; */
  2161 +}
  2162 +
  2163 +.xc-valid-coupon {
  2164 + width: 90%;
  2165 + height: 40rpx;
  2166 + padding-top: 24rpx;
  2167 + overflow: hidden;
  2168 +}
  2169 +
  2170 +.xc-frame {
  2171 + position: relative;
  2172 +}
  2173 +
  2174 +.xc-coupon-frame {
  2175 + width: 100%;
  2176 + max-height: 560rpx;
  2177 + overflow: auto;
  2178 +
  2179 +}
  2180 +
  2181 +.xc-coupon-frame .rel:not(:first-child) {
  2182 + margin-top: 20rpx;
  2183 +}
  2184 +
  2185 +.xc-coupon-frame .coupon {
  2186 + width: 100%;
  2187 + height: 168rpx;
  2188 + border-radius: 25rpx;
  2189 + border: 2rpx solid #ffdcdc;
  2190 + overflow: hidden;
  2191 + /* margin-top:16rpx; */
  2192 + box-sizing: border-box;
  2193 +
  2194 +}
  2195 +
  2196 +/* .xc-coupon-frame .coupon ~ .coupon {
  2197 + margin-top:16rpx;
  2198 +} */
  2199 +.xc-coupon-left {
  2200 + width: 216rpx;
  2201 + /* height: 100%; */
  2202 + background-color: #ffeeef;
  2203 + border-right: 4rpx dashed #ffdbd9;
  2204 + overflow: hidden;
  2205 + /* line-height: 100%; */
  2206 + display: flex;
  2207 + flex-direction: column;
  2208 + justify-content: center;
  2209 + align-items: center;
  2210 + flex-shrink: 0;
  2211 +}
  2212 +
  2213 +.xc-money {
  2214 + color: #f30026;
  2215 + text-align: center;
  2216 +}
  2217 +
  2218 +.xc-rmb {
  2219 + /* width:44rpx;
  2220 + padding-top:7rpx; */
  2221 +}
  2222 +
  2223 +.xc-money-frame {
  2224 + /* margin-left:35rpx;
  2225 + margin-top:48rpx; */
  2226 +
  2227 +}
  2228 +
  2229 +.xc-spacing {
  2230 + letter-spacing: 4rpx;
  2231 +}
  2232 +
  2233 +.xc-circular-one {
  2234 + position: absolute;
  2235 + top: -15rpx;
  2236 + left: 205rpx;
  2237 + width: 30rpx;
  2238 + height: 30rpx;
  2239 + background: #fff;
  2240 + overflow: hidden;
  2241 +}
  2242 +
  2243 +.xc-circular-two {
  2244 + position: absolute;
  2245 + bottom: -15rpx;
  2246 + /* top:150rpx; */
  2247 + left: 205rpx;
  2248 + width: 30rpx;
  2249 + height: 30rpx;
  2250 + background: #fff;
  2251 +}
  2252 +
  2253 +.xc-detail-coupon {
  2254 + /* margin-left: 22rpx;
  2255 + overflow: hidden;
  2256 + padding-top: 43rpx; */
  2257 + /* display: flex;
  2258 + align-items: center; */
  2259 +}
  2260 +
  2261 +.xc-coupon-right {
  2262 + /* width: 455rpx;
  2263 + height: 100%; */
  2264 + background: #fffaf9;
  2265 + padding: 20rpx;
  2266 + box-sizing: border-box;
  2267 + width: 100%;
  2268 + justify-content: space-between;
  2269 + align-items: center;
  2270 +}
  2271 +
  2272 +.xc-below {
  2273 + margin-top: 20rpx;
  2274 +
  2275 +}
  2276 +
  2277 +.xc-get {
  2278 +
  2279 + width: 140rpx;
  2280 + /* height: 48rpx; */
  2281 + color: #fff;
  2282 + text-align: center;
  2283 + border-radius: 27rpx;
  2284 + line-height: 54rpx;
  2285 + /* margin-left:20rpx; */
  2286 +}
  2287 +
  2288 +.background {
  2289 + background: #f40028;
  2290 +}
  2291 +
  2292 +/*--不可使用--*/
  2293 +.background.nouse {
  2294 + background: gainsboro;
  2295 +}
  2296 +
  2297 +.xc-background {
  2298 + background: #b9b9b9;
  2299 +}
  2300 +
  2301 +
  2302 +.cx-confirm {
  2303 + width: 100%;
  2304 + padding: 20rpx;
  2305 + box-sizing: border-box;
  2306 + /* height: 160rpx; */
  2307 +
  2308 +}
  2309 +
  2310 +.cx-confirm .confirm {
  2311 + /* width: 372rpx;
  2312 + height: 60rpx; */
  2313 + background-color: #f40026;
  2314 + color: #fff;
  2315 + border-radius: 10rpx;
  2316 + line-height: 80rpx;
  2317 + font-size: 28rpx;
  2318 +
  2319 +}
  2320 +
  2321 +.up {
  2322 + animation: up .7s;
  2323 +}
  2324 +
  2325 +.down {
  2326 + animation: down 1s;
  2327 +}
  2328 +
  2329 +@keyframes up {
  2330 + 0% {
  2331 + transform: translateY(550rpx);
  2332 + }
  2333 +
  2334 + 100% {
  2335 + transform: translateY(0);
  2336 + }
  2337 +}
  2338 +
  2339 +@keyframes down {
  2340 + 0% {
  2341 + transform: translateY(0);
  2342 + }
  2343 +
  2344 + 100% {
  2345 + transform: translateY(550rpx);
  2346 + }
  2347 +}
  2348 +
  2349 +
  2350 +/* 分享 */
  2351 +.icon-share {
  2352 + font-size: 42rpx;
  2353 + color: #d60021;
  2354 + line-height: 1;
  2355 +}
  2356 +
  2357 +.xc-share-frame {
  2358 + /* width: 129rpx;
  2359 + height: 48rpx;
  2360 + border-top-left-radius: 18rpx;
  2361 + border-bottom-left-radius: 18rpx; */
  2362 + /* background: #d60021; */
  2363 + /* position:absolute;
  2364 + left:622rpx;
  2365 + top:-37rpx;
  2366 + line-height:50rpx;
  2367 + margin-top:52rpx; */
  2368 +}
  2369 +
  2370 +.xc-share-frame-jieti {
  2371 + width: 129rpx;
  2372 + height: 48rpx;
  2373 + border-top-left-radius: 18rpx;
  2374 + border-bottom-left-radius: 18rpx;
  2375 + background: #d60021;
  2376 + line-height: 50rpx;
  2377 +}
  2378 +
  2379 +.xc-share-frame .share-font,
  2380 +.xc-share-frame-jieti .share-font {
  2381 + font-size: 32rpx;
  2382 + color: #fff;
  2383 + margin-left: 10rpx;
  2384 +
  2385 +}
  2386 +
  2387 +
  2388 +.xc-share-frame .share-frame,
  2389 +.xc-share-frame-jieti .share-frame {
  2390 + width: 30rpx;
  2391 + height: 30rpx;
  2392 + margin-top: 9rpx;
  2393 + margin-left: 10rpx;
  2394 +
  2395 +}
  2396 +
  2397 +.xc-share {
  2398 + width: 90%;
  2399 + height: 800rpx;
  2400 + background: #fff;
  2401 + z-index: 35;
  2402 +}
  2403 +
  2404 +.img-frame {
  2405 + position: absolute;
  2406 + top: 175rpx;
  2407 + left: 100rpx;
  2408 + z-index: 55;
  2409 + overflow: hidden;
  2410 +
  2411 +}
  2412 +
  2413 +.img-frame .img {
  2414 + width: 100rpx;
  2415 + height: 100rpx;
  2416 +
  2417 +}
  2418 +
  2419 +.xc-share .top {
  2420 + height: 85rpx;
  2421 + width: 100%;
  2422 + border-bottom: 4rpx dashed #f5f5f5;
  2423 + overflow: hidden;
  2424 +
  2425 +}
  2426 +
  2427 +.xc-share .name {
  2428 + font-size: 25rpx;
  2429 + margin-left: 180rpx;
  2430 + color: #000;
  2431 +
  2432 +}
  2433 +
  2434 +.xc-share .recommend {
  2435 + width: 110rpx;
  2436 + height: 12rpx;
  2437 + color: #fff;
  2438 + background: #d60021;
  2439 + font-size: 20rpx;
  2440 + border-radius: 25rpx;
  2441 + margin-left: 10rpx;
  2442 + line-height: 37rpx;
  2443 +}
  2444 +
  2445 +.xc-left-circle {
  2446 + width: 40rpx;
  2447 + height: 25rpx;
  2448 + position: absolute;
  2449 + top: 280rpx;
  2450 + left: 29rpx;
  2451 + z-index: 55;
  2452 + background: #727272;
  2453 + border-radius: 50rpx 50rpx 0 0;
  2454 + transform: rotate(90deg);
  2455 +
  2456 +}
  2457 +
  2458 +.xc-right-circle {
  2459 + width: 40rpx;
  2460 + height: 25rpx;
  2461 + position: absolute;
  2462 + top: 280rpx;
  2463 + left: 683rpx;
  2464 + z-index: 55;
  2465 + background: #727272;
  2466 + border-radius: 50rpx 50rpx 0 0;
  2467 + transform: rotate(270deg);
  2468 +
  2469 +}
  2470 +
  2471 +.xc-circle-frame {
  2472 + width: 25rpx;
  2473 + height: 40rpx;
  2474 + overflow: hidden;
  2475 +}
  2476 +
  2477 +.xc-goods-name {
  2478 + width: 95%;
  2479 + font-size: 35rpx;
  2480 + padding-left: 75rpx;
  2481 + height: 50rpx;
  2482 + padding-top: 10rpx;
  2483 + color: #000;
  2484 +
  2485 +}
  2486 +
  2487 +.xc-good-img {
  2488 + width: 100%;
  2489 + height: 381rpx;
  2490 + margin-top: 5rpx;
  2491 +
  2492 +}
  2493 +
  2494 +.xc-good-img .img {
  2495 + width: 90%;
  2496 + height: 381rpx;
  2497 +}
  2498 +
  2499 +.xc-ensure-frame {
  2500 + width: 90%;
  2501 + height: 60rpx;
  2502 + border-bottom: 2rpx solid #d8d6d7;
  2503 +}
  2504 +
  2505 +.xc-ensure {
  2506 + width: 30%;
  2507 + height: 60rpx;
  2508 + line-height: 60rpx;
  2509 +}
  2510 +
  2511 +xc-ensure-div {
  2512 + width: 100%;
  2513 + height: 60rpx;
  2514 +}
  2515 +
  2516 +.xc-ensure .word {
  2517 + font-size: 25rpx;
  2518 + color: #d30025;
  2519 + margin-left: 9rpx;
  2520 +
  2521 +}
  2522 +
  2523 +.xc-ensure .img {
  2524 + width: 25rpx;
  2525 + height: 25rpx;
  2526 + margin-top: 18rpx;
  2527 +
  2528 +}
  2529 +
  2530 +.xc-bottmon {
  2531 + width: 100%;
  2532 +}
  2533 +
  2534 +.xc-bottmon .xc-left {
  2535 + width: 55%;
  2536 + margin-top: 30rpx;
  2537 + padding-left: 20rpx;
  2538 +
  2539 +}
  2540 +
  2541 +.xc-left .xc-top {
  2542 + font-size: 25rpx;
  2543 + height: 40rpx;
  2544 + line-height: 40rpx;
  2545 + color: #000;
  2546 +}
  2547 +
  2548 +.xc-left .xc-middle {
  2549 + font-size: 25rpx;
  2550 + color: #b2b2b2;
  2551 + height: 30rpx;
  2552 + line-height: 30rpx;
  2553 +}
  2554 +
  2555 +.xc-left .xc-buttem {
  2556 + font-size: 25rpx;
  2557 + height: 100rpx;
  2558 + line-height: 100rpx;
  2559 + color: #000;
  2560 +}
  2561 +
  2562 +.xc-ensure-right {
  2563 + width: 30%;
  2564 +}
  2565 +
  2566 +.xc-qrcode {
  2567 + width: 120rpx;
  2568 + height: 120rpx;
  2569 + margin-top: 43rpx;
  2570 + margin-left: 80rpx;
  2571 +
  2572 +}
  2573 +
  2574 +.xc-close {
  2575 + width: 50rpx;
  2576 + height: 50rpx;
  2577 + border-radius: 50%;
  2578 + border: 3rpx solid #fff;
  2579 + text-align: center;
  2580 + line-height: 41rpx;
  2581 + font-size: 50rpx;
  2582 + color: #fff;
  2583 + font-weight: lighter;
  2584 + font-family: MingLiU;
  2585 + transform: rotate(270deg);
  2586 + overflow: auto;
  2587 + margin-top: 6rpx;
  2588 + margin-bottom: 1rpx;
  2589 +
  2590 +}
  2591 +
  2592 +.xc-close-frame {
  2593 + position: absolute;
  2594 + margin-top: 30rpx;
  2595 + width: 90%;
  2596 + display: flex;
  2597 + justify-content: center;
  2598 + overflow: auto;
  2599 +
  2600 +}
  2601 +
  2602 +.xc-guanbi {
  2603 + width: 100%;
  2604 + height: 80rpx;
  2605 + overflow: hidden;
  2606 +}
  2607 +
  2608 +
  2609 +/* 自定义弹出窗口 */
  2610 +.cx-popup {
  2611 + width: 100%;
  2612 + background: #fff;
  2613 + z-index: 35;
  2614 + border-top-left-radius: 10rpx;
  2615 + border-top-right-radius: 10rpx;
  2616 + position: fixed;
  2617 + bottom: 0;
  2618 +}
  2619 +
  2620 +.xc-top-content {
  2621 + width: 88%;
  2622 + height: 85rpx;
  2623 + padding-top: 50rpx;
  2624 + font-size: 36rpx;
  2625 +}
  2626 +
  2627 +
  2628 +.xc-valid-coupon {
  2629 + width: 90%;
  2630 + height: 40rpx;
  2631 + padding-top: 24rpx;
  2632 + overflow: hidden;
  2633 +}
  2634 +
  2635 +.xc-frame {
  2636 + /* width: 100%;
  2637 + margin-top:20rpx; */
  2638 + padding: 20rpx;
  2639 +}
  2640 +
  2641 +.xc-frame .list-frame {
  2642 + width: 90%;
  2643 + height: 100%;
  2644 + overflow-y: scroll;
  2645 +
  2646 + margin-top: 20rpx;
  2647 +
  2648 +}
  2649 +
  2650 +.xc-close-frame {
  2651 + margin-top: 30rpx;
  2652 + width: 15%;
  2653 + display: flex;
  2654 +}
  2655 +
  2656 +.xc-close {
  2657 + width: 70rpx;
  2658 + height: 70rpx;
  2659 + border-radius: 50%;
  2660 + border: 5rpx solid #a5a5a7;
  2661 + text-align: center;
  2662 + line-height: 55rpx;
  2663 + font-size: 80rpx;
  2664 + color: #a5a5a7;
  2665 + font-family: "微软正黑体";
  2666 + margin-top: 8rpx;
  2667 +
  2668 +}
  2669 +
  2670 +.xc-money {
  2671 + color: #ff0013;
  2672 +}
  2673 +
  2674 +.xc-money-frame {
  2675 + /* margin-left:35rpx; */
  2676 +
  2677 +}
  2678 +
  2679 +.xc-coupon-effect {
  2680 + width: 99%;
  2681 + height: 128rpx;
  2682 + border-bottom: 3rpx solid #ddd;
  2683 +
  2684 +
  2685 +}
  2686 +
  2687 +.xc-goods-coupon {
  2688 + width: 80%;
  2689 + height: 100%;
  2690 +
  2691 +}
  2692 +
  2693 +.xc-title {
  2694 + width: 50%;
  2695 + margin-left: 222rpx;
  2696 +
  2697 +}
  2698 +
  2699 +.xc-coupon-money {
  2700 + color: #c91e31;
  2701 + font-size: 35rpx;
  2702 + margin-top: 20rpx;
  2703 +
  2704 +}
  2705 +
  2706 +.xc-coupon-time {
  2707 + height: 50rpx;
  2708 + font-size: 27rpx;
  2709 + color: #a4a4a4;
  2710 +}
  2711 +
  2712 +.xc-coupon-time .time {
  2713 + margin-left: 15rpx;
  2714 + font-size: 27rpx;
  2715 +}
  2716 +
  2717 +.xc-coupon-selection {
  2718 + width: 99%;
  2719 + height: 100%;
  2720 +
  2721 +
  2722 +}
  2723 +
  2724 +.xc-confirm {
  2725 + width: 90%;
  2726 + height: 75rpx;
  2727 + margin: 0 auto;
  2728 + background: #c41830;
  2729 + color: #fff;
  2730 + border-radius: 10rpx;
  2731 + font-size: 30rpx;
  2732 + margin-top: 50rpx;
  2733 +}
  2734 +
  2735 +.xc-not-Selection {
  2736 + width: 60rpx;
  2737 + height: 60rpx;
  2738 + background: #eeeeee;
  2739 +}
  2740 +
  2741 +/*---------------视频图片---------------*/
  2742 +.xc-imageCount {
  2743 + width: 95rpx;
  2744 + height: 50rpx;
  2745 + background-color: rgba(0, 0, 0, 0.3);
  2746 + border-radius: 40rpx;
  2747 + line-height: 50rpx;
  2748 + color: #fff;
  2749 + text-align: center;
  2750 + font-size: 26rpx;
  2751 + position: absolute;
  2752 +
  2753 + right: 23rpx;
  2754 + bottom: 21rpx;
  2755 +}
  2756 +
  2757 +
  2758 +/* 视频图片的边框 */
  2759 +.xc-videos-picture {
  2760 + width: 100%;
  2761 + height: 750rpx;
  2762 +}
  2763 +
  2764 +/* 视频 */
  2765 +.xc-videos {
  2766 + width: 100%;
  2767 + height: 544rpx;
  2768 +
  2769 +
  2770 +}
  2771 +
  2772 +/* 点击视频或图片 */
  2773 +.xc-video-picture {
  2774 +
  2775 + bottom: 20rpx;
  2776 + left: 0rpx;
  2777 + display: flex;
  2778 + align-items: center;
  2779 + justify-content: center;
  2780 + width: 45%;
  2781 + height: 60rpx;
  2782 + margin-left: 215rpx;
  2783 +
  2784 +}
  2785 +
  2786 +.xc-video-button:before {
  2787 + content: "";
  2788 + position: absolute;
  2789 + left: 48%;
  2790 + top: 40%;
  2791 + width: 0;
  2792 + height: 0;
  2793 + margin-left: -36rpx;
  2794 + margin-top: -10rpx;
  2795 + border-width: 13rpx;
  2796 + border-style: dashed;
  2797 + border-color: transparent transparent transparent #fff;
  2798 + font-size: 0;
  2799 + line-height: 0;
  2800 + z-index: 2;
  2801 + -webkit-backface-visibility: hidden;
  2802 +}
  2803 +
  2804 +.xc-video-buttons:before {
  2805 + content: "";
  2806 + position: absolute;
  2807 + left: 50%;
  2808 + top: 41%;
  2809 + width: 0;
  2810 + height: 0;
  2811 + margin-left: -36rpx;
  2812 + margin-top: -10rpx;
  2813 + border-width: 13rpx;
  2814 + border-style: dashed;
  2815 + border-color: transparent transparent transparent #000;
  2816 + font-size: 0;
  2817 + line-height: 0;
  2818 + z-index: 2;
  2819 + -webkit-backface-visibility: hidden;
  2820 +}
  2821 +
  2822 +.xc-video {
  2823 + /* width:100rpx; */
  2824 + /* height: 50rpx;
  2825 + line-height: 50rpx; */
  2826 + text-align: center;
  2827 + /* margin-left:-30rpx; */
  2828 +
  2829 +
  2830 +}
  2831 +
  2832 +/* 图片 */
  2833 +.xc-picture {
  2834 + color: #000;
  2835 + background: #dcdcdc;
  2836 + width: 94rpx;
  2837 + height: 45rpx;
  2838 + font-size: 25rpx;
  2839 + border-radius: 25rpx;
  2840 + font-family: 'SimHei', Arial;
  2841 + text-align: center;
  2842 + line-height: 45rpx;
  2843 + margin-left: 53rpx
  2844 +}
  2845 +
  2846 +/* 点击视频 */
  2847 +.xc-video-button {
  2848 + position: relative;
  2849 + color: #000;
  2850 + background: #dcdcdc;
  2851 + width: 85rpx;
  2852 + height: 45rpx;
  2853 + line-height: 45rpx;
  2854 + font-size: 30rpx;
  2855 + border-radius: 25rpx;
  2856 + font-family: 'SimHei', Arial;
  2857 + padding-left: 11rpx;
  2858 +}
  2859 +
  2860 +
  2861 +.xc-sn {
  2862 + color: #fff;
  2863 + background: #c7161e;
  2864 + border-color: transparent transparent transparent #fff;
  2865 +}
  2866 +
  2867 +/* 图片 */
  2868 +.xc-pictures {
  2869 + width: 100%;
  2870 + height: 529rpx;
  2871 +
  2872 +}
  2873 +
  2874 +/*视频封面的图片 */
  2875 +.xc-picturess {
  2876 + position: relative;
  2877 + width: 100%;
  2878 + height: 529rpx;
  2879 +}
  2880 +
  2881 +/* 播放 */
  2882 +.xc-play {
  2883 + width: 130rpx;
  2884 + height: 130rpx;
  2885 + position: absolute;
  2886 + top: 207rpx;
  2887 + left: 309rpx;
  2888 +}
  2889 +
  2890 +.xc-video-buttons {
  2891 + position: relative;
  2892 + color: #000;
  2893 + background: #dcdcdc;
  2894 + width: 85rpx;
  2895 + height: 45rpx;
  2896 + line-height: 45rpx;
  2897 + font-size: 30rpx;
  2898 + border-radius: 25rpx;
  2899 + font-family: 'SimHei', Arial;
  2900 + padding-left: 11rpx;
  2901 +}
  2902 +
  2903 +
  2904 +.wsize {
  2905 + font-size: 32rpx
  2906 +}
  2907 +
  2908 +.five-level-word {
  2909 + font-size: 24rpx;
  2910 +}
  2911 +
  2912 +
  2913 +/*-- 推荐商品 --*/
  2914 +.xc-goods {
  2915 + height: auto;
  2916 + background: #f2f2f2;
  2917 + padding: 0 20rpx;
  2918 + margin-top: -25rpx;
  2919 + padding-bottom: 20rpx
  2920 +}
  2921 +
  2922 +.xc-goods-recommend {
  2923 + border-radius: 20rpx;
  2924 + width: 345rpx;
  2925 + height: 450rpx;
  2926 + margin-top: 25rpx;
  2927 + display: inline-block;
  2928 +
  2929 +}
  2930 +
  2931 +.xc-goods-recommend.ml {
  2932 + margin-left: 22rpx
  2933 +}
  2934 +
  2935 +.xc-goods-recommend .xc-goods-imgs {
  2936 + width: 100%;
  2937 + height: 325rpx;
  2938 + border-radius: 20rpx 20rpx 0 0;
  2939 +}
  2940 +
  2941 +.xc-goods-bottom {
  2942 + width: 345rpx;
  2943 + height: 134rpx;
  2944 + background: #fff;
  2945 + border-radius: 0 0 20rpx 20rpx;
  2946 + bottom: -8rpx;
  2947 + left: 0rpx;
  2948 +}
  2949 +
  2950 +.xc-goods-bottom .monry-frame {
  2951 + width: 283rpx;
  2952 + height: 52rpx;
  2953 + padding-left: 24rpx;
  2954 +
  2955 +}
  2956 +
  2957 +.xc-good-explain {
  2958 + width: 283rpx;
  2959 + height: 60rpx;
  2960 + word-break: normal;
  2961 + margin-left: 30rpx;
  2962 + font-size: 26rpx;
  2963 + line-height: 30rpx;
  2964 + margin-top: 5rpx;
  2965 +}
  2966 +
  2967 +.money-color-val {
  2968 + color: #c6172f;
  2969 +}
  2970 +
  2971 +.rmb-symbol {
  2972 + line-height: 81rpx;
  2973 + height: 53rpx;
  2974 + font-size: 28rpx;
  2975 +}
  2976 +
  2977 +.xc-original-price {
  2978 + color: #c0c0c0;
  2979 +}
  2980 +
  2981 +/* 文字中间加线条 */
  2982 +.word-lines {
  2983 + text-decoration: line-through;
  2984 + line-height: 90rpx;
  2985 + margin-left: 10rpx;
  2986 + font-size: 20rpx;
  2987 +}
  2988 +
  2989 +.xc-linellae-frame {
  2990 + width: 100%;
  2991 + height: 70rpx;
  2992 + background: #f2f2f2;
  2993 +}
  2994 +
  2995 +.xc-linellae-frame .xc-linellae {
  2996 + width: 386rpx;
  2997 + height: 1rpx;
  2998 + border-bottom: 1rpx solid #ebedf0;
  2999 +}
  3000 +
  3001 +.xc-recommend-frame {
  3002 + background: #f2f2f2;
  3003 + width: 97rpx;
  3004 + height: 100%;
  3005 + padding-left: 10rpx;
  3006 +}
  3007 +
  3008 +.xc-recommend-frame .xc-recommend {
  3009 + width: 35rpx;
  3010 + height: 27rpx;
  3011 +}
  3012 +
  3013 +.xc-recommend-frame .xc-recommend-word {
  3014 + width: 58rpx;
  3015 + font-size: 24rpx;
  3016 + color: #a9a9a9;
  3017 + margin-left: 5rpx;
  3018 + margin-bottom: 5rpx;
  3019 + margin-top: 1rpx;
  3020 +
  3021 +}
  3022 +
  3023 +.xc-price-frame {
  3024 + color: #ec0022;
  3025 + align-items: baseline;
  3026 + /* height:44rpx; */
  3027 +}
  3028 +
  3029 +.xc-price-frame .sign {
  3030 + margin-top: 19rpx;
  3031 + margin-left: -4px;
  3032 +}
  3033 +
  3034 +.xc-val-price {
  3035 + margin-left: 24rpx;
  3036 + color: #ec0022;
  3037 + padding-top: 13rpx;
  3038 +}
  3039 +
  3040 +.xc-val-price .save {
  3041 + border-radius: 10rpx;
  3042 + margin-top: 5rpx;
  3043 + background: #fed2d9;
  3044 + min-width: 230rpx;
  3045 + height: 40rpx;
  3046 + line-height: 40rpx;
  3047 + width: auto;
  3048 + padding-left: 12rpx;
  3049 + padding-right: 12rpx;
  3050 +
  3051 +}
  3052 +
  3053 +.xc-unit-price {
  3054 + margin-top: 25rpx;
  3055 + padding-left: -4rpx;
  3056 +
  3057 +}
  3058 +
  3059 +.xc-explain {
  3060 + color: #292929;
  3061 + width: 542rpx;
  3062 + margin: 10rpx 0 20rpx;
  3063 + width: 100%;
  3064 + font-weight: bold;
  3065 +}
  3066 +
  3067 +.xc-item {
  3068 + width: 16%;
  3069 + font-size: 26rpx;
  3070 + color: #666;
  3071 + margin-right: 5rpx;
  3072 +}
  3073 +
  3074 +.xc-item .yuan {
  3075 + width: 38rpx;
  3076 + height: 38rpx;
  3077 + line-height: 38rpx;
  3078 + border: 1rpx solid #f3f1f2;
  3079 + margin-left: 33rpx;
  3080 +
  3081 +}
  3082 +
  3083 +.xc-item .word {
  3084 + width: 104rpx;
  3085 + margin-top: 16rpx;
  3086 + color: #363636;
  3087 + font-weight: 600;
  3088 +
  3089 +}
  3090 +
  3091 +.xc-item .circle-color {
  3092 + background: #d60024;
  3093 + color: #fff;
  3094 +}
  3095 +
  3096 +.xc-item .circle-color1 {
  3097 + background: #fefefe;
  3098 + color: #666666;
  3099 +}
  3100 +
  3101 +.link {
  3102 + height: 6rpx;
  3103 + width: 180rpx;
  3104 + top: 54rpx;
  3105 + left: 32px;
  3106 +}
  3107 +
  3108 +.link1 {
  3109 + height: 6rpx;
  3110 + width: 166rpx;
  3111 + top: 54rpx;
  3112 + left: 264rpx;
  3113 +}
  3114 +
  3115 +.link2 {
  3116 + height: 6rpx;
  3117 + width: 157rpx;
  3118 + top: 54rpx;
  3119 + right: 87rpx;
  3120 +}
  3121 +
  3122 +.link-color-red {
  3123 + background: #d60024;
  3124 +}
  3125 +
  3126 +.link-color {
  3127 + background: #e5e5e5;
  3128 +}
  3129 +
  3130 +.xc-qt-price {
  3131 + top: -15rpx;
  3132 + left: 25rpx;
  3133 + color: #fff;
  3134 +}
  3135 +
  3136 +.xc-qt-price .xc-qtunit-price {
  3137 + margin-left: 6rpx;
  3138 + margin-top: -4rpx;
  3139 +}
  3140 +
  3141 +.xc-nanber {
  3142 + top: -25rpx;
  3143 + left: 289rpx;
  3144 +
  3145 +}
  3146 +
  3147 +.xc-qtsign {
  3148 + margin-top: 5rpx;
  3149 +
  3150 +}
  3151 +
  3152 +.xc-people-img {
  3153 + height: 36rpx;
  3154 + width: 36rpx;
  3155 + background: #fff;
  3156 + border-radius: 7rpx;
  3157 +
  3158 +}
  3159 +
  3160 +.xc-people-img .imgs {
  3161 + width: 28rpx;
  3162 + height: 28rpx;
  3163 + margin-top: 4rpx;
  3164 +
  3165 +}
  3166 +
  3167 +.xc-people-val {
  3168 +
  3169 + height: 32rpx;
  3170 + border-top: 1rpx solid #fff;
  3171 + border-bottom: 1rpx solid #fff;
  3172 + border-right: 1rpx solid #fff;
  3173 + border-radius: 0 7rpx 7rpx 0;
  3174 + line-height: 32rpx;
  3175 + margin-left: -6rpx;
  3176 + padding: 0 12rpx;
  3177 +}
  3178 +
  3179 +.word-color {
  3180 + color: #d70024;
  3181 +}
  3182 +
  3183 +.word-color-lan {
  3184 + color: #0393e1;
  3185 +}
  3186 +
  3187 +.pt_view .hy-stop {
  3188 + top: -23rpx;
  3189 + right: 56rpx;
  3190 +}
  3191 +
  3192 +.xc-time-val {
  3193 + width: 36rpx;
  3194 + height: 36rpx;
  3195 + border-radius: 7rpx;
  3196 + line-height: 36rpx;
  3197 +}
  3198 +
  3199 +.xc-time {
  3200 + margin-right: 10rpx;
  3201 + margin-left: 10rpx;
  3202 + margin-top: -32rpx;
  3203 +}
  3204 +
  3205 +.xc-goods-explain {
  3206 + width: 100%;
  3207 + /* padding-left:30rpx;
  3208 + margin-left:-9rpx;
  3209 + height: 150rpx */
  3210 +}
  3211 +
  3212 +.xc-partner-frame {
  3213 + border-bottom: 2rpx solid #eee;
  3214 + width: 100%;
  3215 + padding: 20rpx;
  3216 + /* height:56rpx; */
  3217 + box-sizing: border-box;
  3218 +}
  3219 +
  3220 +.xc-person-number {
  3221 + width: 120rpx;
  3222 + color: #999999;
  3223 + padding-left: 8rpx;
  3224 + text-align: left
  3225 +}
  3226 +
  3227 +.xc-miaosha-time {
  3228 + right: 17rpx;
  3229 + top: 55rpx;
  3230 +}
  3231 +
  3232 +.pd_top1 {
  3233 + padding-top: 10rpx
  3234 +}
  3235 +
  3236 +.s_ms_bth {
  3237 + margin-top: 85rpx
  3238 +}
  3239 +
  3240 +
  3241 +.no_pj_list {
  3242 + text-align: center;
  3243 + width: 100%;
  3244 + color: #999;
  3245 + margin: 30rpx 0;
  3246 + display: inline-block;
  3247 + font-size: 28rpx
  3248 +}
  3249 +
  3250 +/* 门店地址 */
  3251 +.xc-address_frame {
  3252 + /* border-top:1rpx solid #eee; */
  3253 + width: 100%;
  3254 + height: auto;
  3255 + padding: 20rpx;
  3256 + box-sizing: border-box;
  3257 +}
  3258 +
  3259 +.on_height {
  3260 + height: 90rpx;
  3261 +}
  3262 +
  3263 +.sn_height {
  3264 + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */
  3265 +}
  3266 +
  3267 +.xc-address_frame .address_frame {
  3268 + width: 100%;
  3269 + /* padding-left: 10rpx;
  3270 +margin: auto; */
  3271 +
  3272 +}
  3273 +
  3274 +.shop_name {}
  3275 +
  3276 +.stores-img {
  3277 + width: 28rpx;
  3278 + height: 28rpx;
  3279 + margin-right: 10rpx;
  3280 +}
  3281 +
  3282 +.shop_name {
  3283 + margin-right: 10rpx;
  3284 +}
  3285 +.shop_name.max{
  3286 + max-width:370rpx; flex-shrink: 0;
  3287 +}
  3288 +
  3289 +
  3290 +.address {
  3291 + /* width: 100%;
  3292 + margin-top: 5rpx;
  3293 + margin-bottom: 5rpx; */
  3294 +}
  3295 +
  3296 +.distance {
  3297 + padding-left: 20rpx;
  3298 + padding-right: 20rpx;
  3299 + background: #eee;
  3300 + border-radius: 20rpx;
  3301 + /* margin-right: 5rpx; */
  3302 + color: #999;
  3303 + height: 38rpx;
  3304 + line-height: 38rpx;
  3305 + position: relative;
  3306 + top: 5rpx;
  3307 +
  3308 +}
  3309 +
  3310 +/* 选择门店的弹窗 */
  3311 +.mongolia-layer {
  3312 + position: fixed;
  3313 + left: 0;
  3314 + top: 0;
  3315 + right: 0;
  3316 + bottom: 0;
  3317 + z-index: 11;
  3318 + background: rgba(0, 0, 0, 0.4);
  3319 + width: 100%;
  3320 + height: 91.9%;
  3321 +
  3322 +}
  3323 +
  3324 +.popup-frame {
  3325 + position: fixed;
  3326 + z-index: 20;
  3327 + background: white;
  3328 + width: 100%;
  3329 + border-radius: 20rpx 20rpx 0 0;
  3330 + height: auto;
  3331 + bottom: 0;
  3332 +}
  3333 +
  3334 +.popup-top {
  3335 + border-bottom: 1rpx solid #eee;
  3336 + height: 155rpx;
  3337 + width: 95%;
  3338 + margin: auto;
  3339 + line-height: 155rpx;
  3340 +
  3341 +}
  3342 +
  3343 +.bg_rights {
  3344 + border-top: 2rpx solid;
  3345 + border-right: 2rpx solid;
  3346 + transform: rotate(45deg);
  3347 + display: inline-block;
  3348 + width: 15rpx;
  3349 + height: 15rpx;
  3350 + border-color: #da0b31;
  3351 +}
  3352 +
  3353 +.modal-closes {
  3354 + position: absolute;
  3355 + right: 30rpx;
  3356 + top: -15rpx;
  3357 + height: 25rpx;
  3358 +
  3359 +}
  3360 +
  3361 +.choose_more {
  3362 + margin-top: 40rpx;
  3363 + margin-right: 20rpx;
  3364 +
  3365 +}
  3366 +
  3367 +.choose_mores {
  3368 + margin-top: 30rpx;
  3369 + margin-right: 15rpx;
  3370 +
  3371 +}
  3372 +
  3373 +.store-list {
  3374 + width: 95%;
  3375 + min-height: 300rpx;
  3376 + overflow-y: scroll;
  3377 + margin: auto;
  3378 + max-height: 610rpx;
  3379 +}
  3380 +
  3381 +.store-list .store_choose {
  3382 + width: 100%;
  3383 + height: 120rpx;
  3384 + line-height: 125rpx;
  3385 + border-bottom: 1rpx solid #eee;
  3386 +
  3387 +}
  3388 +
  3389 +.store-list .store_choose .store {
  3390 + width: 100%;
  3391 + margin: auto;
  3392 + line-height: 37rpx;
  3393 + padding-left: 20rpx;
  3394 +
  3395 +}
  3396 +
  3397 +.xc-hook {
  3398 + width: 35rpx;
  3399 + height: 35rpx;
  3400 + transform: rotate(-145deg);
  3401 + line-height: 37rpx;
  3402 + text-align: center;
  3403 +}
  3404 +
  3405 +.xc-hooks {
  3406 + width: 30rpx;
  3407 + height: 30rpx;
  3408 + border: 1rpx solid #999;
  3409 +}
  3410 +
  3411 +.address-frame {
  3412 + width: 93%;
  3413 + margin-left: 7rpx;
  3414 +
  3415 +}
  3416 +
  3417 +.nearby_store {
  3418 + margin-left: 17rpx;
  3419 +}
  3420 +
  3421 +.address_name {
  3422 + margin-right: 10rpx;
  3423 + width: 360rpx;
  3424 +
  3425 +}
  3426 +
  3427 +.address-val {
  3428 + height: 38rpx;
  3429 + line-height: 38rpx;
  3430 +
  3431 +}
  3432 +
  3433 +.store-bottom {
  3434 + width: 85%;
  3435 + margin: auto;
  3436 + height: 90rpx;
  3437 +}
  3438 +
  3439 +.determine {
  3440 + width: 260rpx;
  3441 + height: 55rpx;
  3442 + border-radius: 50rpx;
  3443 + line-height: 55rpx;
  3444 +}
  3445 +
  3446 +.default {
  3447 + width: 260rpx;
  3448 + height: 55rpx;
  3449 + border: 3rpx solid #c8c8c8;
  3450 + border-radius: 50rpx;
  3451 + line-height: 55rpx;
  3452 +}
  3453 +
  3454 +.store-bottom-frame {
  3455 + width: 95%;
  3456 + margin: auto;
  3457 +
  3458 +}
  3459 +
  3460 +/* 门店分类列表 */
  3461 +.sort_store_list {
  3462 + max-height: 700rpx;
  3463 + overflow: hidden;
  3464 + overflow-y: scroll;
  3465 + width: 95%;
  3466 + margin: auto;
  3467 +}
  3468 +
  3469 +.sort_store_list .sort-store-frame {
  3470 + width: 100%;
  3471 + height: 100rpx;
  3472 + line-height: 100rpx;
  3473 + border-bottom: 1rpx solid #eee;
  3474 +
  3475 +}
  3476 +
  3477 +.sort_store_list .sort-store-frame .sort-store {
  3478 + width: 94.5%;
  3479 + margin: auto;
  3480 +}
  3481 +
  3482 +.black_rights-frame {
  3483 + width: 50%;
  3484 +}
  3485 +
  3486 +.black_rights-frame .black_rights {
  3487 + border-top: 3rpx solid;
  3488 + border-right: 3rpx solid;
  3489 + transform: rotate(45deg);
  3490 + display: inline-block;
  3491 + width: 20rpx;
  3492 + height: 20rpx;
  3493 +}
  3494 +
  3495 +.xc-val-money {
  3496 + height: 55rpx;
  3497 +}
  3498 +
  3499 +.xc-distance-bottom {
  3500 + margin-bottom: 40rpx;
  3501 +}
  3502 +
  3503 +.xc-distance-top {
  3504 + margin-top: 10rpx;
  3505 +}
  3506 +
  3507 +.xc-width {
  3508 + width: 100%;
  3509 +}
  3510 +
  3511 +.right-arrow {
  3512 + width: 15rpx;
  3513 + height: 15rpx;
  3514 + border-top: 2rpx solid #d70026;
  3515 + border-right: 2rpx solid #d70026;
  3516 + transform: rotate(45deg);
  3517 + display: inline-block;
  3518 + margin-bottom: 3rpx;
  3519 +}
  3520 +
  3521 +.xc-goods-attribute {
  3522 + border-bottom: 1px solid #eee;
  3523 + padding-bottom: 20rpx;
  3524 + /* margin-bottom:40rpx; */
  3525 +}
  3526 +
  3527 +.xc-val-fream {
  3528 + width: 105rpx;
  3529 +}
  3530 +
  3531 +.is_stock {
  3532 + width: 58%;
  3533 + height: 70rpx;
  3534 + border-radius: 55rpx;
  3535 +}
  3536 +
  3537 +.select_store_height {
  3538 + height: 50rpx;
  3539 +}
  3540 +
  3541 +.butttem5 {
  3542 + margin-bottom: 5rpx;
  3543 +}
  3544 +
  3545 +.no_pj_list {
  3546 + text-align: center;
  3547 + width: 100%;
  3548 + color: #999;
  3549 + margin-top: 30rpx;
  3550 + display: inline-block;
  3551 + font-size: 28rpx
  3552 +}
  3553 +
  3554 +
  3555 +.join-cart>view.no_store {
  3556 + width: 58%;
  3557 + background-color: #adadad;
  3558 +}
  3559 +
  3560 +.s_btn {
  3561 + margin-top: 25rpx;
  3562 +}
  3563 +
  3564 +/* 美妆价的样式 */
  3565 +.beauty-makeup-frame {
  3566 + /* width: 101.5%;
  3567 + margin: auto; */
  3568 + height: 120rpx;
  3569 + border-radius: 15rpx;
  3570 + margin-top: 10px;
  3571 +
  3572 +}
  3573 +
  3574 +.beauty-makeup-frame .left {
  3575 + width: 80%;
  3576 + height: 100%;
  3577 + background: #f7f7f7;
  3578 + border-radius: 20rpx 0rpx 0rpx 20rpx;
  3579 + /* padding: 0 10rpx; */
  3580 +}
  3581 +
  3582 +.card-frame {
  3583 + margin-top: 0rpx;
  3584 + /* padding-right: 23rpx;
  3585 + margin-right: 15rpx; */
  3586 +}
  3587 +
  3588 +.advert-card {
  3589 + margin-top: 0rpx !important;
  3590 +
  3591 +}
  3592 +
  3593 +.beauty-makeup-frame .right {
  3594 + width: 20%;
  3595 + height: 100%;
  3596 + background: #f3efe3;
  3597 + border-radius: 0rpx 20rpx 20rpx 0rpx;
  3598 +}
  3599 +
  3600 +.grade-card-frame {
  3601 +
  3602 + /* height:45rpx ; */
  3603 + background: #3c300a;
  3604 + border-radius: 20rpx;
  3605 + /* margin-top: 10px;
  3606 + margin-left: 7rpx; */
  3607 + justify-content: center;
  3608 + padding: 4rpx 12rpx;
  3609 +}
  3610 +
  3611 +.grade-card-frame .img {
  3612 + width: 24rpx;
  3613 + height: 24rpx;
  3614 + margin-top: 2px;
  3615 +
  3616 +}
  3617 +
  3618 +.grade-card-frame .card-name {
  3619 + margin-left: 8rpx;
  3620 + /* max-width: 120rpx; */
  3621 + max-width: 165rpx;
  3622 +}
  3623 +
  3624 +.card-effect {
  3625 + /* margin-left: 15rpx; */
  3626 +}
  3627 +
  3628 +.at_once_carde {
  3629 + width: 65rpx;
  3630 + height: 75rpx;
  3631 + line-height: 38rpx;
  3632 +}
  3633 +
  3634 +.bg_right {
  3635 + width: 18rpx;
  3636 + height: 18rpx;
  3637 + border-top: 2rpx solid #333;
  3638 + border-right: 2rpx solid #333;
  3639 + transform: rotate(45deg);
  3640 + display: inline-block;
  3641 + margin-bottom: 3rpx;
  3642 +
  3643 +}
  3644 +
  3645 +.carde_frame {
  3646 + height: 50rpx;
  3647 + /* line-height: 18rpx */
  3648 +}
  3649 +
  3650 +button.custom-service {
  3651 + line-height: normal;
  3652 + border: 0;
  3653 +}
  3654 +
  3655 +button.custom-service::after {
  3656 + border: 0;
  3657 +}
  3658 +
  3659 +.no_store,.c-red22 {
  3660 + color: #d60021;
  3661 + font-size: 26rpx;
  3662 +}
  3663 +
  3664 +
  3665 +.cx_show_view {
  3666 + width: 580rpx;
  3667 + /* line-height: 30rpx; margin-bottom: 6rpx; */
  3668 +}
  3669 +
  3670 +.cx_show_view .word {
  3671 + width: 400rpx
  3672 +}
  3673 +
  3674 +.prom_condition {
  3675 + color: #f23030;
  3676 + /* width: 180rpx; */
  3677 + /* height: 30rpx; */
  3678 + /* font-size: 20rpx; */
  3679 + /* padding-top: 0.01rpx; */
  3680 + /* display: flex;
  3681 + justify-content: center;
  3682 + align-items: center; */
  3683 + border: 2rpx solid #f23030;
  3684 + border-radius: 6rpx;
  3685 + /* margin-right: 10rpx; */
  3686 + /* margin-left: 10rpx; */
  3687 + font-size: 24rpx;
  3688 + padding-right: 6rpx;
  3689 + /* padding: 0 10rpx; */
  3690 +}
  3691 +
  3692 +.hui_img {
  3693 + width: 44rpx;
  3694 + height: 44rpx;
  3695 + margin-right: 8rpx
  3696 +}
  3697 +
  3698 +.order_hui {
  3699 + color: #444;
  3700 + width: 420rpx
  3701 +}
  3702 +
  3703 +.order_hui view {
  3704 + height: 34rpx;
  3705 + line-height: 34rpx;
  3706 +}
  3707 +
  3708 +.dp_img {
  3709 + width: 240rpx;
  3710 + height: 240rpx;
  3711 + margin: 0 40rpx
  3712 +}
  3713 +
  3714 +.dp_cx_view {
  3715 + border-bottom: 0.02rpx solid #eee;
  3716 + padding-bottom: 40rpx
  3717 +}
  3718 +
  3719 +.act_content {
  3720 + margin-top: 40rpx
  3721 +}
  3722 +
  3723 +.act_content view {
  3724 + margin-bottom: 12rpx
  3725 +}
  3726 +
  3727 +.color_b {
  3728 + color: #ff9c00
  3729 +}
  3730 +
  3731 +.poster-container {
  3732 + box-sizing: border-box;
  3733 + position: fixed;
  3734 + width: 610rpx;
  3735 + top: 50%;
  3736 + left: 50%;
  3737 + transform: translate(-50%, -50%);
  3738 + /* width: calc(100% - 210rpx); */
  3739 + z-index: 1000;
  3740 +}
  3741 +
  3742 +.mask {
  3743 + position: fixed;
  3744 + top: 0;
  3745 + left: 0;
  3746 + width: 100%;
  3747 + height: 100%;
  3748 + z-index: 999;
  3749 + background-color: rgba(0, 0, 0, .6);
  3750 +}
  3751 +
  3752 +.poster-wrapper {
  3753 + width: 100%;
  3754 +}
  3755 +
  3756 +.poster {
  3757 + box-sizing: border-box;
  3758 + width: 100%;
  3759 + height: 980rpx;
  3760 + border-radius: 16rpx;
  3761 + /* box-shadow: 0 8px 12px #666; */
  3762 + position: relative;
  3763 + z-index: 999;
  3764 + overflow: hidden;
  3765 +}
  3766 +
  3767 +.poster-img {
  3768 + display: block;
  3769 + width: 100%;
  3770 + height: 100%;
  3771 +}
  3772 +
  3773 +.btn-container {
  3774 + display: flex;
  3775 + justify-content: space-around;
  3776 +}
  3777 +
  3778 +.btn-share {
  3779 + display: block;
  3780 + background-color: #FE6867;
  3781 + color: white;
  3782 + border-radius: 8rpx;
  3783 + line-height: 80rpx;
  3784 + margin-top: 28rpx;
  3785 + padding: 0 60rpx;
  3786 +}
  3787 +
  3788 +/* .btn-close {
  3789 + background-color: rgba(0,0,0,.5);
  3790 + color: white;
  3791 + width: 40rpx;
  3792 + height: 40rpx;
  3793 + line-height: 40rpx;
  3794 + text-align: center;
  3795 + border-radius: 50%;
  3796 + position: absolute;
  3797 + right: 20rpx;
  3798 + top: 10rpx;
  3799 +} */
  3800 +
  3801 +.goods-price .rel_txt {
  3802 + /* position: relative; top: 32rpx; */
  3803 + font-size: 30rpx;
  3804 +}
  3805 +
  3806 +.goods-price .rel_img {
  3807 + width: 62rpx;
  3808 + height: 62rpx;
  3809 + position: relative;
  3810 + top: 8rpx;
  3811 +}
  3812 +
  3813 +.btn-close {
  3814 + /* background-color: rgba(0,0,0,.5); */
  3815 + color: #ccc;
  3816 + /* width: 50rpx;
  3817 + height: 50rpx;
  3818 + line-height: 50rpx;
  3819 + text-align: center; */
  3820 + border-radius: 50%;
  3821 + position: absolute;
  3822 + right: 20rpx;
  3823 + top: 20rpx;
  3824 +}
  3825 +
  3826 +.icon-close {
  3827 + font-size: 36rpx;
  3828 +}
  3829 +
  3830 +.quan_price {
  3831 + background-color: #ff4700;
  3832 + color: #fff;
  3833 + padding: 10rpx 25rpx;
  3834 + margin-left: 10rpx;
  3835 + border-radius: 30rpx;
  3836 +}
  3837 +
  3838 +/*--闪白屏--*/
  3839 +.g_img_box {
  3840 + background-position: center center;
  3841 + background-repeat: no-repeat;
  3842 + -webkit-background-size: cover;
  3843 + -moz-background-size: cover;
  3844 + background-size: cover;
  3845 +}
  3846 +
  3847 +
  3848 +
  3849 +.arrow {
  3850 + width: auto !important;
  3851 + position: absolute;
  3852 + right: 0;
  3853 + top: 50%;
  3854 + transform: translateY(-50%);
  3855 +}
  3856 +
  3857 +
  3858 +.logo-container {
  3859 + -webkit-filter: brightness(80%);
  3860 + filter: brightness(80%);
  3861 +}
  3862 +
  3863 +.logo {
  3864 + width: 132rpx;
  3865 + height: 37rpx;
  3866 + margin-right: 10rpx;
  3867 +}
  3868 +
  3869 +.miao_lab {
  3870 + width: 36rpx;
  3871 + height: 36rpx;
  3872 + border: 4rpx solid #e71f19;
  3873 + color: #e71f19;
  3874 + text-align: center;
  3875 + margin-right: 10rpx;
  3876 + line-height: 36rpx;
  3877 + font-size: 22rpx;
  3878 + font-weight: bolder;
  3879 + border-radius: 50%;
  3880 +}
  3881 +
  3882 +.pop_more_act .content {
  3883 + position: fixed;
  3884 + background: #fff;
  3885 + width: 100%;
  3886 + left: 0;
  3887 + bottom: 0;
  3888 + z-index: 1000;
  3889 +}
  3890 +
  3891 +.p_btn {
  3892 + background-color: #f23030;
  3893 + height: 70rpx;
  3894 + line-height: 70rpx;
  3895 + color: #fff;
  3896 +}
  3897 +
  3898 +.mt20 {
  3899 + margin-top: 20rpx
  3900 +}
  3901 +
  3902 +.group .group-list.luck {
  3903 + padding: 0 20rpx;
  3904 + justify-content: flex-start;
  3905 +}
  3906 +
  3907 +.group-list.luck .gtou~.gtou {
  3908 + margin-left: -16rpx;
  3909 +}
  3910 +
  3911 +.gtou.more {
  3912 + background-color: #ddd;
  3913 + text-align: center;
  3914 + line-height: 70rpx;
  3915 + border-radius: 50%;
  3916 + color: #aaa;
  3917 +}
  3918 +
  3919 +
  3920 +.tick {
  3921 + position: relative;
  3922 +}
  3923 +
  3924 +.tick:before {
  3925 + content: '';
  3926 + display: inline-block;
  3927 + vertical-align: middle;
  3928 + margin-top: -4rpx;
  3929 + margin-right: 12rpx;
  3930 + width: 22rpx;
  3931 + height: 22rpx;
  3932 + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat;
  3933 + background-size: 22rpx auto;
  3934 +}
  3935 +
  3936 +.details::after {
  3937 + content: '';
  3938 + position: absolute;
  3939 + right: 0;
  3940 + top: 0;
  3941 + bottom: 0;
  3942 + margin: auto;
  3943 + display: inline-block;
  3944 + width: 40rpx;
  3945 + height: 40rpx;
  3946 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=);
  3947 + background-repeat: no-repeat;
  3948 + background-size: 40rpx auto;
  3949 +}
  3950 +
  3951 +.lh2 {
  3952 + line-height: 2;
  3953 +}
  3954 +
  3955 +.fill-box {
  3956 + background-color: #f23030;
  3957 + color: white;
  3958 + padding: 0 6rpx;
  3959 + border-radius: 0 0 10rpx 0;
  3960 + margin-right: 4rpx;
  3961 +}
  3962 +
  3963 +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx }
  3964 +
  3965 +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx }
  3966 +/* 历史购买 */
  3967 +.swiper-container {
  3968 + position: absolute;
  3969 + top: 0;
  3970 + left: 0;
  3971 + padding: 20rpx 10rpx;
  3972 + width: 100%;
  3973 + box-sizing: border-box;
  3974 + z-index: 98;
  3975 +}
  3976 +
  3977 +.swiper {
  3978 + height: 60rpx;
  3979 + color: white;
  3980 + font-size: 26rpx;
  3981 +}
  3982 +
  3983 +.swiper-item {
  3984 + /* width: auto !important;
  3985 + background-color: rgba(0,0,0,.4);
  3986 + border-radius: 60rpx; */
  3987 + position: relative;
  3988 +}
  3989 +
  3990 +.swiper-item .item {
  3991 + position: absolute;
  3992 +}
  3993 +
  3994 +.item {
  3995 + /* position: absolute; */
  3996 + display: flex;
  3997 + align-items: center;
  3998 + /* justify-content: center; */
  3999 + border-radius: 60rpx;
  4000 + background-color: rgba(0,0,0,.4);
  4001 + /* position: absolute; */
  4002 +}
  4003 +
  4004 +.avatar-container {
  4005 + width: 60rpx;
  4006 + height: 60rpx;
  4007 + border-radius: 50%;
  4008 + overflow: hidden;
  4009 + flex-shrink: 0;
  4010 +}
  4011 +.avatar-container image {
  4012 + width: 100%;
  4013 + height: 100%;
  4014 +}
  4015 +
  4016 +.hideArea {
  4017 + position: absolute;
  4018 + left: -1000px;
  4019 + top: -1000px;
  4020 +}
... ...
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +var ut = require("../../../../../utils/util.js");
  7 +var com = require("../public/buy_com.js");
  8 +
  9 +Page({
  10 + data: {
  11 + url: a.url, //接口网址
  12 + iurl: a.imghost, //图片前缀网址
  13 + isBuy: 0,
  14 + getGiftID: '', //礼包id
  15 + giftImage: '',
  16 + giftTitle: '',
  17 + giftDate: '',
  18 + giftPrice: '',
  19 + giftIntegral: '',
  20 + giftPosPrice: '',
  21 + giftQty: '',
  22 + giftRemark: '',
  23 + giftType: '',
  24 + actTitle: '',
  25 + getUrl: '',
  26 + wareCard: [],
  27 + orderSn: "", //订单编号
  28 + lbId: "",
  29 + code: "", //核销码
  30 + c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期
  31 + is_lb: 0, //是否有礼包
  32 + default_color: null,
  33 + first_leader: e.globalData.first_leader || 0, // 推荐人ID
  34 +
  35 + //门店相关
  36 + ismend: 0,
  37 + is_sec_mend: 0,
  38 + sto_sele_name: "", //选中的门店名称
  39 + sto_sele_id: "", //选中的门店id
  40 + sto_sele_distr: "", //选择的门店的配送方式
  41 + is_show_sto_cat: 1, //是否显示门店分类
  42 + only_pk: null,
  43 + all_sto: null,
  44 + sec_sto: null, //选择了的门店分类
  45 + pickpu_list: null, //读出的所有门店list
  46 + def_pickpu_list: null, //一开始5个门店list
  47 + sec_pick_index: 0, //第二级门店选择ID
  48 + fir_pick_index: 0, //第一级门店选择ID
  49 + all_pick_list: null,//所有的门店先记录起来
  50 +
  51 + select_store: 0, //选择更多
  52 + index: 1,
  53 + more_store: 0, //选择门店
  54 + sort_store: 0, //门店分类
  55 + choice_sort_store: 0, //选择分类门店
  56 + new_user: 0, //新用户
  57 +
  58 + def_pick_store: null, // 默认的门店
  59 + fir_def_store: null, //客户默认的门店的
  60 + lat: null, //维度
  61 + lon: null, //经度
  62 +
  63 + is_get_local_ok: 0, //获取坐标是否完成
  64 + region_name: "门店分类", //区域的名字
  65 + is_gps: 1,
  66 + open_ind_store: 0, //哪里打开的门店列表的控制属性
  67 + default_store: {}, //创建添加默认门店地址的对象
  68 +
  69 + store: 0,
  70 + openSpecModal: 0,
  71 +
  72 + sto_sele_name_1: '',
  73 + share_goods_img:'', //礼包的分享图
  74 + giftImageCover:null,
  75 + canvasHidden:true,
  76 + is_receive:0,
  77 + screenWidth: 0,
  78 + monthgiftbag:{},
  79 + },
  80 + onLoad: function (options) {
  81 +
  82 + var th = this;
  83 +
  84 + this.setData({
  85 + params: options,
  86 + })
  87 +
  88 + getApp().getConfig(function (e) {
  89 + th.setData({sto_sele_name_1: e.store_name})
  90 + })
  91 +
  92 + getApp().getConfig2(function (e) {
  93 + var json_d = JSON.parse(e.switch_list);
  94 + th.setData({
  95 + bconfig: e,
  96 + sys_switch: json_d,
  97 + is_retail_price: json_d.is_retail_price || 0
  98 + });
  99 + })
  100 + // com.get_sto(th,os)
  101 + //获取用户设备信息,屏幕宽度
  102 + wx.getSystemInfo({
  103 + success: res => {
  104 + th.setData({
  105 + screenWidth: res.screenWidth
  106 + })
  107 + }
  108 + });
  109 +
  110 + let monthgiftbag=wx.getStorageSync('monthgiftbag')
  111 + let monthgiftba_defpick=wx.getStorageSync('monthgiftba_defpick')
  112 +
  113 + var now = ut.gettimestamp();
  114 + var isStart=0;
  115 + // var str = res.data.data.starTime;
  116 + var start = monthgiftbag.begindate;
  117 + // start = start / 1000;
  118 + if (start < now) isStart = 1;
  119 +
  120 + let remark=monthgiftbag.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  121 + monthgiftbag.remark=remark
  122 +
  123 + this.setData({
  124 + isStart,
  125 + monthgiftbag,
  126 + sele_g:monthgiftbag,
  127 + // def_pick_store:monthgiftba_defpick
  128 + })
  129 +
  130 + },
  131 + init() {
  132 + let options = this.data?.params; // this.data == null ? undefined:this.data.params
  133 + var th = this;
  134 + this.setData({
  135 + getUserID: d.user_id,
  136 + getStorageID: a.stoid,
  137 + })
  138 +
  139 + if(!options.lbId && options.scene){
  140 + var gid_str = decodeURIComponent(options.scene);
  141 + gid_str = gid_str.split("_");
  142 +
  143 + options.lbId=gid_str[0];
  144 + options.first_leader=gid_str[1];
  145 + options.isBuy=1;
  146 + }
  147 +
  148 +
  149 + this.setData({
  150 + isBuy: options.isBuy,
  151 + getGiftID: options.lbId,
  152 + orderSn: options.orderSn,
  153 + flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1
  154 + record_list_id:options.record_list_id,
  155 + is_receive:options.is_receive
  156 + })
  157 + if (options.lbId) th.data.lbId = options.lbId;
  158 + //-- 获取分享人的ID --
  159 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  160 + if (first_leader) {
  161 + this.setData({
  162 + first_leader,
  163 + })
  164 + //-- user_id代过来免登录 --
  165 + getApp().globalData.first_leader = first_leader;
  166 + //调用接口判断是不是会员
  167 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  168 + if (res.data.code == 0) {
  169 + getApp().globalData.guide_id = res.data.data.id;
  170 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  171 + }
  172 + })
  173 + }
  174 + th.close();
  175 +
  176 + //-- 检测一下有没有门店 --
  177 + th.check_guide(function (){
  178 + com.wait_for_store_config(th);
  179 + com.set_user_mo_store(th, os, function () {
  180 + if (th.data.sele_g.pickup_list && th.data.def_pick_store) {
  181 + com.check_def_pk(th);
  182 + }
  183 + });
  184 + com.get_sto(th, os);
  185 + })
  186 + // this.GetBuyGiftList();
  187 + // if (this.data.flag == 1) {
  188 + // this.getZxlbDetails();
  189 + // } else {
  190 + // if (this.data.isBuy == 0) {
  191 + // this.GetMyGiftList();
  192 + // } else if (this.data.isBuy == 1) {
  193 + // this.GetBuyGiftList();
  194 + // }
  195 +
  196 + // }
  197 +
  198 + },
  199 +
  200 + onShow: function () {
  201 + getApp().check_can_share();
  202 + getApp().is_Single_page(this, function () {
  203 + //--先判断会员状态--
  204 + var user_info = getApp().globalData.userInfo;
  205 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  206 + getApp().goto('/packageE/pages/togoin/togoin');
  207 + return false;
  208 + }
  209 + this.init();
  210 + })
  211 + },
  212 + GetBuyPrice: function (e) {
  213 + var that = this.data;
  214 + var th = this;
  215 + //如果还没有开始的话
  216 + if (th.data.isStart != 1) {
  217 + getApp().my_warnning("活动还没有开始", 0, th);
  218 + return false;
  219 + }
  220 +
  221 + this.data.payMoney = th.data.sele_g.payMoney;
  222 + th.setData({buyType: 2})
  223 + if (th.data.sele_g.is_pickup) {
  224 + th.setData({
  225 + openSpecModal: 1
  226 + })
  227 + } else {
  228 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  229 + my_confirm.open(
  230 + "是否确定购买该礼包",
  231 + "取消",
  232 + "确定",
  233 + function () {
  234 + my_confirm.open_cancel(0);
  235 + },
  236 + function () {
  237 + my_confirm.open_cancel(0);
  238 + com.buy_libao(th)
  239 + }
  240 + )
  241 + }
  242 +
  243 +
  244 + },
  245 + GetBuyIntegral: function (e) {
  246 + var that = this.data;
  247 + var th = this;
  248 +
  249 + //如果还没有开始的话
  250 + if (th.data.isStart != 1) {
  251 + getApp().my_warnning("活动还没有开始", 0, th);
  252 + return false;
  253 + }
  254 +
  255 + th.setData({buyType: 1});
  256 + if (th.data.sele_g.is_pickup) {
  257 + th.setData({
  258 + openSpecModal: 1
  259 + })
  260 + } else {
  261 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  262 + my_confirm.open(
  263 + "是否确定兑换该礼包",
  264 + "取消",
  265 + "确定",
  266 + function () {
  267 + my_confirm.open_cancel(0);
  268 + },
  269 + function () {
  270 + my_confirm.open_cancel(0);
  271 + com.buy_libao(th)
  272 + })
  273 + }
  274 +
  275 +
  276 + },
  277 +
  278 + GetMyGiftList: function () {
  279 + var _this = this;
  280 + var th = this;
  281 + getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', {
  282 + isShowLoading: true,
  283 + data: {
  284 + "storeId": a.stoid, //商家ID
  285 + "userId": d.user_id, //用户ID
  286 + "orderSn": th.data.orderSn
  287 + },
  288 + success: function (res) {
  289 + if (res.data.code == 0) {
  290 + console.log('商品------++')
  291 + console.log(res)
  292 + th.setData({
  293 + giftImage: th.data.iurl + res.data.data.lbUrl,
  294 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
  295 + giftTitle: res.data.data.giftTitle,
  296 + default_color: res.data.data.bgcolor
  297 + })
  298 +
  299 + if (res.data.data.iswarelbtype == 1) {
  300 + th.setData({iswarelbtype: 1})
  301 + }
  302 +
  303 + if (!res.data.data.giftRemark || res.data.data.giftRemark == '') {
  304 + th.setData({
  305 + giftRemark: '暂无详情......'
  306 + })
  307 + } else {
  308 + th.setData({
  309 + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  310 + })
  311 + }
  312 +
  313 + //---获取日期的时间戳---
  314 + var t_endtime = res.data.data.endTime;
  315 + t_endtime = t_endtime.replace(/-/g, '/');
  316 + var t_date = new Date(t_endtime) / 1000;
  317 + var t_now = ut.gettimestamp();
  318 +
  319 + var t_starttime = res.data.data.starTime;
  320 + t_starttime = t_starttime.replace(/-/g, '/');
  321 + var t_sdate = new Date(t_starttime) / 1000;
  322 +
  323 + if (res.data.data.goodsUseState) th.setData({
  324 + c_state: 1
  325 + })
  326 + else if (t_date <= t_now)
  327 + th.setData({
  328 + c_state: 2
  329 + })
  330 + else if (t_sdate > t_now)
  331 + th.setData({
  332 + c_state: -1
  333 + })
  334 + th.setData({
  335 + giftDate: res.data.data.endTime,
  336 + giftPosPrice: res.data.data.giftPosPrice,
  337 + giftQty: res.data.data.giftQty,
  338 + giftIntegral: res.data.data.payIntegral,
  339 + giftPrice: res.data.data.payMoney,
  340 + giftType: res.data.data.actType,
  341 + actTitle: res.data.data.actTitle,
  342 + wareCard: res.data.data.wareCard,
  343 + lbId: res.data.data.lbId
  344 + })
  345 + //判断是否有礼包
  346 + for (var i = 0; i < res.data.data.wareCard.length; i++) {
  347 + if (res.data.data.wareCard[i].lbType == 1) {
  348 + th.setData({
  349 + is_lb: 1
  350 + })
  351 + break;
  352 + }
  353 + }
  354 +
  355 + if (res.data.data.pickup_id) {
  356 + getApp().request.get("/api/weshop/pickup/get/" + os.stoid + "/" + res.data.data.pickup_id, {
  357 + success: function (res) {
  358 + if (res.data.code == 0) {
  359 + th.setData({pick_up: res.data.data});
  360 + }
  361 + }
  362 + });
  363 +
  364 + }
  365 +
  366 +
  367 + } else {
  368 + getApp().my_warnning(res.data.msg, 0, th);
  369 + return false;
  370 + }
  371 + }
  372 + });
  373 +
  374 + },
  375 +
  376 + check_guide(func){
  377 + var first_leader=this.data.first_leader;
  378 + if(!first_leader){
  379 + func();
  380 + return false;
  381 + }
  382 + if(this.data.is_geted_guide_pick){
  383 + func();
  384 + return false;
  385 + }
  386 + if(getApp().globalData.guide_pick_id){
  387 + func();
  388 + return false;
  389 + }
  390 + var th=this;
  391 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  392 + if (res.data.code == 0) {
  393 + getApp().globalData.guide_pick_id= res.data.data.pickup_id;
  394 + }
  395 + th.data.is_geted_guide_pick=1;
  396 + func();
  397 + })
  398 + },
  399 +
  400 + GetBuyGiftList: function () {
  401 + var _this2 = this;
  402 + var th = this.data;
  403 + getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', {
  404 + isShowLoading: true,
  405 + data: {
  406 + "storeId": a.stoid, //商家ID
  407 + "userId": d.user_id, //用户ID
  408 + "giftBagId": th.getGiftID
  409 + },
  410 + success: function success(res) {
  411 + if (res.data.code == 0) {
  412 + _this2.setData({
  413 + giftImage: th.iurl + res.data.data.lbUrl,
  414 + giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl),
  415 + // giftTitle: res.data.data.giftTitle,
  416 + giftTitle: res.data.data.lbTitle,
  417 + default_color: res.data.data.bgcolor
  418 + })
  419 + if (!res.data.data.giftRemark) {
  420 + _this2.setData({
  421 + giftRemark: '暂无详情......'
  422 + })
  423 + } else {
  424 + _this2.setData({
  425 + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  426 + })
  427 + }
  428 +
  429 + var isStart = 0;
  430 + var now = ut.gettimestamp();
  431 +
  432 + var str = res.data.data.starTime;
  433 + var start = Date.parse(new Date(str));
  434 + start = start / 1000;
  435 + if (start < now) isStart = 1;
  436 +
  437 + _this2.setData({
  438 + giftDate: res.data.data.endTime,
  439 + giftStart: res.data.data.starTime,
  440 + giftPosPrice: res.data.data.oldPrice,
  441 + giftQty: res.data.data.giftQty,
  442 + giftIntegral: res.data.data.payIntegral,
  443 + giftPrice: res.data.data.payMoney,
  444 + giftType: res.data.data.actType,
  445 + actTitle: res.data.data.actTitle,
  446 + wareCard: res.data.data.wareCard,
  447 + isStart: isStart,
  448 + sele_g: res.data.data
  449 + })
  450 +
  451 +
  452 + var sele_g = res.data.data;
  453 + //需不需要门店,不需要门店返回
  454 + if (!sele_g.is_pickup) return false;
  455 +
  456 + //-- 检测一下有没有门店 --
  457 + _this2.check_guide(function (){
  458 + com.wait_for_store_config(_this2);
  459 + com.set_user_mo_store(_this2, os, function () {
  460 + if (sele_g.pickup_list && _this2.data.def_pick_store) {
  461 + com.check_def_pk(_this2);
  462 + }
  463 + });
  464 + com.get_sto(_this2, os);
  465 + })
  466 +
  467 + } else {
  468 + getApp().my_warnning(res.data.msg, 0, _this2);
  469 + return false;
  470 + }
  471 + }
  472 + });
  473 +
  474 + },
  475 +
  476 + getZxlbDetails: function () {
  477 +
  478 + var th = this;
  479 + getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', {
  480 + isShowLoading: true,
  481 + data: {
  482 + "storeId": a.stoid, //商家ID
  483 + //"userId": d.user_id, //用户ID
  484 + "giftBagId": th.data.lbId
  485 + },
  486 + success: function (res) {
  487 + if (res.data.code == 0) {
  488 + th.setData({
  489 + giftImage: th.data.iurl + res.data.data.lbUrl,
  490 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
  491 + giftTitle: res.data.data.lbTitle,
  492 + default_color: res.data.data.bgcolor
  493 + })
  494 + if (res.data.data.lbIntro == '') {
  495 + th.setData({
  496 + giftRemark: '暂无详情......'
  497 + })
  498 + } else {
  499 + th.setData({
  500 + giftRemark: res.data.data.lbIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  501 + })
  502 + }
  503 +
  504 + //---获取日期的时间戳---
  505 + let exchangeType = res.data.data.exchangeType;
  506 + let exchangeDay = res.data.data.exchangeDay;
  507 + let exchangeStartTime = res.data.data.exchangeStartTime;
  508 + let exchangeEndTime = res.data.data.exchangeEndTime;
  509 + // let t_endtime;
  510 +
  511 + if (exchangeType == 2) {
  512 + if (exchangeStartTime == 0 || !exchangeStartTime) {
  513 + exchangeStartTime = ut.gettimestamp();
  514 + }
  515 + exchangeStartTime = ut.formatTime(exchangeStartTime, 0);
  516 + exchangeEndTime = ut.formatTime(exchangeEndTime, 0);
  517 + }
  518 +
  519 +
  520 + th.setData({
  521 + // giftDate: t_endtime,
  522 + giftPosPrice: res.data.data.oldPrice,
  523 + giftQty: res.data.data.lbNum,
  524 + giftIntegral: res.data.data.exchangeIntegral,
  525 + giftPrice: res.data.data.lbPrice,
  526 + giftType: res.data.data.actType,
  527 + actTitle: res.data.data.actTitle,
  528 + wareCard: res.data.data.wareCard,
  529 + lbId: res.data.data.lbId,
  530 + exchangeType: exchangeType,
  531 + exchangeDay: exchangeDay,
  532 + exchangeStartTime: exchangeStartTime,
  533 + exchangeEndTime: exchangeEndTime,
  534 + })
  535 + //判断是否有礼包
  536 + for (var i = 0; i < res.data.data.wareCard.length; i++) {
  537 + if (res.data.data.wareCard[i].lbType == 1) {
  538 + th.setData({
  539 + is_lb: 1
  540 + })
  541 + break;
  542 + }
  543 + }
  544 + } else {
  545 + getApp().my_warnning(res.data.msg, 0, th);
  546 + return false;
  547 + }
  548 + }
  549 + });
  550 +
  551 + },
  552 +
  553 +
  554 + //显示核销码
  555 + code_show: function (e) {
  556 + var th = this;
  557 + //--获取成功的时候--
  558 + var no = th.data.code;
  559 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  560 + var obj = {
  561 + val: no,
  562 + content: "请将二维码展示给核销员,收货更快捷"
  563 + };
  564 + qc_com.open(obj)
  565 + },
  566 + //获取核销码
  567 + getcode: function (e) {
  568 + var th = this;
  569 + var orderSn = th.data.orderSn; //订单号
  570 + let codeId = e.currentTarget.dataset.codeid;
  571 + var json = {
  572 + "storeId": a.stoid,
  573 + "orderSn": orderSn,
  574 + }
  575 + if (codeId && codeId !== "") {
  576 + json.id = codeId
  577 + }
  578 + var data = JSON.stringify(json);
  579 + var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址
  580 + getApp().request.json_post(url, json,
  581 + function (res) {
  582 + if (res.data.code == 0) {
  583 + th.setData({
  584 + code: res.data.data
  585 + })
  586 + th.code_show();
  587 + } else {
  588 + getApp().my_warnning(res.data.msg, 0, th);
  589 + }
  590 + },
  591 + function (res) {
  592 +
  593 + },
  594 + "put"
  595 + )
  596 +
  597 + },
  598 + //界面跳转
  599 + goto: function (e) {
  600 + var th = this;
  601 + var url = e.currentTarget.dataset.url;
  602 + getApp().goto(url);
  603 + },
  604 + //图片失败,默认图片
  605 + bind_bnerr2: function (e) {
  606 + var _errImg = e.target.dataset.errorimg;
  607 + var _errObj = {};
  608 + _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png";
  609 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  610 + },
  611 +
  612 + //图片失败,默认图片
  613 + bind_bnerr: function (e) {
  614 + var _errImg = e.target.dataset.errorimg;
  615 + var _errObj = {};
  616 + _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg";
  617 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  618 + //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
  619 +
  620 + },
  621 +
  622 + //关闭导航
  623 + close: function () {
  624 + var th = this;
  625 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  626 + nav_b.close_box();
  627 + nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy");
  628 + },
  629 +
  630 + //--- 分享设置 --
  631 + onShareAppMessage: function (e) {
  632 + getApp().globalData.no_clear = 1;
  633 + var curPage = this;
  634 + var pagePath = curPage.route; //当前页面url
  635 + if (pagePath.indexOf('/') != 0) {
  636 + pagePath = '/' + pagePath;
  637 + }
  638 + pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader=" + this.data.getUserID;
  639 + // if (this.data.isBuy == 0) {
  640 + // pagePath += "&orderSn=" + this.data.orderSn;
  641 + // } else {
  642 + // pagePath += "&lbId=" + this.data.getGiftID;
  643 + // }
  644 + // console.log('pagePath', pagePath);
  645 + return {
  646 + title: "礼包详情",
  647 + path: pagePath,
  648 + }
  649 + },
  650 +
  651 + /**
  652 + * 用户分享朋友圈
  653 + */
  654 + onShareTimeline() {
  655 + getApp().globalData.no_clear = 1;
  656 +
  657 + var pagePath = "&isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader=" + this.data.getUserID;
  658 + var user_id = getApp().globalData.user_id;
  659 + if (!user_id) user_id = 0;
  660 +
  661 + return {
  662 + title: "礼包详情",
  663 + query: 'first_leader=' + user_id + pagePath
  664 + }
  665 + },
  666 +
  667 + //免费领取
  668 + GetFree: function (e) {
  669 + var that = this.data;
  670 + var th = this;
  671 + //如果还没有开始的话
  672 + if (th.data.isStart != 1) {
  673 + getApp().my_warnning("活动还没有开始", 0, th);
  674 + return false;
  675 + }
  676 + th.setData({buyType: 3});
  677 + if (th.data.sele_g.is_pickup) {
  678 + th.setData({
  679 + openSpecModal: 1
  680 + })
  681 + } else {
  682 + // var id = e.currentTarget.dataset.id;//活动id
  683 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  684 + my_confirm.open(
  685 + "是否确定领取该礼包",
  686 + "取消",
  687 + "确定",
  688 + function () {
  689 + my_confirm.open_cancel(0);
  690 + },
  691 + function () {
  692 + my_confirm.open_cancel(0);
  693 + com.buy_libao(th)
  694 + })
  695 + }
  696 +
  697 +
  698 + },
  699 +
  700 +
  701 + getGift(){
  702 + var that=this;
  703 +
  704 + var json = {
  705 + // "actId": '', //活动Id
  706 + // "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  707 + // "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买
  708 + // "giftBagId": id, //每月礼包主表id
  709 + // "buyFrom": 2,
  710 + "id":that.data.record_list_id,// "记录Id",
  711 + "storeId": that.data.getStorageID, //商家Id
  712 + "userId": that.data.getUserID, //用户ID
  713 + };
  714 + // var url ="/api/weshop/marketing/buy/receive/gift/record/insert";
  715 + // var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder";
  716 + var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/recordReceive";
  717 + getApp().request.json_post(url, json,
  718 + function (res) {
  719 + console.log('领取礼包');
  720 + console.log(res);
  721 + if (res.data.code == 0 && res.data.data) {
  722 + that.setData({
  723 + is_receive:1
  724 + })
  725 + getApp().my_warnning("领取成功!", 1, that);
  726 + that.closeSpecModal();
  727 + setTimeout(()=>{
  728 + wx.navigateBack({
  729 + delta: 0,
  730 + })
  731 + },500)
  732 + } else {
  733 + that.setData({submit:0})
  734 + getApp().my_warnning(res.data.msg, 0, that);
  735 + }
  736 + },
  737 + function (res) {
  738 + that.setData({submit:0})
  739 + }
  740 + )
  741 + },
  742 +
  743 + //--- 设置一下默认库存的数量 ----
  744 + set_def_storage(ee) {
  745 + var that = this, th = this;
  746 + that.data.fir_def_store = ee;
  747 +
  748 + that.setData({
  749 + def_pick_store: ee,
  750 + sto_sele_name: ee.pickup_name,
  751 + sto_sele_id: ee.pickup_id,
  752 + sto_sele_distr: ee.distr_type
  753 + })
  754 + },
  755 + // 选择门店
  756 + choice_store: function (ee) {
  757 +
  758 + //--先判断会员状态--
  759 + var user_info = getApp().globalData.userInfo;
  760 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  761 + wx.navigateTo({
  762 + url: '/packageE/pages/togoin/togoin',
  763 + })
  764 + return false;
  765 + }
  766 +
  767 + var th = this;
  768 + var ind = ee.currentTarget.dataset.ind;
  769 + var bconfig = th.data.bconfig;
  770 +
  771 + //如果开启了,则不在选择门店
  772 + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  773 + return false;
  774 + }
  775 + // if (!th.data.only_pk && !th.data.def_pickpu_list) {
  776 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  777 + // return false;
  778 + // }
  779 +
  780 + if (th.data.only_pk && !th.data.only_pk.length) {
  781 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  782 + return false;
  783 + }
  784 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  785 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  786 + return false;
  787 + }
  788 +
  789 +
  790 + if (bconfig && bconfig.is_sort_storage) {
  791 + wx.getLocation({
  792 + type: 'gcj02',
  793 + success: function (res) {
  794 +
  795 + th.data.lat = res.latitude;
  796 + th.data.lon = res.longitude;
  797 + th.data.is_get_local_ok = 1;
  798 + th.setData({
  799 + is_gps: 1
  800 + });
  801 + //th.onShow();
  802 + com.get_sto(th, os);
  803 + },
  804 + fail: function (res) {
  805 + //th.onShow();
  806 + th.data.is_get_local_ok = 1;
  807 + com.get_sto(th, os);
  808 + if (res.errCode == 2) {
  809 + th.setData({
  810 + is_gps: 0
  811 + });
  812 + if (th.data.is_gps == 0) {
  813 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  814 + }
  815 + } else {
  816 + th.setData({
  817 + is_gps: "3"
  818 + });
  819 + }
  820 +
  821 + }
  822 + })
  823 + } else {
  824 + th.data.is_get_local_ok = 1;
  825 + com.get_sto(th, os);
  826 + }
  827 +
  828 + if (ind != undefined && ind != null) {
  829 + this.setData({
  830 + open_ind_store: ind,
  831 + store: 1,
  832 + openSpecModal: !1,
  833 + openSpecModal_pt: !1,
  834 + openSpecModal_flash_normal: !1,
  835 + })
  836 + } else {
  837 + this.setData({
  838 + store: 1,
  839 + openSpecModal: !1,
  840 + openSpecModal_pt: !1,
  841 + openSpecModal_flash_normal: !1
  842 +
  843 + })
  844 + }
  845 + },
  846 + //关闭选择门店
  847 + close_popup: function (e) {
  848 + var th = this;
  849 + this.setData({
  850 + store: 0,
  851 + choice_sort_store: 0,
  852 + sort_store: 0,
  853 + fir_pick_index: 0,
  854 + sec_pick_index: 0
  855 + })
  856 +
  857 + var openindstore = this.data.open_ind_store;
  858 + if (openindstore == 1) {
  859 + th.setData({
  860 + openSpecModal: !0,
  861 + openSpecModal_ind: openindstore,
  862 + });
  863 + } else if (openindstore == 2) {
  864 + th.setData({
  865 + openSpecModal: !0,
  866 + openSpecModal_ind: openindstore,
  867 + });
  868 + } else if (openindstore == 4) { //4就是拼团
  869 + th.setData({
  870 + openSpecModal_pt: 1, //打开拼团购买界面
  871 + store: 0, //关闭门店
  872 + choice_sort_store: 0, //关闭门店2级
  873 + sort_store: 0, //关闭门店2级
  874 + });
  875 + } else {
  876 + th.setData({
  877 + store: 0,
  878 + choice_sort_store: 0,
  879 + sort_store: 0
  880 + })
  881 + }
  882 +
  883 +
  884 + },
  885 +
  886 + //选择更多门店
  887 + more_store: function () {
  888 + this.setData({
  889 + sort_store: 1
  890 + });
  891 + },
  892 + // 返回按钮
  893 + returns: function () {
  894 + this.setData({
  895 + sort_store: 0,
  896 + choice_sort_store: 0
  897 + });
  898 + },
  899 + //---选择分类门店---
  900 + choice_sort_store: function (e) {
  901 + var index = e.currentTarget.dataset.index;
  902 + var region_name = e.currentTarget.dataset.region;
  903 + var item = this.data.all_sto[index];
  904 + this.setData({
  905 + region_name: region_name,
  906 + sort_store: 0,
  907 + choice_sort_store: 1,
  908 + sec_sto: item,
  909 + sec_pick_index: 0
  910 + });
  911 + },
  912 +
  913 + choose_for_store_fir: function (e) {
  914 + var index_c = e.currentTarget.dataset.ind;
  915 + var th = this;
  916 + th.setData({
  917 + fir_pick_index: index_c
  918 + })
  919 +
  920 + },
  921 +
  922 + //确定def_pick为选择的门店
  923 + sure_pick: function (e) {
  924 + var th = this;
  925 + var item = null;
  926 + var openindstore = th.data.open_ind_store;
  927 +
  928 + if (th.data.choice_sort_store == 0) {
  929 + var index = th.data.fir_pick_index;
  930 + if (th.data.is_show_sto_cat == 1) {
  931 + item = th.data.def_pickpu_list[index];
  932 + } else {
  933 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  934 + }
  935 +
  936 + } else {
  937 + var index = th.data.sec_pick_index;
  938 + item = th.data.sec_sto.s_arr[index];
  939 + }
  940 +
  941 + if(!item) return false;
  942 +
  943 + if (!th.data.sele_g) return false;
  944 +
  945 + th.setData({
  946 + def_pick_store: item,
  947 + sto_sele_name: item.pickup_name,
  948 + sto_sele_id: item.pickup_id,
  949 + sto_sele_distr: item.distr_type,
  950 + store: 0,
  951 + choice_sort_store: 0,
  952 + fir_pick_index: 0,
  953 + openSpecModal: !0,
  954 + });
  955 +
  956 +
  957 + },
  958 + //---点击二级之后的选择---
  959 + choose_for_store: function (e) {
  960 + var index_c = e.currentTarget.dataset.ind;
  961 + var th = this;
  962 + th.setData({
  963 + sec_pick_index: index_c,
  964 + fir_pick_index: index_c
  965 + })
  966 +
  967 + },
  968 + //把选择的门店设置成默认的门店def_pick
  969 + set_def_pick: function (e) {
  970 + var th = this;
  971 + var item = null;
  972 + if (th.data.choice_sort_store == 0) {
  973 + var index = th.data.fir_pick_index;
  974 + if (th.data.is_show_sto_cat == 1) {
  975 + item = th.data.def_pickpu_list[index];
  976 + } else {
  977 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  978 + }
  979 + } else {
  980 + var index = th.data.sec_pick_index;
  981 + item = th.data.sec_sto.s_arr[index];
  982 + }
  983 +
  984 + if(!item) return false;
  985 +
  986 + th.setData({
  987 + def_pick_store: item,
  988 + sto_sele_name: item.pickup_name,
  989 + sto_sele_id: item.pickup_id,
  990 + sto_sele_distr: item.distr_type,
  991 + store: 0,
  992 + choice_sort_store: 0,
  993 + openSpecModal: !0,
  994 + });
  995 +
  996 + var user_id = getApp().globalData.user_id;
  997 + var def_pickup_id = item.pickup_id;
  998 + getApp().request.put('/api/weshop/users/update', {
  999 + data: {
  1000 + user_id: user_id,
  1001 + def_pickup_id: def_pickup_id
  1002 + },
  1003 + success: function (res) {
  1004 + if (res.data.code == 0) {
  1005 + if (th.data.choice_sort_store == 0) th.setData({
  1006 + fir_pick_index: 0
  1007 + });
  1008 + getApp().globalData.pk_store = item;
  1009 + } else {
  1010 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  1011 + }
  1012 +
  1013 + }
  1014 + });
  1015 +
  1016 +
  1017 + },
  1018 + closeSpecModal: function () {
  1019 + this.setData({openSpecModal: 0});
  1020 + },
  1021 +
  1022 + buy_libao: function () {
  1023 + com.buy_libao(this)
  1024 + },
  1025 +
  1026 +
  1027 + clickShare() {
  1028 + if (!getApp().globalData.user_id) {
  1029 + getApp().goto("/packageE/pages/togoin/togoin");
  1030 + return false;
  1031 + }
  1032 + this.setData({
  1033 + share_hidden: true,
  1034 + });
  1035 + },
  1036 +
  1037 + send() {
  1038 + this.setData({
  1039 + share_hidden: false,
  1040 + });
  1041 + },
  1042 +
  1043 + cancel() {
  1044 + this.setData({
  1045 + share_hidden: false,
  1046 + });
  1047 + },
  1048 +
  1049 +
  1050 + //--定义的保存图片方法,分享团---
  1051 + saveImageToPhotosAlbum: function () {
  1052 + //--先判断会员状态--
  1053 + var user_info = getApp().globalData.userInfo;
  1054 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1055 + //getApp().my_warnning("请先登录",0,this);
  1056 + wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  1057 + return false;
  1058 + }
  1059 +
  1060 + if (this.data.share_hidden) {
  1061 + this.setData({share_hidden: false,});
  1062 + }
  1063 +
  1064 + wx.showLoading({title: '生成中...',})
  1065 + var that = this, th = that;
  1066 + //设置画板显示,才能开始绘图
  1067 + that.setData({
  1068 + canvasHidden: false
  1069 + })
  1070 +
  1071 + var app = getApp();
  1072 + var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
  1073 + var scene = th.data.lbId + "";
  1074 +
  1075 + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
  1076 + if (user_id > 0) {
  1077 + scene += "_" + user_id;
  1078 + }
  1079 + ///二微码
  1080 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  1081 + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist";
  1082 +
  1083 + // 读取文件成功则OK--
  1084 + wx.getImageInfo({
  1085 + src: path3,
  1086 + success: function (res) {
  1087 + th.get_goods_temp(function () {
  1088 + var vpath = res.path;
  1089 + var context = wx.createCanvasContext('share');
  1090 + // let share_goods_img = th.params.cover_img
  1091 + th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0);
  1092 +
  1093 + //把画板内容绘制成图片,并回调 画板图片路径
  1094 + context.draw(false, function () {
  1095 + setTimeout(function () {
  1096 + wx.canvasToTempFilePath({
  1097 + x: 0,
  1098 + y: 0,
  1099 + width: 750,
  1100 + height: 1217,
  1101 + destWidth: 1.2 * 750 * 750 / that.data.screenWidth,
  1102 + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth,
  1103 + canvasId: 'share',
  1104 + success: function (res) {
  1105 +
  1106 + that.setData({
  1107 + shareImgPath: res.tempFilePath,
  1108 + canvasHidden: true
  1109 + })
  1110 +
  1111 + if (!res.tempFilePath) {
  1112 + wx.showModal({
  1113 + title: '提示',
  1114 + content: '图片绘制中,请稍后重试',
  1115 + showCancel: false
  1116 + })
  1117 + return false;
  1118 + }
  1119 +
  1120 + that.setData({
  1121 + showPoster: true,
  1122 + });
  1123 + wx.hideLoading();
  1124 + }
  1125 + })
  1126 + }, 800)
  1127 +
  1128 + });
  1129 + })
  1130 + },
  1131 + fail: function (res) {
  1132 + console.log(res);
  1133 + wx.hideLoading();
  1134 +
  1135 + }
  1136 + });
  1137 + },
  1138 +
  1139 + //-- 小程序绘制海报 --
  1140 + drawPoster(context, unit, img, vpath, type) {
  1141 + // 1.灰色背景
  1142 + context.setFillStyle('#f2f1f6');
  1143 + context.rect(0, 0, 554 * unit, 899 * unit);
  1144 + context.fill();
  1145 +
  1146 + // 2.商城名称
  1147 + let shopName = this.data.sto_sele_name_1;
  1148 + context.setTextAlign('center');
  1149 + context.setFontSize(26 * unit);
  1150 + context.setFillStyle('black');
  1151 + context.fillText(shopName, 277 * unit, 60 * unit);
  1152 +
  1153 + // 3.推荐来源
  1154 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  1155 + context.setTextAlign('center');
  1156 + context.setFontSize(22 * unit);
  1157 + context.setFillStyle('#96959a');
  1158 + context.fillText(fromText, 277 * unit, 105 * unit);
  1159 +
  1160 + // 4.海报背景
  1161 + context.setFillStyle('white');
  1162 + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit);
  1163 +
  1164 + // 5.商品图片
  1165 + // 图片的x坐标
  1166 + let bg_x = 37 * unit
  1167 + // 图片的y坐标
  1168 + let bg_y = 157 * unit
  1169 + // 图片宽度
  1170 + let bg_w = 480 * unit
  1171 + // 图片高度
  1172 + let bg_h = 474 * unit
  1173 + // 图片圆角
  1174 + let bg_r = 4
  1175 + // 绘制海报背景图片圆角
  1176 + context.save()
  1177 + context.beginPath()
  1178 + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5)
  1179 + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2)
  1180 + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5)
  1181 + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI)
  1182 + context.clip()
  1183 + context.drawImage(img, bg_x, bg_y, bg_w, bg_h);
  1184 + context.restore();
  1185 +
  1186 + // 6.强烈推荐
  1187 + let src = '';
  1188 + context.beginPath();
  1189 + if (type == 0) { // 普通
  1190 + src = '../../../images/share/q_tj.png';
  1191 + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit);
  1192 + context.setFontSize(16 * unit)
  1193 + context.setFillStyle("white")
  1194 + context.setTextAlign('left');
  1195 + context.fillText('强烈推荐', 64 * unit, 668 * unit);
  1196 + }
  1197 +
  1198 +
  1199 + let price = this.data.giftPrice;
  1200 + let giftIntegral = this.data.giftIntegral;
  1201 + context.setFontSize(32 * unit);
  1202 + context.setFillStyle('#DE1117');
  1203 +
  1204 + var price_txt="";
  1205 + if(price || giftIntegral){
  1206 + if(price){
  1207 + price_txt='¥' + price;
  1208 + if(giftIntegral) price_txt+='+';
  1209 + }
  1210 + if(giftIntegral) price_txt+=giftIntegral+'积分';
  1211 + }else{
  1212 + price_txt="¥0";
  1213 + }
  1214 +
  1215 + context.fillText(price_txt, 54 * unit, 735 * unit);
  1216 +
  1217 +
  1218 + var wp= 62 * unit;
  1219 + var hp=765 * unit
  1220 + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit);
  1221 +
  1222 + // 8.商品标题
  1223 + context.setFontSize(20 * unit);
  1224 + context.setFillStyle('#898989');
  1225 + getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1);
  1226 +
  1227 + // 9.小程序码
  1228 + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit);
  1229 + context.setFontSize(16 * unit);
  1230 + context.setFillStyle('#777');
  1231 + context.fillText('长按识别二维码', 378 * unit, 810 * unit);
  1232 +
  1233 + // 10.竖线
  1234 + context.beginPath();
  1235 + context.setFillStyle('#eee');
  1236 + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit);
  1237 + context.fill();
  1238 + },
  1239 +
  1240 +
  1241 + //---市场价划掉---
  1242 + draw_pos_price(context,w,h,market_price,unit){
  1243 +
  1244 + if(!this.is_retail_price) return false;
  1245 +
  1246 + context.setFillStyle("gray")
  1247 + context.setFontSize(22 * unit)
  1248 + var pri0 = "¥" + market_price.toFixed(2);
  1249 + context.fillText(pri0, w, h);
  1250 +
  1251 + var c_h=h-6;
  1252 + context.setStrokeStyle('gray');
  1253 + context.setLineWidth(1 * unit);
  1254 + context.moveTo(w - 5, c_h);
  1255 + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h);
  1256 + context.stroke();
  1257 +
  1258 + },
  1259 +
  1260 + //--获取商品图片的本地缓存,回调写法--
  1261 + get_goods_temp: function (tt) {
  1262 + var ee = this;
  1263 + if (ee.data.share_goods_img) {
  1264 + tt();
  1265 + return false;
  1266 + }
  1267 + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage;
  1268 + //获取商品是分享图信息
  1269 + wx.getImageInfo({
  1270 + src: img_url,
  1271 + success: function (res) {
  1272 + //res.path是网络图片的本地地址
  1273 + ee.data.share_goods_img = res.path;
  1274 + tt();
  1275 + },
  1276 + fail: function (res) {
  1277 + //获取默认空白图
  1278 + wx.getImageInfo({
  1279 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  1280 + success: function(res) {
  1281 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  1282 + tt();
  1283 + }
  1284 + })
  1285 + }
  1286 + });
  1287 + },
  1288 +
  1289 + closePoster() {
  1290 + this.setData({
  1291 + showPoster: false,
  1292 + });
  1293 + },
  1294 + // 保存图片到手机
  1295 + savePic() {
  1296 + getApp().savePic(this);
  1297 + },
  1298 + // 预览海报
  1299 + previewPoster() {
  1300 + getApp().globalData.no_clear=1;
  1301 + wx.previewImage({
  1302 + current: this.data.shareImgPath, // 当前显示图片的http链接
  1303 + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表
  1304 + });
  1305 + },
  1306 +
  1307 +
  1308 +
  1309 +});
0 1310 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "礼包详情",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm",
  6 + "qr_code": "/components/qr_code/qr_code",
  7 + "nav_b": "/components/nav_b/nav_b",
  8 + "share": "/components/share/share"
  9 + }
  10 +}
0 11 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml 0 → 100644
  1 +<view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;">
  2 + <view class="box_top data-v-3a5b7e36">
  3 + <image src="{{iurl}}{{monthgiftbag.cover_img}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image>
  4 + </view>
  5 + <view class="box_title data-v-3a5b7e36" >
  6 +
  7 + <view class="flex ai_c fs28" style="margin-bottom: 20rpx" wx:if="{{isBuy==0 && pick_up}}">
  8 + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>{{pick_up.pickup_name}}
  9 + </view>
  10 +
  11 + <view class="top_title data-v-3a5b7e36">
  12 + <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{monthgiftbag.giftTitle}}</text>
  13 +
  14 + <!-- 这个是分享按钮 -->
  15 + <!-- <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare">
  16 + <view class="iconfont icon-share fs40" ></view>
  17 + <view class="fs22 c-7b">分享</view>
  18 + </view> -->
  19 +
  20 +
  21 + </view>
  22 + <!-- <view class="top_time data-v-3a5b7e36" wx:if="{{!flag}}">
  23 + <block wx:if="{{isBuy==1 && giftTitle && isStart!=1}}" >
  24 + <text class="data-v-3a5b7e36">
  25 + {{"活动开始时间:"+giftStart}}
  26 + </text>
  27 + </block>
  28 +
  29 + <block wx:else>
  30 + <text class="data-v-3a5b7e36" wx:if="{{isBuy==0 && iswarelbtype}}">{{"兑换结束时间:"+giftDate}}</text>
  31 + <text class="data-v-3a5b7e36" wx:if="{{flag == 1}}">
  32 + {{"活动结束时间:"+giftDate}}
  33 + </text>
  34 + </block>
  35 + </view>
  36 + <view class="top_time data-v-3a5b7e36" wx:if="{{flag == 1 && iswarelbtype}}">
  37 + <text class="data-v-3a5b7e36" wx:if="{{exchangeType == 1}}">
  38 + {{"兑换时间:领取后"+exchangeDay+"天内兑换"}}
  39 + </text>
  40 + <text class="data-v-3a5b7e36" wx:elif="{{exchangeType == 2}}">
  41 + {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}}
  42 + </text>
  43 + </view> -->
  44 +
  45 + <view class="top_price data-v-3a5b7e36">
  46 +
  47 +
  48 + <block wx:if="{{monthgiftbag.lbPrice>0}}">
  49 + <text class="data-v-3a5b7e36">{{"¥"+monthgiftbag.lbPrice}}</text>
  50 + </block>
  51 + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}">
  52 + <text class="data-v-3a5b7e36">/</text>
  53 + </block>
  54 + <block wx:if="{{monthgiftbag.payIntegral>0}}">
  55 + <text class="data-v-3a5b7e36">{{monthgiftbag.payIntegral+"积分"}}</text>
  56 + </block>
  57 + <!-- <block wx:if="{{giftType>0}}">
  58 + <text class="data-v-3a5b7e36">{{actTitle}}</text>
  59 + </block> -->
  60 +
  61 +
  62 +
  63 +
  64 + </view>
  65 + <view class="top_foot data-v-3a5b7e36">
  66 + <view class="top_foot_price data-v-3a5b7e36 no_line_x">
  67 + <text class="data-v-3a5b7e36"> {{monthgiftbag.oldPrice?'零售价:':''}}{{monthgiftbag.oldPrice+"元"}}</text>
  68 + </view>
  69 + <!-- <view class="top_foot_qty data-v-3a5b7e36">
  70 + <text class="data-v-3a5b7e36" wx:if="{{!flag}}">{{"已售:"+giftQty+"件"}}</text>
  71 + <text class="data-v-3a5b7e36" wx:elif="{{flag == 1 && giftQty > 0}}">{{"数量:"+giftQty+"件"}}</text>
  72 + </view> -->
  73 + </view>
  74 + </view>
  75 + <view class="box_ware data-v-3a5b7e36" wx:if="{{false}}">
  76 + <view class="box_ware_title data-v-3a5b7e36">
  77 + <text class="data-v-3a5b7e36">礼包内容</text>
  78 + </view>
  79 + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id">
  80 + <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36">
  81 + <view class="box_ware_img data-v-3a5b7e36">
  82 + <block wx:if="{{item.lbType==1}}">
  83 + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  84 + </block>
  85 + <block wx:if="{{item.lbType==2}}">
  86 + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  87 + </block>
  88 + <block wx:if="{{item.lbType==3}}">
  89 + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  90 + </block>
  91 + <block wx:if="{{item.lbType==4}}">
  92 + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  93 + </block>
  94 + <block wx:if="{{item.lbType==5}}">
  95 + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  96 + </block>
  97 + </view>
  98 + <view class="box_ware_item data-v-3a5b7e36">
  99 + <view class="box_ware_item_title data-v-3a5b7e36">
  100 + <text class="data-v-3a5b7e36">{{item.couponName}}</text>
  101 + </view>
  102 + <view class="box_ware_item_price data-v-3a5b7e36">
  103 + <text class="data-v-3a5b7e36"></text>
  104 + </view>
  105 + <view class="box_ware_item_qty data-v-3a5b7e36 flex">
  106 + <text class="data-v-3a5b7e36 ellipsis-1">
  107 + {{"数量:"+item.num}}
  108 + </text>
  109 + <block wx:if="{{isBuy==0 && !flag && item.lbType==1}}">
  110 + <text style="margin-left:10rpx" wx:if="{{item.useState}}">
  111 + 已核销
  112 + </text>
  113 + <text style="margin-left:10rpx" wx:else>
  114 + 未核销
  115 + </text>
  116 + </block>
  117 + </view>
  118 +
  119 + <view class="box_ware_code data-v-3a5b7e36" wx:if="{{!flag}}">
  120 + <!-- <block wx:if="{{c_state==0}}"> -->
  121 +
  122 + <block wx:if="{{isBuy==0&item.lbType==1}}">
  123 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" data-codeId="{{item.Id}}" class="data-v-3a5b7e36"></image>
  124 + </block>
  125 +
  126 + <block wx:if="{{isBuy==0&item.lbType==2}}">
  127 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/packageD/pages/user/coupons/coupons" bindtap="goto"></image>
  128 + </block>
  129 + <block wx:if="{{isBuy==0&item.lbType==3}}">
  130 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>
  131 + </block>
  132 + <block wx:if="{{isBuy==0&item.lbType>3}}">
  133 + <text class="data-v-3a5b7e36">奖励已发放</text>
  134 + </block>
  135 + </view>
  136 + </view>
  137 + </view>
  138 + </block>
  139 + </view>
  140 + <view class="foot_box data-v-3a5b7e36">
  141 + <view class="foot_box_title data-v-3a5b7e36">
  142 + <text class="data-v-3a5b7e36">活动说明</text>
  143 + </view>
  144 + <view class="foot_box_remark data-v-3a5b7e36">
  145 + <rich-text nodes="{{monthgiftbag.remark}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
  146 + </view>
  147 + </view>
  148 +
  149 +
  150 + <view class="foot_empty data-v-3a5b7e36"></view>
  151 +
  152 + <block wx:if="{{flag != 1}}">
  153 + <block wx:if="{{isBuy==1 && monthgiftbag.giftTitle}}">
  154 + <block wx:if="{{isStart==1}}">
  155 + <view class="foot_button data-v-3a5b7e36">
  156 + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}">
  157 + <view class="foot_button_left data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice">
  158 + <text class="data-v-3a5b7e36 ">立即购买</text>
  159 + </view>
  160 + <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
  161 + <text class="data-v-3a5b7e36">立即兑换</text>
  162 + </view>
  163 + </block>
  164 + <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral<=0}}">
  165 + <view class="foot_button_buy data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}">
  166 + <text class="data-v-3a5b7e36">立即购买</text>
  167 + </view>
  168 + </block>
  169 + <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral>0}}">
  170 + <view class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
  171 + <text class="data-v-3a5b7e36">立即兑换</text>
  172 + </view>
  173 + </block>
  174 + <!-- <block >
  175 + <view class="foot_button_intalge data-v-3a5b7e36 " wx:if="{{!is_receive}}" bindtap="getGift" data-id="{{lbId}}">
  176 + <text class="data-v-3a5b7e36">领取</text>
  177 + </view>
  178 + <view class="foot_button_intalge data-v-3a5b7e36 " wx:if="{{is_receive}}" data-id="{{lbId}}">
  179 + <text class="data-v-3a5b7e36">已领取</text>
  180 + </view>
  181 + </block> -->
  182 + </view>
  183 + </block>
  184 + <block wx:else>
  185 + <view class="foot_button data-v-3a5b7e36">
  186 + <view class="foot_button_intalge data-v-3a5b7e36 gray ">
  187 + <text class="data-v-3a5b7e36">活动还未开始</text>
  188 + </view>
  189 + </view>
  190 + </block>
  191 +
  192 + </block>
  193 + <block wx:if="{{isBuy==0}}">
  194 + <view class="foot_button data-v-3a5b7e36">
  195 + <block wx:if="{{is_lb!=1}}">
  196 + <view class="foot_button_buy data-v-3a5b7e36 overdue">
  197 + <text class="data-v-3a5b7e36">无核销商品</text>
  198 + </view>
  199 + </block>
  200 + <block wx:else>
  201 + <view wx:if="{{c_state==-1}}" class="foot_button_buy data-v-3a5b7e36 overdue" >
  202 + <text class="data-v-3a5b7e36">兑换未开始</text>
  203 + </view>
  204 + <view wx:if="{{c_state==0}}" class="foot_button_buy data-v-3a5b7e36" bindtap="getcode">
  205 + <text class="data-v-3a5b7e36">立即使用</text>
  206 + </view>
  207 + <view wx:if="{{c_state==1}}" class="foot_button_buy data-v-3a5b7e36 overdue" bindtap="getcode">
  208 + <text class="data-v-3a5b7e36">商品已核销</text>
  209 + </view>
  210 + <view wx:if="{{c_state==2}}" class="foot_button_buy data-v-3a5b7e36 overdue">
  211 + <text class="data-v-3a5b7e36">商品兑换时间已过</text>
  212 + </view>
  213 + </block>
  214 + </view>
  215 + </block>
  216 + </block>
  217 +
  218 +</view>
  219 +<!-- 引入提示组件 -->
  220 +<warn id="warn"></warn>
  221 +<my_confirm id="my_confirm"></my_confirm>
  222 +<!-- 弹出框扫描 -->
  223 +<qr_code id="qc_com"></qr_code>
  224 +<!-- 制作一个圆球导航 -->
  225 +<nav_b id="nav_b"></nav_b>
  226 +
  227 +<include src="../public/buy_com.wxml"></include>
  228 +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas>
  229 +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
  230 +
  231 +
  232 +<view wx:if="{{showPoster}}">
  233 + <view class="mask" catchtap="closePoster"></view>
  234 + <view class="poster-container">
  235 + <view class="poster-wrapper">
  236 + <view class="poster" bindtap="previewPoster">
  237 + <!-- <view class="poster" bindtap="previewImage"> -->
  238 + <image src="{{shareImgPath}}" class="poster-img"></image>
  239 + <view class="btn-close" catchtap="closePoster">
  240 + <text class="iconfont icon-close"></text>
  241 + </view>
  242 + </view>
  243 + <view class="btn-container">
  244 + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> -->
  245 + <button class="btn-share" bindtap="savePic">保存到相册</button>
  246 + </view>
  247 + </view>
  248 + </view>
  249 +</view>
0 250 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxss 0 → 100644
  1 +@charset "UTF-8";
  2 +@import '../giftpackbuy/goodsInfo.wxss';
  3 +
  4 +.box.data-v-3a5b7e36 {
  5 + -webkit-align-content: center;
  6 + align-content: center;
  7 + background-color: #e85f93;
  8 +}
  9 +
  10 +.box_top.data-v-3a5b7e36 {
  11 + width: 100%;
  12 +}
  13 +
  14 +.box_top image.data-v-3a5b7e36 {
  15 + width: 100%;
  16 + max-height: 540rpx;
  17 +}
  18 +
  19 +.box_title.data-v-3a5b7e36 {
  20 + margin: 10rpx 20rpx 20rpx 20rpx;
  21 + padding: 35rpx;
  22 + background-color: #fff;
  23 + border-radius: 40rpx;
  24 +}
  25 +
  26 +.top_title.data-v-3a5b7e36 {
  27 + font-size: 30rpx;
  28 + margin-bottom: 10rpx;
  29 + position: relative;
  30 +}
  31 +
  32 +.top_time.data-v-3a5b7e36 {
  33 + font-size: 27rpx;
  34 + color: #b9b5b5;
  35 +}
  36 +
  37 +.top_price.data-v-3a5b7e36 {
  38 + font-size: 35rpx;
  39 + color: #d61b30;
  40 + margin-top: 30rpx;
  41 + margin-bottom: 5rpx;
  42 + position: relative;
  43 +}
  44 +
  45 +.top_foot.data-v-3a5b7e36 {
  46 + display: -webkit-box;
  47 + display: -webkit-flex;
  48 + display: flex;
  49 +}
  50 +
  51 +.top_foot_price.data-v-3a5b7e36 {
  52 + font-size: 22rpx;
  53 + color: #b9b5b5;
  54 + width: 50%;
  55 + text-decoration: line-through;
  56 +}
  57 +
  58 +.top_foot_qty.data-v-3a5b7e36 {
  59 + font-size: 22rpx;
  60 + color: #b9b5b5;
  61 + width: 50%;
  62 + -webkit-align-content: flex-end;
  63 + align-content: flex-end;
  64 + text-align: right;
  65 +}
  66 +
  67 +.box_ware.data-v-3a5b7e36 {
  68 + margin: 10rpx 20rpx 20rpx 20rpx;
  69 + padding: 35rpx;
  70 + background-color: #fff;
  71 + border-radius: 40rpx;
  72 +}
  73 +
  74 +.box_ware_title.data-v-3a5b7e36 {
  75 + font-size: 35rpx;
  76 + margin: 5rpx 0rpx 30rpx 0rpx;
  77 +}
  78 +
  79 +.box_ware_box.data-v-3a5b7e36 {
  80 + display: -webkit-box;
  81 + display: -webkit-flex;
  82 + display: flex;
  83 + margin: 10rpx 0rpx 25rpx 0rpx;
  84 +}
  85 +
  86 +/* .box_ware_img.data-v-3a5b7e36 {
  87 + width: 30%;
  88 + height: 180rpx;
  89 + border: #999999 solid 1rpx;
  90 +} */
  91 +
  92 +.box_ware_img image.data-v-3a5b7e36 {
  93 + /* width: 185rpx;
  94 + height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */
  95 + border: 2rpx solid #999;
  96 + width: 120rpx;
  97 + height: 120rpx;
  98 + background-color: #f8f8f8;
  99 +}
  100 +
  101 +.box_ware_item.data-v-3a5b7e36 {
  102 + width: 70%;
  103 + margin-left: 25rpx;
  104 + position: relative;
  105 +}
  106 +
  107 +.box_ware_item_title.data-v-3a5b7e36 {
  108 + font-size: 24rpx;
  109 + word-break: break-all;
  110 + text-overflow: ellipsis;
  111 + display: -webkit-box;
  112 + -webkit-box-orient: vertical;
  113 + -webkit-line-clamp: 2;
  114 + overflow: hidden;
  115 +}
  116 +
  117 +.box_ware_count.data-v-3a5b7e36 {
  118 + display: -webkit-box;
  119 + display: -webkit-flex;
  120 + display: flex;
  121 +}
  122 +
  123 +.box_ware_item_price.data-v-3a5b7e36 {
  124 + font-size: 25rpx;
  125 + color: #b9b5b5;
  126 + position: absolute;
  127 + bottom: 60rpx;
  128 + left: 0;
  129 +}
  130 +
  131 +.box_ware_item_qty.data-v-3a5b7e36 {
  132 + font-size: 22rpx;
  133 + position: absolute;
  134 + bottom: 15rpx;
  135 + left: 0;
  136 +}
  137 +
  138 +.box_ware_code.data-v-3a5b7e36 {
  139 + position: absolute;
  140 + right: 10rpx;
  141 + bottom: 10rpx;
  142 +}
  143 +
  144 +.box_ware_code image.data-v-3a5b7e36 {
  145 + width: 50rpx;
  146 + height: 50rpx;
  147 +}
  148 +
  149 +.box_ware_code text.data-v-3a5b7e36 {
  150 + font-size: 20rpx;
  151 +}
  152 +
  153 +.foot_box.data-v-3a5b7e36 {
  154 + margin: 10rpx 20rpx 50rpx 20rpx;
  155 + padding: 35rpx;
  156 + background-color: #fff;
  157 + border-radius: 40rpx;
  158 +}
  159 +
  160 +.foot_box_title.data-v-3a5b7e36 {
  161 + font-size: 35rpx;
  162 + margin-bottom: 30rpx;
  163 +}
  164 +
  165 +.foot_box_remark.data-v-3a5b7e36 {
  166 + font-size: 27rpx;
  167 + line-height: 40rpx;
  168 +}
  169 +
  170 +.foot_empty.data-v-3a5b7e36 {
  171 + height: 90rpx;
  172 +}
  173 +
  174 +.foot_button.data-v-3a5b7e36 {
  175 + display: -webkit-box;
  176 + display: -webkit-flex;
  177 + display: flex;
  178 + margin: 20rpx 0rpx 0rpx 0rpx;
  179 + padding: 25rpx 0rpx;
  180 + background: #fff;
  181 + text-align: center;
  182 + -webkit-box-pack: center;
  183 + -webkit-justify-content: center;
  184 + justify-content: center;
  185 + position: fixed;
  186 + bottom: 0;
  187 + left: 0;
  188 + width: 100%;
  189 +}
  190 +
  191 +.foot_button_left.data-v-3a5b7e36 {
  192 + background: #e4010c;
  193 + color: #fff;
  194 + width: 250rpx;
  195 + height: 70rpx;
  196 + font-size: 28rpx;
  197 + line-height: 70rpx;
  198 + border-radius: 40rpx;
  199 + margin-right: 20rpx;
  200 +}
  201 +
  202 +.foot_button_right.data-v-3a5b7e36 {
  203 + background: #ffbb42;
  204 + color: #fff;
  205 + width: 250rpx;
  206 + height: 70rpx;
  207 + font-size: 28rpx;
  208 + line-height: 70rpx;
  209 + border-radius: 40rpx;
  210 +}
  211 +
  212 +.foot_button_buy.data-v-3a5b7e36 {
  213 + background: #e4010c;
  214 + color: #fff;
  215 + width: 400rpx;
  216 + height: 70rpx;
  217 + font-size: 28rpx;
  218 + line-height: 70rpx;
  219 + border-radius: 40rpx;
  220 +}
  221 +
  222 +.foot_button_intalge.data-v-3a5b7e36 {
  223 + background: #ffbb42;
  224 + color: #fff;
  225 + width: 400rpx;
  226 + height: 70rpx;
  227 + font-size: 28rpx;
  228 + line-height: 70rpx;
  229 + border-radius: 40rpx;
  230 +}
  231 +
  232 +page.data-v-3a5b7e36 {
  233 + background-color: #e85f93;
  234 +}
  235 +
  236 +.foot_box_remark.data-v-3a5b7e36 ._img {
  237 + width: 100%;
  238 +}
  239 +
  240 +.foot_box_remark.data-v-3a5b7e36 .img {
  241 + line-height: 0;
  242 +}
  243 +.overdue.data-v-3a5b7e36{
  244 + background-color: rgb(153,153,153);
  245 +}
  246 +
  247 +.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; }
  248 +
  249 +.xc-share-frame {
  250 + position: absolute; right:0; top: -10rpx;
  251 +}
  252 +
... ...
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +var ut = require("../../../../../utils/util.js");
  7 +var com = require("../public/buy_com.js");
  8 +
  9 +Page({
  10 + data: {
  11 + url: a.url, //接口网址
  12 + iurl: a.imghost, //图片前缀网址
  13 + isBuy: 0,
  14 + getGiftID: '', //礼包id
  15 + giftImage: '',
  16 + giftTitle: '',
  17 + giftDate: '',
  18 + giftPrice: '',
  19 + giftIntegral: '',
  20 + giftPosPrice: '',
  21 + giftQty: '',
  22 + giftRemark: '',
  23 + giftType: '',
  24 + actTitle: '',
  25 + getUrl: '',
  26 + wareCard: [],
  27 + orderSn: "", //订单编号
  28 + lbId: "",
  29 + code: "", //核销码
  30 + c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期
  31 + is_lb: 0, //是否有礼包
  32 + default_color: null,
  33 + first_leader: e.globalData.first_leader || 0, // 推荐人ID
  34 +
  35 + //门店相关
  36 + ismend: 0,
  37 + is_sec_mend: 0,
  38 + sto_sele_name: "", //选中的门店名称
  39 + sto_sele_id: "", //选中的门店id
  40 + sto_sele_distr: "", //选择的门店的配送方式
  41 + is_show_sto_cat: 1, //是否显示门店分类
  42 + only_pk: null,
  43 + all_sto: null,
  44 + sec_sto: null, //选择了的门店分类
  45 + pickpu_list: null, //读出的所有门店list
  46 + def_pickpu_list: null, //一开始5个门店list
  47 + sec_pick_index: 0, //第二级门店选择ID
  48 + fir_pick_index: 0, //第一级门店选择ID
  49 + all_pick_list: null,//所有的门店先记录起来
  50 +
  51 + select_store: 0, //选择更多
  52 + index: 1,
  53 + more_store: 0, //选择门店
  54 + sort_store: 0, //门店分类
  55 + choice_sort_store: 0, //选择分类门店
  56 + new_user: 0, //新用户
  57 +
  58 + def_pick_store: null, // 默认的门店
  59 + fir_def_store: null, //客户默认的门店的
  60 + lat: null, //维度
  61 + lon: null, //经度
  62 +
  63 + is_get_local_ok: 0, //获取坐标是否完成
  64 + region_name: "门店分类", //区域的名字
  65 + is_gps: 1,
  66 + open_ind_store: 0, //哪里打开的门店列表的控制属性
  67 + default_store: {}, //创建添加默认门店地址的对象
  68 +
  69 + store: 0,
  70 + openSpecModal: 0,
  71 +
  72 + sto_sele_name_1: '',
  73 + share_goods_img:'', //礼包的分享图
  74 + giftImageCover:null,
  75 + canvasHidden:true,
  76 + is_receive:1, //是否已经领取
  77 + screenWidth: 0,
  78 +
  79 + },
  80 + onLoad: function (options) {
  81 +
  82 + var th = this;
  83 +
  84 + this.setData({
  85 + params: options,
  86 + })
  87 +
  88 + getApp().getConfig(function (e) {
  89 + th.setData({sto_sele_name_1: e.store_name})
  90 + })
  91 +
  92 + getApp().getConfig2(function (e) {
  93 + var json_d = JSON.parse(e.switch_list);
  94 + th.setData({
  95 + bconfig: e,
  96 + sys_switch: json_d,
  97 + is_retail_price: json_d.is_retail_price || 0
  98 + });
  99 + })
  100 +
  101 + //获取用户设备信息,屏幕宽度
  102 + wx.getSystemInfo({
  103 + success: res => {
  104 + th.setData({
  105 + screenWidth: res.screenWidth
  106 + })
  107 + }
  108 + });
  109 +
  110 + },
  111 + init() {
  112 + let options = this.data?.params; // this.data == null ? undefined:this.data.params
  113 + var th = this;
  114 + this.setData({
  115 + getUserID: d.user_id,
  116 + getStorageID: a.stoid,
  117 + })
  118 +
  119 + if(!options.lbId && options.scene){
  120 + var gid_str = decodeURIComponent(options.scene);
  121 + gid_str = gid_str.split("_");
  122 +
  123 + options.lbId=gid_str[0];
  124 + options.first_leader=gid_str[1];
  125 + options.isBuy=1;
  126 + }
  127 +
  128 +
  129 + this.setData({
  130 + isBuy: options.isBuy,
  131 + getGiftID: options.lbId,
  132 + orderSn: options.orderSn,
  133 + flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1
  134 + record_list_id:options.record_list_id,
  135 + is_receive:options.is_receive
  136 + })
  137 + if (options.lbId) th.data.lbId = options.lbId;
  138 + //-- 获取分享人的ID --
  139 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  140 + if (first_leader) {
  141 + this.setData({
  142 + first_leader,
  143 + })
  144 + //-- user_id代过来免登录 --
  145 + getApp().globalData.first_leader = first_leader;
  146 + //调用接口判断是不是会员
  147 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  148 + if (res.data.code == 0) {
  149 + getApp().globalData.guide_id = res.data.data.id;
  150 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  151 + }
  152 + })
  153 + }
  154 + th.close();
  155 +
  156 +
  157 + if (this.data.flag == 1) {
  158 + this.getZxlbDetails();
  159 + } else {
  160 + if(this.data.orderSn){
  161 + this.GetMyGiftList();
  162 + }else{
  163 + this.GetBuyGiftList();
  164 + }
  165 + // if (this.data.isBuy == 0) {
  166 + // this.GetMyGiftList();
  167 + // } else if (this.data.isBuy == 1) {
  168 + // this.GetBuyGiftList();
  169 + // }
  170 +
  171 + }
  172 +
  173 + },
  174 +
  175 + onShow: function () {
  176 + getApp().check_can_share();
  177 + getApp().is_Single_page(this, function () {
  178 + //--先判断会员状态--
  179 + var user_info = getApp().globalData.userInfo;
  180 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  181 + getApp().goto('/packageE/pages/togoin/togoin');
  182 + return false;
  183 + }
  184 + this.init();
  185 + })
  186 + },
  187 + GetBuyPrice: function (e) {
  188 + var that = this.data;
  189 + var th = this;
  190 + //如果还没有开始的话
  191 + if (th.data.isStart != 1) {
  192 + getApp().my_warnning("活动还没有开始", 0, th);
  193 + return false;
  194 + }
  195 +
  196 + this.data.payMoney = th.data.sele_g.payMoney;
  197 + th.setData({buyType: 2})
  198 + if (th.data.sele_g.is_pickup) {
  199 + th.setData({
  200 + openSpecModal: 1
  201 + })
  202 + } else {
  203 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  204 + my_confirm.open(
  205 + "是否确定购买该礼包",
  206 + "取消",
  207 + "确定",
  208 + function () {
  209 + my_confirm.open_cancel(0);
  210 + },
  211 + function () {
  212 + my_confirm.open_cancel(0);
  213 + com.buy_libao(th)
  214 + }
  215 + )
  216 + }
  217 +
  218 +
  219 + },
  220 + GetBuyIntegral: function (e) {
  221 + var that = this.data;
  222 + var th = this;
  223 +
  224 + //如果还没有开始的话
  225 + if (th.data.isStart != 1) {
  226 + getApp().my_warnning("活动还没有开始", 0, th);
  227 + return false;
  228 + }
  229 +
  230 + th.setData({buyType: 1});
  231 + if (th.data.sele_g.is_pickup) {
  232 + th.setData({
  233 + openSpecModal: 1
  234 + })
  235 + } else {
  236 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  237 + my_confirm.open(
  238 + "是否确定兑换该礼包",
  239 + "取消",
  240 + "确定",
  241 + function () {
  242 + my_confirm.open_cancel(0);
  243 + },
  244 + function () {
  245 + my_confirm.open_cancel(0);
  246 + com.buy_libao(th)
  247 + })
  248 + }
  249 +
  250 +
  251 + },
  252 +
  253 + GetMyGiftList: function () {
  254 + var _this = this;
  255 + var th = this;
  256 + getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', {
  257 + isShowLoading: true,
  258 + data: {
  259 + "storeId": a.stoid, //商家ID
  260 + "userId": d.user_id, //用户ID
  261 + "orderSn": th.data.orderSn
  262 + },
  263 + success: function (res) {
  264 + if (res.data.code == 0) {
  265 + console.log('商品------++')
  266 + console.log(res)
  267 + th.setData({
  268 + giftImage: th.data.iurl + res.data.data.lbUrl,
  269 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
  270 + giftTitle: res.data.data.giftTitle,
  271 + default_color: res.data.data.bgcolor
  272 + })
  273 +
  274 + if (res.data.data.iswarelbtype == 1) {
  275 + th.setData({iswarelbtype: 1})
  276 + }
  277 +
  278 + if (!res.data.data.giftRemark || res.data.data.giftRemark == '') {
  279 + th.setData({
  280 + giftRemark: '暂无详情......'
  281 + })
  282 + } else {
  283 + th.setData({
  284 + giftRemark: res.data.data.giftRemark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  285 + })
  286 + }
  287 +
  288 + //---获取日期的时间戳---
  289 + var t_endtime = res.data.data.endTime;
  290 + t_endtime = t_endtime.replace(/-/g, '/');
  291 + var t_date = new Date(t_endtime) / 1000;
  292 + var t_now = ut.gettimestamp();
  293 +
  294 + var t_starttime = res.data.data.starTime;
  295 + t_starttime = t_starttime.replace(/-/g, '/');
  296 + var t_sdate = new Date(t_starttime) / 1000;
  297 +
  298 + if (res.data.data.goodsUseState) th.setData({
  299 + c_state: 1
  300 + })
  301 + else if (t_date <= t_now)
  302 + th.setData({
  303 + c_state: 2
  304 + })
  305 + else if (t_sdate > t_now)
  306 + th.setData({
  307 + c_state: -1
  308 + })
  309 + th.setData({
  310 + giftDate: res.data.data.endTime,
  311 + giftPosPrice: res.data.data.giftPosPrice,
  312 + giftQty: res.data.data.giftQty,
  313 + giftIntegral: res.data.data.payIntegral,
  314 + giftPrice: res.data.data.payMoney,
  315 + giftType: res.data.data.actType,
  316 + actTitle: res.data.data.actTitle,
  317 + wareCard: res.data.data.wareCard,
  318 + lbId: res.data.data.lbId
  319 + })
  320 + //判断是否有礼包
  321 + for (var i = 0; i < res.data.data.wareCard.length; i++) {
  322 + if (res.data.data.wareCard[i].lbType == 1) {
  323 + th.setData({
  324 + is_lb: 1
  325 + })
  326 + break;
  327 + }
  328 + }
  329 +
  330 + if (res.data.data.pickup_id) {
  331 + getApp().request.get("/api/weshop/pickup/get/" + os.stoid + "/" + res.data.data.pickup_id, {
  332 + success: function (res) {
  333 + if (res.data.code == 0) {
  334 + th.setData({pick_up: res.data.data});
  335 + }
  336 + }
  337 + });
  338 +
  339 + }
  340 +
  341 +
  342 + } else {
  343 + getApp().my_warnning(res.data.msg, 0, th);
  344 + return false;
  345 + }
  346 + }
  347 + });
  348 +
  349 + },
  350 +
  351 + check_guide(func){
  352 + var first_leader=this.data.first_leader;
  353 + if(!first_leader){
  354 + func();
  355 + return false;
  356 + }
  357 + if(this.data.is_geted_guide_pick){
  358 + func();
  359 + return false;
  360 + }
  361 + if(getApp().globalData.guide_pick_id){
  362 + func();
  363 + return false;
  364 + }
  365 + var th=this;
  366 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  367 + if (res.data.code == 0) {
  368 + getApp().globalData.guide_pick_id= res.data.data.pickup_id;
  369 + }
  370 + th.data.is_geted_guide_pick=1;
  371 + func();
  372 + })
  373 + },
  374 +
  375 + GetBuyGiftList: function () {
  376 + var _this2 = this;
  377 + var th = this.data;
  378 + let url='/api/weshop/marketing/giftbag/detail/getNew'
  379 + let data={
  380 + "storeId": a.stoid, //商家ID
  381 + "userId": d.user_id, //用户ID
  382 + }
  383 + if (th.orderSn) {
  384 + url='/api/weshop/marketing/my/giftbag/detail/get'
  385 + data.orderSn=th.orderSn
  386 + }else{
  387 + data.giftBagId=th.getGiftID
  388 + }
  389 + // data.giftBagId=th.getGiftID
  390 + getApp().request.get(url, {
  391 + isShowLoading: true,
  392 + data:data,
  393 + success: function success(res) {
  394 + if (res.data.code == 0) {
  395 + _this2.setData({
  396 + giftImage: th.iurl + res.data.data.lbUrl,
  397 + giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl),
  398 + // giftTitle: res.data.data.giftTitle,
  399 + giftTitle: res.data.data.lbTitle,
  400 + default_color: res.data.data.bgcolor
  401 + })
  402 + if (!res.data.data.lbIntro) {
  403 + _this2.setData({
  404 + giftRemark: '暂无详情......'
  405 + })
  406 + } else {
  407 + _this2.setData({
  408 + giftRemark: res.data.data.lbIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  409 + })
  410 + }
  411 +
  412 + var isStart = 0;
  413 + var now = ut.gettimestamp();
  414 +
  415 + var str = res.data.data.starTime;
  416 + var start = Date.parse(new Date(str));
  417 + start = start / 1000;
  418 + if (start < now) isStart = 1;
  419 +
  420 + _this2.setData({
  421 + giftDate: res.data.data.endTime,
  422 + giftStart: res.data.data.starTime,
  423 + giftPosPrice: res.data.data.oldPrice,
  424 + giftQty: res.data.data.giftQty,
  425 + giftIntegral: res.data.data.payIntegral,
  426 + giftPrice: res.data.data.payMoney,
  427 + giftType: res.data.data.actType,
  428 + actTitle: res.data.data.actTitle,
  429 + wareCard: res.data.data.wareCard,
  430 + isStart: isStart,
  431 + sele_g: res.data.data
  432 + })
  433 +
  434 +
  435 + var sele_g = res.data.data;
  436 + //需不需要门店,不需要门店返回
  437 + if (!sele_g.is_pickup) return false;
  438 +
  439 + //-- 检测一下有没有门店 --
  440 + _this2.check_guide(function (){
  441 + com.wait_for_store_config(_this2);
  442 + com.set_user_mo_store(_this2, os, function () {
  443 + if (sele_g.pickup_list && _this2.data.def_pick_store) {
  444 + com.check_def_pk(_this2);
  445 + }
  446 + });
  447 + com.get_sto(_this2, os);
  448 + })
  449 +
  450 + } else {
  451 + getApp().my_warnning(res.data.msg, 0, _this2);
  452 + return false;
  453 + }
  454 + }
  455 + });
  456 +
  457 + },
  458 +
  459 + getZxlbDetails: function () {
  460 +
  461 + var th = this;
  462 + getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', {
  463 + isShowLoading: true,
  464 + data: {
  465 + "storeId": a.stoid, //商家ID
  466 + //"userId": d.user_id, //用户ID
  467 + "giftBagId": th.data.lbId
  468 + },
  469 + success: function (res) {
  470 + if (res.data.code == 0) {
  471 + th.setData({
  472 + giftImage: th.data.iurl + res.data.data.lbUrl,
  473 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
  474 + giftTitle: res.data.data.lbTitle,
  475 + default_color: res.data.data.bgcolor
  476 + })
  477 + if (res.data.data.lbIntro == '') {
  478 + th.setData({
  479 + giftRemark: '暂无详情......'
  480 + })
  481 + } else {
  482 + th.setData({
  483 + giftRemark: res.data.data.lbIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
  484 + })
  485 + }
  486 +
  487 + //---获取日期的时间戳---
  488 + let exchangeType = res.data.data.exchangeType;
  489 + let exchangeDay = res.data.data.exchangeDay;
  490 + let exchangeStartTime = res.data.data.exchangeStartTime;
  491 + let exchangeEndTime = res.data.data.exchangeEndTime;
  492 + // let t_endtime;
  493 +
  494 + if (exchangeType == 2) {
  495 + if (exchangeStartTime == 0 || !exchangeStartTime) {
  496 + exchangeStartTime = ut.gettimestamp();
  497 + }
  498 + exchangeStartTime = ut.formatTime(exchangeStartTime, 0);
  499 + exchangeEndTime = ut.formatTime(exchangeEndTime, 0);
  500 + }
  501 +
  502 +
  503 + th.setData({
  504 + // giftDate: t_endtime,
  505 + giftPosPrice: res.data.data.oldPrice,
  506 + giftQty: res.data.data.lbNum,
  507 + giftIntegral: res.data.data.exchangeIntegral,
  508 + giftPrice: res.data.data.lbPrice,
  509 + giftType: res.data.data.actType,
  510 + actTitle: res.data.data.actTitle,
  511 + wareCard: res.data.data.wareCard,
  512 + lbId: res.data.data.lbId,
  513 + exchangeType: exchangeType,
  514 + exchangeDay: exchangeDay,
  515 + exchangeStartTime: exchangeStartTime,
  516 + exchangeEndTime: exchangeEndTime,
  517 + })
  518 + //判断是否有礼包
  519 + for (var i = 0; i < res.data.data.wareCard.length; i++) {
  520 + if (res.data.data.wareCard[i].lbType == 1) {
  521 + th.setData({
  522 + is_lb: 1
  523 + })
  524 + break;
  525 + }
  526 + }
  527 + } else {
  528 + getApp().my_warnning(res.data.msg, 0, th);
  529 + return false;
  530 + }
  531 + }
  532 + });
  533 +
  534 + },
  535 +
  536 +
  537 + //显示核销码
  538 + code_show: function (e) {
  539 + var th = this;
  540 + //--获取成功的时候--
  541 + var no = th.data.code;
  542 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  543 + var obj = {
  544 + val: no,
  545 + content: "请将二维码展示给核销员,收货更快捷"
  546 + };
  547 + qc_com.open(obj)
  548 + },
  549 + //获取核销码
  550 + getcode: function (e) {
  551 + var th = this;
  552 + var orderSn = th.data.orderSn; //订单号
  553 + let codeId = e.currentTarget.dataset.codeid;
  554 + var json = {
  555 + "storeId": a.stoid,
  556 + "orderSn": orderSn,
  557 + }
  558 + if (codeId && codeId !== "") {
  559 + json.id = codeId
  560 + }
  561 + var data = JSON.stringify(json);
  562 + var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址
  563 + getApp().request.json_post(url, json,
  564 + function (res) {
  565 + if (res.data.code == 0) {
  566 + th.setData({
  567 + code: res.data.data
  568 + })
  569 + th.code_show();
  570 + } else {
  571 + getApp().my_warnning(res.data.msg, 0, th);
  572 + }
  573 + },
  574 + function (res) {
  575 +
  576 + },
  577 + "put"
  578 + )
  579 +
  580 + },
  581 + //界面跳转
  582 + goto: function (e) {
  583 + var th = this;
  584 + var url = e.currentTarget.dataset.url;
  585 + getApp().goto(url);
  586 + },
  587 + //图片失败,默认图片
  588 + bind_bnerr2: function (e) {
  589 + var _errImg = e.target.dataset.errorimg;
  590 + var _errObj = {};
  591 + _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png";
  592 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  593 + },
  594 +
  595 + //图片失败,默认图片
  596 + bind_bnerr: function (e) {
  597 + var _errImg = e.target.dataset.errorimg;
  598 + var _errObj = {};
  599 + _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg";
  600 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  601 + //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
  602 +
  603 + },
  604 +
  605 + //关闭导航
  606 + close: function () {
  607 + var th = this;
  608 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  609 + nav_b.close_box();
  610 + nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy");
  611 + },
  612 +
  613 + //--- 分享设置 --
  614 + onShareAppMessage: function (e) {
  615 + getApp().globalData.no_clear = 1;
  616 + var curPage = this;
  617 + var pagePath = curPage.route; //当前页面url
  618 + if (pagePath.indexOf('/') != 0) {
  619 + pagePath = '/' + pagePath;
  620 + }
  621 + pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader=" + this.data.getUserID;
  622 + // if (this.data.isBuy == 0) {
  623 + // pagePath += "&orderSn=" + this.data.orderSn;
  624 + // } else {
  625 + // pagePath += "&lbId=" + this.data.getGiftID;
  626 + // }
  627 + // console.log('pagePath', pagePath);
  628 + return {
  629 + title: "礼包详情",
  630 + path: pagePath,
  631 + }
  632 + },
  633 +
  634 + /**
  635 + * 用户分享朋友圈
  636 + */
  637 + onShareTimeline() {
  638 + getApp().globalData.no_clear = 1;
  639 +
  640 + var pagePath = "&isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader=" + this.data.getUserID;
  641 + var user_id = getApp().globalData.user_id;
  642 + if (!user_id) user_id = 0;
  643 +
  644 + return {
  645 + title: "礼包详情",
  646 + query: 'first_leader=' + user_id + pagePath
  647 + }
  648 + },
  649 +
  650 + //免费领取
  651 + GetFree: function (e) {
  652 + var that = this.data;
  653 + var th = this;
  654 + //如果还没有开始的话
  655 + if (th.data.isStart != 1) {
  656 + getApp().my_warnning("活动还没有开始", 0, th);
  657 + return false;
  658 + }
  659 + th.setData({buyType: 3});
  660 + if (th.data.sele_g.is_pickup) {
  661 + th.setData({
  662 + openSpecModal: 1
  663 + })
  664 + } else {
  665 + // var id = e.currentTarget.dataset.id;//活动id
  666 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  667 + my_confirm.open(
  668 + "是否确定领取该礼包",
  669 + "取消",
  670 + "确定",
  671 + function () {
  672 + my_confirm.open_cancel(0);
  673 + },
  674 + function () {
  675 + my_confirm.open_cancel(0);
  676 + com.buy_libao(th)
  677 + })
  678 + }
  679 +
  680 +
  681 + },
  682 +
  683 +
  684 + getGift(){
  685 + var that=this;
  686 +
  687 + var json = {
  688 + // "actId": '', //活动Id
  689 + // "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  690 + // "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买
  691 + // "giftBagId": id, //每月礼包主表id
  692 + // "buyFrom": 2,
  693 + "id":that.data.record_list_id,// "记录Id",
  694 + "storeId": that.data.getStorageID, //商家Id
  695 + "userId": that.data.getUserID, //用户ID
  696 + };
  697 + // var url ="/api/weshop/marketing/buy/receive/gift/record/insert";
  698 + // var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder";
  699 + var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/recordReceive";
  700 + getApp().request.json_post(url, json,
  701 + function (res) {
  702 + console.log('领取礼包');
  703 + console.log(res);
  704 + if (res.data.code == 0 && res.data.data) {
  705 + that.setData({
  706 + is_receive:1
  707 + })
  708 + getApp().my_warnning("领取成功!", 1, that);
  709 + that.closeSpecModal();
  710 + setTimeout(()=>{
  711 + wx.navigateBack({
  712 + delta: 0,
  713 + })
  714 + },500)
  715 + } else {
  716 + that.setData({submit:0})
  717 + getApp().my_warnning(res.data.msg, 0, that);
  718 + }
  719 + },
  720 + function (res) {
  721 + that.setData({submit:0})
  722 + }
  723 + )
  724 + },
  725 +
  726 + //--- 设置一下默认库存的数量 ----
  727 + set_def_storage(ee) {
  728 + var that = this, th = this;
  729 + that.data.fir_def_store = ee;
  730 +
  731 + that.setData({
  732 + def_pick_store: ee,
  733 + sto_sele_name: ee.pickup_name,
  734 + sto_sele_id: ee.pickup_id,
  735 + sto_sele_distr: ee.distr_type
  736 + })
  737 + },
  738 + // 选择门店
  739 + choice_store: function (ee) {
  740 +
  741 + //--先判断会员状态--
  742 + var user_info = getApp().globalData.userInfo;
  743 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  744 + wx.navigateTo({
  745 + url: '/packageE/pages/togoin/togoin',
  746 + })
  747 + return false;
  748 + }
  749 +
  750 + var th = this;
  751 + var ind = ee.currentTarget.dataset.ind;
  752 + var bconfig = th.data.bconfig;
  753 +
  754 + //如果开启了,则不在选择门店
  755 + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  756 + return false;
  757 + }
  758 + if (!th.data.only_pk && !th.data.def_pickpu_list) {
  759 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  760 + return false;
  761 + }
  762 +
  763 + if (th.data.only_pk && !th.data.only_pk.length) {
  764 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  765 + return false;
  766 + }
  767 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  768 + getApp().confirmBox("门店库存不足", null, 25000, !1);
  769 + return false;
  770 + }
  771 +
  772 +
  773 + if (bconfig && bconfig.is_sort_storage) {
  774 + wx.getLocation({
  775 + type: 'gcj02',
  776 + success: function (res) {
  777 +
  778 + th.data.lat = res.latitude;
  779 + th.data.lon = res.longitude;
  780 + th.data.is_get_local_ok = 1;
  781 + th.setData({
  782 + is_gps: 1
  783 + });
  784 + //th.onShow();
  785 + com.get_sto(th, os);
  786 + },
  787 + fail: function (res) {
  788 + //th.onShow();
  789 + th.data.is_get_local_ok = 1;
  790 + com.get_sto(th, os);
  791 + if (res.errCode == 2) {
  792 + th.setData({
  793 + is_gps: 0
  794 + });
  795 + if (th.data.is_gps == 0) {
  796 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  797 + }
  798 + } else {
  799 + th.setData({
  800 + is_gps: "3"
  801 + });
  802 + }
  803 +
  804 + }
  805 + })
  806 + } else {
  807 + th.data.is_get_local_ok = 1;
  808 + com.get_sto(th, os);
  809 + }
  810 +
  811 + if (ind != undefined && ind != null) {
  812 + this.setData({
  813 + open_ind_store: ind,
  814 + store: 1,
  815 + openSpecModal: !1,
  816 + openSpecModal_pt: !1,
  817 + openSpecModal_flash_normal: !1,
  818 + })
  819 + } else {
  820 + this.setData({
  821 + store: 1,
  822 + openSpecModal: !1,
  823 + openSpecModal_pt: !1,
  824 + openSpecModal_flash_normal: !1
  825 +
  826 + })
  827 + }
  828 + },
  829 + //关闭选择门店
  830 + close_popup: function (e) {
  831 + var th = this;
  832 + this.setData({
  833 + store: 0,
  834 + choice_sort_store: 0,
  835 + sort_store: 0,
  836 + fir_pick_index: 0,
  837 + sec_pick_index: 0
  838 + })
  839 +
  840 + var openindstore = this.data.open_ind_store;
  841 + if (openindstore == 1) {
  842 + th.setData({
  843 + openSpecModal: !0,
  844 + openSpecModal_ind: openindstore,
  845 + });
  846 + } else if (openindstore == 2) {
  847 + th.setData({
  848 + openSpecModal: !0,
  849 + openSpecModal_ind: openindstore,
  850 + });
  851 + } else if (openindstore == 4) { //4就是拼团
  852 + th.setData({
  853 + openSpecModal_pt: 1, //打开拼团购买界面
  854 + store: 0, //关闭门店
  855 + choice_sort_store: 0, //关闭门店2级
  856 + sort_store: 0, //关闭门店2级
  857 + });
  858 + } else {
  859 + th.setData({
  860 + store: 0,
  861 + choice_sort_store: 0,
  862 + sort_store: 0
  863 + })
  864 + }
  865 +
  866 +
  867 + },
  868 +
  869 + //选择更多门店
  870 + more_store: function () {
  871 + this.setData({
  872 + sort_store: 1
  873 + });
  874 + },
  875 + // 返回按钮
  876 + returns: function () {
  877 + this.setData({
  878 + sort_store: 0,
  879 + choice_sort_store: 0
  880 + });
  881 + },
  882 + //---选择分类门店---
  883 + choice_sort_store: function (e) {
  884 + var index = e.currentTarget.dataset.index;
  885 + var region_name = e.currentTarget.dataset.region;
  886 + var item = this.data.all_sto[index];
  887 + this.setData({
  888 + region_name: region_name,
  889 + sort_store: 0,
  890 + choice_sort_store: 1,
  891 + sec_sto: item,
  892 + sec_pick_index: 0
  893 + });
  894 + },
  895 +
  896 + choose_for_store_fir: function (e) {
  897 + var index_c = e.currentTarget.dataset.ind;
  898 + var th = this;
  899 + th.setData({
  900 + fir_pick_index: index_c
  901 + })
  902 +
  903 + },
  904 +
  905 + //确定def_pick为选择的门店
  906 + sure_pick: function (e) {
  907 + var th = this;
  908 + var item = null;
  909 + var openindstore = th.data.open_ind_store;
  910 +
  911 + if (th.data.choice_sort_store == 0) {
  912 + var index = th.data.fir_pick_index;
  913 + if (th.data.is_show_sto_cat == 1) {
  914 + item = th.data.def_pickpu_list[index];
  915 + } else {
  916 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  917 + }
  918 +
  919 + } else {
  920 + var index = th.data.sec_pick_index;
  921 + item = th.data.sec_sto.s_arr[index];
  922 + }
  923 +
  924 + if(!item) return false;
  925 +
  926 + if (!th.data.sele_g) return false;
  927 +
  928 + th.setData({
  929 + def_pick_store: item,
  930 + sto_sele_name: item.pickup_name,
  931 + sto_sele_id: item.pickup_id,
  932 + sto_sele_distr: item.distr_type,
  933 + store: 0,
  934 + choice_sort_store: 0,
  935 + fir_pick_index: 0,
  936 + openSpecModal: !0,
  937 + });
  938 +
  939 +
  940 + },
  941 + //---点击二级之后的选择---
  942 + choose_for_store: function (e) {
  943 + var index_c = e.currentTarget.dataset.ind;
  944 + var th = this;
  945 + th.setData({
  946 + sec_pick_index: index_c,
  947 + fir_pick_index: index_c
  948 + })
  949 +
  950 + },
  951 + //把选择的门店设置成默认的门店def_pick
  952 + set_def_pick: function (e) {
  953 + var th = this;
  954 + var item = null;
  955 + if (th.data.choice_sort_store == 0) {
  956 + var index = th.data.fir_pick_index;
  957 + if (th.data.is_show_sto_cat == 1) {
  958 + item = th.data.def_pickpu_list[index];
  959 + } else {
  960 + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候
  961 + }
  962 + } else {
  963 + var index = th.data.sec_pick_index;
  964 + item = th.data.sec_sto.s_arr[index];
  965 + }
  966 +
  967 + if(!item) return false;
  968 +
  969 + th.setData({
  970 + def_pick_store: item,
  971 + sto_sele_name: item.pickup_name,
  972 + sto_sele_id: item.pickup_id,
  973 + sto_sele_distr: item.distr_type,
  974 + store: 0,
  975 + choice_sort_store: 0,
  976 + openSpecModal: !0,
  977 + });
  978 +
  979 + var user_id = getApp().globalData.user_id;
  980 + var def_pickup_id = item.pickup_id;
  981 + getApp().request.put('/api/weshop/users/update', {
  982 + data: {
  983 + user_id: user_id,
  984 + def_pickup_id: def_pickup_id
  985 + },
  986 + success: function (res) {
  987 + if (res.data.code == 0) {
  988 + if (th.data.choice_sort_store == 0) th.setData({
  989 + fir_pick_index: 0
  990 + });
  991 + getApp().globalData.pk_store = item;
  992 + } else {
  993 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  994 + }
  995 +
  996 + }
  997 + });
  998 +
  999 +
  1000 + },
  1001 + closeSpecModal: function () {
  1002 + this.setData({openSpecModal: 0});
  1003 + },
  1004 +
  1005 + buy_libao: function () {
  1006 + com.buy_libao(this)
  1007 + },
  1008 +
  1009 +
  1010 + clickShare() {
  1011 + if (!getApp().globalData.user_id) {
  1012 + getApp().goto("/packageE/pages/togoin/togoin");
  1013 + return false;
  1014 + }
  1015 + this.setData({
  1016 + share_hidden: true,
  1017 + });
  1018 + },
  1019 +
  1020 + send() {
  1021 + this.setData({
  1022 + share_hidden: false,
  1023 + });
  1024 + },
  1025 +
  1026 + cancel() {
  1027 + this.setData({
  1028 + share_hidden: false,
  1029 + });
  1030 + },
  1031 +
  1032 +
  1033 + //--定义的保存图片方法,分享团---
  1034 + saveImageToPhotosAlbum: function () {
  1035 + //--先判断会员状态--
  1036 + var user_info = getApp().globalData.userInfo;
  1037 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1038 + //getApp().my_warnning("请先登录",0,this);
  1039 + wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  1040 + return false;
  1041 + }
  1042 +
  1043 + if (this.data.share_hidden) {
  1044 + this.setData({share_hidden: false,});
  1045 + }
  1046 +
  1047 + wx.showLoading({title: '生成中...',})
  1048 + var that = this, th = that;
  1049 + //设置画板显示,才能开始绘图
  1050 + that.setData({
  1051 + canvasHidden: false
  1052 + })
  1053 +
  1054 + var app = getApp();
  1055 + var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
  1056 + var scene = th.data.lbId + "";
  1057 +
  1058 + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
  1059 + if (user_id > 0) {
  1060 + scene += "_" + user_id;
  1061 + }
  1062 + ///二微码
  1063 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  1064 + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist";
  1065 +
  1066 + // 读取文件成功则OK--
  1067 + wx.getImageInfo({
  1068 + src: path3,
  1069 + success: function (res) {
  1070 + th.get_goods_temp(function () {
  1071 + var vpath = res.path;
  1072 + var context = wx.createCanvasContext('share');
  1073 + // let share_goods_img = th.params.cover_img
  1074 + th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0);
  1075 +
  1076 + //把画板内容绘制成图片,并回调 画板图片路径
  1077 + context.draw(false, function () {
  1078 + setTimeout(function () {
  1079 + wx.canvasToTempFilePath({
  1080 + x: 0,
  1081 + y: 0,
  1082 + width: 750,
  1083 + height: 1217,
  1084 + destWidth: 1.2 * 750 * 750 / that.data.screenWidth,
  1085 + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth,
  1086 + canvasId: 'share',
  1087 + success: function (res) {
  1088 +
  1089 + that.setData({
  1090 + shareImgPath: res.tempFilePath,
  1091 + canvasHidden: true
  1092 + })
  1093 +
  1094 + if (!res.tempFilePath) {
  1095 + wx.showModal({
  1096 + title: '提示',
  1097 + content: '图片绘制中,请稍后重试',
  1098 + showCancel: false
  1099 + })
  1100 + return false;
  1101 + }
  1102 +
  1103 + that.setData({
  1104 + showPoster: true,
  1105 + });
  1106 + wx.hideLoading();
  1107 + }
  1108 + })
  1109 + }, 800)
  1110 +
  1111 + });
  1112 + })
  1113 + },
  1114 + fail: function (res) {
  1115 + console.log(res);
  1116 + wx.hideLoading();
  1117 +
  1118 + }
  1119 + });
  1120 + },
  1121 +
  1122 + //-- 小程序绘制海报 --
  1123 + drawPoster(context, unit, img, vpath, type) {
  1124 + // 1.灰色背景
  1125 + context.setFillStyle('#f2f1f6');
  1126 + context.rect(0, 0, 554 * unit, 899 * unit);
  1127 + context.fill();
  1128 +
  1129 + // 2.商城名称
  1130 + let shopName = this.data.sto_sele_name_1;
  1131 + context.setTextAlign('center');
  1132 + context.setFontSize(26 * unit);
  1133 + context.setFillStyle('black');
  1134 + context.fillText(shopName, 277 * unit, 60 * unit);
  1135 +
  1136 + // 3.推荐来源
  1137 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  1138 + context.setTextAlign('center');
  1139 + context.setFontSize(22 * unit);
  1140 + context.setFillStyle('#96959a');
  1141 + context.fillText(fromText, 277 * unit, 105 * unit);
  1142 +
  1143 + // 4.海报背景
  1144 + context.setFillStyle('white');
  1145 + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit);
  1146 +
  1147 + // 5.商品图片
  1148 + // 图片的x坐标
  1149 + let bg_x = 37 * unit
  1150 + // 图片的y坐标
  1151 + let bg_y = 157 * unit
  1152 + // 图片宽度
  1153 + let bg_w = 480 * unit
  1154 + // 图片高度
  1155 + let bg_h = 474 * unit
  1156 + // 图片圆角
  1157 + let bg_r = 4
  1158 + // 绘制海报背景图片圆角
  1159 + context.save()
  1160 + context.beginPath()
  1161 + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5)
  1162 + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2)
  1163 + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5)
  1164 + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI)
  1165 + context.clip()
  1166 + context.drawImage(img, bg_x, bg_y, bg_w, bg_h);
  1167 + context.restore();
  1168 +
  1169 + // 6.强烈推荐
  1170 + let src = '';
  1171 + context.beginPath();
  1172 + if (type == 0) { // 普通
  1173 + src = '../../../images/share/q_tj.png';
  1174 + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit);
  1175 + context.setFontSize(16 * unit)
  1176 + context.setFillStyle("white")
  1177 + context.setTextAlign('left');
  1178 + context.fillText('强烈推荐', 64 * unit, 668 * unit);
  1179 + }
  1180 +
  1181 +
  1182 + let price = this.data.giftPrice;
  1183 + let giftIntegral = this.data.giftIntegral;
  1184 + context.setFontSize(32 * unit);
  1185 + context.setFillStyle('#DE1117');
  1186 +
  1187 + var price_txt="";
  1188 + if(price || giftIntegral){
  1189 + if(price){
  1190 + price_txt='¥' + price;
  1191 + if(giftIntegral) price_txt+='+';
  1192 + }
  1193 + if(giftIntegral) price_txt+=giftIntegral+'积分';
  1194 + }else{
  1195 + price_txt="¥0";
  1196 + }
  1197 +
  1198 + context.fillText(price_txt, 54 * unit, 735 * unit);
  1199 +
  1200 +
  1201 + var wp= 62 * unit;
  1202 + var hp=765 * unit
  1203 + this.draw_pos_price(context,wp,hp,this.giftPosPrice,unit);
  1204 +
  1205 + // 8.商品标题
  1206 + context.setFontSize(20 * unit);
  1207 + context.setFillStyle('#898989');
  1208 + getApp().draw_Text(context, this.data.giftTitle, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1);
  1209 +
  1210 + // 9.小程序码
  1211 + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit);
  1212 + context.setFontSize(16 * unit);
  1213 + context.setFillStyle('#777');
  1214 + context.fillText('长按识别二维码', 378 * unit, 810 * unit);
  1215 +
  1216 + // 10.竖线
  1217 + context.beginPath();
  1218 + context.setFillStyle('#eee');
  1219 + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit);
  1220 + context.fill();
  1221 + },
  1222 +
  1223 +
  1224 + //---市场价划掉---
  1225 + draw_pos_price(context,w,h,market_price,unit){
  1226 +
  1227 + if(!this.is_retail_price) return false;
  1228 +
  1229 + context.setFillStyle("gray")
  1230 + context.setFontSize(22 * unit)
  1231 + var pri0 = "¥" + market_price.toFixed(2);
  1232 + context.fillText(pri0, w, h);
  1233 +
  1234 + var c_h=h-6;
  1235 + context.setStrokeStyle('gray');
  1236 + context.setLineWidth(1 * unit);
  1237 + context.moveTo(w - 5, c_h);
  1238 + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h);
  1239 + context.stroke();
  1240 +
  1241 + },
  1242 +
  1243 + //--获取商品图片的本地缓存,回调写法--
  1244 + get_goods_temp: function (tt) {
  1245 + var ee = this;
  1246 + if (ee.data.share_goods_img) {
  1247 + tt();
  1248 + return false;
  1249 + }
  1250 + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage;
  1251 + //获取商品是分享图信息
  1252 + wx.getImageInfo({
  1253 + src: img_url,
  1254 + success: function (res) {
  1255 + //res.path是网络图片的本地地址
  1256 + ee.data.share_goods_img = res.path;
  1257 + tt();
  1258 + },
  1259 + fail: function (res) {
  1260 + //获取默认空白图
  1261 + wx.getImageInfo({
  1262 + src: ee.data.iurl+'/miniapp/images/default_g_img.gif',
  1263 + success: function(res) {
  1264 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  1265 + tt();
  1266 + }
  1267 + })
  1268 + }
  1269 + });
  1270 + },
  1271 +
  1272 + closePoster() {
  1273 + this.setData({
  1274 + showPoster: false,
  1275 + });
  1276 + },
  1277 + // 保存图片到手机
  1278 + savePic() {
  1279 + getApp().savePic(this);
  1280 + },
  1281 + // 预览海报
  1282 + previewPoster() {
  1283 + getApp().globalData.no_clear=1;
  1284 + wx.previewImage({
  1285 + current: this.data.shareImgPath, // 当前显示图片的http链接
  1286 + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表
  1287 + });
  1288 + },
  1289 +
  1290 +
  1291 +
  1292 +});
0 1293 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "礼包详情",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm",
  6 + "qr_code": "/components/qr_code/qr_code",
  7 + "nav_b": "/components/nav_b/nav_b",
  8 + "share": "/components/share/share"
  9 + }
  10 +}
0 11 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxml 0 → 100644
  1 +<view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}}">
  2 + <view class="box_top data-v-3a5b7e36">
  3 + <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image>
  4 + </view>
  5 + <view class="box_title data-v-3a5b7e36" >
  6 +
  7 + <view class="flex ai_c fs28" style="margin-bottom: 20rpx" wx:if="{{isBuy==0 && pick_up}}">
  8 + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>{{pick_up.pickup_name}}
  9 + </view>
  10 +
  11 + <view class="top_title data-v-3a5b7e36">
  12 + <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text>
  13 +
  14 + <!-- 这个是分享按钮 -->
  15 + <!-- <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare">
  16 + <view class="iconfont icon-share fs40" ></view>
  17 + <view class="fs22 c-7b">分享</view>
  18 + </view> -->
  19 +
  20 +
  21 + </view>
  22 + <view class="top_time data-v-3a5b7e36" wx:if="{{false && !flag}}">
  23 + <block wx:if="{{isBuy==1 && giftTitle && isStart!=1}}" >
  24 + <text class="data-v-3a5b7e36">
  25 + {{"活动开始时间:"+giftStart}}
  26 + </text>
  27 + </block>
  28 +
  29 + <block wx:else>
  30 + <text class="data-v-3a5b7e36" wx:if="{{isBuy==0 && iswarelbtype}}">{{"兑换结束时间:"+giftDate}}</text>
  31 + <text class="data-v-3a5b7e36" wx:if="{{flag == 1}}">
  32 + {{"活动结束时间:"+giftDate}}
  33 + </text>
  34 + </block>
  35 + </view>
  36 + <view class="top_time data-v-3a5b7e36" wx:if="{{false && flag == 1 && iswarelbtype}}">
  37 + <text class="data-v-3a5b7e36" wx:if="{{exchangeType == 1}}">
  38 + {{"兑换时间:领取后"+exchangeDay+"天内兑换"}}
  39 + </text>
  40 + <text class="data-v-3a5b7e36" wx:elif="{{exchangeType == 2}}">
  41 + {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}}
  42 + </text>
  43 + </view>
  44 +
  45 + <view class="top_price data-v-3a5b7e36">
  46 +
  47 +
  48 + <block wx:if="{{giftPrice>0}}">
  49 + <text class="data-v-3a5b7e36">{{"¥"+giftPrice}}</text>
  50 + </block>
  51 + <block wx:if="{{giftPrice>0 && giftIntegral>0}}">
  52 + <text class="data-v-3a5b7e36">/</text>
  53 + </block>
  54 + <block wx:if="{{giftIntegral>0}}">
  55 + <text class="data-v-3a5b7e36">{{giftIntegral+"积分"}}</text>
  56 + </block>
  57 + <block wx:if="{{giftType>0}}">
  58 + <text class="data-v-3a5b7e36">{{actTitle}}</text>
  59 + </block>
  60 +
  61 +
  62 +
  63 +
  64 + </view>
  65 + <view class="top_foot data-v-3a5b7e36">
  66 + <view class="top_foot_price data-v-3a5b7e36 no_line_x">
  67 + <text class="data-v-3a5b7e36"> {{is_retail_price?'零售价:':''}}{{giftPosPrice+"元"}}</text>
  68 + </view>
  69 + <!-- <view class="top_foot_qty data-v-3a5b7e36">
  70 + <text class="data-v-3a5b7e36" wx:if="{{!flag}}">{{"已售:"+giftQty+"件"}}</text>
  71 + <text class="data-v-3a5b7e36" wx:elif="{{flag == 1 && giftQty > 0}}">{{"数量:"+giftQty+"件"}}</text>
  72 + </view> -->
  73 + </view>
  74 + </view>
  75 + <view class="box_ware data-v-3a5b7e36">
  76 + <view class="box_ware_title data-v-3a5b7e36">
  77 + <text class="data-v-3a5b7e36">礼包内容</text>
  78 + </view>
  79 + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id">
  80 + <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36">
  81 + <view class="box_ware_img data-v-3a5b7e36">
  82 + <block wx:if="{{item.lbType==1}}">
  83 + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  84 + </block>
  85 + <block wx:if="{{item.lbType==2}}">
  86 + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  87 + </block>
  88 + <block wx:if="{{item.lbType==3}}">
  89 + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  90 + </block>
  91 + <block wx:if="{{item.lbType==4}}">
  92 + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  93 + </block>
  94 + <block wx:if="{{item.lbType==5}}">
  95 + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
  96 + </block>
  97 + </view>
  98 + <view class="box_ware_item data-v-3a5b7e36">
  99 + <view class="box_ware_item_title data-v-3a5b7e36">
  100 + <text class="data-v-3a5b7e36">{{item.couponName}}</text>
  101 + </view>
  102 + <view class="box_ware_item_price data-v-3a5b7e36">
  103 + <text class="data-v-3a5b7e36"></text>
  104 + </view>
  105 + <view class="box_ware_item_qty data-v-3a5b7e36 flex">
  106 + <text class="data-v-3a5b7e36 ellipsis-1">
  107 + {{"数量:"+item.num}}
  108 + </text>
  109 + <block wx:if="{{is_receive==1 && !flag && item.lbType==1}}">
  110 + <text style="margin-left:10rpx" wx:if="{{item.useState}}">
  111 + 已核销
  112 + </text>
  113 + <text style="margin-left:10rpx" wx:else>
  114 + 未核销
  115 + </text>
  116 + </block>
  117 + </view>
  118 +
  119 + <view class="box_ware_code data-v-3a5b7e36" wx:if="{{!flag}}">
  120 + <!-- <block wx:if="{{c_state==0}}"> -->
  121 +
  122 + <block wx:if="{{is_receive==1&item.lbType==1}}">
  123 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" data-codeId="{{item.Id}}" class="data-v-3a5b7e36"></image>
  124 + </block>
  125 +
  126 + <block wx:if="{{is_receive==1&item.lbType==2}}">
  127 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/packageD/pages/user/coupons/coupons" bindtap="goto"></image>
  128 + </block>
  129 + <block wx:if="{{is_receive==1&item.lbType==3}}">
  130 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>
  131 + </block>
  132 + <block wx:if="{{is_receive==1&item.lbType>3}}">
  133 + <text class="data-v-3a5b7e36">奖励已发放</text>
  134 + </block>
  135 + </view>
  136 + </view>
  137 + </view>
  138 + </block>
  139 + </view>
  140 + <view class="foot_box data-v-3a5b7e36">
  141 + <view class="foot_box_title data-v-3a5b7e36">
  142 + <text class="data-v-3a5b7e36">活动说明</text>
  143 + </view>
  144 + <view class="foot_box_remark data-v-3a5b7e36">
  145 + <rich-text nodes="{{giftRemark}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
  146 + </view>
  147 + </view>
  148 +
  149 +
  150 + <view class="foot_empty data-v-3a5b7e36"></view>
  151 +
  152 + <block wx:if="{{flag != 1}}">
  153 + <block wx:if="{{isBuy==0 && giftTitle}}">
  154 + <block wx:if="{{isStart==1}}">
  155 + <view class="foot_button data-v-3a5b7e36">
  156 + <!-- <block wx:if="{{giftPrice>0 && giftIntegral>0}}">
  157 + <view class="foot_button_left data-v-3a5b7e36 " data-money="{{giftPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice">
  158 + <text class="data-v-3a5b7e36 ">立即购买</text>
  159 + </view>
  160 + <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
  161 + <text class="data-v-3a5b7e36">立即兑换</text>
  162 + </view>
  163 + </block> -->
  164 + <!-- <block wx:if="{{giftPrice>0 && giftIntegral<=0}}">
  165 + <view class="foot_button_buy data-v-3a5b7e36 " data-money="{{giftPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}">
  166 + <text class="data-v-3a5b7e36">立即购买</text>
  167 + </view>
  168 + </block> -->
  169 + <!-- <block wx:if="{{giftPrice<=0 && giftIntegral>0}}">
  170 + <view class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
  171 + <text class="data-v-3a5b7e36">立即兑换</text>
  172 + </view>
  173 + </block> -->
  174 + <block >
  175 + <view class="foot_button_intalge data-v-3a5b7e36 gray" wx:if="{{is_receive==1}}" data-id="{{lbId}}">
  176 + <text class="data-v-3a5b7e36">已领取</text>
  177 + </view>
  178 + <view class="foot_button_intalge data-v-3a5b7e36 " wx:else bindtap="getGift" data-id="{{lbId}}">
  179 + <text class="data-v-3a5b7e36">领取</text>
  180 + </view>
  181 + </block>
  182 + </view>
  183 + </block>
  184 + <!-- <block wx:else>
  185 + <view class="foot_button data-v-3a5b7e36">
  186 + <view class="foot_button_intalge data-v-3a5b7e36 gray ">
  187 + <text class="data-v-3a5b7e36">活动还未开始</text>
  188 + </view>
  189 + </view>
  190 + </block> -->
  191 +
  192 + </block>
  193 + <block wx:if="{{isBuy==0 && orderSn}}">
  194 + <view class="foot_button data-v-3a5b7e36">
  195 + <block wx:if="{{is_lb!=1}}">
  196 + <view class="foot_button_buy data-v-3a5b7e36 overdue">
  197 + <text class="data-v-3a5b7e36">无核销商品</text>
  198 + </view>
  199 + </block>
  200 + <block wx:else>
  201 + <view wx:if="{{c_state==-1}}" class="foot_button_buy data-v-3a5b7e36 overdue" >
  202 + <text class="data-v-3a5b7e36">兑换未开始</text>
  203 + </view>
  204 + <view wx:if="{{c_state==0}}" class="foot_button_buy data-v-3a5b7e36" bindtap="getcode">
  205 + <text class="data-v-3a5b7e36">立即使用</text>
  206 + </view>
  207 + <view wx:if="{{c_state==1}}" class="foot_button_buy data-v-3a5b7e36 overdue" bindtap="getcode">
  208 + <text class="data-v-3a5b7e36">商品已核销</text>
  209 + </view>
  210 + <view wx:if="{{c_state==2}}" class="foot_button_buy data-v-3a5b7e36 overdue">
  211 + <text class="data-v-3a5b7e36">商品兑换时间已过</text>
  212 + </view>
  213 + </block>
  214 + </view>
  215 + </block>
  216 + </block>
  217 +
  218 +</view>
  219 +<!-- 引入提示组件 -->
  220 +<warn id="warn"></warn>
  221 +<my_confirm id="my_confirm"></my_confirm>
  222 +<!-- 弹出框扫描 -->
  223 +<qr_code id="qc_com"></qr_code>
  224 +<!-- 制作一个圆球导航 -->
  225 +<nav_b id="nav_b"></nav_b>
  226 +
  227 +<include src="../public/buy_com.wxml"></include>
  228 +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas>
  229 +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
  230 +
  231 +
  232 +<view wx:if="{{showPoster}}">
  233 + <view class="mask" catchtap="closePoster"></view>
  234 + <view class="poster-container">
  235 + <view class="poster-wrapper">
  236 + <view class="poster" bindtap="previewPoster">
  237 + <!-- <view class="poster" bindtap="previewImage"> -->
  238 + <image src="{{shareImgPath}}" class="poster-img"></image>
  239 + <view class="btn-close" catchtap="closePoster">
  240 + <text class="iconfont icon-close"></text>
  241 + </view>
  242 + </view>
  243 + <view class="btn-container">
  244 + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> -->
  245 + <button class="btn-share" bindtap="savePic">保存到相册</button>
  246 + </view>
  247 + </view>
  248 + </view>
  249 +</view>
0 250 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxss 0 → 100644
  1 +@charset "UTF-8";
  2 +@import '../giftpackbuy/goodsInfo.wxss';
  3 +
  4 +.box.data-v-3a5b7e36 {
  5 + -webkit-align-content: center;
  6 + align-content: center;
  7 + background-color: #e85f93;
  8 +}
  9 +
  10 +.box_top.data-v-3a5b7e36 {
  11 + width: 100%;
  12 +}
  13 +
  14 +.box_top image.data-v-3a5b7e36 {
  15 + width: 100%;
  16 + max-height: 540rpx;
  17 +}
  18 +
  19 +.box_title.data-v-3a5b7e36 {
  20 + margin: 10rpx 20rpx 20rpx 20rpx;
  21 + padding: 35rpx;
  22 + background-color: #fff;
  23 + border-radius: 40rpx;
  24 +}
  25 +
  26 +.top_title.data-v-3a5b7e36 {
  27 + font-size: 30rpx;
  28 + margin-bottom: 10rpx;
  29 + position: relative;
  30 +}
  31 +
  32 +.top_time.data-v-3a5b7e36 {
  33 + font-size: 27rpx;
  34 + color: #b9b5b5;
  35 +}
  36 +
  37 +.top_price.data-v-3a5b7e36 {
  38 + font-size: 35rpx;
  39 + color: #d61b30;
  40 + margin-top: 30rpx;
  41 + margin-bottom: 5rpx;
  42 + position: relative;
  43 +}
  44 +
  45 +.top_foot.data-v-3a5b7e36 {
  46 + display: -webkit-box;
  47 + display: -webkit-flex;
  48 + display: flex;
  49 +}
  50 +
  51 +.top_foot_price.data-v-3a5b7e36 {
  52 + font-size: 22rpx;
  53 + color: #b9b5b5;
  54 + width: 50%;
  55 + text-decoration: line-through;
  56 +}
  57 +
  58 +.top_foot_qty.data-v-3a5b7e36 {
  59 + font-size: 22rpx;
  60 + color: #b9b5b5;
  61 + width: 50%;
  62 + -webkit-align-content: flex-end;
  63 + align-content: flex-end;
  64 + text-align: right;
  65 +}
  66 +
  67 +.box_ware.data-v-3a5b7e36 {
  68 + margin: 10rpx 20rpx 20rpx 20rpx;
  69 + padding: 35rpx;
  70 + background-color: #fff;
  71 + border-radius: 40rpx;
  72 +}
  73 +
  74 +.box_ware_title.data-v-3a5b7e36 {
  75 + font-size: 35rpx;
  76 + margin: 5rpx 0rpx 30rpx 0rpx;
  77 +}
  78 +
  79 +.box_ware_box.data-v-3a5b7e36 {
  80 + display: -webkit-box;
  81 + display: -webkit-flex;
  82 + display: flex;
  83 + margin: 10rpx 0rpx 25rpx 0rpx;
  84 +}
  85 +
  86 +/* .box_ware_img.data-v-3a5b7e36 {
  87 + width: 30%;
  88 + height: 180rpx;
  89 + border: #999999 solid 1rpx;
  90 +} */
  91 +
  92 +.box_ware_img image.data-v-3a5b7e36 {
  93 + /* width: 185rpx;
  94 + height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */
  95 + border: 2rpx solid #999;
  96 + width: 120rpx;
  97 + height: 120rpx;
  98 + background-color: #f8f8f8;
  99 +}
  100 +
  101 +.box_ware_item.data-v-3a5b7e36 {
  102 + width: 70%;
  103 + margin-left: 25rpx;
  104 + position: relative;
  105 +}
  106 +
  107 +.box_ware_item_title.data-v-3a5b7e36 {
  108 + font-size: 24rpx;
  109 + word-break: break-all;
  110 + text-overflow: ellipsis;
  111 + display: -webkit-box;
  112 + -webkit-box-orient: vertical;
  113 + -webkit-line-clamp: 2;
  114 + overflow: hidden;
  115 +}
  116 +
  117 +.box_ware_count.data-v-3a5b7e36 {
  118 + display: -webkit-box;
  119 + display: -webkit-flex;
  120 + display: flex;
  121 +}
  122 +
  123 +.box_ware_item_price.data-v-3a5b7e36 {
  124 + font-size: 25rpx;
  125 + color: #b9b5b5;
  126 + position: absolute;
  127 + bottom: 60rpx;
  128 + left: 0;
  129 +}
  130 +
  131 +.box_ware_item_qty.data-v-3a5b7e36 {
  132 + font-size: 22rpx;
  133 + position: absolute;
  134 + bottom: 15rpx;
  135 + left: 0;
  136 +}
  137 +
  138 +.box_ware_code.data-v-3a5b7e36 {
  139 + position: absolute;
  140 + right: 10rpx;
  141 + bottom: 10rpx;
  142 +}
  143 +
  144 +.box_ware_code image.data-v-3a5b7e36 {
  145 + width: 50rpx;
  146 + height: 50rpx;
  147 +}
  148 +
  149 +.box_ware_code text.data-v-3a5b7e36 {
  150 + font-size: 20rpx;
  151 +}
  152 +
  153 +.foot_box.data-v-3a5b7e36 {
  154 + margin: 10rpx 20rpx 50rpx 20rpx;
  155 + padding: 35rpx;
  156 + background-color: #fff;
  157 + border-radius: 40rpx;
  158 +}
  159 +
  160 +.foot_box_title.data-v-3a5b7e36 {
  161 + font-size: 35rpx;
  162 + margin-bottom: 30rpx;
  163 +}
  164 +
  165 +.foot_box_remark.data-v-3a5b7e36 {
  166 + font-size: 27rpx;
  167 + line-height: 40rpx;
  168 +}
  169 +
  170 +.foot_empty.data-v-3a5b7e36 {
  171 + height: 90rpx;
  172 +}
  173 +
  174 +.foot_button.data-v-3a5b7e36 {
  175 + display: -webkit-box;
  176 + display: -webkit-flex;
  177 + display: flex;
  178 + margin: 20rpx 0rpx 0rpx 0rpx;
  179 + padding: 25rpx 0rpx;
  180 + background: #fff;
  181 + text-align: center;
  182 + -webkit-box-pack: center;
  183 + -webkit-justify-content: center;
  184 + justify-content: center;
  185 + position: fixed;
  186 + bottom: 0;
  187 + left: 0;
  188 + width: 100%;
  189 +}
  190 +
  191 +.foot_button_left.data-v-3a5b7e36 {
  192 + background: #e4010c;
  193 + color: #fff;
  194 + width: 250rpx;
  195 + height: 70rpx;
  196 + font-size: 28rpx;
  197 + line-height: 70rpx;
  198 + border-radius: 40rpx;
  199 + margin-right: 20rpx;
  200 +}
  201 +
  202 +.foot_button_right.data-v-3a5b7e36 {
  203 + background: #ffbb42;
  204 + color: #fff;
  205 + width: 250rpx;
  206 + height: 70rpx;
  207 + font-size: 28rpx;
  208 + line-height: 70rpx;
  209 + border-radius: 40rpx;
  210 +}
  211 +
  212 +.foot_button_buy.data-v-3a5b7e36 {
  213 + background: #e4010c;
  214 + color: #fff;
  215 + width: 400rpx;
  216 + height: 70rpx;
  217 + font-size: 28rpx;
  218 + line-height: 70rpx;
  219 + border-radius: 40rpx;
  220 +}
  221 +
  222 +.foot_button_intalge.data-v-3a5b7e36 {
  223 + background: #ffbb42;
  224 + color: #fff;
  225 + width: 400rpx;
  226 + height: 70rpx;
  227 + font-size: 28rpx;
  228 + line-height: 70rpx;
  229 + border-radius: 40rpx;
  230 +}
  231 +
  232 +page.data-v-3a5b7e36 {
  233 + background-color: #e85f93;
  234 +}
  235 +
  236 +.foot_box_remark.data-v-3a5b7e36 ._img {
  237 + width: 100%;
  238 +}
  239 +
  240 +.foot_box_remark.data-v-3a5b7e36 .img {
  241 + line-height: 0;
  242 +}
  243 +.overdue.data-v-3a5b7e36{
  244 + background-color: rgb(153,153,153);
  245 +}
  246 +
  247 +.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; }
  248 +
  249 +.xc-share-frame {
  250 + position: absolute; right:0; top: -10rpx;
  251 +}
  252 +
... ...
packageE/pages/user/monthgiftbag/monthgiftbag.js 0 → 100644
  1 +var i = require("../../../../utils/util.js")
  2 +var e = getApp(),
  3 + a = e.globalData.setting,
  4 + os = a,
  5 + t = e.request,
  6 + d = e.globalData;
  7 +Page({
  8 + data: {
  9 + iurl: a.imghost, //图片前缀网址
  10 + getDate: "",
  11 + getStorageID: '',
  12 + getUserID: '',
  13 + wareCard: [],
  14 + // pages: 0,
  15 + // pageSize: 10,
  16 + isEmpty: false,
  17 + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
  18 + contentText: {
  19 + contentdown: '加载更多',
  20 + contentrefresh: '加载中...',
  21 + contentnomore: '已加载全部'
  22 + },
  23 + ismore: 0, //数据是否全部加载完成
  24 + is_read: 0, //是否查询过我的礼包接口
  25 + curpage: 1, //当前分页数
  26 + pageSize: 10, //页大小
  27 + total: 0, //总数量
  28 + ad_data: null,
  29 + first_leader: e.globalData.first_leader || 0, // 推荐人ID
  30 + },
  31 + onLoad: function (options) {
  32 + this.setData({
  33 + params: options,
  34 + })
  35 + },
  36 +
  37 + init() {
  38 + let options = this.data?.params;
  39 + var th = this;
  40 + this.setData({
  41 + getStorageID: a.stoid,
  42 + getUserID: d.user_id,
  43 + loadingType: 0,
  44 + getDate: i.formatTime(new Date().getTime())
  45 + });
  46 + //-- 获取分享人的ID --
  47 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  48 + if (first_leader) {
  49 + this.setData({
  50 + first_leader,
  51 + })
  52 + //-- user_id代过来免登录 --
  53 + getApp().globalData.first_leader = first_leader;
  54 + //调用接口判断是不是会员
  55 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  56 + if (res.data.code == 0) {
  57 + getApp().globalData.guide_id = res.data.data.id;
  58 + getApp().globalData.guide_pick_id= res.data.data.pickup_id
  59 + }
  60 + })
  61 + }
  62 +
  63 + getApp().request.promiseGet("/api/weshop/ad/page?pid=1208&store_id=" + os.stoid, {
  64 + data: {
  65 + enabled: 1
  66 + }
  67 + }).then(res => {
  68 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  69 + var a = res.data.data.pageData;
  70 + var tt = {
  71 + 'ad_code': os.imghost + a[0].ad_code,
  72 + 'media_link': '',
  73 + 'ad_weapplink': a[0].ad_weapplink,
  74 + 'bgcolor': a[0].bgcolor,
  75 + };
  76 + th.setData({ ad_data: tt });
  77 + }
  78 + })
  79 + this.getList();
  80 + },
  81 + onShow: function () {
  82 + getApp().check_can_share();
  83 + this.setData({
  84 + curpage:1
  85 + })
  86 + //--先判断会员状态--
  87 + getApp().is_Single_page(this, function () {
  88 + var user_info = getApp().globalData.userInfo;
  89 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  90 + getApp().goto('/packageE/pages/togoin/togoin');
  91 + return false;
  92 + }
  93 + this.setData({
  94 + wareCard:[]
  95 + })
  96 + this.init()
  97 + })
  98 +
  99 +
  100 + },
  101 + getList: function () {
  102 + var th = this;
  103 +
  104 + getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagRecord/page', {
  105 + isShowLoading: true,
  106 + data: {
  107 + store_id: th.data.getStorageID, //商家ID
  108 + user_id: th.data.getUserID, //用户ID
  109 + page: th.data.curpage,
  110 + pageSize: th.data.pageSize,
  111 + pay_state:1
  112 + },
  113 + success: function (res) {
  114 + if (res.data.code == 0) {
  115 +
  116 + var arr1 = th.data.wareCard;
  117 + var arr2 = res.data.data.pageData;
  118 + if (arr2.length>=th.data.pageSize) {
  119 + th.data.curpage++;
  120 + }
  121 + for (let j = 0; j < arr2.length; j++) {
  122 + // arr2[j].starTime1=Date.parse(new Date(arr2[j].begindate.replace(/-/g, "/")))/1000
  123 + // arr2[j].starTime1=arr2[j].begindate
  124 + // arr2[j].starTime=i.formatTime(arr2[j].begindate, "yyyy-MM-dd hh:mm:ss");
  125 + // arr2[j].endTime=i.formatTime(arr2[j].enddate, "yyyy-MM-dd hh:mm:ss");
  126 + arr2[j].giftPosPrice=arr2[j].oldPrice
  127 + arr2[j].payMoney=arr2[j].pay_money
  128 + arr2[j].payIntegral=arr2[j].pay_integral
  129 + // arr2[j].giftQty=arr2[j].buynum
  130 + arr2[j].cover_img=arr2[j].imageurl
  131 + arr2[j].giftTitle=arr2[j].act_name
  132 + arr2[j].lbId=arr2[j].cur_giftid
  133 + arr2[j].orderSn=arr2[j].order_sn
  134 + arr2[j].pay_time=i.formatTime(arr2[j].paytime, "yyyy-MM-dd hh:mm:ss");
  135 +
  136 + // arr2[j].virtualsales=arr2[j].virtualSales
  137 + // arr2[j].lbnum=arr2[j].lbNum
  138 + }
  139 +
  140 +
  141 + var arr3 = [...arr1, ...arr2];
  142 + var ismore = 0;
  143 + if (arr3.length == res.data.data.total) ismore = 1
  144 + th.setData({
  145 + wareCard: arr3,
  146 + total: res.data.data.total,
  147 + ismore: ismore,
  148 + is_read: 1,
  149 + is_get:1,
  150 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  151 + } else {
  152 + th.setData({
  153 + is_read: 1,
  154 + ismore: 1,
  155 + is_get:1,
  156 + })
  157 + }
  158 +
  159 + }
  160 +
  161 + });
  162 +
  163 + },
  164 + //销毁界面跳转
  165 + redirectTo: function (e) {
  166 + var th = this;
  167 + var url = e.currentTarget.dataset.url;
  168 + //销毁跳转
  169 + wx.redirectTo({
  170 + url: url
  171 + });
  172 + },
  173 + //不销毁界面跳转
  174 + navigateTo: function (e) {
  175 + var th = this;
  176 + var url = e.currentTarget.dataset.url;
  177 + getApp().goto(url);
  178 + },
  179 + //下拉事件
  180 + onReachBottom: function () {
  181 + var th = this;
  182 + if (th.data.total <= th.data.pageSize) return;
  183 + if (th.data.ismore) return;
  184 + th.getList();
  185 + },
  186 +
  187 + //图片失败,默认图片
  188 + bind_bnerr2: function (e) {
  189 + var _errImg = e.target.dataset.errorimg;
  190 + var _errObj = {};
  191 + _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
  192 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  193 + },
  194 +
  195 +
  196 + //--- 分享设置 --
  197 + onShareAppMessage: function (e) {
  198 + getApp().globalData.no_clear=1;
  199 + var curPage = this;
  200 + var pagePath = curPage.route; //当前页面url
  201 + if (pagePath.indexOf('/') != 0) {
  202 + pagePath = '/' + pagePath;
  203 + }
  204 + pagePath += "?first_leader=" + this.data.getUserID;
  205 + return {
  206 + title: "专享礼包",
  207 + path: pagePath,
  208 + }
  209 + },
  210 +
  211 + onShareTimeline() {
  212 + getApp().globalData.no_clear=1;
  213 + return {
  214 + title: '专享礼包',
  215 + imageUrl: this.data.ad_data.ad_code,
  216 + query: "first_leader=" + this.data.getUserID
  217 + }
  218 + },
  219 +
  220 +
  221 +});
0 222 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/monthgiftbag.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "每月礼包",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm"
  7 + }
  8 +}
0 9 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/monthgiftbag.wxml 0 → 100644
  1 +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};min-height: 100vh;">
  2 + <block wx:if="{{ad_data}}">
  3 + <view class="top_img">
  4 + <image mode="widthFix" src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  5 + </view>
  6 + </block>
  7 + <block wx:else>
  8 + <view class="top_img">
  9 + <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> -->
  10 + <image mode="widthFix" src="{{iurl+'/miniapp/images/monthgiftbagtop.png?v=2019'}}" lazy-load="true"></image>
  11 + </view>
  12 + </block>
  13 +
  14 +
  15 + <view class="top_title">
  16 + <view class="top_title_box">
  17 + <text class="top_title_blacktext" bindtap="redirectTo" data-url="/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy">礼包列表</text>
  18 + </view>
  19 + <view class="top_title_box_S"></view>
  20 + <view class="top_title_box">
  21 + <text class="top_title_redtext">我的礼包</text>
  22 + </view>
  23 + </view>
  24 + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index">
  25 + <view class="content_box">
  26 + <view class="content_box_ware" bindtap="navigateTo" data-url="/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.receive_ordersn}}&record_list_id={{item.record_list_id}}&is_receive={{item.is_receive}}">
  27 + <view class="content_box_img">
  28 + <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> -->
  29 + <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image>
  30 + <image wx:else src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  31 +
  32 + <block wx:if="{{item.actType!=0}}">
  33 + <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}">
  34 + <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image>
  35 + <!-- <block wx:if="{{item.$orig.actType==1}}"> -->
  36 + <block wx:if="{{item.actType==1}}">
  37 + <text>新人有礼</text>
  38 + </block>
  39 + <block wx:if="{{item.actType==2}}">
  40 + <text>评价有礼</text>
  41 + </block>
  42 + <block wx:if="{{item.actType==3}}">
  43 + <text>节日营销</text>
  44 + </block>
  45 + <block wx:if="{{item.actType==4}}">
  46 + <text>生日营销</text>
  47 + </block>
  48 + <block wx:if="{{item.actType==5}}">
  49 + <text>助力礼包</text>
  50 + </block>
  51 + </view>
  52 + </block>
  53 + </view>
  54 + <view class="content_box_title">
  55 + <view class="content_ware_title">
  56 + <text>{{item.giftTitle}}</text>
  57 + </view>
  58 + <view class="content_ware_type">
  59 + <block wx:if="{{item.payMoney>0}}">
  60 + <text>{{"¥"+item.payMoney}}</text>
  61 + </block>
  62 + <block wx:if="{{item.payIntegral>0}}">
  63 + <text>{{item.payIntegral+"积分"}}</text>
  64 + </block>
  65 + <block wx:if="{{item.actType==1}}">
  66 + <text>{{item.actTitle}}</text>
  67 + </block>
  68 + <block wx:if="{{item.actType==2}}">
  69 + <text>{{item.actTitle}}</text>
  70 + </block>
  71 + <block wx:if="{{item.actType==3}}">
  72 + <text>{{item.actTitle}}</text>
  73 + </block>
  74 + <block wx:if="{{item.actType==4}}">
  75 + <text>{{item.actTitle}}</text>
  76 + </block>
  77 + <block wx:if="{{item.actType==5}}">
  78 + <text>{{item.actTitle}}</text>
  79 + </block>
  80 + </view>
  81 + <view class="content_ware_price no_line_c">
  82 + <text >{{"购买时间:"+item.pay_time}}</text>
  83 + </view>
  84 +<!--
  85 + <view class="content_ware_time" wx:if="{{item.iswarelbtype==1}}">
  86 + <block wx:if="{{getDate>item.endTime}}">
  87 + <text>{{"兑换截至日期:"+item.endTime}}</text>
  88 + </block>
  89 + <block wx:if="{{getDate<item.starTime}}">
  90 + <text>{{"距兑换开始时间: "+item.starTime}}</text>
  91 + </block>
  92 + </view> -->
  93 +
  94 + </view>
  95 + </view>
  96 + <view class="content_box_button" bindtap="navigateTo" data-url="/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.receive_ordersn}}&record_list_id={{item.record_list_id}}&is_receive={{item.is_receive}}">
  97 + <button wx:if="{{item.receive_ordersn}}">立即使用</button>
  98 + <button wx:else>立即领取</button>
  99 + </view>
  100 + </view>
  101 + </block>
  102 + <block wx:if="{{is_read && wareCard.length<1 && is_get}}">
  103 + <view class="foot_empty">
  104 + <view>
  105 + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>
  106 + </view>
  107 + <view>
  108 + <text>当前暂无礼包</text>
  109 + </view>
  110 + <view class="foot_empty_button">
  111 + <text bindtap="navigateTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">去获取</text>
  112 + </view>
  113 + </view>
  114 + </block>
  115 + <block wx:if="{{ismore}}">
  116 + <!-- 加载完毕并且数据大于=页大小 -->
  117 + <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}">
  118 + <view class="Line"></view>
  119 + <view class="end fs26">到底了</view>
  120 + <view class="Line"></view>
  121 + </view>
  122 + </block>
  123 +</view>
  124 +<!-- 引入提示组件 -->
  125 +<warn id="warn"></warn>
  126 +<my_confirm id="my_confirm"></my_confirm>
0 127 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/monthgiftbag.wxss 0 → 100644
  1 +/*引用样式路径*/
  2 +@charset "UTF-8";
  3 +
  4 +/* Author XGQ
  5 + * 2019-11-12
  6 + */
  7 +
  8 +.top_img {
  9 + -webkit-align-content: center;
  10 + align-content: center;
  11 +}
  12 +
  13 +.top_img image {
  14 + width: 100%;
  15 +}
  16 +
  17 +.top_title {
  18 + display: -webkit-box;
  19 + display: -webkit-flex;
  20 + display: flex;
  21 + background-color: #fff;
  22 + height: 85rpx;
  23 + border-radius: 10rpx 10rpx 0rpx 0rpx;
  24 + margin: 0rpx 20rpx 0rpx 20rpx;
  25 + -webkit-align-content: center;
  26 + align-content: center;
  27 + margin-bottom: 10rpx;
  28 +}
  29 +
  30 +.top_title_box {
  31 + width: 49%;
  32 + -webkit-align-content: center;
  33 + align-content: center;
  34 + text-align: center;
  35 + padding: 15rpx;
  36 +}
  37 +
  38 +.top_title_box_S {
  39 + width: 1%;
  40 + -webkit-align-content: center;
  41 + align-content: center;
  42 + text-align: center;
  43 + margin: 20rpx 0rpx 20rpx 0rpx;
  44 + border-left: #000 solid 3rpx;
  45 +}
  46 +
  47 +.top_title_redtext {
  48 + font-size: 30rpx;
  49 + color: #d61b30;
  50 +}
  51 +
  52 +.top_title_blacktext {
  53 + font-size: 30rpx;
  54 + color: #000;
  55 +}
  56 +
  57 +.content_box {
  58 + background-color: #fff;
  59 + height: 375rpx;
  60 + margin: 0rpx 20rpx;
  61 + border-radius: 10rpx;
  62 + margin-bottom: 10rpx;
  63 +}
  64 +
  65 +.content_box_ware {
  66 + border-bottom: #f5f5f5 solid 2rpx;
  67 + display: -webkit-box;
  68 + display: -webkit-flex;
  69 + display: flex;
  70 +}
  71 +
  72 +.content_box_img {
  73 + margin: 20rpx 20rpx 20rpx 25rpx;
  74 + width: 35%;
  75 + display: -webkit-box;
  76 + display: -webkit-flex;
  77 + display: flex;
  78 + font-size: 8rpx;
  79 + position: relative;
  80 +}
  81 +
  82 +.content_box_img image {
  83 + width: 230rpx;
  84 + height: 230rpx;
  85 +}
  86 +
  87 +.content_box_img_title {
  88 + position: absolute;
  89 + background: #d01119;
  90 + display: -webkit-box;
  91 + display: -webkit-flex;
  92 + display: flex;
  93 + padding: 8rpx;
  94 + border-radius: 0rpx 0rpx 10rpx 0rpx;
  95 +}
  96 +
  97 +.content_box_img_ground1 {
  98 + background: #fb6451;
  99 +}
  100 +
  101 +.content_box_img_ground2 {
  102 + background: #ffb72d;
  103 +}
  104 +
  105 +.content_box_img_ground3 {
  106 + background: #9be0e5;
  107 +}
  108 +
  109 +.content_box_img_ground4 {
  110 + background: #4784ef;
  111 +}
  112 +
  113 +.content_box_img_title image {
  114 + width: 30rpx;
  115 + height: 30rpx;
  116 +}
  117 +
  118 +.content_box_img_title text {
  119 + font-size: 20rpx;
  120 + color: #fff;
  121 + line-height: 25rpx;
  122 + padding-top: 5rpx;
  123 +}
  124 +
  125 +.content_box_title {
  126 + width: 65%;
  127 + margin: 25rpx 25rpx 10rpx 0rpx;
  128 + position: relative;
  129 +}
  130 +
  131 +.content_ware_title {
  132 + font-size: 30rpx;
  133 + word-break: break-all;
  134 + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
  135 + text-overflow: ellipsis;
  136 + display: -webkit-box;
  137 + /** 对象作为伸缩盒子模型显示 **/
  138 + -webkit-box-orient: vertical;
  139 + /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  140 + -webkit-line-clamp: 2;
  141 + /** 显示的行数 **/
  142 + overflow: hidden;
  143 + /** 隐藏超出的内容 **/
  144 +}
  145 +
  146 +.content_ware_type {
  147 + font-size: 32rpx;
  148 + color: #c61a34;
  149 + margin-top: 10rpx;
  150 + position: absolute;
  151 + left: 0;
  152 + bottom: 100rpx;
  153 +}
  154 +
  155 +.content_ware_price {
  156 + font-size: 26rpx;
  157 + color: #b9b5b5;
  158 + margin-top: 2rpx;
  159 + text-decoration: line-through;
  160 + position: absolute;
  161 + left: 0;
  162 + bottom: 40rpx;
  163 +}
  164 +
  165 +.content_ware_time {
  166 + font-size: 24rpx;
  167 + color: #c61a34;
  168 + margin-top: 20rpx;
  169 + position: absolute;
  170 + left: 0;
  171 + bottom: 25rpx;
  172 +}
  173 +
  174 +.content_box_button {
  175 + text-align: right;
  176 + margin: 20rpx 25rpx 20rpx 20rpx;
  177 +}
  178 +
  179 +.content_box_button button {
  180 + display: inline-block;
  181 + width: 160rpx;
  182 + height: 50rpx;
  183 + font-size: 25rpx;
  184 + background: #d41c34;
  185 + color: #fff;
  186 + line-height: 50rpx;
  187 +}
  188 +
  189 +.foot_box {
  190 + -webkit-align-content: center;
  191 + align-content: center;
  192 + text-align: center;
  193 + margin-top: 15rpx;
  194 + margin-bottom: 50rpx;
  195 +}
  196 +
  197 +.foot_box text {
  198 + font-size: 25rpx;
  199 + color: #fff;
  200 +}
  201 +
  202 +.foot_empty {
  203 + background-color: #fff;
  204 + height: 375rpx;
  205 + margin: 10rpx 20rpx 0rpx 20rpx;
  206 + border-radius: 10rpx;
  207 + text-align: center;
  208 + padding: 150rpx 0rpx 300rpx 0rpx;
  209 + -webkit-box-pack: center;
  210 + -webkit-justify-content: center;
  211 + justify-content: center;
  212 +}
  213 +
  214 +.foot_empty image {
  215 + width: 400rpx;
  216 + height: 273rpx;
  217 +}
  218 +
  219 +.foot_empty text {
  220 + font-size: 30rpx;
  221 + color: #999;
  222 +}
  223 +
  224 +.foot_empty_button {
  225 + background: #ff6363;
  226 + margin: 60rpx 230rpx 0rpx 230rpx;
  227 + padding: 10rpx;
  228 + border-radius: 70rpx;
  229 + line-height: 40rpx;
  230 +}
  231 +
  232 +.foot_empty_button text {
  233 + font-size: 28rpx;
  234 + color: #fff;
  235 +}
  236 +
  237 +page {
  238 + /* background-color: rgb(250, 120, 88); */
  239 +}
  240 +.After_all {
  241 + height: 80rpx;
  242 + margin-bottom: 10rpx;
  243 + color: rgb(255, 255, 255);
  244 +}
  245 +
  246 +.After_all .Line {
  247 + border-top: 3rpx solid rgb(255, 255, 255);
  248 + width: 130rpx;
  249 +}
  250 +
  251 +.After_all .end {
  252 + margin: 0rpx 15rpx;
  253 +}
... ...
packageE/pages/user/monthgiftbag/payment/payment.js 0 → 100644
  1 +var e = getApp();
  2 +var regeneratorRuntime = require('../../../../../utils/runtime.js');
  3 +Page({
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + url: e.globalData.setting.imghost,
  9 + resourceUrl: e.globalData.setting.resourceUrl,
  10 + iurl: e.globalData.setting.imghost,
  11 + allmoney: 0,
  12 + order_sn: "",
  13 + },
  14 +
  15 + /**
  16 + * 生命周期函数--监听页面加载
  17 + */
  18 + onLoad: function (options) {
  19 + wx.setNavigationBarTitle({
  20 + title: '支付成功',
  21 + });
  22 + var money = parseFloat(options.money).toFixed(2), order_sn = options.order_sn;
  23 + this.setData({allmoney:money,order_sn:order_sn})
  24 + },
  25 +
  26 + goto: function () {
  27 + var url = '/pages/index/index/index';
  28 + getApp().goto(url)
  29 + },
  30 +})
0 31 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/payment/payment.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "支付成功",
  3 + "usingComponents": {}
  4 +}
0 5 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/payment/payment.wxml 0 → 100644
  1 +<view>
  2 + <!-- 支付成功提示 -->
  3 + <view class="payradio">
  4 + <!-- 提示框 -->
  5 + <view class="Success_box flex-center">
  6 + <view>
  7 + <view class="flex-center">
  8 + <image src="{{url}}miniapp/images/pay/paysuccess.png"></image>
  9 + </view>
  10 + <view class="Success_box_title fs32">订单支付成功!</view>
  11 + </view>
  12 + </view>
  13 +
  14 + <!-- 支付信息 -->
  15 + <view class="payitem_max fs28">
  16 + <!-- 订单编号 -->
  17 + <view class="payitem flex">
  18 + <view>订单编号 :</view>
  19 + <text selectable="true">{{order_sn}}</text>
  20 + </view>
  21 +
  22 + <!-- 实付金额 -->
  23 + <view class="payitem flex">
  24 + <view>实付金额 :</view>
  25 + <!-- {{filters.toFix()}} -->
  26 + <view class="pay_money">{{allmoney}}元</view>
  27 + </view>
  28 +
  29 + <!-- 支付方式 -->
  30 + <view class="payitem flex" wx:if="type==1">
  31 + <view>支付方式 :</view>
  32 + <view>微信支付</view>
  33 + </view>
  34 + </view>
  35 + </view>
  36 + <view class="flex-level">
  37 + <view class="line"></view>
  38 + </view>
  39 +
  40 + <!-- 跳转链接 -->
  41 + <view>
  42 + <!-- 链接 -->
  43 + <view class="fs32">
  44 + <view class="flex-center">
  45 + <navigator class="pay_order flex-center" url="/packageE/pages/user/monthgiftbag/monthgiftbag">
  46 + <view>每月礼包</view>
  47 + </navigator>
  48 + </view>
  49 + <view class="flex-center">
  50 + <navigator class="pay_home flex-center" bindtap="goto">
  51 + <view>回到首页</view>
  52 + </navigator>
  53 + </view>
  54 + </view>
  55 + </view>
  56 +</view>
0 57 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/payment/payment.wxss 0 → 100644
  1 +page {
  2 + border-top: 2rpx solid rgb(245, 245, 245);
  3 +}
  4 +.line {
  5 + border-top: 2rpx solid rgb(245, 245, 245);
  6 + width: 700rpx;
  7 +}
  8 +
  9 +.payradio .Success_box {
  10 + padding-top: 45rpx;
  11 + padding-bottom: 45rpx;
  12 +}
  13 +
  14 +.payradio .Success_box .Success_box_title {
  15 + margin-top: 45rpx;
  16 + color: rgb(8, 8, 8);
  17 +}
  18 +
  19 +.payradio image {
  20 + width: 140rpx;
  21 + height: 140rpx;
  22 + display: flex;
  23 +}
  24 +
  25 +.payitem_max {
  26 + padding: 0rpx 55rpx;
  27 + color: rgb(104, 104, 104);
  28 + padding-bottom: 30rpx;
  29 +}
  30 +
  31 +.payitem_max .payitem {
  32 + margin-top: 30rpx;
  33 +}
  34 +
  35 +.payitem_max .payitem .pay_nam {
  36 + width: 200rpx;
  37 +}
  38 +
  39 +.payitem_max .payitem view {
  40 + margin-right: 50rpx;
  41 +}
  42 +.pay_money{
  43 + color: rgb(219, 27, 52);
  44 +}
  45 +
  46 +.pay_User {
  47 + padding-left: 55rpx;
  48 + color: rgb(104, 104, 104);
  49 +}
  50 +
  51 +.pay_User .payitem {
  52 + margin-top: 30rpx;
  53 +}
  54 +
  55 +.pay_User .payitem .pay_Receiving {
  56 + width: 128rpx;
  57 + margin-right: 50rpx;
  58 +}
  59 +
  60 +.pay_User .payitem .pay_name {
  61 + margin-right: 38rpx;
  62 + max-width: 250rpx;
  63 +}
  64 +
  65 +.pay_order {
  66 + margin-top: 115rpx;
  67 + color: rgb(104, 104, 104);
  68 + width: 560rpx;
  69 + height: 62rpx;
  70 + border-radius: 30rpx;
  71 + border: 3rpx solid rgb(209, 209, 209);
  72 +}
  73 +
  74 +.pay_home {
  75 + margin-top: 35rpx;
  76 + color: rgb(255, 255, 255);
  77 + width: 566rpx;
  78 + height: 68rpx;
  79 + border-radius: 30rpx;
  80 + background-color: rgb(219, 27, 52);
  81 +}
  82 +.address{
  83 + width: 470rpx;
  84 +}
0 85 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/public/buy_com.js 0 → 100644
  1 +module.exports = {
  2 + //开启定位
  3 + wait_for_store_config: function (th) {
  4 + var t_time = setInterval(function () {
  5 + if (th.data.bconfig == null) false;
  6 + var e = th.data.bconfig;
  7 + if (e && e.is_sort_storage) {
  8 + wx.getLocation({
  9 + type: 'gcj02',
  10 + success: function (res) {
  11 + th.data.lat = res.latitude;
  12 + th.data.lon = res.longitude;
  13 + th.data.is_get_local_ok = 1;
  14 + },
  15 + fail: function (res) {
  16 + if (res.errCode == 2) {
  17 + th.setData({
  18 + is_gps: 0
  19 + });
  20 + if (th.data.is_gps == 0) {
  21 + getApp().confirmBox("请开启GPS定位", null, 10000, !1);
  22 + }
  23 +
  24 + } else {
  25 + th.setData({
  26 + is_gps: "3"
  27 + });
  28 + }
  29 +
  30 + th.data.is_get_local_ok = 1;
  31 + }
  32 + })
  33 + } else {
  34 + th.data.is_get_local_ok = 1;
  35 + }
  36 + clearInterval(t_time);
  37 + }, 500)
  38 + },
  39 + set_user_mo_store(th,os,func){
  40 + var that=th;
  41 + //获取用户的默认门店
  42 + getApp().get_user_store(function (e) {
  43 + if (!e) {
  44 + th.data.fir_def_store = {}; //赋值空对象
  45 + return false;
  46 + }
  47 +
  48 + if(getApp().globalData.is_dj_pk) th.setData({has_def:1})
  49 +
  50 + var ee = JSON.parse(JSON.stringify(e));
  51 + //--定时器推迟一下--
  52 + setTimeout(function () {
  53 + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
  54 + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
  55 + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
  56 + ee.is_no_dis = 1;
  57 + }
  58 +
  59 + var appd = getApp().globalData;
  60 + var w_time = setInterval(function () {
  61 + if (that.data.is_get_local_ok == 0) return false;
  62 + clearInterval(w_time);
  63 + var distance = null;
  64 + var e = JSON.parse(JSON.stringify(ee));
  65 +
  66 + //如果有开启近距离的话,同时距离优不一样了
  67 + if (that.data.lat != null) {
  68 + //如果经纬度有变化的话
  69 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  70 + that.set_def_storage(e);
  71 + if(func) func();
  72 + } else {
  73 + //要用接口是获取距离,js的计算不准
  74 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  75 + data: {
  76 + store_id: os.stoid,
  77 + pickup_id: e.pickup_id,
  78 + lat: th.data.lat,
  79 + lon: th.data.lon,
  80 + isstop: 0,
  81 + is_pos: 1
  82 + },
  83 + }).then(res => {
  84 + if (res.data.code == 0) {
  85 + e = res.data.data.pageData[0];
  86 + if (e) {
  87 + e.is_no_dis = ee.is_no_dis;
  88 + appd.pk_store = e;
  89 + that.set_def_storage(e);
  90 + }
  91 +
  92 + }
  93 + if(func) func();
  94 + })
  95 + }
  96 + //e.distance = distance;
  97 + appd.lat = that.data.lat;
  98 + appd.lon = that.data.lon;
  99 +
  100 + } else {
  101 + if (e) {
  102 + e.distance = null;
  103 + that.set_def_storage(e);
  104 + }
  105 + if(func) func();
  106 + }
  107 + }, 500)
  108 + }, 700)
  109 + })
  110 +
  111 + },
  112 +
  113 + //---------拿出门店分类和门店------------
  114 + get_sto(th,os) {
  115 + var that = th;
  116 + var self=this;
  117 + var timer_get = setInterval(function () {
  118 + if (th.data.is_get_local_ok == 0) return false;
  119 + var dd = null;
  120 +
  121 + dd = {
  122 + store_id: os.stoid,
  123 + isstop: 0,
  124 + is_pos: 1,
  125 + pageSize: 2000,
  126 + }
  127 +
  128 + //如果有距离的话
  129 + if (th.data.lat != null) {
  130 + dd.lat = th.data.lat;
  131 + dd.lon = th.data.lon;
  132 + }
  133 +
  134 + if(th.data.sele_g && th.data.sele_g.pickup_list){
  135 + dd.ids=th.data.sele_g.pickup_list
  136 + }
  137 +
  138 + clearInterval(timer_get);
  139 +
  140 + //如果会员是有默认的门店话
  141 + if (!th.data.def_pick_store && th.data.fir_def_store) {
  142 + th.setData({def_pick_store: th.data.fir_def_store});
  143 + }
  144 + wx.showLoading({
  145 + title: '加载中.'
  146 + });
  147 + //----------获取门店----------------
  148 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  149 + data: dd,
  150 + }).then(res => {
  151 + var e = res;
  152 +
  153 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
  154 +
  155 + var his_cate_num = 0;
  156 + for (let i in e.data.data.pageData) {
  157 + let item = e.data.data.pageData[i];
  158 + if (item.category_id > 0) {
  159 + his_cate_num = 1;
  160 + break;
  161 + }
  162 + }
  163 + e.his_cate_num = his_cate_num;
  164 +
  165 + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
  166 + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  167 + th.setData({
  168 + def_pick_store: e.data.data.pageData[0],
  169 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  170 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  171 + sto_sele_distr: e.data.data.pageData[0].distr_type
  172 + });
  173 + th.data.fir_def_store = e.data.data.pageData[0];
  174 + }
  175 +
  176 + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 --
  177 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  178 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  179 + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
  180 + e.data.data.pageData.splice(k, 1); //删除
  181 + break;
  182 + }
  183 + }
  184 + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
  185 + }
  186 +
  187 + th.setData({all_pick_list: e.data.data.pageData});
  188 +
  189 + setTimeout(function () {
  190 + self.deal_pickup(e,th,os); //--普通门店排版--
  191 + }, 800)
  192 +
  193 + }
  194 + })
  195 + }, 200)
  196 +
  197 + },
  198 +
  199 + //-- 统一购买 --
  200 + buy_libao:function (th) {
  201 + let then1=this
  202 + if(th.data.sele_g.is_pickup){
  203 + if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id) ){
  204 + getApp().my_warnning("请先选择门店", 1, th);
  205 + return false;
  206 + }
  207 +
  208 + if(th.data.def_pick_store.is_no_dis){
  209 + getApp().my_warnning("门店不匹配,请重新选择", 1, th);
  210 + return false;
  211 + }
  212 + }
  213 +
  214 + th.setData({submit:1})
  215 + var id=th.data.sele_g.id;
  216 + var that=th;
  217 + var json = {
  218 + "actId": '', //活动Id
  219 + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  220 + "buyType":""+that.data.buyType, //1=积分兑换 2=余额购买
  221 + "giftBagId": id, //每月礼包主表id
  222 + "storeId": that.data.getStorageID, //商家Id
  223 + "userId": that.data.getUserID, //用户ID
  224 + "buyFrom": 2,
  225 + };
  226 +
  227 + if(that.data.first_leader){
  228 + json.first_leader=that.data.first_leader
  229 + }
  230 + if(that.data.guide_id){
  231 + json.guide_id=that.data.guide_id
  232 + }
  233 +
  234 + if(th.data.sele_g.is_pickup && that.data.def_pick_store){
  235 + json.pickup_id=that.data.def_pick_store.pickup_id;
  236 + }
  237 +
  238 + //-- 分享导购要记录 --
  239 + if (getApp().globalData.guide_id) {
  240 + json.guide_id = getApp().globalData.guide_id;
  241 + }
  242 +
  243 + // var url ="/api/weshop/marketing/buy/receive/gift/record/insert";
  244 + var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder";
  245 + getApp().request.json_post(url, json,
  246 + function (res) {
  247 + if (res.data.code == 0 && res.data.data) {
  248 + switch(that.data.buyType){
  249 + case 1://立即兑换
  250 + th.setData({submit:0})
  251 + getApp().my_warnning("兑换成功!", 1, th);
  252 + th.closeSpecModal();
  253 + break;
  254 + case 2://立即购买
  255 + var order_sn = res.data.data.orderSn;
  256 + res = res.data.data.result;
  257 + if (!res) return false;
  258 + var money=that.data.payMoney;
  259 + var url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + order_sn;
  260 + getApp().globalData.no_clear=1;
  261 + wx.requestPayment({
  262 + timeStamp: String(res.timeStamp),
  263 + nonceStr: res.nonceStr,
  264 + package: res.packageValue,
  265 + signType: res.signType,
  266 + paySign: res.paySign,
  267 + success: function (res) {
  268 + th.setData({submit:0})
  269 + getApp().goto(url);
  270 + },
  271 + fail: function (res) {
  272 + th.setData({submit:0})
  273 + getApp().my_warnning("取消支付", 0, th);
  274 + then1.reduce(order_sn,that.data.getStorageID)
  275 + }
  276 + });
  277 + break;
  278 + case 3://立即领取
  279 + th.setData({submit:0})
  280 + getApp().my_warnning("领取成功!", 1, th);
  281 + th.closeSpecModal();
  282 + break;
  283 + }
  284 +
  285 + } else {
  286 + th.setData({submit:0})
  287 + getApp().my_warnning(res.data.msg, 0, th);
  288 + }
  289 + },
  290 + function (res) {
  291 + th.setData({submit:0})
  292 + }
  293 + )
  294 +
  295 + },
  296 +
  297 +
  298 + //每月礼包减少购买数量
  299 + reduce(order_sn,stoid){
  300 + wx.showLoading({
  301 + title: '加载中.'
  302 + });
  303 + getApp().request.put("/api/weshop/marketing/marketingMonthgiftbagRecord/updateSubBuyNum", {
  304 + data: {
  305 + store_id: stoid,
  306 + order_sn
  307 + },
  308 + success: function (ee) {
  309 + wx.hideLoading()
  310 + },
  311 +
  312 + });
  313 + },
  314 +
  315 + //------------处理门店---------------
  316 + deal_pickup(e,th,os) {
  317 +
  318 + if (!th.data.sele_g) return false
  319 + wx.hideLoading();
  320 +
  321 + //单总量超出10个的时候,同时门店有分类
  322 + if (e.data.data.total > 10 && e.his_cate_num) {
  323 + getApp().request.get("/api/weshop/storagecategory/page", {
  324 + data: {
  325 + store_id: os.stoid,
  326 + pageSize: 1000,
  327 + orderField: "sort",
  328 + orderType: 'asc',
  329 + },
  330 + success: function (ee) {
  331 + if (ee.data.code == 0) {
  332 + var check_all_cate = 0;
  333 + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) {
  334 + for (let i in ee.data.data.pageData) {
  335 + let item = ee.data.data.pageData[i];
  336 + if (item.is_show == 1) {
  337 + check_all_cate = 1;
  338 + break
  339 + }
  340 + }
  341 + }
  342 + if (check_all_cate) {
  343 + var sto_cate = ee.data.data.pageData;
  344 + var sto_arr = e.data.data.pageData;
  345 + var newarr = new Array();
  346 + var qita = new Array();
  347 +
  348 +
  349 + var is_del_pk = 0;
  350 + //----要进行门店分组--------
  351 + for (var i = 0; i < sto_arr.length; i++) {
  352 + //找一下这个门店有没有在分类数组内
  353 + var find2 = 0, find2name = "", sort = 0;
  354 + is_del_pk = 0;
  355 + for (var m = 0; m < sto_cate.length; m++) {
  356 + if (sto_arr[i].category_id == sto_cate[m].cat_id) {
  357 + if (sto_cate[m].is_show != 1) {
  358 + is_del_pk = 1;
  359 + sto_arr.splice(i, 1);
  360 + i--;
  361 + } else {
  362 + find2 = sto_cate[m].cat_id;
  363 + find2name = sto_cate[m].cat_name;
  364 + sort = sto_cate[m].sort;
  365 + is_del_pk = 0;
  366 + }
  367 + break;
  368 + }
  369 + }
  370 + if (is_del_pk) continue;
  371 +
  372 + if (newarr.length > 0) {
  373 + var find = 0;
  374 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  375 + if (find2 != 0) {
  376 + for (var ii = 0; ii < newarr.length; ii++) {
  377 + if (sto_arr[i].category_id == newarr[ii].cat_id) {
  378 + newarr[ii].s_arr.push(sto_arr[i]);
  379 + find = 1;
  380 + break;
  381 + }
  382 + }
  383 + if (find == 0) {
  384 + var arr0 = new Array();
  385 + arr0.push(sto_arr[i]);
  386 + var item = {
  387 + cat_id: find2,
  388 + name: find2name,
  389 + sort: sort,
  390 + s_arr: arr0
  391 + };
  392 + newarr.push(item);
  393 + }
  394 + } else {
  395 + qita.push(sto_arr[i]);
  396 + }
  397 + } else {
  398 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  399 + if (find2 != 0) {
  400 + var arr0 = new Array();
  401 + arr0.push(sto_arr[i]);
  402 + var item = {
  403 + cat_id: find2,
  404 + name: find2name,
  405 + sort: sort,
  406 + s_arr: arr0
  407 + };
  408 + newarr.push(item);
  409 + } else {
  410 + qita.push(sto_arr[i]);
  411 + }
  412 + }
  413 + }
  414 +
  415 + var def_arr = new Array();
  416 + //-- 开始就看10个门店 --
  417 + for (var k = 0; k < 10; k++) {
  418 + if (k == sto_arr.length) break;
  419 + def_arr.push(sto_arr[k]);
  420 + }
  421 +
  422 + th.setData({
  423 + def_pickpu_list: def_arr,
  424 + pickpu_list: ee.data.data.pageData
  425 + });
  426 +
  427 +
  428 + //门店分类要排序下
  429 + function compare(property) {
  430 + return function (a, b) {
  431 + var value1 = a[property];
  432 + var value2 = b[property];
  433 + return value1 - value2;
  434 + }
  435 + }
  436 +
  437 + if (newarr.length > 0)
  438 + newarr.sort(compare("sort"));
  439 +
  440 +
  441 + //----安排其他的分类-----
  442 + if (qita.length > 0) {
  443 + var item = {
  444 + cat_id: -1,
  445 + name: "其他",
  446 + s_arr: qita
  447 + };
  448 + newarr.push(item);
  449 + }
  450 +
  451 + var sd = {
  452 + all_sto: newarr,
  453 + is_show_sto_cat: 1
  454 + }
  455 + if (!sto_arr || sto_arr.length <= 10) {
  456 + sd.is_show_sto_cat = -1;
  457 + sd.only_pk = sto_arr;
  458 + }
  459 + th.setData(sd);
  460 +
  461 + } else {
  462 + th.setData({
  463 + is_show_sto_cat: -1,
  464 + only_pk: e.data.data.pageData
  465 + });
  466 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  467 + if (!th.data.def_pick_store) {
  468 + th.setData({
  469 + def_pick_store: e.data.data.pageData[0],
  470 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  471 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  472 + sto_sele_distr: e.data.data.pageData[0].distr_type
  473 + })
  474 + }
  475 + }
  476 + } else {
  477 + th.setData({
  478 + is_show_sto_cat: -1,
  479 + only_pk: e.data.data.pageData
  480 + });
  481 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  482 + if (!th.data.def_pick_store) {
  483 + th.setData({
  484 + def_pick_store: e.data.data.pageData[0],
  485 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  486 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  487 + sto_sele_distr: e.data.data.pageData[0].distr_type
  488 + })
  489 + }
  490 +
  491 + }
  492 + }
  493 + });
  494 + } else {
  495 + th.setData({
  496 + is_show_sto_cat: 0,
  497 + only_pk: e.data.data.pageData
  498 + });
  499 + //-----如果没有默认门店,要取第一个门店作为默认店------
  500 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  501 + th.setData({
  502 + def_pick_store: e.data.data.pageData[0],
  503 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  504 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  505 + sto_sele_distr: e.data.data.pageData[0].distr_type
  506 + })
  507 + }
  508 + }
  509 + },
  510 +
  511 + check_def_pk:function (th) {
  512 + th.data.def_pick_store.is_no_dis=0;
  513 + var def_pick_store=th.data.def_pick_store
  514 + var sele_g=th.data.sele_g;
  515 + var arr=sele_g.pickup_list.split(',');
  516 +
  517 + var idx=arr.findIndex(function (e) {
  518 + return e==def_pick_store.pickup_id;
  519 + })
  520 +
  521 + if(idx==-1){
  522 + def_pick_store.is_no_dis=1;
  523 + }
  524 + th.setData({def_pick_store})
  525 +
  526 + }
  527 +
  528 +
  529 +
  530 +
  531 +}
0 532 \ No newline at end of file
... ...
packageE/pages/user/monthgiftbag/public/buy_com.wxml 0 → 100644
  1 +<!-- 选择门店的弹框,1.1版最新的 -->
  2 +<block wx:if="{{store}}">
  3 + <view class="mongolia-layer" bindtap="close_popup"></view>
  4 + <view class="popup-frame">
  5 + <block wx:if="{{sort_store==0}}">
  6 + <!-- 头部 标题 -->
  7 + <view class="popup-top flex-space-between">
  8 + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text>
  9 + <view>
  10 + <view>
  11 + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
  12 + </view>
  13 + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}">
  14 + <text class="fs26 red-co" >{{choice_sort_store==0?'更多门店':'返回'}}</text> <view class="bg_rights" ></view>
  15 + </view>
  16 + </view>
  17 + </view>
  18 + <!-- 门店列表,最外层的门店列表,一开始 -->
  19 + <view class="store-list">
  20 + <!-- 如果还没有点击更多门店的时候 -->
  21 + <block wx:if="{{choice_sort_store==0}}">
  22 + <!-- 需要for循环 -->
  23 + <block wx:if="{{is_show_sto_cat==1}}">
  24 + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  25 + <view class="store flex-vertical">
  26 + <!-- 需要点击事件 -->
  27 + <block wx:if="{{index==fir_pick_index}}">
  28 + <view class="circle white xc-hook fs20 red-b">Г</view>
  29 + </block>
  30 + <block wx:else>
  31 + <view class="circle xc-hooks"></view>
  32 + </block>
  33 + <view class="address-frame xc-ash">
  34 + <view class="flex-vertical-between butttem5">
  35 + <view class="flex xc-ash">
  36 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
  37 + </view>
  38 + <view>
  39 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  40 + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}}
  41 + </view>
  42 + </view>
  43 + </view>
  44 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  45 + </view>
  46 + </view>
  47 + </view>
  48 + </block>
  49 + <block wx:else>
  50 + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  51 + <view class="store flex-vertical">
  52 + <!-- 需要点击事件 -->
  53 + <block wx:if="{{index==fir_pick_index}}">
  54 + <view class="circle white xc-hook fs20 red-b">Г</view>
  55 + </block>
  56 + <block wx:else>
  57 + <view class="circle xc-hooks"></view>
  58 + </block>
  59 + <view class="address-frame xc-ash">
  60 + <view class="flex-vertical-between ">
  61 + <view class="flex xc-ash">
  62 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
  63 + </view>
  64 + <view>
  65 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  66 + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}}
  67 + </view>
  68 + </view>
  69 + </view>
  70 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  71 + </view>
  72 + </view>
  73 + </view>
  74 + </block>
  75 + </block>
  76 + <block wx:else>
  77 + <!-- 如果是点击选择门店分类后显示分类下的门店 -->
  78 + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store">
  79 + <view class="store flex-vertical">
  80 + <!-- 需要点击事件 -->
  81 + <block wx:if="{{index==sec_pick_index}}">
  82 + <view class="circle white xc-hook fs20 red-b">Г</view>
  83 + </block>
  84 + <block wx:else>
  85 + <view class="circle xc-hooks"></view>
  86 + </block>
  87 + <view class="address-frame xc-ash">
  88 + <view class="flex-vertical-between ">
  89 + <view class="flex xc-ash">
  90 + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view>
  91 + </view>
  92 + <view>
  93 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  94 + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}}
  95 + </view>
  96 + </view>
  97 + </view>
  98 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  99 + </view>
  100 + </view>
  101 + </view>
  102 + </block>
  103 + </view>
  104 + <!-- 门店列表底部 -->
  105 + <view class="store-bottom-frame">
  106 + <view class="store-bottom flex-vertical-between">
  107 + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">
  108 + 确定
  109 + </view>
  110 + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">
  111 + 设为默认
  112 + </view>
  113 + </view>
  114 + </view>
  115 + </block>
  116 + <block wx:else>
  117 + <view class="popup-top flex-space-between">
  118 + <text class="fs32 nearby_store">门店分类选择</text>
  119 + <view>
  120 + <view>
  121 + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
  122 + </view>
  123 + <view class="felx choose_mores" bindtap="returns">
  124 + <text class="fs26 red-co">返回</text>
  125 + </view>
  126 + </view>
  127 + </view>
  128 + <view class="sort_store_list">
  129 + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}">
  130 + <view class="sort-store flex-vertical-between">
  131 + <view class="fs30" di>{{item.name}}</view>
  132 + <view class="black_rights-frame">
  133 + <view class="black_rights"></view>
  134 + </view>
  135 + </view>
  136 + </view>
  137 + </view>
  138 + </block>
  139 + </view>
  140 +</block>
  141 +
  142 + <!-- --弹起来,选择规格数量,普通商品购买和秒杀---- -->
  143 +<view hidden="{{!openSpecModal}}">
  144 + <view bindtap="closeSpecModal" class="cover-layer"></view>
  145 + <view class="spec-model">
  146 + <view class="pding">
  147 + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon>
  148 + <view class="spec-goods">
  149 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl+(sele_g.cover_img?sele_g.cover_img:sele_g.lbUrl)}}" binderror="pop_err_img" data-errorimg=""></image>
  150 + <view class="spec-goods-info">
  151 + <view class="spec-goods-name ellipsis-2">{{sele_g.giftTitle}}</view>
  152 + <view class="flex ai_end xc-val-money">
  153 + <view class="spec-goods-price">
  154 + <block wx:if="{{sele_g.payMoney>0}}">
  155 + <text>{{"¥"+sele_g.payMoney}}</text>
  156 + </block>
  157 + <block wx:if="{{sele_g.payMoney>0&&sele_g.payIntegral>0}}">
  158 + <text>/</text>
  159 + </block>
  160 + <block wx:if="{{sele_g.payIntegral>0}}">
  161 + <view class="flex">
  162 + <text class="ellipsis-1">{{sele_g.payIntegral}}</text>
  163 + <view>积分</view>
  164 + </view>
  165 + </block>
  166 +
  167 + </view>
  168 + </view>
  169 +
  170 +
  171 + <view class="flex">
  172 + <view class="spec-goods-stock" >已售:{{sele_g.giftQty+sele_g.virtualSales}}</view>
  173 + <view class="spec-goods-stock">可售:{{sele_g.lbnum-sele_g.giftQty}}</view>
  174 + </view>
  175 +
  176 + </view>
  177 + <!-- 选择门店模块 -->
  178 + <view class="flex-space-between address ai_end xc-width ">
  179 + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
  180 + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text>
  181 + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}">
  182 + 距离:{{def_pick_store.distance>1000?filter.toFix(def_pick_store.distance/1000,2)+"km":filter.toFix(def_pick_store.distance,0)+"m"}}
  183 + </view>
  184 + </view>
  185 + <!-- 没有门店的时候 -->
  186 + <view class="flex" bindtap="choice_store" wx:else>
  187 + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
  188 + <view class="fs30" style="color:black;">选择门店</view>
  189 + </view>
  190 + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view>
  191 + </view>
  192 + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
  193 + <block wx:else>
  194 + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
  195 + <block wx:else>
  196 + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
  197 + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">
  198 + (库存不足)
  199 + </view>
  200 + </block>
  201 + </block>
  202 + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}">
  203 + 地址:{{def_pick_store.fulladdress}}
  204 + </view>
  205 + </view>
  206 + <!-- 商品的属性项目 -->
  207 +
  208 +
  209 + </view>
  210 + <view class="spec-cart-btns">
  211 + <!-- 根本就找不到门店 -->
  212 + <block wx:if="{{!only_pk && !def_pickpu_list}}">
  213 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  214 + 未找到门店
  215 + </view>
  216 + </block>
  217 + <block wx:else>
  218 + <block wx:if="{{only_pk && !only_pk.length}}">
  219 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  220 + 未找到门店
  221 + </view>
  222 + </block>
  223 + <block wx:else>
  224 + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">
  225 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  226 + 库存不足
  227 + </view>
  228 + </block>
  229 + <block wx:else>
  230 + <block wx:if="{{!def_pick_store}}">
  231 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  232 + 请先选择门店
  233 + </view>
  234 + </block>
  235 + <block wx:else>
  236 + <block wx:if="{{sele_g.store_count<=0}}">
  237 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  238 + 库存不足
  239 + </view>
  240 + </block>
  241 + <block wx:else>
  242 + <button bindtap="buy_libao" disabled="{{submit}}" style="display: block" class="spec-cart-btn {{buyType==2?'yellow':'red-b'}} fs32" data-action="add">
  243 + <text wx:if="{{buyType==1}}">立即兑换</text>
  244 + <text wx:if="{{buyType==2}}">立即购买</text>
  245 + <text wx:if="{{buyType==3}}">立即领取</text>
  246 + </button>
  247 + </block>
  248 +
  249 + </block>
  250 + </block>
  251 + </block>
  252 + </block>
  253 +
  254 + </view>
  255 + <view class="clear"></view>
  256 +
  257 + </view>
  258 +</view>
0 259 \ No newline at end of file
... ...
pages/cart/cart/cart.js
... ... @@ -1755,7 +1755,7 @@ Page({
1755 1755  
1756 1756  
1757 1757 //---------------全选,全选的时候要判断是否门店的匹配方式一致--------------
1758   - checkAll: function () {
  1758 + checkAll: async function () {
1759 1759 var e = this,
1760 1760 th = this,
1761 1761 dda = e.data.requestData,
... ... @@ -1780,7 +1780,7 @@ Page({
1780 1780 var offline_price = 0;
1781 1781 var offline_num = 0;
1782 1782 th.data.in_zhact_gdmap = {};
1783   -
  1783 + var pro_off=false
1784 1784  
1785 1785 if (dda && dda.length > 0) {
1786 1786 for (var i = 0; i < dda.length; i++) {
... ... @@ -1823,24 +1823,51 @@ Page({
1823 1823 //加入阶梯促销计算
1824 1824 if (obj.prom_type == 10) ladder_calc.add_ladder_prom(dda, i, obj);
1825 1825  
1826   - e.setData({
1827   -
1828   - [txt]: !e.data.checkAllToggle,
1829   - })
1830   -
1831   - if (!e.data.checkAllToggle) {
1832   - //组合购的金额要另外算
1833   - if (item[j].prom_type != 7 && item[j].prom_type != 10)
1834   - tfeel += item[j].goods_num * item[j].goods_price;
1835   - t_num += item[j].goods_num;
  1826 + //多门店,多优惠次数控制
  1827 + let pro_off1=false
  1828 + if (!e.data.checkAllToggle) {
  1829 + //判断多店优惠促销次数控制
  1830 + if (th.data.requestData.length>1) {
  1831 + if(obj.prom_type==3){
  1832 +
  1833 + pro_off1=await th.multiple_stores_pro(i,j)
  1834 + }
  1835 + }
1836 1836 }
  1837 +
  1838 + if (pro_off1) {
  1839 + pro_off=true
  1840 + let txt1 = "requestData[" + i + "].pro_off";
  1841 + e.setData({
  1842 + [txt1]: true,
  1843 + [txt]: 0,
  1844 + });
1837 1845  
1838   - //-- 如果这个商品是线下取价的时候 --
1839   - if (item[j].is_offline && item[j].prom_type != 7) {
1840   - offline_price += (item[j].goods_price - item[j].offline_price) * item[j].goods_num;
1841   - offline_num += item[j].goods_num;
  1846 + wx.showToast({
  1847 + title: '已超出优惠促销次数',
  1848 + icon: 'none',
  1849 + });
  1850 +
  1851 + }else{
  1852 + e.setData({
  1853 + [txt]: !e.data.checkAllToggle,
  1854 + })
  1855 +
  1856 + if (!e.data.checkAllToggle) {
  1857 + //组合购的金额要另外算
  1858 + if (item[j].prom_type != 7 && item[j].prom_type != 10)
  1859 + tfeel += item[j].goods_num * item[j].goods_price;
  1860 + t_num += item[j].goods_num;
  1861 + }
  1862 +
  1863 + //-- 如果这个商品是线下取价的时候 --
  1864 + if (item[j].is_offline && item[j].prom_type != 7) {
  1865 + offline_price += (item[j].goods_price - item[j].offline_price) * item[j].goods_num;
  1866 + offline_num += item[j].goods_num;
  1867 + }
1842 1868 }
1843 1869  
  1870 +
1844 1871 }
1845 1872 }
1846 1873  
... ... @@ -1852,15 +1879,23 @@ Page({
1852 1879 });
1853 1880 return false;
1854 1881 } else {
1855   -
  1882 +
1856 1883 for (var i = 0; i < dda.length; i++) {
1857 1884  
1858   - if (!e.data.checkAllToggle) {
1859   - var txt = "requestData[" + i + "].selected";
1860   - e.setData({
1861   - [txt]: 1,
1862   - });
1863   - }
  1885 + // if (!e.data.checkAllToggle) {
  1886 + //多门店优惠促销次数控制
  1887 + if(dda[i].pro_off){
  1888 + var txt = "requestData[" + i + "].selected";
  1889 + e.setData({
  1890 + [txt]: 0,
  1891 + });
  1892 + }else{
  1893 + var txt = "requestData[" + i + "].selected";
  1894 + e.setData({
  1895 + [txt]: 1,
  1896 + });
  1897 + }
  1898 + // }
1864 1899  
1865 1900 //总的价格,把组合商品的价格拿出来
1866 1901 var zh_calc_res = zh_calc.calculate_zh(dda, i, this);
... ... @@ -1893,9 +1928,18 @@ Page({
1893 1928 }
1894 1929 }
1895 1930 }
1896   -
  1931 + //多门店优惠次数控制
  1932 + if (pro_off) {
  1933 + e.setData({
  1934 + checkAllToggle: false,
  1935 + });
  1936 + }else{
  1937 + e.setData({
  1938 + checkAllToggle: !e.data.checkAllToggle,
  1939 + });
  1940 + }
1897 1941 e.setData({
1898   - checkAllToggle: !e.data.checkAllToggle,
  1942 + // checkAllToggle: !e.data.checkAllToggle,
1899 1943 total_fee: tfeel.toFixed(2),
1900 1944 total_num: t_num,
1901 1945 });
... ... @@ -1992,7 +2036,10 @@ Page({
1992 2036 return false;
1993 2037 }
1994 2038  
  2039 + let pro_off=false
  2040 +
1995 2041 for (var i = 0; i < item.length; i++) {
  2042 + let pro_off1=false
1996 2043 var txt = "requestData[" + pitems + "].goods[" + i + "].selected";
1997 2044  
1998 2045 var gd_info = item[i];
... ... @@ -2036,16 +2083,37 @@ Page({
2036 2083  
2037 2084 }
2038 2085  
2039   -
2040   -
  2086 + //判断多店优惠促销次数控制
  2087 + if (th.data.requestData.length>1) {
  2088 + if(gd_info.prom_type==3){
  2089 + pro_off1=await th.multiple_stores_pro(pitems,i)
  2090 + }
  2091 + }
  2092 + if (pro_off1) {
  2093 + pro_off=true
  2094 + e.setData({
  2095 + [txt]: 0,
  2096 + });
  2097 + }else{
  2098 + e.setData({
  2099 + [txt]: Number(!sele),
  2100 + });
  2101 + }
  2102 + }
  2103 + var txt = "requestData[" + pitems + "].selected";
  2104 + if (pro_off) {
  2105 + wx.showToast({
  2106 + title: '已超出优惠促销次数',
  2107 + icon: 'none',
  2108 + });
  2109 + e.setData({
  2110 + [txt]: 0,
  2111 + });
  2112 + }else{
2041 2113 e.setData({
2042 2114 [txt]: Number(!sele),
2043 2115 });
2044 2116 }
2045   - var txt = "requestData[" + pitems + "].selected";
2046   - e.setData({
2047   - [txt]: Number(!sele),
2048   - });
2049 2117  
2050 2118 e.data.duo_zp_num_arr = {};
2051 2119 if (sele) {
... ... @@ -2057,6 +2125,48 @@ Page({
2057 2125 }
2058 2126 this.doCheckAll();
2059 2127 },
  2128 +
  2129 + //判断多门店,优惠促销次数的控制
  2130 + async multiple_stores_pro(pitems,item){
  2131 + let a = this.data.requestData[pitems].goods[item];
  2132 + let th=this
  2133 + let arr_pro=[]
  2134 + th.data.requestData.map((item,i)=>{
  2135 + if (i !=pitems) {
  2136 + arr_pro.push(item)
  2137 + }
  2138 + })
  2139 + let prom=null
  2140 + await getApp().request.promiseGet("/api/weshop/promgoods/get/" + os.stoid + "/" + a.prom_id, {}).then(res => {
  2141 + if (res.data.code == 0) {
  2142 + prom = res.data.data;
  2143 + }
  2144 + })
  2145 + let user_pre_buynum = await this.getUserBuyPromNum_pre(a.prom_id)
  2146 +
  2147 + if(user_pre_buynum>=prom.limit_num){
  2148 + return false
  2149 + }else{
  2150 + let action_num=user_pre_buynum+1;
  2151 + arr_pro.map(item=>{
  2152 + item.goods.map(ite=>{
  2153 + if(ite.prom_type==3 && ite.prom_id==a.prom_id && !ite.is_gift && ite.selected){
  2154 + action_num+=1;
  2155 + }
  2156 + })
  2157 + })
  2158 + if (prom && action_num>prom.limit_num) {
  2159 + return true
  2160 + }else{
  2161 + return false
  2162 + }
  2163 + }
  2164 +
  2165 +
  2166 + },
  2167 +
  2168 +
  2169 +
2060 2170 //---------------单选,也要判断门店的配送方式是否一致--------------
2061 2171 check_th_item: async function (t) {
2062 2172 var e = this, th = this,
... ... @@ -2156,7 +2266,21 @@ Page({
2156 2266 }
2157 2267  
2158 2268 }
  2269 + let pro_off=false
  2270 + //判断多店优惠促销次数控制
  2271 + if (th.data.requestData.length>1) {
  2272 + if(a.prom_type==3 && !a.selected){
  2273 + pro_off=await th.multiple_stores_pro(pitems,item)
  2274 + }
  2275 + }
2159 2276  
  2277 + if (pro_off) {
  2278 + wx.showToast({
  2279 + title: '已超出优惠促销次数',
  2280 + icon: 'none',
  2281 + });
  2282 + return false;
  2283 + }
2160 2284  
2161 2285  
2162 2286 e.setData({
... ... @@ -3196,6 +3320,9 @@ Page({
3196 3320 var ab = 0; //选中
3197 3321 wx.showLoading();
3198 3322 let checkArr7 = [];//组合购选中的数据
  3323 +
  3324 + let checkObj3={};//优惠促销次数判断
  3325 +
3199 3326 // let checkOff=false
3200 3327 for (var i = 0; i < this.data.requestData.length; i++) {
3201 3328 var i_arr = this.data.requestData[i].goods;
... ... @@ -3212,6 +3339,14 @@ Page({
3212 3339 checkArr7.push(i_arr[j])
3213 3340 }
3214 3341 }
  3342 + //优惠活动次数限制
  3343 + if (i_arr[j].prom_type==3) {
  3344 + if (checkObj3[i_arr[j].prom_id]) {
  3345 + checkObj3[i_arr[j].prom_id]+=1
  3346 + }else{
  3347 + checkObj3[i_arr[j].prom_id]=1
  3348 + }
  3349 + }
3215 3350 //map 的key是不会重复,会覆盖,,
3216 3351 var ie = {
3217 3352 goods_id: i_arr[j].goods_id,
... ... @@ -3235,14 +3370,17 @@ Page({
3235 3370 }
3236 3371 glist += i_arr[j].goods_id + ",";
3237 3372 ab = 1;
  3373 +
3238 3374 //--普通商品,如果有开启线下库存的功能,要调用线下库存进行计算,赠品不要进行调用线下库存---
3239 3375 if ((i_arr[j].prom_type == 0 || i_arr[j].prom_type == 3 || i_arr[j].prom_type == 5 || i_arr[j].prom_type == 7 ||
3240 3376 i_arr[j].need_downlow_num) && th.data.sales_rules >= 2 && i_arr[j].is_gift != 1 && !i_arr[j].whsle_id) {
3241 3377 //--获取商品的线下商品ID--
  3378 +
3242 3379 var gd = null;
3243 3380 await getApp().request.promiseGet("/api/weshop/goods/get/" + oo.stoid + "/" + i_arr[j].goods_id, {}).then(res => {
3244 3381 if (res.data.code == 0) gd = res.data.data;
3245 3382 })
  3383 +
3246 3384 //--判断商品是线下库存--
3247 3385 var ob = {}
3248 3386 await th.check_down_line_next(i_arr[j], i, j, gd.erpwareid, function (rs) {
... ... @@ -3255,6 +3393,7 @@ Page({
3255 3393 }
3256 3394  
3257 3395 var is_ok = 1;
  3396 +
3258 3397 //如果是优惠活动话,要看活动有没有过期
3259 3398 if (i_arr[j].prom_type == 3) {
3260 3399 //判断有没有活动
... ... @@ -3289,6 +3428,61 @@ Page({
3289 3428 }
3290 3429 }
3291 3430  
  3431 + console.error(checkObj3);
  3432 + let checkObj3_off=false
  3433 +
  3434 + //多门店优惠促销次数控制
  3435 + if (this.data.requestData.length>1) {
  3436 + let pro_stord_id=''
  3437 + let pro_stord_off=false
  3438 + this.data.requestData.map(ritem=>{
  3439 + ritem.goods.map(gitem=>{
  3440 + if (gitem.selected && gitem.prom_type==3) {
  3441 + if (pro_stord_id) {
  3442 + if (gitem.pick_id !=pro_stord_id) {
  3443 + pro_stord_off=true
  3444 + }
  3445 + }else{
  3446 + pro_stord_id=gitem.pick_id
  3447 + }
  3448 + }
  3449 + })
  3450 + })
  3451 + if(pro_stord_off){
  3452 + let checkarr3=Object.keys(checkObj3)
  3453 + if (checkarr3 && checkarr3.length>0) {
  3454 + for (let x = 0; x < checkarr3.length; x++) {
  3455 + let prom=null
  3456 + let key=checkarr3[x]
  3457 + await getApp().request.promiseGet("/api/weshop/promgoods/get/" + os.stoid + "/" + key, {}).then(res => {
  3458 + if (res.data.code == 0) {
  3459 + prom = res.data.data;
  3460 + }
  3461 + })
  3462 +
  3463 + if (prom && prom.limit_num) {
  3464 + let user_pre_buynum = await this.getUserBuyPromNum_pre(key)
  3465 + if(user_pre_buynum < prom.limit_num ){
  3466 + user_pre_buynum += checkObj3[key]
  3467 + if (user_pre_buynum>prom.limit_num) {
  3468 + checkObj3_off=true
  3469 + }
  3470 + }
  3471 +
  3472 + }
  3473 + }
  3474 + }
  3475 + }
  3476 + }
  3477 + if (checkObj3_off) {
  3478 + t.my_warnning("已超出优惠促销次数", 0, th);
  3479 + wx.hideLoading();
  3480 + return false
  3481 + }
  3482 +
  3483 +
  3484 +
  3485 +
3292 3486 if (checkArr7.length > 0) {
3293 3487 let checkStr = []
3294 3488 checkArr7.map(item => {
... ...
pages/giftpack/public/buy_com.js
... ... @@ -199,7 +199,7 @@ module.exports = {
199 199 //-- 统一购买 --
200 200 buy_libao:function (th) {
201 201 if(th.data.sele_g.is_pickup){
202   - if(!th.data.def_pick_store && !th.data.def_pick_store.pickup_id){
  202 + if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id)){
203 203 getApp().my_warnning("请先选择门店", 1, th);
204 204 return false;
205 205 }
... ...
pages/goods/categoryList/categoryList.wxml
... ... @@ -608,7 +608,7 @@
608 608 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
609 609 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
610 610 </view>
611   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>
  611 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb mgl10 fs24 no_line_c">{{item.market_price}}</view>
612 612 </view>
613 613  
614 614 <view class="comment">
... ... @@ -639,7 +639,7 @@
639 639 </view>
640 640 </view>
641 641 <view class="comment flex jc_sb">
642   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24">{{item.market_price}}</view>
  642 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 no_line_c">{{item.market_price}}</view>
643 643 <view class="fs22 pdt10 t-r">
644 644 <span>评论{{item.comment_count}}</span>
645 645 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -649,7 +649,7 @@
649 649 <block wx:else>
650 650 <view class="flex ai-center">
651 651 <view class="price rmb">{{item.shop_price}}</view>
652   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
  652 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
653 653 </view>
654 654  
655 655 <view class="comment">
... ... @@ -665,7 +665,7 @@
665 665 <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
666 666 <view class="flex ai-center">
667 667 <view class="price rmb">{{item.shop_price}}</view>
668   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>
  668 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
669 669 </view>
670 670 <view class="comment">
671 671 <view class="flex ai-center">
... ... @@ -687,7 +687,7 @@
687 687 <block wx:else>
688 688 <view class="flex ai-center">
689 689 <view class="price rmb">{{item.shop_price}}</view>
690   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
  690 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
691 691 </view>
692 692 <!-- <view class="price">¥{{item.shop_price}}</view> -->
693 693 <view class="comment">
... ... @@ -704,7 +704,7 @@
704 704  
705 705 <view class="flex ai-center">
706 706 <view class="price rmb">{{item.shop_price}}</view>
707   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
  707 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
708 708 </view>
709 709 <!-- <view class="price">¥{{item.shop_price}}</view> -->
710 710 <view class="comment">
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -1989,7 +1989,7 @@ Page({
1989 1989 }
1990 1990  
1991 1991 //如果有搭配购的时候的时候
1992   - if(th.data.zh_act && (!th.data.zh_act.zh_num || th.data.zh_act.zh_buy_num>th.data.zh_act.zh_num ) && newd.prom_type==0){
  1992 + if(th.data.zh_act && (!th.data.zh_act.zh_num || th.data.zh_act.zh_buy_num<th.data.zh_act.zh_num ) && newd.prom_type==0){
1993 1993 newd.prom_type = 7;
1994 1994 newd.prom_id = th.data.zh_act.id;
1995 1995 }
... ... @@ -2113,7 +2113,7 @@ Page({
2113 2113  
2114 2114 //-- 这一步主要是要让立即购买 走 购物车的逻辑 参与活动,如果有zh_act就强制组合购购买 --
2115 2115 if(th.data.zh_act
2116   - && th.data.zh_act.zhbuyqty <= th.data.goodsInputNum){
  2116 + && th.data.zh_act.zhbuyqty <= th.data.goodsInputNum && (!th.data.zh_act.zh_num || th.data.zh_act.zh_buy_num<th.data.zh_act.zh_num )){
2117 2117 wx.hideLoading();
2118 2118  
2119 2119 if((th.data.zh_act.buy_limit !=0 && th.data.zh_act.buy_limit <= th.data.userbuynum)){
... ... @@ -3290,6 +3290,8 @@ Page({
3290 3290  
3291 3291  
3292 3292 //普通商品多规格的时候,商品切换
  3293 + if(this.data.base_nor_prom_type) this.data.base_nor_prom_type=parseInt(this.data.base_nor_prom_type);
  3294 +
3293 3295 if([1,2,4,8,9].indexOf(this.data.base_nor_prom_type)==-1){
3294 3296 this.setData({
3295 3297 prom_goods:null,
... ... @@ -3333,10 +3335,10 @@ Page({
3333 3335 if (nor) that.get_sto(1);
3334 3336 else that.get_sto();
3335 3337  
3336   - if (!item.whsle_id) that.check_is_youhui(gid, that.data.is_normal);
  3338 + if (!item.whsle_id && [1,2,4,6].indexOf(item.prom_type)==-1) that.check_is_youhui(gid, that.data.is_normal);
3337 3339  
3338 3340 //默认门店要拿下门店库存
3339   - if (that.data.sales_rules >= 2 && that.data.def_pick_store && !that.data.sele_g.whsle_id) {
  3341 + if (that.data.sales_rules >= 2 && that.data.def_pick_store && !that.data.sele_g.whsle_id && [1,2,4,6].indexOf(item.prom_type)==-1) {
3340 3342 var lock = 0,
3341 3343 plist = null;
3342 3344  
... ... @@ -7651,7 +7653,7 @@ Page({
7651 7653 if(th.data.zh_act){
7652 7654 obj = {
7653 7655 act_id: th.data.zh_act.id,
7654   - prom_type:3
  7656 + prom_type:7
7655 7657 }
7656 7658 back(obj);
7657 7659 return false;
... ... @@ -7830,7 +7832,7 @@ Page({
7830 7832 //找不到活动要剔除
7831 7833 if (!item.act_name) continue;
7832 7834  
7833   - if ([1,2,4,6,8].indexOf(item.prom_type)==-1) continue;
  7835 + if ([1,2,4,6,8,9].indexOf(item.prom_type)==-1) continue;
7834 7836 new_arr.push(item);
7835 7837 }
7836 7838  
... ... @@ -7862,6 +7864,10 @@ Page({
7862 7864 break;
7863 7865 case 8:
7864 7866 url = "/packageC/pages/presell/goodsInfo/goodsInfo?goods_id=" + goods_id+ "&prom_id=" + prom_id;
  7867 + break;
  7868 + case 9:
  7869 + url = "/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=" + goods_id+ "&group_id=" + prom_id;
  7870 + break;
7865 7871 }
7866 7872  
7867 7873  
... ... @@ -8007,14 +8013,16 @@ Page({
8007 8013 if (ut.gettimestamp() < e.data.data.start_time) {
8008 8014 return false;
8009 8015 }
8010   - if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) {
  8016 +
  8017 + //判断组合购总数够不够
  8018 + var is_has_zh_num=(!e.data.data.zh_num || e.data.data.zh_buy_num<e.data.data.zh_num );
  8019 + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time && is_has_zh_num ) {
8011 8020 //-- 获取商品列表 --
8012 8021 th.setData({
8013 8022 zh_act: e.data.data
8014 8023 });
8015 8024 th.getUserBuyPromNum(e.data.data.id)
8016 8025 }
8017   -
8018 8026 }
8019 8027  
8020 8028 //-- 调用回调 --
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -605,6 +605,7 @@
605 605 <view wx:if="{{item.prom_type==4}}" class="cx-sizs wsize" style="width: 144rpx">积分购</view>
606 606 <view wx:if="{{item.prom_type==6}}" class="cx-sizs wsize" style="width: 144rpx">天天拼单</view>
607 607 <view wx:if="{{item.prom_type==8}}" class="cx-sizs wsize" style="width: 144rpx">预售</view>
  608 + <view wx:if="{{item.prom_type==9}}" class="cx-sizs wsize" style="width: 144rpx">幸运购</view>
608 609  
609 610 <!-- 中间显示层 -->
610 611 <view class="flex ai-center jc_sb" style="width: 570rpx" bindtap="go_more_flash" data-prom_type="{{item.prom_type}}" data-id="{{item.act_id}}">
... ... @@ -615,6 +616,7 @@
615 616 <view wx:if="{{item.prom_type==4}}" class="miao_lab">积</view>
616 617 <view wx:if="{{item.prom_type==6}}" class="miao_lab">拼</view>
617 618 <view wx:if="{{item.prom_type==8}}" class="miao_lab">预</view>
  619 + <view wx:if="{{item.prom_type==9}}" class="miao_lab">幸</view>
618 620  
619 621  
620 622 <view class="order_hui">
... ...
pages/goods/goodsList/goodsList.wxml
... ... @@ -92,7 +92,7 @@
92 92 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
93 93 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
94 94 </view>
95   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>
  95 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
96 96 </view>
97 97  
98 98  
... ... @@ -119,7 +119,7 @@
119 119 </view>
120 120 </view>
121 121 <view class="comment">
122   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_x">{{item.market_price}}</view>
  122 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
123 123 <view class="fs24 t-r">
124 124 <span>评论{{item.comment_count}}</span>
125 125 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -141,7 +141,7 @@
141 141 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
142 142 <view class="flex ai-center">
143 143 <view class="price rmb">{{item.shop_price}}</view>
144   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>
  144 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb no_line_c">{{item.market_price}}</view>
145 145 </view>
146 146 <view class="comment">
147 147 <view class="flex ai-center">
... ... @@ -160,7 +160,7 @@
160 160 <block wx:else>
161 161 <view>
162 162 <view class="price rmb">{{item.shop_price}}</view>
163   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_x">{{item.market_price}}</view>
  163 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
164 164 </view>
165 165 <!-- <view class="price">¥{{item.shop_price}}</view> -->
166 166 <view class="comment pdt10">
... ... @@ -175,7 +175,7 @@
175 175 <view wx:else>
176 176 <view class="flex ai-center">
177 177 <view class="price rmb">{{item.shop_price}}</view>
178   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_x">{{item.market_price}}</view>
  178 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
179 179 </view>
180 180  
181 181 <view class="comment pdt10">
... ... @@ -207,11 +207,11 @@
207 207 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
208 208 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
209 209 </view>
210   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>
  210 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
211 211 </view>
212 212  
213 213  
214   - <view class="comment pdt10">
  214 + <view class="comment pdt10">
215 215 <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
216 216 <view class="fs24 t-r">
217 217 <span>评论{{item.comment_count}}</span>
... ... @@ -234,7 +234,7 @@
234 234 </view>
235 235 </view>
236 236 <view class="comment">
237   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_x">{{item.market_price}}</view>
  237 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
238 238 <view class="fs24 t-r">
239 239 <span>评论{{item.comment_count}}</span>
240 240 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -244,7 +244,7 @@
244 244 <block wx:else>
245 245 <view class="price rmb">{{item.shop_price}}</view>
246 246 <view class="comment">
247   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view>
  247 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
248 248 <view class="fs24 t-r">
249 249 <span>评论{{item.comment_count}}</span>
250 250 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -256,7 +256,7 @@
256 256 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
257 257 <view class="flex ai-center">
258 258 <view class="price rmb">{{item.shop_price}}</view>
259   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>
  259 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb no_line_c">{{item.market_price}}</view>
260 260 </view>
261 261 <view class="comment">
262 262 <view class="flex ai-center">
... ... @@ -275,7 +275,7 @@
275 275 <block wx:else>
276 276 <view>
277 277 <view class="price rmb">{{item.shop_price}}</view>
278   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_x">{{item.market_price}}</view>
  278 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
279 279 </view>
280 280 <!-- <view class="price">¥{{item.shop_price}}</view> -->
281 281 <view class="comment pdt10">
... ... @@ -290,9 +290,8 @@
290 290 <view wx:else>
291 291 <view class="">
292 292 <view class="price rmb">{{item.shop_price}}</view>
293   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_x">{{item.market_price}}</view>
294   - </view>
295   -
  293 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
  294 + </view>
296 295 <view class="comment pdt10">
297 296 <view class="fs24 t-r">
298 297 <span>评论{{item.comment_count}}</span>
... ...
pages/user/index/filter.wxs
... ... @@ -23,6 +23,7 @@ var is_close = function (name,c_list) {
23 23 map['附近门店']="21";
24 24 map['积分签到']="22";
25 25 map['瘦身日记']="23";
  26 + map['每月礼包']="24";
26 27 var index=map[name];
27 28  
28 29 //我的权益要判断5,和11
... ...
pages/user/index/index.js
... ... @@ -57,6 +57,7 @@ Page({
57 57 var th = this;
58 58 var url = e.currentTarget.dataset.url;
59 59 if (th.data.userInfo != null) {
  60 + console.log('跳转');
60 61 getApp().goto(url);
61 62 } else {
62 63 wx.navigateTo({
... ... @@ -776,8 +777,11 @@ Page({
776 777  
777 778 //跳转到链接
778 779 goto: function (e) {
779   - var url = e.currentTarget.dataset.url;
780   - getApp().goto(url);
  780 + console.log(e);
  781 + console.log('跳转');
  782 + var url = e.currentTarget.dataset.url;
  783 + wx.navigateTo({ url: url })
  784 + // getApp().goto(url);
781 785 },
782 786  
783 787 //---------联系客服------------
... ...