Commit b14747a940d4bb524a98d7d4d20f8057311c223b

Authored by season
2 parents c8a7dcd6 1977d71a

Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp

Showing 181 changed files with 12492 additions and 3149 deletions

Too many changes.

To preserve performance only 100 of 181 files are displayed.

@@ -291,6 +291,31 @@ App({ @@ -291,6 +291,31 @@ App({
291 291
292 }, 292 },
293 293
  294 + //获取订阅消息模板id
  295 + async get_template_id(id){
  296 + if (!id) { return ''}
  297 + let os = this.globalData.setting;
  298 + let res = await this.promiseGet("/api/wx/weappSendlist/page", {
  299 + data: {
  300 + store_id: os.stoid,
  301 + typeids: id
  302 + }
  303 + })
  304 + let resdata = res.data.data.pageData
  305 + if (res.data.code == 0 && resdata.length > 0) {
  306 + let template_id = []
  307 + // let template_id = res.data.data.pageData[0].template_id;
  308 + try {
  309 + resdata.map(item=>{
  310 + template_id.push(item.template_id)
  311 + })
  312 + } catch (error) {}
  313 + return template_id
  314 + }else{
  315 + return []
  316 + }
  317 + },
  318 +
294 //---初始化第三方---- 319 //---初始化第三方----
295 initExt: function () { 320 initExt: function () {
296 var tt = t; 321 var tt = t;
app.json
@@ -5,41 +5,25 @@ @@ -5,41 +5,25 @@
5 "pages/cart/cart/cart", 5 "pages/cart/cart/cart",
6 "pages/cart/cart4/cart4", 6 "pages/cart/cart4/cart4",
7 "pages/goods/goodsInfo/goodsInfo", 7 "pages/goods/goodsInfo/goodsInfo",
8 - "pages/goods/goodsList/goodsList",  
9 - "pages/goods/search/search",  
10 - "pages/order/refund_order/refund_order",  
11 - "pages/payment/payment/payment", 8 + "pages/goods/goodsList/goodsList",
12 "pages/user/index/index", 9 "pages/user/index/index",
13 "pages/user/order_list/order_list", 10 "pages/user/order_list/order_list",
14 - "pages/user/order_detail/order_detail",  
15 - "pages/user/userinfo/userinfo", 11 + "pages/user/order_detail/order_detail",
16 "pages/user/coupon/coupon", 12 "pages/user/coupon/coupon",
17 - "pages/user/checkcoupon/checkcoupon",  
18 - 13 + "pages/user/checkcoupon/checkcoupon",
19 "pages/activity/seckill_list/seckill_list", 14 "pages/activity/seckill_list/seckill_list",
20 - "pages/activity/pind_list/pind_list",  
21 - 15 + "pages/activity/pind_list/pind_list",
22 "pages/team/team_show/team_show", 16 "pages/team/team_show/team_show",
23 -  
24 "pages/user/userqy/userqy", 17 "pages/user/userqy/userqy",
25 "pages/user/user_spsy/user_spsy", 18 "pages/user/user_spsy/user_spsy",
26 - "pages/payment/pay_success/pay_success",  
27 "pages/user/plus/plus", 19 "pages/user/plus/plus",
28 - "pages/user/my_service/appment_main",  
29 "pages/user/my_service/i_service", 20 "pages/user/my_service/i_service",
30 - "pages/user/my_service/cosmetology_list",  
31 - "pages/user/my_service/hist_service",  
32 - "pages/user/my_service/tment_details",  
33 - "pages/user/my_service/tment_eval",  
34 - "pages/user/my_service/tment_order_list",  
35 - "pages/user/my_service/beauty_deta",  
36 "pages/giftpack/birthdaygift/birthdaygift", 21 "pages/giftpack/birthdaygift/birthdaygift",
37 "pages/giftpack/evaluategift/evaluategift", 22 "pages/giftpack/evaluategift/evaluategift",
38 "pages/giftpack/newvipgift/newvipgift", 23 "pages/giftpack/newvipgift/newvipgift",
39 "pages/giftpack/payment/payment", 24 "pages/giftpack/payment/payment",
40 "pages/giftpack/buygiftpack/giftpackbuy", 25 "pages/giftpack/buygiftpack/giftpackbuy",
41 "pages/giftpack/giftpacklist/giftpacklist", 26 "pages/giftpack/giftpacklist/giftpacklist",
42 -  
43 "pages/giftpack/mygiftpack/mygiftpack", 27 "pages/giftpack/mygiftpack/mygiftpack",
44 "pages/user/assistance/giftpacklist", 28 "pages/user/assistance/giftpacklist",
45 "pages/user/assistance/task_assistance", 29 "pages/user/assistance/task_assistance",
@@ -47,8 +31,6 @@ @@ -47,8 +31,6 @@
47 "pages/user/assistance/assistance_success", 31 "pages/user/assistance/assistance_success",
48 "pages/user/assistance/assistance", 32 "pages/user/assistance/assistance",
49 "pages/giftpack/festival/festival", 33 "pages/giftpack/festival/festival",
50 -  
51 -  
52 "pages/distribution/distribution", 34 "pages/distribution/distribution",
53 "pages/template/index" 35 "pages/template/index"
54 ], 36 ],
@@ -213,9 +195,9 @@ @@ -213,9 +195,9 @@
213 "pages/user/monthgiftbag/giftpacklist/giftpacklist", 195 "pages/user/monthgiftbag/giftpacklist/giftpacklist",
214 "pages/user/monthgiftbag/giftpackinfo/giftpackinfo", 196 "pages/user/monthgiftbag/giftpackinfo/giftpackinfo",
215 "pages/user/monthgiftbag/giftpackbuy/giftpackbuy", 197 "pages/user/monthgiftbag/giftpackbuy/giftpackbuy",
216 - "pages/cart/cart2_inte/cart2_inte",  
217 "pages/cart/cart2_pt/cart2_pt", 198 "pages/cart/cart2_pt/cart2_pt",
218 - "pages/cart/cart_wk/cart_wk" 199 + "pages/cart/cart_wk/cart_wk",
  200 + "pages/cart/cart2_inte/cart2_inte"
219 201
220 ] 202 ]
221 }, 203 },
@@ -243,7 +225,19 @@ @@ -243,7 +225,19 @@
243 "pages/store/index", 225 "pages/store/index",
244 "pages/user/express/express", 226 "pages/user/express/express",
245 "pages/team/team_success/team_success", 227 "pages/team/team_success/team_success",
246 - "pages/plus_agreement/plus_agreement" 228 + "pages/plus_agreement/plus_agreement",
  229 + "pages/goods/search/search",
  230 + "pages/payment/pay_success/pay_success",
  231 + "pages/user/userinfo/userinfo",
  232 + "pages/user/my_service/appment_main",
  233 + "pages/user/my_service/cosmetology_list",
  234 + "pages/user/my_service/beauty_deta",
  235 + "pages/user/my_service/tment_order_list",
  236 + "pages/user/my_service/hist_service",
  237 + "pages/order/refund_order/refund_order",
  238 + "pages/payment/payment/payment",
  239 + "pages/user/my_service/tment_details",
  240 + "pages/user/my_service/tment_eval"
247 ] 241 ]
248 } 242 }
249 ], 243 ],
app.wxss
@@ -1211,6 +1211,11 @@ background: #ffe3e2; @@ -1211,6 +1211,11 @@ background: #ffe3e2;
1211 content: "\e618"; 1211 content: "\e618";
1212 } 1212 }
1213 1213
  1214 +.icon-weixin:before {
  1215 + content: "\e677";
  1216 +}
  1217 +
  1218 +
1214 /* 去掉零售价划线 */ 1219 /* 去掉零售价划线 */
1215 .no_line_x{ 1220 .no_line_x{
1216 text-decoration: none !important; 1221 text-decoration: none !important;
components/add_purchase/add_purchase.js 0 → 100644
  1 +// components/add_purchase/add_purchase.js
  2 +var s = getApp(),
  3 + ut = require("../../utils/util"),
  4 + i = s.request,
  5 + rq = i,
  6 + oo = s.globalData,
  7 + o = s.globalData.setting,
  8 + os = o;
  9 +let self = null;
  10 +var wxlog = require("../../utils/wxlog.js");
  11 +var w_time = null;
  12 +var timer_get = null;
  13 +var t_time = null;
  14 +Component({
  15 + /**
  16 + * 组件的属性列表
  17 + */
  18 + properties: {
  19 +
  20 + },
  21 +
  22 + lifetimes: {
  23 + // attached: function () {
  24 + // // this.clearTime()
  25 + // console.error('加购组件');
  26 + // self = this
  27 + // // 在组件实例进入页面节点树时执行
  28 + // let ee = this, that = ee, th = ee;
  29 + // //先获取一下导购的门店
  30 + // th.check_guide(() => {
  31 + // th.get_user_store();
  32 + // })
  33 + // //----获取系统参数-----
  34 + // getApp().getConfig2(function (e) {
  35 + // ee.setData({
  36 + // bconfig: e,
  37 + // sales_rules: e.sales_rules,
  38 + // });
  39 + // th.wait_for_store_config();
  40 + // if (e.categoryset.indexOf("," + 1 + ",") != -1) {
  41 + // ee.setData({
  42 + // is_show_pl: 1
  43 + // });
  44 + // }
  45 + // if (e.categoryset.indexOf("," + 3 + ",") != -1) {
  46 + // ee.setData({
  47 + // is_show_pp: 1
  48 + // });
  49 + // }
  50 + // if (e.categoryset.indexOf("," + 2 + ",") != -1) {
  51 + // ee.setData({
  52 + // is_show_gb: 1
  53 + // });
  54 + // }
  55 + // console.log('获取系统参数');
  56 + // console.log(e);
  57 + // var json_d = JSON.parse(e.switch_list);
  58 + // ee.setData({
  59 + // store_config: e,
  60 + // sys_switch: json_d,
  61 + // is_closecoupon: json_d.is_closecoupon,
  62 + // is_newsales_rules: json_d.is_newsales_rules,
  63 + // is_retail_price: json_d.is_retail_price || 0,
  64 + // appoint_pick_keyid: json_d.appoint_pick_keyid,
  65 + // // goods_bottomconent:e.goods_bottomconent
  66 + // });
  67 +
  68 + // //判断商品详情要有东西
  69 + // // if (e && e.goods_bottomconent) {
  70 + // // //商品详情广告----
  71 + // // a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
  72 + // // common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
  73 + // // //-------
  74 + // // }
  75 +
  76 + // //------几人评价-------
  77 + // //n.init(th, "", "comments");
  78 +
  79 + // // th.requestCardNum(),
  80 + // wx.pageScrollTo && th.setData({
  81 + // supportPageScroll: !0
  82 + // });
  83 +
  84 + // //计算等级价相关
  85 + // var swithc_list = e.switch_list;
  86 + // var sw_arr = JSON.parse(swithc_list);
  87 + // console.log('plus-111')
  88 + // //---如果后台又开等级卡的开关---
  89 + // ut.get_plus_name_price(sw_arr, th);
  90 +
  91 + // }, 1);
  92 + // },
  93 +
  94 + },
  95 + /**
  96 + * 组件的初始数据
  97 + */
  98 + data: {
  99 + add_cart_show: false, //是否显示
  100 + iurl: getApp().globalData.setting.imghost,
  101 + prom_price: null,
  102 + sele_g: null,
  103 + gid: '',
  104 + prom_type: '',
  105 + prom_id: '',
  106 + goodsInputNum: 1,
  107 + def_pick_store: null, // 默认的门店
  108 + openSpecModal_ind: 1,
  109 + goods_type: 0,
  110 + iscart: 0, //是否从购物车过来的
  111 + cx_prom_group: [], //促销活动,用于显示和判断默认要用什么促销活动
  112 + //门店相关
  113 + ismend: 0,
  114 + only_pk: null,
  115 + stoid: o.stoid,
  116 + is_get_local_ok: 0, //获取坐标是否完成
  117 + def_pickpu_list: null,
  118 + more_store: 0, //选择门店
  119 + sort_store: 0, //门店分类
  120 + choice_sort_store: 0, //选择分类门店
  121 + sec_pick_index: 0, //第二级门店选择ID
  122 + fir_pick_index: 0, //第一级门店选择ID
  123 + all_pick_list: null, //所有的门店先记录起来
  124 + fir_def_store: null, //客户默认的门店的
  125 + keyword: '', //门店搜索
  126 + is_no_new: 1,
  127 + },
  128 +
  129 + /**
  130 + * 组件的方法列表
  131 + */
  132 + methods: {
  133 + closeSpecModal() {
  134 + this.clearTime()
  135 + this.setData({
  136 + add_cart_show: false
  137 + })
  138 +
  139 + this.triggerEvent('hide_add_purchase', {})
  140 + },
  141 + clearTime() {
  142 + if (timer_get) {
  143 + clearInterval(timer_get);
  144 + }
  145 + if (w_time) {
  146 + clearInterval(w_time);
  147 + }
  148 + if (t_time) {
  149 + clearInterval(t_time);
  150 + }
  151 +
  152 + },
  153 + previewImage(e) {
  154 + // this.data.show_prew_img = 1;
  155 + getApp().pre_img(this.data.sele_g.original_img);
  156 + },
  157 + initbef: function () {
  158 + // this.clearTime()
  159 + console.error('加购组件');
  160 + self = this
  161 + // 在组件实例进入页面节点树时执行
  162 + let ee = this, that = ee, th = ee;
  163 + //先获取一下导购的门店
  164 + th.check_guide(() => {
  165 + th.get_user_store();
  166 + })
  167 + //----获取系统参数-----
  168 + getApp().getConfig2(function (e) {
  169 + ee.setData({
  170 + bconfig: e,
  171 + sales_rules: e.sales_rules,
  172 + });
  173 + th.wait_for_store_config();
  174 + if (e.categoryset.indexOf("," + 1 + ",") != -1) {
  175 + ee.setData({
  176 + is_show_pl: 1
  177 + });
  178 + }
  179 + if (e.categoryset.indexOf("," + 3 + ",") != -1) {
  180 + ee.setData({
  181 + is_show_pp: 1
  182 + });
  183 + }
  184 + if (e.categoryset.indexOf("," + 2 + ",") != -1) {
  185 + ee.setData({
  186 + is_show_gb: 1
  187 + });
  188 + }
  189 + console.log('获取系统参数');
  190 + console.log(e);
  191 + var json_d = JSON.parse(e.switch_list);
  192 + ee.setData({
  193 + store_config: e,
  194 + sys_switch: json_d,
  195 + is_closecoupon: json_d.is_closecoupon,
  196 + is_newsales_rules: json_d.is_newsales_rules,
  197 + is_retail_price: json_d.is_retail_price || 0,
  198 + appoint_pick_keyid: json_d.appoint_pick_keyid,
  199 + // goods_bottomconent:e.goods_bottomconent
  200 + });
  201 +
  202 + //判断商品详情要有东西
  203 + // if (e && e.goods_bottomconent) {
  204 + // //商品详情广告----
  205 + // a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
  206 + // common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
  207 + // //-------
  208 + // }
  209 +
  210 + //------几人评价-------
  211 + //n.init(th, "", "comments");
  212 +
  213 + // th.requestCardNum(),
  214 + wx.pageScrollTo && th.setData({
  215 + supportPageScroll: !0
  216 + });
  217 +
  218 + //计算等级价相关
  219 + var swithc_list = e.switch_list;
  220 + var sw_arr = JSON.parse(swithc_list);
  221 + console.log('plus-111')
  222 + //---如果后台又开等级卡的开关---
  223 + ut.get_plus_name_price(sw_arr, th);
  224 +
  225 + }, 1);
  226 + },
  227 + init(gid, prom_type, prom_id, goods_type = 0, iscart = 0, cartid = 0) {
  228 + this.initbef()
  229 + // this.clearTime()
  230 + //--先判断会员状态--
  231 + var user_info = getApp().globalData.userInfo;
  232 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  233 + wx.showModal({
  234 + title: '提示',
  235 + content: '你还没有登录',
  236 + confirmText: '去登录',
  237 + success(res) {
  238 +
  239 + if (res.confirm) {
  240 + wx.navigateTo({
  241 + url: '/packageE/pages/togoin/togoin',
  242 + })
  243 + } else if (res.cancel) {
  244 + console.log('用户点击取消')
  245 + }
  246 + }
  247 + })
  248 + return false;
  249 + }
  250 +
  251 +
  252 + if (!gid) {
  253 + wx.showToast({
  254 + title: '商品信息不对',
  255 + icon: 'none'
  256 + })
  257 + return
  258 + }
  259 + this.setData({
  260 + gid,
  261 + prom_id,
  262 + prom_type,
  263 + goods_type,
  264 + add_cart_show: true,
  265 + goodsInputNum: 1,
  266 + iscart,
  267 + cartid
  268 + })
  269 + if (goods_type == 1) {
  270 + this.get_ser_info()
  271 + } else {
  272 + this.get_goods_info()
  273 + }
  274 +
  275 + },
  276 + //获取服务详情
  277 + get_ser_info() {
  278 + let i = getApp().request;
  279 + let gid = this.data.gid
  280 + let ee = this;
  281 + let that = this
  282 + let th = this;
  283 + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, {
  284 + failRollback: !0,
  285 + success: function (t) {
  286 + if (t.data.code == 0) {
  287 + // console.log('GET pic and video');
  288 + if (t.data.data.listServiceItem) {
  289 + that.setData({
  290 + listServiceItem: t.data.data.listServiceItem,
  291 + });
  292 + };
  293 + that.setData({
  294 + 'sele_g.goods_name': t.data.data.serviceName,
  295 + 'sele_g.shop_price': t.data.data.money,
  296 + 'sele_g.show_price': t.data.data.show_price,
  297 + 'sele_g.validDays': t.data.data.validDays,
  298 + 'sele_g.serviceContent': t.data.data.serviceContent,
  299 + 'sele_g.image_url': t.data.data.imgUrl,
  300 + 'sele_g.original_img': that.data.iurl + t.data.data.imgUrl,
  301 + 'sele_g.goods_id': t.data.data.id,
  302 + 'sele_g.id': t.data.data.id,
  303 + 'sele_g.sales_sum': t.data.data.sales_sum,
  304 + 'sele_g.storageId': t.data.data.storageId,
  305 + 'sele_g.service_sn': t.data.data.serviceSn,
  306 + 'sele_g.listServiceVideos': t.data.data.listServiceVideos,
  307 +
  308 + 'data.goods_name': t.data.data.serviceName,
  309 + 'data.shop_price': t.data.data.money,
  310 + 'data.show_price': t.data.data.show_price,
  311 + 'data.validDays': t.data.data.validDays,
  312 + 'data.serviceContent': t.data.data.serviceContent,
  313 + 'data.image_url': t.data.data.imgUrl,
  314 + 'data.original_img': that.data.iurl + t.data.data.imgUrl,
  315 + 'data.goods_id': t.data.data.id,
  316 + 'data.id': t.data.data.id,
  317 + 'data.sales_sum': t.data.data.sales_sum,
  318 + 'data.storageId': t.data.data.storageId,
  319 + 'data.service_sn': t.data.data.serviceSn,
  320 + 'data.listServiceVideos': t.data.data.listServiceVideos,
  321 + });
  322 +
  323 + // that.getTaohe();
  324 + // ----> 秒杀
  325 + let prom_type = th.data.prom_type;
  326 +
  327 + let goods_id = th.data.goods_id;
  328 + if (!goods_id) goods_id = th.data.sele_g.goods_id;
  329 +
  330 + if (prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入
  331 + let prom_id = th.data.prom_id;
  332 + // 检查活动是否开始
  333 + th.ser_check_prom(goods_id, prom_type, prom_id);
  334 +
  335 + } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数
  336 + getApp().request.promiseGet('/api/weshop/activitylist/listGoodActInfo2', {
  337 + data: {
  338 + store_id: os.stoid,
  339 + goods_id: goods_id,
  340 + goods_type: 1,
  341 + user_id: oo.user_id,
  342 + }
  343 + }).then(res => {
  344 + if (res.data.code == 0) {
  345 + let result = res.data.data;
  346 + let resLength = result.length;
  347 + if (resLength == 1) { // 如果数组长度为1,则直接显示当前活动
  348 + let goods_id = th.data.gid;
  349 + let prom_type = result[0].prom_type;
  350 + let prom_id = result[0].act_id;
  351 + th.setData({
  352 + prom_type: prom_type,
  353 + prom_id: prom_id,
  354 + });
  355 + // 检查活动是否开始
  356 + th.ser_check_prom(goods_id, prom_type, prom_id);
  357 + } else if (resLength > 1) { //如果数组长度大于1,表示当前商品参加多个活动,以列表形式显示多活动
  358 + th.setData({
  359 + actList: res.data.data,
  360 + });
  361 + };
  362 +
  363 + } else {
  364 + th.setData({
  365 + actList: res.data.data,
  366 + });
  367 + }
  368 + });
  369 + };
  370 +
  371 + // console.log('0xxxxx999999', t.data.data);
  372 + //-----商品详情---
  373 + //if(!t.data.data.serviceContent) t.data.data.serviceContent=" ";
  374 + //a.wxParse("content", "html", ut.format_content(t.data.data.serviceContent), ee, 6);
  375 + //e.wxParseAddFullImageUrl(ee, "content");
  376 + // getApp().deal_iframe(a,e,'content',t.data.data.serviceContent,ee);
  377 +
  378 + //获取重表
  379 + getApp().promiseGet("/api/weshop/serviceItem/list", {
  380 + data: { store_id: o.stoid, service_id: t.data.data.id }
  381 + }).then(res => {
  382 + if (res.data.code == 0) {
  383 + var list = res.data.data;
  384 + that.setData({ service_list: list })
  385 + }
  386 + })
  387 +
  388 + } else {
  389 + wx.showModal({
  390 + title: t.data.msg,
  391 + showCancel: !1,
  392 + complete: function () {
  393 + wx.navigateBack();
  394 + }
  395 + });
  396 + };
  397 + }
  398 + });
  399 +
  400 + },
  401 + get_normal(gid) {
  402 + this.setData({
  403 + prom_type: 0,
  404 + isshow: 1,
  405 + });
  406 + if (this.data.goods_type != 1) {
  407 +
  408 + this.get_sku(os.stoid, this.data.data, gid);
  409 + }
  410 +
  411 + this.get_sto();
  412 + if (!this.data.data.whsle_id)
  413 + this.check_is_youhui(gid);
  414 + this.data.is_normal = 1;
  415 + },
  416 + //获取商品详情
  417 + get_goods_info() {
  418 +
  419 + let i = getApp().request;
  420 + let gid = this.data.gid
  421 + let ee = this;
  422 + i.get("/api/weshop/goods/get/" + getApp().globalData.setting.stoid + "/" + this.data.gid, {
  423 + failRollback: !0,
  424 + success: (t) => {
  425 + console.log(t);
  426 + // t.data.data.prom_type=0
  427 + if (t.data.code == 0) {
  428 + // if (t.data.data && t.data.data.prom_type == 4) {
  429 + // if (ee.data.prom_type4 == 1) {
  430 + // t.data.data.prom_type = 0
  431 + // }
  432 + // }
  433 + if (t.data.data.is_on_sale != 1) {
  434 + wx.showToast({
  435 + title: '商品已经下架',
  436 + icon: 'none',
  437 + duration: 2000
  438 + })
  439 + return
  440 + }
  441 + // ee.init(gid);
  442 + var timestamp = Date.parse(new Date());
  443 + timestamp = timestamp / 1000;
  444 + if (t.data.data.on_time > timestamp) {
  445 + wx.showToast({
  446 + title: '商品还未上架',
  447 + icon: 'none',
  448 + duration: 2000
  449 + })
  450 + return
  451 + }
  452 +
  453 + if (t.data.data.down_time > 0) {
  454 + if (t.data.data.down_time < timestamp) {
  455 + wx.showToast({
  456 + title: '商品已经到期下架',
  457 + icon: 'none',
  458 + duration: 2000
  459 + })
  460 + return
  461 + }
  462 + }
  463 +
  464 + // let p_type = parseInt(this.data.prom_type ? ee.data.prom_type : 0);
  465 +
  466 +
  467 +
  468 + //-- 把商品的赋值,同时给活动赋值 --
  469 + ee.data.fir_goods = JSON.parse(JSON.stringify(t.data.data));
  470 +
  471 + t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss');
  472 +
  473 + let cur_price = t.data.data.shop_price;
  474 + if (getApp().globalData.userInfo && getApp().globalData.userInfo.card_field) {
  475 + let cfile = getApp().globalData.userInfo.card_field;
  476 + if (t.data.data[cfile]) {
  477 + cur_price = t.data.data[cfile];
  478 + }
  479 + }
  480 + let txt = (cur_price / t.data.data.market_price * 10).toFixed(2).toString();
  481 + txt = parseFloat(txt);
  482 +
  483 + t.data.data['disc'] = txt;
  484 +
  485 + if (t.data.data.original_img.indexOf(o.imghost) == -1)
  486 + t.data.data.original_img = o.imghost + t.data.data.original_img;
  487 +
  488 +
  489 + t.data.data.prom_type = ee.data.prom_type;
  490 + t.data.data.prom_id = ee.data.prom_id;
  491 +
  492 + //只有是普通商品的时候,才要给商品赋值指定门店
  493 + if ([1, 2, 4, 6, 8, 9].indexOf(parseInt(ee.data.prom_type)) < 0 && t.data.data.pick_up_lists && t.data.data.pick_up_lists.length) {
  494 + t.data.data.pickup_ids = t.data.data.pick_up_lists;
  495 + }
  496 + //}
  497 + ee.setData({
  498 + data: t.data.data,
  499 + sele_g: t.data.data,
  500 + userInfo: getApp().globalData.userInfo
  501 + });
  502 +
  503 + //一件代发商品不去计算优惠
  504 + if (!ee.data.fir_goods.whsle_id && ee.data.prom_type != 1 && ee.data.prom_type != 4 && ee.data.prom_type != 6 && ee.data.prom_type != 2) {
  505 + ee.check_is_youhui(ee.data.gid);
  506 + }
  507 +
  508 +
  509 + //获取统一条形码,普通商品和优惠促销的商品
  510 + if (ee.data.data.prom_type == 0 || ee.data.data.prom_type == 3 || ee.data.data.prom_type == 5 || ee.data.data.prom_type == 7 || ee.data.data.prom_type == 9 || ee.data.data.prom_type == 10) {
  511 + ee.get_sto();
  512 + ee.get_sku(o.stoid, t.data.data, gid);
  513 + ee.check_has_flash();
  514 +
  515 + } else {
  516 + var gg = "",
  517 + item = t.data.data;
  518 +
  519 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  520 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  521 +
  522 + if (item.goods_spec != "" && item.goods_color != "") {
  523 + gg = item.goods_spec + "/" + item.goods_color;
  524 + } else if (item.goods_spec != "" || item.goods_color != "") {
  525 + gg = item.goods_spec + item.goods_color;
  526 + } else {
  527 + gg = "规格1";
  528 + }
  529 + t.data.data.gg = gg;
  530 + var uu = [];
  531 + uu.push(t.data.data);
  532 +
  533 + ee.setData({
  534 + sku_g: uu,
  535 + });
  536 + }
  537 + ee.data.g_buy_num = new Map();
  538 +
  539 + //-- 增加相同的活动 --
  540 + ee.check_prom(gid, ee.data.data.prom_type, ee.data.data.prom_id);
  541 + } else {
  542 + wx.showModal({
  543 + title: t.data.msg,
  544 + showCancel: !1,
  545 + });
  546 + }
  547 + }
  548 + });
  549 + },
  550 + //----------装载同一条形码的商品----------
  551 + async get_sku(stoid, gd, g_id, is_normal, func) {
  552 + console.log('get_sku');
  553 + var tt = this,
  554 + arrdata = null;
  555 + var now = ut.gettimestamp();
  556 + await getApp().request.promiseGet("/api/weshop/goods/page", {
  557 + data: {
  558 + store_id: o.stoid,
  559 + sku: gd.sku,
  560 + more_spec: gd.more_spec,
  561 + isonsale: 1,
  562 + is_on_sale: 1,
  563 + pageSize: 500,
  564 + orderField: 'gg_ordid,goods_spec,sort',
  565 + isnewwhere: 1,
  566 + js_pickup_id: 0
  567 + }
  568 + }).then(res => {
  569 + var e = res;
  570 + if (e.data.code == 0) arrdata = e.data.data.pageData;
  571 + })
  572 + if (!arrdata) return false;
  573 +
  574 + // if(arrdata[0]){
  575 + // tt.setData({
  576 + // new_share_imgurl:arrdata[0].share_imgurl
  577 + // })
  578 + // }
  579 +
  580 + var arrsku = new Array();
  581 + var gitem = null;
  582 + var gb = 1,
  583 + gg = "";
  584 + for (var i = 0; i < arrdata.length; i++) {
  585 + var goodsinfo = arrdata[i],
  586 + prom = null;
  587 +
  588 + if (goodsinfo.goods_id != g_id) {
  589 +
  590 +
  591 + //要判断一下商品的活动是不是多活动,确定一下商品的prom_type
  592 + var url = '/api/weshop/activitylist/listGoodActInfo2New';
  593 + var req_d = {
  594 + "store_id": os.stoid,
  595 + "goods_id": goodsinfo.goods_id,
  596 + "user_id": getApp().globalData.user_id,
  597 + }
  598 + var ck_res = await getApp().request.promiseGet("/api/weshop/activitylist/listGoodActInfo2New", { data: req_d });
  599 + if (ck_res.data.code == 0 && ck_res.data.data && ck_res.data.data.length > 0) {
  600 + var arr = ck_res.data.data;
  601 + //-- 预热也要计算 --
  602 + var arr2 = arr.filter(function (e) {
  603 + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp())
  604 + })
  605 +
  606 + if (arr2.length == 1) {
  607 + goodsinfo.prom_type = arr2[0].prom_type;
  608 + goodsinfo.prom_id = arr2[0].act_id;
  609 + }
  610 + }
  611 +
  612 + switch (goodsinfo.prom_type) {
  613 + case 1:
  614 +
  615 + if (goodsinfo.prom_id) {
  616 + await getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => {
  617 + if (res.data.code == 0) prom = res.data.data;
  618 + })
  619 + }
  620 +
  621 +
  622 + break;
  623 + case 6:
  624 + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => {
  625 + console.log(res);
  626 + if (res.data.code == 0) prom = res.data.data;
  627 + })
  628 +
  629 + break;
  630 + case 2:
  631 + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {
  632 + if (res.data.code == 0) prom = res.data.data;
  633 + })
  634 + break;
  635 + case 4:
  636 + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {
  637 + if (res.data.code == 0) prom = res.data.data;
  638 + })
  639 + break
  640 + //预售和幸运购不参与
  641 + case 8:
  642 + case 9:
  643 + continue;
  644 + }
  645 +
  646 + } else {
  647 +
  648 + //只有是普通商品的时候,才要给商品赋值指定门店
  649 + if ([1, 2, 4, 6, 8, 9].indexOf(parseInt(this.data.prom_type)) < 0 || is_normal) {
  650 + //如果商品有设置分组
  651 + if (goodsinfo.pick_group_ids) {
  652 + goodsinfo.pickup_ids = goodsinfo.pick_up_lists;
  653 + }
  654 + }
  655 +
  656 + }
  657 + //---如果有活动,不算在一起---
  658 + if (prom) {
  659 + if ([1, 2, 4, 6].indexOf(parseInt(goodsinfo.prom_type)) > -1) {
  660 + console.log(prom);
  661 + if (prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom.show_time && prom.show_time < now))) continue;
  662 + } else {
  663 + continue;
  664 + }
  665 + }
  666 + var item = arrdata[i], gg = "";
  667 +
  668 + if (goodsinfo.goods_id != g_id) {
  669 + //-- 如果商品有设置分组 --
  670 + if (item.pick_group_ids) {
  671 + item.pickup_ids = item.pick_up_lists;
  672 + }
  673 + }
  674 +
  675 +
  676 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  677 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  678 +
  679 + if (item.goods_spec != "" && item.goods_color != "") {
  680 + gg = item.goods_spec + "/" + item.goods_color;
  681 + } else if (item.goods_spec != "" || item.goods_color != "") {
  682 + gg = item.goods_spec + item.goods_color;
  683 + } else {
  684 + gg = "规格" + gb;
  685 + gb++;
  686 + }
  687 + item.gg = gg;
  688 +
  689 + if (item.spec_img)
  690 + item.original_img = os.imghost + item.spec_img;
  691 + else
  692 + item.original_img = os.imghost + item.original_img;
  693 +
  694 +
  695 + if (item.goods_id == g_id) {
  696 + gitem = item;
  697 + } else {
  698 + arrsku.push(item);
  699 + }
  700 + }
  701 +
  702 + //-----------排列在最前面-------------
  703 + arrsku.splice(0, 0, gitem);
  704 +
  705 + if (is_normal == 1) {
  706 + tt.setData({
  707 + sku_g_pt: arrsku,
  708 + sele_g: gitem
  709 + });
  710 + func();
  711 + } else {
  712 + tt.setData({
  713 + sku_g: arrsku,
  714 + sele_g: gitem
  715 + });
  716 + }
  717 + },
  718 +
  719 + //-- 判断是否有秒杀 --
  720 + check_has_flash: function (gid) {
  721 + var th = this;
  722 + var url = "/api/weshop/activitylist/getGoodActInfo";
  723 + var user_id = getApp().globalData.user_id;
  724 + if (!user_id) user_id = 0;
  725 +
  726 + if (!gid) gid = this.data.data.goods_id
  727 +
  728 + var req_data = {
  729 + store_id: os.stoid,
  730 + goodsidlist: gid,
  731 + is_detail: 1,
  732 + user_id: user_id,
  733 + timetype: 0
  734 + };
  735 + //获取秒杀的多规格
  736 + getApp().request.promiseGet(url, {
  737 + data: req_data
  738 + }).then(async function (res) {
  739 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  740 + var arr_data = res.data.data;
  741 + var new_arr = [];
  742 + for (let i in arr_data) {
  743 + let item = arr_data[i];
  744 + //找不到活动要剔除
  745 + if (!item.act_name) continue;
  746 +
  747 + if ([1, 2, 4, 6, 8, 9].indexOf(item.prom_type) == -1) continue;
  748 + new_arr.push(item);
  749 + }
  750 +
  751 + // if (new_arr.length == 1) {
  752 + // th.data.prom_id = new_arr[0].act_id;
  753 + // th.data.prom_type = new_arr[0].prom_type;
  754 + // }
  755 +
  756 + th.setData({
  757 + more_flash: new_arr
  758 + });
  759 + }
  760 + })
  761 + },
  762 +
  763 +
  764 + //--------检查是否活动,活动是否开始,或者是否结束-------
  765 + async check_prom(gid, prom_type, prom_id) {
  766 +
  767 + console.log('check_prom');
  768 + var ee = this,
  769 + th = ee;
  770 + var user_id = getApp().globalData.user_id;
  771 + if (!user_id) user_id = 0;
  772 +
  773 + if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9 || prom_type == 10) {
  774 + this.setData({
  775 + prom_type: 0,
  776 + isshow: 1,
  777 + });
  778 + return false;
  779 + }
  780 +
  781 + if (prom_type == 2) {
  782 + //-------判断团购活动是否抢光---------
  783 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  784 + 1: 1
  785 + }).then(res => {
  786 + var em = res;
  787 + if (em.data.code == 0) {
  788 + if (em.data.data <= 0) ee.setData({
  789 + prom_r_null: 1
  790 + });
  791 + //拿取价格并且判断时间--
  792 + getApp().request.get("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gid + "/" + prom_id, {
  793 + success: function (t) {
  794 + if (t.data.code != 0) {
  795 + ee.get_normal(gid);
  796 + return false;
  797 + }
  798 + //----已经结束-----
  799 + if (t.data.data.is_end == 1) {
  800 + ee.get_normal(gid);
  801 + return false;
  802 + }
  803 + //----已经过期-----
  804 + var now = ut.gettimestamp();
  805 + if (t.data.data.end_time < now || t.data.data.start_time > now) {
  806 + ee.get_normal(gid);
  807 + return false;
  808 + }
  809 +
  810 + /*-- 还没有开始预热的也不显示 --*/
  811 + if (t.data.data.show_time > now) {
  812 + ee.get_normal(gid);
  813 + return false;
  814 + }
  815 +
  816 + var t_gd = ee.data.data;
  817 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  818 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  819 +
  820 + ee.setData({
  821 + prom_price: t.data.data.price,
  822 + prom_type: 2,
  823 + prom_id: prom_id,
  824 + prom_buy_limit: t.data.data.buy_limit,
  825 + prom_act: t.data.data,
  826 + prom_end_time: prom_end_time,
  827 + prom_start_time: prom_start_time,
  828 + isshow: 1,
  829 + });
  830 +
  831 + ee.get_sto();
  832 + var newTime = ut.gettimestamp();
  833 + var endTime2 = t.data.data.end_time;
  834 + var endTime1 = t.data.data.start_time;
  835 + if (endTime1 > newTime) {
  836 + ee.setData({
  837 + prom_time_text: '距团购开始还有'
  838 + })
  839 + // ee.countDown(endTime1, 0);
  840 + } else {
  841 + if (endTime2 > newTime) {
  842 + ee.setData({
  843 + prom_time_text: '距团购结束还有',
  844 + prom_st: 1
  845 + })
  846 + // ee.countDown(endTime2);
  847 + }
  848 + }
  849 +
  850 + }
  851 + });
  852 + }
  853 + })
  854 + }
  855 +
  856 + if (prom_type == 1 && prom_id == 0) {
  857 + this.setData({
  858 + prom_type: 0,
  859 + isshow: 1,
  860 + });
  861 +
  862 + //获取门店
  863 + this.get_sto();
  864 + this.get_sku(o.stoid, this.data.data, gid);
  865 + this.check_has_flash();
  866 + this.data.is_normal = 1;
  867 + if (!this.data.data.whsle_id) this.check_is_youhui(gid, 1);
  868 + return false;
  869 + }
  870 +
  871 + //if (prom_type != 3 && prom_type!=0){
  872 + //---判断秒杀----
  873 + if (prom_type == 1 && prom_id > 0) {
  874 + //-------判断活动是否抢光---------
  875 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  876 + 1: 1
  877 + }).then(res => {
  878 + var em = res;
  879 + if (em.data.code == 0) {
  880 +
  881 + if (em.data.data <= 0) ee.setData({
  882 + prom_r_null: 1, pro_null: 1
  883 + });
  884 + //拿取价格并且判断时间--
  885 + getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {
  886 + success: function (t) {
  887 + if (t.data.code != 0) {
  888 + ee.get_normal(gid);
  889 + return false;
  890 + }
  891 + ee.setData({
  892 + is_share_text: t.data.data.is_share_text
  893 + })
  894 + //----已经结束-----
  895 + if (t.data.data.is_end == 1) {
  896 + ee.get_normal(gid);
  897 + return false;
  898 + }
  899 + //----已经过期-----
  900 + var now = ut.gettimestamp();
  901 + if (t.data.data.end_time < now) {
  902 + ee.get_normal(gid);
  903 + return false;
  904 + }
  905 + /*-- 还没有开始预热的也不显示 --*/
  906 + if (t.data.data.show_time > now) {
  907 + ee.get_normal(gid);
  908 + return false;
  909 + }
  910 +
  911 + var t_gd = ee.data.data;
  912 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  913 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  914 +
  915 + ee.setData({
  916 + prom_price: t.data.data.user_price,
  917 + prom_type: 1,
  918 + prom_id: prom_id,
  919 + prom_buy_limit: t.data.data.buy_limit,
  920 + prom_act: t.data.data,
  921 + prom_end_time: prom_end_time,
  922 + prom_start_time: prom_start_time,
  923 + isshow: 1,
  924 + });
  925 +
  926 + ee.get_sto();
  927 + var newTime = ut.gettimestamp();
  928 + var endTime2 = t.data.data.end_time;
  929 + var endTime1 = t.data.data.start_time;
  930 + if (endTime1 > newTime) {
  931 + ee.setData({
  932 + prom_time_text: '距秒杀开始还有'
  933 + })
  934 + // ee.countDown(endTime1, 0);
  935 + } else {
  936 + if (endTime2 > newTime) {
  937 + ee.setData({
  938 + prom_time_text: '距秒杀结束还有',
  939 + prom_st: 1
  940 + })
  941 + // ee.countDown(endTime2);
  942 + }
  943 + }
  944 +
  945 + //如果是进行中的话
  946 + if (endTime1 < newTime) {
  947 + //-- 获取秒杀活动的多少规格 --
  948 + ee.get_more_flahs(function (list) {
  949 + if (list && list.length > 1) {
  950 +
  951 + var n_item = list[0];
  952 + var ind = list.findIndex(function (ele) {
  953 + return ele.goods_id == ee.data.data.goods_id;
  954 + })
  955 + if (ind < 0) return false;
  956 + if (ind > 0) {
  957 + n_item = JSON.parse(JSON.stringify(list[ind]));
  958 + list.splice(ind, 1);
  959 + list.unshift(n_item);
  960 + }
  961 +
  962 + ee.data.sele_g.viplimited = n_item.viplimited;
  963 + ee.data.data.viplimited = n_item.viplimited;
  964 +
  965 + ee.data.sele_g.prom_type = 1;
  966 + ee.data.sele_g.prom_id = n_item.act_id;
  967 +
  968 + var gb = 1;
  969 + //-- 显示多规格 --
  970 + for (let i in list) {
  971 + let item = list[i];
  972 + var gg = "";
  973 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  974 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  975 +
  976 + if (item.goods_spec != "" && item.goods_color != "") {
  977 + gg = item.goods_spec + "/" + item.goods_color;
  978 + } else if (item.goods_spec != "" || item.goods_color != "") {
  979 + gg = item.goods_spec + item.goods_color;
  980 + } else {
  981 + gg = "规格" + gb;
  982 + gb++;
  983 + }
  984 + item.gg = gg;
  985 + item.prom_id = item.prom_id;
  986 + item.prom_type = 1;
  987 + }
  988 +
  989 + ee.setData({
  990 + sku_g: list,
  991 + is_more_flash: 1
  992 + });
  993 +
  994 + }
  995 + })
  996 + }
  997 +
  998 + }
  999 + });
  1000 + }
  1001 + })
  1002 + }
  1003 +
  1004 + if (prom_type == 4) {
  1005 + //th.setData({is_integral_normal:1});
  1006 + var rdata = {
  1007 + store_id: o.stoid,
  1008 + stype: 1,
  1009 + stypeup: 1,
  1010 + goods_id: gid,
  1011 + timetype: 2,
  1012 + user_id: getApp().globalData.user_id,
  1013 + }
  1014 +
  1015 + var integrals = 0;
  1016 + var get_datas = {
  1017 + user_id: getApp().globalData.user_id,
  1018 + store_id: o.stoid,
  1019 + };
  1020 + await getApp().request.promiseGet("/api/weshop/users/getAllPoints", {
  1021 + data: get_datas
  1022 + }).then(res => {
  1023 + if (res.data.code == 0) {
  1024 + integrals = res.data.data?.Integral ? res.data.data?.Integral : 0;
  1025 + }
  1026 + })
  1027 +
  1028 + //获取一下积分活动
  1029 + await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList", {
  1030 + data: rdata
  1031 + }).then(res => {
  1032 + //调用接口有数据的时候
  1033 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  1034 + var inte_data = res.data.data.pageData[0];
  1035 + var can_integral = (parseFloat(integrals) >= parseFloat(inte_data.integral));
  1036 + let times = new Date().getTime()
  1037 + inte_data.show_time_off = ""
  1038 + let atimes = inte_data.start_time * 1000
  1039 +
  1040 + if (atimes > times) {
  1041 + inte_data.show_time_off = ut.formatTime(inte_data.start_time)
  1042 + }
  1043 +
  1044 + ee.setData({
  1045 + prom_price: parseFloat(inte_data.addmoney),
  1046 + prom_integral: parseFloat(inte_data.integral),
  1047 + prom_type: 4,
  1048 + prom_id: inte_data.id,
  1049 + prom_buy_limit: inte_data.limitvipqty,
  1050 + prom_act: inte_data,
  1051 + isshow: 1,
  1052 + can_integral: can_integral,
  1053 + is_shopbuy: parseInt(inte_data.is_shopbuy ? inte_data.is_shopbuy : 0)
  1054 + });
  1055 + ee.get_sto();
  1056 +
  1057 + } else {
  1058 + ee.get_normal(gid);
  1059 + return false;
  1060 + }
  1061 + })
  1062 +
  1063 + }
  1064 +
  1065 + //---判断拼单----
  1066 + if (prom_type == 6) {
  1067 +
  1068 + th.setData({
  1069 + user_order_pt_state: 0
  1070 + });
  1071 +
  1072 + //-------判断活动是否抢光---------
  1073 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  1074 + 1: 1
  1075 + }).then(res => {
  1076 + var em = res;
  1077 + var flag = null;
  1078 + if (em.data.code == 0) {
  1079 + if (em.data.data <= 0) ee.setData({
  1080 + prom_r_null: 1
  1081 + });
  1082 + //-- 拿取价格并且判断时间,同时判断会员身份 --
  1083 + getApp().request.get("/api/weshop/teamlist/getUser/" + os.stoid + "/" + prom_id + "/" + getApp().globalData.user_id, {
  1084 + success: async function (t) {
  1085 + if (t.data.code != 0) {
  1086 + ee.get_normal(gid);
  1087 + return false;
  1088 + }
  1089 + //----已经结束-----
  1090 + if (t.data.data.is_end == 1) {
  1091 + ee.get_normal(gid);
  1092 + return false;
  1093 + }
  1094 + //----已经过期-----
  1095 + var now = ut.gettimestamp();
  1096 + if (t.data.data.end_time < now) {
  1097 + ee.get_normal(gid);
  1098 + return false;
  1099 + }
  1100 +
  1101 + /*-- 还没有开始预热的也不显示 --*/
  1102 + if (t.data.data.show_time > now) {
  1103 + ee.get_normal(gid);
  1104 + return false;
  1105 + }
  1106 +
  1107 + /*-- 判断拼单是否启用 --*/
  1108 + if (!t.data.data.is_show) {
  1109 + console.log('没启用');
  1110 + wx.setNavigationBarTitle({
  1111 + title: '系统提示',
  1112 + });
  1113 + wx.showToast({
  1114 + title: '此商品暂时没有拼单活动',
  1115 + icon: 'none',
  1116 + success() {
  1117 + setTimeout(() => {
  1118 + wx.navigateBack()
  1119 + }, 2000)
  1120 + }
  1121 + });
  1122 + return false
  1123 + }
  1124 +
  1125 +
  1126 + //-------查看自己是不是有买过该团的商品,并还为支付,或者在进行中-------
  1127 + await getApp().request.promiseGet("/api/weshop/order/page", {
  1128 + data: {
  1129 + pt_prom_id: prom_id,
  1130 + user_id: oo.user_id,
  1131 + store_id: os.stoid,
  1132 + pageSize: 1,
  1133 + page: 1
  1134 + }
  1135 + }).then(e => {
  1136 + if (e.data.code == 0 && e.data.data.pageData.length > 0) {
  1137 + var odr = e.data.data.pageData[0];
  1138 + th.data.buy_order = odr;
  1139 + if (odr.pt_status == 0 && odr.order_status == 1) {
  1140 + th.setData({
  1141 + user_order_pt_state: 1
  1142 + });
  1143 + }
  1144 + if (odr.pt_status == 1 && odr.order_status == 1) {
  1145 + if (odr.is_zsorder == 4) {
  1146 + getApp().request.promiseGet("/api/weshop/teamgroup/page/", {
  1147 + data: {
  1148 + store_id: os.stoid,
  1149 + team_id: odr.pt_prom_id,
  1150 + listno: odr.pt_listno
  1151 + }
  1152 + }).then(res => {
  1153 + var now = ut.gettimestamp();
  1154 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  1155 + var tgr = res.data.data.pageData[0];
  1156 + //如果团的时间已经到了
  1157 + if (now >= tgr.kt_end_time) {
  1158 + th.update_jiti(tgr.id);
  1159 + } else {
  1160 + th.setData({
  1161 + user_order_pt_state: 2
  1162 + });
  1163 + }
  1164 + }
  1165 + })
  1166 +
  1167 + } else {
  1168 + th.setData({
  1169 + user_order_pt_state: 2
  1170 + });
  1171 + }
  1172 + }
  1173 +
  1174 + if (odr.pt_status == 2 && odr.is_zsorder == 4) {
  1175 + th.setData({
  1176 + user_order_pt_state: 3,
  1177 + });
  1178 + th.data.wk_order_id = odr.order_id;
  1179 + }
  1180 + }
  1181 + })
  1182 +
  1183 + //----------查看阶梯团------------
  1184 + if (t.data.data.ct_rylist != "null" && t.data.data.ct_rylist != "" && t.data.data.ct_rylist != null && t.data.data.ct_rylist != undefined) {
  1185 + t.data.data.ct_rylist = JSON.parse(t.data.data.ct_rylist);
  1186 + var max_num = 0;
  1187 + t.data.data.ct_rylist.forEach(function (val, ind) {
  1188 + if (parseInt(val.rynum) > max_num) max_num = parseInt(val.rynum);
  1189 + })
  1190 + t.data.data.max_ct_num = max_num;
  1191 + }
  1192 +
  1193 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  1194 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  1195 + ee.setData({
  1196 + prom_price: t.data.data.price,
  1197 + prom_type: 6,
  1198 + prom_id: prom_id,
  1199 + prom_buy_limit: t.data.data.buy_limit,
  1200 + prom_act: t.data.data,
  1201 + prom_end_time: prom_end_time,
  1202 + prom_start_time: prom_start_time,
  1203 + isshow: 1,
  1204 + });
  1205 +
  1206 + ee.get_sto();
  1207 +
  1208 + var newTime = now;
  1209 + var endTime2 = t.data.data.end_time;
  1210 + var endTime1 = t.data.data.start_time;
  1211 +
  1212 + if (endTime1 > newTime) {
  1213 + ee.setData({
  1214 + prom_time_text: '距拼单开始还剩:'
  1215 + })
  1216 + // ee.countDown(endTime1, 0);
  1217 + } else {
  1218 + if (endTime2 > newTime) {
  1219 + ee.setData({
  1220 + prom_time_text: '距拼单结束还剩:',
  1221 + prom_st: 1
  1222 + })
  1223 + // ee.countDown(endTime2);
  1224 + }
  1225 + }
  1226 + //-------查看有多少人在开这个团-------
  1227 + // th.get_team_group(prom_id);
  1228 + }
  1229 + });
  1230 + }
  1231 + })
  1232 + }
  1233 + },
  1234 +
  1235 +
  1236 + //--------服务卡检查是否活动,活动是否开始,或者是否结束-------
  1237 + async ser_check_prom(gid, prom_type, prom_id) {
  1238 + var ee = this, th = ee;
  1239 + var user_id = getApp().globalData.user_id;
  1240 + if (!user_id) user_id = 0;
  1241 +
  1242 + if (prom_type == 1 && prom_id == 0) {
  1243 + this.setData({
  1244 + prom_type: 0
  1245 + });
  1246 +
  1247 + //获取门店
  1248 + this.get_sto();
  1249 + // this.get_sku(o.stoid, this.data.data, gid);
  1250 + this.check_has_flash();
  1251 + this.data.is_normal = 1;
  1252 + // this.check_is_youhui(gid, 1);
  1253 + return false;
  1254 + }
  1255 +
  1256 + //---判断秒杀----
  1257 + if (prom_type == 1 && prom_id > 0) {
  1258 + //-------判断活动是否抢光---------
  1259 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  1260 + 1: 1
  1261 + }).then(res => {
  1262 + var em = res;
  1263 + if (em.data.code == 0) {
  1264 +
  1265 + if (em.data.data <= 0) {
  1266 + th.setData({
  1267 + prom_r_null: 1,
  1268 + goodsInputNum: res.data.data,
  1269 + });
  1270 +
  1271 + // th.setData({goodsInputNum: redis_num})
  1272 + };
  1273 + //拿取价格并且判断时间--
  1274 + getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {
  1275 + success: function (t) {
  1276 + let sele_g_new = t.data.data
  1277 + let sele_g = th.data.sele_g
  1278 + if (sele_g_new && sele_g_new.original_img && !sele_g.original_img) {
  1279 + sele_g.original_img=sele_g_new.original_img
  1280 + }
  1281 + th.setData({
  1282 + sele_g
  1283 + });
  1284 +
  1285 + if (t.data.code != 0) {
  1286 + ee.get_normal(gid);
  1287 + return false;
  1288 + }
  1289 + //----已经结束-----
  1290 + if (t.data.data.is_end == 1) {
  1291 + ee.get_normal(gid);
  1292 + return false;
  1293 + }
  1294 + //----已经过期-----
  1295 + var now = ut.gettimestamp();
  1296 + if (t.data.data.end_time < now) {
  1297 + ee.get_normal(gid);
  1298 + return false;
  1299 + }
  1300 + /*-- 还没有开始预热的也不显示 --*/
  1301 + if (t.data.data.show_time > now) {
  1302 + ee.get_normal(gid);
  1303 + return false;
  1304 + }
  1305 +
  1306 + var t_gd = ee.data.data;
  1307 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  1308 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  1309 +
  1310 + ee.setData({
  1311 + prom_price: t.data.data.user_price,
  1312 + prom_type: 1,
  1313 + prom_id: prom_id,
  1314 + prom_buy_limit: t.data.data.buy_limit,
  1315 + prom_act: t.data.data,
  1316 + prom_end_time: prom_end_time,
  1317 + prom_start_time: prom_start_time,
  1318 + });
  1319 +
  1320 + ee.get_sto();
  1321 + var newTime = ut.gettimestamp();
  1322 + var endTime2 = t.data.data.end_time;
  1323 + var endTime1 = t.data.data.start_time;
  1324 + if (endTime1 > newTime) {
  1325 + ee.setData({
  1326 + prom_time_text: '距秒杀开始还有',
  1327 + prom_st: 0,
  1328 + })
  1329 + // ee.countDown(endTime1, 0);
  1330 + } else {
  1331 + if (endTime2 > newTime) {
  1332 + ee.setData({
  1333 + prom_time_text: '距秒杀结束还有',
  1334 + prom_st: 1
  1335 + })
  1336 + // ee.countDown(endTime2);
  1337 + }
  1338 + }
  1339 +
  1340 + //如果是进行中的话
  1341 + if (endTime1 < newTime) {
  1342 + //-- 获取秒杀活动的多少规格 --
  1343 + ee.get_more_flash(function (list) {
  1344 + if (list && list.length > 1) {
  1345 +
  1346 + var n_item = list[0];
  1347 + var ind = list.findIndex(function (ele) {
  1348 + return ele.goods_id == ee.data.data.goods_id;
  1349 + })
  1350 + if (ind < 0) return false;
  1351 + if (ind > 0) {
  1352 + n_item = JSON.parse(JSON.stringify(list[ind]));
  1353 + list.splice(ind, 1);
  1354 + list.unshift(n_item);
  1355 + }
  1356 +
  1357 + ee.data.sele_g.viplimited = n_item.viplimited;
  1358 + ee.data.data.viplimited = n_item.viplimited;
  1359 +
  1360 + var gb = 1;
  1361 + //-- 显示多规格 --
  1362 + for (let i in list) {
  1363 + let item = list[i];
  1364 + var gg = "";
  1365 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  1366 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  1367 +
  1368 + if (item.goods_spec != "" && item.goods_color != "") {
  1369 + gg = item.goods_spec + "/" + item.goods_color;
  1370 + } else if (item.goods_spec != "" || item.goods_color != "") {
  1371 + gg = item.goods_spec + item.goods_color;
  1372 + } else {
  1373 + gg = "规格" + gb;
  1374 + gb++;
  1375 + }
  1376 + item.gg = gg;
  1377 + item.prom_id = item.prom_id;
  1378 + item.prom_type = 1;
  1379 + }
  1380 +
  1381 + ee.setData({
  1382 + sku_g: list,
  1383 + });
  1384 +
  1385 + }
  1386 + })
  1387 + }
  1388 +
  1389 + }
  1390 + });
  1391 + }
  1392 + })
  1393 + }
  1394 +
  1395 + },
  1396 + //获取更多秒杀
  1397 + get_more_flash: async function (func) {
  1398 +
  1399 + var f_more = false;
  1400 + var user_id = getApp().globalData.user_id;
  1401 + if (!user_id) user_id = 0;
  1402 +
  1403 + var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.gid + "&user_id=" + user_id;
  1404 + //获取秒杀的多规格
  1405 + await getApp().request.promiseGet(url, {}).then(res => {
  1406 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  1407 + f_more = res.data.data;
  1408 + }
  1409 + })
  1410 + if (!f_more) {
  1411 + func(false);
  1412 + return false;
  1413 + }
  1414 + //-- 秒杀的价格要更新 --
  1415 + for (let i in f_more) {
  1416 +
  1417 + let item = f_more[i];
  1418 + f_more[i].prom_id = item.act_id;
  1419 + f_more[i].prom_type = 1;
  1420 + if (item.goods_id == this.data.sele_g.goods_id) {
  1421 + continue;
  1422 + }
  1423 + var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id;
  1424 + await getApp().request.promiseGet(url, {}).then(rs => {
  1425 + if (rs.data.code == 0) {
  1426 + f_more[i].price = rs.data.data.user_price;
  1427 +
  1428 + }
  1429 + })
  1430 + }
  1431 + func(f_more);
  1432 +
  1433 + },
  1434 + //---------拿出门店分类和门店------------
  1435 + get_sto(e, func, item) {
  1436 +
  1437 + var th = this,
  1438 + that = this;
  1439 + var is_normal = e;
  1440 +
  1441 + if (e == 1) {
  1442 + th.setData({
  1443 + is_normal: 1
  1444 + })
  1445 + } else {
  1446 + th.setData({
  1447 + is_normal: 0
  1448 + })
  1449 + }
  1450 +
  1451 + timer_get = setInterval(function () {
  1452 +
  1453 + if (th.data.is_get_local_ok == 0) return false;
  1454 + if (!th.data.fir_def_store) return false;
  1455 +
  1456 + var dd = null,
  1457 + i = getApp().request;
  1458 + if (!th.data.sele_g) return false;
  1459 +
  1460 + var g_distr_type = th.data.sele_g.distr_type;
  1461 + if ( g_distr_type && g_distr_type != 0) {
  1462 + dd = {
  1463 + store_id: o.stoid,
  1464 + distr_type: g_distr_type,
  1465 + isstop: 0,
  1466 + is_pos: 1,
  1467 + pageSize: 2000
  1468 + }
  1469 + } else {
  1470 + dd = {
  1471 + store_id: o.stoid,
  1472 + isstop: 0,
  1473 + is_pos: 1,
  1474 + pageSize: 2000
  1475 + }
  1476 + }
  1477 + //如果有距离的话
  1478 + if (th.data.lat != null) {
  1479 + dd.lat = th.data.lat;
  1480 + dd.lon = th.data.lon;
  1481 + }
  1482 +
  1483 + clearInterval(timer_get);
  1484 +
  1485 + //如果会员是有默认的门店话
  1486 + if (!th.data.def_pick_store && th.data.fir_def_store && Object.keys(th.data.fir_def_store).length > 0) {
  1487 + th.setData({
  1488 + def_pick_store: th.data.fir_def_store
  1489 + });
  1490 + }
  1491 + wx.showLoading({
  1492 + title: '加载中.',
  1493 + mask:true
  1494 + });
  1495 + //----------获取门店----------------
  1496 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  1497 + data: dd,
  1498 + }).then(res => {
  1499 + var e = res;
  1500 +
  1501 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
  1502 +
  1503 + var pickup_ids = th.data.sele_g.pickup_ids;
  1504 + //不是单独购买的时候,要清空商品pickup_ids
  1505 +
  1506 + var py = parseFloat(th.data.prom_type + '');
  1507 + if (!is_normal && py > 0 && [3, 5, 7, 10].indexOf(py) < 0) {
  1508 + pickup_ids = null;
  1509 + }
  1510 + //-- 把秒杀的指定对象带入 --
  1511 + if (item) {
  1512 + if (item.is_pickup && item.pick_up_lists) {
  1513 + pickup_ids = item.pick_up_lists
  1514 + } else {
  1515 + pickup_ids = null;
  1516 + }
  1517 +
  1518 + } else if (!is_normal && [1, 2, 6].indexOf(py) > -1 && th.data.prom_act.pick_up_lists) { //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店
  1519 + pickup_ids = th.data.prom_act.pick_up_lists
  1520 + }
  1521 +
  1522 + //-- 如果有指定门店的时候 --
  1523 + if (pickup_ids) {
  1524 +
  1525 + var ok_arr = [];
  1526 + for (let i in e.data.data.pageData) {
  1527 + let ite = e.data.data.pageData[i];
  1528 + //-- 查找一下门店有没有在 --
  1529 + var idx = pickup_ids.findIndex(function (e) {
  1530 + return e.pickup_id == ite.pickup_id;
  1531 + })
  1532 + if (idx > -1) {
  1533 + ok_arr.push(ite)
  1534 + }
  1535 + }
  1536 +
  1537 + //判断会员的默认的门店是不是匹配指定的门店
  1538 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1539 + //-- 查找一下门店有没有在 --
  1540 + var idx1 = pickup_ids.findIndex(function (e) {
  1541 + return e.pickup_id == th.data.def_pick_store.pickup_id;
  1542 + })
  1543 +
  1544 + if (idx1 < 0) {
  1545 + //如果是秒杀的指定门店,就要设置秒杀的
  1546 + if (!is_normal && [1, 2, 6].indexOf(py) > -1) {
  1547 + th.data.def_pick_store.is_no_dis_act = 1;
  1548 + } else {
  1549 + th.data.def_pick_store.is_no_dis_nor = 1;
  1550 + }
  1551 + } else {
  1552 + th.data.def_pick_store.is_no_dis_nor = 0;
  1553 + th.data.def_pick_store.is_no_dis_act = 0;
  1554 + }
  1555 +
  1556 + that.setData({
  1557 + def_pick_store: th.data.def_pick_store
  1558 + })
  1559 +
  1560 + }
  1561 + e.data.data.pageData = ok_arr; //数组重新赋值
  1562 + e.data.data.total = ok_arr.length; //数组的长度
  1563 + }
  1564 + else {
  1565 + //-- 多规格指定门店优化 --
  1566 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1567 +
  1568 + th.data.def_pick_store.is_no_dis_nor = 0;
  1569 + th.data.def_pick_store.is_no_dis_act = 0;
  1570 + that.setData({
  1571 + def_pick_store: th.data.def_pick_store
  1572 + })
  1573 + }
  1574 + }
  1575 +
  1576 + //过滤后门店数量还是要大于0
  1577 + if (e.data.data.pageData.length > 0) {
  1578 +
  1579 + var his_cate_num = 0;
  1580 + for (let i in e.data.data.pageData) {
  1581 + let item = e.data.data.pageData[i];
  1582 + if (item.category_id > 0) {
  1583 + his_cate_num = 1;
  1584 + }
  1585 + if (getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) {
  1586 + e.data.data.pageData[i].CanOutQty = 100000;
  1587 + }
  1588 + }
  1589 +
  1590 + e.his_cate_num = his_cate_num;
  1591 +
  1592 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}' &&
  1593 + getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) {
  1594 + th.setData({
  1595 + 'def_pick_store.CanOutQty': 100000
  1596 + })
  1597 + }
  1598 +
  1599 + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
  1600 + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  1601 + th.setData({
  1602 + def_pick_store: e.data.data.pageData[0],
  1603 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1604 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1605 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1606 + });
  1607 + th.data.fir_def_store = e.data.data.pageData[0];
  1608 + }
  1609 +
  1610 + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 --
  1611 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1612 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  1613 + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
  1614 + e.data.data.pageData.splice(k, 1); //删除
  1615 + break;
  1616 + }
  1617 + }
  1618 + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
  1619 + }
  1620 +
  1621 +
  1622 + th.setData({
  1623 + all_pick_list: e.data.data.pageData
  1624 + });
  1625 +
  1626 + //--获取线下库存,而且不是新的门店规则, 同时是普通购买的时候,或者同时不能是活动,秒杀,拼团,积分购--
  1627 + if (!getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2 && !th.data.is_newsales_rules
  1628 + && !th.data.sele_g.whsle_id && ([1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) == -1 || is_normal == 1)) {
  1629 + setTimeout(function () {
  1630 + th.deal_pickup_dline(e);
  1631 + }, 800)
  1632 + } else {
  1633 + setTimeout(function () {
  1634 + th.deal_pickup(e); //--普通门店排版--
  1635 + }, 800)
  1636 + }
  1637 + if (func) func();
  1638 + } else {
  1639 +
  1640 + if (func) func();
  1641 + th.setData({ sp_seleing: 0 })
  1642 + wx.hideLoading();
  1643 + }
  1644 + } else {
  1645 + if (func) func();
  1646 + th.setData({ sp_seleing: 0 })
  1647 + wx.hideLoading();
  1648 + }
  1649 + }, err => {
  1650 + ut.m_toast('网络繁忙,请稍后重试');
  1651 + if (func) func();
  1652 + th.setData({ sp_seleing: 0 })
  1653 + wx.hideLoading();
  1654 + })
  1655 + }, 200)
  1656 +
  1657 + },
  1658 +
  1659 + //------------处理门店---------------
  1660 + deal_pickup(e) {
  1661 +
  1662 + var th = this;
  1663 + if (!th.data.sele_g) {
  1664 + wx.hideLoading();
  1665 + return false
  1666 + }
  1667 +
  1668 + var g_distr_type = th.data.sele_g.distr_type;
  1669 + wx.hideLoading()
  1670 +
  1671 +
  1672 + /*--- 判断初始的用户的默认门店要不要弄进去 ---*/
  1673 + var fid = -1;
  1674 + if (th.data.fir_def_store) {
  1675 + var fid = e.data.data.pageData.findIndex((e) => {
  1676 + return e.pickup_id == th.data.fir_def_store.pickup_id;
  1677 + })
  1678 + }
  1679 + //--如果找到默认门店,同时也应该判断配送方式对不对--
  1680 + if (th.data.fir_def_store && th.data.fir_def_store.pickup_id && fid < 0 &&
  1681 + (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
  1682 + th.data.fir_def_store.CanOutQty = 0;
  1683 + //--当选择的门店是客户默认的门店的时候--
  1684 + if (th.data.def_pick_store && th.data.fir_def_store.pickup_id == th.data.def_pick_store.pickup_id) {
  1685 + th.setData({
  1686 + def_pick_store: th.data.fir_def_store
  1687 + });
  1688 + e.data.data.pageData.unshift(th.data.def_pick_store);
  1689 + } else {
  1690 + e.data.data.pageData.splice(1, 0, th.data.fir_def_store);
  1691 + }
  1692 + }
  1693 +
  1694 +
  1695 +
  1696 + //单总量超出10个的时候,同时门店有分类
  1697 + if (e.data.data.total > 10 && e.his_cate_num) {
  1698 + getApp().request.get("/api/weshop/storagecategory/page", {
  1699 + data: {
  1700 + store_id: o.stoid,
  1701 + pageSize: 1000,
  1702 + orderField: "sort",
  1703 + orderType: 'asc',
  1704 + },
  1705 + success: function (ee) {
  1706 + if (ee.data.code == 0) {
  1707 + var check_all_cate = 0;
  1708 + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) {
  1709 + for (let i in ee.data.data.pageData) {
  1710 + let item = ee.data.data.pageData[i];
  1711 + if (item.is_show == 1) {
  1712 + check_all_cate = 1;
  1713 + break
  1714 + }
  1715 + }
  1716 + }
  1717 + if (check_all_cate) {
  1718 + var sto_cate = ee.data.data.pageData;
  1719 + var sto_arr = e.data.data.pageData;
  1720 + var newarr = new Array();
  1721 + var qita = new Array();
  1722 +
  1723 + var is_del_pk = 0;
  1724 + //----要进行门店分组--------
  1725 + for (var i = 0; i < sto_arr.length; i++) {
  1726 + //找一下这个门店有没有在分类数组内
  1727 + var find2 = 0,
  1728 + find2name = "",
  1729 + sort = 0;
  1730 + is_del_pk = 0;
  1731 + for (var m = 0; m < sto_cate.length; m++) {
  1732 + if (sto_arr[i].category_id == sto_cate[m].cat_id) {
  1733 + if (sto_cate[m].is_show != 1) {
  1734 + is_del_pk = 1;
  1735 + sto_arr.splice(i, 1);
  1736 + i--;
  1737 + } else {
  1738 + find2 = sto_cate[m].cat_id;
  1739 + find2name = sto_cate[m].cat_name;
  1740 + sort = sto_cate[m].sort;
  1741 + is_del_pk = 0;
  1742 + }
  1743 + break;
  1744 + }
  1745 + }
  1746 + if (is_del_pk) continue;
  1747 +
  1748 + if (newarr.length > 0) {
  1749 + var find = 0;
  1750 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1751 + if (find2 != 0) {
  1752 + for (var ii = 0; ii < newarr.length; ii++) {
  1753 + if (sto_arr[i].category_id == newarr[ii].cat_id) {
  1754 + newarr[ii].s_arr.push(sto_arr[i]);
  1755 + find = 1;
  1756 + break;
  1757 + }
  1758 + }
  1759 + if (find == 0) {
  1760 + var arr0 = new Array();
  1761 + arr0.push(sto_arr[i]);
  1762 + var item = {
  1763 + cat_id: find2,
  1764 + name: find2name,
  1765 + sort: sort,
  1766 + s_arr: arr0
  1767 + };
  1768 + newarr.push(item);
  1769 + }
  1770 + } else {
  1771 + qita.push(sto_arr[i]);
  1772 + }
  1773 + } else {
  1774 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1775 + if (find2 != 0) {
  1776 + var arr0 = new Array();
  1777 + arr0.push(sto_arr[i]);
  1778 + var item = {
  1779 + cat_id: find2,
  1780 + name: find2name,
  1781 + sort: sort,
  1782 + s_arr: arr0
  1783 + };
  1784 + newarr.push(item);
  1785 + } else {
  1786 + qita.push(sto_arr[i]);
  1787 + }
  1788 + }
  1789 + }
  1790 +
  1791 + var def_arr = new Array();
  1792 + //-- 开始就看10个门店 --
  1793 + for (var k = 0; k < 10; k++) {
  1794 + if (k == sto_arr.length) break;
  1795 + def_arr.push(sto_arr[k]);
  1796 + }
  1797 +
  1798 + th.setData({
  1799 + def_pickpu_list: def_arr,
  1800 + pickpu_list: ee.data.data.pageData
  1801 + });
  1802 +
  1803 +
  1804 + //门店分类要排序下
  1805 + function compare(property) {
  1806 + return function (a, b) {
  1807 + var value1 = a[property];
  1808 + var value2 = b[property];
  1809 + return value1 - value2;
  1810 + }
  1811 + }
  1812 +
  1813 + if (newarr.length > 0)
  1814 + newarr.sort(compare("sort"));
  1815 +
  1816 +
  1817 + //----安排其他的分类-----
  1818 + if (qita.length > 0) {
  1819 + var item = {
  1820 + cat_id: -1,
  1821 + name: "其他",
  1822 + s_arr: qita
  1823 + };
  1824 + newarr.push(item);
  1825 + }
  1826 +
  1827 + var sd = {
  1828 + all_sto: newarr,
  1829 + is_show_sto_cat: 1
  1830 + }
  1831 + if (!sto_arr || sto_arr.length <= 10) {
  1832 + sd.is_show_sto_cat = -1;
  1833 + sd.only_pk = sto_arr;
  1834 + }
  1835 + th.setData(sd);
  1836 +
  1837 + } else {
  1838 + th.setData({
  1839 + is_show_sto_cat: -1,
  1840 + only_pk: e.data.data.pageData
  1841 + });
  1842 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  1843 + if (!th.data.def_pick_store) {
  1844 + th.setData({
  1845 + def_pick_store: e.data.data.pageData[0],
  1846 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1847 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1848 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1849 + })
  1850 + }
  1851 + }
  1852 + } else {
  1853 + th.setData({
  1854 + is_show_sto_cat: -1,
  1855 + only_pk: e.data.data.pageData
  1856 + });
  1857 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  1858 + if (!th.data.def_pick_store) {
  1859 + th.setData({
  1860 + def_pick_store: e.data.data.pageData[0],
  1861 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1862 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1863 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1864 + })
  1865 + }
  1866 +
  1867 + }
  1868 + }
  1869 + });
  1870 + } else {
  1871 +
  1872 + th.setData({
  1873 + is_show_sto_cat: 0,
  1874 + only_pk: e.data.data.pageData
  1875 + });
  1876 + //-----如果没有默认门店,要取第一个门店作为默认店------
  1877 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  1878 + th.setData({
  1879 + def_pick_store: e.data.data.pageData[0],
  1880 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1881 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1882 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1883 + })
  1884 + }
  1885 + }
  1886 + },
  1887 +
  1888 + //------------处理线下门店库存--------
  1889 + deal_pickup_dline(e) {
  1890 + var pkno = [],
  1891 + th = this;
  1892 + if (!th.data.sele_g) {
  1893 + wx.hideLoading();
  1894 + return false;
  1895 + }
  1896 +
  1897 + if (this.data.def_pick_store) {
  1898 + pkno.push(this.data.def_pick_store.pickup_no);
  1899 + }
  1900 + for (var i in e.data.data.pageData) {
  1901 + var item = e.data.data.pageData[i];
  1902 + if (pkno.indexOf(item.pickup_no) < 0)
  1903 + pkno.push(item.pickup_no);
  1904 + }
  1905 + pkno.sort();
  1906 + var pkno_str = pkno.join(",");
  1907 + var o_plist = e.data.data.pageData;
  1908 + var new_list = [];
  1909 + var is_find_def_store = 0;
  1910 +
  1911 +
  1912 + var g_distr_type = th.data.sele_g.distr_type;
  1913 + var lock = [];
  1914 +
  1915 + var lock_rq = {
  1916 + store_id: os.stoid,
  1917 + wareId: th.data.sele_g.goods_id,
  1918 + pageSize: 1000
  1919 + };
  1920 +
  1921 + if (th.data.sales_rules == 3) {
  1922 + lock_rq.appoint_pick_keyid = th.data.appoint_pick_keyid;
  1923 + }
  1924 +
  1925 + //先读取门店的lock,采用链式写法,少用await
  1926 + getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
  1927 + data: lock_rq
  1928 + }).then(res => {
  1929 + if (res.data.code == 0 && res.data.data.total > 0) {
  1930 + lock = res.data.data.pageData
  1931 + }
  1932 + var sto_rq = {
  1933 + wareIds: encodeURIComponent(th.data.sele_g.erpwareid),
  1934 + storeId: os.stoid,
  1935 + pageSize: 2000
  1936 + }
  1937 +
  1938 + if (th.data.sales_rules == 3) {
  1939 + sto_rq.storageIds = th.data.appoint_pick_keyid;
  1940 + } else {
  1941 + sto_rq.storageNos = pkno_str;
  1942 + }
  1943 +
  1944 +
  1945 + //---通过接口获取门店的线下库存信息--
  1946 + return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
  1947 + data: sto_rq
  1948 + })
  1949 + }).then(res => {
  1950 +
  1951 + wx.hideLoading();
  1952 + if (res.data.code == 0) {
  1953 +
  1954 + if (res.data.data.pageData && res.data.data.pageData.length > 0) {
  1955 +
  1956 + var def_pick_store = th.data.def_pick_store;
  1957 + var plist = res.data.data.pageData;
  1958 +
  1959 + if (th.data.sales_rules == 3) {
  1960 + var lock_num = 0;
  1961 + var Qty = 0;
  1962 + //-- 计算锁住的库存 --
  1963 + for (var i in lock) lock_num += lock[i].outQty;
  1964 + Qty = plist[0].CanOutQty - lock_num;
  1965 +
  1966 + if (Qty > 0) {
  1967 + for (var kk in o_plist) {
  1968 + o_plist[kk].CanOutQty = Qty;
  1969 + new_list.push(o_plist[kk]);
  1970 + }
  1971 + if (th.data.fir_def_store &&
  1972 + (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || (th.data.def_pick_store && th.data.def_pick_store.distr_type == g_distr_type))) {
  1973 + th.data.fir_def_store.Qty = Qty;
  1974 + if (def_pick_store && def_pick_store.pickup_id == th.data.fir_def_store.pickup_id)
  1975 + th.setData({
  1976 + def_pick_store: th.data.fir_def_store
  1977 + })
  1978 + is_find_def_store = 1;
  1979 + }
  1980 +
  1981 + if (def_pick_store) {
  1982 + //-- 如果库存为0就要重新赋值 --
  1983 + def_pick_store.CanOutQty = Qty;
  1984 + th.setData({
  1985 + def_pick_store
  1986 + })
  1987 + }
  1988 +
  1989 +
  1990 + } else {
  1991 + th.setData({
  1992 + all_sto: null,
  1993 + only_pk: null,
  1994 + def_pickpu_list: null
  1995 + });
  1996 + return false;
  1997 + }
  1998 +
  1999 + } else {
  2000 +
  2001 +
  2002 + //以原来的数组为外循环,保证距离的顺序
  2003 + for (var kk in o_plist) {
  2004 + for (var ii in plist) {
  2005 + //线下的门店小心
  2006 + var n_item = plist[ii];
  2007 + if (n_item.StorageNo == o_plist[kk].pickup_no) {
  2008 +
  2009 + //拿到锁库的数量
  2010 + var lock_num = th.find_lock_num(o_plist[kk].pickup_id, lock);
  2011 + //可出库数大于预出库库存的数量,可以判断为有库存
  2012 + if (n_item.CanOutQty > lock_num) {
  2013 + o_plist[kk].CanOutQty = n_item.CanOutQty - lock_num;
  2014 + new_list.push(o_plist[kk]);
  2015 +
  2016 + var ck_store = th.data.fir_def_store;
  2017 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  2018 + ck_store = th.data.def_pick_store;
  2019 + }
  2020 +
  2021 +
  2022 + //--如果找到默认门店,同时也应该判断配送方式对不对--
  2023 + if (th.data.fir_def_store && n_item.StorageNo == th.data.fir_def_store.pickup_no && (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
  2024 + th.data.fir_def_store.CanOutQty = n_item.CanOutQty - lock_num;
  2025 + if (def_pick_store && def_pick_store.pickup_id == th.data.fir_def_store.pickup_id)
  2026 + th.setData({
  2027 + def_pick_store: th.data.fir_def_store
  2028 + })
  2029 + is_find_def_store = 1;
  2030 + }
  2031 +
  2032 + //-- 如果库存为0就要重新赋值 --
  2033 + if (def_pick_store && n_item.StorageNo == def_pick_store.pickup_no) {
  2034 + def_pick_store.CanOutQty = o_plist[kk].CanOutQty;
  2035 + th.setData({ def_pick_store })
  2036 + }
  2037 +
  2038 + }
  2039 + break;
  2040 + }
  2041 + }
  2042 + }
  2043 +
  2044 + }
  2045 +
  2046 +
  2047 +
  2048 + //数据组装下
  2049 + var em = {};
  2050 + em.data = {};
  2051 + em.data.data = {};
  2052 + em.data.data.total = new_list.length;
  2053 + em.data.data.pageData = new_list;
  2054 + em.his_cate_num = e.his_cate_num;
  2055 +
  2056 +
  2057 + var fid = -1;
  2058 + if (th.data.fir_def_store) {
  2059 + var fid = em.data.data.pageData.findIndex((e) => {
  2060 + return e.pickup_id == th.data.fir_def_store.pickup_id;
  2061 + })
  2062 + }
  2063 + //--如果找到默认门店,同时也应该判断配送方式对不对--
  2064 + if (th.data.fir_def_store && th.data.fir_def_store.pickup_id && fid < 0 &&
  2065 + (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
  2066 + th.data.fir_def_store.CanOutQty = 0;
  2067 + //--当选择的门店是客户默认的门店的时候--
  2068 + if (th.data.def_pick_store && th.data.fir_def_store.pickup_id == th.data.def_pick_store.pickup_id) {
  2069 + th.setData({
  2070 + def_pick_store: th.data.fir_def_store
  2071 + });
  2072 + em.data.data.pageData.unshift(th.data.def_pick_store);
  2073 + } else {
  2074 + em.data.data.pageData.splice(1, 0, th.data.fir_def_store);
  2075 + }
  2076 + }
  2077 +
  2078 + for (let j = 0; j < em.data.data.pageData.length; j++) {
  2079 + var iu = em.data.data.pageData[j];
  2080 + if (iu.CanOutQty <= 0) iu.is_no_qyt = 1;
  2081 +
  2082 + }
  2083 +
  2084 + //---把数组组装进去---
  2085 + th.deal_pickup(em);
  2086 +
  2087 + } else {
  2088 +
  2089 + th.setData({
  2090 + all_sto: null,
  2091 + only_pk: null,
  2092 + def_pickpu_list: null
  2093 + })
  2094 + }
  2095 +
  2096 + } else {
  2097 +
  2098 + th.setData({
  2099 + all_sto: null,
  2100 + only_pk: null,
  2101 + def_pickpu_list: null
  2102 + })
  2103 + }
  2104 + })
  2105 + },
  2106 +
  2107 + //------------加入购物车--------------
  2108 + addCart: function (t) {
  2109 + //如果是切换规格的时候,让商品不能提交到确认订单的页面,否则活动会出错,金额也不对
  2110 + if (this.data.sp_seleing) {
  2111 + return false;
  2112 + }
  2113 +
  2114 + var th = this;
  2115 + var ind = t.currentTarget.dataset.openSpecModal_ind;
  2116 + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
  2117 + th.setData({
  2118 + open_ind_store: ind
  2119 + });
  2120 +
  2121 +
  2122 + if ("add" == t.currentTarget.dataset.action && getApp().is_sp_hao()) {
  2123 + wx.showToast({
  2124 + title: "视频号商品不允许加入购物车",
  2125 + icon: 'none',
  2126 + duration: 2000
  2127 + });
  2128 + return false;
  2129 + }
  2130 +
  2131 + if (th.data.adding) return false;
  2132 + th.data.adding = 1;
  2133 +
  2134 + wx.showLoading({
  2135 + mask: true
  2136 + })
  2137 +
  2138 +
  2139 +
  2140 + //如果是秒杀的话,要看redis够不够
  2141 + if (this.data.prom_type == 1 || this.data.prom_type == 2) {
  2142 +
  2143 + if (this.data.openSpecModal_flash_normal) {
  2144 + this.data.is_normal = 1; //是普通购买
  2145 + th.add_cart_func(t);
  2146 + return false;
  2147 + }
  2148 +
  2149 +
  2150 + this.getactLen(function (num) {
  2151 + if (num < th.data.goodsInputNum) {
  2152 + wx.hideLoading();
  2153 + th.data.adding = 0;
  2154 + // getApp().my_warnning("活动库存不足!", 0, th);
  2155 + wx.showToast({
  2156 + title: '活动库存不足!',
  2157 + icon: 'none',
  2158 + });
  2159 + return false;
  2160 + } else {
  2161 + th.add_cart_func(t);
  2162 + }
  2163 + });
  2164 + } else {
  2165 + th.add_cart_func(t);
  2166 + }
  2167 + },
  2168 +
  2169 + //------------加入购物车--------------
  2170 + addCartSer: async function (t) {
  2171 + var th = this;
  2172 + var ind = t.currentTarget.dataset.openSpecModal_ind;
  2173 + var action = t.currentTarget.dataset.action;
  2174 +
  2175 +
  2176 +
  2177 + if (getApp().is_sp_hao() && action == 'add') {
  2178 + wx.showToast({
  2179 + title: "视频号商品不允许加入购物车",
  2180 + icon: 'none',
  2181 + duration: 2000
  2182 + });
  2183 + return false;
  2184 + }
  2185 +
  2186 +
  2187 + if (this.data.goodsInputNum == 0) {
  2188 + getApp().my_warnning('请输入购买数量', 1, th, 450);
  2189 + return false;
  2190 + }
  2191 +
  2192 +
  2193 +
  2194 + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
  2195 +
  2196 + th.setData({
  2197 + open_ind_store: ind
  2198 + });
  2199 +
  2200 + if (!th.data.sto_sele_name) {
  2201 + getApp().my_warnning('请选择门店', 1, th, 450);
  2202 + return false;
  2203 + };
  2204 +
  2205 + // 库存
  2206 + var redisNums = 0;
  2207 + // 限购数
  2208 + var limitNum = 0;
  2209 + // 已购买数量
  2210 + var boughtNum = 0;
  2211 +
  2212 + var is_ok = 1;
  2213 +
  2214 + // 秒杀活动
  2215 + if (this.data.prom_type == 1) {
  2216 + // 如果是秒杀活动下的单独购买,is_normal为1
  2217 + if (this.data.openSpecModal_flash_normal) this.data.is_normal = 1;
  2218 +
  2219 + if (!this.data.is_normal) {// 秒杀购买
  2220 +
  2221 + // 获取redis当前可以购买的数量
  2222 + // 如果数量为0,设置和显示已抢光
  2223 + // 否则,进一步判断是否超出限购或超出库存
  2224 + await this.getactLenser().then(async function (res) {
  2225 + redisNums = res;
  2226 + let curNum = th.data.goodsInputNum;
  2227 + // res: redis可购买数量
  2228 + console.log('当前可以购买的数量:', res);
  2229 + if (res <= 0) {
  2230 + // 可购买数量<=0, 设置和显示已抢光
  2231 + th.setData({
  2232 + prom_r_null: 1,
  2233 + });
  2234 + // wx.showModal({
  2235 + // title: '超出活动库存',
  2236 + // });
  2237 + getApp().my_warnning('超出活动库存', 0, self);
  2238 + is_ok = 0;
  2239 + return false;
  2240 + } else {
  2241 + // 可购买数量>0
  2242 + // 计算自己还可以购买的数量
  2243 + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b
  2244 + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存
  2245 + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
  2246 + let actInfo = th.data.sele_g;
  2247 + await th.get_buy_num2().then(function (data) {
  2248 + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a
  2249 + let promcardbuynum = data.data.data.promcardbuynum;
  2250 + let buyedNum = promcardbuynum; // 自己已经购买的数量b
  2251 + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
  2252 + limitNum = limited;
  2253 + boughtNum = buyedNum;
  2254 +
  2255 + if (canBuyNum <= 0) {
  2256 + canBuyNum = 0;
  2257 + };
  2258 +
  2259 + if (canBuyNum > res) {
  2260 + if (curNum > res) { // t当前增减的数量
  2261 + // wx.showModal({
  2262 + // title: '超出活动库存',
  2263 + // });
  2264 + getApp().my_warnning('超出活动库存', 0, self);
  2265 + th.setData({
  2266 + goodsInputNum: res || 1
  2267 + });
  2268 + is_ok = 0;
  2269 + return false;
  2270 + };
  2271 + };
  2272 +
  2273 + if (canBuyNum <= res) {
  2274 + if (curNum > canBuyNum) {
  2275 + // wx.showModal({
  2276 + // title: '超出限购数量',
  2277 + // });
  2278 + getApp().my_warnning('超出限购数量', 0, self);
  2279 + th.setData({
  2280 + goodsInputNum: canBuyNum || 1,
  2281 + });
  2282 + is_ok = 0;
  2283 + return false;
  2284 + }
  2285 + }
  2286 + })
  2287 +
  2288 + }
  2289 + })
  2290 +
  2291 + }
  2292 + }
  2293 +
  2294 +
  2295 + if (!is_ok) return false;
  2296 +
  2297 +
  2298 +
  2299 + if (action == "buy") {
  2300 + //--------------此时操作的数据------------
  2301 + var newd = {
  2302 + id: th.data.data.id,
  2303 + goods_num: th.data.goodsInputNum,
  2304 + pick_id: th.data.sto_sele_id,
  2305 + keyid: th.data.sto_sele_keyid,
  2306 + };
  2307 + newd['pick_name'] = th.data.sto_sele_name;
  2308 + newd['guide_id'] = getApp().globalData.guide_id;
  2309 + newd['guide_type'] = 0;
  2310 +
  2311 + if (getApp().globalData.groupchat_id) {
  2312 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  2313 + }
  2314 + if (this.data.prom_type && this.data.prom_type == 1) {
  2315 + newd['prom_type'] = this.data.prom_type;
  2316 + newd['prom_id'] = this.data.prom_id;
  2317 + newd['prom_price'] = this.data.prom_price;
  2318 + };
  2319 +
  2320 + if (this.data.prom_type == 1 && this.data.openSpecModal_flash_normal) {
  2321 + newd['prom_type'] = 0;
  2322 + newd['prom_price'] = this.data.data.shop_price;
  2323 + };
  2324 +
  2325 + console.log('newd++++++++', newd);
  2326 + th.buyNow(newd);
  2327 + } else {
  2328 +
  2329 + var newd = {
  2330 + service_id: th.data.data.id,
  2331 + service_sn: th.data.data.service_sn,
  2332 + service_name: th.data.data.goods_name,
  2333 + goods_num: th.data.goodsInputNum,
  2334 + pick_id: th.data.sto_sele_id,
  2335 + user_id: oo.user_id,
  2336 + store_id: os.stoid,
  2337 + money: th.data.data.shop_price,
  2338 + };
  2339 + if (getApp().globalData.guide_id) {
  2340 + newd['guide_id'] = getApp().globalData.guide_id;
  2341 + newd['guide_type'] = 0;
  2342 + };
  2343 + if (getApp().globalData.groupchat_id) {
  2344 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  2345 + }
  2346 + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价
  2347 + if (th.data.prom_type == 1) {
  2348 + newd['prom_type'] = th.data.prom_type;
  2349 + newd['prom_id'] = th.data.prom_id;
  2350 + if (th.data.openSpecModal_flash_normal) {
  2351 + newd['money'] = th.data.data.shop_price;
  2352 + newd['is_pd_normal'] = 1;
  2353 + } else {
  2354 + newd['money'] = th.data.prom_price;
  2355 + };
  2356 + };
  2357 +
  2358 +
  2359 + //----先看会员在购物车中是否加入了该商品-----
  2360 + getApp().request.get("/api/weshop/cartService/page", {
  2361 + data: {
  2362 + store_id: os.stoid,
  2363 + user_id: oo.user_id,
  2364 + service_id: th.data.data.id,
  2365 + },
  2366 + success: function (re) {
  2367 + //-------如果购物车中有相关的数据---------
  2368 + if (re.data.data.total > 0) {
  2369 + var item = null;
  2370 + // 多门店问题
  2371 + var cartGoodsNum = 0;
  2372 + const tmpObj = re.data.data.pageData;
  2373 + for (let i = 0; i < tmpObj.length; i++) {
  2374 + if (th.data.sto_sele_id != tmpObj[i].pick_id) {
  2375 + cartGoodsNum += parseInt(tmpObj[i].goods_num);
  2376 + } else {
  2377 + item = tmpObj[i];
  2378 + }
  2379 + }
  2380 + // 当前门店同类商品还没加入到购物车 但是有其他门店的同类商品
  2381 + if (th.data.prom_type == 1 && !th.data.is_normal && !item) {
  2382 +
  2383 + // 秒杀购物车购买 修正数量
  2384 + var snum = limitNum - boughtNum;
  2385 + if (snum <= 0) {
  2386 + // wx.showModal({
  2387 + // title: '超出限购数量',
  2388 + // });
  2389 + getApp().my_warnning('超出限购数量', 0, self);
  2390 + return false;
  2391 + }
  2392 +
  2393 + var cSnum = snum - cartGoodsNum <= 0 ? 0 : snum - cartGoodsNum;
  2394 + var cRedisNums = redisNums - cartGoodsNum <= 0 ? 0 : redisNums - cartGoodsNum;
  2395 +
  2396 + if (newd['goods_num'] >= redisNums) {
  2397 + if (redisNums > snum) {
  2398 + newd['goods_num'] = cSnum;
  2399 + } else {
  2400 + newd['goods_num'] = cRedisNums;
  2401 + }
  2402 + } else {
  2403 + if (newd['goods_num'] > snum) newd['goods_num'] = cSnum;
  2404 + }
  2405 +
  2406 + if (newd['goods_num'] <= 0) {
  2407 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2408 + th.closeSpecModal();
  2409 + return false;
  2410 + }
  2411 + getApp().request.post("/api/weshop/cartService/save", {
  2412 + data: newd,
  2413 + success: function (t) {
  2414 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2415 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  2416 + th.setData({
  2417 + cartGoodsNum: c_num
  2418 + });
  2419 + th.closeSpecModal();
  2420 + }
  2421 + });
  2422 + return false;
  2423 + }
  2424 +
  2425 + // 以下为当前门店同类商品已经加入到购物车
  2426 + var totalNum = th.data.goodsInputNum + item.goods_num;
  2427 +
  2428 + // 秒杀购物车购买 修正数量
  2429 + if (th.data.prom_type == 1 && !th.data.is_normal) {
  2430 + var snum = limitNum - boughtNum;
  2431 + if (snum <= 0) {
  2432 + // wx.showModal({
  2433 + // title: '超出限购数量',
  2434 + // });
  2435 + getApp().my_warnning('超出限购数量', 0, self);
  2436 + return false;
  2437 + }
  2438 + if (totalNum >= redisNums) {
  2439 + if (redisNums > snum) {
  2440 + totalNum = snum - cartGoodsNum;
  2441 + } else {
  2442 + totalNum = redisNums - cartGoodsNum;
  2443 + }
  2444 + } else {
  2445 + if (totalNum > snum)
  2446 + totalNum = snum - cartGoodsNum;
  2447 + }
  2448 + }
  2449 +
  2450 + var updata = {
  2451 + id: item.id,
  2452 + goods_num: totalNum,
  2453 + money: th.data.data.shop_price,
  2454 + store_id: os.stoid,
  2455 + };
  2456 +
  2457 + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价
  2458 + if (th.data.prom_type == 1) {
  2459 + // updata['prom_type'] = th.data.options.prom_type;
  2460 + // updata['prom_id'] = th.data.options.prom_id;
  2461 + if (th.data.openSpecModal_flash_normal) {
  2462 + updata['money'] = th.data.data.shop_price;
  2463 + updata['is_pd_normal'] = 1;
  2464 + } else {
  2465 + updata['money'] = th.data.prom_price;
  2466 + };
  2467 + };
  2468 +
  2469 + if (getApp().globalData.guide_id) {
  2470 + updata['guide_id'] = getApp().globalData.guide_id;
  2471 + updata['guide_type'] = 1;
  2472 + }
  2473 + if (getApp().globalData.groupchat_id) {
  2474 + updata['groupchat_id'] = getApp().globalData.groupchat_id;
  2475 + }
  2476 + getApp().request.put("/api/weshop/cartService/update", {
  2477 + data: updata,
  2478 + success: function (t) {
  2479 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2480 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  2481 + th.setData({
  2482 + cartGoodsNum: c_num
  2483 + });
  2484 + th.closeSpecModal();
  2485 + }
  2486 + });
  2487 + } else {
  2488 + getApp().request.post("/api/weshop/cartService/save", {
  2489 + data: newd,
  2490 + success: function (t) {
  2491 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2492 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  2493 + th.setData({
  2494 + cartGoodsNum: c_num
  2495 + });
  2496 + th.closeSpecModal();
  2497 + }
  2498 + });
  2499 + }
  2500 + }
  2501 + });
  2502 +
  2503 + };
  2504 +
  2505 +
  2506 +
  2507 +
  2508 +
  2509 +
  2510 +
  2511 + },
  2512 + get_buy_num2: async function () {
  2513 + // var map = this.data.g_buy_num,
  2514 + var th = this,
  2515 + user_id = getApp().globalData.user_id;
  2516 + // if (user_id == null) {
  2517 + // // map.set(gd.goods_id, 0);
  2518 + // th.setData({
  2519 + // // g_buy_num: map,
  2520 + // prom_buy_num: 0,
  2521 + // });
  2522 + // "function" == typeof func && func();
  2523 + // return false;
  2524 + // }
  2525 +
  2526 +
  2527 + //----获取商品购买数----
  2528 +
  2529 + //----获取活动购买数----
  2530 + return await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
  2531 + data: {
  2532 + store_id: os.stoid,
  2533 + user_id: user_id,
  2534 + card_id: th.data.gid,
  2535 + prom_type: th.data.prom_type,
  2536 + prom_id: th.data.prom_id
  2537 + },
  2538 + //-----获取-----
  2539 + success: function (tt) {
  2540 + if (tt.data.code == 0) {
  2541 + // map.set(gd.goods_id, g_buy_num);
  2542 + th.setData({
  2543 + // g_buy_num: map,
  2544 + promcardbuynum: tt.data.data.promcardbuynum,
  2545 + cardbuynum: tt.data.data.cardbuynum,
  2546 + });
  2547 + }
  2548 + }
  2549 + });
  2550 +
  2551 +
  2552 + },
  2553 +
  2554 + //-- 加入购物的函数 --
  2555 + add_cart_func: function (t) {
  2556 + var i = getApp().request;
  2557 + if (oo.user_id == null) {
  2558 + wx.hideLoading();
  2559 + th.data.adding = 0;
  2560 + return s.my_warnning("还未登录!", 0, this);
  2561 + }
  2562 +
  2563 + if (!getApp().globalData.userInfo) {
  2564 + wx.hideLoading();
  2565 + th.data.adding = 0;
  2566 + return s.my_warnning("还未登录!", 0, this);
  2567 + }
  2568 +
  2569 + var e = this,
  2570 + th = e,
  2571 + a = 0,
  2572 + o = this.data.sele_g;
  2573 + a = o.goods_id;
  2574 +
  2575 + //----------添加到购物车时,要判断限购数量,--------
  2576 + e.get_buy_num(o, function (ee) {
  2577 + //---判断商品是否超出限购---
  2578 + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) {
  2579 + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) {
  2580 + wx.hideLoading();
  2581 + th.data.adding = 0;
  2582 + wx.showToast({
  2583 + title: '超出商品限购',
  2584 + icon: 'none',
  2585 + });
  2586 + // s.my_warnning('超出商品限购', 0, th);
  2587 + return false;
  2588 + }
  2589 + }
  2590 + //---判断商品是否超出活动限购---
  2591 + if ((th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) && !th.data.is_normal) {
  2592 + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) {
  2593 + wx.hideLoading();
  2594 + th.data.adding = 0;
  2595 + wx.showToast({
  2596 + title: '超出商品活动限购',
  2597 + icon: 'none',
  2598 + });
  2599 + // s.my_warnning('超出商品活动限购', 0, th);
  2600 + return false;
  2601 + }
  2602 + }
  2603 +
  2604 + if (th.data.goodsInputNum <= 0) {
  2605 + wx.hideLoading();
  2606 + th.data.adding = 0;
  2607 + return s.my_warnning("商品数量不能为0", 0, th);
  2608 + }
  2609 + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined)
  2610 + th.setData({
  2611 + sto_sele_name: ""
  2612 + });
  2613 + if (th.data.sto_sele_name == "") {
  2614 + wx.hideLoading();
  2615 + th.data.adding = 0;
  2616 + return s.my_warnning("请选择门店", 0, th);
  2617 + }
  2618 +
  2619 + //--------------此时操作的数据------------
  2620 + var newd = {
  2621 + goods_id: o.goods_id,
  2622 + goods_num: th.data.goodsInputNum,
  2623 + pick_id: th.data.sto_sele_id,
  2624 + user_id: oo.user_id,
  2625 + store_id: th.data.stoid,
  2626 + goods_price: o.shop_price,
  2627 + member_goods_price: o.shop_price,
  2628 + goods_name: o.goods_name,
  2629 + goods_sn: o.goods_sn,
  2630 + sku: o.sku,
  2631 + prom_id: th.data.sele_g.prom_id,
  2632 + prom_type: th.data.sele_g.prom_type,
  2633 + };
  2634 +
  2635 + //-- 代发商品不参加优惠 --
  2636 + if (th.data.sele_g.whsle_id) {
  2637 + newd.prom_type = 0;
  2638 + newd.prom_id = 0;
  2639 + }
  2640 +
  2641 + //---是不是从收藏夹出来的---
  2642 + if (th.data.c_guide_id) {
  2643 + newd['guide_id'] = th.data.c_guide_id;
  2644 + newd['guide_type'] = 2;
  2645 + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3;
  2646 + } else {
  2647 + if (getApp().globalData.guide_id) {
  2648 + newd['guide_id'] = getApp().globalData.guide_id;
  2649 + newd['guide_type'] = 0;
  2650 + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1;
  2651 + }
  2652 + }
  2653 + if (getApp().globalData.groupchat_id) {
  2654 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  2655 + }
  2656 + //让商品带上房间号
  2657 + //让商品带上房间号
  2658 + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) {
  2659 + if (th.data.data.goods_id == getApp().globalData.room_goods_id) {
  2660 + newd.room_id = getApp().globalData.room_id;
  2661 + }
  2662 + } else {
  2663 + if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id;
  2664 + }
  2665 +
  2666 + //如果是积分够,is_integral_normal就要有积分购普通购买字段
  2667 + if (th.data.openSpecModal_inte_normal == 1 && th.data.prom_type == 4) {
  2668 + newd.is_integral_normal = 1;
  2669 + }
  2670 +
  2671 + //如果有线下取价
  2672 + if (o.offline_price) {
  2673 + newd.offline_price = o.offline_price;
  2674 + newd.pricing_type = o.pricing_type;
  2675 + }
  2676 +
  2677 +
  2678 + //获取到优惠测序类型
  2679 + //-----如果是秒杀,团购,积分购,拼团-----
  2680 + if (th.data.prom_type == 1 || th.data.prom_type == 2) {
  2681 +
  2682 + if (th.data.openSpecModal_flash_normal) {
  2683 +
  2684 + newd.prom_type = 0;
  2685 + newd.prom_id = 0;
  2686 + newd.is_pd_normal = 1;
  2687 + //---如果是线下门店销售的时候---
  2688 + if (th.data.sales_rules >= 2) {
  2689 + var pick = th.get_pick_from_list(th.data.sto_sele_id)
  2690 + //---通过接口获取门店的线下库存信息--
  2691 + th.check_CanOutQty(th.data.sele_g, pick, function (CanOutQty) {
  2692 + if (CanOutQty) {
  2693 + if (CanOutQty < e.data.goodsInputNum) {
  2694 + wx.hideLoading();
  2695 + th.data.adding = 0;
  2696 + wx.showToast({
  2697 + title: '库存不足!',
  2698 + icon: 'none',
  2699 + });
  2700 + return false;
  2701 + }
  2702 +
  2703 + th.add_cart_next(e, t, a, o, newd, CanOutQty);
  2704 + } else {
  2705 + wx.hideLoading();
  2706 + th.data.adding = 0;
  2707 + wx.showToast({
  2708 + title: '库存不足!',
  2709 + icon: 'none',
  2710 + });
  2711 + return false;
  2712 + }
  2713 + })
  2714 +
  2715 +
  2716 + } else {
  2717 + if (o.store_count <= 0) {
  2718 + wx.hideLoading();
  2719 + th.data.adding = 0;
  2720 + wx.showToast({
  2721 + title: '库存已为空!',
  2722 + icon: 'none'
  2723 + });
  2724 + return false;
  2725 + }
  2726 + if (o.store_count < e.data.goodsInputNum) {
  2727 + wx.hideLoading();
  2728 + th.data.adding = 0;
  2729 + wx.showToast({
  2730 + title: '库存不足!',
  2731 + icon: 'none',
  2732 + });
  2733 + return false;
  2734 + // return s.my_warnning("库存不足!", 0, th);
  2735 + }
  2736 + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2737 + };
  2738 + return false;
  2739 + }
  2740 +
  2741 + newd.goods_price = th.data.prom_price;
  2742 + newd.member_goods_price = th.data.prom_price,
  2743 + newd.prom_type = th.data.prom_type;
  2744 + newd.prom_id = th.data.prom_id;
  2745 +
  2746 + if (o.store_count <= 0) {
  2747 + wx.hideLoading();
  2748 + th.data.adding = 0;
  2749 + wx.showToast({
  2750 + title: '库存已为空!',
  2751 + icon: 'none',
  2752 + });
  2753 + return false;
  2754 + }
  2755 + if (o.store_count < e.data.goodsInputNum) {
  2756 + wx.hideLoading();
  2757 + th.data.adding = 0;
  2758 + wx.showToast({
  2759 + title: '库存不足!',
  2760 + icon: 'none',
  2761 + });
  2762 + return false;
  2763 + }
  2764 + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2765 +
  2766 + }
  2767 + // else if (o.prom_type == 7) {
  2768 + //
  2769 + // //判断进行中的活动,是不是要判断线下库存
  2770 + // th.check_zh_acting(function (ee) {
  2771 + // newd.prom_id = 0;
  2772 + // newd.prom_type = 0;
  2773 + // if (ee && th.data.sele_g.act) {
  2774 + // newd.prom_id = th.data.sele_g.act.id;
  2775 + // newd.prom_type = 7;
  2776 + // if (o.store_count <= 0) {
  2777 + // wx.hideLoading();
  2778 + // th.data.adding=0;
  2779 + // wx.showToast({
  2780 + // title: '库存已为空!',
  2781 + // icon: 'none',
  2782 + // });
  2783 + // return false;
  2784 + // };
  2785 + // if (o.store_count < e.data.goodsInputNum) {
  2786 + // wx.hideLoading();
  2787 + // th.data.adding=0;
  2788 + // wx.showToast({
  2789 + // title: '库存不足!',
  2790 + // icon: 'none',
  2791 + // });
  2792 + // return false;
  2793 + // //return s.my_warnning("库存不足!", 0, th);
  2794 + // };
  2795 + // th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2796 + // return false;
  2797 + // } else {
  2798 + // //---如果是线下门店销售的时候---
  2799 + // if (!th.data.sele_g.whsle_id && th.data.sales_rules >= 2) {
  2800 + // var pick = th.get_pick_from_list(th.data.sto_sele_id)
  2801 + //
  2802 + // th.check_CanOutQty(th.data.sele_g, pick, function (CanOutQty) {
  2803 + // if (CanOutQty) {
  2804 + //
  2805 + // if (CanOutQty < e.data.goodsInputNum) {
  2806 + // wx.hideLoading();
  2807 + // th.data.adding=0;
  2808 + // wx.showToast({
  2809 + // title: '库存不足!',
  2810 + // icon: 'none',
  2811 + // });
  2812 + // return false;
  2813 + // }
  2814 + //
  2815 + // th.add_cart_next(e, t, a, o, newd, CanOutQty);
  2816 + // } else {
  2817 + // wx.hideLoading();
  2818 + // th.data.adding=0;
  2819 + // wx.showToast({
  2820 + // title: '库存不足!',
  2821 + // icon: 'none',
  2822 + // });
  2823 + // return false;
  2824 + // }
  2825 + // })
  2826 + //
  2827 + // } else {
  2828 + // if (o.store_count <= 0) {
  2829 + // wx.hideLoading();
  2830 + // th.data.adding=0;
  2831 + // wx.showToast({
  2832 + // title: '库存已为空!',
  2833 + // icon: 'none',
  2834 + // });
  2835 + // return false;
  2836 + // //return s.my_warnning("库存已为空!", 0, th);
  2837 + // };
  2838 + // if (o.store_count < e.data.goodsInputNum) {
  2839 + // wx.hideLoading();
  2840 + // th.data.adding=0;
  2841 + // wx.showToast({
  2842 + // title: '库存不足!',
  2843 + // icon: 'none',
  2844 + // });
  2845 + // return false;
  2846 + // //return s.my_warnning("库存不足!", 0, th);
  2847 + // };
  2848 + // th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2849 + // }
  2850 + // }
  2851 + // })
  2852 + // }
  2853 + //要包含积分购的普通购买0 3,5,7,10, is_integral_normal积分普通购买字段
  2854 + else if ([0, 3, 5, 7, 10].indexOf(th.data.prom_type) > -1 || newd.is_integral_normal) {
  2855 + newd.prom_type = 0;
  2856 + newd.prom_id = 0;
  2857 +
  2858 + //---如果是线下门店销售的时候---
  2859 + if (th.data.sales_rules >= 2 && !th.data.sele_g.whsle_id) {
  2860 + var pick = th.get_pick_from_list(th.data.sto_sele_id)
  2861 + //---通过接口获取门店的线下库存信息--
  2862 + th.check_CanOutQty(th.data.sele_g, pick, function (CanOutQty) {
  2863 + if (CanOutQty) {
  2864 +
  2865 + if (CanOutQty < e.data.goodsInputNum) {
  2866 + wx.hideLoading();
  2867 + th.data.adding = 0;
  2868 + wx.showToast({
  2869 + title: '库存不足!',
  2870 + icon: 'none',
  2871 + });
  2872 + return false;
  2873 + }
  2874 +
  2875 + th.add_cart_next(e, t, a, o, newd, CanOutQty);
  2876 + } else {
  2877 + wx.hideLoading();
  2878 + wx.showToast({
  2879 + title: '库存不足!',
  2880 + icon: 'none',
  2881 + });
  2882 + return false;
  2883 + }
  2884 + })
  2885 +
  2886 + } else {
  2887 + if (o.store_count <= 0) {
  2888 + wx.hideLoading();
  2889 + wx.showToast({
  2890 + title: '库存已为空!',
  2891 + icon: 'none',
  2892 + });
  2893 + return false;
  2894 + //return s.my_warnning("库存已为空!", 0, th);
  2895 + };
  2896 + if (o.store_count < e.data.goodsInputNum) {
  2897 + wx.hideLoading();
  2898 + wx.showToast({
  2899 + title: '库存不足!',
  2900 + icon: 'none',
  2901 + });
  2902 + return false;
  2903 + //return s.my_warnning("库存不足!", 0, th);
  2904 + }
  2905 + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2906 + }
  2907 + }
  2908 +
  2909 +
  2910 +
  2911 + })
  2912 + },
  2913 +
  2914 + //---加入购物车的最后一步---
  2915 + add_cart_next(e, t, a, o, newd, CanOutQty) {
  2916 +
  2917 +
  2918 + if (getApp().globalData.groupchat_id) {
  2919 + newd.groupchat_id = getApp().globalData.groupchat_id
  2920 + }
  2921 + var th = this,
  2922 + i = getApp().request;
  2923 + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------
  2924 + if ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 && o.prom_type != 1) || th.data.is_normal) {
  2925 + var conf = th.data.bconfig;
  2926 + if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) {
  2927 + var s_list = JSON.parse(conf.switch_list);
  2928 + var now = ut.gettimestamp();
  2929 +
  2930 +
  2931 + var str = getApp().globalData.userInfo['card_expiredate'].replace(/-/g, '/');
  2932 + var end = new Date(str);
  2933 + end = Date.parse(end) / 1000;
  2934 +
  2935 +
  2936 + //--如果后台有开启等级价的功能,而且会员的等级没有过期的情况下--
  2937 + if (parseInt(s_list.rank_switch) == 2 && end > now) {
  2938 + var card_price = o[getApp().globalData.userInfo['card_field']];
  2939 + //如果会员有等级价
  2940 + if (getApp().globalData.userInfo['card_field'] != undefined && getApp().globalData.userInfo['card_field'] != null &&
  2941 + getApp().globalData.userInfo['card_field'] != "" && card_price > 0) {
  2942 + newd.goods_price = card_price;
  2943 + newd.member_goods_price = card_price;
  2944 + }
  2945 + }
  2946 + }
  2947 + }
  2948 +
  2949 + //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d);
  2950 + if ("add" == t.currentTarget.dataset.action) {
  2951 +
  2952 + if ([3, 5, 7, 10].indexOf(newd.prom_type) > -1) {
  2953 + newd.prom_type = 0;
  2954 + newd.prom_id = 0;
  2955 + }
  2956 +
  2957 + wxlog.info(getApp().globalData.user_id + '-加入购物车:' + JSON.stringify(newd));
  2958 + //
  2959 + // //如果有搭配购的时候的时候
  2960 + // if(th.data.collocationGoods && newd.prom_type==0){
  2961 + // newd.prom_type = 5;
  2962 + // newd.prom_id = th.data.collocationGoods.id;
  2963 + // }
  2964 + //
  2965 + // //如果有搭配购的时候的时候
  2966 + // 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){
  2967 + // newd.prom_type = 7;
  2968 + // newd.prom_id = th.data.zh_act.id;
  2969 + // }
  2970 +
  2971 + //----先看会员在购物车中是否加入了该商品-----
  2972 + i.get("/api/weshop/cart/page", {
  2973 + data: {
  2974 + store_id: e.data.stoid,
  2975 + user_id: oo.user_id,
  2976 + goods_id: a,
  2977 + pick_id: e.data.sto_sele_id,
  2978 + prom_type: newd.prom_type,
  2979 + prom_id: newd.prom_id,
  2980 + state: 0,
  2981 + },
  2982 + success: function (re) {
  2983 +
  2984 + //-- 判断活动是不是一样 --
  2985 + var item = null;
  2986 + //-------如果购物车中有相关的数据---------
  2987 + if (re.data.data.total > 0) {
  2988 + for (var j = 0; j < re.data.data.pageData.length; j++) {
  2989 + if (!th.check_is_like(re.data.data.pageData[j], newd, 1)) continue;
  2990 + item = re.data.data.pageData[j];
  2991 + break;
  2992 + }
  2993 +
  2994 + if (!item) {
  2995 + for (var j = 0; j < re.data.data.pageData.length; j++) {
  2996 + if (!th.check_is_like(re.data.data.pageData[j], newd)) continue;
  2997 + item = re.data.data.pageData[j];
  2998 + break;
  2999 + }
  3000 + }
  3001 +
  3002 + }
  3003 +
  3004 + if (item) {
  3005 + item = re.data.data.pageData[0];
  3006 + //判断数量,要看下购物车中有没有该商品
  3007 + if (CanOutQty) {
  3008 + if (item.goods_num + th.data.goodsInputNum > CanOutQty) {
  3009 + wx.hideLoading();
  3010 + th.data.adding = 0;
  3011 + wx.showToast({
  3012 + title: '库存不足!',
  3013 + icon: 'none',
  3014 + });
  3015 + return false;
  3016 + // return s.my_warnning("库存不足!", 0, th);
  3017 + }
  3018 + } else {
  3019 + if (item.goods_num + th.data.goodsInputNum > o.store_count) {
  3020 + wx.hideLoading();
  3021 + th.data.adding = 0;
  3022 + wx.showToast({
  3023 + title: '库存不足!',
  3024 + icon: 'none',
  3025 + });
  3026 + return false;
  3027 + //return s.my_warnning("库存不足!", 0, th);
  3028 + }
  3029 +
  3030 + //秒杀有限购的时候,同时不是普通购买
  3031 + if (item.goods_num + th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit && th.data.prom_buy_limit > 0 && !newd.is_pd_normal && (th.data.prom_type == 1 || th.data.prom_type == 2)) {
  3032 + wx.hideLoading();
  3033 + th.data.adding = 0;
  3034 + wx.showToast({
  3035 + title: '此商品已在购物车,去购物车结算!',
  3036 + icon: 'none',
  3037 + });
  3038 + return false;
  3039 + //return s.my_warnning("库存不足!", 0, th);
  3040 + }
  3041 + }
  3042 +
  3043 + var updata = {
  3044 + id: item.id,
  3045 + goods_num: e.data.goodsInputNum + item.goods_num,
  3046 + goods_price: newd.goods_price,
  3047 + member_goods_price: newd.goods_price,
  3048 + store_id: th.data.stoid,
  3049 + prom_id: newd.prom_id, //把活动id带上去(用于购物车失效变成有效商品)
  3050 + prom_type: newd.prom_type
  3051 + };
  3052 +
  3053 + if (newd.is_pd_normal) {
  3054 + updata.is_pd_normal = 1
  3055 + }
  3056 +
  3057 + //---是不是从收藏夹出来的---
  3058 + if (th.data.c_guide_id) {
  3059 + updata['guide_id'] = th.data.c_guide_id;
  3060 + updata['guide_type'] = 3; //加入购物车之后就变成了3
  3061 + } else {
  3062 + if (getApp().globalData.guide_id) {
  3063 + updata['guide_id'] = getApp().globalData.guide_id;
  3064 + updata['guide_type'] = 0;
  3065 + }
  3066 + }
  3067 + if (getApp().globalData.groupchat_id) {
  3068 + updata['groupchat_id'] = getApp().globalData.groupchat_id;
  3069 + }
  3070 +
  3071 + getApp().request.put("/api/weshop/cart/update", {
  3072 + data: updata,
  3073 + success: function (t) {
  3074 + wx.hideLoading();
  3075 + th.data.adding = 0;
  3076 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  3077 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  3078 + th.setData({
  3079 + cartGoodsNum: c_num
  3080 + });
  3081 + th.closeSpecModal();
  3082 + }
  3083 + });
  3084 + } else {
  3085 + getApp().request.post("/api/weshop/cart/save", {
  3086 + data: newd,
  3087 + success: function (t) {
  3088 + wx.hideLoading();
  3089 + th.data.adding = 0;
  3090 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  3091 + var c_num = th.data.cartGoodsNum + e.data.goodsInputNum;
  3092 + th.setData({
  3093 + cartGoodsNum: c_num
  3094 + });
  3095 + th.closeSpecModal();
  3096 + }
  3097 + });
  3098 + }
  3099 + }
  3100 + });
  3101 +
  3102 + } else {
  3103 +
  3104 + newd['pick_name'] = th.data.sto_sele_name;
  3105 + newd['pick_dis'] = th.data.sto_sele_distr;
  3106 + th.buyNow(newd);
  3107 +
  3108 + }
  3109 + },
  3110 +
  3111 + //-------------获取购买数量的总函数----------------
  3112 + get_buy_num: function (gd, func) {
  3113 + var map = this.data.g_buy_num,
  3114 + th = this,
  3115 + user_id = getApp().globalData.user_id;
  3116 + if (user_id == null) {
  3117 + map.set(gd.goods_id, 0);
  3118 + th.setData({
  3119 + g_buy_num: map,
  3120 + prom_buy_num: 0,
  3121 + });
  3122 + "function" == typeof func && func();
  3123 + return false;
  3124 + }
  3125 +
  3126 + if (map.has(gd.goods_id)) {
  3127 + "function" == typeof func && func();
  3128 + } else {
  3129 + //----获取商品购买数----
  3130 + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  3131 + data: {
  3132 + store_id: os.stoid,
  3133 + user_id: user_id,
  3134 + goods_id: gd.goods_id, isnew: 1
  3135 + },
  3136 + success: function (t) {
  3137 + if (t.data.code == 0) {
  3138 + var g_buy_num = t.data.data.goodsbuynum;
  3139 +
  3140 + //如果是秒杀的时候
  3141 + if (th.data.prom_type == 0 && gd.prom_type == 1) {
  3142 + gd.prom_type = 0;
  3143 + }
  3144 + //如果全场优惠,商品做了秒杀
  3145 + if (th.data.prom_type == 3 && gd.prom_type == 1) {
  3146 + gd.prom_type = 0;
  3147 + }
  3148 + //如果全场阶梯优惠,商品做了秒杀
  3149 + if (th.data.prom_type == 10 && gd.prom_type == 1) {
  3150 + gd.prom_type = 0;
  3151 + }
  3152 +
  3153 +
  3154 + if (!th.data.is_normal && (gd.prom_type == 1 || gd.prom_type == 2 || gd.prom_type == 4 || gd.prom_type == 6)) {
  3155 + //----获取活动购买数----
  3156 + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  3157 + data: {
  3158 + store_id: os.stoid,
  3159 + user_id: user_id,
  3160 + goods_id: gd.goods_id,
  3161 + prom_type: gd.prom_type,
  3162 + prom_id: gd.prom_id, isnew: 1
  3163 + },
  3164 + //-----获取-----
  3165 + success: function (tt) {
  3166 + if (tt.data.code == 0) {
  3167 + map.set(gd.goods_id, g_buy_num);
  3168 + th.setData({
  3169 + g_buy_num: map,
  3170 + prom_buy_num: tt.data.data.promgoodsbuynum,
  3171 + });
  3172 + "function" == typeof func && func();
  3173 + }
  3174 + }
  3175 + });
  3176 + } else {
  3177 + map.set(gd.goods_id, g_buy_num);
  3178 + th.setData({
  3179 + g_buy_num: map
  3180 + });
  3181 + "function" == typeof func && func();
  3182 + }
  3183 + }
  3184 + }
  3185 + });
  3186 + }
  3187 + },
  3188 + //--- 获取卡类列表 ---
  3189 + getPlusCardType: function (func) {
  3190 + var storid = os.stoid;
  3191 + var th = this;
  3192 + var user = getApp().globalData.userInfo;
  3193 + if (!user) return false;
  3194 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  3195 + var plusCard = res.data.data;
  3196 + var arr = [1219, 2089, 3031];
  3197 + var new_arr = new Array();
  3198 + var card_name_map = new Map();
  3199 +
  3200 + var list = [];
  3201 + for (var i = 0; i < plusCard.length; i++) {
  3202 + if ((!user || user.card_field == null || user.card_field == "") && plusCard[i].IsStopBuy == true) continue;
  3203 + var name = "card" + plusCard[i].CorrPrice.toLowerCase();
  3204 + card_name_map.set(name, plusCard[i].CardName);
  3205 + list.push(plusCard[i]);
  3206 + }
  3207 +
  3208 + var ob = {
  3209 + "card_list": list,
  3210 + "name_map": card_name_map
  3211 + };
  3212 + func(ob);
  3213 + })
  3214 + },
  3215 +
  3216 +
  3217 + //----------增加购买数量-----------
  3218 + addCartNum: function (t) {
  3219 + var add_num = 1;
  3220 + var p_type = parseInt(this.data.prom_type)
  3221 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || this.data.openSpecModal_inte_normal == 1 || this.data.is_normal == 1) {
  3222 + add_num = getApp().get_limit_qty(this.data.sele_g, this.data.is_act, 1);
  3223 + }
  3224 +
  3225 + this.checkCartNum(this.data.goodsInputNum + add_num);
  3226 + },
  3227 + //------检查数量是不是超出限购------
  3228 + checkCartNum: function (t) {
  3229 + var th = this;
  3230 +
  3231 + var mo_num = getApp().get_limit_qty(th.data.sele_g, th.data.is_act);
  3232 + var steep = getApp().get_limit_qty(th.data.sele_g, th.data.is_act, 1);
  3233 + this.get_buy_num(this.data.sele_g, async function () {
  3234 +
  3235 + var is_show_bs = 0;
  3236 + var l_num = -1;
  3237 +
  3238 + //--判断商品是否超出限购--
  3239 + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) {
  3240 +
  3241 + var gd_buy_num = th.data.g_buy_num.get(th.data.sele_g.goods_id);
  3242 +
  3243 + if (t + gd_buy_num > th.data.sele_g.viplimited) {
  3244 + wx.showToast({
  3245 + title: '超出商品限购',
  3246 + icon: 'none',
  3247 + });
  3248 +
  3249 + is_show_bs = 1;
  3250 +
  3251 + // s.my_warnning('超出商品限购', 0, th);
  3252 + l_num = th.data.sele_g.viplimited - gd_buy_num;
  3253 + if (l_num < 0) l_num = 0;
  3254 + // th.setData({
  3255 + // goodsInputNum: num
  3256 + // })
  3257 + // return false;
  3258 + }
  3259 + }
  3260 +
  3261 + //如果是普通购买的情况下
  3262 + if (th.data.openSpecModal_flash_normal) th.data.is_normal = 1;
  3263 +
  3264 + //--判断商品是否超出活动限购--
  3265 + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && !th.data.is_normal) {
  3266 + if (t + th.data.prom_buy_num > th.data.prom_buy_limit) {
  3267 + wx.showToast({
  3268 + title: '超出商品活动限购',
  3269 + icon: 'none',
  3270 + });
  3271 + // s.my_warnning('超出商品活动限购', 0, th);
  3272 + var num = th.data.prom_buy_limit - th.data.prom_buy_num;
  3273 + if (num < 0) num = 0;
  3274 + th.setData({
  3275 + goodsInputNum: num
  3276 + })
  3277 + return false;
  3278 + }
  3279 + }
  3280 +
  3281 + if ((th.data.sele_g.prom_type == 1 || th.data.sele_g.prom_type == 2 || th.data.sele_g.prom_type == 6) && !th.data.is_normal) {
  3282 + var redis_num = 0;
  3283 + //------判断活动是否抢光-----
  3284 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
  3285 + os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, {
  3286 + 1: 1
  3287 + }).then(res => {
  3288 + redis_num = res.data.data;
  3289 + });
  3290 +
  3291 + if (t > redis_num) {
  3292 + wx.showToast({
  3293 + title: '超出商品活动库存',
  3294 + icon: 'none',
  3295 + });
  3296 + // s.my_warnning('超出商品活动库存', 0, th);
  3297 + th.setData({
  3298 + goodsInputNum: redis_num
  3299 + })
  3300 + return false;
  3301 + }
  3302 + }
  3303 + var e = th.data.sele_g.store_count;
  3304 + var p_type = parseInt(th.data.prom_type + ''); //&& p_type!=1 && p_type!=4
  3305 + if (!th.data.sele_g.whsle_id && th.data.sales_rules >= 2 &&
  3306 + ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) {
  3307 +
  3308 + //-- 如果是虚拟商品,默认给最大值 --
  3309 + if (getApp().is_virtual(th.data.sele_g)) {
  3310 + e = 100000;
  3311 + } else {
  3312 + if (!th.data.def_pick_store) {
  3313 + wx.showToast({
  3314 + title: '请选择门店',
  3315 + icon: 'none',
  3316 + });
  3317 + // wx.showModal({title: '请选择门店',});
  3318 + return false;
  3319 + } else {
  3320 + e = th.data.def_pick_store.CanOutQty;
  3321 + }
  3322 + }
  3323 + }
  3324 +
  3325 + //-- 限购数量也要进行计算一下 --
  3326 + if (l_num > -1) {
  3327 + if (e > l_num) e = l_num;
  3328 + }
  3329 +
  3330 + //--- 促销活动也不控制起订量, 这里很重要的一个控制,起订量的 ----
  3331 + if ([0, 3, 5, 7, 10].indexOf(p_type) > -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1) {
  3332 + if (t < mo_num) {
  3333 + t = mo_num;
  3334 + if (!is_show_bs) {
  3335 + wx.showToast({
  3336 + title: '购买数未达到起订量',
  3337 + icon: 'none',
  3338 + });
  3339 + }
  3340 + is_show_bs = 1;
  3341 + }
  3342 + if (t > mo_num && (t - mo_num) % steep != 0) {
  3343 +
  3344 + if (!is_show_bs) {
  3345 + wx.showToast({
  3346 + title: '购买数必须是起订量的倍数',
  3347 + icon: 'none',
  3348 + });
  3349 + }
  3350 +
  3351 + t = mo_num + parseInt((t - mo_num) / steep) * steep + steep;
  3352 + is_show_bs = 1;
  3353 + }
  3354 + }
  3355 +
  3356 + if (!e) e = 0;
  3357 + //库存不足,不增加
  3358 + if (e < t) {
  3359 + if (!is_show_bs) {
  3360 + wx.showToast({
  3361 + title: '库存不足',
  3362 + icon: 'none',
  3363 + });
  3364 + }
  3365 +
  3366 + // wx.showModal({title: '库存不足',});
  3367 + if (e < 0) e = 0;
  3368 +
  3369 + //只有普通商品才有起购数
  3370 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1) {
  3371 + if (e < mo_num) e = mo_num;
  3372 + if (e > mo_num && (e - mo_num) % steep != 0) {
  3373 + e = mo_num + parseInt((e - mo_num) / steep) * steep;
  3374 + }
  3375 + }
  3376 + th.setData({
  3377 + goodsInputNum: e
  3378 + });
  3379 + return false;
  3380 + }
  3381 +
  3382 + //var steep=getApp().get_limit_qty(th.data.sele_g,0,1);
  3383 + t > e || 0 == e ? t = e : t < 1 && (t = 1);
  3384 +
  3385 +
  3386 + //只有普通商品才有起购数
  3387 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1) {
  3388 + if (t < mo_num) t = mo_num;
  3389 + }
  3390 +
  3391 +
  3392 + th.setData({
  3393 + goodsInputNum: t
  3394 + });
  3395 + th.is_show_more_buy();
  3396 +
  3397 + })
  3398 + },
  3399 + is_show_more_buy: async function () {
  3400 + var prom_goods = this.data.prom_goods;
  3401 + if (!prom_goods) return false;
  3402 + //如果系统默认的顺序不是以优惠促销为默认第一位的时候
  3403 + if (this.check_prom_custom(1) !== 3) {
  3404 + return false;
  3405 + }
  3406 +
  3407 + if (!this.data.sele_g) return false;
  3408 +
  3409 + var per_price = this.data.sele_g.shop_price
  3410 + if (this.data.card_field && this.data.sele_g[this.data.card_field] > 0) {
  3411 + per_price = this.data.sele_g[this.data.card_field];
  3412 + }
  3413 +
  3414 + var all_price = per_price * this.data.goodsInputNum;
  3415 + var con = null;
  3416 + for (var i in prom_goods) {
  3417 + var item = prom_goods[i];
  3418 + if (item.prom_type == 1) {
  3419 + if (item.condition > this.data.goodsInputNum) {
  3420 + con = item;
  3421 + con.need = (item.condition - this.data.goodsInputNum).toFixed(2) + "件";
  3422 + break;
  3423 + }
  3424 + } else {
  3425 + if (parseFloat(item.condition) > parseFloat(parseFloat(all_price).toFixed(2))) {
  3426 + con = item;
  3427 + con.need = (item.condition - all_price).toFixed(2) + "元";
  3428 + break;
  3429 + }
  3430 + }
  3431 + }
  3432 + //获取用户参与优惠促销的次数
  3433 + //if(con && con.prom_id){
  3434 + //await this.getUserBuyPromNum_pre(con.prom_id);
  3435 + //}
  3436 + this.setData({
  3437 + hui_condition: con
  3438 + });
  3439 +
  3440 + },
  3441 +
  3442 + //----------减少购买数量-----------
  3443 + subCartNum: function (t) {
  3444 + var add_num = 1;
  3445 + var p_type = parseInt(this.data.prom_type)
  3446 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || this.data.openSpecModal_inte_normal == 1 || this.data.is_normal == 1) {
  3447 + add_num = getApp().get_limit_qty(this.data.sele_g, this.data.is_act, 1);
  3448 + var mo_num = getApp().get_limit_qty(this.data.sele_g, this.data.is_act);
  3449 + if (this.data.goodsInputNum - add_num < mo_num) {
  3450 + wx.showToast({
  3451 + title: '购买数量不能小于起订量',
  3452 + icon: 'none',
  3453 + });
  3454 + return false;
  3455 + }
  3456 + }
  3457 + this.checkCartNum(this.data.goodsInputNum - add_num);
  3458 + },
  3459 + //----------输入框输入购买数量-----------
  3460 + inputCartNum: function (t) {
  3461 + this.checkCartNum(Number(t.detail.value));
  3462 + },
  3463 + //统一一下获取线下库存的函数
  3464 + async check_CanOutQty(goodsinfo, item, func) {
  3465 +
  3466 + var sales_rules = this.data.sales_rules;
  3467 + //如果默认是商品
  3468 + if (getApp().is_virtual(goodsinfo)) {
  3469 + return func(100000);
  3470 + }
  3471 +
  3472 + var lock_rq = {
  3473 + store_id: os.stoid,
  3474 + wareId: goodsinfo.goods_id,
  3475 + pageSize: 1000
  3476 + };
  3477 +
  3478 + if (sales_rules == 2) {
  3479 + lock_rq.storageId = item.pickup_id
  3480 + } else {
  3481 + lock_rq.appoint_pick_keyid = encodeURIComponent(this.data.appoint_pick_keyid)
  3482 + }
  3483 +
  3484 + var lock = 0;
  3485 + var CanOutQty = 0;
  3486 + var plist = null;
  3487 + //先读取门店的lock
  3488 + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
  3489 + data: lock_rq
  3490 + }).then(res => {
  3491 + if (res.data.code == 0 && res.data.data.total > 0) {
  3492 + for (var i in res.data.data.pageData)
  3493 + lock += res.data.data.pageData[i].outQty;
  3494 + }
  3495 + })
  3496 +
  3497 + var sto_req = {
  3498 + wareIds: encodeURIComponent(goodsinfo.erpwareid),
  3499 + storeId: os.stoid
  3500 + }
  3501 + if (sales_rules == 2) {
  3502 + sto_req.storageNos = item.pickup_no
  3503 + } else {
  3504 + sto_req.storageIds = encodeURIComponent(this.data.appoint_pick_keyid)
  3505 + }
  3506 +
  3507 +
  3508 +
  3509 + //读取线下的门店库存
  3510 + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
  3511 + data: sto_req
  3512 + }).then(res => {
  3513 + if (res.data.code == 0 && res.data.data.total > 0) {
  3514 + plist = res.data.data.pageData[0];
  3515 + }
  3516 + })
  3517 +
  3518 + if (plist && plist.CanOutQty - lock > 0) {
  3519 + CanOutQty = plist.CanOutQty - lock;
  3520 + }
  3521 +
  3522 + if (func) func(CanOutQty);
  3523 +
  3524 + },
  3525 + //获取更多秒杀
  3526 + get_more_flahs: async function (func) {
  3527 + var f_more = false;
  3528 + var user_id = getApp().globalData.user_id;
  3529 + if (!user_id) user_id = 0;
  3530 +
  3531 + var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.data.goods_id + "&user_id=" + user_id;
  3532 + //获取秒杀的多规格
  3533 + await getApp().request.promiseGet(url, {}).then(res => {
  3534 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  3535 + f_more = res.data.data;
  3536 + }
  3537 + })
  3538 + if (!f_more) {
  3539 + func(false);
  3540 + return false;
  3541 + }
  3542 + //-- 秒杀的价格要更新 --
  3543 + for (let i in f_more) {
  3544 +
  3545 + let item = f_more[i];
  3546 + f_more[i].prom_id = item.act_id;
  3547 + f_more[i].prom_type = 1;
  3548 +
  3549 + var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id;
  3550 + await getApp().request.promiseGet(url, {}).then(rs => {
  3551 + if (rs.data.code == 0 && rs.data.data) {
  3552 + f_more[i].price = rs.data.data.user_price;
  3553 + f_more[i].is_pickup = rs.data.data.is_pickup;
  3554 + f_more[i].pick_up_lists = rs.data.data.pick_up_lists;
  3555 + }
  3556 + })
  3557 + }
  3558 + func(f_more);
  3559 +
  3560 + },
  3561 + //获取redis中的数量
  3562 + async getactLen(func) {
  3563 + var r_num = 0,
  3564 + prom_type = this.data.prom_type,
  3565 + prom_id = this.data.prom_id;
  3566 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  3567 + 1: 1
  3568 + }).then(res => {
  3569 + var em = res;
  3570 + if (em.data.code == 0) {
  3571 + r_num = em.data.data;
  3572 + }
  3573 + })
  3574 + func(r_num);
  3575 + },
  3576 + //获取redis中的数量
  3577 + async getactLenser() {
  3578 + let prom_type = this.data.prom_type;
  3579 + let prom_id = this.data.prom_id;
  3580 + return await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  3581 + 1: 1
  3582 + }).then(res => {
  3583 + if (res.data.code == 0) {
  3584 + // 当前可以购买的数量
  3585 + let r_num = res.data.data;
  3586 + return r_num;
  3587 + };
  3588 + })
  3589 + },
  3590 +
  3591 + //因为在购物车 普通商品和 优惠促销,搭配购,组合购 阶梯购是一样的
  3592 + check_is_like(e, newd, idx) {
  3593 + if (e.prom_type == newd.prom_type) return true;
  3594 + if (!idx) {
  3595 + if (e.prom_type == 0) {
  3596 + if ([3, 5, 7, 10].indexOf(newd.prom_type) > -1) return true;
  3597 + }
  3598 + if (newd.prom_type == 0) {
  3599 + if ([3, 5, 7, 10].indexOf(e.prom_type) > -1) return true;
  3600 + }
  3601 + }
  3602 + return false;
  3603 + },
  3604 + //----------增加购买数量-----------
  3605 + addCartNumser: function (t) {
  3606 + this.checkCartNumser(this.data.goodsInputNum + 1);
  3607 + },
  3608 + //----------减少购买数量-----------
  3609 + subCartNumser: function (t) {
  3610 + this.checkCartNumser(this.data.goodsInputNum - 1);
  3611 + },
  3612 + //----------输入框输入购买数量-----------
  3613 + inputCartNumser: function (t) {
  3614 + this.checkCartNumser(Number(t.detail.value));
  3615 + },
  3616 +
  3617 + //------检查数量是不是超出限购------
  3618 + checkCartNumser: async function (t) {
  3619 + var th = this;
  3620 +
  3621 + if (!th.data.def_pick_store) {
  3622 + wx.showModal({ title: '请选择门店', });
  3623 + return false;
  3624 + };
  3625 +
  3626 + // 非秒杀活动
  3627 + if (this.data.prom_type != 1) {
  3628 + this.setData({
  3629 + goodsInputNum: t,
  3630 + });
  3631 + };
  3632 +
  3633 + // 秒杀活动
  3634 + if (this.data.prom_type == 1) {
  3635 + // 如果是秒杀活动下的单独购买,is_normal为1
  3636 + if (this.data.openSpecModal_flash_normal) this.data.is_normal = 1;
  3637 +
  3638 + if (this.data.is_normal) {// 单独购买
  3639 + this.setData({
  3640 + goodsInputNum: t,
  3641 + });
  3642 + } else {// 秒杀购买
  3643 +
  3644 + // 获取redis当前可以购买的数量
  3645 + // 如果数量为0,设置和显示已抢光
  3646 + // 否则,进一步判断是否超出限购或超出库存
  3647 + await this.getactLenser().then(async function (res) {
  3648 + // res: redis可购买数量
  3649 + // console.log('当前可以购买的数量:', res);
  3650 + if (res <= 0) {
  3651 + // 可购买数量<=0, 设置和显示已抢光
  3652 + th.setData({
  3653 + prom_r_null: 1,
  3654 + });
  3655 + } else {
  3656 + // 可购买数量>0
  3657 + // 计算自己还可以购买的数量
  3658 + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b
  3659 + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存
  3660 + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
  3661 + let actInfo = th.data.sele_g;
  3662 + await th.get_buy_num2().then(function (data) {
  3663 + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a
  3664 + let promcardbuynum = data.data.data.promcardbuynum;
  3665 + let buyedNum = promcardbuynum; // 自己已经购买的数量b
  3666 + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
  3667 +
  3668 + if (canBuyNum <= 0) {
  3669 + canBuyNum = 0;
  3670 + };
  3671 +
  3672 + if (limited > res) {
  3673 + if (t > res) { // t当前增减的数量
  3674 + // wx.showModal({
  3675 + // title: '超出活动库存',
  3676 + // });
  3677 + getApp().my_warnning('超出活动库存', 0, self);
  3678 + th.setData({
  3679 + goodsInputNum: res || 1,
  3680 + });
  3681 + return false;
  3682 + };
  3683 + };
  3684 +
  3685 + if (limited <= res) {
  3686 + if (t > canBuyNum) {
  3687 + // wx.showModal({
  3688 + // title: '超出限购数量',
  3689 + // });
  3690 + getApp().my_warnning('超出限购数量', 0, self);
  3691 + th.setData({
  3692 + goodsInputNum: canBuyNum || 1,
  3693 + });
  3694 + return false;
  3695 + };
  3696 + };
  3697 +
  3698 + th.setData({
  3699 + goodsInputNum: t,
  3700 + });
  3701 + });
  3702 + };
  3703 + });
  3704 +
  3705 + }
  3706 +
  3707 +
  3708 + };
  3709 +
  3710 +
  3711 +
  3712 +
  3713 +
  3714 +
  3715 +
  3716 +
  3717 +
  3718 +
  3719 +
  3720 + // var e = th.data.sele_g.goods_num;
  3721 + // var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4
  3722 + // if (th.data.sales_rules == 2 && (p_type != 1 && p_type != 4 && p_type != 6 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) {
  3723 + // if (!th.data.def_pick_store) {
  3724 + // wx.showModal({title: '请选择门店',});
  3725 + // return false;
  3726 + // } else {
  3727 + // e = th.data.def_pick_store.CanOutQty;
  3728 + // }
  3729 + // }
  3730 +
  3731 +
  3732 + // th.setData({goodsInputNum: t});
  3733 +
  3734 + // });
  3735 +
  3736 +
  3737 + },
  3738 + //-----------选择属性的按钮事件----------
  3739 + sele_spec: function (e) {
  3740 +
  3741 + //如果只有一个规格直接结束
  3742 + if ((this.data.sku_g && this.data.sku_g.length==1) || (this.data.sku_g_pt && this.data.sku_g_pt.length==1)) {
  3743 + return
  3744 + }
  3745 + if (this.data.sp_seleing) {
  3746 + return false;
  3747 + }
  3748 +
  3749 + this.setData({ sp_seleing: 1 })
  3750 +
  3751 + var that = this;
  3752 + var th = this;
  3753 +
  3754 + //在切换规格的时候,指定门店不匹配的状态要清理
  3755 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  3756 + th.data.def_pick_store.is_no_dis_nor = 0;
  3757 + that.setData({
  3758 + def_pick_store: th.data.def_pick_store
  3759 + })
  3760 + }
  3761 +
  3762 + //切换完商品后,海报图片都要跟换
  3763 + this.data.share_goods_img = null;
  3764 +
  3765 + var gid = e.currentTarget.dataset.gid;
  3766 + var nor = e.currentTarget.dataset.nor;
  3767 + var user_id = getApp().globalData.user_id;
  3768 +
  3769 + var sku_g = this.data.sku_g;
  3770 + if (nor || (gid != this.data.base_nor_goods_id && this.data.base_nor)) {
  3771 + sku_g = this.data.sku_g_pt;
  3772 + if (nor) this.data.base_nor = nor;
  3773 + }
  3774 +
  3775 + //要把不匹配还原
  3776 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  3777 + th.data.def_pick_store.is_no_dis = 0;
  3778 + th.data.def_pick_store.is_no_dis_nor = 0;
  3779 + th.setData({ def_pick_store: th.data.def_pick_store })
  3780 + }
  3781 +
  3782 + //普通商品多规格的时候,商品切换
  3783 + if (this.data.base_nor_prom_type) this.data.base_nor_prom_type = parseInt(this.data.base_nor_prom_type);
  3784 + if ([1, 2, 4, 6, 8, 9].indexOf(this.data.base_nor_prom_type) == -1) {
  3785 +
  3786 + this.setData({
  3787 + prom_goods: null,
  3788 + jieti_prom: null,
  3789 + order_prom: null,
  3790 + zh_act: null,
  3791 + more_flash: null,
  3792 + })
  3793 + }
  3794 +
  3795 + //拼团在点击回来的时候,还是只能是立即购买,不能有购物车的情况
  3796 + if (this.data.base_nor_prom_type == 6 && parseInt(gid + '') == parseInt(this.data.base_nor_goods_id + '')) {
  3797 + this.setData({
  3798 + openSpecModal_pt: 1,
  3799 + openSpecModal: 0,
  3800 + sku_g: this.data.sku_g_pt,
  3801 + is_normal: 1
  3802 + })
  3803 + nor = 1;
  3804 + }
  3805 +
  3806 +
  3807 + //that.data.change=1;
  3808 + var item = null;
  3809 + for (var i in sku_g) {
  3810 + if (sku_g[i].goods_id == gid) {
  3811 + item = sku_g[i];
  3812 + if (item.original_img.indexOf(that.data.iurl) == -1) {
  3813 + item.original_img = that.data.iurl + item.original_img;
  3814 + }
  3815 + break
  3816 + }
  3817 + }
  3818 + console.log(item, 2000);
  3819 + var cur_price = item.shop_price;
  3820 + if (getApp().globalData.userInfo && getApp().globalData.userInfo.card_field) {
  3821 + var cfile = getApp().globalData.userInfo.card_field;
  3822 + console.log('cfile', cfile);
  3823 + if (item[cfile]) {
  3824 + cur_price = item[cfile];
  3825 + }
  3826 + }
  3827 + var txt = (cur_price / item.market_price * 10).toFixed(2).toString();
  3828 + txt = parseFloat(txt);
  3829 + item['disc'] = txt;
  3830 + if (item) this.setData({
  3831 + sele_g: item,
  3832 + gid: gid,
  3833 + data: item,
  3834 + });
  3835 +
  3836 +
  3837 + if (nor) {
  3838 + that.set_sele_g(sku_g)
  3839 + that.get_sto(1, () => {
  3840 + that.sele_spec_next(that, item, gid, nor);
  3841 + });
  3842 + }
  3843 + else that.get_sto(null, () => {
  3844 + that.sele_spec_next(that, item, gid, nor);
  3845 + }, item);
  3846 +
  3847 + },
  3848 + //-- 选择规格下一步 --
  3849 + sele_spec_next(that, item, gid, nor) {
  3850 + let th = this;
  3851 + if (!item.whsle_id && ([1, 2, 4, 6].indexOf(item.prom_type) == -1 || this.data.is_normal == 1))
  3852 + that.check_is_youhui(gid, that.data.is_normal, 1);
  3853 +
  3854 + //默认门店要拿下门店库存
  3855 + 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) {
  3856 + var lock = 0,
  3857 + plist = null;
  3858 +
  3859 + that.check_CanOutQty(that.data.sele_g, that.data.def_pick_store, function (CanOutQty) {
  3860 + that.data.def_pick_store.CanOutQty = CanOutQty;
  3861 + //--给门店赋值线下库存--
  3862 + that.setData({
  3863 + def_pick_store: that.data.def_pick_store
  3864 + });
  3865 + })
  3866 +
  3867 + }
  3868 + that.sele_spec_chech_activity(nor);
  3869 +
  3870 + //如果是秒杀,拼团等互动,就不重新算界面
  3871 + if ([1, 2, 4, 6, 8, 9].indexOf(this.data.base_nor_prom_type) > -1) {
  3872 + return false;
  3873 + }
  3874 +
  3875 + that.check_has_flash(gid);
  3876 + var url = '/api/weshop/activitylist/listGoodActInfo2New';
  3877 + var req_d = {
  3878 + "store_id": os.stoid,
  3879 + "goods_id": that.data.gid,
  3880 + "user_id": getApp().globalData.user_id,
  3881 + }
  3882 + getApp().request.get(url, {
  3883 + data: req_d,
  3884 + success: function (e) {
  3885 + if (e.data.code != 0 || !e.data.data || e.data.data.length <= 0) return false;
  3886 + var arr = e.data.data;
  3887 + if (!arr || !arr.length) {
  3888 + return false;
  3889 + }
  3890 + var arr3 = arr.filter(function (e) {
  3891 + return e.s_time < ut.gettimestamp() && e.prom_type == 7;
  3892 + })
  3893 +
  3894 + //-- 组合购要在面前计算 --,计算完之后,再来计算check_is_youhui --
  3895 + if (arr3 && arr3.length > 0) {
  3896 + //获取活动信息
  3897 + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" +
  3898 + arr3[0].act_id + "/" + getApp().globalData.user_id;
  3899 + getApp().request.get(url, {
  3900 + success: function (e) {
  3901 + if (e.data.code == 0 && e.data.data) {
  3902 + if (ut.gettimestamp() < e.data.data.start_time) {
  3903 + return false;
  3904 + }
  3905 + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) {
  3906 + //-- 获取商品列表 --
  3907 + th.setData({
  3908 + zh_act: e.data.data
  3909 + });
  3910 + th.getUserBuyPromNum(e.data.data.id)
  3911 + }
  3912 + }
  3913 + if (!item.whsle_id) that.check_is_youhui(gid, that.data.is_normal);
  3914 + }
  3915 + });
  3916 + } else {
  3917 + if (!item.whsle_id) that.check_is_youhui(gid, that.data.is_normal);
  3918 + }
  3919 +
  3920 + }
  3921 + })
  3922 + },
  3923 + //选择了不同的规格的时候要判断是不是有活动正在进行中
  3924 + async sele_spec_chech_activity(nor) {
  3925 + //---如果是活动的时候---
  3926 + var prom = null, goodsinfo = this.data.sele_g, th = this;
  3927 +
  3928 + //如果是普通购买的时候,要返回原先
  3929 + if (goodsinfo.goods_id == this.data.base_nor_goods_id) {
  3930 + goodsinfo.prom_type = this.data.base_nor_prom_type;
  3931 + goodsinfo.prom_id = this.data.base_nor_prom_id;
  3932 +
  3933 + this.setData({
  3934 + prom_type: this.data.base_nor_prom_type,
  3935 + prom_id: this.data.base_nor_prom_id,
  3936 + })
  3937 + }
  3938 +
  3939 + var user_id = getApp().globalData.user_id;
  3940 + if (!user_id) user_id = 0;
  3941 + if (goodsinfo.prom_type == 1) {
  3942 + await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + goodsinfo.prom_id, {}).then(res => {
  3943 + if (res.data.code == 0 && res.data.data) {
  3944 + prom = res.data.data;
  3945 + prom.price = prom.user_price;
  3946 + this.setData({
  3947 + is_share_text: prom.is_share_text
  3948 + })
  3949 + }
  3950 + })
  3951 + }
  3952 + if (goodsinfo.prom_type == 6) {
  3953 + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => {
  3954 + if (res.data.code == 0) {
  3955 + prom = res.data.data;
  3956 +
  3957 +
  3958 + //----------查看阶梯团------------
  3959 + if (prom.ct_rylist != "null" && prom.ct_rylist != "" && prom.ct_rylist != null && prom.ct_rylist != undefined) {
  3960 + prom.ct_rylist = JSON.parse(prom.ct_rylist);
  3961 + var max_num = 0;
  3962 + prom.ct_rylist.forEach(function (val, ind) {
  3963 + if (parseInt(val.rynum) > max_num) max_num = parseInt(val.rynum);
  3964 + })
  3965 + prom.max_ct_num = max_num;
  3966 + }
  3967 +
  3968 + }
  3969 + })
  3970 + }
  3971 +
  3972 + if (goodsinfo.prom_type == 4) {
  3973 + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {
  3974 + if (res.data.code == 0) {
  3975 + prom = res.data.data;
  3976 + }
  3977 + })
  3978 +
  3979 + if (prom) {
  3980 + let times = new Date().getTime()
  3981 + prom.show_time_off = ""
  3982 + let atimes = prom.start_time * 1000
  3983 +
  3984 + if (atimes > times) {
  3985 + prom.show_time_off = ut.formatTime(prom.start_time)
  3986 + }
  3987 + }
  3988 +
  3989 + }
  3990 + console.log('活动详情------------');
  3991 + console.log(prom);
  3992 + //----------如果有活动,并且在进行中,就不计算线下库存---------------
  3993 + var now = ut.gettimestamp();
  3994 + if (prom) {
  3995 +
  3996 + var t1 = prom.start_time;
  3997 + var prom_st = 1;
  3998 + if (prom.show_time) {
  3999 + t1 = prom.show_time;
  4000 + if (prom.start_time > now) prom_st = 0;
  4001 + }
  4002 + if (prom.is_end == 0 && prom.end_time > now && t1 < now) {
  4003 + th.setData({
  4004 + prom_type: goodsinfo.prom_type,
  4005 + prom_price: prom.price,
  4006 + prom_buy_limit: prom.buy_limit ? prom.buy_limit : (prom.limitvipqty ? prom.limitvipqty : 0),
  4007 + prom_end_time: prom.end_time,
  4008 + prom_start_time: prom.start_time,
  4009 + prom_st: prom_st,
  4010 + prom_act: prom,
  4011 + prom_id: prom.id,
  4012 + sp_seleing: 0
  4013 + })
  4014 +
  4015 + var pro_null = null;
  4016 + if (goodsinfo.prom_type == 1) {
  4017 + var rs = await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/1/" + prom.id, {});
  4018 + if (rs && rs.data.code == 0 && rs.data.data <= 0) {
  4019 + pro_null = 1;
  4020 + }
  4021 + }
  4022 + th.setData({ pro_null });
  4023 +
  4024 +
  4025 + //却换图片
  4026 + th.init(goodsinfo.goods_id);
  4027 + var newTime = ut.gettimestamp();
  4028 + var endTime2 = prom.end_time;
  4029 + var endTime1 = prom.start_time;
  4030 +
  4031 + this.data.is_timer = 0;
  4032 +
  4033 + setTimeout(function () {
  4034 + th.data.is_timer = 1;
  4035 + if (endTime1 > newTime) {
  4036 + th.setData({
  4037 + prom_time_text: '距秒杀开始还有'
  4038 + })
  4039 + // th.countDown(endTime1, 0);
  4040 + } else {
  4041 + if (endTime2 > newTime) {
  4042 + th.setData({
  4043 + prom_time_text: '距秒杀结束还有',
  4044 + prom_st: 1
  4045 + })
  4046 + // th.countDown(endTime2);
  4047 + }
  4048 + }
  4049 +
  4050 + }, 1000)
  4051 +
  4052 + return false;
  4053 + }
  4054 + }
  4055 +
  4056 + if (nor) {
  4057 + th.setData({ sp_seleing: 0 })
  4058 + return false;
  4059 + }
  4060 +
  4061 + //---设置普通商品---
  4062 + th.setData({
  4063 + prom_type: 0,
  4064 + prom_price: null,
  4065 + prom_buy_limit: null,
  4066 + prom_end_time: null,
  4067 + prom_start_time: null,
  4068 + prom_st: null,
  4069 + sp_seleing: 0
  4070 + })
  4071 +
  4072 + },
  4073 + //---检查有没有优惠活动--- is_nor的普通购买的时候,is_spec是切换规格的时候
  4074 + check_is_youhui: async function (gid, is_nor, is_spec) {
  4075 + var th = this;
  4076 + var user_id = getApp().globalData.user_id;
  4077 + if (!user_id) user_id = 0;
  4078 +
  4079 + //普通购买的时候,重新算一下组合购有没有
  4080 + if (is_nor || is_spec) {
  4081 +
  4082 +
  4083 + th.setData({
  4084 + cx_prom_group: []
  4085 + })
  4086 +
  4087 + var arr3 = null;
  4088 + var url = '/api/weshop/activitylist/listGoodActInfo2New';
  4089 + var req_d = {
  4090 + "store_id": os.stoid,
  4091 + "goods_id": gid,
  4092 + "user_id": user_id,
  4093 + }
  4094 + await getApp().request.promiseGet(url, {
  4095 + data: req_d,
  4096 + }).then(e => {
  4097 + if (e.data.code == 0 && e.data.data && e.data.data.length > 0) {
  4098 + var arr = e.data.data;
  4099 + if (arr.length) {
  4100 + arr3 = arr.filter(function (e) {
  4101 + return e.s_time < ut.gettimestamp() && e.prom_type == 7;
  4102 + })
  4103 + }
  4104 + }
  4105 + })
  4106 +
  4107 + if (arr3 && arr3.length > 0) {
  4108 + //获取活动信息
  4109 + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + arr3[0].act_id + "/" + getApp().globalData.user_id;
  4110 + await getApp().request.promiseGet(url, {
  4111 +
  4112 + }).then(e => {
  4113 + if (e.data.code == 0 && e.data.data) {
  4114 + if (ut.gettimestamp() < e.data.data.start_time) {
  4115 + return false;
  4116 + }
  4117 + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) {
  4118 + //-- 获取商品列表 --
  4119 +
  4120 + if (is_spec) {
  4121 + th.setData({
  4122 + zh_act: e.data.data
  4123 + })
  4124 + } else {
  4125 + th.data.zh_act = e.data.data;
  4126 + }
  4127 +
  4128 + th.getUserBuyPromNum(e.data.data.id)
  4129 + }
  4130 + }
  4131 + })
  4132 + }
  4133 + }
  4134 +
  4135 + var r_data = null;
  4136 +
  4137 +
  4138 + //-- 如果有组合购的时候 --
  4139 + if (th.data.zh_act) {
  4140 + var show_time = ut.formatTime(th.data.zh_act.start_time) + "至" + ut.formatTime(th.data.zh_act.end_time);
  4141 + //-- 开始组装数据 --
  4142 + th.add_cx_prom_group({
  4143 + id: th.data.zh_act.id,
  4144 + title: th.data.zh_act.name,
  4145 + show_time: show_time,
  4146 + prom_type: 7
  4147 + });
  4148 + }
  4149 +
  4150 + //调用接口判断订单优惠,
  4151 + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromListNew1/" + os.stoid + "/" + gid + "/0" + "/" + user_id, {}).then(async res => {
  4152 + if (res.data.code == 0 && res.data.data) {
  4153 + r_data = res.data.data;
  4154 + var max = 0,
  4155 + min = 0;
  4156 +
  4157 + //如果是搭配购的时候
  4158 + if (r_data.collocationList) {
  4159 + for (var i in r_data.collocationList) {
  4160 + if (max == 0) max = r_data.collocationList[i].price;
  4161 + if (min == 0) min = r_data.collocationList[i].price;
  4162 +
  4163 + if (max < parseFloat(r_data.collocationList[i].price)) max = r_data.collocationList[i].price;
  4164 + if (min > parseFloat(r_data.collocationList[i].price)) min = r_data.collocationList[i].price;
  4165 + }
  4166 + r_data.collocationPromList.max = (max + th.data.data.shop_price).toFixed(2);
  4167 + r_data.collocationPromList.min = (min + th.data.data.shop_price).toFixed(2);
  4168 + var show_price = '¥' + r_data.collocationPromList.max + '-' + r_data.collocationPromList.min;
  4169 + var show_time = ut.formatTime(r_data.collocationPromList.start_time) + "至" + ut.formatTime(r_data.collocationPromList.end_time);
  4170 +
  4171 + //-- 开始组装数据 --
  4172 + th.add_cx_prom_group({
  4173 + id: r_data.collocationPromList.id,
  4174 + title: r_data.collocationPromList.title,
  4175 + show_price: show_price,
  4176 + show_time: show_time,
  4177 + prom_type: 5,
  4178 + main_gid: gid
  4179 + });
  4180 + }
  4181 +
  4182 +
  4183 +
  4184 + //优惠促销的时候
  4185 + if (r_data.promGoodsLists) {
  4186 +
  4187 + var fir_act = r_data.promGoodsLists[0];
  4188 + var is_yh_out_limit = 0;
  4189 +
  4190 +
  4191 + //-- 计算一下限购,满足限购数才显示 --
  4192 + if (fir_act.limit_num) {
  4193 + // await this.getUserBuyPromNum_pre(fir_act.prom_id);
  4194 + if (th.data.user_pre_buynum >= fir_act.limit_num) {
  4195 + is_yh_out_limit = 1;
  4196 + }
  4197 + }
  4198 +
  4199 + //如果是有限购的时候
  4200 + if (fir_act.gd_limit_num > 0 && !is_yh_out_limit) {
  4201 + var lrs = {
  4202 + store_id: os.stoid,
  4203 + user_id: user_id,
  4204 + goods_id: gid,
  4205 + prom_type: 3,
  4206 + prom_id: fir_act.prom_id, isnew: 1
  4207 + };
  4208 + var gd_limit_rs = await getApp().promiseGet('/api/weshop/ordergoods/getUserBuyGoodsNum', { data: lrs });
  4209 + var pro_by_num = 0;
  4210 + if (gd_limit_rs && gd_limit_rs.data.code == 0) {
  4211 + pro_by_num = gd_limit_rs.data.data.promgoodsbuynum
  4212 + }
  4213 + if (pro_by_num >= fir_act.gd_limit_num) {
  4214 + is_yh_out_limit = 1;
  4215 + }
  4216 + }
  4217 + //-- 如果超出限购,就不显示了 --
  4218 + if (!is_yh_out_limit) {
  4219 + var more_arr = ut.format_yh_act(fir_act);
  4220 +
  4221 + var limit = '每人' + (fir_act.limit_num ? '限参与' + fir_act.limit_num + '次' : '参与不限次');
  4222 + if (fir_act.gd_limit_num > 0) {
  4223 + limit += ",限购" + fir_act.gd_limit_num + "件";
  4224 + }
  4225 +
  4226 + //-- 开始组装数据 --
  4227 + th.add_cx_prom_group({
  4228 + id: fir_act.prom_id,
  4229 + condition: fir_act.condition + (fir_act.prom_type == 1 ? '件' : '元'),
  4230 + limit: limit,
  4231 + gd_limit_num: fir_act.gd_limit_num > 0 ? fir_act.gd_limit_num : 0,
  4232 + more: more_arr,
  4233 + prom_type: 3,
  4234 + promGoodsListsDtos: r_data.promGoodsLists,
  4235 + is_yh_out_limit: is_yh_out_limit
  4236 + });
  4237 + }
  4238 +
  4239 + }
  4240 +
  4241 + //普通购买不在界面显示
  4242 + if (is_nor) {
  4243 + th.data.collocationGoods = r_data.collocationPromList;
  4244 + th.data.prom_goods = r_data.promGoodsLists;
  4245 + } else {
  4246 + th.setData({
  4247 + order_prom: r_data.promOrder,
  4248 + collocationGoods: r_data.collocationPromList,
  4249 + prom_goods: r_data.promGoodsLists,
  4250 + })
  4251 + }
  4252 +
  4253 +
  4254 + }
  4255 + })
  4256 +
  4257 +
  4258 + //-- 如果有阶梯购的时候 --
  4259 + if (r_data && r_data.ladderLists) {
  4260 + var act_id = r_data.ladderLists[0].form_id;
  4261 + //-- 判断会员能不能参与阶梯促销 --
  4262 + await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => {
  4263 + if (res.data.code == 0 && res.data.data) {
  4264 + var prom_content = "";
  4265 + //暂定优惠促销还不能重叠
  4266 + // if (res.data.data.good_object == 0 && (r_data.promGoodsLists || th.data.zh_act)) {
  4267 + // return false;
  4268 + // }
  4269 + // if (res.data.data.good_object == 1) {
  4270 + // r_data.promGoodsLists = null;
  4271 + // }
  4272 +
  4273 + for (let jj in r_data.ladderLists) {
  4274 + if (r_data.ladderLists[jj].discount == 10) {
  4275 + prom_content += "第" + (parseInt(jj) + 1) + "件原价,";
  4276 + } else {
  4277 + prom_content += "第" + (parseInt(jj) + 1) + "件" + r_data.ladderLists[jj].discount + "折,";
  4278 + }
  4279 + }
  4280 + prom_content = ut.sub_last(prom_content);
  4281 + th.data.prom_type = 10;
  4282 + th.data.prom_id = act_id;
  4283 + th.setData({
  4284 + jieti_prom: prom_content,
  4285 + ladder_act_id: act_id
  4286 + })
  4287 +
  4288 + //-- 组装一下阶梯促销 --
  4289 + var s_time = res.data.data.start_time;
  4290 + var e_time = res.data.data.end_time;
  4291 + th.add_cx_prom_group({
  4292 + id: act_id,
  4293 + title: prom_content,
  4294 + show_time: ut.formatTime(s_time) + "至" + ut.formatTime(e_time),
  4295 + prom_type: 10
  4296 + });
  4297 +
  4298 + }
  4299 + })
  4300 + }
  4301 +
  4302 + th.is_show_more_buy();
  4303 +
  4304 + //-- 如果有促销活动也算是有参与活动,参与活动的也统一不进行计算起订的数量 --
  4305 + this.data.is_act = 0;
  4306 + if (this.data.zh_act || this.data.prom_goods || this.data.jieti_prom || this.data.collocationGoods) {
  4307 + this.data.is_act = 1;
  4308 + }
  4309 +
  4310 + console.log("11111111-gd");
  4311 + console.log(th.data.sele_g);
  4312 +
  4313 + //-- 更新默认购买的数量 ---
  4314 + var mo_num = getApp().get_limit_qty(th.data.sele_g, this.data.is_act);
  4315 + this.setData({
  4316 + goodsInputNum: mo_num
  4317 + })
  4318 + this.setData({
  4319 + mo_num: mo_num
  4320 + })
  4321 + },
  4322 + //获取促销活动的组合
  4323 + add_cx_prom_group(data) {
  4324 + var th = this;
  4325 + getApp().getConfig2(function (e) {
  4326 + //需要读者系统顺序
  4327 + var json_d = JSON.parse(e.switch_list);
  4328 + var auto_promote_sale = json_d.auto_promote_sale;
  4329 + if (auto_promote_sale) {
  4330 + var auto_promote_sale = auto_promote_sale.split(',');
  4331 + var fd = auto_promote_sale.indexOf(data.prom_type + '');
  4332 + data.sort = fd;
  4333 + } else {
  4334 + data.sort = data.prom_type;
  4335 + }
  4336 +
  4337 + var fdix = th.data.cx_prom_group.findIndex(function (em) {
  4338 + return em.prom_type == data.prom_type
  4339 + })
  4340 +
  4341 + if (fdix > -1) {
  4342 + th.data.cx_prom_group.splice(fdix, 1);
  4343 + }
  4344 +
  4345 + th.data.cx_prom_group.push(data);
  4346 +
  4347 + //-- 排序一下 --
  4348 + function comp(a, b) {
  4349 + return a.sort - b.sort; //升序
  4350 + }
  4351 + var ppdata = th.data.cx_prom_group;
  4352 + //使用sort排序
  4353 + ppdata.sort(comp);
  4354 +
  4355 + th.setData({
  4356 + cx_prom_group: ppdata
  4357 + })
  4358 +
  4359 + })
  4360 + },
  4361 + find_lock_num(pick_id, lock) {
  4362 + var lock_num = 0;
  4363 + if (!lock) return 0;
  4364 + if (lock.length < 0) return 0;
  4365 + for (var i in lock) {
  4366 + if (pick_id == lock[i].pickupId) {
  4367 + lock_num += lock[i].outQty;
  4368 + }
  4369 + }
  4370 + return lock_num;
  4371 + },
  4372 + //--- 获取默认的促销活动的默认活动 ---
  4373 + check_prom_custom(ind) {
  4374 + if (ind) {
  4375 + if (!this.data.cx_prom_group.length) return 0;
  4376 + } else {
  4377 + if (!this.data.cx_prom_group.length) return {
  4378 + prom_type: 0,
  4379 + id: 0
  4380 + };
  4381 + }
  4382 +
  4383 + var prom = null;
  4384 + prom = JSON.parse(JSON.stringify(this.data.cx_prom_group[0]));
  4385 +
  4386 + //-- 要判断有没有超出限购 --
  4387 + if (prom.prom_type == 3 && prom.is_yh_out_limit) {
  4388 + if (this.data.cx_prom_group.length > 1) {
  4389 + prom = this.data.cx_prom_group[1];
  4390 + } else {
  4391 + prom.prom_type = 0;
  4392 + prom.id = 0;
  4393 + }
  4394 + }
  4395 +
  4396 + if (ind) {
  4397 + return prom.prom_type;
  4398 + }
  4399 + return prom;
  4400 + },
  4401 + // 选择门店
  4402 + choice_store: function (ee) {
  4403 + var th = this;
  4404 + var ind = ee.currentTarget.dataset.ind;
  4405 + var bconfig = th.data.bconfig;
  4406 + this.setData({
  4407 + keyword: ''
  4408 + })
  4409 + //--先判断会员状态--
  4410 + var user_info = getApp().globalData.userInfo;
  4411 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  4412 + wx.navigateTo({
  4413 + url: '/packageE/pages/togoin/togoin',
  4414 + })
  4415 + return false;
  4416 + }
  4417 +
  4418 +
  4419 + //如果开启了,则不在选择门店
  4420 + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  4421 + return false;
  4422 + }
  4423 +
  4424 + if (!th.data.only_pk && !th.data.def_pickpu_list && !th.data.change) {
  4425 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  4426 + wx.showToast({
  4427 + title: '门店库存不足',
  4428 + icon: 'none',
  4429 + });
  4430 + return false;
  4431 + }
  4432 + th.data.change = 0;
  4433 +
  4434 + if (th.data.only_pk && !th.data.only_pk.length) {
  4435 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  4436 + wx.showToast({
  4437 + title: '门店库存不足',
  4438 + icon: 'none',
  4439 + });
  4440 + return false;
  4441 + }
  4442 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  4443 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  4444 + wx.showToast({
  4445 + title: '门店库存不足',
  4446 + icon: 'none',
  4447 + });
  4448 + return false;
  4449 + }
  4450 +
  4451 + //如果开启了,则不在选择门店
  4452 + if (th.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  4453 + return false;
  4454 + }
  4455 +
  4456 +
  4457 +
  4458 + if (bconfig && bconfig.is_sort_storage) {
  4459 + wx.getLocation({
  4460 + type: 'gcj02',
  4461 + success: function (res) {
  4462 +
  4463 + th.data.lat = res.latitude;
  4464 + th.data.lon = res.longitude;
  4465 + th.data.is_get_local_ok = 1;
  4466 + th.setData({
  4467 + is_gps: 1
  4468 + });
  4469 + //th.onShow();
  4470 + th.get_sto(th.data.is_normal);
  4471 + },
  4472 + fail: function (res) {
  4473 +
  4474 +
  4475 +
  4476 + //th.onShow();
  4477 + th.data.is_get_local_ok = 1;
  4478 + th.get_sto(th.data.is_normal);
  4479 + if (res.errCode == 2) {
  4480 + th.setData({
  4481 + is_gps: 0
  4482 + });
  4483 + if (th.data.is_gps == 0) {
  4484 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  4485 + }
  4486 + } else {
  4487 + th.setData({
  4488 + is_gps: "3"
  4489 + });
  4490 + }
  4491 +
  4492 + }
  4493 + })
  4494 + } else {
  4495 + th.data.is_get_local_ok = 1;
  4496 + th.get_sto(th.data.is_normal);
  4497 + }
  4498 +
  4499 + if (ind != undefined && ind != null) {
  4500 + this.setData({
  4501 + open_ind_store: ind,
  4502 + store: 1,
  4503 + openSpecModal: !1,
  4504 + openSpecModal_pt: !1,
  4505 + openSpecModal_flash_normal: !1,
  4506 + })
  4507 + } else {
  4508 + this.setData({
  4509 + store: 1,
  4510 + openSpecModal: !1,
  4511 + openSpecModal_pt: !1,
  4512 + openSpecModal_flash_normal: !1
  4513 +
  4514 + })
  4515 + }
  4516 + },
  4517 +
  4518 + //关闭选择门店
  4519 + close_popup: function (e) {
  4520 + var th = this;
  4521 + this.setData({
  4522 + store: 0,
  4523 + choice_sort_store: 0,
  4524 + sort_store: 0,
  4525 + fir_pick_index: 0,
  4526 + sec_pick_index: 0
  4527 + })
  4528 +
  4529 + var openindstore = this.data.open_ind_store;
  4530 + if (openindstore == 1) {
  4531 + th.setData({
  4532 + openSpecModal: !0,
  4533 + openSpecModal_ind: openindstore,
  4534 + });
  4535 + } else if (openindstore == 2) {
  4536 + th.setData({
  4537 + openSpecModal: !0,
  4538 + openSpecModal_ind: openindstore,
  4539 + });
  4540 + } else if (openindstore == 4) { //4就是拼团
  4541 + th.setData({
  4542 + openSpecModal_pt: 1, //打开拼团购买界面
  4543 + store: 0, //关闭门店
  4544 + choice_sort_store: 0, //关闭门店2级
  4545 + sort_store: 0, //关闭门店2级
  4546 + });
  4547 + } else {
  4548 + th.setData({
  4549 + store: 0,
  4550 + choice_sort_store: 0,
  4551 + sort_store: 0
  4552 + })
  4553 + }
  4554 +
  4555 +
  4556 + },
  4557 + choose_for_store_fir: function (e) {
  4558 + var index_c = e.currentTarget.dataset.ind;
  4559 + var th = this;
  4560 + th.setData({
  4561 + fir_pick_index: index_c
  4562 + })
  4563 +
  4564 + },
  4565 + //选择更多门店
  4566 + more_store: function () {
  4567 + this.setData({
  4568 + sort_store: 1
  4569 + });
  4570 + },
  4571 + check_guide(func) {
  4572 + var first_leader = getApp().globalData.first_leader;
  4573 + if (!first_leader) {
  4574 + func();
  4575 + return false;
  4576 + }
  4577 + if (this.data.is_geted_guide_pick) {
  4578 + func();
  4579 + return false;
  4580 + }
  4581 +
  4582 + if (getApp().globalData.guide_pick_id) {
  4583 + func();
  4584 + return false;
  4585 + }
  4586 + var th = this;
  4587 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  4588 + if (res.data.code == 0) {
  4589 + getApp().globalData.guide_pick_id = res.data.data.pickup_id;
  4590 + }
  4591 + th.data.is_geted_guide_pick = 1;
  4592 + func();
  4593 + })
  4594 + },
  4595 +
  4596 + //确定def_pick为选择的门店
  4597 + sure_pick: function (e) {
  4598 + var th = this;
  4599 + var item = null;
  4600 + var openindstore = parseInt(th.data.open_ind_store);
  4601 +
  4602 + if (th.data.choice_sort_store == 0) {
  4603 + var index = th.data.fir_pick_index;
  4604 + if (th.data.is_show_sto_cat == 1) {
  4605 + item = th.data.def_pickpu_list[index];
  4606 + } else {
  4607 + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候
  4608 + }
  4609 +
  4610 + } else {
  4611 + var index = th.data.sec_pick_index;
  4612 + item = th.data.sec_sto.s_arr[index];
  4613 + }
  4614 +
  4615 + if (!item) return false;
  4616 +
  4617 + if (item.is_no_dis_nor || (item.is_no_dis_act && !th.data.is_normal)) {
  4618 + wx.showToast({
  4619 + title: "该门店不可售,请选择其他门店",
  4620 + icon: 'none',
  4621 + duration: 2000
  4622 + });
  4623 + return false;
  4624 + }
  4625 +
  4626 +
  4627 + if (!th.data.sele_g) return false;
  4628 + //判断门店的配送方式是不是匹配
  4629 + var g_distr_type = th.data.sele_g.distr_type;
  4630 + if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) {
  4631 + wx.showToast({
  4632 + title: "门店配送方式不匹配,请选择其他门店",
  4633 + icon: 'none',
  4634 + duration: 2000
  4635 + });
  4636 + return false;
  4637 + }
  4638 +
  4639 + //--回调函数的用法--
  4640 + th.check_the_pick(item, function () {
  4641 + th.setData({
  4642 + def_pick_store: item,
  4643 + sto_sele_name: item.pickup_name,
  4644 + sto_sele_id: item.pickup_id,
  4645 + sto_sele_distr: item.distr_type,
  4646 + store: 0,
  4647 + choice_sort_store: 0,
  4648 + fir_pick_index: 0
  4649 + });
  4650 +
  4651 + switch (openindstore) {
  4652 + case 1:
  4653 + th.setData({
  4654 + openSpecModal: !0,
  4655 + openSpecModal_ind: openindstore,
  4656 + });
  4657 + break;
  4658 + case 2:
  4659 + th.setData({
  4660 + openSpecModal: !0,
  4661 + openSpecModal_ind: openindstore,
  4662 + });
  4663 + break;
  4664 + case 4:
  4665 + th.setData({
  4666 + openSpecModal_pt: 1, //打开拼团购买界面
  4667 + store: 0, //关闭门店
  4668 + choice_sort_store: 0, //关闭门店2级
  4669 + sort_store: 0, //关闭门店2级
  4670 + });
  4671 + break;
  4672 + case 5:
  4673 + th.setData({
  4674 + openSpecModal_flash_normal: 1, //打开拼团购买界面
  4675 + store: 0, //关闭门店
  4676 + choice_sort_store: 0, //关闭门店2级
  4677 + sort_store: 0, //关闭门店2级
  4678 + });
  4679 + break;
  4680 + default:
  4681 + th.setData({
  4682 + store: 0,
  4683 + choice_sort_store: 0,
  4684 + sort_store: 0
  4685 + })
  4686 + break
  4687 + }
  4688 +
  4689 + //如果商品没有其他活动,要取一下线下价格
  4690 + th.get_off_price();
  4691 + })
  4692 + },
  4693 + //---点击二级之后的选择---
  4694 + choose_for_store: function (e) {
  4695 + var index_c = e.currentTarget.dataset.ind;
  4696 + var th = this;
  4697 + th.setData({
  4698 + sec_pick_index: index_c,
  4699 + fir_pick_index: index_c
  4700 + })
  4701 +
  4702 + },
  4703 + //把选择的门店设置成默认的门店def_pick
  4704 + set_def_pick: function (e) {
  4705 + var th = this;
  4706 + var item = null;
  4707 + if (th.data.choice_sort_store == 0) {
  4708 + var index = th.data.fir_pick_index;
  4709 + if (th.data.is_show_sto_cat == 1) {
  4710 + item = th.data.def_pickpu_list[index];
  4711 + } else {
  4712 + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候
  4713 + }
  4714 + } else {
  4715 + var index = th.data.sec_pick_index;
  4716 + item = th.data.sec_sto.s_arr[index];
  4717 + }
  4718 +
  4719 + if (!item) return false;
  4720 +
  4721 + //判断门店的配送方式是不是匹配
  4722 + var g_distr_type = th.data.sele_g.distr_type;
  4723 + if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) {
  4724 + wx.showToast({
  4725 + title: "门店配送方式不匹配",
  4726 + icon: 'none',
  4727 + duration: 2000
  4728 + });
  4729 + return false;
  4730 + }
  4731 +
  4732 + //先设置之前,要判断是不是有库存
  4733 + th.check_the_pick(item, function () {
  4734 + var store_id = o.stoid;
  4735 + var user_id = getApp().globalData.user_id;
  4736 + var def_pickup_id = item.pickup_id;
  4737 +
  4738 + getApp().request.put('/api/weshop/users/update', {
  4739 + data: {
  4740 + user_id: user_id,
  4741 + def_pickup_id: def_pickup_id
  4742 + },
  4743 + success: function (res) {
  4744 + if (res.data.code == 0) {
  4745 + if (th.data.choice_sort_store == 0) th.setData({
  4746 + fir_pick_index: 0
  4747 + });
  4748 + getApp().globalData.pk_store = item;
  4749 + } else {
  4750 + //s.showWarning("设置默认门店地址失败", null, 500, !1);
  4751 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  4752 + }
  4753 +
  4754 + }
  4755 + });
  4756 +
  4757 + th.setData({
  4758 + def_pick_store: item,
  4759 + sto_sele_name: item.pickup_name,
  4760 + sto_sele_id: item.pickup_id,
  4761 + sto_sele_distr: item.distr_type,
  4762 + store: 0,
  4763 + choice_sort_store: 0
  4764 + });
  4765 +
  4766 + var openindstore = th.data.open_ind_store;
  4767 + if (openindstore == 1) {
  4768 + th.setData({
  4769 + openSpecModal: !0,
  4770 + openSpecModal_ind: openindstore,
  4771 + store: 0,
  4772 + choice_sort_store: 0,
  4773 + sort_store: 0,
  4774 + });
  4775 + } else if (openindstore == 2) {
  4776 + th.setData({
  4777 + openSpecModal: !0,
  4778 + openSpecModal_ind: openindstore,
  4779 + store: 0,
  4780 + choice_sort_store: 0,
  4781 + sort_store: 0,
  4782 + });
  4783 + } else if (openindstore == 4) { //4就是拼团
  4784 + th.setData({
  4785 + openSpecModal_pt: 1, //打开拼团购买界面
  4786 + store: 0, //关闭门店
  4787 + choice_sort_store: 0, //关闭门店2级
  4788 + sort_store: 0, //关闭门店2级
  4789 + });
  4790 + } else {
  4791 + th.setData({
  4792 + store: 0,
  4793 + choice_sort_store: 0,
  4794 + sort_store: 0,
  4795 + })
  4796 + }
  4797 +
  4798 + //如果商品没有其他活动,要取一下线下价格
  4799 + th.get_off_price();
  4800 +
  4801 + })
  4802 + },
  4803 +
  4804 +
  4805 + get_user_store() {
  4806 +
  4807 + var th = this;
  4808 + var that = this;
  4809 + //--获取用户的默认门店
  4810 + getApp().get_user_store(function (e) {
  4811 + if (!e) {
  4812 + th.data.fir_def_store = {}; //赋值空对象
  4813 + return false;
  4814 + }
  4815 + if (getApp().globalData.is_dj_pk) th.setData({
  4816 + has_def: 1
  4817 + });
  4818 +
  4819 + var ee = JSON.parse(JSON.stringify(e));
  4820 +
  4821 + //--定时器推迟一下--
  4822 + var appd = getApp().globalData;
  4823 + w_time = setInterval(function () {
  4824 + if (that.data.is_get_local_ok == 0) return false;
  4825 + if (!that.data.sele_g) return false;
  4826 + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
  4827 + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
  4828 + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
  4829 + ee.is_no_dis = 1;
  4830 + }
  4831 +
  4832 + //-- 如果有指定门店的时候,pickup_ids是经过判断是不是普通商品后才会有的 --
  4833 + if (th.data.sele_g && th.data.sele_g.pickup_ids && th.data.prom_type == 0) {
  4834 + var idx = th.data.sele_g.pickup_ids.findIndex(function (e) {
  4835 + return e.pickup_id == ee.pickup_id;
  4836 + })
  4837 + if (idx < 0) {
  4838 + ee.is_no_dis_nor = 1;
  4839 + }
  4840 + }
  4841 +
  4842 + clearInterval(w_time);
  4843 + var distance = null;
  4844 + var e = JSON.parse(JSON.stringify(ee));
  4845 +
  4846 + //如果有开启近距离的话,同时距离优不一样了
  4847 + if (that.data.lat != null) {
  4848 + //如果经纬度有变化的话
  4849 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  4850 + that.set_def_storage(e);
  4851 + } else {
  4852 + //要用接口是获取距离,js的计算不准
  4853 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  4854 + data: {
  4855 + store_id: os.stoid,
  4856 + pickup_id: e.pickup_id,
  4857 + lat: th.data.lat,
  4858 + lon: th.data.lon,
  4859 + isstop: 0,
  4860 + is_pos: 1
  4861 + },
  4862 + }).then(res => {
  4863 + if (res.data.code == 0) {
  4864 + e = res.data.data.pageData[0];
  4865 + if (e) {
  4866 + e.is_no_dis = ee.is_no_dis;
  4867 + appd.pk_store = e;
  4868 + that.set_def_storage(e);
  4869 + }
  4870 +
  4871 + }
  4872 + })
  4873 + }
  4874 + //e.distance = distance;
  4875 + appd.lat = that.data.lat;
  4876 + appd.lon = that.data.lon;
  4877 +
  4878 + } else {
  4879 + if (e) {
  4880 + e.distance = null;
  4881 + that.set_def_storage(e);
  4882 + }
  4883 + }
  4884 + }, 200)
  4885 +
  4886 + });
  4887 + },
  4888 + //如果开启线下库存,已经急速库存才会使用
  4889 + check_the_pick(item, func) {
  4890 + var th = this;
  4891 + var goodsinfo = th.data.sele_g;
  4892 + var erpwareid = goodsinfo.erpwareid;
  4893 + var plist = null;
  4894 + var lock = 0;
  4895 +
  4896 + //---如果是活动的时候,同时不是普通购买---
  4897 + if (getApp().is_virtual(th.data.sele_g) || th.data.sele_g.whsle_id || ([1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) > -1 && !th.data.is_normal)) {
  4898 + func();
  4899 + return false;
  4900 + }
  4901 +
  4902 + if (this.data.sales_rules == 1) {
  4903 + func();
  4904 + } else {
  4905 + // if (plist && plist.CanOutQty - lock > 0) {
  4906 + // item.CanOutQty = plist.CanOutQty - lock;
  4907 + // func();
  4908 + // return false;
  4909 + // }
  4910 + this.check_CanOutQty(goodsinfo, item, function (CanOutQty) {
  4911 +
  4912 + // let str = item.pickup_name + '库存不足!';
  4913 + if (!CanOutQty) {
  4914 + wx.showToast({
  4915 + title: item.pickup_name + '库存不足!',
  4916 + icon: 'none',
  4917 + });
  4918 + return false;
  4919 + }
  4920 + item.CanOutQty = CanOutQty;
  4921 + func();
  4922 +
  4923 + });
  4924 +
  4925 + }
  4926 + },
  4927 + //----获取线下价格-------
  4928 + get_off_price() {
  4929 + var th = this;
  4930 + //没有开启就返回
  4931 + if (!th.data.is_open_offline) return false;
  4932 + //先看下购买的功能有没有到期
  4933 + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=6", {}).then(res => {
  4934 + //未购买
  4935 + if (res.data.code != 0 || !res.data.data || !res.data.data.pageData || !res.data.data.pageData.length) {
  4936 + return false;
  4937 + } else {
  4938 + //已经过期
  4939 + var item = res.data.data.pageData[0];
  4940 + if (item.end_time < ut.gettimestamp()) {
  4941 + return false;
  4942 + }
  4943 + }
  4944 +
  4945 +
  4946 + var cur_goods = this.data.sele_g;
  4947 + var cur_price = cur_goods.shop_price;
  4948 + if (th.data.card_field && cur_goods[th.data.card_field] > 0) {
  4949 + cur_price = cur_goods[th.data.card_field];
  4950 + }
  4951 +
  4952 + var user_info = getApp().globalData.userInfo;
  4953 + //获取一下接口,判断是不是有线下接口,必须是普通商品,全局优惠活动也是不行
  4954 + if (cur_goods.prom_type == 0 && !this.data.prom_goods) {
  4955 + cur_goods.offline_price = null;
  4956 + //如果没有门店,不用计算线下价格
  4957 + var def_pick_store = this.data.def_pick_store;
  4958 + if (!def_pick_store) return false;
  4959 + getApp().request.get("/api/weshop/goods/listWarePrice", {
  4960 + data: {
  4961 + VIPId: encodeURIComponent(user_info.erpvipid),
  4962 + store_id: os.stoid,
  4963 + PickupId: def_pick_store.pickup_id,
  4964 + WareIds: encodeURIComponent(cur_goods.erpwareid)
  4965 + },
  4966 + success: function (res) {
  4967 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  4968 + var datalist = res.data.data;
  4969 + if (datalist[0].WarePrice < cur_price) {
  4970 + cur_goods.offline_price = datalist[0].WarePrice; //存储线下活动的价格
  4971 + cur_goods.pricing_type = datalist[0].PriceType; //存储线下活动的类型
  4972 + }
  4973 + }
  4974 + th.setData({
  4975 + sele_g: cur_goods
  4976 + });
  4977 + }
  4978 +
  4979 + })
  4980 + }
  4981 +
  4982 + })
  4983 +
  4984 +
  4985 + },
  4986 + //--- 设置一下默认库存的数量 ----
  4987 + set_def_storage(ee) {
  4988 + var that = this,
  4989 + th = this;
  4990 + getApp().getConfig2(function (e) {
  4991 + var sales_rules = e.sales_rules;
  4992 + if (sales_rules >= 2 && [1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) == -1 && !th.data.sele_g.whsle_id) {
  4993 + getApp().waitfor2(that, "wait_for_user_store", "fir_goods", function () {
  4994 + var lock = 0,
  4995 + plist = null;
  4996 + var gd = that.data.fir_goods;
  4997 + //先读取门店的lock,采用链式写法,少用await
  4998 + // getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
  4999 + // data: {
  5000 + // store_id: os.stoid,
  5001 + // wareId: that.data.fir_goods.goods_id,
  5002 + // storageId: ee.pickup_id,
  5003 + // pageSize: 1000
  5004 + // }
  5005 + // }).then(res => {
  5006 + // if (res.data.code == 0 && res.data.data.total > 0) {
  5007 + // for (var i in res.data.data.pageData)
  5008 + // lock += res.data.data.pageData[i].outQty
  5009 + // }
  5010 + // //---通过接口获取门店的线下库存信息--
  5011 + // return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
  5012 + // data: {
  5013 + // storageNos: ee.pickup_no,
  5014 + // wareIds: encodeURIComponent(th.data.data.erpwareid),
  5015 + // storeId: os.stoid
  5016 + // }
  5017 + // })
  5018 + // }).then(res => {
  5019 + // if (res.data.code == 0 && res.data.data.total > 0) {
  5020 + // plist = res.data.data.pageData[0];
  5021 + // } else {
  5022 + // wx.showToast({
  5023 + // title: '库存不足,请更换其他门店',
  5024 + // icon: 'none',
  5025 + // });
  5026 + // }
  5027 + //
  5028 + // if (plist && plist.CanOutQty - lock > 0) {
  5029 + // ee.CanOutQty = plist.CanOutQty - lock;
  5030 + // } else {
  5031 + // ee.CanOutQty = 0;
  5032 + // }
  5033 + // //--给门店赋值线下库存--
  5034 + // that.data.fir_def_store = ee;
  5035 + // that.setData({
  5036 + // def_pick_store: ee,
  5037 + // sto_sele_name: ee.pickup_name,
  5038 + // sto_sele_id: ee.pickup_id,
  5039 + // sto_sele_distr: ee.distr_type
  5040 + // })
  5041 + // })
  5042 + //最新的获取线下门店库存
  5043 + th.check_CanOutQty(gd, ee, function (CanOutQty) {
  5044 + ee.CanOutQty = CanOutQty;
  5045 + //--给门店赋值线下库存--
  5046 + that.data.fir_def_store = ee;
  5047 + that.setData({
  5048 + def_pick_store: ee,
  5049 + sto_sele_name: ee.pickup_name,
  5050 + sto_sele_id: ee.pickup_id,
  5051 + sto_sele_distr: ee.distr_type
  5052 + })
  5053 + })
  5054 +
  5055 +
  5056 + })
  5057 + } else {
  5058 + that.data.fir_def_store = ee;
  5059 + that.setData({
  5060 + def_pick_store: ee,
  5061 + sto_sele_name: ee.pickup_name,
  5062 + sto_sele_id: ee.pickup_id,
  5063 + sto_sele_distr: ee.distr_type
  5064 + })
  5065 + }
  5066 + })
  5067 +
  5068 + },
  5069 + wait_for_store_config: function () {
  5070 + var th = this;
  5071 + //----获取系统参数-----
  5072 + getApp().getConfig2(function (e) {
  5073 + th.setData({
  5074 + bconfig: e,
  5075 + });
  5076 + })
  5077 + t_time = setInterval(function () {
  5078 +
  5079 +
  5080 + if (th.data.bconfig == null) false;
  5081 + var e = th.data.bconfig;
  5082 + if (e && e.is_sort_storage) {
  5083 +
  5084 +
  5085 + wx.getLocation({
  5086 + type: 'gcj02',
  5087 + success: function (res) {
  5088 + th.data.lat = res.latitude;
  5089 + th.data.lon = res.longitude;
  5090 + th.data.is_get_local_ok = 1;
  5091 + },
  5092 + fail: function (res) {
  5093 + if (res.errCode == 2) {
  5094 + th.setData({
  5095 + is_gps: 0
  5096 + });
  5097 + if (th.data.is_gps == 0) {
  5098 + getApp().confirmBox("请开启GPS定位", null, 10000, !1);
  5099 + }
  5100 +
  5101 + } else {
  5102 + th.setData({
  5103 + is_gps: "3"
  5104 + });
  5105 + }
  5106 +
  5107 + th.data.is_get_local_ok = 1;
  5108 + }
  5109 + })
  5110 + } else {
  5111 + th.data.is_get_local_ok = 1;
  5112 + }
  5113 + clearInterval(t_time);
  5114 + }, 500)
  5115 + },
  5116 + //获取搜索门店输入的值
  5117 + input_store: function (e) {
  5118 + this.setData({
  5119 + keyword: e.detail.value
  5120 + })
  5121 + },
  5122 + //搜索门店
  5123 + searchfn() {
  5124 + let choice_sort_store = this.data.choice_sort_store
  5125 + if (choice_sort_store == 0) { //全局搜索
  5126 + let all_pick_list = this.data.all_pick_list
  5127 + let def_pickpu_list = this.data.def_pickpu_list
  5128 + let keyword = this.data.keyword
  5129 + if (keyword) {
  5130 + let arr = all_pick_list.filter(item => {
  5131 + let i = item.pickup_name.indexOf(keyword)
  5132 + if (i > -1) {
  5133 + return true
  5134 + } else {
  5135 + return false
  5136 + }
  5137 + })
  5138 + if (arr && arr.length > 0) {
  5139 + if (this.data.is_show_sto_cat == 1) {
  5140 + this.setData({
  5141 + def_pickpu_list: arr
  5142 + })
  5143 + } else {
  5144 + this.setData({
  5145 + only_pk: arr
  5146 + })
  5147 + }
  5148 + } else {
  5149 + wx.showToast({
  5150 + title: '没有搜索到门店',
  5151 + icon: 'none',
  5152 + duration: 2000
  5153 + })
  5154 + }
  5155 + } else {
  5156 + if (this.data.is_show_sto_cat == 1) {
  5157 + this.setData({
  5158 + def_pickpu_list: all_pick_list.slice(0, 10)
  5159 + })
  5160 + } else {
  5161 + this.setData({
  5162 + only_pk: all_pick_list
  5163 + })
  5164 + }
  5165 +
  5166 + }
  5167 + } else { //分类下搜索
  5168 + let sec_i = this.data.sec_i
  5169 + let all_sto = this.data.all_sto
  5170 + let old_all_sto = this.data.old_all_sto
  5171 + if (!old_all_sto) {
  5172 + this.setData({
  5173 + old_all_sto: JSON.parse(JSON.stringify(all_sto))
  5174 + })
  5175 + }
  5176 + let sec_sto = this.data.sec_sto
  5177 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  5178 + let keyword = this.data.keyword
  5179 + let text = 'sec_sto.s_arr'
  5180 + if (keyword) {
  5181 + let arr = sec_arr.filter(item => {
  5182 + let i = item.pickup_name.indexOf(keyword)
  5183 + if (i > -1) {
  5184 + return true
  5185 + } else {
  5186 + return false
  5187 + }
  5188 + })
  5189 + if (arr && arr.length > 0) {
  5190 + this.setData({
  5191 + [text]: arr
  5192 + })
  5193 + } else {
  5194 + wx.showToast({
  5195 + title: '没有搜索到门店',
  5196 + icon: 'none',
  5197 + duration: 2000
  5198 + })
  5199 + }
  5200 + } else {
  5201 + if (this.data.old_all_sto) {
  5202 + this.setData({
  5203 + [text]: this.data.old_all_sto[sec_i].s_arr
  5204 + })
  5205 + } else {
  5206 + this.setData({
  5207 + [text]: all_sto[sec_i].s_arr
  5208 + })
  5209 + }
  5210 + }
  5211 +
  5212 +
  5213 + }
  5214 + },
  5215 + //---选择分类门店---
  5216 + choice_sort_store: function (e) {
  5217 + var index = e.currentTarget.dataset.index;
  5218 + var region_name = e.currentTarget.dataset.region;
  5219 + var item = this.data.all_sto[index];
  5220 + this.setData({
  5221 + region_name: region_name,
  5222 + sort_store: 0,
  5223 + choice_sort_store: 1,
  5224 + sec_sto: item,
  5225 + sec_i: index,
  5226 + sec_pick_index: 0
  5227 + });
  5228 + },
  5229 + // 返回按钮
  5230 + returns: function () {
  5231 + this.setData({
  5232 + sort_store: 0,
  5233 + choice_sort_store: 0
  5234 + });
  5235 + },
  5236 + pop_err_img: function (e) {
  5237 + var txt = e.currentTarget.dataset.errorimg;
  5238 + var ob = {};
  5239 + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  5240 + this.setData(ob);
  5241 + },
  5242 + async getUserBuyPromNum(prom_id,is_zh) {
  5243 + var userInfo = getApp().globalData.userInfo;
  5244 + var url = `/api/weshop/ordergoods/getUserBuyPromNum?store_id=${os.stoid}&user_id=${userInfo.user_id}&prom_type=7&prom_id=${prom_id}`;
  5245 + let res = await getApp().request.promiseGet(url, {
  5246 + data: {}
  5247 + });
  5248 + let userbuynum = 0
  5249 + if (res.data.code == 0 && res.data.data) {
  5250 + userbuynum = res.data.data.userbuynum
  5251 + }
  5252 + this.setData({
  5253 + userbuynum
  5254 + })
  5255 + if(is_zh) this.data.user_zh_buy_num=userbuynum;
  5256 + // return userbuynum
  5257 + },
  5258 +
  5259 +
  5260 + }
  5261 +})
components/add_purchase/add_purchase.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 \ No newline at end of file 7 \ No newline at end of file
components/add_purchase/add_purchase.wxml 0 → 100644
  1 +<!--components/add_purchase/add_purchase.wxml-->
  2 +
  3 +<view >
  4 + <view class="cover-layer"></view>
  5 + <view class="spec-model">
  6 + <view class="pding">
  7 + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon>
  8 + <view class="spec-goods">
  9 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="sele_g.original_img"></image>
  10 + <view class="spec-goods-info">
  11 + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view>
  12 + <view class="flex ai_end xc-val-money">
  13 + <view class="spec-goods-price" wx:if="{{prom_price==null}}">
  14 + <text class="fs20">¥</text>
  15 + <!-- 如果是等级会员,且有等级价 -->
  16 + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}}</block>
  17 + <block wx:else>{{sele_g.shop_price}}</block>
  18 + </view>
  19 + <view class="spec-goods-price" wx:else><text class="fs20">¥</text>{{prom_price}}</view>
  20 + <!-- <view class="spec-goods-price" wx:elif="{{prom_type!=2}}"><text class="fs20">¥</text>{{prom_price}}</view> -->
  21 + <!-- 显示线下价格 -->
  22 + <view wx:if="{{sele_g.offline_price}}" class="quan_price flex ai-center jc-center">
  23 + 券后¥
  24 + <text class="fs32">{{sele_g.offline_price}}</text>
  25 + </view>
  26 + </view>
  27 +
  28 + <block wx:if="{{prom_type==0}}">
  29 + <view class="flex">
  30 + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view>
  31 + <!-- 线下门店销售的时候 -->
  32 + <block wx:if="{{sales_rules>=2}}">
  33 +
  34 + <!-- 如果不是虚拟商品的时候 -->
  35 + <block wx:if="{{!filters.is_virtual_gd(sele_g.is_virtual)}}">
  36 + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">
  37 + 可售:{{def_pick_store.CanOutQty}}
  38 + </view>
  39 + <view class="spec-goods-stock" wx:else>可售:0</view>
  40 + </block>
  41 +
  42 + </block>
  43 +
  44 + <block wx:else>
  45 + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view>
  46 + </block>
  47 + </view>
  48 + </block>
  49 + <block wx:if="{{prom_type==1}}">
  50 + <view class="flex">
  51 + <view class="spec-goods-stock" wx:if="{{prom_st>0}}">
  52 + 已售:{{prom_act.buy_num+prom_act.virtual}}
  53 + </view>
  54 + <view class="spec-goods-stock" wx:else>已售:{{prom_act.buy_num}}</view>
  55 + <view class="spec-goods-stock">可售:{{(prom_act.is_virtual_count && prom_act.virtual) ? (prom_act.goods_num - prom_act.buy_num - prom_act.virtual) : (prom_act.goods_num-prom_act.buy_num)}}</view>
  56 + </view>
  57 + </block>
  58 + <block wx:if="{{prom_type==2}}">
  59 + <view class="flex">
  60 + <view class="spec-goods-stock" wx:if="{{prom_st>0}}">
  61 + 已售:{{prom_act.buy_num+prom_act.virtualNum}}
  62 + </view>
  63 + <view class="spec-goods-stock" wx:else>已售:{{prom_act.buy_num}}</view>
  64 + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view>
  65 + </view>
  66 + </block>
  67 + </view>
  68 + <!-- 选择门店模块 -->
  69 + <view class="flex-space-between address ai_end xc-width ">
  70 + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
  71 + <text class="fs30 xc-black3 shop_name bold {{def_pick_store.distance!=null?'max':''}} ">{{def_pick_store.pickup_name}}</text>
  72 + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}">
  73 + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
  74 + </view>
  75 + </view>
  76 + <!-- 没有门店的时候 -->
  77 + <view class="flex" bindtap="choice_store" wx:else>
  78 + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
  79 + <view class="fs30" style="color:black;">选择门店</view>
  80 + </view>
  81 + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view>
  82 + </view>
  83 + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
  84 + <block wx:else>
  85 + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
  86 + <block wx:else>
  87 + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
  88 +
  89 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor}}">(该店不可售)</view>
  90 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor && is_normal}}">(该店不可售)</view>
  91 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}">(该店不可售)</view>
  92 + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0 &&!sele_g.whsle_id }}">
  93 + (库存不足)
  94 + </view>
  95 + </block>
  96 + </block>
  97 + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}">
  98 + 地址:{{def_pick_store.fulladdress}}
  99 + </view>
  100 + </view>
  101 + <!-- 商品的属性项目 -->
  102 + <view class="xc-goods-attribute" wx:if="{{goods_type ==1}}">
  103 + <view class="spec-name" style="padding: 0;"></view>
  104 + <view style="max-height: 120rpx;overflow-y: auto;"></view>
  105 + </view>
  106 + <view class="xc-goods-attribute" wx:else>
  107 + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
  108 + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;">
  109 +
  110 + <block wx:if="{{sku_g_pt}}">
  111 + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">
  112 + {{item.gg}}
  113 + </view>
  114 + </block>
  115 + <block wx:else>
  116 + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">
  117 + {{item.gg}}
  118 + </view>
  119 + </block>
  120 + </view>
  121 + </view>
  122 + <view class="b_num">
  123 + <view>购买数量</view>
  124 + <view class="count">
  125 + <view bindtap="{{goodsInputNum <= 1 ? '': (goods_type==1 ? 'subCartNumser' : 'subCartNum')}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">
  126 + -
  127 + </view>
  128 + <input bindblur="{{goods_type==1 ? 'inputCartNumser' : 'inputCartNum'}}" type="number" value="{{goodsInputNum}}"></input>
  129 + <view bindtap="{{goods_type==1 ? 'addCartNumser' : 'addCartNum'}}" class="add">+</view>
  130 + </view>
  131 + </view>
  132 + <!-- 提示再买多少优惠 -->
  133 + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && openSpecModal_ind==2 && (!hui_condition.limit_num || user_pre_buynum<hui_condition.limit_num)}}">
  134 + 再买{{hui_condition.need}}
  135 + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text>
  136 + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text>
  137 + <text wx:if="{{hui_condition.past==1}}">,包邮</text>
  138 + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text>
  139 + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text>
  140 + <text wx:if="{{hui_condition.gift_id}}">,送赠品</text>
  141 + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text>
  142 + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text>
  143 + <text wx:if="{{hui_condition.monthgiftbag_id>0}}">,送每月礼包</text>
  144 + </view>
  145 + </view>
  146 +
  147 + <!-- 底部处理按钮 -->
  148 + <view class="spec-cart-btns">
  149 + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  150 + 配送不匹配
  151 + </view>
  152 + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  153 + 该店不可售
  154 + </view>
  155 + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && is_normal}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  156 + 该店不可售
  157 + </view>
  158 + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act && !is_normal}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  159 + 该店不可售
  160 + </view>
  161 + <block wx:else>
  162 + <!-- 根本就找不到门店 -->
  163 + <block wx:if="{{!only_pk && !def_pickpu_list}}">
  164 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  165 + 库存不足
  166 + </view>
  167 + </block>
  168 + <block wx:else>
  169 + <block wx:if="{{only_pk && !only_pk.length}}">
  170 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  171 + 库存不足
  172 + </view>
  173 + </block>
  174 + <block wx:else>
  175 + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">
  176 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  177 + 库存不足
  178 + </view>
  179 + </block>
  180 + <block wx:else>
  181 + <block wx:if="{{!def_pick_store}}">
  182 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  183 + 请先选择门店
  184 + </view>
  185 + </block>
  186 + <block wx:else>
  187 +
  188 + <!-- 如果是线下库存购买的时候,且是普通商品购买的时候 -->
  189 + <block wx:if="{{sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}">
  190 +
  191 + <block wx:if="{{!def_pick_store.CanOutQty || def_pick_store.CanOutQty<1 }}">
  192 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  193 + 库存不足
  194 + </view>
  195 + </block>
  196 + <block wx:else>
  197 + <view wx:if="{{openSpecModal_ind==1}}" bindtap="{{(goods_type==1 ? 'addCartSer' : 'addCart' )}}" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow {{sp_seleing?'gray':''}}" data-action="add">
  198 + 加入购物车
  199 + </view>
  200 + <view wx:if="{{openSpecModal_ind==2}}" bindtap="{{(goods_type==1 ? 'addCartSer' : 'addCart' )}}" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{sp_seleing?'gray':''}}" data-action="buy">
  201 + {{sele_g.offline_price?"券后购买":"立即购买"}}
  202 + </view>
  203 + </block>
  204 + </block>
  205 + <!-- 线上销售 -->
  206 + <block wx:else>
  207 +
  208 + <block wx:if="{{prom_type==1 && !is_normal && pro_null}}">
  209 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  210 + 已抢光
  211 + </view>
  212 + </block>
  213 + <block wx:elif="{{ sele_g.store_count<1 && is_no_new}}">
  214 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
  215 + 库存不足
  216 + </view>
  217 + </block>
  218 + <block wx:else>
  219 + <view wx:if="{{openSpecModal_ind==1}}" bindtap="{{(goods_type==1 ? 'addCartSer' : 'addCart' )}}" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow {{sp_seleing?'gray':''}}" data-action="add">
  220 + 加入购物车
  221 + </view>
  222 + <view wx:if="{{openSpecModal_ind==2}}" bindtap="{{(goods_type==1 ? 'addCartSer' : 'addCart' )}}" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{sp_seleing?'gray':''}}" data-action="buy">
  223 + {{sele_g.offline_price?"券后购买":"立即购买"}}
  224 + </view>
  225 + </block>
  226 + </block>
  227 + </block>
  228 + </block>
  229 + </block>
  230 + </block>
  231 + </block>
  232 + </view>
  233 + <view class="clear"></view>
  234 + <!-- 选择门店的列表 -->
  235 + <view hidden="{{ismend==0}}" class="sto_v">
  236 + <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend">
  237 + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>
  238 + 选择门店
  239 + </view>
  240 + <!-- ---第一级显示---- -->
  241 + <view class="itemlists" hidden="{{is_sec_mend==1}}">
  242 + <block wx:if="{{is_show_sto_cat}}">
  243 + <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}">
  244 + {{item.name}}
  245 + </view>
  246 + </block>
  247 + <block wx:else>
  248 + <view wx:for="{{only_pk}}" wx:key="only_pk" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">
  249 + {{item.pickup_name}}
  250 + </view>
  251 + </block>
  252 + </view>
  253 + <!-- ---第二级显示---- -->
  254 + <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend">
  255 + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>
  256 + {{sec_sto.name}}
  257 + </view>
  258 + <view class="itemlists" hidden="{{is_sec_mend==0}}">
  259 + <view wx:for="{{sec_sto.s_arr}}" wx:key="index" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">
  260 + {{item.pickup_name}}
  261 + </view>
  262 + </view>
  263 + </view>
  264 + </view>
  265 +
  266 +</view>
  267 +<!-- 选择门店的弹框,1.1版最新的 -->
  268 +<block wx:if="{{store==1}}">
  269 + <view class="mongolia-layer" bindtap="close_popup"></view>
  270 + <view class="popup-frame">
  271 + <block wx:if="{{sort_store==0}}">
  272 + <!-- 头部 标题 -->
  273 + <view class="popup-top flex-space-between">
  274 + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text>
  275 + <view>
  276 + <view>
  277 + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
  278 + </view>
  279 + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}">
  280 + <text class="fs26 red-co">{{choice_sort_store==0?'更多门店':'返回'}}</text>
  281 + <view class="bg_rights"></view>
  282 + </view>
  283 + </view>
  284 + </view>
  285 + <view class="searchbar flex-vertical-between storeListpadd">
  286 + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" />
  287 + <view class="search flex-center" bindtap="searchfn">
  288 + <view class="fs28">搜索</view>
  289 + </view>
  290 + </view>
  291 + <!-- 门店列表,最外层的门店列表,一开始 -->
  292 + <view class="store-list">
  293 + <!-- 如果还没有点击更多门店的时候 -->
  294 + <block wx:if="{{choice_sort_store==0}}">
  295 + <!-- 需要for循环 -->
  296 + <block wx:if="{{is_show_sto_cat==1}}">
  297 + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  298 + <view class="store flex-vertical">
  299 + <!-- 需要点击事件 -->
  300 + <block wx:if="{{index==fir_pick_index}}">
  301 + <view class="circle white xc-hook fs20 red-b">Г</view>
  302 + </block>
  303 + <block wx:else>
  304 + <view class="circle xc-hooks"></view>
  305 + </block>
  306 + <view class="address-frame xc-ash">
  307 + <view class="flex-vertical-between butttem5">
  308 + <view class="flex xc-ash">
  309 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
  310 + <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text>
  311 + <text class="c-red22" wx:elif="{{item.is_no_dis}}">(配送不匹配)</text>
  312 + <text class="c-red22" wx:elif="{{item.is_no_dis_nor}}">(该店不可售)</text>
  313 + <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal}}">(该店不可售)</text>
  314 + <text class="c-red22" wx:elif="{{item.is_no_dis_act && !is_normal}}">(该店不可售)</text>
  315 + </view>
  316 + </view>
  317 + <view>
  318 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  319 + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}
  320 + </view>
  321 + </view>
  322 + </view>
  323 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  324 + </view>
  325 + </view>
  326 + </view>
  327 + </block>
  328 + <block wx:else>
  329 + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  330 + <view class="store flex-vertical">
  331 + <!-- 需要点击事件 -->
  332 + <block wx:if="{{index==fir_pick_index}}">
  333 + <view class="circle white xc-hook fs20 red-b">Г</view>
  334 + </block>
  335 + <block wx:else>
  336 + <view class="circle xc-hooks"></view>
  337 + </block>
  338 + <view class="address-frame xc-ash">
  339 + <view class="flex-vertical-between ">
  340 + <view class="flex xc-ash">
  341 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
  342 + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text>
  343 + <text class="c-red22" wx:elif="{{item.is_no_dis_nor}}">(该店不可售)</text>
  344 + <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal}}">(该店不可售)</text>
  345 + <text class="c-red22" wx:elif="{{item.is_no_dis_act && !is_normal}}">(该店不可售)</text>
  346 + <text class="c-red22" wx:elif="{{item.is_no_qyt }}">(库存不足)</text>
  347 + </view>
  348 + </view>
  349 + <view>
  350 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  351 + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}
  352 + </view>
  353 + </view>
  354 + </view>
  355 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  356 + </view>
  357 + </view>
  358 + </view>
  359 + </block>
  360 + </block>
  361 + <block wx:else>
  362 + <!-- 如果是点击选择门店分类后显示分类下的门店 -->
  363 + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store">
  364 + <view class="store flex-vertical">
  365 + <!-- 需要点击事件 -->
  366 + <block wx:if="{{index==sec_pick_index}}">
  367 + <view class="circle white xc-hook fs20 red-b">Г</view>
  368 + </block>
  369 + <block wx:else>
  370 + <view class="circle xc-hooks"></view>
  371 + </block>
  372 + <view class="address-frame xc-ash">
  373 + <view class="flex-vertical-between ">
  374 + <view class="flex xc-ash">
  375 + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}
  376 + <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text>
  377 + </view>
  378 + </view>
  379 + <view>
  380 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  381 + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}
  382 + </view>
  383 + </view>
  384 + </view>
  385 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  386 + </view>
  387 + </view>
  388 + </view>
  389 + </block>
  390 + </view>
  391 + <!-- 门店列表底部 -->
  392 + <view class="store-bottom-frame">
  393 + <view class="store-bottom flex-vertical-between">
  394 + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">
  395 + 确定
  396 + </view>
  397 + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">
  398 + 设为默认
  399 + </view>
  400 + </view>
  401 + </view>
  402 + </block>
  403 + <block wx:else>
  404 + <view class="popup-top flex-space-between">
  405 + <text class="fs32 nearby_store">门店分类选择</text>
  406 + <view>
  407 + <view>
  408 + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
  409 + </view>
  410 + <view class="felx choose_mores" bindtap="returns">
  411 + <text class="fs26 red-co">返回</text>
  412 + </view>
  413 + </view>
  414 + </view>
  415 + <view class="sort_store_list">
  416 + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}">
  417 + <view class="sort-store flex-vertical-between">
  418 + <view class="fs30" di>{{item.name}}</view>
  419 + <view class="black_rights-frame">
  420 + <view class="black_rights"></view>
  421 + </view>
  422 + </view>
  423 + </view>
  424 + </view>
  425 + </block>
  426 + </view>
  427 +</block>
  428 +
  429 +
  430 +<warn id="warn"></warn>
0 \ No newline at end of file 431 \ No newline at end of file
components/add_purchase/add_purchase.wxss 0 → 100644
  1 +@import "../../utils/wxParse/wxParse.wxss";
  2 +
  3 +
  4 +.cover-layer {
  5 + position: fixed;
  6 + left: 0;
  7 + top: 0;
  8 + right: 0;
  9 + bottom: 0;
  10 + z-index: 11;
  11 + background: rgba(0,0,0,0.4);
  12 + width: 100%;
  13 + height: 100%;
  14 +}
  15 +.container {
  16 + margin-bottom: 100rpx;
  17 + overflow: hidden;
  18 + padding-top: 80rpx;
  19 +}
  20 +
  21 +image {
  22 + vertical-align: top;
  23 +}
  24 +.rules {
  25 + position: fixed;
  26 + background-color: rgba(0,0,0,.2);
  27 + color: white;
  28 + top: 22rpx;
  29 + right: 0;
  30 + z-index: 100;
  31 + font-size: 26rpx;
  32 + padding: 0 20rpx;
  33 + z-index: 99999;
  34 + border-radius: 20rpx 0 0 20rpx;
  35 +}
  36 +
  37 +.rule-pop-container {
  38 + position: fixed;
  39 + left: 0;
  40 + bottom: 0;
  41 + width: 100%;
  42 + background-color: white;
  43 + z-index: 99999;
  44 + border-radius: 16rpx 16rpx 0 0;
  45 + padding: 0 40rpx;
  46 + box-sizing: border-box;
  47 + font-size: 28rpx;
  48 + color: #444;
  49 +}
  50 +
  51 +.pop-title {
  52 + padding: 20rpx 0;
  53 + text-align: center;
  54 + font-size: 32rpx;
  55 + position: relative;
  56 +}
  57 +.icon-guan {
  58 + position: absolute;
  59 + right: 0;
  60 + font-size: 26rpx;
  61 + top: 50%;
  62 + transform: translateY(-50%);
  63 + color: #ccc;
  64 +}
  65 +.btn {
  66 + color: white;
  67 + padding: 20rpx 0;
  68 + text-align: center;
  69 + border-radius: 40rpx;
  70 + background: -webkit-linear-gradient(left,#ff5000,#ff2000) no-repeat;
  71 +}
  72 +
  73 +.goods-detail {
  74 + overflow: hidden
  75 +}
  76 +.popup-content {
  77 + max-height: 600rpx;
  78 + overflow-y: auto;
  79 +}
  80 +
  81 +.type-navbar {
  82 + display: flex;
  83 + justify-content: center;
  84 + width: 100%;
  85 + position: fixed;
  86 + top: 0;
  87 + z-index: 999;
  88 + /* height: 80rpx; */
  89 + /* margin-bottom: 20rpx; */
  90 + background-color: #fff;
  91 + border-top: 2rpx solid #ebedf0;
  92 + /* border-bottom: 1rpx #fafafa solid; */
  93 +}
  94 +
  95 +.type-box {
  96 + width: 25%;
  97 + box-sizing: border-box;
  98 + font-size: 32rpx;
  99 + line-height: 76rpx;
  100 + padding: 0 20rpx;
  101 + text-align: center;
  102 + display: inline-block;
  103 + overflow: hidden;
  104 +}
  105 +
  106 +.type-navbar-item {
  107 + /* border-bottom: 4rpx solid #fff; */
  108 + display: flex;
  109 + justify-content: center;
  110 + width: 100%;
  111 + font-size: 26rpx;
  112 +}
  113 +
  114 +.type-item-on {
  115 + color: #F95D74;
  116 + font-weight: bold;
  117 + /* border-bottom: 4rpx solid #F95D74; */
  118 + position: relative;
  119 + font-size: 30rpx;
  120 +}
  121 +
  122 +.type-item-on:after {
  123 + content: '';
  124 + position: absolute;
  125 + width: 50%;
  126 + height: 4rpx;
  127 + background-color: #F95D74;
  128 + left: 0;
  129 + right: 0;
  130 + bottom: 0;
  131 + margin: 0 auto;
  132 +}
  133 +
  134 +.swiper_box {
  135 + width: 100%;
  136 + height: 750rpx;
  137 +}
  138 +
  139 +.goods-title {
  140 + display: flex;
  141 + justify-content: space-between;
  142 + align-items: center;
  143 + vertical-align: middle;
  144 + /* overflow: hidden; */
  145 + /* height: 108rpx; */
  146 +}
  147 +
  148 +.goods-name {
  149 + /* width: 560rpx; */
  150 + /* line-height: 46rpx; */
  151 + font-size: 32rpx;
  152 + font-weight: bold;
  153 + color: #333;
  154 + /* margin-top: 30rpx;
  155 + margin-bottom:30rpx; */
  156 + flex: 1;
  157 + text-align: justify;
  158 + margin: 10rpx 0 20rpx;
  159 +}
  160 +
  161 +.goods-collect {
  162 + width: 112rpx;
  163 + padding-top: 30rpx;
  164 +}
  165 +
  166 +.collect-img {
  167 + width: 50rpx;
  168 + height: 44rpx;
  169 + margin: 0 auto;
  170 + overflow: hidden;
  171 +}
  172 +
  173 +.collect-des {
  174 + text-align: center;
  175 + font-size: 24rpx;
  176 + color: #333;
  177 +}
  178 +
  179 +.goods-price {
  180 + font-size: 60rpx;
  181 + /* padding: 20rpx 34rpx; */
  182 + /* padding:0rpx 34rpx; */
  183 + /* line-height: 60rpx; */
  184 + color: #999;
  185 + padding: 20rpx;
  186 + /* margin-top: 46rpx; */
  187 + /* margin-top:26rpx;
  188 + padding-bottom:20rpx; */
  189 +}
  190 +
  191 +.prom-info {
  192 + margin: 10rpx 0;
  193 + color: #f23030;
  194 +}
  195 +
  196 +.prom-info>.prom-type {
  197 + color: white;
  198 + background-color: #f23030;
  199 + margin-right: 14rpx;
  200 + padding: 2rpx 8rpx;
  201 + border-radius: 4rpx;
  202 +}
  203 +
  204 +.market-price {
  205 + /* display: flex;
  206 + margin-left: -5rpx; */
  207 +}
  208 +
  209 +.market-price .yuan {
  210 + /* top:24rpx; */
  211 + font-size: 30rpx
  212 +}
  213 +
  214 +.market-price>view>text {
  215 + text-decoration: line-through;
  216 +}
  217 +
  218 +.market-price>.yj {
  219 + color: #999999;
  220 + font-size: 24rpx;
  221 + /* margin-left: 16rpx;position: relative;top:30rpx; */
  222 + display: inline-block;
  223 +}
  224 +
  225 +.goods-price>.tm {
  226 + color: #999999;
  227 + font-size: 26rpx;
  228 + margin-top: 10rpx;
  229 +}
  230 +
  231 +.goods-num {
  232 + display: flex;
  233 + font-size: 24rpx;
  234 + justify-content: space-between;
  235 +}
  236 +
  237 +.goods-detail .twen {
  238 + background: #fff;
  239 + height: 60rpx;
  240 + line-height: 60rpx;
  241 + font-size: 30rpx;
  242 + padding-left: 30rpx;
  243 + display: flex;
  244 +}
  245 +
  246 +.goods-detail .twen .img {
  247 + width: 32rpx;
  248 + height: 32rpx;
  249 + margin-left: 200rpx;
  250 + background: #fff
  251 +}
  252 +
  253 +.goods-detail .twen image.img {
  254 + vertical-align: auto;
  255 +}
  256 +
  257 +
  258 +.logistics-item {
  259 + display: flex;
  260 + justify-content: space-between;
  261 + align-items: center;
  262 + height: 90rpx;
  263 + /*border-bottom: 1px solid #f5f5f5;*/
  264 + font-size: 32rpx;
  265 + color: #666;
  266 +}
  267 +
  268 +.logistics-item .small {
  269 + color: #999;
  270 + font-size: 24rpx;
  271 +}
  272 +
  273 +.item-title {
  274 + width: 180rpx;
  275 +}
  276 +
  277 +.item-mes {
  278 + color: #333;
  279 + width: 420rpx;
  280 + height: 90rpx;
  281 + line-height: 90rpx;
  282 +}
  283 +
  284 +.item-img {
  285 + width: 32rpx;
  286 + height: 32rpx;
  287 +}
  288 +
  289 +.prom-item {
  290 + color: #f23030;
  291 + border: 1px solid #f23030;
  292 + border-radius: 18rpx;
  293 + line-height: 40rpx;
  294 + height: 40rpx;
  295 + padding: 2rpx 8rpx;
  296 +}
  297 +
  298 +.guarantee {
  299 + justify-content: space-around;
  300 +}
  301 +
  302 +.ico-item {
  303 + width: 32rpx;
  304 + height: 32rpx;
  305 + margin-right: 10rpx;
  306 +}
  307 +
  308 +.guarantee>view {
  309 + display: flex;
  310 + align-items: center;
  311 + height: 32rpx;
  312 + color: #666;
  313 +}
  314 +
  315 +.user-comment {
  316 + margin: 10rpx 0;
  317 + font-size: 28rpx;
  318 +}
  319 +
  320 +.good-comment,
  321 +.comment-num {
  322 + display: flex;
  323 +}
  324 +
  325 +.recommend {
  326 + background-color: #fff;
  327 + border-bottom: 1px solid #ddd;
  328 + padding-bottom: 20rpx;
  329 +}
  330 +
  331 +.recommend-title {
  332 + height: 70rpx;
  333 + line-height: 70rpx;
  334 + font-size: 28rpx;
  335 + padding: 0 30rpx;
  336 +}
  337 +
  338 +.recommend-ul {
  339 + display: flex;
  340 + justify-content: flex-start;
  341 +}
  342 +
  343 +.recommend-ul .li {
  344 + width: 25%;
  345 + box-sizing: border-box;
  346 + text-align: center;
  347 + font-size: 28rpx;
  348 + color: #333;
  349 +}
  350 +
  351 +.li-img {
  352 + width: 120rpx;
  353 + height: 120rpx;
  354 + margin: 0 auto;
  355 +}
  356 +
  357 +.li-title {
  358 + height: 58rpx;
  359 + line-height: 30rpx;
  360 + margin: 10rpx 0;
  361 +}
  362 +
  363 +.comment-item {
  364 + background-color: #fff;
  365 + font-size: 28rpx;
  366 +}
  367 +
  368 +.comment-title {
  369 + display: flex;
  370 + justify-content: space-between;
  371 + align-items: center;
  372 + height: 102rpx;
  373 + margin: 0 30rpx;
  374 + color: #333;
  375 + border-bottom: 1px solid #eee;
  376 +}
  377 +
  378 +.user-name {
  379 + display: flex;
  380 + align-items: center;
  381 +}
  382 +
  383 +.user-pic {
  384 + width: 54rpx;
  385 + height: 54rpx;
  386 + margin-right: 10rpx;
  387 + border-radius: 50%;
  388 + overflow: hidden;
  389 +}
  390 +
  391 +.stars {
  392 + float: left;
  393 + display: flex;
  394 + height: 42rpx;
  395 + line-height: 42rpx;
  396 + margin: 15rpx 0;
  397 + width: 200rpx;
  398 +}
  399 +
  400 +.star {
  401 + width: 26rpx;
  402 + height: 26rpx;
  403 + margin-right: 5rpx;
  404 +}
  405 +
  406 +.state-spec {
  407 + margin: 15rpx 0;
  408 + float: right;
  409 + font-size: 24rpx;
  410 + color: #666;
  411 + width: 460rpx;
  412 + text-align: right;
  413 +}
  414 +
  415 +.comment-cont {
  416 + padding: 0 30rpx 30rpx;
  417 + border-bottom: 1px solid #eee;
  418 +}
  419 +
  420 +.comment-mes {
  421 + line-height: 42rpx;
  422 +}
  423 +
  424 +.img-ul {
  425 + display: flex;
  426 + flex-wrap: wrap;
  427 +}
  428 +
  429 +.img-li {
  430 + width: 150rpx;
  431 + height: 150rpx;
  432 + margin-top: 8rpx;
  433 + margin-right: 10rpx;
  434 +}
  435 +
  436 +.comment-btn {
  437 + height: 60rpx;
  438 + padding: 20rpx 30rpx;
  439 +}
  440 +
  441 +.comment-btn .btn {
  442 + display: flex;
  443 + justify-content: center;
  444 + align-items: center;
  445 + height: 60rpx;
  446 + width: 45%;
  447 + border: 1px solid #eee;
  448 +}
  449 +
  450 +.comment-btn .btn-img {
  451 + width: 30rpx;
  452 + height: 28rpx;
  453 + margin: 0 10rpx;
  454 +}
  455 +
  456 +.reply-ul {
  457 + margin-top: 20rpx;
  458 +}
  459 +
  460 +.reply-li {
  461 + color: #aaa;
  462 +}
  463 +
  464 +.join-cart {
  465 + position: fixed;
  466 + left: 0;
  467 + bottom: 0;
  468 + display: flex;
  469 + width: 100%;
  470 + height: 100rpx;
  471 + background-color: #fff;
  472 + z-index: 9;
  473 + border-top: 4rpx solid #eee;
  474 +
  475 +}
  476 +
  477 +.join-cart>view {
  478 + width: 29%;
  479 +}
  480 +
  481 +.join-cart>.new_split {
  482 + width: 13%;
  483 + text-align: center;
  484 + padding: 0;
  485 + margin: 0;
  486 +}
  487 +
  488 +.cart-ico {
  489 + font-size: 24rpx;
  490 + color: #333;
  491 +}
  492 +
  493 +.shopping-cart {
  494 + position: relative;
  495 +}
  496 +
  497 +.cs-img {
  498 + width: 45rpx;
  499 + height: 40rpx;
  500 + margin-top: 15rpx;
  501 +}
  502 +
  503 +.sc-img {
  504 + width: 42rpx;
  505 + height: 40rpx;
  506 + margin-top: 15rpx;
  507 +}
  508 +
  509 +.cart-num {
  510 + position: absolute;
  511 + left: 50%;
  512 + top: 1rpx;
  513 + width: 40rpx;
  514 + height: 40rpx;
  515 + line-height: 40rpx;
  516 + text-align: center;
  517 + border-radius: 50%;
  518 + color: #fff;
  519 + background-color: rgba(217, 81, 99, 0.9);
  520 +}
  521 +
  522 +.cart-btn {
  523 + font-size: 28rpx;
  524 + color: #fff;
  525 + line-height: 70rpx;
  526 + margin-top: 16rpx;
  527 + text-align: center;
  528 +
  529 +
  530 +}
  531 +
  532 +.join-btn {
  533 + background-color: #ffb03f;
  534 + height: 70rpx;
  535 + border-radius: 55rpx 0rpx 0rpx 55rpx;
  536 + margin-top: 16rpx;
  537 +
  538 +
  539 +}
  540 +
  541 +view.cart-btn-lg {
  542 + width: 50%;
  543 +}
  544 +
  545 +.buy-btn {
  546 + background-color: #f23030;
  547 + height: 70rpx;
  548 + border-radius: 0 56rpx 55rpx 0;
  549 +
  550 +}
  551 +
  552 +.buy-btn-all {
  553 + background-color: #f23030;
  554 + height: 70rpx;
  555 + border-radius: 56rpx;
  556 +}
  557 +
  558 +
  559 +.toTop {
  560 + position: fixed;
  561 + z-index: 3;
  562 + right: 20rpx;
  563 + bottom: 160rpx;
  564 + width: 68rpx;
  565 + height: 68rpx;
  566 + border: 1px solid #ddd;
  567 + border-radius: 50%;
  568 + overflow: hidden;
  569 + cursor: pointer;
  570 +}
  571 +
  572 +.comment-more {
  573 + height: 56rpx;
  574 + line-height: 56rpx;
  575 + font-size: 26rpx;
  576 + color: #999;
  577 + text-align: center;
  578 + background-color: #eee;
  579 +}
  580 +
  581 +.goods-more {
  582 + background-color: #fff;
  583 +}
  584 +
  585 +.goods-norms {
  586 + background-color: #fff;
  587 +}
  588 +
  589 +.type-navbar2 {
  590 + display: flex;
  591 + height: 72rpx;
  592 + border-top: 1px solid #ddd;
  593 + border-bottom: 1px solid #ddd;
  594 +}
  595 +
  596 +.type-box2 {
  597 + width: 50%;
  598 + font-size: 26rpx;
  599 + line-height: 72rpx;
  600 + text-align: center;
  601 + overflow: hidden;
  602 +}
  603 +
  604 +.type-item2-on {
  605 + color: #f23030;
  606 +}
  607 +
  608 +.parameter {
  609 + padding: 40rpx 0;
  610 +}
  611 +
  612 +.table {
  613 + width: 698rpx;
  614 + margin: 0 auto;
  615 + border: 1px solid #ddd;
  616 + border-bottom: none;
  617 +}
  618 +
  619 +.tb {
  620 + width: 100%;
  621 + min-height: 69rpx;
  622 + line-height: 69rpx;
  623 + border-bottom: 1px solid #ddd;
  624 + font-size: 28rpx;
  625 + text-align: center;
  626 + color: #333;
  627 +}
  628 +
  629 +.th-thitle {
  630 + font-weight: bold;
  631 + background-color: #f5fafe;
  632 +}
  633 +
  634 +.td-cont {
  635 + display: flex;
  636 +}
  637 +
  638 +.td-title {
  639 + width: 259rpx;
  640 + background-color: #f5fafe;
  641 + border-right: 1px solid #ddd;
  642 +}
  643 +
  644 +.td-text {
  645 + width: 439rpx;
  646 +}
  647 +
  648 +.goods-comment {
  649 + background-color: #fff;
  650 +}
  651 +
  652 +.type-navbar3 {
  653 + display: flex;
  654 + height: 88rpx;
  655 + border-top: 1px solid #ddd;
  656 + border-bottom: 1px solid #ddd;
  657 + padding: 10rpx 0;
  658 +}
  659 +
  660 +.type-box3 {
  661 + width: 20%;
  662 + font-size: 30rpx;
  663 + line-height: 44rpx;
  664 + text-align: center;
  665 + overflow: hidden;
  666 +}
  667 +
  668 +.type-item3-on {
  669 + color: #f23030;
  670 +}
  671 +
  672 +.spec-model {
  673 + position: fixed;
  674 + bottom: 0;
  675 + z-index: 200000000;
  676 + background: white;
  677 + width: 100%;
  678 + /* padding: 0 30rpx; */
  679 + font-size: 32rpx;
  680 + box-sizing: border-box;
  681 + border-radius: 20rpx 20rpx 0 0;
  682 + /* height: 72%; */
  683 +}
  684 +
  685 +.spec-model .pding {
  686 + padding: 0 20rpx;
  687 +}
  688 +
  689 +.spec-goods {
  690 + padding: 30rpx 0 20rpx;
  691 + /* float: left; */
  692 + width: 100%;
  693 + /* border-bottom:2rpx solid #eee; */
  694 +}
  695 +
  696 +.spec-img {
  697 + float: left;
  698 + height: 186rpx;
  699 + width: 186rpx;
  700 + border: 4rpx solid #eee
  701 +}
  702 +
  703 +.spec-goods-info {
  704 + float: left;
  705 + padding: 0 25rpx;
  706 + width: 400rpx;
  707 +}
  708 +
  709 +.spec-goods-name {
  710 + font-size: 30rpx;
  711 + line-height: 35rpx;
  712 + height: 70rpx;
  713 + margin: 15rpx 20rpx 25rpx 0;
  714 + overflow: hidden;
  715 + text-overflow: ellipsis;
  716 + color: #333;
  717 +}
  718 +
  719 +.spec-goods-price {
  720 + color: #d60021;
  721 + font-size: 33rpx;
  722 + font-weight: bold;
  723 + /* display: flex; */
  724 +}
  725 +
  726 +.spec-goods-stock {
  727 + margin-top: 3rpx;
  728 + font-size: 24rpx;
  729 + color: #999999;
  730 + margin-right: 15rpx;
  731 +}
  732 +
  733 +.spec-name {
  734 + clear: both;
  735 + padding: 20rpx 0;
  736 + font-size: 30rpx;
  737 + color: #333;
  738 +}
  739 +
  740 +
  741 +.spec-name+view{
  742 + flex-wrap: wrap;
  743 +}
  744 +
  745 +.quhuo {
  746 + font-size: 30rpx;
  747 + color: #000
  748 +}
  749 +
  750 +.b_num {
  751 + display: flex;
  752 + font-size: 30rpx;
  753 + color: #333;
  754 + justify-content: space-between;
  755 + align-items: center;
  756 + padding: 20rpx 0;
  757 +}
  758 +
  759 +.count {
  760 + /* position: fixed; */
  761 + display: flex;
  762 + height: 50rpx;
  763 + /* border: 1rpx solid #000; */
  764 + font-size: 28rpx;
  765 + right: 30rpx;
  766 +}
  767 +
  768 +
  769 +.count>view,
  770 +.count>input {
  771 + width: 60rpx;
  772 + height: 50rpx;
  773 + line-height: 50rpx;
  774 + text-align: center;
  775 +}
  776 +
  777 +.spec_bt {
  778 + background: fff;
  779 + color: #333;
  780 + margin-left: 10rpx;
  781 + padding: 4rpx 15rpx 4rpx;
  782 + display: inline-block;
  783 + border-radius: 30rpx;
  784 + font-size: 24rpx;
  785 + border: 1rpx solid #ccc;
  786 + margin: 10rpx;
  787 + height: 40rpx;
  788 + line-height: 40rpx;
  789 +}
  790 +
  791 +.spec_bt.act {
  792 + background: #d60021;
  793 + color: #fff;
  794 + border: 1rpx solid #d60021;
  795 +}
  796 +
  797 +.sub,
  798 +.add,
  799 +.count>input {
  800 + /* border-right: 1px solid #000; */
  801 + background-color: #f8f8f8;
  802 + border-radius: 8rpx;
  803 +}
  804 +
  805 +.sub.active {
  806 + /* background-color: #ddd; */
  807 + color: #ccc;
  808 +}
  809 +
  810 +.count>input {
  811 + margin: 0 10rpx;
  812 +}
  813 +
  814 +.add {
  815 + /* background-color: #f8f8f8; */
  816 + /* border-left: 1px solid #000; */
  817 +}
  818 +
  819 +.spec-btn {
  820 + color: black;
  821 + background-color: white;
  822 + padding: 10rpx 10rpx;
  823 + font-size: 26rpx;
  824 + line-height: 28rpx;
  825 + float: left;
  826 + border: 1rpx solid #dedede;
  827 + margin: 4rpx 10rpx 4rpx 0;
  828 + border-radius: 4rpx;
  829 +}
  830 +
  831 +.spec-btn-click {
  832 + color: white;
  833 + background-color: #f23030;
  834 + border: 1rpx solid #f23030;
  835 +}
  836 +
  837 +.spec-cart-btns {
  838 + /* width: 92%; */
  839 + line-height: 70rpx;
  840 + /* margin: 0rpx auto;
  841 + margin-top: 160rpx; */
  842 + /* border-radius: 20rpx; */
  843 + /* position: fixed; */
  844 + /* bottom: 50rpx; */
  845 + /* left: 4%; */
  846 + padding: 20rpx;
  847 +}
  848 +
  849 +.spec-cart-btn {
  850 +
  851 + width: 100%;
  852 + font-size: 30rpx;
  853 + text-align: center;
  854 + color: white;
  855 + border-radius: 40rpx;
  856 +}
  857 +
  858 +.spec-cart-btn.w40 {
  859 + width: 46%;
  860 +}
  861 +
  862 +.spec-add-cart {
  863 + background-color: #ffb03f;
  864 +}
  865 +
  866 +.spec-buy {
  867 + background-color: #f23030;
  868 + /* margin-left: 34rpx; */
  869 +}
  870 +
  871 +.spec-cart-disable {
  872 + background: #bbbbbb;
  873 +}
  874 +
  875 +.spec-cart-btn-lg {
  876 + width: 614rpx;
  877 +}
  878 +
  879 +.prom-model {
  880 + position: fixed;
  881 + bottom: 0;
  882 + z-index: 20;
  883 + background: white;
  884 + width: 100%;
  885 + padding: 0 30rpx 30rpx;
  886 + font-size: 32rpx;
  887 + box-sizing: border-box;
  888 + overflow-x: hidden;
  889 +}
  890 +
  891 +.prom-model .prom-title {
  892 + text-align: center;
  893 + margin: 30rpx 0;
  894 +}
  895 +
  896 +.prom-model .logistics-item {
  897 + border: 0;
  898 +}
  899 +
  900 +.prom-model .item-mes {
  901 + width: 500rpx;
  902 +}
  903 +
  904 +.integral-btn {
  905 + width: 100%;
  906 + padding: 0rpx;
  907 + margin: 0rpx;
  908 +}
  909 +
  910 +.clear {
  911 + clear: both;
  912 +}
  913 +
  914 +.sto_v .title,
  915 +.sto_v .stitle {
  916 + border-top: 1rpx solid #dedede;
  917 + border-bottom: 1rpx solid #dedede;
  918 + height: 78rpx;
  919 + line-height: 78rpx;
  920 +}
  921 +
  922 +.sto_v .title .tubiao,
  923 +.sto_v .stitle .tubiao {
  924 + width: 32rpx;
  925 + height: 32rpx;
  926 + margin-top: 23rpx;
  927 +}
  928 +
  929 +.itemlists .item {
  930 + border-bottom: 1rpx solid #dedede;
  931 + height: 72rpx;
  932 + line-height: 72rpx;
  933 + font-size: 28rpx;
  934 + margin: 0 10rpx;
  935 +}
  936 +
  937 +.cshu {
  938 + margin-bottom: 30rpx;
  939 + margin-top: 20rpx;
  940 +}
  941 +
  942 +.cshu view {
  943 + color: #999;
  944 + font-size: 30rpx;
  945 + margin-left: 26rpx;
  946 +}
  947 +
  948 +
  949 +/*---活动特殊显示---*/
  950 +.prom_show {
  951 + height: 120rpx;
  952 + display: flex;
  953 +}
  954 +
  955 +.prom_show .secondkill-img {
  956 + width: 100%;
  957 + height: 100%;
  958 +}
  959 +
  960 +.prom_show .spike-img {
  961 + width: 283rpx;
  962 + height: 57rpx;
  963 + top: 35rpx;
  964 + left: 31rpx;
  965 +}
  966 +
  967 +.prom_show .stop {
  968 + color: #d81731;
  969 + top: 17rpx;
  970 + right: 65rpx;
  971 + font-weight: 600;
  972 +}
  973 +
  974 +.prom_show .start {
  975 + color: #009ae2;
  976 + top: 17rpx;
  977 + right: 65rpx;
  978 + font-weight: 600;
  979 +}
  980 +
  981 +.prom_show .timeac {
  982 + font-size: 32rpx;
  983 + height: 120rpx;
  984 + color: #333;
  985 +}
  986 +
  987 +.prom_show .timeac.left {
  988 + width: 66%;
  989 + color: #fff;
  990 + background: #f23030;
  991 +}
  992 +
  993 +.prom_show .timeac.right {
  994 + width: 34%;
  995 + background-color: #d7d7d7;
  996 + text-align: center
  997 +}
  998 +
  999 +.prom_show .secview .day {
  1000 + padding-right: 10rpx;
  1001 +}
  1002 +
  1003 +.prom_show .secview .time-val {
  1004 + width: 36rpx;
  1005 + height: 36rpx;
  1006 + border-radius: 7rpx;
  1007 + line-height: 36rpx;
  1008 +}
  1009 +
  1010 +.prom_show .secview .time {
  1011 + margin-right: 10rpx;
  1012 + margin-left: 10rpx;
  1013 +}
  1014 +
  1015 +
  1016 +.prom_show .timeac.left view {
  1017 + margin-left: 20rpx
  1018 +}
  1019 +
  1020 +.prom_show .timeac.left view.firview {
  1021 + margin-top: 10rpx
  1022 +}
  1023 +
  1024 +.prom_show .timeac.left view .tr_line {
  1025 + text-decoration: line-through;
  1026 + font-size: 28rpx;
  1027 +}
  1028 +
  1029 +.prom_show .timeac.left view .bprice {
  1030 + font-size: 50rpx;
  1031 +}
  1032 +
  1033 +.prom_show .timeac.right view.firview {
  1034 + margin-top: 12rpx;
  1035 + margin-bottom: 10rpx
  1036 +}
  1037 +
  1038 +.prom_show .timeac.right view.secview {
  1039 + display: flex;
  1040 + text-align: center;
  1041 + justify-content: center;
  1042 + flex-direction: row;
  1043 +}
  1044 +
  1045 +.prom_show .timeac.right view .tui-conutdown-box {
  1046 + /* background: #6b6b6b; */
  1047 + width: auto;
  1048 + /* min-width: 45rpx; */
  1049 + height: 45rpx;
  1050 + color: #c4182e;
  1051 + font-size: 27rpx;
  1052 + text-align: center;
  1053 + line-height: 46rpx;
  1054 +}
  1055 +
  1056 +.huise {
  1057 + background: gray
  1058 +}
  1059 +
  1060 +.lanse {
  1061 + background: #0199e2
  1062 +}
  1063 +
  1064 +
  1065 +/*------拼单------*/
  1066 +.pt_view {
  1067 + text-align: center;
  1068 + width: 100%;
  1069 + height: 100rpx;
  1070 + line-height: 100rpx;
  1071 + font-size: 26rpx
  1072 +}
  1073 +
  1074 +.pt_view .secondkill-img {
  1075 + width: 100%;
  1076 + height: 100%;
  1077 +}
  1078 +
  1079 +.pt_fir {
  1080 + background: #fff;
  1081 + /* margin-bottom: 10rpx; */
  1082 +}
  1083 +
  1084 +.pt_fir .pt_fir_title {
  1085 + display: flex;
  1086 + align-items: center;
  1087 + /* margin-left: 10rpx; margin-top: 20rpx; */
  1088 + font-size: 28rpx;
  1089 + position: relative;
  1090 +}
  1091 +
  1092 +.pt_fir .pt_fir_title .kt_type {
  1093 + color: #fff;
  1094 + background: #e9030d;
  1095 + width: 100rpx;
  1096 + line-height: 40rpx;
  1097 + border-radius: 6rpx;
  1098 + margin: 0 10rpx;
  1099 + height: 40rpx;
  1100 + font-size: 24rpx;
  1101 + text-align: center;
  1102 +}
  1103 +
  1104 +.pt_fir .pt_fir_title .price {
  1105 + color: #e9030d;
  1106 + font-size: 26rpx;
  1107 +}
  1108 +
  1109 +.pt_fir .pt_fir_title .bigw {
  1110 + font-size: 36rpx;
  1111 +}
  1112 +
  1113 +.pt_fir .pt_fir_title .tprice {
  1114 + text-decoration: line-through;
  1115 + color: #949494
  1116 +}
  1117 +
  1118 +.pt_fir .pt_fir_title .tprice.ml50 {
  1119 + margin-left: 50rpx
  1120 +}
  1121 +
  1122 +.pt_fir .pt_fir_title .js {
  1123 + padding: 0 15rpx;
  1124 + height: 40rpx;
  1125 + background: #e9030d;
  1126 + text-align: center;
  1127 + border-radius: 8rpx;
  1128 + color: #fff;
  1129 + margin-left: 10rpx;
  1130 +}
  1131 +
  1132 +.pt_fir .pt_fir_title .tuannum {
  1133 + color: #e9030d;
  1134 + position: absolute;
  1135 + right: 20rpx;
  1136 + font-size: 26rpx;
  1137 +}
  1138 +
  1139 +.pding {
  1140 + padding-top: 20rpx;
  1141 + padding-left: 20rpx;
  1142 + height: 81%;
  1143 + padding-right: 20rpx;
  1144 + font-size: 26rpx;
  1145 + color: #ea120f
  1146 +}
  1147 +
  1148 +.pdres {
  1149 + margin-left: 10rpx;
  1150 + color: #8f8f94
  1151 +}
  1152 +
  1153 +.ptgz {
  1154 + position: relative;
  1155 + font-size: 30rpx;
  1156 + padding-left: 20rpx;
  1157 + margin-top: 10rpx;
  1158 + overflow: hidden
  1159 +}
  1160 +
  1161 +.shuxian {
  1162 + width: 6rpx;
  1163 + height: 28rpx;
  1164 + background: #ea120f;
  1165 + display: inline-block;
  1166 + top: 5rpx;
  1167 + position: relative;
  1168 + margin-right: 5rpx
  1169 +}
  1170 +
  1171 +.ptgz_an {
  1172 + position: absolute;
  1173 + top: 5rpx;
  1174 + right: 6rpx
  1175 +}
  1176 +
  1177 +.ptgz_an .arrow-two {
  1178 + width: 18rpx;
  1179 + height: 18rpx;
  1180 + border-color: #da0b31;
  1181 + margin-top: 30rpx;
  1182 +}
  1183 +
  1184 +.pt_fir.se {
  1185 + height: auto;
  1186 + margin-bottom: 10rpx
  1187 +}
  1188 +
  1189 +.t_gz {
  1190 + padding: 10rpx 20rpx;
  1191 + font-size: 28rpx
  1192 +}
  1193 +
  1194 +.pt_fir.se1 {
  1195 + height: auto;
  1196 + margin: 0
  1197 +}
  1198 +
  1199 +.pt_fir.se2 {
  1200 + height: auto;
  1201 + margin: 0;
  1202 + /* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */
  1203 +}
  1204 +
  1205 +.pt_hb {
  1206 + height: 78rpx;
  1207 + line-height: 75rpx;
  1208 + position: relative;
  1209 + font-size: 32rpx;
  1210 + overflow: hidden;
  1211 + width: 695rpx;
  1212 + margin-left: 28rpx;
  1213 + border-bottom: 1rpx solid #E5E5E5
  1214 +}
  1215 +
  1216 +.ptgz_an.xq {
  1217 + font-size: 32rpx;
  1218 + color: #d40024
  1219 +}
  1220 +
  1221 +.wf {
  1222 + display: flex;
  1223 + padding: 20rpx 0;
  1224 +}
  1225 +
  1226 +.wf .item {
  1227 + width: 24.5%;
  1228 + text-align: center;
  1229 + font-size: 26rpx;
  1230 + color: #666
  1231 +}
  1232 +
  1233 +.wf .item .item_txy {
  1234 + position: relative;
  1235 + width: 60rpx;
  1236 + height: 60rpx;
  1237 + background: #ea120f;
  1238 + border-radius: 50%;
  1239 + left: 50%;
  1240 + margin-left: -30rpx;
  1241 + border: 3px #dfdfdf solid;
  1242 + text-align: center;
  1243 + line-height: 60rpx;
  1244 + color: #fff;
  1245 + margin-bottom: 10rpx;
  1246 +}
  1247 +
  1248 +.wf .item .item_txy.hs {
  1249 + background: #cbcbcb;
  1250 +}
  1251 +
  1252 +.po {
  1253 + margin-bottom: 20rpx;
  1254 +}
  1255 +
  1256 +.cart-btn.line-h {
  1257 + line-height: 26rpx;
  1258 +}
  1259 +
  1260 +.cart-btn .fir-v {
  1261 + margin-top: 10rpx;
  1262 +}
  1263 +
  1264 +.hyt {
  1265 + padding: 0 20rpx;
  1266 + font-size: 30rpx;
  1267 + display: flex;
  1268 + align-items: center;
  1269 + margin-top: 10rpx;
  1270 +}
  1271 +
  1272 +.hyt .r_f {
  1273 + color: #e9120f;
  1274 + font-size: 26rpx;
  1275 + position: relative;
  1276 + top: 3rpx
  1277 +}
  1278 +
  1279 +.hyt .byj {
  1280 + color: #e9120f;
  1281 + font-size: 32rpx;
  1282 + position: relative;
  1283 + top: 5rpx
  1284 +}
  1285 +
  1286 +.pt_fir .pt_fir_title.no-mar-b {
  1287 + margin-bottom: 0;
  1288 + padding-bottom: 10rpx;
  1289 + margin-left: 20rpx
  1290 +}
  1291 +
  1292 +.pt_fir .pt_fir_title.boder-1 {
  1293 + border-bottom: 1rpx #e7e7e7 solid
  1294 +}
  1295 +
  1296 +.jie_price {
  1297 + /* padding: 10rpx 30rpx; */
  1298 +}
  1299 +
  1300 +.jie_price_title {
  1301 + font-size: 30rpx;
  1302 + color: #a26270;
  1303 + margin-bottom: 10rpx
  1304 +}
  1305 +
  1306 +.price_list {
  1307 + display: flex;
  1308 + width: 100%;
  1309 +}
  1310 +
  1311 +.price_item {
  1312 + width: 25%;
  1313 + font-size: 28rpx;
  1314 + color: #4c336c
  1315 +}
  1316 +
  1317 +.pt_fir.se2 .zzk-1 {
  1318 + /* margin-top: 23rpx; */
  1319 + font-size: 30rpx;
  1320 + position: relative;
  1321 + /* margin-bottom: 30rpx; */
  1322 + border-left: 4rpx solid red;
  1323 + /* margin-left:14rpx; */
  1324 + height: 30rpx;
  1325 + line-height: 30rpx;
  1326 + /* padding-left:5rpx; */
  1327 +}
  1328 +
  1329 +.ckgd {
  1330 + /* position: absolute;top:0;right:57rpx; */
  1331 + color: #d70025;
  1332 + font-size: 26rpx;
  1333 +}
  1334 +
  1335 +.ckgd .arrow-one {
  1336 + width: 14rpx;
  1337 + height: 14rpx;
  1338 + border-color: #da0b31;
  1339 + /* margin-top:5rpx; */
  1340 + margin: auto;
  1341 +}
  1342 +
  1343 +.bview {
  1344 + position: fixed;
  1345 + top: 0;
  1346 + left: 0;
  1347 + width: 100%;
  1348 + height: 100%;
  1349 + background-color: rgba(0, 0, 0, 0.5);
  1350 +}
  1351 +
  1352 +.juzhong {
  1353 + position: fixed;
  1354 + top: 0;
  1355 + left: 0;
  1356 + width: 100%;
  1357 + height: 100%;
  1358 + display: flex;
  1359 + flex-direction: row;
  1360 + justify-content: center;
  1361 + align-items: center;
  1362 +}
  1363 +
  1364 +.juzhong .xq {
  1365 + padding: 0 20rpx;
  1366 + background: #fff;
  1367 + font-size: 30rpx;
  1368 + padding-bottom: 20rpx;
  1369 +}
  1370 +
  1371 +.juzhong .xq .title {
  1372 + text-align: center;
  1373 + margin: 20rpx 0;
  1374 + position: relative;
  1375 + height: 50rpx;
  1376 +}
  1377 +
  1378 +.juzhong .xq .hs1 {
  1379 + font-size: 28rpx;
  1380 + color: #ab8f9e
  1381 +}
  1382 +
  1383 +.juzhong .xq .title .close {
  1384 + position: absolute;
  1385 + top: 0;
  1386 + right: 0;
  1387 + width: 45rpx;
  1388 + height: 45rpx;
  1389 +}
  1390 +
  1391 +.pt_qd {
  1392 + /* margin-top: 40rpx; height: auto; */
  1393 + padding: 20rpx;
  1394 +}
  1395 +
  1396 +.spec-cart-btn.w100 {
  1397 + width: 95%;
  1398 + margin-left: 0;
  1399 + height: 75rpx;
  1400 + line-height: 75rpx;
  1401 + margin: auto;
  1402 +}
  1403 +
  1404 +.sto_v {
  1405 + color: #333;
  1406 +}
  1407 +
  1408 +.ellipsis {
  1409 + overflow: hidden;
  1410 + white-space: nowrap;
  1411 + text-overflow: ellipsis;
  1412 +}
  1413 +
  1414 +
  1415 +/*---多少人参加团--*/
  1416 +.group {
  1417 + padding-top: 20rpx;
  1418 + padding-bottom: 20rpx;
  1419 + width: 100%;
  1420 + /* min-height: 92rpx; */
  1421 + border-bottom: 2rpx solid #ebedf0;
  1422 +
  1423 +}
  1424 +
  1425 +.group .group-list {
  1426 + display: flex;
  1427 + align-items: center;
  1428 + justify-content: space-around;
  1429 + /* height: 90rpx; */
  1430 + /* padding: 0 130rpx 0 100rpx; */
  1431 + /* width: 470rpx;
  1432 +
  1433 + position: absolute; */
  1434 +}
  1435 +
  1436 +.group .group-list .gtou {
  1437 + width: 70rpx;
  1438 + height: 70rpx;
  1439 + /* float: left;
  1440 + position: relative;
  1441 + top: 6rpx;
  1442 + left: -96rpx; */
  1443 +}
  1444 +
  1445 +.group .group-list .gtou image {
  1446 + display: block;
  1447 + width: 100%;
  1448 + height: 100%;
  1449 + border-radius: 50%;
  1450 + background-color: #f0f0f0;
  1451 +}
  1452 +
  1453 +.group .group-list .gdn {
  1454 + width: 140rpx;
  1455 + text-align: center;
  1456 + /* float: left; */
  1457 + font-size: 26rpx;
  1458 + /* padding-left: 20rpx; */
  1459 + /* line-height: 48rpx;
  1460 + height: 48rpx;
  1461 + width: 168rpx;
  1462 + position: relative;
  1463 + left: -80rpx;
  1464 + top:20rpx; */
  1465 + font-weight: bold;
  1466 +}
  1467 +
  1468 +.group .group-list .ghaicha {
  1469 + /* width:300rpx; */
  1470 + font-size: 27rpx;
  1471 + /* margin-left:180rpx;
  1472 + top:13rpx;
  1473 + left:-3rpx; */
  1474 + font-weight: bold;
  1475 +
  1476 +
  1477 +}
  1478 +
  1479 +.group .group-list .ghaicha .gred {
  1480 + /* height: 48rpx;
  1481 + width: 300rpx; */
  1482 +}
  1483 +
  1484 +.gsj {
  1485 + float: left;
  1486 + color: #8f8f94;
  1487 +}
  1488 +
  1489 +.group .group-list .cjt {
  1490 + height: 42rpx;
  1491 + width: 137rpx;
  1492 + /* position: absolute;
  1493 + right: 4rpx;
  1494 + top:25rpx; */
  1495 + line-height: 42rpx;
  1496 + font-size: 24rpx;
  1497 + color: #fff;
  1498 + border: 2rpx solid #d60024;
  1499 + background-color: #d60024;
  1500 + border-radius: 25rpx;
  1501 +
  1502 +}
  1503 +
  1504 +.gbody {
  1505 + background-color: white;
  1506 +}
  1507 +
  1508 +.t_show {
  1509 + /* overflow: hidden; */
  1510 + display: flex;
  1511 + /* width: 300rpx; */
  1512 + color: #292929;
  1513 + /* line-height: 36rpx; */
  1514 + font-size: 26rpx;
  1515 +}
  1516 +
  1517 +.join-cart>view.set_width {
  1518 + width: 58%;
  1519 +}
  1520 +
  1521 +/*秒杀样式zwp*/
  1522 +#zwpMs {
  1523 + width: 31%;
  1524 + color: #fff;
  1525 + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat;
  1526 + background-size: 100% 60px;
  1527 +}
  1528 +
  1529 +
  1530 +/*--------- 修改后的样式 -----------*/
  1531 +.elli {
  1532 + overflow: hidden;
  1533 + text-overflow: ellipsis;
  1534 + display: -webkit-box;
  1535 + -webkit-line-clamp: 2;
  1536 + -webkit-box-orient: vertical;
  1537 +}
  1538 +
  1539 +.one_elli {
  1540 + overflow: hidden;
  1541 + text-overflow: ellipsis;
  1542 + white-space: nowrap;
  1543 +}
  1544 +
  1545 +.tuwen_title {
  1546 + /* height: 86rpx; */
  1547 + background-color: #eeeeee;
  1548 + /* margin-bottom: 32rpx; */
  1549 + position: relative;
  1550 + display: flex;
  1551 + justify-content: center;
  1552 + align-items: center;
  1553 + padding: 20rpx;
  1554 +}
  1555 +
  1556 +.tuwen_title .g_line {
  1557 + width: 496rpx;
  1558 + height: 1rpx;
  1559 + border-bottom: #ababab 1rpx solid;
  1560 +}
  1561 +
  1562 +.tuwen_title .center_s {
  1563 + width: 124rpx;
  1564 + position: absolute;
  1565 + height: 34rpx;
  1566 + background-color: #eeeeee;
  1567 + font-size: 32rpx;
  1568 + display: flex;
  1569 + overflow: hidden;
  1570 + justify-content: center;
  1571 + align-items: center;
  1572 +}
  1573 +
  1574 +.tuwen_title .center_s image {
  1575 + width: 34rpx;
  1576 + height: 26rpx;
  1577 + margin-right: 10rpx
  1578 +}
  1579 +
  1580 +.t_g_info {
  1581 + /* margin: 0 34rpx;margin-bottom: 20rpx; */
  1582 + display: flex;
  1583 + align-items: center;
  1584 + padding: 20rpx;
  1585 +}
  1586 +
  1587 +.red_shu {
  1588 + width: 10rpx;
  1589 + height: 36rpx;
  1590 + background-color: #da0035;
  1591 + margin-right: 8rpx;
  1592 +}
  1593 +
  1594 +.tb-l {
  1595 + /* line-height: 96rpx; */
  1596 +}
  1597 +
  1598 +.table_s {
  1599 + border: #e4e4e4 1rpx solid;
  1600 + box-sizing: border-box;
  1601 + font-size: 26rpx;
  1602 +}
  1603 +
  1604 +.tb_item {
  1605 + display: flex;
  1606 + /* height: 96rpx; */
  1607 + border-bottom: 1rpx solid #e4e4e4
  1608 +}
  1609 +
  1610 +.item_left {
  1611 + width: 210rpx;
  1612 + height: 100%;
  1613 + box-sizing: border-box;
  1614 + text-align: center;
  1615 + padding: 20rpx;
  1616 + background: #f9f9f9;
  1617 + border-right: 2rpx solid #e4e4e4
  1618 +}
  1619 +
  1620 +.item_left text {
  1621 + /* margin-left: 44rpx; */
  1622 +}
  1623 +
  1624 +.item_right {
  1625 + flex: 1;
  1626 + height: 100%;
  1627 + overflow: hidden;
  1628 + white-space: nowrap;
  1629 + text-overflow: ellipsis;
  1630 + padding: 20rpx;
  1631 +}
  1632 +
  1633 +.item_right text {
  1634 + /* margin-left: 66rpx; */
  1635 +}
  1636 +
  1637 +.table_s .tb-l:last-child {
  1638 + border-bottom: none;
  1639 +}
  1640 +
  1641 +.bzfu_img {
  1642 + width: 164rpx;
  1643 + height: 34rpx;
  1644 + /* margin-right: 18rpx; margin-left: 12rpx */
  1645 +}
  1646 +
  1647 +.bz_view {
  1648 + /* height:100rpx; padding: 0 34rpx 0 13rpx; */
  1649 + color: #333;
  1650 + font-size: 28rpx;
  1651 + padding: 20rpx 20rpx 20rpx 10rpx;
  1652 + /* border-bottom: 3rpx solid #eee; */
  1653 + /* border-top: 3rpx solid #eee; */
  1654 +}
  1655 +
  1656 +.bz_view view {
  1657 + width: 520rpx;
  1658 + word-break: break-all;
  1659 + /* max-height: 70rpx; */
  1660 + /* overflow: hidden; */
  1661 +}
  1662 +
  1663 +.bb_view {
  1664 + display: flex;
  1665 + align-items: center;
  1666 + justify-content: space-between;
  1667 + padding: 20rpx;
  1668 + color: #333;
  1669 + font-size: 30rpx;
  1670 + /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */
  1671 +}
  1672 +
  1673 +.red_bb {
  1674 + color: #d70026;
  1675 + /* min-width:158rpx;width: auto; */
  1676 +}
  1677 +
  1678 +.bg_jj {
  1679 + width: 14rpx;
  1680 + height: 14rpx;
  1681 + border-top: 2rpx solid #d70026;
  1682 + border-right: 2rpx solid #d70026;
  1683 + transform: rotateZ(45deg);
  1684 + display: inline-block;
  1685 + margin-bottom: 3rpx;
  1686 +}
  1687 +
  1688 +.bg_jj.down {
  1689 + transform: rotateZ(135deg);
  1690 +}
  1691 +
  1692 +.bg_jj.up {
  1693 + transform: rotateZ(-45deg);
  1694 + margin-top: 6rpx;
  1695 +}
  1696 +
  1697 +.bz-content {
  1698 + padding: 0 0 0 20rpx;
  1699 +}
  1700 +
  1701 +
  1702 +
  1703 +
  1704 +/* 顶部边框 */
  1705 +.topframe {
  1706 + width: 100%;
  1707 + height: 172rpx;
  1708 + flex-direction: row;
  1709 + justify-content: space-between;
  1710 + border-bottom: 6rpx solid #eeeeee;
  1711 + overflow: hidden;
  1712 +}
  1713 +
  1714 +/* 评价人边框*/
  1715 +.topframe .topframe-top {
  1716 + display: flex;
  1717 + margin-top: 40rpx;
  1718 + margin-bottom: 36rpx;
  1719 + color: #7d7d7d;
  1720 + padding-left: 20rpx;
  1721 + font-size: 32rpx;
  1722 +}
  1723 +
  1724 +/*评价人数量*/
  1725 +.topframe .topframe-top .topframe-top-val {
  1726 + margin-left: 15rpx;
  1727 +
  1728 +}
  1729 +
  1730 +.topframe-top-content {
  1731 + display: flex;
  1732 + width: 36%;
  1733 +}
  1734 +
  1735 +/* 好评 */
  1736 +.topframe-praise {
  1737 + width: 61%;
  1738 + text-align: right;
  1739 + color: #dc4355;
  1740 + font-size: 28rpx;
  1741 +}
  1742 +
  1743 +/* 按钮列表 */
  1744 +.buttem-list {
  1745 + width: 100%;
  1746 + display: flex;
  1747 + font-size: 20rpx;
  1748 + overflow: hidden;
  1749 +}
  1750 +
  1751 +.buttem-list .item {
  1752 + min-width: 17%;
  1753 + font-size: 24rpx;
  1754 + border-radius: 20rpx;
  1755 + background: #ffe3e2;
  1756 + height: 38rpx;
  1757 + text-align: center;
  1758 + line-height: 38rpx;
  1759 + margin-left: 20rpx;
  1760 + justify-content: center;
  1761 +}
  1762 +
  1763 +.buttem-list .item.red {
  1764 + color: #fff;
  1765 + background: #d60022;
  1766 +}
  1767 +
  1768 +/* 用户评价 */
  1769 +.middle {
  1770 + width: 95%;
  1771 + margin: 0 auto;
  1772 +}
  1773 +
  1774 +.middle-img-frame {
  1775 + height: 65rpx;
  1776 + display: flex;
  1777 + margin-top: 32rpx;
  1778 +
  1779 +}
  1780 +
  1781 +/* 评价的用户图片 */
  1782 +.middle-img {
  1783 + width: 60rpx;
  1784 + height: 60rpx;
  1785 + border-radius: 50%;
  1786 + -moz-border-radius: 50%;
  1787 + -webkit-border-radius: 50%;
  1788 + margin-right: 15rpx;
  1789 +}
  1790 +
  1791 +/* 评价的用户边框 */
  1792 +.middle-user-frame {
  1793 + height: 65rpx;
  1794 + overflow: hidden;
  1795 +}
  1796 +
  1797 +.middle-user {
  1798 + height: 25;
  1799 + font-size: 28rpx;
  1800 +}
  1801 +
  1802 +/* 评价图片 */
  1803 +.middle-img-two {
  1804 + width: 115rpx;
  1805 + height: 25rpx;
  1806 + text-align: center;
  1807 + margin-bottom: 20rpx;
  1808 + margin-left: 5rpx;
  1809 +}
  1810 +
  1811 +.xc-pirces {
  1812 + margin-top: 14rpx;
  1813 +}
  1814 +
  1815 +/* 评价文字 */
  1816 +.middle-font {
  1817 + font-size: 30rpx;
  1818 +
  1819 +}
  1820 +
  1821 +.iddle-goods-img {
  1822 + width: 100%;
  1823 + display: flex;
  1824 + margin-top: 22rpx;
  1825 +}
  1826 +
  1827 +/* 商品图片 */
  1828 +.goods-img {
  1829 + width: 156rpx;
  1830 + height: 156rpx;
  1831 + margin-left: 22rpx;
  1832 + height: 100%;
  1833 +}
  1834 +
  1835 +.parameter-frame {
  1836 + margin-top: 14rxp;
  1837 + margin-bottom: 14rpx;
  1838 + width: 50%;
  1839 + height: 30rpx;
  1840 +}
  1841 +
  1842 +.z_parameter {
  1843 + width: 98%;
  1844 + height: 45rpx;
  1845 + display: flex;
  1846 + line-height: 45rpx;
  1847 + margin-top: 20rpx;
  1848 + margin-bottom: 14rpx;
  1849 + justify-content: space-between;
  1850 +}
  1851 +
  1852 +.parameter-font {
  1853 + font-size: 26rpx;
  1854 +
  1855 +}
  1856 +
  1857 +/* 规格 */
  1858 +.parameter-state {
  1859 + width: 100rpx;
  1860 + font-size: 24rpx;
  1861 + color: #c4c4c4;
  1862 +}
  1863 +
  1864 +.parameter-dian {
  1865 + display: flex;
  1866 + width: 94rpx;
  1867 + height: 33rpx;
  1868 + font-size: 20rpx;
  1869 + border-radius: 20rpx;
  1870 + line-height: 33rpx;
  1871 + padding-left: 25rpx;
  1872 + border: 4rpx solid #eeeeee;
  1873 +
  1874 +}
  1875 +
  1876 +/* 点赞图片 */
  1877 +.parameter-img {
  1878 + width: 27rpx;
  1879 + height: 27rpx;
  1880 + margin-top: 3rpx;
  1881 +}
  1882 +
  1883 +.parameter-val {
  1884 + margin-left: 25rpx;
  1885 + font-size: 26rpx;
  1886 + color: #999;
  1887 +}
  1888 +
  1889 +/* 回复 */
  1890 +.reply {
  1891 + width: 95%;
  1892 + height: 120rpx;
  1893 + padding-top: 14rpx;
  1894 + border-top: 3rpx solid #eeeeee;
  1895 + margin: 0 auto;
  1896 +
  1897 +}
  1898 +
  1899 +.shop-reply {
  1900 + height: 30rpx;
  1901 + color: #d60022;
  1902 + font-size: 24rpx;
  1903 + overflow: hidden;
  1904 +}
  1905 +
  1906 +.shop-font {
  1907 + width: 94%;
  1908 + font-size: 24rpx;
  1909 + padding-top: 10rpx;
  1910 +
  1911 +}
  1912 +
  1913 +.line_bulge {
  1914 + width: 17rpx;
  1915 + height: 17rpx;
  1916 + border-top: 1rpx solid #eeeeee;
  1917 + border-left: 1rpx solid #eeeeee;
  1918 + transform: rotate(45deg);
  1919 + position: absolute;
  1920 + top: -12rpx;
  1921 + left: 50rpx;
  1922 + background: #fff;
  1923 +}
  1924 +
  1925 +
  1926 +.xc_comment {
  1927 + display: flex;
  1928 + justify-content: space-around;
  1929 + width: 100%;
  1930 + box-sizing: border-box;
  1931 + padding: 10rpx 20rpx;
  1932 + /* height: 42rpx;
  1933 + padding-left: 34rpx; */
  1934 + color: #333;
  1935 +
  1936 +}
  1937 +
  1938 +.xc_comment-have-pictures {
  1939 + width: 153rpx;
  1940 + /* height: 42rpx; */
  1941 + line-height: 42rpx;
  1942 + text-align: center;
  1943 + background: #ffe3e2;
  1944 + color: 28rpx;
  1945 + border-radius: 21rpx;
  1946 + font-size: 24rpx;
  1947 +}
  1948 +
  1949 +.xc_comment-discuss {
  1950 + width: 152rpx;
  1951 + height: 42rpx;
  1952 + line-height: 42rpx;
  1953 + text-align: center;
  1954 + background: #ffe3e2;
  1955 + color: 28rpx;
  1956 + border-radius: 20rpx;
  1957 + font-size: 24rpx;
  1958 + margin-left: 28rpx
  1959 +}
  1960 +
  1961 +.xc_comment-detail {
  1962 + display: flex;
  1963 + /* margin-top: 40rpx; */
  1964 + /* width: 524rpx; */
  1965 + /* margin-left: 34rpx; */
  1966 + border-radius: 24rpx;
  1967 + border: 2rpx solid #ebedf0;
  1968 + margin-left: 20rpx;
  1969 + box-sizing: border-box;
  1970 + /* overflow: hidden; */
  1971 +}
  1972 +
  1973 +.xc_user-img {
  1974 + border-radius: 50%;
  1975 + margin: auto 0;
  1976 +}
  1977 +
  1978 +.xc_comment-user {
  1979 + display: flex;
  1980 + /* margin-top: 22rpx;
  1981 + margin-left: 22rpx; */
  1982 +}
  1983 +
  1984 +.xc_user {
  1985 + width: 170rpx;
  1986 + height: 60rpx;
  1987 + margin-left: 6rpx;
  1988 + overflow: hidden;
  1989 +}
  1990 +
  1991 +.xc_user-name {
  1992 + /* height: 25rpx; */
  1993 +}
  1994 +
  1995 +.xc_comment-img {
  1996 + width: 22rpx;
  1997 + height: 22rpx;
  1998 + /* margin-top: 14rpx; */
  1999 + margin-right: 5rpx
  2000 +}
  2001 +
  2002 +.xc_comment-font {
  2003 + /* height: 75rpx; */
  2004 + /* margin-left: 22rpx; */
  2005 + white-space: normal;
  2006 + overflow: hidden;
  2007 + /* margin-top: 8rpx;
  2008 + line-height: 38rpx; */
  2009 +
  2010 +}
  2011 +
  2012 +.xc_comment-val {
  2013 + /* width: 88%;
  2014 + height: 30rpx;
  2015 + margin-left: 22rpx;
  2016 + display: flex;
  2017 + margin-top: 15rpx;
  2018 + margin-bottom:15rpx; */
  2019 +}
  2020 +
  2021 +.xc_comment-time {
  2022 + /* height: 30rpx; */
  2023 + font-size: 22rpx;
  2024 + color: #a5a5a5;
  2025 + overflow: hidden;
  2026 +}
  2027 +
  2028 +.xc_goods-img {
  2029 + width: 180rpx;
  2030 + height: 180rpx;
  2031 +}
  2032 +
  2033 +.xc_comment-left {
  2034 + display: inline-block;
  2035 + width: 312rpx;
  2036 + padding: 20rpx;
  2037 +}
  2038 +
  2039 +.xc_goods-img-frame {
  2040 + border-radius: 0 22rpx 22rpx 0;
  2041 + overflow: hidden;
  2042 + /* display:inline-block; */
  2043 + /* width: 40%;
  2044 + height: 90%;
  2045 + text-align: center;
  2046 + padding-top: 30rpx;
  2047 + vertical-align: top; */
  2048 +}
  2049 +
  2050 +.xc_imgs {
  2051 + width: 50rpx;
  2052 + height: 50rpx;
  2053 + border-radius: 50%;
  2054 + margin-right: 5rpx;
  2055 +}
  2056 +
  2057 +.pj_word_size {
  2058 + font-size: 28rpx
  2059 +}
  2060 +
  2061 +.pj_scroll {
  2062 + /* white-space: nowrap; */
  2063 + /* height: 324rpx; */
  2064 + /* margin-bottom: 50rpx; */
  2065 + display: flex;
  2066 + align-items: center;
  2067 + padding: 20rpx 0;
  2068 + /* box-sizing: border-box; */
  2069 + /* box-shadow: 0 8px 12px #e7e9eb; */
  2070 +}
  2071 +
  2072 +
  2073 +/*领券*/
  2074 +.three-level-word {
  2075 + font-size: 25rpx;
  2076 +}
  2077 +
  2078 +.four-level-word {
  2079 + font-size: 23rpx;
  2080 +}
  2081 +
  2082 +.cx-frame {
  2083 + /* border-top:3rpx solid #eee; */
  2084 + /* width:99%;
  2085 + height: 95rpx;
  2086 + line-height: 95rpx;
  2087 + padding-left:24rpx; */
  2088 + padding: 20rpx;
  2089 +}
  2090 +
  2091 +.cx-frame .cx-sizs {
  2092 + /* width: 68rpx; */
  2093 + /* height: 100%; */
  2094 + /* line-height: 100rpx; */
  2095 + /* overflow: hidden; */
  2096 + /* margin-left: 10rpx; */
  2097 +}
  2098 +
  2099 +.xc-coupon-fram {
  2100 + position: relative;
  2101 + margin-right: 16rpx;
  2102 + /* width:200rpx; */
  2103 + /* padding-top:30rpx; */
  2104 +
  2105 +}
  2106 +
  2107 +.xc-coupon-fram .xc-coupon {
  2108 + /* width:175rpx ;
  2109 + height: 40rpx;
  2110 + line-height: 40rpx; */
  2111 + background-color: #d60021;
  2112 + /* margin:0 auto; */
  2113 + color: #fff;
  2114 + padding: 6rpx 20rpx;
  2115 +
  2116 +}
  2117 +
  2118 +.xc-coupon-fram .xc-circular {
  2119 + width: 16rpx;
  2120 + height: 16rpx;
  2121 + background-color: white;
  2122 + position: absolute;
  2123 + top: 50%;
  2124 + /* left: -10rpx; */
  2125 + transform: translateY(-50%);
  2126 +}
  2127 +
  2128 +.xc-coupon-fram .xc-one {
  2129 + left: -8rpx;
  2130 +}
  2131 +
  2132 +.xc-coupon-fram .xc-two {
  2133 + right: -8rpx;
  2134 +}
  2135 +
  2136 +.cx-obtain-coupon {
  2137 + /* width: 65rpx;
  2138 + height: 100%;
  2139 + padding-left:15rpx; */
  2140 + color: #d70025;
  2141 + display: flex;
  2142 + align-items: center;
  2143 + /* position: absolute;
  2144 + right: 5rpx; */
  2145 +}
  2146 +
  2147 +/* 自定义弹出窗口 */
  2148 +.cx-popup {
  2149 + width: 100%;
  2150 + background: #fff;
  2151 + z-index: 35;
  2152 + border-top-left-radius: 25rpx;
  2153 + border-top-right-radius: 25rpx;
  2154 + position: fixed;
  2155 + bottom: 0;
  2156 +}
  2157 +
  2158 +.cx-popup .top {
  2159 + /* width: 90%;
  2160 + height:85rpx; */
  2161 + font-size: 32rpx;
  2162 + padding: 20rpx 0;
  2163 + border-bottom: 2rpx solid #ebedf0;
  2164 + /* padding-top: 50rpx;
  2165 + font-weight:600; */
  2166 +
  2167 +}
  2168 +
  2169 +.cx-popup .top-frame {
  2170 + /* width: 100%;
  2171 + display: flex;
  2172 + justify-content: center;
  2173 + overflow: hidden; */
  2174 +}
  2175 +
  2176 +.xc-valid-coupon {
  2177 + width: 90%;
  2178 + height: 40rpx;
  2179 + padding-top: 24rpx;
  2180 + overflow: hidden;
  2181 +}
  2182 +
  2183 +.xc-frame {
  2184 + position: relative;
  2185 +}
  2186 +
  2187 +.xc-coupon-frame {
  2188 + width: 100%;
  2189 + max-height: 560rpx;
  2190 + overflow: auto;
  2191 +
  2192 +}
  2193 +
  2194 +.xc-coupon-frame .rel:not(:first-child) {
  2195 + margin-top: 20rpx;
  2196 +}
  2197 +
  2198 +.xc-coupon-frame .coupon {
  2199 + width: 100%;
  2200 + height: 168rpx;
  2201 + border-radius: 25rpx;
  2202 + border: 2rpx solid #ffdcdc;
  2203 + overflow: hidden;
  2204 + /* margin-top:16rpx; */
  2205 + box-sizing: border-box;
  2206 +
  2207 +}
  2208 +
  2209 +/* .xc-coupon-frame .coupon ~ .coupon {
  2210 + margin-top:16rpx;
  2211 +} */
  2212 +.xc-coupon-left {
  2213 + width: 216rpx;
  2214 + /* height: 100%; */
  2215 + background-color: #ffeeef;
  2216 + border-right: 4rpx dashed #ffdbd9;
  2217 + overflow: hidden;
  2218 + /* line-height: 100%; */
  2219 + display: flex;
  2220 + flex-direction: column;
  2221 + justify-content: center;
  2222 + align-items: center;
  2223 + flex-shrink: 0;
  2224 +}
  2225 +
  2226 +.xc-money {
  2227 + color: #f30026;
  2228 + text-align: center;
  2229 +}
  2230 +
  2231 +.xc-rmb {
  2232 + /* width:44rpx;
  2233 + padding-top:7rpx; */
  2234 +}
  2235 +
  2236 +.xc-money-frame {
  2237 + /* margin-left:35rpx;
  2238 + margin-top:48rpx; */
  2239 +
  2240 +}
  2241 +
  2242 +.xc-spacing {
  2243 + letter-spacing: 4rpx;
  2244 +}
  2245 +
  2246 +.xc-circular-one {
  2247 + position: absolute;
  2248 + top: -15rpx;
  2249 + left: 205rpx;
  2250 + width: 30rpx;
  2251 + height: 30rpx;
  2252 + background: #fff;
  2253 + overflow: hidden;
  2254 +}
  2255 +
  2256 +.xc-circular-two {
  2257 + position: absolute;
  2258 + bottom: -15rpx;
  2259 + /* top:150rpx; */
  2260 + left: 205rpx;
  2261 + width: 30rpx;
  2262 + height: 30rpx;
  2263 + background: #fff;
  2264 +}
  2265 +
  2266 +.xc-detail-coupon {
  2267 + /* margin-left: 22rpx;
  2268 + overflow: hidden;
  2269 + padding-top: 43rpx; */
  2270 + /* display: flex;
  2271 + align-items: center; */
  2272 +}
  2273 +
  2274 +.xc-coupon-right {
  2275 + /* width: 455rpx;
  2276 + height: 100%; */
  2277 + background: #fffaf9;
  2278 + padding: 20rpx;
  2279 + box-sizing: border-box;
  2280 + width: 100%;
  2281 + justify-content: space-between;
  2282 + align-items: center;
  2283 +}
  2284 +
  2285 +.xc-below {
  2286 + margin-top: 20rpx;
  2287 +
  2288 +}
  2289 +
  2290 +.xc-get {
  2291 +
  2292 + width: 140rpx;
  2293 + /* height: 48rpx; */
  2294 + color: #fff;
  2295 + text-align: center;
  2296 + border-radius: 27rpx;
  2297 + line-height: 54rpx;
  2298 + /* margin-left:20rpx; */
  2299 +}
  2300 +
  2301 +.background {
  2302 + background: #f40028;
  2303 +}
  2304 +
  2305 +/*--不可使用--*/
  2306 +.background.nouse {
  2307 + background: gainsboro;
  2308 +}
  2309 +
  2310 +.xc-background {
  2311 + background: #b9b9b9;
  2312 +}
  2313 +
  2314 +
  2315 +.cx-confirm {
  2316 + width: 100%;
  2317 + padding: 20rpx;
  2318 + box-sizing: border-box;
  2319 + /* height: 160rpx; */
  2320 +
  2321 +}
  2322 +
  2323 +.cx-confirm .confirm {
  2324 + /* width: 372rpx;
  2325 + height: 60rpx; */
  2326 + background-color: #f40026;
  2327 + color: #fff;
  2328 + border-radius: 10rpx;
  2329 + line-height: 80rpx;
  2330 + font-size: 28rpx;
  2331 +
  2332 +}
  2333 +
  2334 +.up {
  2335 + animation: up .7s;
  2336 +}
  2337 +
  2338 +.down {
  2339 + animation: down 1s;
  2340 +}
  2341 +
  2342 +@keyframes up {
  2343 + 0% {
  2344 + transform: translateY(550rpx);
  2345 + }
  2346 +
  2347 + 100% {
  2348 + transform: translateY(0);
  2349 + }
  2350 +}
  2351 +
  2352 +@keyframes down {
  2353 + 0% {
  2354 + transform: translateY(0);
  2355 + }
  2356 +
  2357 + 100% {
  2358 + transform: translateY(550rpx);
  2359 + }
  2360 +}
  2361 +
  2362 +
  2363 +/* 分享 */
  2364 +.icon-share {
  2365 + font-size: 42rpx;
  2366 + color: #d60021;
  2367 + line-height: 1;
  2368 +}
  2369 +
  2370 +.xc-share-frame {
  2371 + /* width: 129rpx;
  2372 + height: 48rpx;
  2373 + border-top-left-radius: 18rpx;
  2374 + border-bottom-left-radius: 18rpx; */
  2375 + /* background: #d60021; */
  2376 + /* position:absolute;
  2377 + left:622rpx;
  2378 + top:-37rpx;
  2379 + line-height:50rpx;
  2380 + margin-top:52rpx; */
  2381 +}
  2382 +
  2383 +.xc-share-frame-jieti {
  2384 + width: 129rpx;
  2385 + height: 48rpx;
  2386 + border-top-left-radius: 18rpx;
  2387 + border-bottom-left-radius: 18rpx;
  2388 + background: #d60021;
  2389 + line-height: 50rpx;
  2390 +}
  2391 +
  2392 +.xc-share-frame .share-font,
  2393 +.xc-share-frame-jieti .share-font {
  2394 + font-size: 32rpx;
  2395 + color: #fff;
  2396 + margin-left: 10rpx;
  2397 +
  2398 +}
  2399 +
  2400 +
  2401 +.xc-share-frame .share-frame,
  2402 +.xc-share-frame-jieti .share-frame {
  2403 + width: 30rpx;
  2404 + height: 30rpx;
  2405 + margin-top: 9rpx;
  2406 + margin-left: 10rpx;
  2407 +
  2408 +}
  2409 +
  2410 +.xc-share {
  2411 + width: 90%;
  2412 + height: 800rpx;
  2413 + background: #fff;
  2414 + z-index: 35;
  2415 +}
  2416 +
  2417 +.img-frame {
  2418 + position: absolute;
  2419 + top: 175rpx;
  2420 + left: 100rpx;
  2421 + z-index: 55;
  2422 + overflow: hidden;
  2423 +
  2424 +}
  2425 +
  2426 +.img-frame .img {
  2427 + width: 100rpx;
  2428 + height: 100rpx;
  2429 +
  2430 +}
  2431 +
  2432 +.xc-share .top {
  2433 + height: 85rpx;
  2434 + width: 100%;
  2435 + border-bottom: 4rpx dashed #f5f5f5;
  2436 + overflow: hidden;
  2437 +
  2438 +}
  2439 +
  2440 +.xc-share .name {
  2441 + font-size: 25rpx;
  2442 + margin-left: 180rpx;
  2443 + color: #000;
  2444 +
  2445 +}
  2446 +
  2447 +.xc-share .recommend {
  2448 + width: 110rpx;
  2449 + height: 12rpx;
  2450 + color: #fff;
  2451 + background: #d60021;
  2452 + font-size: 20rpx;
  2453 + border-radius: 25rpx;
  2454 + margin-left: 10rpx;
  2455 + line-height: 37rpx;
  2456 +}
  2457 +
  2458 +.xc-left-circle {
  2459 + width: 40rpx;
  2460 + height: 25rpx;
  2461 + position: absolute;
  2462 + top: 280rpx;
  2463 + left: 29rpx;
  2464 + z-index: 55;
  2465 + background: #727272;
  2466 + border-radius: 50rpx 50rpx 0 0;
  2467 + transform: rotate(90deg);
  2468 +
  2469 +}
  2470 +
  2471 +.xc-right-circle {
  2472 + width: 40rpx;
  2473 + height: 25rpx;
  2474 + position: absolute;
  2475 + top: 280rpx;
  2476 + left: 683rpx;
  2477 + z-index: 55;
  2478 + background: #727272;
  2479 + border-radius: 50rpx 50rpx 0 0;
  2480 + transform: rotate(270deg);
  2481 +
  2482 +}
  2483 +
  2484 +.xc-circle-frame {
  2485 + width: 25rpx;
  2486 + height: 40rpx;
  2487 + overflow: hidden;
  2488 +}
  2489 +
  2490 +.xc-goods-name {
  2491 + width: 95%;
  2492 + font-size: 35rpx;
  2493 + padding-left: 75rpx;
  2494 + height: 50rpx;
  2495 + padding-top: 10rpx;
  2496 + color: #000;
  2497 +
  2498 +}
  2499 +
  2500 +.xc-good-img {
  2501 + width: 100%;
  2502 + height: 381rpx;
  2503 + margin-top: 5rpx;
  2504 +
  2505 +}
  2506 +
  2507 +.xc-good-img .img {
  2508 + width: 90%;
  2509 + height: 381rpx;
  2510 +}
  2511 +
  2512 +.xc-ensure-frame {
  2513 + width: 90%;
  2514 + height: 60rpx;
  2515 + border-bottom: 2rpx solid #d8d6d7;
  2516 +}
  2517 +
  2518 +.xc-ensure {
  2519 + width: 30%;
  2520 + height: 60rpx;
  2521 + line-height: 60rpx;
  2522 +}
  2523 +
  2524 +xc-ensure-div {
  2525 + width: 100%;
  2526 + height: 60rpx;
  2527 +}
  2528 +
  2529 +.xc-ensure .word {
  2530 + font-size: 25rpx;
  2531 + color: #d30025;
  2532 + margin-left: 9rpx;
  2533 +
  2534 +}
  2535 +
  2536 +.xc-ensure .img {
  2537 + width: 25rpx;
  2538 + height: 25rpx;
  2539 + margin-top: 18rpx;
  2540 +
  2541 +}
  2542 +
  2543 +.xc-bottmon {
  2544 + width: 100%;
  2545 +}
  2546 +
  2547 +.xc-bottmon .xc-left {
  2548 + width: 55%;
  2549 + margin-top: 30rpx;
  2550 + padding-left: 20rpx;
  2551 +
  2552 +}
  2553 +
  2554 +.xc-left .xc-top {
  2555 + font-size: 25rpx;
  2556 + height: 40rpx;
  2557 + line-height: 40rpx;
  2558 + color: #000;
  2559 +}
  2560 +
  2561 +.xc-left .xc-middle {
  2562 + font-size: 25rpx;
  2563 + color: #b2b2b2;
  2564 + height: 30rpx;
  2565 + line-height: 30rpx;
  2566 +}
  2567 +
  2568 +.xc-left .xc-buttem {
  2569 + font-size: 25rpx;
  2570 + height: 100rpx;
  2571 + line-height: 100rpx;
  2572 + color: #000;
  2573 +}
  2574 +
  2575 +.xc-ensure-right {
  2576 + width: 30%;
  2577 +}
  2578 +
  2579 +.xc-qrcode {
  2580 + width: 120rpx;
  2581 + height: 120rpx;
  2582 + margin-top: 43rpx;
  2583 + margin-left: 80rpx;
  2584 +
  2585 +}
  2586 +
  2587 +.xc-close {
  2588 + width: 50rpx;
  2589 + height: 50rpx;
  2590 + border-radius: 50%;
  2591 + border: 3rpx solid #fff;
  2592 + text-align: center;
  2593 + line-height: 41rpx;
  2594 + font-size: 50rpx;
  2595 + color: #fff;
  2596 + font-weight: lighter;
  2597 + font-family: MingLiU;
  2598 + transform: rotate(270deg);
  2599 + overflow: auto;
  2600 + margin-top: 6rpx;
  2601 + margin-bottom: 1rpx;
  2602 +
  2603 +}
  2604 +
  2605 +.xc-close-frame {
  2606 + position: absolute;
  2607 + margin-top: 30rpx;
  2608 + width: 90%;
  2609 + display: flex;
  2610 + justify-content: center;
  2611 + overflow: auto;
  2612 +
  2613 +}
  2614 +
  2615 +.xc-guanbi {
  2616 + width: 100%;
  2617 + height: 80rpx;
  2618 + overflow: hidden;
  2619 +}
  2620 +
  2621 +
  2622 +/* 自定义弹出窗口 */
  2623 +.cx-popup {
  2624 + width: 100%;
  2625 + background: #fff;
  2626 + z-index: 35;
  2627 + border-top-left-radius: 10rpx;
  2628 + border-top-right-radius: 10rpx;
  2629 + position: fixed;
  2630 + bottom: 0;
  2631 +}
  2632 +
  2633 +.xc-top-content {
  2634 + width: 88%;
  2635 + height: 85rpx;
  2636 + padding-top: 50rpx;
  2637 + font-size: 36rpx;
  2638 +}
  2639 +
  2640 +
  2641 +.xc-valid-coupon {
  2642 + width: 90%;
  2643 + height: 40rpx;
  2644 + padding-top: 24rpx;
  2645 + overflow: hidden;
  2646 +}
  2647 +
  2648 +.xc-frame {
  2649 + /* width: 100%;
  2650 + margin-top:20rpx; */
  2651 + padding: 20rpx;
  2652 +}
  2653 +
  2654 +.xc-frame .list-frame {
  2655 + width: 90%;
  2656 + height: 100%;
  2657 + overflow-y: scroll;
  2658 +
  2659 + margin-top: 20rpx;
  2660 +
  2661 +}
  2662 +
  2663 +.xc-close-frame {
  2664 + margin-top: 30rpx;
  2665 + width: 15%;
  2666 + display: flex;
  2667 +}
  2668 +
  2669 +.xc-close {
  2670 + width: 70rpx;
  2671 + height: 70rpx;
  2672 + border-radius: 50%;
  2673 + border: 5rpx solid #a5a5a7;
  2674 + text-align: center;
  2675 + line-height: 55rpx;
  2676 + font-size: 80rpx;
  2677 + color: #a5a5a7;
  2678 + font-family: "微软正黑体";
  2679 + margin-top: 8rpx;
  2680 +
  2681 +}
  2682 +
  2683 +.xc-money {
  2684 + color: #ff0013;
  2685 +}
  2686 +
  2687 +.xc-money-frame {
  2688 + /* margin-left:35rpx; */
  2689 +
  2690 +}
  2691 +
  2692 +.xc-coupon-effect {
  2693 + width: 99%;
  2694 + height: 128rpx;
  2695 + border-bottom: 3rpx solid #ddd;
  2696 +
  2697 +
  2698 +}
  2699 +
  2700 +.xc-goods-coupon {
  2701 + width: 80%;
  2702 + height: 100%;
  2703 +
  2704 +}
  2705 +
  2706 +.xc-title {
  2707 + width: 50%;
  2708 + margin-left: 222rpx;
  2709 +
  2710 +}
  2711 +
  2712 +.xc-coupon-money {
  2713 + color: #c91e31;
  2714 + font-size: 35rpx;
  2715 + margin-top: 20rpx;
  2716 +
  2717 +}
  2718 +
  2719 +.xc-coupon-time {
  2720 + height: 50rpx;
  2721 + font-size: 27rpx;
  2722 + color: #a4a4a4;
  2723 +}
  2724 +
  2725 +.xc-coupon-time .time {
  2726 + margin-left: 15rpx;
  2727 + font-size: 27rpx;
  2728 +}
  2729 +
  2730 +.xc-coupon-selection {
  2731 + width: 99%;
  2732 + height: 100%;
  2733 +
  2734 +
  2735 +}
  2736 +
  2737 +.xc-confirm {
  2738 + width: 90%;
  2739 + height: 75rpx;
  2740 + margin: 0 auto;
  2741 + background: #c41830;
  2742 + color: #fff;
  2743 + border-radius: 10rpx;
  2744 + font-size: 30rpx;
  2745 + margin-top: 50rpx;
  2746 +}
  2747 +
  2748 +.xc-not-Selection {
  2749 + width: 60rpx;
  2750 + height: 60rpx;
  2751 + background: #eeeeee;
  2752 +}
  2753 +
  2754 +/*---------------视频图片---------------*/
  2755 +.xc-imageCount {
  2756 + width: 95rpx;
  2757 + height: 50rpx;
  2758 + background-color: rgba(0, 0, 0, 0.3);
  2759 + border-radius: 40rpx;
  2760 + line-height: 50rpx;
  2761 + color: #fff;
  2762 + text-align: center;
  2763 + font-size: 26rpx;
  2764 + position: absolute;
  2765 +
  2766 + right: 23rpx;
  2767 + bottom: 21rpx;
  2768 +}
  2769 +
  2770 +
  2771 +/* 视频图片的边框 */
  2772 +.xc-videos-picture {
  2773 + width: 100%;
  2774 + height: 750rpx;
  2775 +}
  2776 +
  2777 +/* 视频 */
  2778 +.xc-videos {
  2779 + width: 100%;
  2780 + height: 544rpx;
  2781 +
  2782 +
  2783 +}
  2784 +
  2785 +/* 点击视频或图片 */
  2786 +.xc-video-picture {
  2787 +
  2788 + bottom: 20rpx;
  2789 + left: 0rpx;
  2790 + display: flex;
  2791 + align-items: center;
  2792 + justify-content: center;
  2793 + width: 45%;
  2794 + height: 60rpx;
  2795 + margin-left: 215rpx;
  2796 +
  2797 +}
  2798 +
  2799 +.xc-video-button:before {
  2800 + content: "";
  2801 + position: absolute;
  2802 + left: 48%;
  2803 + top: 40%;
  2804 + width: 0;
  2805 + height: 0;
  2806 + margin-left: -36rpx;
  2807 + margin-top: -10rpx;
  2808 + border-width: 13rpx;
  2809 + border-style: dashed;
  2810 + border-color: transparent transparent transparent #fff;
  2811 + font-size: 0;
  2812 + line-height: 0;
  2813 + z-index: 2;
  2814 + -webkit-backface-visibility: hidden;
  2815 +}
  2816 +
  2817 +.xc-video-buttons:before {
  2818 + content: "";
  2819 + position: absolute;
  2820 + left: 50%;
  2821 + top: 41%;
  2822 + width: 0;
  2823 + height: 0;
  2824 + margin-left: -36rpx;
  2825 + margin-top: -10rpx;
  2826 + border-width: 13rpx;
  2827 + border-style: dashed;
  2828 + border-color: transparent transparent transparent #000;
  2829 + font-size: 0;
  2830 + line-height: 0;
  2831 + z-index: 2;
  2832 + -webkit-backface-visibility: hidden;
  2833 +}
  2834 +
  2835 +.xc-video {
  2836 + /* width:100rpx; */
  2837 + /* height: 50rpx;
  2838 + line-height: 50rpx; */
  2839 + text-align: center;
  2840 + /* margin-left:-30rpx; */
  2841 +
  2842 +
  2843 +}
  2844 +
  2845 +/* 图片 */
  2846 +.xc-picture {
  2847 + color: #000;
  2848 + background: #dcdcdc;
  2849 + width: 94rpx;
  2850 + height: 45rpx;
  2851 + font-size: 25rpx;
  2852 + border-radius: 25rpx;
  2853 + font-family: 'SimHei', Arial;
  2854 + text-align: center;
  2855 + line-height: 45rpx;
  2856 + margin-left: 53rpx
  2857 +}
  2858 +
  2859 +/* 点击视频 */
  2860 +.xc-video-button {
  2861 + position: relative;
  2862 + color: #000;
  2863 + background: #dcdcdc;
  2864 + width: 85rpx;
  2865 + height: 45rpx;
  2866 + line-height: 45rpx;
  2867 + font-size: 30rpx;
  2868 + border-radius: 25rpx;
  2869 + font-family: 'SimHei', Arial;
  2870 + padding-left: 11rpx;
  2871 +}
  2872 +
  2873 +
  2874 +.xc-sn {
  2875 + color: #fff;
  2876 + background: #c7161e;
  2877 + border-color: transparent transparent transparent #fff;
  2878 +}
  2879 +
  2880 +/* 图片 */
  2881 +.xc-pictures {
  2882 + width: 100%;
  2883 + height: 529rpx;
  2884 +
  2885 +}
  2886 +
  2887 +/*视频封面的图片 */
  2888 +.xc-picturess {
  2889 + position: relative;
  2890 + width: 100%;
  2891 + height: 529rpx;
  2892 +}
  2893 +
  2894 +/* 播放 */
  2895 +.xc-play {
  2896 + width: 130rpx;
  2897 + height: 130rpx;
  2898 + position: absolute;
  2899 + top: 207rpx;
  2900 + left: 309rpx;
  2901 +}
  2902 +
  2903 +.xc-video-buttons {
  2904 + position: relative;
  2905 + color: #000;
  2906 + background: #dcdcdc;
  2907 + width: 85rpx;
  2908 + height: 45rpx;
  2909 + line-height: 45rpx;
  2910 + font-size: 30rpx;
  2911 + border-radius: 25rpx;
  2912 + font-family: 'SimHei', Arial;
  2913 + padding-left: 11rpx;
  2914 +}
  2915 +
  2916 +
  2917 +.wsize {
  2918 + font-size: 32rpx
  2919 +}
  2920 +
  2921 +.five-level-word {
  2922 + font-size: 24rpx;
  2923 +}
  2924 +
  2925 +
  2926 +/*-- 推荐商品 --*/
  2927 +.xc-goods {
  2928 + height: auto;
  2929 + background: #f2f2f2;
  2930 + padding: 0 20rpx;
  2931 + margin-top: -25rpx;
  2932 + padding-bottom: 20rpx
  2933 +}
  2934 +
  2935 +.xc-goods-recommend {
  2936 + border-radius: 20rpx;
  2937 + width: 345rpx;
  2938 + height: 450rpx;
  2939 + margin-top: 25rpx;
  2940 + display: inline-block;
  2941 +
  2942 +}
  2943 +
  2944 +.xc-goods-recommend.ml {
  2945 + margin-left: 22rpx
  2946 +}
  2947 +
  2948 +.xc-goods-recommend .xc-goods-imgs {
  2949 + width: 100%;
  2950 + height: 325rpx;
  2951 + border-radius: 20rpx 20rpx 0 0;
  2952 +}
  2953 +
  2954 +.xc-goods-bottom {
  2955 + width: 345rpx;
  2956 + height: 134rpx;
  2957 + background: #fff;
  2958 + border-radius: 0 0 20rpx 20rpx;
  2959 + bottom: -8rpx;
  2960 + left: 0rpx;
  2961 +}
  2962 +
  2963 +.xc-goods-bottom .monry-frame {
  2964 + width: 283rpx;
  2965 + height: 52rpx;
  2966 + padding-left: 24rpx;
  2967 +
  2968 +}
  2969 +
  2970 +.xc-good-explain {
  2971 + width: 283rpx;
  2972 + height: 60rpx;
  2973 + word-break: normal;
  2974 + margin-left: 30rpx;
  2975 + font-size: 26rpx;
  2976 + line-height: 30rpx;
  2977 + margin-top: 5rpx;
  2978 +}
  2979 +
  2980 +.money-color-val {
  2981 + color: #c6172f;
  2982 +}
  2983 +
  2984 +.rmb-symbol {
  2985 + line-height: 81rpx;
  2986 + height: 53rpx;
  2987 + font-size: 28rpx;
  2988 +}
  2989 +
  2990 +.xc-original-price {
  2991 + color: #c0c0c0;
  2992 +}
  2993 +
  2994 +/* 文字中间加线条 */
  2995 +.word-lines {
  2996 + text-decoration: line-through;
  2997 + line-height: 90rpx;
  2998 + margin-left: 10rpx;
  2999 + font-size: 20rpx;
  3000 +}
  3001 +
  3002 +.xc-linellae-frame {
  3003 + width: 100%;
  3004 + height: 70rpx;
  3005 + background: #f2f2f2;
  3006 +}
  3007 +
  3008 +.xc-linellae-frame .xc-linellae {
  3009 + width: 386rpx;
  3010 + height: 1rpx;
  3011 + border-bottom: 1rpx solid #ebedf0;
  3012 +}
  3013 +
  3014 +.xc-recommend-frame {
  3015 + background: #f2f2f2;
  3016 + width: 97rpx;
  3017 + height: 100%;
  3018 + padding-left: 10rpx;
  3019 +}
  3020 +
  3021 +.xc-recommend-frame .xc-recommend {
  3022 + width: 35rpx;
  3023 + height: 27rpx;
  3024 +}
  3025 +
  3026 +.xc-recommend-frame .xc-recommend-word {
  3027 + width: 58rpx;
  3028 + font-size: 24rpx;
  3029 + color: #a9a9a9;
  3030 + margin-left: 5rpx;
  3031 + margin-bottom: 5rpx;
  3032 + margin-top: 1rpx;
  3033 +
  3034 +}
  3035 +
  3036 +.xc-price-frame {
  3037 + color: #ec0022;
  3038 + align-items: baseline;
  3039 + /* height:44rpx; */
  3040 +}
  3041 +
  3042 +.xc-price-frame .sign {
  3043 + margin-top: 19rpx;
  3044 + margin-left: -4px;
  3045 +}
  3046 +
  3047 +.xc-val-price {
  3048 + margin-left: 24rpx;
  3049 + color: #ec0022;
  3050 + padding-top: 13rpx;
  3051 +}
  3052 +
  3053 +.xc-val-price .save {
  3054 + border-radius: 10rpx;
  3055 + margin-top: 5rpx;
  3056 + background: #fed2d9;
  3057 + min-width: 230rpx;
  3058 + height: 40rpx;
  3059 + line-height: 40rpx;
  3060 + width: auto;
  3061 + padding-left: 12rpx;
  3062 + padding-right: 12rpx;
  3063 +
  3064 +}
  3065 +
  3066 +.xc-unit-price {
  3067 + margin-top: 25rpx;
  3068 + padding-left: -4rpx;
  3069 +
  3070 +}
  3071 +
  3072 +.xc-explain {
  3073 + color: #292929;
  3074 + width: 542rpx;
  3075 + margin: 10rpx 0 20rpx;
  3076 + width: 100%;
  3077 + font-weight: bold;
  3078 +}
  3079 +
  3080 +.xc-item {
  3081 + width: 16%;
  3082 + font-size: 26rpx;
  3083 + color: #666;
  3084 + margin-right: 5rpx;
  3085 +}
  3086 +
  3087 +.xc-item .yuan {
  3088 + width: 38rpx;
  3089 + height: 38rpx;
  3090 + line-height: 38rpx;
  3091 + border: 1rpx solid #f3f1f2;
  3092 + margin-left: 33rpx;
  3093 +
  3094 +}
  3095 +
  3096 +.xc-item .word {
  3097 + width: 104rpx;
  3098 + margin-top: 16rpx;
  3099 + color: #363636;
  3100 + font-weight: 600;
  3101 +
  3102 +}
  3103 +
  3104 +.xc-item .circle-color {
  3105 + background: #d60024;
  3106 + color: #fff;
  3107 +}
  3108 +
  3109 +.xc-item .circle-color1 {
  3110 + background: #fefefe;
  3111 + color: #666666;
  3112 +}
  3113 +
  3114 +.link {
  3115 + height: 6rpx;
  3116 + width: 180rpx;
  3117 + top: 54rpx;
  3118 + left: 32px;
  3119 +}
  3120 +
  3121 +.link1 {
  3122 + height: 6rpx;
  3123 + width: 166rpx;
  3124 + top: 54rpx;
  3125 + left: 264rpx;
  3126 +}
  3127 +
  3128 +.link2 {
  3129 + height: 6rpx;
  3130 + width: 157rpx;
  3131 + top: 54rpx;
  3132 + right: 87rpx;
  3133 +}
  3134 +
  3135 +.link-color-red {
  3136 + background: #d60024;
  3137 +}
  3138 +
  3139 +.link-color {
  3140 + background: #e5e5e5;
  3141 +}
  3142 +
  3143 +.xc-qt-price {
  3144 + top: -15rpx;
  3145 + left: 25rpx;
  3146 + color: #fff;
  3147 +}
  3148 +
  3149 +.xc-qt-price .xc-qtunit-price {
  3150 + /*margin-left: 6rpx;*/
  3151 + /*margin-top: -4rpx;*/
  3152 +}
  3153 +
  3154 +.xc-nanber {
  3155 + top: -25rpx;
  3156 + left: 289rpx;
  3157 +
  3158 +}
  3159 +
  3160 +.xc-qtsign {
  3161 + margin-top: 5rpx;
  3162 +
  3163 +}
  3164 +
  3165 +.xc-people-img {
  3166 + height: 36rpx;
  3167 + width: 36rpx;
  3168 + background: #fff;
  3169 + border-radius: 7rpx;
  3170 +
  3171 +}
  3172 +
  3173 +.xc-people-img .imgs {
  3174 + width: 28rpx;
  3175 + height: 28rpx;
  3176 + margin-top: 4rpx;
  3177 +
  3178 +}
  3179 +
  3180 +.xc-people-val {
  3181 +
  3182 + height: 32rpx;
  3183 + border-top: 1rpx solid #fff;
  3184 + border-bottom: 1rpx solid #fff;
  3185 + border-right: 1rpx solid #fff;
  3186 + border-radius: 0 7rpx 7rpx 0;
  3187 + line-height: 32rpx;
  3188 + margin-left: -6rpx;
  3189 + padding: 0 12rpx;
  3190 +}
  3191 +
  3192 +.word-color {
  3193 + color: #d70024;
  3194 +}
  3195 +
  3196 +.word-color-lan {
  3197 + color: #0393e1;
  3198 +}
  3199 +
  3200 +.pt_view .hy-stop {
  3201 + top: -23rpx;
  3202 + right: 56rpx;
  3203 +}
  3204 +
  3205 +.xc-time-val {
  3206 + width: 36rpx;
  3207 + height: 36rpx;
  3208 + border-radius: 7rpx;
  3209 + line-height: 36rpx;
  3210 +}
  3211 +
  3212 +.xc-time {
  3213 + margin-right: 10rpx;
  3214 + margin-left: 10rpx;
  3215 + margin-top: -32rpx;
  3216 +}
  3217 +
  3218 +.xc-goods-explain {
  3219 + width: 100%;
  3220 + /* padding-left:30rpx;
  3221 + margin-left:-9rpx;
  3222 + height: 150rpx */
  3223 +}
  3224 +
  3225 +.xc-partner-frame {
  3226 + border-bottom: 2rpx solid #eee;
  3227 + width: 100%;
  3228 + padding: 20rpx;
  3229 + /* height:56rpx; */
  3230 + box-sizing: border-box;
  3231 +}
  3232 +
  3233 +.xc-person-number {
  3234 + width: 120rpx;
  3235 + color: #999999;
  3236 + padding-left: 8rpx;
  3237 + text-align: left
  3238 +}
  3239 +
  3240 +.xc-miaosha-time {
  3241 + right: 17rpx;
  3242 + top: 55rpx;
  3243 +}
  3244 +
  3245 +.pd_top1 {
  3246 + padding-top: 10rpx
  3247 +}
  3248 +
  3249 +.s_ms_bth {
  3250 + margin-top: 85rpx
  3251 +}
  3252 +
  3253 +
  3254 +.no_pj_list {
  3255 + text-align: center;
  3256 + width: 100%;
  3257 + color: #999;
  3258 + margin: 30rpx 0;
  3259 + display: inline-block;
  3260 + font-size: 28rpx
  3261 +}
  3262 +
  3263 +/* 门店地址 */
  3264 +.xc-address_frame {
  3265 + /* border-top:1rpx solid #eee; */
  3266 + width: 100%;
  3267 + height: auto;
  3268 + padding: 20rpx;
  3269 + box-sizing: border-box;
  3270 +}
  3271 +
  3272 +.on_height {
  3273 + height: 90rpx;
  3274 +}
  3275 +
  3276 +.sn_height {
  3277 + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */
  3278 +}
  3279 +
  3280 +.xc-address_frame .address_frame {
  3281 + width: 100%;
  3282 + /* padding-left: 10rpx;
  3283 +margin: auto; */
  3284 +
  3285 +}
  3286 +
  3287 +.shop_name {}
  3288 +
  3289 +.stores-img {
  3290 + width: 28rpx;
  3291 + height: 28rpx;
  3292 + margin-right: 10rpx;
  3293 +}
  3294 +
  3295 +.shop_name {
  3296 + margin-right: 10rpx;
  3297 +}
  3298 +.shop_name.max{
  3299 + max-width:370rpx; flex-shrink: 0;
  3300 +}
  3301 +
  3302 +
  3303 +.address {
  3304 + /* width: 100%;
  3305 + margin-top: 5rpx;
  3306 + margin-bottom: 5rpx; */
  3307 +}
  3308 +
  3309 +.distance {
  3310 + padding-left: 20rpx;
  3311 + padding-right: 20rpx;
  3312 + background: #eee;
  3313 + border-radius: 20rpx;
  3314 + /* margin-right: 5rpx; */
  3315 + color: #999;
  3316 + height: 38rpx;
  3317 + line-height: 38rpx;
  3318 + position: relative;
  3319 + top: 5rpx;
  3320 +
  3321 +}
  3322 +
  3323 +/* 选择门店的弹窗 */
  3324 +.mongolia-layer {
  3325 + position: fixed;
  3326 + left: 0;
  3327 + top: 0;
  3328 + right: 0;
  3329 + bottom: 0;
  3330 + z-index: 22;
  3331 + background: rgba(0, 0, 0, 0.4);
  3332 + width: 100%;
  3333 + height: 91.9%;
  3334 +
  3335 +}
  3336 +
  3337 +.popup-frame {
  3338 + position: fixed;
  3339 + z-index: 30000000000000;
  3340 + background: white;
  3341 + width: 100%;
  3342 + border-radius: 20rpx 20rpx 0 0;
  3343 + height: auto;
  3344 + bottom: 0;
  3345 +}
  3346 +
  3347 +.popup-top {
  3348 + border-bottom: 1rpx solid #eee;
  3349 + height: 155rpx;
  3350 + width: 95%;
  3351 + margin: auto;
  3352 + line-height: 155rpx;
  3353 +
  3354 +}
  3355 +
  3356 +.bg_rights {
  3357 + border-top: 2rpx solid;
  3358 + border-right: 2rpx solid;
  3359 + transform: rotate(45deg);
  3360 + display: inline-block;
  3361 + width: 15rpx;
  3362 + height: 15rpx;
  3363 + border-color: #da0b31;
  3364 +}
  3365 +
  3366 +.modal-closes {
  3367 + position: absolute;
  3368 + right: 30rpx;
  3369 + top: -15rpx;
  3370 + height: 25rpx;
  3371 +
  3372 +}
  3373 +
  3374 +.choose_more {
  3375 + margin-top: 40rpx;
  3376 + margin-right: 20rpx;
  3377 +
  3378 +}
  3379 +
  3380 +.choose_mores {
  3381 + margin-top: 30rpx;
  3382 + margin-right: 15rpx;
  3383 +
  3384 +}
  3385 +
  3386 +.store-list {
  3387 + width: 95%;
  3388 + min-height: 700rpx;
  3389 + overflow-y: scroll;
  3390 + margin: auto;
  3391 + max-height: 700rpx;
  3392 +}
  3393 +
  3394 +.store-list .store_choose {
  3395 + width: 100%;
  3396 + height: 120rpx;
  3397 + line-height: 125rpx;
  3398 + border-bottom: 1rpx solid #eee;
  3399 + padding: 10rpx 0;
  3400 +}
  3401 +
  3402 +.store-list .store_choose .store {
  3403 + width: 100%;
  3404 + margin: auto;
  3405 + line-height: 37rpx;
  3406 + padding-left: 20rpx;
  3407 +
  3408 +}
  3409 +
  3410 +.xc-hook {
  3411 + width: 35rpx;
  3412 + height: 35rpx;
  3413 + transform: rotate(-145deg);
  3414 + line-height: 37rpx;
  3415 + text-align: center;
  3416 +}
  3417 +
  3418 +.xc-hooks {
  3419 + width: 30rpx;
  3420 + height: 30rpx;
  3421 + border: 1rpx solid #999;
  3422 +}
  3423 +
  3424 +.address-frame {
  3425 + width: 93%;
  3426 + margin-left: 7rpx;
  3427 +
  3428 +}
  3429 +
  3430 +.nearby_store {
  3431 + margin-left: 17rpx;
  3432 +}
  3433 +
  3434 +.address_name {
  3435 + margin-right: 10rpx;
  3436 + width: 360rpx;
  3437 +
  3438 +}
  3439 +
  3440 +.address-val {
  3441 + height: 38rpx;
  3442 + line-height: 38rpx;
  3443 +
  3444 +}
  3445 +
  3446 +.store-bottom {
  3447 + width: 85%;
  3448 + margin: auto;
  3449 + height: 90rpx;
  3450 +}
  3451 +
  3452 +.determine {
  3453 + width: 260rpx;
  3454 + height: 55rpx;
  3455 + border-radius: 50rpx;
  3456 + line-height: 55rpx;
  3457 +}
  3458 +
  3459 +.default {
  3460 + width: 260rpx;
  3461 + height: 55rpx;
  3462 + border: 3rpx solid #c8c8c8;
  3463 + border-radius: 50rpx;
  3464 + line-height: 55rpx;
  3465 +}
  3466 +
  3467 +.store-bottom-frame {
  3468 + width: 95%;
  3469 + margin: auto;
  3470 +
  3471 +}
  3472 +
  3473 +/* 门店分类列表 */
  3474 +.sort_store_list {
  3475 + max-height: 700rpx;
  3476 + min-height: 700rpx;
  3477 + overflow: hidden;
  3478 + overflow-y: scroll;
  3479 + width: 95%;
  3480 + margin: auto;
  3481 +}
  3482 +
  3483 +.sort_store_list .sort-store-frame {
  3484 + width: 100%;
  3485 + height: 100rpx;
  3486 + line-height: 100rpx;
  3487 + border-bottom: 1rpx solid #eee;
  3488 +
  3489 +}
  3490 +
  3491 +.sort_store_list .sort-store-frame .sort-store {
  3492 + width: 94.5%;
  3493 + margin: auto;
  3494 +}
  3495 +
  3496 +.black_rights-frame {
  3497 + width: 50%;
  3498 +}
  3499 +
  3500 +.black_rights-frame .black_rights {
  3501 + border-top: 3rpx solid;
  3502 + border-right: 3rpx solid;
  3503 + transform: rotate(45deg);
  3504 + display: inline-block;
  3505 + width: 20rpx;
  3506 + height: 20rpx;
  3507 +}
  3508 +
  3509 +.xc-val-money {
  3510 + height: 55rpx;
  3511 +}
  3512 +
  3513 +.xc-distance-bottom {
  3514 + margin-bottom: 40rpx;
  3515 +}
  3516 +
  3517 +.xc-distance-top {
  3518 + margin-top: 10rpx;
  3519 +}
  3520 +
  3521 +.xc-width {
  3522 + width: 100%;
  3523 +}
  3524 +
  3525 +.right-arrow {
  3526 + width: 15rpx;
  3527 + height: 15rpx;
  3528 + border-top: 2rpx solid #d70026;
  3529 + border-right: 2rpx solid #d70026;
  3530 + transform: rotate(45deg);
  3531 + display: inline-block;
  3532 + margin-bottom: 3rpx;
  3533 +}
  3534 +
  3535 +.xc-goods-attribute {
  3536 + border-bottom: 1px solid #eee;
  3537 + padding-bottom: 20rpx;
  3538 + /* margin-bottom:40rpx; */
  3539 +}
  3540 +
  3541 +.xc-val-fream {
  3542 + width: 105rpx;
  3543 +}
  3544 +
  3545 +.is_stock {
  3546 + width: 58%;
  3547 + height: 70rpx;
  3548 + border-radius: 55rpx;
  3549 +}
  3550 +
  3551 +.select_store_height {
  3552 + height: 50rpx;
  3553 +}
  3554 +
  3555 +.butttem5 {
  3556 + margin-bottom: 5rpx;
  3557 +}
  3558 +
  3559 +.no_pj_list {
  3560 + text-align: center;
  3561 + width: 100%;
  3562 + color: #999;
  3563 + margin-top: 30rpx;
  3564 + display: inline-block;
  3565 + font-size: 28rpx
  3566 +}
  3567 +
  3568 +
  3569 +.join-cart>view.no_store {
  3570 + width: 58%;
  3571 + background-color: #adadad;
  3572 +}
  3573 +
  3574 +.s_btn {
  3575 + margin-top: 25rpx;
  3576 +}
  3577 +
  3578 +/* 美妆价的样式 */
  3579 +.beauty-makeup-frame {
  3580 + /* width: 101.5%;
  3581 + margin: auto; */
  3582 + height: 120rpx;
  3583 + border-radius: 15rpx;
  3584 + margin-top: 10px;
  3585 +
  3586 +}
  3587 +
  3588 +.beauty-makeup-frame .left {
  3589 + width: 80%;
  3590 + height: 100%;
  3591 + background: #f7f7f7;
  3592 + border-radius: 20rpx 0rpx 0rpx 20rpx;
  3593 + /* padding: 0 10rpx; */
  3594 +}
  3595 +
  3596 +.card-frame {
  3597 + margin-top: 0rpx;
  3598 + /* padding-right: 23rpx;
  3599 + margin-right: 15rpx; */
  3600 +}
  3601 +
  3602 +.advert-card {
  3603 + margin-top: 0rpx !important;
  3604 +
  3605 +}
  3606 +
  3607 +.beauty-makeup-frame .right {
  3608 + width: 20%;
  3609 + height: 100%;
  3610 + background: #f3efe3;
  3611 + border-radius: 0rpx 20rpx 20rpx 0rpx;
  3612 +}
  3613 +
  3614 +.grade-card-frame {
  3615 +
  3616 + /* height:45rpx ; */
  3617 + background: #3c300a;
  3618 + border-radius: 20rpx;
  3619 + /* margin-top: 10px;
  3620 + margin-left: 7rpx; */
  3621 + justify-content: center;
  3622 + padding: 4rpx 12rpx;
  3623 +}
  3624 +
  3625 +.grade-card-frame .img {
  3626 + width: 24rpx;
  3627 + height: 24rpx;
  3628 + margin-top: 2px;
  3629 +
  3630 +}
  3631 +
  3632 +.grade-card-frame .card-name {
  3633 + margin-left: 8rpx;
  3634 + /* max-width: 120rpx; */
  3635 + max-width: 165rpx;
  3636 +}
  3637 +
  3638 +.card-effect {
  3639 + /* margin-left: 15rpx; */
  3640 +}
  3641 +
  3642 +.at_once_carde {
  3643 + width: 65rpx;
  3644 + height: 75rpx;
  3645 + line-height: 38rpx;
  3646 +}
  3647 +
  3648 +.bg_right {
  3649 + width: 18rpx;
  3650 + height: 18rpx;
  3651 + border-top: 2rpx solid #333;
  3652 + border-right: 2rpx solid #333;
  3653 + transform: rotate(45deg);
  3654 + display: inline-block;
  3655 + margin-bottom: 3rpx;
  3656 +
  3657 +}
  3658 +
  3659 +.carde_frame {
  3660 + height: 50rpx;
  3661 + /* line-height: 18rpx */
  3662 +}
  3663 +
  3664 +button.custom-service {
  3665 + line-height: normal;
  3666 + border: 0;
  3667 +}
  3668 +
  3669 +button.custom-service::after {
  3670 + border: 0;
  3671 +}
  3672 +
  3673 +.no_store,.c-red22 {
  3674 + color: #d60021;
  3675 + font-size: 26rpx;
  3676 +}
  3677 +
  3678 +
  3679 +.cx_show_view {
  3680 + width: 580rpx;
  3681 + /* line-height: 30rpx; margin-bottom: 6rpx; */
  3682 +}
  3683 +
  3684 +.cx_show_view .word {
  3685 + width: 400rpx
  3686 +}
  3687 +
  3688 +.prom_condition {
  3689 + color: #f23030;
  3690 + /* width: 180rpx; */
  3691 + /* height: 30rpx; */
  3692 + /* font-size: 20rpx; */
  3693 + /* padding-top: 0.01rpx; */
  3694 + /* display: flex;
  3695 + justify-content: center;
  3696 + align-items: center; */
  3697 + border: 2rpx solid #f23030;
  3698 + border-radius: 6rpx;
  3699 + /* margin-right: 10rpx; */
  3700 + /* margin-left: 10rpx; */
  3701 + font-size: 24rpx;
  3702 + padding-right: 6rpx;
  3703 + /* padding: 0 10rpx; */
  3704 +}
  3705 +
  3706 +.hui_img {
  3707 + width: 44rpx;
  3708 + height: 44rpx;
  3709 + margin-right: 8rpx
  3710 +}
  3711 +
  3712 +.order_hui {
  3713 + color: #444;
  3714 + width: 420rpx
  3715 +}
  3716 +
  3717 +.order_hui view {
  3718 + height: 34rpx;
  3719 + line-height: 34rpx;
  3720 +}
  3721 +
  3722 +.dp_img {
  3723 + width: 240rpx;
  3724 + height: 240rpx;
  3725 + margin: 0 40rpx
  3726 +}
  3727 +
  3728 +.dp_cx_view {
  3729 + border-bottom: 0.02rpx solid #eee;
  3730 + padding-bottom: 40rpx
  3731 +}
  3732 +
  3733 +.act_content {
  3734 + margin-top: 40rpx
  3735 +}
  3736 +
  3737 +.act_content view {
  3738 + margin-bottom: 12rpx
  3739 +}
  3740 +
  3741 +.color_b {
  3742 + color: #ff9c00
  3743 +}
  3744 +
  3745 +.poster-container {
  3746 + box-sizing: border-box;
  3747 + position: fixed;
  3748 + width: 610rpx;
  3749 + top: 50%;
  3750 + left: 50%;
  3751 + transform: translate(-50%, -50%);
  3752 + /* width: calc(100% - 210rpx); */
  3753 + z-index: 1000;
  3754 +}
  3755 +
  3756 +.mask {
  3757 + position: fixed;
  3758 + top: 0;
  3759 + left: 0;
  3760 + width: 100%;
  3761 + height: 100%;
  3762 + z-index: 999;
  3763 + background-color: rgba(0, 0, 0, .6);
  3764 +}
  3765 +
  3766 +.poster-wrapper {
  3767 + width: 100%;
  3768 +}
  3769 +
  3770 +.poster {
  3771 + box-sizing: border-box;
  3772 + width: 100%;
  3773 + height: 980rpx;
  3774 + border-radius: 16rpx;
  3775 + /* box-shadow: 0 8px 12px #666; */
  3776 + position: relative;
  3777 + z-index: 999;
  3778 + overflow: hidden;
  3779 +}
  3780 +
  3781 +.poster-img {
  3782 + display: block;
  3783 + width: 100%;
  3784 + height: 100%;
  3785 +}
  3786 +
  3787 +.btn-container {
  3788 + display: flex;
  3789 + justify-content: space-around;
  3790 +}
  3791 +
  3792 +.btn-share {
  3793 + display: block;
  3794 + background-color: #FE6867;
  3795 + color: white;
  3796 + border-radius: 8rpx;
  3797 + line-height: 80rpx;
  3798 + margin-top: 28rpx;
  3799 + padding: 0 60rpx;
  3800 +}
  3801 +
  3802 +/* .btn-close {
  3803 + background-color: rgba(0,0,0,.5);
  3804 + color: white;
  3805 + width: 40rpx;
  3806 + height: 40rpx;
  3807 + line-height: 40rpx;
  3808 + text-align: center;
  3809 + border-radius: 50%;
  3810 + position: absolute;
  3811 + right: 20rpx;
  3812 + top: 10rpx;
  3813 +} */
  3814 +
  3815 +.goods-price .rel_txt {
  3816 + /* position: relative; top: 32rpx; */
  3817 + font-size: 30rpx;
  3818 +}
  3819 +
  3820 +.goods-price .rel_img {
  3821 + width: 62rpx;
  3822 + height: 62rpx;
  3823 + position: relative;
  3824 + top: 8rpx;
  3825 +}
  3826 +
  3827 +.btn-close {
  3828 + /* background-color: rgba(0,0,0,.5); */
  3829 + color: #ccc;
  3830 + /* width: 50rpx;
  3831 + height: 50rpx;
  3832 + line-height: 50rpx;
  3833 + text-align: center; */
  3834 + border-radius: 50%;
  3835 + position: absolute;
  3836 + right: 20rpx;
  3837 + top: 20rpx;
  3838 +}
  3839 +
  3840 +.icon-close {
  3841 + font-size: 36rpx;
  3842 +}
  3843 +
  3844 +.quan_price {
  3845 + background-color: #ff4700;
  3846 + color: #fff;
  3847 + padding: 10rpx 25rpx;
  3848 + margin-left: 10rpx;
  3849 + border-radius: 30rpx;
  3850 +}
  3851 +
  3852 +/*--闪白屏--*/
  3853 +.g_img_box {
  3854 + background-position: center center;
  3855 + background-repeat: no-repeat;
  3856 + -webkit-background-size: cover;
  3857 + -moz-background-size: cover;
  3858 + background-size: cover;
  3859 +}
  3860 +
  3861 +
  3862 +
  3863 +.arrow {
  3864 + width: auto !important;
  3865 + position: absolute;
  3866 + right: 0;
  3867 + top: 50%;
  3868 + transform: translateY(-50%);
  3869 +}
  3870 +
  3871 +
  3872 +.logo-container {
  3873 + -webkit-filter: brightness(80%);
  3874 + filter: brightness(80%);
  3875 +}
  3876 +
  3877 +.logo {
  3878 + width: 132rpx;
  3879 + height: 37rpx;
  3880 + margin-right: 10rpx;
  3881 +}
  3882 +
  3883 +.miao_lab {
  3884 + width: 36rpx;
  3885 + height: 36rpx;
  3886 + border: 4rpx solid #e71f19;
  3887 + color: #e71f19;
  3888 + text-align: center;
  3889 + margin-right: 10rpx;
  3890 + line-height: 36rpx;
  3891 + font-size: 22rpx;
  3892 + font-weight: bolder;
  3893 + border-radius: 50%;
  3894 +}
  3895 +
  3896 +.pop_more_act .content {
  3897 + position: fixed;
  3898 + background: #fff;
  3899 + width: 100%;
  3900 + left: 0;
  3901 + bottom: 0;
  3902 + z-index: 1000;
  3903 +}
  3904 +
  3905 +.p_btn {
  3906 + background-color: #f23030;
  3907 + height: 70rpx;
  3908 + line-height: 70rpx;
  3909 + color: #fff;
  3910 +}
  3911 +
  3912 +.mt20 {
  3913 + margin-top: 20rpx
  3914 +}
  3915 +
  3916 +.group .group-list.luck {
  3917 + padding: 0 20rpx;
  3918 + justify-content: flex-start;
  3919 +}
  3920 +
  3921 +.group-list.luck .gtou~.gtou {
  3922 + margin-left: -16rpx;
  3923 +}
  3924 +
  3925 +.gtou.more {
  3926 + background-color: #ddd;
  3927 + text-align: center;
  3928 + line-height: 70rpx;
  3929 + border-radius: 50%;
  3930 + color: #aaa;
  3931 +}
  3932 +
  3933 +
  3934 +.tick {
  3935 + position: relative;
  3936 +}
  3937 +
  3938 +.tick:before {
  3939 + content: '';
  3940 + display: inline-block;
  3941 + vertical-align: middle;
  3942 + margin-top: -4rpx;
  3943 + margin-right: 12rpx;
  3944 + width: 22rpx;
  3945 + height: 22rpx;
  3946 + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat;
  3947 + background-size: 22rpx auto;
  3948 +}
  3949 +
  3950 +.details::after {
  3951 + content: '';
  3952 + position: absolute;
  3953 + right: 0;
  3954 + top: 0;
  3955 + bottom: 0;
  3956 + margin: auto;
  3957 + display: inline-block;
  3958 + width: 40rpx;
  3959 + height: 40rpx;
  3960 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=);
  3961 + background-repeat: no-repeat;
  3962 + background-size: 40rpx auto;
  3963 +}
  3964 +
  3965 +.lh2 {
  3966 + line-height: 2;
  3967 +}
  3968 +
  3969 +.fill-box {
  3970 + background-color: #f23030;
  3971 + color: white;
  3972 + padding: 0 6rpx;
  3973 + border-radius: 0 0 10rpx 0;
  3974 + margin-right: 4rpx;
  3975 +}
  3976 +
  3977 +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx }
  3978 +
  3979 +.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx }
  3980 +/* 历史购买 */
  3981 +.swiper-container {
  3982 + position: absolute;
  3983 + top: 0;
  3984 + left: 0;
  3985 + padding: 20rpx 10rpx;
  3986 + width: 100%;
  3987 + box-sizing: border-box;
  3988 + z-index: 98;
  3989 +}
  3990 +
  3991 +.swiper {
  3992 + height: 60rpx;
  3993 + color: white;
  3994 + font-size: 26rpx;
  3995 +}
  3996 +
  3997 +.swiper-item {
  3998 + /* width: auto !important;
  3999 + background-color: rgba(0,0,0,.4);
  4000 + border-radius: 60rpx; */
  4001 + position: relative;
  4002 +}
  4003 +
  4004 +.swiper-item .item {
  4005 + position: absolute;
  4006 +}
  4007 +
  4008 +.item {
  4009 + /* position: absolute; */
  4010 + display: flex;
  4011 + align-items: center;
  4012 + /* justify-content: center; */
  4013 + border-radius: 60rpx;
  4014 + background-color: rgba(0,0,0,.4);
  4015 + /* position: absolute; */
  4016 +}
  4017 +
  4018 +.avatar-container {
  4019 + width: 60rpx;
  4020 + height: 60rpx;
  4021 + border-radius: 50%;
  4022 + overflow: hidden;
  4023 + flex-shrink: 0;
  4024 +}
  4025 +.avatar-container image {
  4026 + width: 100%;
  4027 + height: 100%;
  4028 +}
  4029 +
  4030 +.hideArea {
  4031 + position: absolute;
  4032 + left: -1000px;
  4033 + top: -1000px;
  4034 +}
  4035 +
  4036 +.searchbar {
  4037 + height: 95rpx;
  4038 + border-bottom: 2rpx solid rgb(238, 238, 238);
  4039 +}
  4040 +.storeListpadd {
  4041 + padding: 0rpx 31rpx;
  4042 +}
  4043 +.search {
  4044 + width: 125rpx;
  4045 + height: 45rpx;
  4046 + line-height: 45rpx;
  4047 + background-color: rgb(219, 27, 52);
  4048 + border-radius: 30rpx;
  4049 + color: rgb(255, 255, 255);
  4050 +}
  4051 +.inputstore {
  4052 + width: 510rpx;
  4053 + height: 43rpx;
  4054 + line-height: 43rpx;
  4055 + border-radius: 30rpx;
  4056 + border: 2rpx solid rgb(238, 238, 238);
  4057 + padding-left: 30rpx;
  4058 +}
  4059 +
  4060 +.modal-close {
  4061 + position: absolute;
  4062 + right: 25rpx;
  4063 + top:16rpx;
  4064 +}
  4065 +.ai_end{
  4066 + align-items: flex-end;
  4067 +}
  4068 +/* 中间等距两边贴边 */
  4069 +.flex-space-between{
  4070 + display: flex;
  4071 + justify-content:space-between;
  4072 +}
  4073 +.fs30{
  4074 + font-size:30rpx;
  4075 +}
  4076 +.fs28{
  4077 + font-size: 28rpx;
  4078 +}
  4079 +.red-co{
  4080 + color: #d60021;
  4081 +
  4082 +}
  4083 +.flex{
  4084 + display: flex;
  4085 + align-items: center;
  4086 +}
  4087 +.fs28{
  4088 + font-size: 28rpx;
  4089 +}
  4090 +/* 水平垂直 */
  4091 +.flex-center{
  4092 + display:flex;
  4093 + justify-content:center;
  4094 + align-items:center;
  4095 + }
  4096 + /* 垂直居中 */
  4097 +.flex-vertical{
  4098 + display:flex;
  4099 + align-items:center;
  4100 + }
  4101 + .fs20{
  4102 + font-size: 20rpx;
  4103 +}
  4104 +.red-b{
  4105 + background: #d60021;
  4106 +}
  4107 +.white{
  4108 + color: #fff;
  4109 +}
  4110 +/* 圆 */
  4111 +.circle{
  4112 + border-radius: 50%;
  4113 + -moz-border-radius: 50%;
  4114 + -webkit-border-radius: 50%;
  4115 +}
  4116 +.xc-ash{
  4117 + color: #b9b9b9;
  4118 + }
  4119 + /* 垂直居中 中间等距两边贴边 7.13*/
  4120 +.flex-vertical-between{
  4121 + display:flex;
  4122 + align-items:center;
  4123 + justify-content:space-between;
  4124 + }
  4125 + .xc-ash-9f{
  4126 + color: #9fa1a0;
  4127 +
  4128 +}
  4129 +.fs24{
  4130 + font-size: 24rpx !important;
  4131 +}
  4132 +.t-c {
  4133 + text-align: center;
  4134 +}
  4135 +.xc-black3{
  4136 + color: #333;
  4137 +}
  4138 +/* 圆 */
  4139 +.circle{
  4140 + border-radius: 50%;
  4141 + -moz-border-radius: 50%;
  4142 + -webkit-border-radius: 50%;
  4143 +}
  4144 +.yellow{
  4145 + background-color: #ffb03f;
  4146 +}
0 \ No newline at end of file 4147 \ No newline at end of file
components/diy_floatingWindow/diy_floatingWindow.js 0 → 100644
  1 +Component({
  2 + properties: {
  3 + // 这里定义了innerText属性,属性值可以在组件使用时指定
  4 + object:{
  5 + type: Object,
  6 + value:null
  7 + },
  8 +
  9 + },
  10 + data: {
  11 + // 这里是一些组件内部数据
  12 + someData: {}
  13 + },
  14 + methods: {
  15 + //--智能跳转--
  16 + go_url:function (e) {
  17 + var url=e.currentTarget.dataset.url;
  18 + getApp().goto(url);
  19 + },
  20 +
  21 + berror:function(e){
  22 + var iurl=getApp().globalData.setting.imghost;
  23 + var ob={};
  24 + var txt="object.title_img";
  25 + ob[txt] = iurl +'/miniapp/images/logo.png?v=1';
  26 + this.setData(ob);
  27 + },
  28 + nv_void(e){
  29 + var feedId=e.currentTarget.dataset.feedid;
  30 + var finderUserName=e.currentTarget.dataset.finderusername;
  31 + var video_type=e.currentTarget.dataset.video_type;
  32 + getApp().openChannelsActivity({
  33 + feedId,
  34 + finderUserName,
  35 + video_type
  36 + })
  37 + }
  38 + }
  39 +})
components/diy_floatingWindow/diy_floatingWindow.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
components/diy_floatingWindow/diy_floatingWindow.wxml 0 → 100644
  1 +<wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs>
  2 +
  3 +<view class="big_rim">
  4 + <!-- <navigator url="{{object.wxapp_url}}" >
  5 + <view class="custom-service" style="background-image: url({{object.img}});" >
  6 + <view class="s_title">{{object.title}}</view>
  7 + </view>
  8 + </navigator> -->
  9 + <navigator url="{{object.wxapp_url}}" wx:if="{{g_filter.has_char(object.wxapp_url,'plugin')>=0}}">
  10 + <view class="custom-service" style="background-image: url({{object.img}});{{object.loaction_index==1 ? 'right: 2rpx;' :'left: 2rpx;' }}" >
  11 + <view class="s_title">{{object.title}}</view>
  12 + </view>
  13 + </navigator>
  14 + <navigator wx:elif="{{object.AppId}}" style="width:{{100/nav_list.length}}%;" target="miniProgram" app-id="{{object.AppId}}" path="{{object.wxapp_url}}">
  15 + <view class="custom-service" style="background-image: url({{object.img}});{{object.loaction_index==1 ? 'right: 2rpx;' :'left: 2rpx;' }}" >
  16 + <view class="s_title">{{object.title}}</view>
  17 + </view>
  18 + </navigator>
  19 + <view wx:elif="{{object.finderUserName && object.video_type}}" data-url="{{object.wxapp_url}}" bindtap="nv_void" data-feedId="{{object.feedId}}" data-video_type="{{object.video_type}}" data-finderUserName="{{object.finderUserName}}" >
  20 + <view class="custom-service" style="background-image: url({{object.img}});{{object.loaction_index==1 ? 'right: 2rpx;' :'left: 2rpx;' }}" >
  21 + <view class="s_title">{{object.title}}</view>
  22 + </view>
  23 + </view>
  24 + <view data-url="{{object.wxapp_url}}" bindtap="go_url" wx:else>
  25 + <view class="custom-service" style="background-image: url({{object.img}});{{object.loaction_index==1 ? 'right: 2rpx;' :'left: 2rpx;' }}" >
  26 + <view class="s_title">{{object.title}}</view>
  27 + </view>
  28 + </view>
  29 +</view>
components/diy_floatingWindow/diy_floatingWindow.wxss 0 → 100644
  1 +.custom-service {
  2 + width: 100rpx;
  3 + height: 100rpx;
  4 + /* background-color: red; */
  5 + border-radius: 50%;
  6 + z-index: 100;
  7 + line-height: 28rpx;
  8 + position: fixed;
  9 + top: 50%;
  10 +
  11 + /* background-position: 50%; */
  12 + background-repeat: no-repeat;
  13 + /* background-attachment: fixed; */
  14 + background-size: cover;
  15 +
  16 +}
  17 +.s_title{
  18 + font-size: 20rpx;
  19 + position: absolute;
  20 + left: 0;
  21 + right: 0;
  22 + bottom: 5rpx;
  23 + text-align: center;
  24 + color: #fff;
  25 +}
components/diy_goodsGroup/diy_goodsGroup.js
@@ -62,8 +62,9 @@ Component({ @@ -62,8 +62,9 @@ Component({
62 is_get:0, 62 is_get:0,
63 63
64 is_retail_price:0, //是否显示零售价 64 is_retail_price:0, //是否显示零售价
65 - swiperHeight:0 65 + swiperHeight:0,
66 // action_index:0, //选中的tab项 66 // action_index:0, //选中的tab项
  67 + add_purchase:false,
67 }, 68 },
68 69
69 lifetimes: { 70 lifetimes: {
@@ -626,7 +627,29 @@ Component({ @@ -626,7 +627,29 @@ Component({
626 if (this.data.object.goodscount * this.data.page < this.data.total) { 627 if (this.data.object.goodscount * this.data.page < this.data.total) {
627 this.setLoading() 628 this.setLoading()
628 } 629 }
629 - } 630 + },
  631 + // 加购方法show
  632 + addPurchase(even){
  633 + this.setData({
  634 + add_purchase:true
  635 + })
  636 + let gid = even.currentTarget.dataset.gid
  637 + let prom_id = even.currentTarget.dataset.prom_id
  638 + let prom_type = even.currentTarget.dataset.prom_type
  639 + let add_purchase = this.selectComponent("#add_purchase");
  640 + if (add_purchase) {
  641 + add_purchase.init(gid,prom_type,prom_id)
  642 + }
  643 + },
  644 + // 加购方法 hide
  645 + hide_add_purchase(){
  646 + console.error('隐藏加购方法。。。。');
  647 + setTimeout(()=>{
  648 + this.setData({
  649 + add_purchase:false
  650 + })
  651 + },1000)
  652 + }
630 653
631 654
632 655
components/diy_goodsGroup/diy_goodsGroup.json
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "component": true, 2 "component": true,
3 "usingComponents": { 3 "usingComponents": {
4 "mp-loading": "weui-miniprogram/loading/loading", 4 "mp-loading": "weui-miniprogram/loading/loading",
5 - "mp-sticky": "../mp-sticky/mp-sticky" 5 + "mp-sticky": "../mp-sticky/mp-sticky",
  6 + "add_purchase": "/components/add_purchase/add_purchase"
6 } 7 }
7 } 8 }
8 \ No newline at end of file 9 \ No newline at end of file
components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 </view> 79 </view>
80 </view> 80 </view>
81 </view> 81 </view>
82 - <view> 82 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
83 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> 83 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
84 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 84 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
85 </view> 85 </view>
@@ -127,7 +127,7 @@ @@ -127,7 +127,7 @@
127 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> 127 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
128 </view> 128 </view>
129 </view> 129 </view>
130 - <view> 130 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
131 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 131 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
132 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 132 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
133 </view> 133 </view>
@@ -175,7 +175,7 @@ @@ -175,7 +175,7 @@
175 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> 175 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
176 </view> 176 </view>
177 </view> 177 </view>
178 - <view> 178 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
179 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> 179 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image>
180 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> 180 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> -->
181 </view> 181 </view>
@@ -222,7 +222,7 @@ @@ -222,7 +222,7 @@
222 222
223 </view> 223 </view>
224 </view> 224 </view>
225 - <view> 225 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
226 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image> 226 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image>
227 <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 227 <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
228 </view> 228 </view>
@@ -277,7 +277,7 @@ @@ -277,7 +277,7 @@
277 </view> 277 </view>
278 </view> 278 </view>
279 </view> 279 </view>
280 - <view> 280 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
281 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> 281 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
282 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 282 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
283 </view> 283 </view>
@@ -315,7 +315,7 @@ @@ -315,7 +315,7 @@
315 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> 315 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
316 </view> 316 </view>
317 </view> 317 </view>
318 - <view> 318 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
319 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 319 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
320 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 320 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
321 </view> 321 </view>
@@ -353,7 +353,7 @@ @@ -353,7 +353,7 @@
353 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> 353 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
354 </view> 354 </view>
355 </view> 355 </view>
356 - <view> 356 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
357 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 357 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
358 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 358 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
359 </view> 359 </view>
@@ -448,7 +448,7 @@ @@ -448,7 +448,7 @@
448 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> 448 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
449 </view> 449 </view>
450 </view> 450 </view>
451 - <view> 451 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
452 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> 452 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image>
453 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> 453 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> -->
454 </view> 454 </view>
@@ -1360,4 +1360,8 @@ @@ -1360,4 +1360,8 @@
1360 <image style="width: 40rpx; height: 40rpx; " src="{{url}}/miniapp/images/loader.gif"></image> 1360 <image style="width: 40rpx; height: 40rpx; " src="{{url}}/miniapp/images/loader.gif"></image>
1361 </view> 1361 </view>
1362 </block> 1362 </block>
1363 -</view>  
1364 \ No newline at end of file 1363 \ No newline at end of file
  1364 +</view>
  1365 +
  1366 +
  1367 +<!-- 加购 -->
  1368 +<add_purchase id="add_purchase" bindhide_add_purchase="hide_add_purchase" wx:if="{{add_purchase}}"></add_purchase>
1365 \ No newline at end of file 1369 \ No newline at end of file
components/diy_public/diy_public.js
@@ -55,7 +55,7 @@ Component({ @@ -55,7 +55,7 @@ Component({
55 }, 55 },
56 nav1:'/packageA/pages/goodsInfo/goodsInfo?', 56 nav1:'/packageA/pages/goodsInfo/goodsInfo?',
57 nav2:'/pages/goods/goodsInfo/goodsInfo?', 57 nav2:'/pages/goods/goodsInfo/goodsInfo?',
58 - 58 + add_purchase:false,
59 }, 59 },
60 60
61 pageLifetimes: { 61 pageLifetimes: {
@@ -547,6 +547,27 @@ Component({ @@ -547,6 +547,27 @@ Component({
547 547
548 548
549 } 549 }
  550 + },
  551 + // 加购方法show
  552 + addPurchase(even){
  553 + this.setData({
  554 + add_purchase:true
  555 + })
  556 + let gid = even.currentTarget.dataset.gid
  557 + let prom_id = even.currentTarget.dataset.prom_id
  558 + let prom_type = even.currentTarget.dataset.prom_type
  559 + let add_purchase = this.selectComponent("#add_purchase");
  560 + if (add_purchase) {
  561 + add_purchase.init(gid,prom_type,prom_id)
  562 + }
  563 + },
  564 + // 加购方法 hide
  565 + hide_add_purchase(){
  566 + setTimeout(()=>{
  567 + this.setData({
  568 + add_purchase:false
  569 + })
  570 + },1000)
550 } 571 }
551 572
552 }, 573 },
components/diy_public/diy_public.json
1 { 1 {
2 "component": true, 2 "component": true,
3 - "usingComponents": {} 3 + "usingComponents": {
  4 + "add_purchase": "/components/add_purchase/add_purchase"
  5 + }
4 } 6 }
5 \ No newline at end of file 7 \ No newline at end of file
components/diy_public/diy_public.wxml
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 </view> 61 </view>
62 </view> 62 </view>
63 </view> 63 </view>
64 - <view> 64 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
65 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> 65 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
66 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 66 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
67 </view> 67 </view>
@@ -115,7 +115,7 @@ @@ -115,7 +115,7 @@
115 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view> 115 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view>
116 </view> 116 </view>
117 </view> 117 </view>
118 - <view> 118 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
119 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 119 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
120 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 120 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
121 </view> 121 </view>
@@ -163,7 +163,7 @@ @@ -163,7 +163,7 @@
163 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view> 163 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view>
164 </view> 164 </view>
165 </view> 165 </view>
166 - <view> 166 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
167 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> 167 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image>
168 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> 168 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> -->
169 </view> 169 </view>
@@ -214,7 +214,7 @@ @@ -214,7 +214,7 @@
214 214
215 </view> 215 </view>
216 </view> 216 </view>
217 - <view> 217 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
218 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image> 218 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image>
219 <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 219 <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
220 </view> 220 </view>
@@ -273,7 +273,7 @@ @@ -273,7 +273,7 @@
273 </view> 273 </view>
274 </view> 274 </view>
275 </view> 275 </view>
276 - <view> 276 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
277 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> 277 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
278 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 278 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
279 </view> 279 </view>
@@ -315,7 +315,7 @@ @@ -315,7 +315,7 @@
315 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view> 315 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view>
316 </view> 316 </view>
317 </view> 317 </view>
318 - <view> 318 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
319 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 319 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
320 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 320 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
321 </view> 321 </view>
@@ -357,7 +357,7 @@ @@ -357,7 +357,7 @@
357 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view> 357 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view>
358 </view> 358 </view>
359 </view> 359 </view>
360 - <view> 360 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
361 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 361 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
362 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 362 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
363 </view> 363 </view>
@@ -452,10 +452,10 @@ @@ -452,10 +452,10 @@
452 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view> 452 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view>
453 </view> 453 </view>
454 </view> 454 </view>
455 - <view> 455 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}">
456 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> 456 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image>
457 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> 457 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> -->
458 - </view> 458 + </view>
459 </view> 459 </view>
460 </navigator> 460 </navigator>
461 </view> 461 </view>
@@ -464,4 +464,13 @@ @@ -464,4 +464,13 @@
464 <!-- </swiper> --> 464 <!-- </swiper> -->
465 </block> 465 </block>
466 </block> 466 </block>
467 -</block>  
468 \ No newline at end of file 467 \ No newline at end of file
  468 +</block>
  469 +
  470 +
  471 +
  472 +
  473 +<!-- 加购 -->
  474 +<add_purchase id="add_purchase" bindhide_add_purchase="hide_add_purchase" wx:if="{{add_purchase}}"></add_purchase>
  475 +
  476 +
  477 +
components/diy_scan/diy_scan.js
@@ -32,7 +32,7 @@ Component({ @@ -32,7 +32,7 @@ Component({
32 success: (res) => { 32 success: (res) => {
33 var result = res.result; 33 var result = res.result;
34 wx.navigateTo({ 34 wx.navigateTo({
35 - url: "/pages/goods/search/search?s_key=" + result, 35 + url: "/packageG/pages/goods/search/search?s_key=" + result,
36 }); 36 });
37 } 37 }
38 }) 38 })
components/diy_searchbox/diy_searchbox.js
@@ -67,7 +67,7 @@ Component({ @@ -67,7 +67,7 @@ Component({
67 click_sear:function(){ 67 click_sear:function(){
68 //如果搜索的单词为空的时候,就要跳到搜索页 68 //如果搜索的单词为空的时候,就要跳到搜索页
69 if(this.data.keyword!=''){ 69 if(this.data.keyword!=''){
70 - getApp().goto("/pages/goods/search/search"); 70 + getApp().goto("/packageG/pages/goods/search/search");
71 return false; 71 return false;
72 } 72 }
73 this.setData({first:0,inputShowed:1,inputval:''}); 73 this.setData({first:0,inputShowed:1,inputval:''});
@@ -94,7 +94,7 @@ Component({ @@ -94,7 +94,7 @@ Component({
94 this.setData({inputval:val}); 94 this.setData({inputval:val});
95 }, 95 },
96 sear:function(){ 96 sear:function(){
97 - var url="/pages/goods/search/search?s_key="+this.data.inputval; 97 + var url="/packageG/pages/goods/search/search?s_key="+this.data.inputval;
98 getApp().goto(url); 98 getApp().goto(url);
99 }, 99 },
100 100
@@ -108,7 +108,7 @@ Component({ @@ -108,7 +108,7 @@ Component({
108 sear_key:function(e){ 108 sear_key:function(e){
109 this.data.click_sear=1; 109 this.data.click_sear=1;
110 var str=e.currentTarget.dataset.item; 110 var str=e.currentTarget.dataset.item;
111 - var url="/pages/goods/search/search?s_key="+str; 111 + var url="/packageG/pages/goods/search/search?s_key="+str;
112 this.data.click_sear=0; 112 this.data.click_sear=0;
113 getApp().goto(url); 113 getApp().goto(url);
114 114
components/diy_seckill/diy_seckill.js
@@ -38,7 +38,9 @@ Component({ @@ -38,7 +38,9 @@ Component({
38 user_id:0, 38 user_id:0,
39 img_width:100, 39 img_width:100,
40 img_height:100, 40 img_height:100,
41 - swiperHeight:0 41 + swiperHeight:0,
  42 + prom_type:1,
  43 + add_purchase:false,
42 }, 44 },
43 45
44 pageLifetimes: { 46 pageLifetimes: {
@@ -387,6 +389,28 @@ Component({ @@ -387,6 +389,28 @@ Component({
387 389
388 390
389 } 391 }
  392 + },
  393 + // 加购方法show
  394 + addPurchase(even){
  395 + this.setData({
  396 + add_purchase:true
  397 + })
  398 + let gid = even.currentTarget.dataset.gid
  399 + let prom_id = even.currentTarget.dataset.prom_id
  400 + let prom_type = even.currentTarget.dataset.prom_type
  401 + let goods_type= even.currentTarget.dataset.goods_type
  402 + let add_purchase = this.selectComponent("#add_purchase");
  403 + if (add_purchase) {
  404 + add_purchase.init(gid,prom_type,prom_id,goods_type)
  405 + }
  406 + },
  407 + // 加购方法 hide
  408 + hide_add_purchase(){
  409 + setTimeout(()=>{
  410 + this.setData({
  411 + add_purchase:false
  412 + })
  413 + },1000)
390 } 414 }
391 415
392 }, 416 },
components/diy_seckill/diy_seckill.json
1 { 1 {
2 "component": true, 2 "component": true,
3 - "usingComponents": {} 3 + "usingComponents": {
  4 + "add_purchase": "/components/add_purchase/add_purchase"
  5 + }
4 } 6 }
5 \ No newline at end of file 7 \ No newline at end of file
components/diy_seckill/diy_seckill.wxml
  1 +<wxs module="filter" src="../../utils/filter.wxs"></wxs>
1 <block wx:if="{{goods_array.length>0}}"> 2 <block wx:if="{{goods_array.length>0}}">
2 <!--新版秒杀组件--> 3 <!--新版秒杀组件-->
3 <block wx:if="{{object.column_action_name}}"> 4 <block wx:if="{{object.column_action_name}}">
@@ -56,7 +57,7 @@ @@ -56,7 +57,7 @@
56 </view> 57 </view>
57 </view> 58 </view>
58 </view> 59 </view>
59 - <view> 60 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
60 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> 61 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
61 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 62 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
62 </view> 63 </view>
@@ -104,7 +105,7 @@ @@ -104,7 +105,7 @@
104 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> 105 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
105 </view> 106 </view>
106 </view> 107 </view>
107 - <view> 108 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
108 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 109 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
109 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 110 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
110 </view> 111 </view>
@@ -152,7 +153,7 @@ @@ -152,7 +153,7 @@
152 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> 153 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
153 </view> 154 </view>
154 </view> 155 </view>
155 - <view> 156 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
156 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> 157 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image>
157 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> 158 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> -->
158 </view> 159 </view>
@@ -199,7 +200,7 @@ @@ -199,7 +200,7 @@
199 200
200 </view> 201 </view>
201 </view> 202 </view>
202 - <view> 203 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
203 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image> 204 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width:60rpx;height: 60rpx;"></image>
204 <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 205 <view style="width: 130rpx;height: 60rpx;line-height: 60rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
205 </view> 206 </view>
@@ -254,7 +255,7 @@ @@ -254,7 +255,7 @@
254 </view> 255 </view>
255 </view> 256 </view>
256 </view> 257 </view>
257 - <view> 258 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
258 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image> 259 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
259 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 260 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
260 </view> 261 </view>
@@ -292,7 +293,7 @@ @@ -292,7 +293,7 @@
292 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> 293 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
293 </view> 294 </view>
294 </view> 295 </view>
295 - <view> 296 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
296 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 297 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
297 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 298 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
298 </view> 299 </view>
@@ -330,7 +331,7 @@ @@ -330,7 +331,7 @@
330 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> 331 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
331 </view> 332 </view>
332 </view> 333 </view>
333 - <view> 334 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
334 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image> 335 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 60rpx;height: 60rpx;"></image>
335 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> 336 <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
336 </view> 337 </view>
@@ -425,7 +426,7 @@ @@ -425,7 +426,7 @@
425 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> 426 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
426 </view> 427 </view>
427 </view> 428 </view>
428 - <view> 429 + <view catchtap="addPurchase" wx:if="{{aitem.residue!=0 && aitem.status ==1}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.id}}" data-prom_type="{{prom_type}}" data-goods_type="{{aitem.goods_type}}">
429 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> 430 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image>
430 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> 431 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> -->
431 </view> 432 </view>
@@ -571,4 +572,9 @@ @@ -571,4 +572,9 @@
571 </view> 572 </view>
572 <view class='clear'></view> 573 <view class='clear'></view>
573 </block> 574 </block>
574 -</block>  
575 \ No newline at end of file 575 \ No newline at end of file
  576 +</block>
  577 +
  578 +
  579 +
  580 +<!-- 加购 -->
  581 +<add_purchase id="add_purchase" bindhide_add_purchase="hide_add_purchase" wx:if="{{add_purchase}}"></add_purchase>
576 \ No newline at end of file 582 \ No newline at end of file
components/diy_service/diy_service.wxss
1 -.custom-service{ width: 116rpx; height: 116rpx; border-radius: 50%; background-color: #fff;z-index: 100; 1 +.custom-service{ width: 100rpx; height: 100rpx; border-radius: 50%; background-color: #fff;z-index: 100;
2 border: 1px solid #adadad; box-shadow: 0 0 10px 2px #adadad; line-height: 28rpx; 2 border: 1px solid #adadad; box-shadow: 0 0 10px 2px #adadad; line-height: 28rpx;
3 position: fixed; top: 40%; right: 2rpx; display: flex;align-items: center;justify-content: center;} 3 position: fixed; top: 40%; right: 2rpx; display: flex;align-items: center;justify-content: center;}
4 4
5 .cs-img{ width: 36rpx; height: 36rpx;} 5 .cs-img{ width: 36rpx; height: 36rpx;}
6 -.s_title{ font-size: 20rpx;}  
7 \ No newline at end of file 6 \ No newline at end of file
  7 +.s_title{ font-size: 14rpx;}
8 \ No newline at end of file 8 \ No newline at end of file
components/diy_top_nav/diy_top_nav.js 0 → 100644
  1 +// components/diy_top_nav/diy_top_nav.js
  2 +const app = getApp();
  3 +var os = app.globalData.setting;
  4 +Component({
  5 + /**
  6 + * 组件的属性列表
  7 + */
  8 + properties: {
  9 + nav_type:{
  10 + type:Number,
  11 + value:0,
  12 + },
  13 + istop:{
  14 + type:Number,
  15 + value:0,
  16 + },
  17 + nav_title:{
  18 + type:String,
  19 + value:'首页',
  20 + },
  21 + nav_frontColor:{
  22 + type:String,
  23 + value:'#ffffff',
  24 + },
  25 + nav_backgroundColor:{
  26 + type:String,
  27 + value:'#ff7295',
  28 + },
  29 + is_share:{
  30 + type:Boolean,
  31 + value:true
  32 + }
  33 + },
  34 +
  35 + /**
  36 + * 组件的初始数据
  37 + */
  38 + data: {
  39 + imghots: os.imghost,
  40 + nav_h:0, //导航胶囊上面状态栏的高度
  41 + mentButt_h:0,//导航胶囊高度
  42 + navleft_pb:0, //导航左边的自定义内容的左右内边距
  43 + nav_left_w:281, // 导航左边自定义的内容宽度
  44 + navleft_w:0, //左边胶囊宽度
  45 + nav_pb:0, // 导航的下内边距
  46 + show_menu:false,//详情页导航下拉菜单显示
  47 + men_list:[
  48 + {
  49 + name:'首页',
  50 + img:'miniapp/js_img/goods_info/home.png?v=3',
  51 + url:'/pages/index/index/index'
  52 + },
  53 + {
  54 + name:'我的订单',
  55 + img:'miniapp/js_img/goods_info/order.png?v=3',
  56 + url:'/pages/user/order_list/order_list'
  57 + },
  58 + {
  59 + name:'我的收藏',
  60 + img:'miniapp/js_img/goods_info/collect.png?v=3',
  61 + url:'/packageB/pages/user/collect_list/collect_list'
  62 + },
  63 + // {
  64 + // name:'浏览足迹',
  65 + // img:'',
  66 + // url:''
  67 + // },
  68 + ]
  69 + },
  70 + lifetimes:{
  71 + attached:function(){
  72 + //满屏顶部导航参数获取-----------
  73 + try {
  74 + let systemInfo = wx.getSystemInfoSync()
  75 + let mentButt = wx.getMenuButtonBoundingClientRect()
  76 + let nav_pb = mentButt.top - systemInfo.statusBarHeight
  77 + let navleft_pb = systemInfo.windowWidth - mentButt.right
  78 +
  79 + let user_no='';
  80 + if(getApp().globalData.userInfo){
  81 + user_no=getApp().globalData.userInfo.erpvipno
  82 + }
  83 +
  84 + this.setData({
  85 + nav_h:mentButt.top,
  86 + mentButt_h:mentButt.height,
  87 + nav_left_w:mentButt.left,
  88 + navleft_pb,
  89 + nav_pb,
  90 + navleft_w:mentButt.width*0.9,
  91 + user_no
  92 + })
  93 + } catch (e) {
  94 + console.error(e);
  95 + wx.showToast({
  96 + title: '系统参数获取失败',
  97 + icon: 'none',
  98 + duration: 2000
  99 + })
  100 + // this.setData({
  101 + // is_full_screen_navigation:false
  102 + // })
  103 + // Do something when catch error
  104 + }
  105 + }
  106 + },
  107 + /**
  108 + * 组件的方法列表
  109 + */
  110 + methods: {
  111 + nav_menu(e){
  112 + let url=e.currentTarget.dataset.url
  113 + getApp().goto(url)
  114 + },
  115 + show_menu_fn(){
  116 + this.setData({
  117 + show_menu:!this.data.show_menu
  118 + })
  119 + },
  120 + hide_menu_fn(){
  121 + this.setData({
  122 + show_menu:false
  123 + })
  124 + },
  125 + //分享
  126 + fenx_fn(){
  127 + this.triggerEvent('clickShare')
  128 + },
  129 + call_back(){
  130 + wx.navigateBack({
  131 + delta:1,
  132 + fail:()=>{
  133 + wx.reLaunch({
  134 + url: '/pages/index/index/index',
  135 + })
  136 + }
  137 + })
  138 + },
  139 + nav_search(){
  140 + getApp().goto('/pages/goods/search/search')
  141 + }
  142 + }
  143 +})
components/diy_top_nav/diy_top_nav.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
components/diy_top_nav/diy_top_nav.wxml 0 → 100644
  1 +<!--components/diy_top_nav/diy_top_nav.wxml-->
  2 +<!-- 支撑作用 -->
  3 +<view wx:if="{{nav_type==-1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};">
  4 + <view style="height: {{nav_h}}px;width: 100%;"></view>
  5 + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;"></view>
  6 +</view>
  7 +<!-- 默认没有返回按钮 -->
  8 +<view wx:if="{{nav_type==0}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};">
  9 + <view style="height: {{nav_h}}px;width: 100%;"></view>
  10 + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;">{{nav_title}}</view>
  11 +</view>
  12 +<!-- 默认有返回按钮 -->
  13 +<view wx:if="{{nav_type==5}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};">
  14 + <view style="height: {{nav_h}}px;width: 100%;"></view>
  15 + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;position: relative;">
  16 + <view catchtap="call_back" class="call_back_box">
  17 + <text class="nav_fh" ></text>
  18 + </view>
  19 + {{nav_title}}
  20 + </view>
  21 +</view>
  22 +
  23 +<!-- 广告轮播时 -->
  24 +<view wx:if="{{nav_type==1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};">
  25 + <view style="height: {{nav_h}}px;width: 100%;"></view>
  26 + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: left;padding-left: 20rpx;">{{nav_title}}</view>
  27 +</view>
  28 +
  29 +<!-- 详情页面 -->
  30 +<view wx:if="{{nav_type==2}}" style="padding-bottom:{{nav_pb}}px;{{ istop ? '' : ('background-color:'+nav_backgroundColor)}};color:{{nav_frontColor}};">
  31 + <!-- 显示一下user_id -->
  32 + <view style="position:relative;height: {{nav_h}}px;width: 100%; ">
  33 + <view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}</view>
  34 + </view>
  35 + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;display: flex;">
  36 + <view class="nav_left" style="width: {{nav_left_w}}px;padding: 0 {{navleft_pb}}px;">
  37 + <view class="navl_left flex" style="width:{{navleft_w}}px;padding: 0;">
  38 + <!-- <text class="iconfont1 icon-line-homeshouye-01" style="color: #000;font-size: 20px;"></text> -->
  39 + <view catchtap="call_back" class="flex nav_left_box">
  40 + <text class="nav_fh" ></text>
  41 + </view>
  42 + <text class="navl_left_b"></text>
  43 + <!-- <text class="iconfont icon-xingyungou" style="color:#898989;"></text> -->
  44 + <view catchtap="show_menu_fn" class="flex nav_left_box">
  45 + <view class="iconfont icon-fenlei" style="color: #000;position: relative;" >
  46 + <view class="list_menu" wx:if="{{show_menu}}">
  47 + <view class="list_menu_top"></view>
  48 + <view wx:for="{{men_list}}" class="menu_item" data-url="{{item.url}}" catchtap="nav_menu">
  49 + <image src="{{imghots + item.img}}" class="logo" lazy-load></image>
  50 + <view>{{item.name}}</view>
  51 + </view>
  52 + </view>
  53 + </view>
  54 + </view>
  55 + </view>
  56 + <view wx:if="{{!istop}}" catchtap="nav_search" class="navl_minddle ellipsis-1" style="margin: 0 {{navleft_pb}}px;display: block">
  57 + <icon type="search" size="28rpx" color="#898989" class="sear_fangda" />
  58 + <text>搜索更多商品</text>
  59 + </view>
  60 + <view wx:else ></view>
  61 + <view wx:if="{{is_share}}" class="navl_right" catchtap="fenx_fn" style="height:{{mentButt_h}}px;width:{{mentButt_h}}px;">
  62 + <text class="iconfont icon-weixin" style="color:rgb(4, 174, 15);size: 16rpx;"></text>
  63 + <!-- <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> -->
  64 + </view>
  65 + <view wx:else></view>
  66 + </view>
  67 + <view class="nav_right">1212121</view>
  68 + </view>
  69 +</view>
components/diy_top_nav/diy_top_nav.wxss 0 → 100644
  1 +/* components/diy_top_nav/diy_top_nav.wxss */
  2 +@import '../../app.wxss';
  3 +.nav_left{
  4 + box-sizing: border-box;
  5 + display: flex;
  6 + align-items: center;
  7 + justify-content: space-between;
  8 +}
  9 +.nav_left_box{
  10 + width: 48%;
  11 + align-items: center;
  12 + justify-content: center;
  13 + height: 100%;
  14 +}
  15 +.nav_right{
  16 + flex: 1;
  17 +}
  18 +.navl_left{
  19 + height: 100%;
  20 + background-color:rgba(255, 255, 255, .5);
  21 + border-radius:30rpx;
  22 + border: 1rpx solid rgba(227, 227, 227);
  23 + display: flex;
  24 + align-items: center;
  25 + justify-content: space-around;
  26 + padding: 0 4%;
  27 + box-sizing: border-box;
  28 +}
  29 +
  30 +.navl_minddle{
  31 + height: 100%;
  32 + flex: 1;
  33 + background-color: bisque;
  34 + display: flex;
  35 + align-items: center;
  36 + vertical-align: middle;
  37 + /* justify-content: center; */
  38 + border-radius: 30rpx;
  39 + background-color: rgb(242, 243, 245);
  40 + /* background-color: #898989; */
  41 + font-size: 28rpx;
  42 + color: #898989;
  43 +}
  44 +.nav_search{
  45 + display: flex;
  46 + align-items: center;
  47 + margin: 0 10rpx 0 20rpx;
  48 +}
  49 +.navl_right{
  50 + background-color: #fff;
  51 + border-radius: 100%;
  52 + display: flex;
  53 + align-items: center;
  54 + justify-content: center;
  55 + border: 1rpx solid rgba(227, 227, 227);
  56 +}
  57 +.navl_left_b{
  58 + width: 1rpx;
  59 + height: 65%;
  60 + background-color:rgb(227,227,227) ;
  61 +}
  62 +.we_chat{
  63 + width: 45rpx;
  64 + height: 45rpx;
  65 +}
  66 +.nav_fh {
  67 + width: 18rpx;
  68 + height: 18rpx;
  69 + border-top: 2rpx solid #000;
  70 + border-right: 2rpx solid #000;
  71 + transform: rotateZ(-135deg);
  72 + display: inline-block;
  73 + margin-bottom: 3rpx;
  74 +}
  75 +.list_menu{
  76 + position: absolute;
  77 + /* bottom: -10rpx; */
  78 + /* top: -13rpx; */
  79 + left: -35rpx;
  80 + /* width: 180rpx; */
  81 + /* width: auto; */
  82 + padding: 10rpx 26rpx;
  83 + /* height: 400rpx; */
  84 + margin-top: 18rpx;
  85 + background-color: #fff;
  86 + /* background-color: rebeccapurple; */
  87 + border-radius: 15rpx;
  88 + z-index: 9999999;
  89 +}
  90 +.list_menu_top{
  91 + position: absolute;
  92 + top: -10rpx;
  93 + left: 50rpx;
  94 + width: 26rpx;
  95 + height: 26rpx;
  96 + /* background-color: rebeccapurple; */
  97 + background-color: #fff;
  98 + transform: rotateZ(45deg);
  99 + display: inline-block;
  100 +}
  101 +.menu_item{
  102 + display: flex;
  103 + align-items: center;
  104 + font-size: 26rpx;
  105 + white-space: nowrap;
  106 + /* padding: 20rpx; */
  107 +}
  108 +.menu_item image{
  109 + width: 36rpx;
  110 + height: 36rpx;
  111 + margin-right: 20rpx;
  112 +}
  113 +.call_back_box{
  114 + width: 100rpx;
  115 + height: 100%;
  116 + display: flex;
  117 + align-items: center;
  118 + justify-content: center;
  119 + position: absolute;
  120 + /* background-color: blueviolet; */
  121 + left: 0;
  122 + bottom: 0;
  123 +}
  124 +.call_back_box .nav_fh{
  125 + width: 20rpx;
  126 + height: 20rpx;
  127 +}
  128 +
  129 +.tb_con{
  130 + position: absolute; bottom: 0; right: 24rpx; font-size: 18rpx;color: #333;
  131 +}
  132 +
  133 +.sear_fangda{
  134 + vertical-align: middle; margin-left:20rpx; margin-right:8rpx;position:relative; top: 10rpx;
  135 +}
0 \ No newline at end of file 136 \ No newline at end of file
components/nav_b/nav_b.js
@@ -9,7 +9,7 @@ Component({ @@ -9,7 +9,7 @@ Component({
9 nav_center: "预约", //导航中间 9 nav_center: "预约", //导航中间
10 nav_right: "我的", //导航右边 10 nav_right: "我的", //导航右边
11 nav_left_url: "/pages/index/index/index", //导航左边地址 11 nav_left_url: "/pages/index/index/index", //导航左边地址
12 - nav_center_url: "/pages/user/my_service/tment_order_list", //导航中间地址 12 + nav_center_url: "/packageG/pages/user/my_service/tment_order_list", //导航中间地址
13 nav_right_url: "/pages/user/index/index", //导航右边地址 13 nav_right_url: "/pages/user/index/index", //导航右边地址
14 }, 14 },
15 15
packageA/pages/cart2_ser/cart2_ser.js
@@ -46,9 +46,10 @@ Page({ @@ -46,9 +46,10 @@ Page({
46 46
47 /*------------------------*/ 47 /*------------------------*/
48 yuer: 0, 48 yuer: 0,
49 - is_cart: 0, //是不是购物车进来的购买 49 + is_cart: 0, //是不是购物车进来的购买
  50 + template_id:[],//订阅消息
50 }, 51 },
51 - onLoad: function(t) { 52 + onLoad: async function(t) {
52 53
53 //定义第一次进入 54 //定义第一次进入
54 this.data.fir_in=1; 55 this.data.fir_in=1;
@@ -68,19 +69,25 @@ Page({ @@ -68,19 +69,25 @@ Page({
68 69
69 var th = this; 70 var th = this;
70 71
71 - getApp().promiseGet("/api/wx/weappSendlist/page", {  
72 - data: {  
73 - store_id: os.stoid,  
74 - typeid: "1001"  
75 - }  
76 - }).then(res => {  
77 - if (res.data.code == 0 && res.data.data.pageData.length > 0) {  
78 - var template_id = res.data.data.pageData[0].template_id;  
79 - th.setData({  
80 - template_id: template_id  
81 - });  
82 - }  
83 - }) 72 + // getApp().promiseGet("/api/wx/weappSendlist/page", {
  73 + // data: {
  74 + // store_id: os.stoid,
  75 + // typeid: "1001"
  76 + // }
  77 + // }).then(res => {
  78 + // if (res.data.code == 0 && res.data.data.pageData.length > 0) {
  79 + // var template_id = res.data.data.pageData[0].template_id;
  80 + // th.setData({
  81 + // template_id: template_id
  82 + // });
  83 + // }
  84 + // })
  85 + try {
  86 + let template_id =await getApp().get_template_id('1001,1012,1027')
  87 + this.setData({
  88 + template_id
  89 + })
  90 + } catch (error) {}
84 91
85 }, 92 },
86 onUnload: function() { 93 onUnload: function() {
@@ -289,7 +296,7 @@ Page({ @@ -289,7 +296,7 @@ Page({
289 if(fy) return false; 296 if(fy) return false;
290 t_pay.set_fir(); 297 t_pay.set_fir();
291 298
292 - var back_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id; 299 + var back_url="/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id;
293 //-- 通联的第三方支付的返回优化 -- 300 //-- 通联的第三方支付的返回优化 --
294 ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ 301 ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
295 302
@@ -682,7 +689,7 @@ Page({ @@ -682,7 +689,7 @@ Page({
682 }); 689 });
683 setTimeout(function () { 690 setTimeout(function () {
684 wx.reLaunch({ 691 wx.reLaunch({
685 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, 692 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id,
686 }) 693 })
687 }, 1000) 694 }, 1000)
688 695
@@ -728,7 +735,7 @@ Page({ @@ -728,7 +735,7 @@ Page({
728 // }); 735 // });
729 // setTimeout(function () { 736 // setTimeout(function () {
730 // wx.reLaunch({ 737 // wx.reLaunch({
731 - // url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, 738 + // url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id,
732 // }) 739 // })
733 // }, 1000) 740 // }, 1000)
734 // }, 741 // },
@@ -799,7 +806,7 @@ Page({ @@ -799,7 +806,7 @@ Page({
799 }); 806 });
800 "function" == typeof success && success(); 807 "function" == typeof success && success();
801 wx.redirectTo({ 808 wx.redirectTo({
802 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, 809 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id,
803 }); 810 });
804 }, 811 },
805 fail: function(n) { 812 fail: function(n) {
@@ -816,7 +823,7 @@ Page({ @@ -816,7 +823,7 @@ Page({
816 var template_id = this.data.template_id; 823 var template_id = this.data.template_id;
817 // //授权订阅 824 // //授权订阅
818 wx.requestSubscribeMessage({ 825 wx.requestSubscribeMessage({
819 - tmplIds: [template_id], 826 + tmplIds: template_id,
820 success(res) { 827 success(res) {
821 func(); 828 func();
822 }, 829 },
packageA/pages/chongzhi/chongzhi.js
@@ -183,16 +183,45 @@ Page({ @@ -183,16 +183,45 @@ Page({
183 app.goto('../chongzhiDetails/chongzhiDetails?id=' + id+"&type=1"); 183 app.goto('../chongzhiDetails/chongzhiDetails?id=' + id+"&type=1");
184 }, 184 },
185 185
186 - viewDetails(e){ 186 + viewDetails(e){
187 var index=e.currentTarget.dataset.index; 187 var index=e.currentTarget.dataset.index;
188 - var WriteOffCode=this.data.list[index].WriteOffCode; 188 + //var WriteOffCode=this.data.list[index].WriteOffCode;
  189 + var id=this.data.list[index].ID;
  190 +
  191 + this.detail_next(id);
  192 + },
  193 +
  194 + async detail_next(id){
  195 + var code='';
  196 + //获取二维码,强制更新
  197 + let res= await getApp().request.promisePut("/api/weshop/store/updateErpApi",{
  198 + data:{
  199 + store_id:getApp().globalData.setting.stoid,
  200 + ApiName:"/api/erp/vip/buyaddmoneyactDetails/updateMainCode",
  201 + Id:id,
  202 + VIPId:getApp().globalData.userInfo.erpvipid
  203 + }
  204 + })
  205 + if(res){
  206 + if(res.data.code==-1){
  207 + util.m_toast(res.data.msg);
  208 + return false;
  209 + }
  210 + if(res.data.data)
  211 + code = res.data.data.WriteOffCode;
  212 + }
  213 + if(!code){
  214 + util.m_toast('未找到二维码');
  215 + return false;
  216 + }
  217 +
  218 +
189 var qrcode = this.selectComponent("#qrcode"); //组件的id 219 var qrcode = this.selectComponent("#qrcode"); //组件的id
190 - var code=WriteOffCode;  
191 - var e={is_fw:1,val:code,code:code}  
192 - qrcode.open(e);  
193 - 220 + var e={is_fw:1,val:code,code:code}
  221 + qrcode.open(e);
194 }, 222 },
195 - 223 +
  224 +
196 // 检测上拉滚动到底部 225 // 检测上拉滚动到底部
197 // scrollToLower: function (requestData, callback) { 226 // scrollToLower: function (requestData, callback) {
198 // // 数据总量 227 // // 数据总量
packageA/pages/chongzhi/chongzhi.wxml
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 <view class="fs28 ellipsis-2 txt-justify">{{item.ActName}}</view> 28 <view class="fs28 ellipsis-2 txt-justify">{{item.ActName}}</view>
29 <view> 29 <view>
30 <view class="price fs24">零售价:¥{{item.PosPrice}}</view> 30 <view class="price fs24">零售价:¥{{item.PosPrice}}</view>
31 - <view class="date fs24">{{(currentIndex == 0 ? '兑换截止日期': '核销时间') + ':' + item.BeginDate + '至' + (item.EndDate==''?'不限':item.EndDate)}}</view> 31 + <view class="date fs24">购买时间:{{item.BillDate}}</view>
32 </view> 32 </view>
33 </view> 33 </view>
34 </view> 34 </view>
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 <view class="bottom" wx:if="{{currentIndex == 0}}" > 36 <view class="bottom" wx:if="{{currentIndex == 0}}" >
37 <text wx:if="{{g_filter.is_acting(item.EndDate) || item.EndDate==''}}" 37 <text wx:if="{{g_filter.is_acting(item.EndDate) || item.EndDate==''}}"
38 catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text> 38 catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text>
39 - <text wx:else class="btn" style="background-color: #ccc;">已过期</text> 39 + <text wx:else class="btn" style="background-color: #ccc;">已过期</text>
40 <text data-index="{{index}}" class="btn details" >详情</text> 40 <text data-index="{{index}}" class="btn details" >详情</text>
41 </view> 41 </view>
42 <view class="bottom" wx:if="{{currentIndex == 1}}" > 42 <view class="bottom" wx:if="{{currentIndex == 1}}" >
packageA/pages/chongzhiDetails/chongzhiDetails.js
@@ -63,7 +63,8 @@ Page({ @@ -63,7 +63,8 @@ Page({
63 if(options.type==1){ 63 if(options.type==1){
64 api="/api/weshop/users/getBuyaddmoneyactDetails"; 64 api="/api/weshop/users/getBuyaddmoneyactDetails";
65 } 65 }
66 - 66 +
  67 + this.data.op_id=options.id;
67 app.request.get(api, { 68 app.request.get(api, {
68 data: { 69 data: {
69 Id:options.id, 70 Id:options.id,
@@ -71,8 +72,8 @@ Page({ @@ -71,8 +72,8 @@ Page({
71 user_id: UserInfo.user_id, 72 user_id: UserInfo.user_id,
72 }, 73 },
73 success: function (res) { 74 success: function (res) {
  75 +
74 var result=res.data.data; 76 var result=res.data.data;
75 -  
76 var now=new Date(); 77 var now=new Date();
77 var reg = RegExp("-", "g"); 78 var reg = RegExp("-", "g");
78 var endtime = result.EndDate.replace(reg, '/'); 79 var endtime = result.EndDate.replace(reg, '/');
@@ -136,11 +137,41 @@ Page({ @@ -136,11 +137,41 @@ Page({
136 137
137 }, 138 },
138 139
139 - onUse() {  
140 - var qrcode = this.selectComponent("#qrcode"); //组件的id  
141 - var code=this.data.result.WriteOffCode;  
142 - var e={is_fw:1,val:code,code:code}  
143 - qrcode.open(e); 140 + async onUse() {
  141 + //-- 如果过期就不可用 ---
  142 + if(this.data.result.IsGQ){
  143 + return false;
  144 + }
  145 +
  146 +
  147 + //var code=this.data.result.WriteOffCode;
  148 + var code='';
  149 +
  150 + //获取二维码
  151 + let res= await getApp().request.promisePut("/api/weshop/store/updateErpApi",{
  152 + data:{
  153 + store_id:os.stoid,
  154 + ApiName:"/api/erp/vip/buyaddmoneyactDetails/updateMainCode",
  155 + Id:this.data.op_id,
  156 + VIPId:getApp().globalData.userInfo.erpvipid
  157 + }
  158 + })
  159 + if(res){
  160 + if(res.data.code==-1){
  161 + util.m_toast(res.data.msg);
  162 + return false;
  163 + }
  164 + if(res.data.data)
  165 + code = res.data.data.WriteOffCode;
  166 + }
  167 + if(!code){
  168 + util.m_toast('未找到二维码');
  169 + return false;
  170 + }
  171 +
  172 + var qrcode = this.selectComponent("#qrcode"); //组件的id
  173 + var e={is_fw:1,val:code,code:code}
  174 + qrcode.open(e);
144 }, 175 },
145 176
146 177
@@ -286,5 +317,53 @@ Page({ @@ -286,5 +317,53 @@ Page({
286 if(url){ 317 if(url){
287 getApp().goto(url); 318 getApp().goto(url);
288 } 319 }
  320 + },
  321 +
  322 + //-- 显示二维码 --
  323 + getcode(e) {
  324 + var idx = e.currentTarget.dataset.index;
  325 + var item = this.data.result.givelist[idx];
  326 + this.get_code_next(item);
  327 + },
  328 +
  329 + async get_code_next(item){
  330 + var th = this;
  331 + //--获取成功的时候--
  332 + var no = '';
  333 +
  334 + var id=item.GiftsId;
  335 + var IsRetrieval=item.IsRetrieval;
  336 +
  337 + //-- 有调起的时候 --
  338 + if(IsRetrieval){
  339 + no=item.WriteOffCodeOne;
  340 + }else {
  341 + //获取二维码
  342 + let res = await getApp().request.promisePut("/api/weshop/store/updateErpApi", {
  343 + data: {
  344 + store_id: os.stoid,
  345 + ApiName: "/api/erp/vip/buyaddmoneyactDetails/updateMainCodeOne",
  346 + Id: id,
  347 + VIPId: getApp().globalData.userInfo.erpvipid
  348 + }
  349 + })
  350 + if (res) {
  351 + if (res.data.code == -1) {
  352 + util.m_toast(res.data.msg);
  353 + return false;
  354 + }
  355 + if (res.data.data)
  356 + no = res.data.data.WriteOffCode;
  357 + }
  358 + }
  359 + if(!no){
  360 + util.m_toast('未找到二维码');
  361 + return false;
  362 + }
  363 +
  364 +
  365 + var qc_com = th.selectComponent("#qrcode"); //组件的id
  366 + var e={is_fw:1,val:no,code:no}
  367 + qc_com.open(e)
289 } 368 }
290 }) 369 })
291 \ No newline at end of file 370 \ No newline at end of file
packageA/pages/chongzhiDetails/chongzhiDetails.wxml
@@ -39,13 +39,26 @@ @@ -39,13 +39,26 @@
39 <image wx:if="{{item.PAdvanceItemId>0}}" src="{{url}}/miniapp/images/giftbag/gift01.png"></image><!-- 预存 --> 39 <image wx:if="{{item.PAdvanceItemId>0}}" src="{{url}}/miniapp/images/giftbag/gift01.png"></image><!-- 预存 -->
40 </view> 40 </view>
41 <!-- 右 --> 41 <!-- 右 -->
42 - <view class="info"> 42 + <view class="info" style="position: relative;">
43 <view wx:if="{{item.GiveType=='0'}}">{{item.CouponSum}}元优惠券</view> 43 <view wx:if="{{item.GiveType=='0'}}">{{item.CouponSum}}元优惠券</view>
44 <view wx:elif="{{item.Integral>0}}">{{item.Integral}}积分</view> 44 <view wx:elif="{{item.Integral>0}}">{{item.Integral}}积分</view>
45 <view wx:elif="{{item.GradeSum>0}}">{{item.GradeSum}}成长值</view> 45 <view wx:elif="{{item.GradeSum>0}}">{{item.GradeSum}}成长值</view>
46 - <view wx:else>{{item.GiveName}}</view> 46 + <view wx:else class="max_len_name ellipsis-2">{{item.GiveName}}</view>
47 <!-- <view class="fs28 pdv10 txt-justify">节日可免费享受专业美甲,可以享受1次。</view> --> 47 <!-- <view class="fs28 pdv10 txt-justify">节日可免费享受专业美甲,可以享受1次。</view> -->
48 - <view wx:if="{{item.Qty>0}}" class="t-r fs24">数量:{{item.Qty}}</view> 48 + <view wx:if="{{item.Qty>0}}" class="fs24">数量:{{item.Qty}}</view>
  49 + <view wx:if="{{item.GiveType=='2'}}" class="date fs24">{{'兑换截止日期' + ':' + item.BeginDate + '至' + (item.EndDate==''?'不限':item.EndDate) }}</view>
  50 +
  51 + <!-- 优化显示二维码 -->
  52 + <view class="box_ware_code data-v-3a5b7e36" wx:if="{{item.GiveType=='2' && item.IsQrCode==1}}">
  53 + <!-- <block wx:if="{{c_state==0}}"> -->
  54 + <image wx:if="{{item.IsRetrieval}}" src="{{url+'/miniapp/images/hui-ewm.png'}}" lazy-load="true" bindtap="getcode"
  55 + data-index="{{index}}"
  56 + class="data-v-3a5b7e36"></image>
  57 + <image wx:else src="{{url+'/miniapp/images/user_r_code.png'}}" lazy-load="true" bindtap="getcode"
  58 + data-index="{{index}}"
  59 + class="data-v-3a5b7e36 "></image>
  60 + </view>
  61 +
49 </view> 62 </view>
50 </view> 63 </view>
51 </view> 64 </view>
@@ -57,7 +70,7 @@ @@ -57,7 +70,7 @@
57 <text wx:if="{{type==0}}" data-advance="{{result.Id}}" data-money="{{result.BeginSum}}" 70 <text wx:if="{{type==0}}" data-advance="{{result.Id}}" data-money="{{result.BeginSum}}"
58 class="btn" bindtap="go_buy">立即充值</text> 71 class="btn" bindtap="go_buy">立即充值</text>
59 <block wx:else> 72 <block wx:else>
60 - <text wx:if="{{result.AddType==0 || result.AddType=='0'}}" class="btn" bindtap="onUse">立即使用</text> 73 + <text wx:if="{{result.AddType==0 || result.AddType=='0'}}" class="btn {{result.IsGQ?'bk_huise':''}} " bindtap="onUse">立即使用</text>
61 <text wx:if="{{result.AddType==1 || result.AddType=='1'}}" class="btn" >已核销</text> 74 <text wx:if="{{result.AddType==1 || result.AddType=='1'}}" class="btn" >已核销</text>
62 </block> 75 </block>
63 </view> 76 </view>
packageA/pages/chongzhiDetails/chongzhiDetails.wxss
@@ -109,6 +109,10 @@ @@ -109,6 +109,10 @@
109 font-size: 28rpx; 109 font-size: 28rpx;
110 } 110 }
111 111
  112 +.btn.bk_huise {
  113 + background-color: gainsboro;
  114 +}
  115 +
112 .img-block { 116 .img-block {
113 display: block; 117 display: block;
114 width: 100%; 118 width: 100%;
@@ -147,4 +151,24 @@ @@ -147,4 +151,24 @@
147 151
148 .container{ 152 .container{
149 display: block;min-height: 100%;width: 100%;position: absolute;left: 0;top: 0;z-index: 1; 153 display: block;min-height: 100%;width: 100%;position: absolute;left: 0;top: 0;z-index: 1;
  154 +}
  155 +
  156 +.date {
  157 + padding-top: 10rpx;
  158 + color: #FE6867;
  159 +}
  160 +
  161 +.box_ware_code.data-v-3a5b7e36 {
  162 + position: absolute;
  163 + right: 10rpx;
  164 + top: 10rpx;
  165 +}
  166 +
  167 +.box_ware_code image.data-v-3a5b7e36 {
  168 + width: 50rpx;
  169 + height: 50rpx;
  170 +}
  171 +
  172 +.max_len_name{
  173 + max-width: 480rpx;
150 } 174 }
151 \ No newline at end of file 175 \ No newline at end of file
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -966,7 +966,7 @@ Page({ @@ -966,7 +966,7 @@ Page({
966 } 966 }
967 else{ 967 else{
968 wx.reLaunch({ 968 wx.reLaunch({
969 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, 969 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id,
970 }) 970 })
971 } 971 }
972 972
@@ -1009,7 +1009,7 @@ Page({ @@ -1009,7 +1009,7 @@ Page({
1009 console.log(n), getApp().showSuccess("支付成功!"); 1009 console.log(n), getApp().showSuccess("支付成功!");
1010 "function" == typeof success && success(); 1010 "function" == typeof success && success();
1011 wx.redirectTo({ 1011 wx.redirectTo({
1012 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, 1012 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id,
1013 }); 1013 });
1014 }, 1014 },
1015 fail: function(n) { 1015 fail: function(n) {
packageA/pages/goodsInfo/goodsInfo.js
@@ -212,9 +212,15 @@ Page({ @@ -212,9 +212,15 @@ Page({
212 212
213 hiddenCS: true, //控制客服操作菜单显示和控制 213 hiddenCS: true, //控制客服操作菜单显示和控制
214 214
215 - openSpecModal_flash_normal: 0,  
216 - keyword:'', //门店搜索  
217 - sec_i:-1,//选中分类门店 下标 215 + openSpecModal_flash_normal: 0,
  216 + keyword:'', //门店搜索
  217 + sec_i:-1,//选中分类门店 下标
  218 +
  219 + nav_frontColor: "#ffffff",
  220 + nav_backgroundColor: "#ffffff",
  221 + nav_type: 2, //导航类型
  222 + istop: 0, //是否置顶风格为1
  223 + searchbox_transparent: 1,
218 }, 224 },
219 225
220 //------初始化加载---------- 226 //------初始化加载----------
packageA/pages/goodsInfo/goodsInfo.json
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 "warn": "/components/long_warn/long_warn", 6 "warn": "/components/long_warn/long_warn",
7 "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", 7 "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list",
8 "privacy_pop": "/components/privacy_pop/privacy_pop", 8 "privacy_pop": "/components/privacy_pop/privacy_pop",
9 - "com_top_nav": "/components/com_top_nav/com_top_nav" 9 + "top_nav": "/components/diy_top_nav/diy_top_nav"
10 }, 10 },
11 "navigationStyle": "custom" 11 "navigationStyle": "custom"
12 } 12 }
13 \ No newline at end of file 13 \ No newline at end of file
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -2,16 +2,20 @@ @@ -2,16 +2,20 @@
2 <wxs module="filters" src="../../../utils/filter.wxs"></wxs> 2 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
3 <wxs module="g_filters" src="g_filter.wxs"></wxs> 3 <wxs module="g_filters" src="g_filter.wxs"></wxs>
4 <wxs module="tool" src="filter.wxs"></wxs> 4 <wxs module="tool" src="filter.wxs"></wxs>
5 -  
6 -<com_top_nav title="{{data.goods_name}}"></com_top_nav>  
7 -  
8 <!-- 判断隐私是不是显示 --> 5 <!-- 判断隐私是不是显示 -->
9 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> 6 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop>
10 - 7 +<!-- 顶开 -->
  8 +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
11 <!-- 商品内容区域,普通商品,秒杀,拼团 --> 9 <!-- 商品内容区域,普通商品,秒杀,拼团 -->
12 <block wx:if="{{isshow}}"> 10 <block wx:if="{{isshow}}">
13 <view class="container"> 11 <view class="container">
14 - <view class="type-navbar" style="top:{{top_nav}}px"> 12 +
  13 + <view class="type-navbar_box">
  14 + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="{{false}}"
  15 + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
  16 + </view>
  17 +
  18 + <view class="type-navbar" style="top:{{top_nav-4}}px">
15 <view class="type-box" wx:for="{{categories}}" wx:key="categories"> 19 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
16 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> 20 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
17 {{item.name}} 21 {{item.name}}
packageA/pages/goodsInfo/goodsInfo.wxss
@@ -2993,6 +2993,14 @@ button.custom-service::after{ @@ -2993,6 +2993,14 @@ button.custom-service::after{
2993 padding-left: 30rpx; 2993 padding-left: 30rpx;
2994 } 2994 }
2995 2995
  2996 +
2996 /*按钮变灰色的优化*/ 2997 /*按钮变灰色的优化*/
2997 .spec-cart-btn.gray{ background-color:gainsboro !important; } 2998 .spec-cart-btn.gray{ background-color:gainsboro !important; }
2998 2999
  3000 +.type-navbar_box{
  3001 + position: fixed;
  3002 + top: 0;
  3003 + z-index: 999;
  3004 + width: 100%;
  3005 +}
  3006 +
packageA/pages/my_service/appment_main.js
@@ -532,7 +532,7 @@ Page({ @@ -532,7 +532,7 @@ Page({
532 is_textea: 1 532 is_textea: 1
533 }) 533 })
534 console.log('optionsxxx===>', this.data.options); 534 console.log('optionsxxx===>', this.data.options);
535 - // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id); 535 + // console.log('1-->', "/packageG/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id);
536 wx.navigateTo({ 536 wx.navigateTo({
537 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id 537 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id
538 }); 538 });
packageA/pages/my_service/appment_main.wxml
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 </view> 84 </view>
85 85
86 <view class="submitMax flex-space-center fs32"> 86 <view class="submitMax flex-space-center fs32">
87 - <!-- <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> 87 + <!-- <navigator class="appment flex-center" url="/packageG/pages/user/my_service/tment_order_list">
88 <view>我的预约</view> 88 <view>我的预约</view>
89 </navigator> --> 89 </navigator> -->
90 <form report-submit='true' bindtap="sub_success"> 90 <form report-submit='true' bindtap="sub_success">
packageA/pages/my_service/i_service.wxml
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}"> 63 <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
64 <view>立即使用</view> 64 <view>立即使用</view>
65 </view> 65 </view>
66 - <view wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> 66 + <view wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/packageG/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
67 <view>预约</view> 67 <view>预约</view>
68 </view> 68 </view>
69 </view> --> 69 </view> -->
packageA/pages/my_service/tment_eval.js
@@ -192,7 +192,7 @@ Page({ @@ -192,7 +192,7 @@ Page({
192 var namber=th.data.number; 192 var namber=th.data.number;
193 setTimeout(function() { 193 setTimeout(function() {
194 wx.redirectTo({ 194 wx.redirectTo({
195 - url: "/pages/user/my_service/tment_eval?Number="+namber+"&evaluate="+1 195 + url: "/packageG/pages/user/my_service/tment_eval?Number="+namber+"&evaluate="+1
196 }); 196 });
197 }, 2000); 197 }, 2000);
198 } else { 198 } else {
@@ -242,7 +242,7 @@ Page({ @@ -242,7 +242,7 @@ Page({
242 evaluate_qt:function(){ 242 evaluate_qt:function(){
243 243
244 wx.redirectTo({ 244 wx.redirectTo({
245 - url: "/pages/user/my_service/tment_order_list?state="+2 245 + url: "/packageG/pages/user/my_service/tment_order_list?state="+2
246 }); 246 });
247 }, 247 },
248 //点击领取礼包 248 //点击领取礼包
packageA/pages/my_service/tment_order_list.wxml
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 </view> 23 </view>
24 24
25 <!-- 项目属性 --> 25 <!-- 项目属性 -->
26 - <navigator class="items padding flex-vertical" url="/pages/user/my_service/tment_details?number={{item.Number}}"> 26 + <navigator class="items padding flex-vertical" url="/packageG/pages/user/my_service/tment_details?number={{item.Number}}">
27 27
28 <view class="flex-center fs26"> 28 <view class="flex-center fs26">
29 <view class="itemimage"> 29 <view class="itemimage">
packageA/pages/my_service2/appment_main.js
@@ -479,7 +479,7 @@ Page({ @@ -479,7 +479,7 @@ Page({
479 }) 479 })
480 480
481 console.log('optionsxxx===>', this.data.options); 481 console.log('optionsxxx===>', this.data.options);
482 - // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id); 482 + // console.log('1-->', "/packageG/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id);
483 wx.navigateTo({ 483 wx.navigateTo({
484 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id 484 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id
485 }); 485 });
packageA/pages/my_service2/appment_main.wxml
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 </view> 88 </view>
89 89
90 <view class="btn-box fs32"> 90 <view class="btn-box fs32">
91 - <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> 91 + <navigator class="appment flex-center" url="/packageG/pages/user/my_service/tment_order_list">
92 <view>我的预约</view> 92 <view>我的预约</view>
93 </navigator> 93 </navigator>
94 <form report-submit='true' bindtap="sub_success"> 94 <form report-submit='true' bindtap="sub_success">
packageA/pages/my_service2/tment_eval.js
@@ -192,7 +192,7 @@ Page({ @@ -192,7 +192,7 @@ Page({
192 var namber=th.data.number; 192 var namber=th.data.number;
193 setTimeout(function() { 193 setTimeout(function() {
194 wx.redirectTo({ 194 wx.redirectTo({
195 - url: "/pages/user/my_service/tment_eval?Number="+namber+"&evaluate="+1 195 + url: "/packageG/pages/user/my_service/tment_eval?Number="+namber+"&evaluate="+1
196 }); 196 });
197 }, 2000); 197 }, 2000);
198 } else { 198 } else {
@@ -242,7 +242,7 @@ Page({ @@ -242,7 +242,7 @@ Page({
242 evaluate_qt:function(){ 242 evaluate_qt:function(){
243 243
244 wx.redirectTo({ 244 wx.redirectTo({
245 - url: "/pages/user/my_service/tment_order_list?state="+2 245 + url: "/packageG/pages/user/my_service/tment_order_list?state="+2
246 }); 246 });
247 }, 247 },
248 //点击领取礼包 248 //点击领取礼包
packageA/pages/my_service2/tment_order_list.wxml
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 </view> 23 </view>
24 24
25 <!-- 项目属性 --> 25 <!-- 项目属性 -->
26 - <navigator class="items padding flex-vertical" url="/pages/user/my_service/tment_details?number={{item.Number}}"> 26 + <navigator class="items padding flex-vertical" url="/packageG/pages/user/my_service/tment_details?number={{item.Number}}">
27 27
28 <view class="flex-center fs26"> 28 <view class="flex-center fs26">
29 <view class="itemimage"> 29 <view class="itemimage">
packageA/pages/serviceCard_pd/cart/cart.js
@@ -5,7 +5,7 @@ var regeneratorRuntime = require(&#39;../../../../utils/runtime.js&#39;); @@ -5,7 +5,7 @@ var regeneratorRuntime = require(&#39;../../../../utils/runtime.js&#39;);
5 var util_pay = require("../../../../utils/pay.js"); 5 var util_pay = require("../../../../utils/pay.js");
6 var t_pay = require("../../../../utils/pay2.js"); 6 var t_pay = require("../../../../utils/pay2.js");
7 7
8 -Page({ 8 +Page({
9 data: { 9 data: {
10 url: t.globalData.setting.url, 10 url: t.globalData.setting.url,
11 resourceUrl: t.globalData.setting.resourceUrl, 11 resourceUrl: t.globalData.setting.resourceUrl,
@@ -65,11 +65,11 @@ Page({ @@ -65,11 +65,11 @@ Page({
65 card_name: '', //显示的卡的名称 65 card_name: '', //显示的卡的名称
66 66
67 card_cut_price: null,//减价多少钱 67 card_cut_price: null,//减价多少钱
68 - 68 + template_id:[],
69 //dis_config:null, //因为拼团有佣金抵扣 69 //dis_config:null, //因为拼团有佣金抵扣
70 //bn_use_commission: 0, //是不是使用佣金 70 //bn_use_commission: 0, //是不是使用佣金
71 }, 71 },
72 - onLoad: function (t) { 72 + onLoad: async function (t) {
73 console.log("onLoad_pt_cart"); 73 console.log("onLoad_pt_cart");
74 //定义第一次进入 74 //定义第一次进入
75 this.data.fir_in=1; 75 this.data.fir_in=1;
@@ -94,6 +94,12 @@ Page({ @@ -94,6 +94,12 @@ Page({
94 //先获取物流,再获取用户信息,再展示页面 94 //先获取物流,再获取用户信息,再展示页面
95 //th.get_wuliu(th.get_info(th.show_page)); 95 //th.get_wuliu(th.get_info(th.show_page));
96 //getApp().is_distribut(this); 96 //getApp().is_distribut(this);
  97 + try {
  98 + let template_id =await getApp().get_template_id('1001,1012,1027')
  99 + this.setData({
  100 + template_id
  101 + })
  102 + } catch (error) {}
97 103
98 }, 104 },
99 onUnload: function () { this.setData({ isclose: 1 }) }, 105 onUnload: function () { this.setData({ isclose: 1 }) },
@@ -536,7 +542,7 @@ Page({ @@ -536,7 +542,7 @@ Page({
536 var template_id = this.data.template_id; 542 var template_id = this.data.template_id;
537 // //授权订阅 543 // //授权订阅
538 wx.requestSubscribeMessage({ 544 wx.requestSubscribeMessage({
539 - tmplIds: [template_id], 545 + tmplIds: template_id,
540 success(res) { 546 success(res) {
541 func(); 547 func();
542 }, 548 },
packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
@@ -107,7 +107,7 @@ Page({ @@ -107,7 +107,7 @@ Page({
107 util_pay.set_fir(); 107 util_pay.set_fir();
108 108
109 109
110 - var back_url="/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1"; 110 + var back_url="/packageG/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1";
111 //-- 通联的第三方支付的返回优化 -- 111 //-- 通联的第三方支付的返回优化 --
112 ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ 112 ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
113 if(!th.data.wk_pyed) return false; 113 if(!th.data.wk_pyed) return false;
@@ -737,7 +737,7 @@ Page({ @@ -737,7 +737,7 @@ Page({
737 //------支付成功页面-------- 737 //------支付成功页面--------
738 jumpPaymentPage: function (order_id, order_amount) { 738 jumpPaymentPage: function (order_id, order_amount) {
739 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({ 739 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({
740 - url: "/pages/payment/pay_success/pay_success?order_id=" + order_id + "&type=1&card=1", 740 + url: "/packageG/pages/payment/pay_success/pay_success?order_id=" + order_id + "&type=1&card=1",
741 }); 741 });
742 }, 742 },
743 743
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
@@ -4,7 +4,7 @@ var ut = require(&quot;../../../../utils/util.js&quot;), @@ -4,7 +4,7 @@ var ut = require(&quot;../../../../utils/util.js&quot;),
4 oo = getApp().globalData, 4 oo = getApp().globalData,
5 os = oo.setting; 5 os = oo.setting;
6 var s=getApp(); 6 var s=getApp();
7 -//评价加载更多 7 +//评价加载更多
8 var more = function (e) { 8 var more = function (e) {
9 return e && e.__esModule ? e : { 9 return e && e.__esModule ? e : {
10 default: e 10 default: e
@@ -197,10 +197,17 @@ Page({ @@ -197,10 +197,17 @@ Page({
197 user_order_pt_state: 0, 197 user_order_pt_state: 0,
198 198
199 is_retail_price: 0, 199 is_retail_price: 0,
  200 +
  201 + nav_frontColor: "#ffffff",
  202 + nav_backgroundColor: "#ffffff",
  203 + nav_type: 2, //导航类型
  204 + istop: 0, //是否置顶风格为1
  205 + searchbox_transparent: 1,
  206 + template_id:[],//订阅消息id
200 }, 207 },
201 208
202 //------初始化加载---------- 209 //------初始化加载----------
203 - onLoad: function (t) { 210 + onLoad: async function (t) {
204 self = this; 211 self = this;
205 this.setData({options: t,}); 212 this.setData({options: t,});
206 var ee = this, that = ee, th = ee, 213 var ee = this, that = ee, th = ee,
@@ -441,6 +448,12 @@ Page({ @@ -441,6 +448,12 @@ Page({
441 448
442 }); 449 });
443 450
  451 + try {
  452 + let template_id =await getApp().get_template_id('1023')
  453 + this.setData({
  454 + template_id
  455 + })
  456 + } catch (error) {}
444 457
445 }, 458 },
446 459
@@ -3357,6 +3370,21 @@ Page({ @@ -3357,6 +3370,21 @@ Page({
3357 }); 3370 });
3358 }, 3371 },
3359 3372
  3373 + //天天拼团订阅消息提醒
  3374 + sendsm: function (ee) {
  3375 + let th = this;
  3376 + var template_id = this.data.template_id;
  3377 + // //授权订阅
  3378 + wx.requestSubscribeMessage({
  3379 + tmplIds: template_id,
  3380 + success(res) {
  3381 + th.openSpecModel_pt(ee);
  3382 + },
  3383 + fail(res) {
  3384 + th.openSpecModel_pt(ee);
  3385 + }
  3386 + })
  3387 + },
3360 //--点击弹起拼单-- 3388 //--点击弹起拼单--
3361 openSpecModel_pt: function (e) { 3389 openSpecModel_pt: function (e) {
3362 3390
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.json
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", 7 "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list",
8 "share": "/components/share/share", 8 "share": "/components/share/share",
9 "privacy_pop": "/components/privacy_pop/privacy_pop", 9 "privacy_pop": "/components/privacy_pop/privacy_pop",
10 - "com_top_nav": "/components/com_top_nav/com_top_nav" 10 + "top_nav": "/components/diy_top_nav/diy_top_nav"
11 }, 11 },
12 "navigationStyle": "custom" 12 "navigationStyle": "custom"
13 } 13 }
14 \ No newline at end of file 14 \ No newline at end of file
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
@@ -3,15 +3,21 @@ @@ -3,15 +3,21 @@
3 <wxs module="g_filters" src="g_filter.wxs"></wxs> 3 <wxs module="g_filters" src="g_filter.wxs"></wxs>
4 <wxs module="tool" src="filter.wxs"></wxs> 4 <wxs module="tool" src="filter.wxs"></wxs>
5 5
6 -<com_top_nav title="{{data.goods_name}}"></com_top_nav>  
7 -  
8 <!-- 判断隐私是不是显示 --> 6 <!-- 判断隐私是不是显示 -->
9 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> 7 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop>
  8 +<!-- 顶开 -->
  9 +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
10 10
11 <!-- 商品内容区域,普通商品,秒杀,拼团 --> 11 <!-- 商品内容区域,普通商品,秒杀,拼团 -->
12 <block wx:if="{{isshow}}"> 12 <block wx:if="{{isshow}}">
13 <view class="container"> 13 <view class="container">
14 - <view class="type-navbar" style="top:{{top_nav}}px"> 14 +
  15 + <view class="type-navbar_box">
  16 + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1"
  17 + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
  18 + </view>
  19 +
  20 + <view class="type-navbar" style="top:{{top_nav-4}}px">
15 <view class="type-box" wx:for="{{categories}}" wx:key="categories"> 21 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
16 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> 22 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
17 {{item.name}} 23 {{item.name}}
@@ -588,12 +594,12 @@ @@ -588,12 +594,12 @@
588 </view> 594 </view>
589 <block wx:if="{{user_order_pt_state==0}}"> 595 <block wx:if="{{user_order_pt_state==0}}">
590 <!-- --商家团-- --> 596 <!-- --商家团-- -->
591 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h"> 597 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h">
592 <view class="fir-v">¥{{prom_act.price}}</view> 598 <view class="fir-v">¥{{prom_act.price}}</view>
593 <view>去参团</view> 599 <view>去参团</view>
594 </view> 600 </view>
595 <!-- --会员团-- --> 601 <!-- --会员团-- -->
596 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h"> 602 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h">
597 603
598 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}"> 604 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}">
599 <view>一键开团</view> 605 <view>一键开团</view>
@@ -610,7 +616,7 @@ @@ -610,7 +616,7 @@
610 </view> 616 </view>
611 </view> 617 </view>
612 <!-- -阶梯团-- --> 618 <!-- -阶梯团-- -->
613 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h"> 619 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h">
614 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> 620 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view>
615 <view>支付定金</view> 621 <view>支付定金</view>
616 </view> 622 </view>
packageB/pages/user/Change_phone/Change_phone.js
@@ -143,7 +143,7 @@ Page({ @@ -143,7 +143,7 @@ Page({
143 getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, { 143 getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, {
144 success: function(res) { 144 success: function(res) {
145 if (res.data.code == 0) { 145 if (res.data.code == 0) {
146 - var url = "/pages/user/userinfo/userinfo?change_phone" + change_phone 146 + var url = "/packageG/pages/user/userinfo/userinfo?change_phone" + change_phone
147 getApp().globalData.userInfo.mobile = mobile; 147 getApp().globalData.userInfo.mobile = mobile;
148 getApp().my_warnning("更换成功", 0, th); 148 getApp().my_warnning("更换成功", 0, th);
149 getApp().goto(url); 149 getApp().goto(url);
packageB/pages/user/choice_guide/choice_guide.js
@@ -107,7 +107,7 @@ Page({ @@ -107,7 +107,7 @@ Page({
107 if( this.data.is_back) 107 if( this.data.is_back)
108 wx.navigateBack({ delta: 1 }) 108 wx.navigateBack({ delta: 1 })
109 else 109 else
110 - getApp().goto("/pages/user/userinfo/userinfo"); 110 + getApp().goto("/packageG/pages/user/userinfo/userinfo");
111 }, 111 },
112 112
113 img_err:function (e) { 113 img_err:function (e) {
packageB/pages/zuhegou/index/index.wxml
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <view class="c-red pdr10 {{item.haveAdded ? 'active':''}}" catchtap="addToCart" 61 <view class="c-red pdr10 {{item.haveAdded ? 'active':''}}" catchtap="addToCart"
62 data-index="{{index}}"> 62 data-index="{{index}}">
63 <text class="iconfont icon-gouwuche fs60"></text> 63 <text class="iconfont icon-gouwuche fs60"></text>
64 - </view> 64 + </view>
65 </view> 65 </view>
66 </view> 66 </view>
67 </view> 67 </view>
packageC/pages/goods/goodsList/goodsList.wxml
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 </view> 50 </view>
51 </navigator> --> 51 </navigator> -->
52 52
53 - <!-- <navigator class="nav-item search" url="/pages/goods/search/search"> 53 + <!-- <navigator class="nav-item search" url="/packageG/pages/goods/search/search">
54 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> 54 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
55 </navigator> --> 55 </navigator> -->
56 </view> 56 </view>
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
@@ -2873,7 +2873,7 @@ Page({ @@ -2873,7 +2873,7 @@ Page({
2873 //app.my_warnning("支付成功",1,th); 2873 //app.my_warnning("支付成功",1,th);
2874 //setTimeout(function () { 2874 //setTimeout(function () {
2875 wx.redirectTo({ 2875 wx.redirectTo({
2876 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 2876 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
2877 }) 2877 })
2878 //},1000) 2878 //},1000)
2879 2879
@@ -2905,7 +2905,7 @@ Page({ @@ -2905,7 +2905,7 @@ Page({
2905 //setTimeout(function () { 2905 //setTimeout(function () {
2906 th.setData({ isclose: 0 }); 2906 th.setData({ isclose: 0 });
2907 wx.redirectTo({ 2907 wx.redirectTo({
2908 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 2908 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
2909 }) 2909 })
2910 //}, 1000) 2910 //}, 1000)
2911 } 2911 }
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -79,6 +79,7 @@ Page({ @@ -79,6 +79,7 @@ Page({
79 same_ok:1, //同城配送的控制,默认ok 79 same_ok:1, //同城配送的控制,默认ok
80 bconfig: null, 80 bconfig: null,
81 showFold:true, 81 showFold:true,
  82 + template_id:[],
82 }, 83 },
83 84
84 85
@@ -126,7 +127,7 @@ Page({ @@ -126,7 +127,7 @@ Page({
126 flag: !this.data.flag, 127 flag: !this.data.flag,
127 }) 128 })
128 }, 129 },
129 - onLoad: function (t) { 130 + onLoad: async function (t) {
130 131
131 //定义第一次进入 132 //定义第一次进入
132 this.data.fir_in=1; 133 this.data.fir_in=1;
@@ -181,6 +182,12 @@ Page({ @@ -181,6 +182,12 @@ Page({
181 182
182 //判断是不是佣金抵扣 183 //判断是不是佣金抵扣
183 getApp().is_distribut(this); 184 getApp().is_distribut(this);
  185 + try {
  186 + let template_id =await getApp().get_template_id('1001,1012,1027')
  187 + this.setData({
  188 + template_id
  189 + })
  190 + } catch (error) {}
184 }, 191 },
185 192
186 onUnload: function () { 193 onUnload: function () {
@@ -313,7 +320,8 @@ Page({ @@ -313,7 +320,8 @@ Page({
313 let obj = { 320 let obj = {
314 wareno: ite.goods_sn, 321 wareno: ite.goods_sn,
315 price: ite.goods_price, 322 price: ite.goods_price,
316 - qty: ite.goods_num 323 + qty: ite.goods_num,
  324 + sumprice:ite.sumprice
317 } 325 }
318 listform.push(obj) 326 listform.push(obj)
319 }) 327 })
@@ -1141,6 +1149,7 @@ Page({ @@ -1141,6 +1149,7 @@ Page({
1141 goods_sn: th.data.bn_goods.goods_sn, 1149 goods_sn: th.data.bn_goods.goods_sn,
1142 goods_price: th.data.param.goods_price || th.data.bn_goods.shop_price || th.data.bn_goods.goods_price, 1150 goods_price: th.data.param.goods_price || th.data.bn_goods.shop_price || th.data.bn_goods.goods_price,
1143 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num, 1151 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num,
  1152 + sumprice:parseFloat(allpice).toFixed(2) //幸运购没有优惠券
1144 }], 1153 }],
1145 sto: { 1154 sto: {
1146 keyid: th.data.bn_goods.keyid 1155 keyid: th.data.bn_goods.keyid
@@ -1260,7 +1269,22 @@ Page({ @@ -1260,7 +1269,22 @@ Page({
1260 //}); 1269 //});
1261 1270
1262 }, 1271 },
1263 - 1272 + //订阅消息提醒
  1273 + sendsm: function (t) {
  1274 + let that = this;
  1275 + let template_id = this.data.template_id;
  1276 + // //授权订阅
  1277 + wx.requestSubscribeMessage({
  1278 + tmplIds: template_id,
  1279 + success(res) {
  1280 + that.submitConfirm(t)
  1281 + },
  1282 + fail(res) {
  1283 + that.submitConfirm(t)
  1284 + }
  1285 + })
  1286 +
  1287 + },
1264 1288
1265 // 提交订单前弹出确认对话框 1289 // 提交订单前弹出确认对话框
1266 submitConfirm(e) { 1290 submitConfirm(e) {
@@ -1534,7 +1558,7 @@ Page({ @@ -1534,7 +1558,7 @@ Page({
1534 util_pay.pay(data.data, function () { 1558 util_pay.pay(data.data, function () {
1535 setTimeout(function () { 1559 setTimeout(function () {
1536 // wx.reLaunch({ 1560 // wx.reLaunch({
1537 - // //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, 1561 + // //url: "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
1538 // url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data, 1562 // url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data,
1539 // }) 1563 // })
1540 1564
@@ -1604,7 +1628,7 @@ Page({ @@ -1604,7 +1628,7 @@ Page({
1604 // url: "/pages/user/order_list/order_list", 1628 // url: "/pages/user/order_list/order_list",
1605 // })--*/ 1629 // })--*/
1606 1630
1607 - // // var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data; 1631 + // // var url="/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data;
1608 // // wx.reLaunch({ 1632 // // wx.reLaunch({
1609 // // url: url 1633 // // url: url
1610 // // }) 1634 // // })
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 -<form bindsubmit="submitConfirm"> 2 +<form bindsubmit="sendsm">
3 <view class="container"> 3 <view class="container">
4 4
5 <block wx:if="{{is_show_sub}}"> 5 <block wx:if="{{is_show_sub}}">
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -286,12 +286,19 @@ Page({ @@ -286,12 +286,19 @@ Page({
286 canBuy: false, 286 canBuy: false,
287 btnHidden: false, 287 btnHidden: false,
288 288
289 - hiddenCS: true, 289 + hiddenCS: true,
290 is_get_guide:0, 290 is_get_guide:0,
291 keyword:'', //门店搜索 291 keyword:'', //门店搜索
292 sec_i:-1,//选中分类门店 下标 292 sec_i:-1,//选中分类门店 下标
293 goodInfo_ad:"",//商品详情广告 293 goodInfo_ad:"",//商品详情广告
294 - adding:0 //避免重复点击 294 + adding:0, //避免重复点击
  295 +
  296 + nav_frontColor: "#ffffff",
  297 + nav_backgroundColor: "#ffffff",
  298 + nav_type: 2, //导航类型
  299 + istop: 0, //是否置顶风格为1
  300 + searchbox_transparent: 1
  301 +
295 }, 302 },
296 303
297 //------初始化加载---------- 304 //------初始化加载----------
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "goods_recommend": "/components/goods_list/goods_list", 7 "goods_recommend": "/components/goods_list/goods_list",
8 "share": "/components/share/share", 8 "share": "/components/share/share",
9 "privacy_pop": "/components/privacy_pop/privacy_pop", 9 "privacy_pop": "/components/privacy_pop/privacy_pop",
10 - "com_top_nav": "/components/com_top_nav/com_top_nav" 10 + "top_nav": "/components/diy_top_nav/diy_top_nav"
11 }, 11 },
12 "navigationStyle": "custom" 12 "navigationStyle": "custom"
13 } 13 }
14 \ No newline at end of file 14 \ No newline at end of file
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -2,19 +2,25 @@ @@ -2,19 +2,25 @@
2 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 2 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
3 <wxs module="g_filters" src="g_filter.wxs"></wxs> 3 <wxs module="g_filters" src="g_filter.wxs"></wxs>
4 <wxs module="tool" src="filter.wxs"></wxs> 4 <wxs module="tool" src="filter.wxs"></wxs>
5 -  
6 -<com_top_nav title="{{gtitle}}"></com_top_nav>  
7 - 5 +<!--<com_top_nav title="{{gtitle}}"></com_top_nav>-->
8 <!-- 判断隐私是不是显示 --> 6 <!-- 判断隐私是不是显示 -->
9 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> 7 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop>
10 8
  9 +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
  10 +
11 <!-- 商品内容区域,普通商品,秒杀,拼团 --> 11 <!-- 商品内容区域,普通商品,秒杀,拼团 -->
12 <block wx:if="{{isshow}}"> 12 <block wx:if="{{isshow}}">
13 <view class="container"> 13 <view class="container">
14 <!-- 幸运购规则 --> 14 <!-- 幸运购规则 -->
15 <view class="rules" bindtap="showRules">规则</view> 15 <view class="rules" bindtap="showRules">规则</view>
16 - <!-- tab选项卡 -->  
17 - <view class="type-navbar" style="top:{{top_nav}}px"> 16 +
  17 + <view class="type-navbar_box">
  18 + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1"
  19 + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
  20 + </view>
  21 +
  22 + <!-- tab选项卡 -->
  23 + <view class="type-navbar" style="top:{{top_nav-4}}px">
18 <view class="type-box" wx:for="{{categories}}" wx:key="categories"> 24 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
19 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> 25 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view>
20 </view> 26 </view>
@@ -22,7 +28,6 @@ @@ -22,7 +28,6 @@
22 <!-- 商品详情 --> 28 <!-- 商品详情 -->
23 <view class="goods-detail"> 29 <view class="goods-detail">
24 30
25 -  
26 <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> 31 <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}">
27 <!-- 幸运购中奖记录 --> 32 <!-- 幸运购中奖记录 -->
28 <view class="swiper-container"> 33 <view class="swiper-container">
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
@@ -3154,3 +3154,11 @@ button.custom-service::after{ @@ -3154,3 +3154,11 @@ button.custom-service::after{
3154 3154
3155 /*按钮变灰色的优化*/ 3155 /*按钮变灰色的优化*/
3156 .spec-cart-btn.gray{ background-color:gainsboro !important; } 3156 .spec-cart-btn.gray{ background-color:gainsboro !important; }
  3157 +
  3158 +.type-navbar_box{
  3159 + position: fixed;
  3160 + top: 0;
  3161 + z-index: 999;
  3162 + width: 100%;
  3163 +}
  3164 +
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml
@@ -191,12 +191,12 @@ @@ -191,12 +191,12 @@
191 191
192 <!---has_rt部分退----> 192 <!---has_rt部分退---->
193 <!-- <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1 && order.has_rt!=1}}"> 193 <!-- <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1 && order.has_rt!=1}}">
194 - <navigator class="tips-btn" wx:if="{{(order.order_status==0&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator>  
195 - <navigator class="tips-btn" wx:if="{{(order.order_status==1&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> 194 + <navigator class="tips-btn" wx:if="{{(order.order_status==0&&order.pay_status==1) && !order.is_bedistri}}" url="/packageG/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator>
  195 + <navigator class="tips-btn" wx:if="{{(order.order_status==1&&order.pay_status==1) && !order.is_bedistri}}" url="/packageG/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator>
196 </block> 196 </block>
197 <block wx:else> 197 <block wx:else>
198 <view class="tips-btn" wx:if="{{order.is_all_return_status==2 && order.isdel==0}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view> 198 <view class="tips-btn" wx:if="{{order.is_all_return_status==2 && order.isdel==0}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view>
199 - <navigator class="tips-btn" wx:if="{{order.is_all_return_status==3 && order.order_status<2}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">重新退款</navigator> 199 + <navigator class="tips-btn" wx:if="{{order.is_all_return_status==3 && order.order_status<2}}" url="/packageG/pages/order/refund_order/refund_order?order_id={{order.order_id}}">重新退款</navigator>
200 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}" 200 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}"
201 url="/packageF/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator> 201 url="/packageF/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator>
202 202
packageC/pages/payForAnother/payForAnother.js
@@ -2549,7 +2549,7 @@ Page({ @@ -2549,7 +2549,7 @@ Page({
2549 //app.my_warnning("支付成功",1,th); 2549 //app.my_warnning("支付成功",1,th);
2550 //setTimeout(function () { 2550 //setTimeout(function () {
2551 wx.redirectTo({ 2551 wx.redirectTo({
2552 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 2552 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
2553 }) 2553 })
2554 //},1000) 2554 //},1000)
2555 2555
@@ -2581,7 +2581,7 @@ Page({ @@ -2581,7 +2581,7 @@ Page({
2581 //setTimeout(function () { 2581 //setTimeout(function () {
2582 th.setData({isclose: 0}); 2582 th.setData({isclose: 0});
2583 wx.redirectTo({ 2583 wx.redirectTo({
2584 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 2584 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
2585 }) 2585 })
2586 //}, 1000) 2586 //}, 1000)
2587 } 2587 }
packageC/pages/presell/cardInfo/goodsInfo.js
@@ -216,7 +216,15 @@ Page({ @@ -216,7 +216,15 @@ Page({
216 keyword:'', //门店搜索 216 keyword:'', //门店搜索
217 sec_i:-1,//选中分类门店 下标 217 sec_i:-1,//选中分类门店 下标
218 218
219 - c_curr_p:1 219 + c_curr_p:1,
  220 +
  221 + //-- 顶部导航的优化 --
  222 + nav_frontColor: "#ffffff",
  223 + nav_backgroundColor: "#ffffff",
  224 + nav_type: 2, //导航类型
  225 + istop: 0, //是否置顶风格为1
  226 + searchbox_transparent: 1
  227 +
220 }, 228 },
221 229
222 //------初始化加载---------- 230 //------初始化加载----------
packageC/pages/presell/cardInfo/goodsInfo.json
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "goods_recommend": "/components/goods_list/goods_list", 7 "goods_recommend": "/components/goods_list/goods_list",
8 "share": "/components/share/share", 8 "share": "/components/share/share",
9 "privacy_pop": "/components/privacy_pop/privacy_pop", 9 "privacy_pop": "/components/privacy_pop/privacy_pop",
10 - "com_top_nav": "/components/com_top_nav/com_top_nav" 10 + "top_nav": "/components/diy_top_nav/diy_top_nav"
11 }, 11 },
12 "navigationStyle": "custom" 12 "navigationStyle": "custom"
13 } 13 }
14 \ No newline at end of file 14 \ No newline at end of file
packageC/pages/presell/cardInfo/goodsInfo.wxml
@@ -2,16 +2,21 @@ @@ -2,16 +2,21 @@
2 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 2 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
3 <wxs module="g_filters" src="g_filter.wxs"></wxs> 3 <wxs module="g_filters" src="g_filter.wxs"></wxs>
4 <wxs module="tool" src="filter.wxs"></wxs> 4 <wxs module="tool" src="filter.wxs"></wxs>
5 -  
6 -<com_top_nav title="{{data.goods_name}}"></com_top_nav>  
7 - 5 +<!-- <com_top_nav title="{{data.goods_name}}"></com_top_nav> -->
8 <!-- 判断隐私是不是显示 --> 6 <!-- 判断隐私是不是显示 -->
9 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> 7 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop>
  8 +<!-- 顶开 -->
  9 +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
10 10
11 <block wx:if="{{show}}"> 11 <block wx:if="{{show}}">
12 <!-- 商品内容区域,普通商品,秒杀,拼团 --> 12 <!-- 商品内容区域,普通商品,秒杀,拼团 -->
13 <view class="container"> 13 <view class="container">
14 - <view class="type-navbar" style="top:{{top_nav}}px"> 14 + <!-- 自定义顶部的优化 -->
  15 + <view class="type-navbar_box">
  16 + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1"
  17 + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
  18 + </view>
  19 + <view class="type-navbar" style="top:{{top_nav-4}}px">
15 <view class="type-box" wx:for="{{categories}}" wx:key="categories"> 20 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
16 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> 21 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
17 {{item.name}} 22 {{item.name}}
packageC/pages/presell/cardInfo/goodsInfo.wxss
@@ -3063,4 +3063,11 @@ button.custom-service::after{ @@ -3063,4 +3063,11 @@ button.custom-service::after{
3063 3063
3064 .c-red { 3064 .c-red {
3065 color: #f23030; 3065 color: #f23030;
3066 -}  
3067 \ No newline at end of file 3066 \ No newline at end of file
  3067 +}
  3068 +
  3069 +.type-navbar_box{
  3070 + position: fixed;
  3071 + top: 0;
  3072 + z-index: 999;
  3073 + width: 100%;
  3074 +}
packageC/pages/presell/cart/cart.wxml
@@ -416,12 +416,12 @@ @@ -416,12 +416,12 @@
416 416
417 <!-- 服务卡项的不能申请退款 --> 417 <!-- 服务卡项的不能申请退款 -->
418 <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1 && !is_fwk}}"> 418 <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1 && !is_fwk}}">
419 - <navigator class="tips-btn2" wx:if="{{(order.order_status==0&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator>  
420 - <navigator class="tips-btn2" wx:if="{{(order.order_status==1&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> 419 + <navigator class="tips-btn2" wx:if="{{(order.order_status==0&&order.pay_status==1) && !order.is_bedistri}}" url="/packageG/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator>
  420 + <navigator class="tips-btn2" wx:if="{{(order.order_status==1&&order.pay_status==1) && !order.is_bedistri}}" url="/packageG/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator>
421 </block> 421 </block>
422 <block wx:else> 422 <block wx:else>
423 <view class="tips-btn2" wx:if="{{order.is_all_return_status==2 && order.isdel==0}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view> 423 <view class="tips-btn2" wx:if="{{order.is_all_return_status==2 && order.isdel==0}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view>
424 - <navigator class="tips-btn2" wx:if="{{order.is_all_return_status==3 && order.order_status<2}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">重新退款</navigator> 424 + <navigator class="tips-btn2" wx:if="{{order.is_all_return_status==3 && order.order_status<2}}" url="/packageG/pages/order/refund_order/refund_order?order_id={{order.order_id}}">重新退款</navigator>
425 <navigator class="tips-btn2" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}" 425 <navigator class="tips-btn2" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}"
426 url="/packageF/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator> 426 url="/packageF/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator>
427 </block> 427 </block>
packageC/pages/presell/cart/cart2.js
@@ -223,11 +223,11 @@ Page({ @@ -223,11 +223,11 @@ Page({
223 t_pay.set_fir(); 223 t_pay.set_fir();
224 224
225 let err_url="/pages/user/order_list/order_list"; 225 let err_url="/pages/user/order_list/order_list";
226 - let ok_url="/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn; 226 + let ok_url="/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn;
227 227
228 if(th.data.is_fwk){ 228 if(th.data.is_fwk){
229 err_url='/pages/user/order_list/order_list?index=2&tabindex=1'; 229 err_url='/pages/user/order_list/order_list?index=2&tabindex=1';
230 - ok_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + this.data.order_id; 230 + ok_url="/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + this.data.order_id;
231 } 231 }
232 232
233 //-- 通联的第三方支付的返回优化 -- 233 //-- 通联的第三方支付的返回优化 --
@@ -1375,7 +1375,7 @@ Page({ @@ -1375,7 +1375,7 @@ Page({
1375 }); 1375 });
1376 setTimeout(function () { 1376 setTimeout(function () {
1377 wx.reLaunch({ 1377 wx.reLaunch({
1378 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, 1378 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id,
1379 }) 1379 })
1380 }, 1000) 1380 }, 1000)
1381 1381
@@ -1963,7 +1963,7 @@ Page({ @@ -1963,7 +1963,7 @@ Page({
1963 //app.my_warnning("支付成功",1,th); 1963 //app.my_warnning("支付成功",1,th);
1964 //setTimeout(function () { 1964 //setTimeout(function () {
1965 wx.redirectTo({ 1965 wx.redirectTo({
1966 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 1966 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
1967 }) 1967 })
1968 //},1000) 1968 //},1000)
1969 1969
@@ -1995,7 +1995,7 @@ Page({ @@ -1995,7 +1995,7 @@ Page({
1995 //setTimeout(function () { 1995 //setTimeout(function () {
1996 th.setData({ isclose: 0 }); 1996 th.setData({ isclose: 0 });
1997 wx.redirectTo({ 1997 wx.redirectTo({
1998 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 1998 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
1999 }) 1999 })
2000 //}, 1000) 2000 //}, 1000)
2001 } 2001 }
packageC/pages/presell/cart/cart2_pre.js
@@ -60,6 +60,7 @@ Page({ @@ -60,6 +60,7 @@ Page({
60 showFold:true, 60 showFold:true,
61 61
62 is_fwk:0, //判断服务卡项的类型 62 is_fwk:0, //判断服务卡项的类型
  63 + template_id:[],
63 }, 64 },
64 onReady() { 65 onReady() {
65 setTimeout(() => { 66 setTimeout(() => {
@@ -80,7 +81,7 @@ Page({ @@ -80,7 +81,7 @@ Page({
80 flag: !this.data.flag, 81 flag: !this.data.flag,
81 }) 82 })
82 }, 83 },
83 - onLoad: function (t) { 84 + onLoad: async function (t) {
84 //定义第一次进入 85 //定义第一次进入
85 this.data.fir_in=1; 86 this.data.fir_in=1;
86 87
@@ -97,11 +98,16 @@ Page({ @@ -97,11 +98,16 @@ Page({
97 }, 1); 98 }, 1);
98 99
99 var gg = getApp().get_b_now(); 100 var gg = getApp().get_b_now();
100 - debugger; 101 +
101 if(gg.fwk){ 102 if(gg.fwk){
102 this.setData({is_fwk: 1}); 103 this.setData({is_fwk: 1});
103 } 104 }
104 - 105 + try {
  106 + let template_id =await getApp().get_template_id('1001,1012,1027')
  107 + this.setData({
  108 + template_id
  109 + })
  110 + } catch (error) {}
105 }, 111 },
106 onUnload: function () { this.setData({ isclose: 1 }) }, 112 onUnload: function () { this.setData({ isclose: 1 }) },
107 113
@@ -542,7 +548,8 @@ Page({ @@ -542,7 +548,8 @@ Page({
542 let obj = { 548 let obj = {
543 wareno: ite.goods_sn, 549 wareno: ite.goods_sn,
544 price: ite.goods_price, 550 price: ite.goods_price,
545 - qty: ite.goods_num 551 + qty: ite.goods_num,
  552 + sumprice: ite.sumprice
546 } 553 }
547 listform.push(obj) 554 listform.push(obj)
548 }) 555 })
@@ -771,6 +778,7 @@ Page({ @@ -771,6 +778,7 @@ Page({
771 goods_sn: th.data.bn_goods.goods_sn, 778 goods_sn: th.data.bn_goods.goods_sn,
772 goods_price: th.data.bn_goods.shop_price || th.data.bn_goods.goods_price, 779 goods_price: th.data.bn_goods.shop_price || th.data.bn_goods.goods_price,
773 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num, 780 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num,
  781 + sumprice:parseFloat(allpice).toFixed(2)
774 }], 782 }],
775 sto: { 783 sto: {
776 keyid: th.data.bn_goods.keyid 784 keyid: th.data.bn_goods.keyid
@@ -1248,7 +1256,22 @@ Page({ @@ -1248,7 +1256,22 @@ Page({
1248 complete: function () { } 1256 complete: function () { }
1249 }) 1257 })
1250 }, 1258 },
  1259 + //订阅消息提醒
  1260 + sendsm: function (t) {
  1261 + let that = this;
  1262 + let template_id = this.data.template_id;
  1263 + // //授权订阅
  1264 + wx.requestSubscribeMessage({
  1265 + tmplIds: template_id,
  1266 + success(res) {
  1267 + that.submitForm(t)
  1268 + },
  1269 + fail(res) {
  1270 + that.submitForm(t)
  1271 + }
  1272 + })
1251 1273
  1274 + },
1252 //--------------------提交订单----------------------- 1275 //--------------------提交订单-----------------------
1253 submitForm: function (t) { 1276 submitForm: function (t) {
1254 var th = this; 1277 var th = this;
packageC/pages/presell/cart/cart2_pre.wxml
1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 -<form bindsubmit="submitForm">  
3 - <view class="container"> 2 +<form bindsubmit="sendsm">
  3 + <view class="container">
4 <view class="tab-container" wx:if="{{act.presell_type==1}}"> 4 <view class="tab-container" wx:if="{{act.presell_type==1}}">
5 <view class="tab-wrapper"> 5 <view class="tab-wrapper">
6 <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" 6 <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}"
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view> 10 data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
11 11
12 </view> 12 </view>
13 - </view> 13 + </view>
14 14
15 <block wx:if="{{act.presell_type==1}}"> 15 <block wx:if="{{act.presell_type==1}}">
16 <!--要进行判断地址是否显示----> 16 <!--要进行判断地址是否显示---->
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -263,7 +263,14 @@ Page({ @@ -263,7 +263,14 @@ Page({
263 sec_i:-1,//选中分类门店 下标 263 sec_i:-1,//选中分类门店 下标
264 goodInfo_ad:'',//商品详情广告 264 goodInfo_ad:'',//商品详情广告
265 265
266 - c_curr_p:1 266 + c_curr_p:1,
  267 +
  268 + nav_frontColor: "#ffffff",
  269 + nav_backgroundColor: "#ffffff",
  270 + nav_type: 2, //导航类型
  271 + istop: 0, //是否置顶风格为1
  272 + searchbox_transparent: 1
  273 +
267 }, 274 },
268 275
269 //------初始化加载---------- 276 //------初始化加载----------
packageC/pages/presell/goodsInfo/goodsInfo.json
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "goods_recommend": "/components/goods_list/goods_list", 7 "goods_recommend": "/components/goods_list/goods_list",
8 "share": "/components/share/share", 8 "share": "/components/share/share",
9 "privacy_pop": "/components/privacy_pop/privacy_pop", 9 "privacy_pop": "/components/privacy_pop/privacy_pop",
10 - "com_top_nav": "/components/com_top_nav/com_top_nav" 10 + "top_nav": "/components/diy_top_nav/diy_top_nav"
11 }, 11 },
12 "navigationStyle": "custom" 12 "navigationStyle": "custom"
13 } 13 }
14 \ No newline at end of file 14 \ No newline at end of file
packageC/pages/presell/goodsInfo/goodsInfo.wxml
1 -<com_top_nav title="{{gtitle}}"></com_top_nav> 1 +<!-- <com_top_nav title="{{gtitle}}"></com_top_nav> -->
2 <import src="../../../../utils/wxParse/wxParse.wxml"></import> 2 <import src="../../../../utils/wxParse/wxParse.wxml"></import>
3 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 3 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
4 <wxs module="g_filters" src="g_filter.wxs"></wxs> 4 <wxs module="g_filters" src="g_filter.wxs"></wxs>
@@ -6,11 +6,20 @@ @@ -6,11 +6,20 @@
6 6
7 <!-- 判断隐私是不是显示 --> 7 <!-- 判断隐私是不是显示 -->
8 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> 8 <privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop>
  9 +<!-- 顶开 -->
  10 +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
  11 +
9 12
10 <block wx:if="{{show}}"> 13 <block wx:if="{{show}}">
11 <!-- 商品内容区域,普通商品,秒杀,拼团 --> 14 <!-- 商品内容区域,普通商品,秒杀,拼团 -->
12 <view class="container"> 15 <view class="container">
13 - <view class="type-navbar" style="top:{{top_nav}}px"> 16 + <!-- 自定义顶部的优化 -->
  17 + <view class="type-navbar_box">
  18 + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1"
  19 + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav>
  20 + </view>
  21 +
  22 + <view class="type-navbar" style="top:{{top_nav-4}}px">
14 <view class="type-box" wx:for="{{categories}}" wx:key="categories"> 23 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
15 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> 24 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">
16 {{item.name}} 25 {{item.name}}
packageC/pages/presell/goodsInfo/goodsInfo.wxss
@@ -3019,3 +3019,10 @@ button.custom-service::after{ @@ -3019,3 +3019,10 @@ button.custom-service::after{
3019 .c-red22{ 3019 .c-red22{
3020 color: #d60021 3020 color: #d60021
3021 } 3021 }
  3022 +
  3023 +.type-navbar_box{
  3024 + position: fixed;
  3025 + top: 0;
  3026 + z-index: 999;
  3027 + width: 100%;
  3028 +}
packageD/pages/user/deposit/prepaid/msg/msg.js
@@ -57,7 +57,7 @@ Page({ @@ -57,7 +57,7 @@ Page({
57 my_confirm.open_cancel(0); 57 my_confirm.open_cancel(0);
58 }, 58 },
59 function () { 59 function () {
60 - let url = '/pages/user/userinfo/userinfo?isstcsp=1'; 60 + let url = '/packageG/pages/user/userinfo/userinfo?isstcsp=1';
61 wx.redirectTo({url: url,}) //跳到非tabbar页 61 wx.redirectTo({url: url,}) //跳到非tabbar页
62 } 62 }
63 ); 63 );
packageE/pages/cart/cart2/cart2.js
@@ -169,7 +169,8 @@ Page({ @@ -169,7 +169,8 @@ Page({
169 bconfig: null, 169 bconfig: null,
170 showFold:true, 170 showFold:true,
171 171
172 - ly_map:{} 172 + ly_map:{},
  173 + template_id:[]
173 }, 174 },
174 175
175 176
@@ -194,7 +195,7 @@ Page({ @@ -194,7 +195,7 @@ Page({
194 }) 195 })
195 }, 196 },
196 197
197 - onLoad: function (t) { 198 + onLoad:async function (t) {
198 199
199 this.data.fir_in=1; 200 this.data.fir_in=1;
200 201
@@ -219,18 +220,23 @@ Page({ @@ -219,18 +220,23 @@ Page({
219 if (t.state) { 220 if (t.state) {
220 th.data.state = 1; 221 th.data.state = 1;
221 } 222 }
222 - getApp().promiseGet("/api/wx/weappSendlist/page", {  
223 - data: {  
224 - store_id: os.stoid,  
225 - typeid: "1001"  
226 - }  
227 - }).then(res => {  
228 - if (res.data.code == 0 && res.data.data.pageData.length > 0) {  
229 - var template_id = res.data.data.pageData[0].template_id;  
230 - th.setData({ template_id: template_id });  
231 - }  
232 - })  
233 - 223 + // getApp().promiseGet("/api/wx/weappSendlist/page", {
  224 + // data: {
  225 + // store_id: os.stoid,
  226 + // typeid: "1001"
  227 + // }
  228 + // }).then(res => {
  229 + // if (res.data.code == 0 && res.data.data.pageData.length > 0) {
  230 + // var template_id = res.data.data.pageData[0].template_id;
  231 + // th.setData({ template_id: template_id });
  232 + // }
  233 + // })
  234 + try {
  235 + let template_id =await getApp().get_template_id('1001,1012,1027')
  236 + this.setData({
  237 + template_id
  238 + })
  239 + } catch (error) {}
234 //判断是不是佣金抵扣 240 //判断是不是佣金抵扣
235 getApp().is_distribut(this); 241 getApp().is_distribut(this);
236 242
@@ -285,7 +291,7 @@ Page({ @@ -285,7 +291,7 @@ Page({
285 util_pay.set_fir(); 291 util_pay.set_fir();
286 292
287 //-- 通联的第三方支付的返回优化 -- 293 //-- 通联的第三方支付的返回优化 --
288 - ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, 294 + ut.is_pay_ok(th.data.ok_order_sn,"/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,
289 "/pages/user/order_list/order_list",function (){ 295 "/pages/user/order_list/order_list",function (){
290 //支付信息会先记录着 296 //支付信息会先记录着
291 if(!th.data.ok_order_sn) return false; 297 if(!th.data.ok_order_sn) return false;
@@ -297,7 +303,7 @@ Page({ @@ -297,7 +303,7 @@ Page({
297 //支付支付,返回首页 303 //支付支付,返回首页
298 ut.m_toast('支付成功'); 304 ut.m_toast('支付成功');
299 setTimeout(()=>{ 305 setTimeout(()=>{
300 - getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); 306 + getApp().re_to("/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn);
301 },1000) 307 },1000)
302 308
303 }else{ 309 }else{
@@ -510,14 +516,77 @@ Page({ @@ -510,14 +516,77 @@ Page({
510 let goods = item.goods 516 let goods = item.goods
511 let keyid = item.sto.keyid 517 let keyid = item.sto.keyid
512 let listform = [] 518 let listform = []
513 - goods.map(ite => {  
514 - let obj = {  
515 - wareno: ite.goods_sn,  
516 - price: ite.goods_price,  
517 - qty: ite.goods_num 519 +
  520 + //-- 如果有订单优惠的时候,就要进行第二次平摊,要用实收来判断满 --
  521 + if (cartList.order_prom_amount > 0) {
  522 + let new_arr = [];
  523 + //--- 预存要以商品的实收为准, ---
  524 + goods.map(ite => {
  525 + //-- 不是赠品的时候 --
  526 + if(!ite.is_gift){
  527 + let obj = {
  528 + goods_sn:ite.goods_sn,
  529 + goods_id: ite.goods_id,
  530 + prom_type: ite.prom_type,
  531 + prom_id: ite.id,
  532 + goods_price: ite.goods_price, //account是平摊后的实收价格
  533 + goods_num: ite.goods_num,
  534 + sumgoods_price: ite.account_fir * ite.goods_num - ite.account_yu_fir-(ite.quan_num?ite.quan_num:0) //-- 优惠后的实收 --
  535 + }
  536 + new_arr.push(obj);
  537 + }
  538 +
  539 + })
  540 +
  541 + //-- 如果系统要平摊到单品 --
  542 + var pt_data = {
  543 + 'prom_id': 1,
  544 + 'dis': cartList.order_prom_amount,
  545 + 'goods': new_arr
518 } 546 }
519 - listform.push(obj)  
520 - }) 547 + var pt_res = null;
  548 + await getApp().request.promisePost("/api/weshop/order/getGoodsSplit", {
  549 + is_json: 1,
  550 + data: pt_data
  551 + }).then(res => {
  552 + if (res.data.code == 0) {
  553 + pt_res = res.data.data;
  554 + }
  555 + })
  556 + if (pt_res) {
  557 + for (let io = 0; io <new_arr.length ; io++) {
  558 + new_arr[io].account_yc = this.arr_get_goods_n(new_arr[io], pt_res).fisrt_account;
  559 + new_arr[io].account_yc_yu = this.arr_get_goods_n(new_arr[io], pt_res).fisrt_account_yu;
  560 + }
  561 + }
  562 +
  563 + new_arr.map(ite => {
  564 + let obj = {
  565 + wareno: ite.goods_sn,
  566 + price: ite.account_yc, //account是平摊后的实收价格
  567 + qty: ite.goods_num,
  568 + sumprice: parseFloat(ite.account_yc * ite.goods_num - ite.account_yc_yu).toFixed(2)
  569 + }
  570 + listform.push(obj)
  571 + })
  572 + }
  573 + else{
  574 + goods.map(ite => {
  575 + //-- 不是赠品的时候 --
  576 + if(!ite.is_gift) {
  577 + let obj = {
  578 + wareno: ite.goods_sn,
  579 + price: ite.first_account, //account是平摊后的实收价格
  580 + qty: ite.goods_num,
  581 + sumprice: parseFloat(ite.account_fir * ite.goods_num - ite.account_yu_fir-(ite.quan_num?ite.quan_num:0)).toFixed(2)
  582 + }
  583 + listform.push(obj)
  584 + }
  585 + })
  586 +
  587 + }
  588 +
  589 +
521 let arr = await this.getGoodsAdvancesum(keyid, listform, cartList) 590 let arr = await this.getGoodsAdvancesum(keyid, listform, cartList)
522 // } 591 // }
523 wx.hideLoading() 592 wx.hideLoading()
@@ -4334,26 +4403,32 @@ Page({ @@ -4334,26 +4403,32 @@ Page({
4334 requestSubscribe() { 4403 requestSubscribe() {
4335 const th = this; 4404 const th = this;
4336 const template_id = this.data.template_id; 4405 const template_id = this.data.template_id;
4337 - wx.getSetting({  
4338 - withSubscriptions: true,  
4339 - success(res) {  
4340 - let itemSettings = res.subscriptionsSetting.itemSettings;  
4341 - if (itemSettings && itemSettings[template_id] == "accept") {  
4342 - //要检查一下赠品有可以足够  
4343 - th.sub_check_gift(function () {  
4344 - th.submit_func();  
4345 - })  
4346 -  
4347 - } else {  
4348 - th.sendsm(function () {  
4349 - //要检查一下赠品有可以足够  
4350 - th.sub_check_gift(function () {  
4351 - th.submit_func();  
4352 - })  
4353 - })  
4354 - }  
4355 - } 4406 + th.sendsm(function () {
  4407 + //要检查一下赠品有可以足够
  4408 + th.sub_check_gift(function () {
  4409 + th.submit_func();
  4410 + })
4356 }) 4411 })
  4412 + // wx.getSetting({
  4413 + // withSubscriptions: true,
  4414 + // success(res) {
  4415 + // let itemSettings = res.subscriptionsSetting.itemSettings;
  4416 + // if (itemSettings && itemSettings[template_id] == "accept") {
  4417 + // //要检查一下赠品有可以足够
  4418 + // th.sub_check_gift(function () {
  4419 + // th.submit_func();
  4420 + // })
  4421 +
  4422 + // } else {
  4423 + // th.sendsm(function () {
  4424 + // //要检查一下赠品有可以足够
  4425 + // th.sub_check_gift(function () {
  4426 + // th.submit_func();
  4427 + // })
  4428 + // })
  4429 + // }
  4430 + // }
  4431 + // })
4357 this.setData({ 4432 this.setData({
4358 submit: 1, 4433 submit: 1,
4359 }) 4434 })
@@ -5418,15 +5493,15 @@ Page({ @@ -5418,15 +5493,15 @@ Page({
5418 // } 5493 // }
5419 // wx.hideLoading() 5494 // wx.hideLoading()
5420 // wx.redirectTo({ 5495 // wx.redirectTo({
5421 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 5496 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5422 // }) 5497 // })
5423 // } else { 5498 // } else {
5424 // wx.redirectTo({ 5499 // wx.redirectTo({
5425 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 5500 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5426 // }) 5501 // })
5427 // } 5502 // }
5428 wx.redirectTo({ 5503 wx.redirectTo({
5429 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 5504 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5430 }) 5505 })
5431 //},1000) 5506 //},1000)
5432 5507
@@ -5461,17 +5536,17 @@ Page({ @@ -5461,17 +5536,17 @@ Page({
5461 // wx.hideLoading() 5536 // wx.hideLoading()
5462 // th.setData({ isclose: 0 }); 5537 // th.setData({ isclose: 0 });
5463 // wx.redirectTo({ 5538 // wx.redirectTo({
5464 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 5539 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5465 // }) 5540 // })
5466 // } else { 5541 // } else {
5467 // th.setData({ isclose: 0 }); 5542 // th.setData({ isclose: 0 });
5468 // wx.redirectTo({ 5543 // wx.redirectTo({
5469 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 5544 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5470 // }) 5545 // })
5471 // } 5546 // }
5472 th.setData({ isclose: 0 }); 5547 th.setData({ isclose: 0 });
5473 wx.redirectTo({ 5548 wx.redirectTo({
5474 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 5549 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5475 }) 5550 })
5476 //}, 1000) 5551 //}, 1000)
5477 } 5552 }
@@ -7045,6 +7120,15 @@ Page({ @@ -7045,6 +7120,15 @@ Page({
7045 } 7120 }
7046 }, 7121 },
7047 7122
  7123 +
  7124 + //从优惠的映射中拿出商品从表的item
  7125 + arr_get_goods_n: function (good, arr) {
  7126 + for (var i in arr) {
  7127 + if (arr[i].goods_id == good.goods_id && arr[i].prom_id == good.prom_id && arr[i].prom_type == good.prom_type ) return arr[i];
  7128 + }
  7129 + },
  7130 +
  7131 +
7048 //检查是不是有其他门店的订单在选择了券 7132 //检查是不是有其他门店的订单在选择了券
7049 check_other_use: function (iter, pkid) { 7133 check_other_use: function (iter, pkid) {
7050 var using = this.data.using_quan; 7134 var using = this.data.using_quan;
@@ -7250,7 +7334,7 @@ Page({ @@ -7250,7 +7334,7 @@ Page({
7250 var template_id = this.data.template_id; 7334 var template_id = this.data.template_id;
7251 // //授权订阅 7335 // //授权订阅
7252 wx.requestSubscribeMessage({ 7336 wx.requestSubscribeMessage({
7253 - tmplIds: [template_id], 7337 + tmplIds: template_id,
7254 success(res) { 7338 success(res) {
7255 func(); 7339 func();
7256 }, 7340 },
packageE/pages/cart/cart2_inte/cart2_inte.js
@@ -85,6 +85,7 @@ Page({ @@ -85,6 +85,7 @@ Page({
85 same_ok:1, //同城配送的控制,默认ok 85 same_ok:1, //同城配送的控制,默认ok
86 bconfig: null, 86 bconfig: null,
87 showFold:true, 87 showFold:true,
  88 + template_id:[]
88 }, 89 },
89 90
90 91
@@ -109,7 +110,7 @@ Page({ @@ -109,7 +110,7 @@ Page({
109 flag: !this.data.flag, 110 flag: !this.data.flag,
110 }) 111 })
111 }, 112 },
112 - onLoad: function (t) { 113 + onLoad: async function (t) {
113 114
114 this.data.fir_in=1; 115 this.data.fir_in=1;
115 wx.setNavigationBarTitle({ title: "填写订单", }) 116 wx.setNavigationBarTitle({ title: "填写订单", })
@@ -193,7 +194,12 @@ Page({ @@ -193,7 +194,12 @@ Page({
193 //判断是不是佣金抵扣 194 //判断是不是佣金抵扣
194 getApp().is_distribut(this); 195 getApp().is_distribut(this);
195 196
196 - 197 + try {
  198 + let template_id =await getApp().get_template_id('1001,1012,1027')
  199 + this.setData({
  200 + template_id
  201 + })
  202 + } catch (error) {}
197 }, 203 },
198 onUnload: function () { this.setData({ isclose: 1 }) }, 204 onUnload: function () { this.setData({ isclose: 1 }) },
199 onHide: function () { 205 onHide: function () {
@@ -225,7 +231,7 @@ Page({ @@ -225,7 +231,7 @@ Page({
225 util_pay.set_fir(); 231 util_pay.set_fir();
226 232
227 //-- 通联的第三方支付的返回优化 -- 233 //-- 通联的第三方支付的返回优化 --
228 - ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn, 234 + ut.is_pay_ok(th.data.ok_order_sn,"/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn,
229 "/pages/user/order_list/order_list",function (){ 235 "/pages/user/order_list/order_list",function (){
230 if(!th.data.ok_order_sn) return false; 236 if(!th.data.ok_order_sn) return false;
231 getApp().request.promiseGet("/api/weshop/order/page", 237 getApp().request.promiseGet("/api/weshop/order/page",
@@ -236,7 +242,7 @@ Page({ @@ -236,7 +242,7 @@ Page({
236 //支付支付,返回首页 242 //支付支付,返回首页
237 ut.m_toast('支付成功'); 243 ut.m_toast('支付成功');
238 setTimeout(()=>{ 244 setTimeout(()=>{
239 - getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); 245 + getApp().re_to("/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn);
240 },1000) 246 },1000)
241 247
242 }else{ 248 }else{
@@ -351,7 +357,8 @@ Page({ @@ -351,7 +357,8 @@ Page({
351 let obj = { 357 let obj = {
352 wareno: ite.goods_sn, 358 wareno: ite.goods_sn,
353 price: ite.goods_price, 359 price: ite.goods_price,
354 - qty: ite.goods_num 360 + qty: ite.goods_num,
  361 + sumprice:ite.sumprice
355 } 362 }
356 listform.push(obj) 363 listform.push(obj)
357 }) 364 })
@@ -964,6 +971,79 @@ Page({ @@ -964,6 +971,79 @@ Page({
964 } 971 }
965 }) 972 })
966 } 973 }
  974 +
  975 +
  976 +
  977 + //判断是否同城配送,而且没有调用过
  978 + if(th.data.bn_exp_type==2 && th.data.user_addr) {
  979 +
  980 + var lon=0;var lat=0;
  981 + //-- 获取距离 --
  982 + await getApp().request.promisePost("/api/weshop/order/sameCityExp/getGeocoder", {
  983 + is_json: 1, data: {address:th.data.user_addr.more_address+th.data.user_addr.address,store_id:os.stoid}
  984 + }).then(res=>{
  985 + if(res.data.code==0){
  986 + var data= JSON.parse(res.data.data);
  987 + if(data.status==0){
  988 + lon=data.result.location.lng;
  989 + lat=data.result.location.lat;
  990 + }
  991 + }
  992 + })
  993 +
  994 +
  995 + var gd_w = good['weight'] * good['buynum'];
  996 + //-- 获取距离 --
  997 + var req_data = {
  998 + store_id: os.stoid,
  999 + order_amount: order_m,
  1000 + lon: lon, lat: lat,
  1001 + pickup_id: bn_pick,
  1002 + goods_weight: gd_w
  1003 + }
  1004 +
  1005 + var is_next=1;
  1006 + //获取同城配送参数
  1007 + await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", {
  1008 + is_json: 1,
  1009 + data: req_data
  1010 + }).then(res => {
  1011 + if (res.data.code == 0) {
  1012 + var wl_txt = "formData.shipping_price";
  1013 + th.setData({ [wl_txt]: res.data.data, })
  1014 + }else{
  1015 + is_next=0;
  1016 + wx.showToast({
  1017 + title: res.data.msg, icon: 'none', duration: 2000
  1018 + })
  1019 + }
  1020 + })
  1021 + if(!is_next){
  1022 + th.setData({is_show_sub:1, submit: 0,same_ok:0,show_submit:1})
  1023 + return false
  1024 + }
  1025 +
  1026 + th.data.lon=lon;
  1027 + th.data.lat=lat;
  1028 + th.data.bn_gd_w=gd_w;
  1029 + th.data.bn_samecity_order_amount=req_data.order_amount;
  1030 +
  1031 + }
  1032 +
  1033 +
  1034 +
  1035 + var yc_order_m=order_m;
  1036 +
  1037 + //--看一下有没有订单优惠--0
  1038 + total_m = parseFloat(total_m) + parseFloat(th.data.formData.shipping_price);
  1039 + order_m = parseFloat(order_m) + parseFloat(th.data.formData.shipping_price);
  1040 + var atxt = "formData.total_amount";
  1041 + th.setData({ [atxt]: total_m, })
  1042 +
  1043 + var txt = "formData.user_money";
  1044 + var txt2 = "formData.order_amount";
  1045 + var txt4 = "formData.integral";
  1046 +
967 if (th.data.bn_goods.keyid) { 1047 if (th.data.bn_goods.keyid) {
968 let cart_yc = await th.beforAdvancesum({ 1048 let cart_yc = await th.beforAdvancesum({
969 order_amount: order_m, 1049 order_amount: order_m,
@@ -971,6 +1051,7 @@ Page({ @@ -971,6 +1051,7 @@ Page({
971 goods_sn: th.data.bn_goods.goods_sn, 1051 goods_sn: th.data.bn_goods.goods_sn,
972 goods_price: th.data.bn_goods.shop_price || th.data.bn_goods.goods_price, 1052 goods_price: th.data.bn_goods.shop_price || th.data.bn_goods.goods_price,
973 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num, 1053 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num,
  1054 + sumprice:parseFloat(yc_order_m).toFixed(2)
974 }], 1055 }],
975 sto: { 1056 sto: {
976 keyid: th.data.bn_goods.keyid 1057 keyid: th.data.bn_goods.keyid
@@ -1038,73 +1119,7 @@ Page({ @@ -1038,73 +1119,7 @@ Page({
1038 }) 1119 })
1039 } 1120 }
1040 1121
1041 - //判断是否同城配送,而且没有调用过  
1042 - if(th.data.bn_exp_type==2 && th.data.user_addr) {  
1043 -  
1044 - var lon=0;var lat=0;  
1045 - //-- 获取距离 --  
1046 - await getApp().request.promisePost("/api/weshop/order/sameCityExp/getGeocoder", {  
1047 - is_json: 1, data: {address:th.data.user_addr.more_address+th.data.user_addr.address,store_id:os.stoid}  
1048 - }).then(res=>{  
1049 - if(res.data.code==0){  
1050 - var data= JSON.parse(res.data.data);  
1051 - if(data.status==0){  
1052 - lon=data.result.location.lng;  
1053 - lat=data.result.location.lat;  
1054 - }  
1055 - }  
1056 - })  
1057 -  
1058 -  
1059 - var gd_w = good['weight'] * good['buynum'];  
1060 - //-- 获取距离 --  
1061 - var req_data = {  
1062 - store_id: os.stoid,  
1063 - order_amount: order_m,  
1064 - lon: lon, lat: lat,  
1065 - pickup_id: bn_pick,  
1066 - goods_weight: gd_w  
1067 - }  
1068 -  
1069 - var is_next=1;  
1070 - //获取同城配送参数  
1071 - await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", {  
1072 - is_json: 1,  
1073 - data: req_data  
1074 - }).then(res => {  
1075 - if (res.data.code == 0) {  
1076 - var wl_txt = "formData.shipping_price";  
1077 - th.setData({ [wl_txt]: res.data.data, })  
1078 - }else{  
1079 - is_next=0;  
1080 - wx.showToast({  
1081 - title: res.data.msg, icon: 'none', duration: 2000  
1082 - })  
1083 - }  
1084 - })  
1085 - if(!is_next){  
1086 - th.setData({is_show_sub:1, submit: 0,same_ok:0,show_submit:1})  
1087 - return false  
1088 - }  
1089 -  
1090 - th.data.lon=lon;  
1091 - th.data.lat=lat;  
1092 - th.data.bn_gd_w=gd_w;  
1093 - th.data.bn_samecity_order_amount=req_data.order_amount;  
1094 -  
1095 - }  
1096 -  
1097 -  
1098 -  
1099 - //--看一下有没有订单优惠--0  
1100 - total_m = parseFloat(total_m) + parseFloat(th.data.formData.shipping_price);  
1101 - order_m = parseFloat(order_m) + parseFloat(th.data.formData.shipping_price);  
1102 - var atxt = "formData.total_amount";  
1103 - th.setData({ [atxt]: total_m, })  
1104 1122
1105 - var txt = "formData.user_money";  
1106 - var txt2 = "formData.order_amount";  
1107 - var txt4 = "formData.integral";  
1108 1123
1109 1124
1110 //-- 最后的金额小于佣金 -- 1125 //-- 最后的金额小于佣金 --
@@ -1150,7 +1165,22 @@ Page({ @@ -1150,7 +1165,22 @@ Page({
1150 //}); 1165 //});
1151 1166
1152 }, 1167 },
  1168 + //订阅消息提醒
  1169 + sendsm: function (t) {
  1170 + let that = this;
  1171 + let template_id = this.data.template_id;
  1172 + // //授权订阅
  1173 + wx.requestSubscribeMessage({
  1174 + tmplIds: template_id,
  1175 + success(res) {
  1176 + that.submitForm(t)
  1177 + },
  1178 + fail(res) {
  1179 + that.submitForm(t)
  1180 + }
  1181 + })
1153 1182
  1183 + },
1154 //--------------------提交订单----------------------- 1184 //--------------------提交订单-----------------------
1155 async submitForm(t) { 1185 async submitForm(t) {
1156 var sub_value = t; 1186 var sub_value = t;
@@ -1382,7 +1412,7 @@ Page({ @@ -1382,7 +1412,7 @@ Page({
1382 //app.my_warnning("支付成功",1,th); 1412 //app.my_warnning("支付成功",1,th);
1383 //setTimeout(function () { 1413 //setTimeout(function () {
1384 wx.redirectTo({ 1414 wx.redirectTo({
1385 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 1415 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
1386 }) 1416 })
1387 //},1000) 1417 //},1000)
1388 1418
@@ -1408,7 +1438,7 @@ Page({ @@ -1408,7 +1438,7 @@ Page({
1408 //setTimeout(function () { 1438 //setTimeout(function () {
1409 th.setData({ isclose: 0 }); 1439 th.setData({ isclose: 0 });
1410 wx.redirectTo({ 1440 wx.redirectTo({
1411 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 1441 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
1412 }) 1442 })
1413 //}, 1000) 1443 //}, 1000)
1414 } 1444 }
packageE/pages/cart/cart2_inte/cart2_inte.wxml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <wxs src="filter.wxs" module="util"></wxs> 2 <wxs src="filter.wxs" module="util"></wxs>
3 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 3 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
4 4
5 -<form bindsubmit="submitForm"> 5 +<form bindsubmit="sendsm">
6 <view class="container"> 6 <view class="container">
7 7
8 <view class="tab-container" wx:if="{{show_submit}}"> 8 <view class="tab-container" wx:if="{{show_submit}}">
packageE/pages/cart/cart2_pt/cart2_pt.js
@@ -6,7 +6,7 @@ var util_pay = require(&quot;../../../../utils/pay.js&quot;); @@ -6,7 +6,7 @@ var util_pay = require(&quot;../../../../utils/pay.js&quot;);
6 6
7 Page({ 7 Page({
8 8
9 - data: { 9 + data: {
10 url: t.globalData.setting.url, 10 url: t.globalData.setting.url,
11 resourceUrl: t.globalData.setting.resourceUrl, 11 resourceUrl: t.globalData.setting.resourceUrl,
12 imgUrl: t.globalData.setting.imghost, 12 imgUrl: t.globalData.setting.imghost,
@@ -76,6 +76,7 @@ Page({ @@ -76,6 +76,7 @@ Page({
76 same_ok:1, //同城配送的控制,默认ok 76 same_ok:1, //同城配送的控制,默认ok
77 bconfig:null, 77 bconfig:null,
78 showFold:true, 78 showFold:true,
  79 + template_id:[],
79 }, 80 },
80 81
81 82
@@ -100,7 +101,7 @@ Page({ @@ -100,7 +101,7 @@ Page({
100 flag: !this.data.flag, 101 flag: !this.data.flag,
101 }) 102 })
102 }, 103 },
103 - onLoad: function (t) { 104 + onLoad: async function (t) {
104 this.data.fir_in=1; 105 this.data.fir_in=1;
105 wx.setNavigationBarTitle({ title: "填写订单", }) 106 wx.setNavigationBarTitle({ title: "填写订单", })
106 var th = this; 107 var th = this;
@@ -132,6 +133,12 @@ Page({ @@ -132,6 +133,12 @@ Page({
132 //th.get_wuliu(th.get_info(th.show_page)); 133 //th.get_wuliu(th.get_info(th.show_page));
133 //判断是不是佣金抵扣 134 //判断是不是佣金抵扣
134 getApp().is_distribut(this); 135 getApp().is_distribut(this);
  136 + try {
  137 + let template_id =await getApp().get_template_id('1001,1012,1027')
  138 + this.setData({
  139 + template_id
  140 + })
  141 + } catch (error) {}
135 }, 142 },
136 onUnload: function () { 143 onUnload: function () {
137 this.setData({ isclose: 1 }) 144 this.setData({ isclose: 1 })
@@ -253,7 +260,8 @@ Page({ @@ -253,7 +260,8 @@ Page({
253 let obj = { 260 let obj = {
254 wareno: ite.goods_sn, 261 wareno: ite.goods_sn,
255 price: ite.goods_price, 262 price: ite.goods_price,
256 - qty: ite.goods_num 263 + qty: ite.goods_num,
  264 + sumprice:ite.sumprice
257 } 265 }
258 listform.push(obj) 266 listform.push(obj)
259 }) 267 })
@@ -1035,6 +1043,7 @@ Page({ @@ -1035,6 +1043,7 @@ Page({
1035 goods_sn: th.data.bn_goods.goods_sn, 1043 goods_sn: th.data.bn_goods.goods_sn,
1036 goods_price: th.data.bn_goods.shop_price || th.data.bn_goods.goods_price, 1044 goods_price: th.data.bn_goods.shop_price || th.data.bn_goods.goods_price,
1037 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num, 1045 goods_num: th.data.bn_goods.buynum || th.data.bn_goods.goods_num,
  1046 + sumprice:parseFloat(allpice).toFixed(2)
1038 }], 1047 }],
1039 sto: { 1048 sto: {
1040 keyid: th.data.bn_goods.keyid 1049 keyid: th.data.bn_goods.keyid
@@ -1154,6 +1163,22 @@ Page({ @@ -1154,6 +1163,22 @@ Page({
1154 //}); 1163 //});
1155 1164
1156 }, 1165 },
  1166 + //订阅消息提醒
  1167 + sendsm: function (t) {
  1168 + let that = this;
  1169 + let template_id = this.data.template_id;
  1170 + // //授权订阅
  1171 + wx.requestSubscribeMessage({
  1172 + tmplIds: template_id,
  1173 + success(res) {
  1174 + that.submitForm(t)
  1175 + },
  1176 + fail(res) {
  1177 + that.submitForm(t)
  1178 + }
  1179 + })
  1180 +
  1181 + },
1157 //--------------------提交订单----------------------- 1182 //--------------------提交订单-----------------------
1158 submitForm: async function (t) { 1183 submitForm: async function (t) {
1159 if (this.data.is_summit_ing == 1) return false; //--提交中退出-- 1184 if (this.data.is_summit_ing == 1) return false; //--提交中退出--
@@ -1388,7 +1413,7 @@ Page({ @@ -1388,7 +1413,7 @@ Page({
1388 util_pay.pay(data.data, function () { 1413 util_pay.pay(data.data, function () {
1389 setTimeout(function () { 1414 setTimeout(function () {
1390 wx.reLaunch({ 1415 wx.reLaunch({
1391 - //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, 1416 + //url: "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
1392 url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data, 1417 url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data,
1393 }) 1418 })
1394 }, 1000) 1419 }, 1000)
@@ -1428,7 +1453,7 @@ Page({ @@ -1428,7 +1453,7 @@ Page({
1428 wx.navigateTo({ 1453 wx.navigateTo({
1429 url: "/pages/user/order_list/order_list", 1454 url: "/pages/user/order_list/order_list",
1430 })--*/ 1455 })--*/
1431 - var url = "/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data; 1456 + var url = "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data;
1432 wx.reLaunch({ 1457 wx.reLaunch({
1433 url: url 1458 url: url
1434 }) 1459 })
packageE/pages/cart/cart2_pt/cart2_pt.wxml
1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 -<form bindsubmit="submitForm"> 2 +<form bindsubmit="sendsm">
3 <view class="container"> 3 <view class="container">
4 4
5 <block wx:if="{{show_btn}}"> 5 <block wx:if="{{show_btn}}">
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 9
10 <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view> 10 <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view>
11 11
12 - <!-- 同城配送 --> 12 + <!-- 同城配送 -->
13 <block wx:if="{{show_same_city}}"> 13 <block wx:if="{{show_same_city}}">
14 <view bindtap='setexptype' data-t='2' class="tab {{bn_exp_type== 2 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">同城配送</view> 14 <view bindtap='setexptype' data-t='2' class="tab {{bn_exp_type== 2 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">同城配送</view>
15 </block> 15 </block>
packageE/pages/cart/cart_wk/cart_wk.js
@@ -111,7 +111,7 @@ Page({ @@ -111,7 +111,7 @@ Page({
111 util_pay.set_fir(); 111 util_pay.set_fir();
112 112
113 //-- 通联的第三方支付的返回优化 -- 113 //-- 通联的第三方支付的返回优化 --
114 - ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=1&order_sn=" + this.data.ok_order_sn,'back',function (){ 114 + ut.is_pay_ok(th.data.ok_order_sn,"/packageG/pages/payment/pay_success/pay_success?type=1&order_sn=" + this.data.ok_order_sn,'back',function (){
115 if(!th.data.ok_order_sn) return false; 115 if(!th.data.ok_order_sn) return false;
116 getApp().request.promiseGet("/api/weshop/order/page", 116 getApp().request.promiseGet("/api/weshop/order/page",
117 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ 117 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
@@ -123,7 +123,7 @@ Page({ @@ -123,7 +123,7 @@ Page({
123 //支付支付,返回首页 123 //支付支付,返回首页
124 ut.m_toast('支付成功'); 124 ut.m_toast('支付成功');
125 setTimeout(()=>{ 125 setTimeout(()=>{
126 - getApp().re_to("/pages/payment/pay_success/pay_success?type=1&order_sn=" + th.data.ok_order_sn); 126 + getApp().re_to("/packageG/pages/payment/pay_success/pay_success?type=1&order_sn=" + th.data.ok_order_sn);
127 },1000) 127 },1000)
128 128
129 }else{ 129 }else{
@@ -1240,7 +1240,7 @@ Page({ @@ -1240,7 +1240,7 @@ Page({
1240 //------支付成功页面-------- 1240 //------支付成功页面--------
1241 jumpPaymentPage: function (order_sn, order_amount) { 1241 jumpPaymentPage: function (order_sn, order_amount) {
1242 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({ 1242 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({
1243 - url: "/pages/payment/pay_success/pay_success?order_sn=" + order_sn + "&type=1", 1243 + url: "/packageG/pages/payment/pay_success/pay_success?order_sn=" + order_sn + "&type=1",
1244 }); 1244 });
1245 }, 1245 },
1246 1246
packageE/pages/togoin/togoin.js
@@ -96,6 +96,50 @@ Page({ @@ -96,6 +96,50 @@ Page({
96 this.save_the_data(r, e, sessionKey, openid) 96 this.save_the_data(r, e, sessionKey, openid)
97 }, 97 },
98 98
  99 + //订阅消息提醒
  100 + newsendsm: function (ee) {
  101 + if (!this.data.isAgree) {
  102 + wx.showToast({
  103 + title: '请您先阅读和勾选指定的内容',
  104 + icon: 'none',
  105 + });
  106 + return false;
  107 + }
  108 + let th = this;
  109 + var template_id = this.data.template_id;
  110 + // //授权订阅
  111 + wx.requestSubscribeMessage({
  112 + tmplIds: [template_id],
  113 + success(res) {
  114 + th.bindGetUserInfo(ee);
  115 + },
  116 + fail(res) {
  117 + th.bindGetUserInfo(ee);
  118 + }
  119 + })
  120 + },
  121 + //订阅消息提醒
  122 + oldsendsm: function (ee) {
  123 + if (!this.data.isAgree) {
  124 + wx.showToast({
  125 + title: '请您先阅读和勾选指定的内容',
  126 + icon: 'none',
  127 + });
  128 + return false;
  129 + }
  130 + let th = this;
  131 + var template_id = this.data.template_id;
  132 + // //授权订阅
  133 + wx.requestSubscribeMessage({
  134 + tmplIds: [template_id],
  135 + success(res) {
  136 + th.bindUserInfo(ee);
  137 + },
  138 + fail(res) {
  139 + th.bindUserInfo(ee);
  140 + }
  141 + })
  142 + },
99 143
100 //-- 会员授权 -- 144 //-- 会员授权 --
101 bindGetUserInfo: function (ee) { 145 bindGetUserInfo: function (ee) {
@@ -485,16 +529,51 @@ Page({ @@ -485,16 +529,51 @@ Page({
485 529
486 // 是否同意协议 530 // 是否同意协议
487 isAgree(e) { 531 isAgree(e) {
488 - let isAgree = null;  
489 - if (e.detail.value[0]) {  
490 - isAgree = true;  
491 - } else {  
492 - isAgree = false;  
493 - };  
494 - // this.data.isAgree = isAgree;  
495 - this.setData({  
496 - isAgree,  
497 - }); 532 + let template_id = this.data.template_id;
  533 + let that = this
  534 + let userinfo=getApp().globalData.userInfo;
  535 +
  536 + if (userinfo) {
  537 + let isAgree = null;
  538 + if (e.detail.value[0]) {
  539 + isAgree = true;
  540 + } else {
  541 + isAgree = false;
  542 + };
  543 + // this.data.isAgree = isAgree;
  544 + this.setData({
  545 + isAgree,
  546 + });
  547 + }else{
  548 + // //授权订阅
  549 + wx.requestSubscribeMessage({
  550 + tmplIds: [template_id],
  551 + success(res) {
  552 + let isAgree = null;
  553 + if (e.detail.value[0]) {
  554 + isAgree = true;
  555 + } else {
  556 + isAgree = false;
  557 + };
  558 + // this.data.isAgree = isAgree;
  559 + that.setData({
  560 + isAgree,
  561 + });
  562 + },
  563 + fail(res) {
  564 + let isAgree = null;
  565 + if (e.detail.value[0]) {
  566 + isAgree = true;
  567 + } else {
  568 + isAgree = false;
  569 + };
  570 + // this.data.isAgree = isAgree;
  571 + that.setData({
  572 + isAgree,
  573 + });
  574 + }
  575 + })
  576 + }
498 }, 577 },
499 578
500 //弹出框的同意的优化 579 //弹出框的同意的优化
packageE/pages/user/labels/labels.js
@@ -120,7 +120,7 @@ Page({ @@ -120,7 +120,7 @@ Page({
120 } 120 }
121 121
122 if(options.is_reg){ 122 if(options.is_reg){
123 - this.data.is_reg=1; 123 + this.setData({is_reg:1})
124 } 124 }
125 125
126 th.query_nolabels(); 126 th.query_nolabels();
@@ -312,12 +312,12 @@ Page({ @@ -312,12 +312,12 @@ Page({
312 }, 312 },
313 failStatus: function (t) { 313 failStatus: function (t) {
314 wx.hideLoading(); 314 wx.hideLoading();
315 - th.setData({loading: 0}); 315 + th.setData({loading: 0,is_check:0});
316 return app.my_warnning("授权登入失败,请稍后再试!", 0, that); 316 return app.my_warnning("授权登入失败,请稍后再试!", 0, that);
317 }, 317 },
318 fail: function (t) { 318 fail: function (t) {
319 wx.hideLoading(); 319 wx.hideLoading();
320 - th.setData({loading: 0}); 320 + th.setData({loading: 0,is_check:0});
321 return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; 321 return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1;
322 } 322 }
323 }); 323 });
@@ -333,7 +333,7 @@ Page({ @@ -333,7 +333,7 @@ Page({
333 }) 333 })
334 334
335 var url = "/api/weshop/marketing/holiday/vip/interest/label/update"; //更新标签接口地址 335 var url = "/api/weshop/marketing/holiday/vip/interest/label/update"; //更新标签接口地址
336 - var nav_url = "/pages/user/userinfo/userinfo"; //领取成功之后跳转页面 336 + var nav_url = "/packageG/pages/user/userinfo/userinfo"; //领取成功之后跳转页面
337 337
338 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 338 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
339 remark = "兴趣标签赠送"; 339 remark = "兴趣标签赠送";
@@ -416,5 +416,54 @@ Page({ @@ -416,5 +416,54 @@ Page({
416 */ 416 */
417 onShow: function() { 417 onShow: function() {
418 418
  419 + },
  420 +
  421 + //会员点击了跳过,就要注册
  422 + goto_user(e){
  423 + var th=this;
  424 + if(this.data.is_check) return false;
  425 + wx.showLoading({
  426 + title: "处理中.",
  427 + mask: true
  428 + })
  429 +
  430 + this.setData({ is_check: 1 })
  431 +
  432 + app.request.get("/api/weshop/users/thirdLogin", {
  433 + data: getApp().globalData.zc_dd,
  434 + success: function (e) {
  435 + wx.hideLoading();
  436 + if (e.data.code == 0) {
  437 + app.globalData.user_id = e.data.data.user_id;
  438 + } else {
  439 + return app.showWarning("授权登入失败!" + e.data.msg);
  440 + }
  441 + getApp().globalData.login_back = 1;
  442 + wx.setStorageSync("userinfo", e.data.data);
  443 + wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = s.getFullUrl(app.globalData.userInfo.head_pic);
  444 +
  445 + //-- 注册的跳转 --
  446 + getApp().go_to_page(th.data.is_reg,function (){
  447 + // wx.navigateBack({ delta: 1 })
  448 + wx.reLaunch({
  449 + url: '/pages/user/index/index',
  450 + })
  451 + })
  452 +
  453 + },
  454 + failStatus: function (t) {
  455 + wx.hideLoading();
  456 + th.setData({loading: 0,is_check:0});
  457 + return app.my_warnning("授权登入失败,请稍后再试!", 0, that);
  458 + },
  459 + fail: function (t) {
  460 + wx.hideLoading();
  461 + th.setData({loading: 0,is_check:0});
  462 + return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1;
  463 + }
  464 + });
  465 +
  466 +
419 } 467 }
  468 +
420 }) 469 })
421 \ No newline at end of file 470 \ No newline at end of file
packageE/pages/user/labels/labels.wxml
@@ -4,9 +4,19 @@ @@ -4,9 +4,19 @@
4 <!-- 兴趣标签标题 --> 4 <!-- 兴趣标签标题 -->
5 <view class="flex-vertical-between labels_head"> 5 <view class="flex-vertical-between labels_head">
6 <view class="fs36">兴趣标签</view> 6 <view class="fs36">兴趣标签</view>
7 - <view class="skip flex-center fs28" data-url="/pages/user/userinfo/userinfo" bindtap="goto"> 7 +
  8 +
  9 + <!-- 如果是注册的时候 -->
  10 + <block wx:if="{{is_reg }}">
  11 + <view wx:if="{{!label_required}}" class="skip flex-center fs28" data-url="/packageG/pages/user/userinfo/userinfo" bindtap="goto_user">
  12 + <view>跳过</view>
  13 + </view>
  14 + </block>
  15 + <block wx:else>
  16 + <view class="skip flex-center fs28" data-url="/packageG/pages/user/userinfo/userinfo" bindtap="goto">
8 <view>关闭</view> 17 <view>关闭</view>
9 </view> 18 </view>
  19 + </block>
10 20
11 </view> 21 </view>
12 22
@@ -34,7 +44,7 @@ @@ -34,7 +44,7 @@
34 44
35 <!-- 领取选择标签的奖励按钮 --> 45 <!-- 领取选择标签的奖励按钮 -->
36 <block wx:if="{{is_modify==0}}"> 46 <block wx:if="{{is_modify==0}}">
37 - <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/pages/user/userinfo/userinfo"> 47 + <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/packageG/pages/user/userinfo/userinfo">
38 <block> 48 <block>
39 <view>保存</view> 49 <view>保存</view>
40 </block> 50 </block>
@@ -58,7 +68,7 @@ @@ -58,7 +68,7 @@
58 </view> 68 </view>
59 </block> 69 </block>
60 <block wx:if="{{is_modify==1}}"> 70 <block wx:if="{{is_modify==1}}">
61 - <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/pages/user/userinfo/userinfo"> 71 + <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/packageG/pages/user/userinfo/userinfo">
62 <view>提交修改</view> 72 <view>提交修改</view>
63 </view> 73 </view>
64 </block> 74 </block>
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.json
@@ -5,6 +5,8 @@ @@ -5,6 +5,8 @@
5 "my_confirm": "/components/my_confirm/my_confirm", 5 "my_confirm": "/components/my_confirm/my_confirm",
6 "qr_code": "/components/qr_code/qr_code", 6 "qr_code": "/components/qr_code/qr_code",
7 "nav_b": "/components/nav_b/nav_b", 7 "nav_b": "/components/nav_b/nav_b",
8 - "share": "/components/share/share"  
9 - } 8 + "share": "/components/share/share",
  9 + "com_top_nav": "/components/com_top_nav/com_top_nav"
  10 + },
  11 + "navigationStyle": "custom"
10 } 12 }
11 \ No newline at end of file 13 \ No newline at end of file
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
  1 +<com_top_nav title="礼包详情"></com_top_nav>
1 <wxs module="filter" src="../../../../../utils/filter.wxs"></wxs> 2 <wxs module="filter" src="../../../../../utils/filter.wxs"></wxs>
2 <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;"> 3 <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;">
3 <view class="box_top data-v-3a5b7e36"> 4 <view class="box_top data-v-3a5b7e36">
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.json
@@ -5,6 +5,8 @@ @@ -5,6 +5,8 @@
5 "my_confirm": "/components/my_confirm/my_confirm", 5 "my_confirm": "/components/my_confirm/my_confirm",
6 "qr_code": "/components/qr_code/qr_code", 6 "qr_code": "/components/qr_code/qr_code",
7 "nav_b": "/components/nav_b/nav_b", 7 "nav_b": "/components/nav_b/nav_b",
8 - "share": "/components/share/share"  
9 - } 8 + "share": "/components/share/share",
  9 + "com_top_nav": "/components/com_top_nav/com_top_nav"
  10 + },
  11 + "navigationStyle": "custom"
10 } 12 }
11 \ No newline at end of file 13 \ No newline at end of file
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.wxml
  1 +<com_top_nav title="礼包详情"></com_top_nav>
  2 +
1 <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}}"> 3 <view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}}">
2 <view class="box_top data-v-3a5b7e36"> 4 <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> 5 <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" data-errorimg="giftImage"></image>
packageE/pages/user/monthgiftbag/monthgiftbag.wxml
@@ -66,6 +66,10 @@ @@ -66,6 +66,10 @@
66 <block wx:if="{{item.payIntegral>0}}"> 66 <block wx:if="{{item.payIntegral>0}}">
67 <text>{{item.payIntegral+"积分"}}</text> 67 <text>{{item.payIntegral+"积分"}}</text>
68 </block> 68 </block>
  69 +
  70 +
  71 + <!-- (121658)OA单规定取消,2023-12-15 -->
  72 + <!--
69 <block wx:if="{{item.actType==1}}"> 73 <block wx:if="{{item.actType==1}}">
70 <text>{{item.actTitle}}</text> 74 <text>{{item.actTitle}}</text>
71 </block> 75 </block>
@@ -80,7 +84,9 @@ @@ -80,7 +84,9 @@
80 </block> 84 </block>
81 <block wx:if="{{item.actType==5}}"> 85 <block wx:if="{{item.actType==5}}">
82 <text>{{item.actTitle}}</text> 86 <text>{{item.actTitle}}</text>
83 - </block> 87 + </block>-->
  88 +
  89 +
84 </view> 90 </view>
85 <view class="content_ware_price no_line_c"> 91 <view class="content_ware_price no_line_c">
86 <text >{{"购买时间:"+item.pay_time}}</text> 92 <text >{{"购买时间:"+item.pay_time}}</text>
packageG/pages/goods/com_screen.js 0 → 100644
  1 +const ut = require("../../../utils/util.js");
  2 +var regeneratorRuntime = require('../../../utils/runtime.js');
  3 +var oo = getApp().globalData.setting;
  4 +module.exports = {
  5 + //下拉排序
  6 + bind_pk_sort:function (e,th){
  7 + var index=e.detail.value;
  8 + var ob=th.data.more_sort_arr[index];
  9 +
  10 + var url = th.data.requestUrl;
  11 + if (th.data.tabname!=ob.value){
  12 +
  13 + var txt='desc';
  14 + if(ob.value=='sort') txt='asc'
  15 + th.setData({ tabname: ob.value, adname:txt });
  16 + }
  17 + th.resetData();
  18 +
  19 + //开始点击分类
  20 + if(th.requestGoodsList) {
  21 + //-- 开始点击分类 --
  22 + th.requestGoodsList(url);
  23 + }else if(th.requestSearch){
  24 + //-- 重新开始搜索 --
  25 + th.requestSearch(url);
  26 + }
  27 +
  28 + },
  29 +
  30 + //-- 获取列表 --
  31 + set_screen:async function (url,th){
  32 + if(!url) url=th.data.requestUrl;
  33 +
  34 + var arr=url.split('1=1&');
  35 + url='/api/weshop/goods/goodsBrandGroup?'+arr[1];
  36 +
  37 + var screen_brand=null;
  38 + var screen_nation=null;
  39 + var screen_price=null;
  40 + var screen_cate=null;
  41 + //如果有分类的话
  42 + if( th.data.cat_id && !th.data.screen_cate){
  43 + var c_url="/api/weshop/goodscategory/get/"+oo.stoid+"/"+ th.data.cat_id;
  44 + var f_cate=null;
  45 + await getApp().request.promiseGet(c_url,{
  46 + }).then(res=>{
  47 + if(res.data.code==0 && res.data.data){
  48 + f_cate=res.data.data;
  49 + }
  50 + })
  51 +
  52 + //分类必须有parent_id_path值
  53 + if(f_cate && f_cate['parent_id_path']){
  54 + var new_arr=f_cate['parent_id_path'].split('_');
  55 + c_url='/api/weshop/goodscategory/page?store_id='+oo.stoid+'&parent_id_path='+(new_arr[0]+"_"+new_arr['1']);
  56 + await getApp().request.promiseGet(c_url,{
  57 + data:{level:2,pageSize:1000}
  58 + }).then(res=>{
  59 + if(ut.ajax_ok(res) ){
  60 + screen_cate=res.data.data.pageData.filter(function(e){
  61 + return e.name
  62 + });
  63 + }
  64 + })
  65 + }
  66 +
  67 + }
  68 +
  69 +
  70 + if(url.indexOf('brand_id')==-1) {
  71 + var url1 = url + "&grouptype=1";
  72 + await getApp().request.promiseGet(url1, {
  73 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  74 + }).then(res => {
  75 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  76 + screen_brand = res.data.data.filter(function(e){
  77 + return e.name
  78 + });
  79 + }
  80 + })
  81 + }
  82 +
  83 + if(url.indexOf('nation_id')==-1) {
  84 + url1 = url + "&grouptype=2";
  85 + await getApp().request.promiseGet(url1, {
  86 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  87 + }).then(res => {
  88 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  89 + screen_nation = res.data.data.filter(function(e){
  90 + return e.name;
  91 + });
  92 + }
  93 + })
  94 + }
  95 +
  96 +
  97 + if(url.indexOf('startprice')==-1) {
  98 + url1 = url + "&grouptype=3";
  99 + await getApp().request.promiseGet(url1, {
  100 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  101 + }).then(res => {
  102 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  103 + var price = res.data.data;
  104 + var max_price = price[0].final_price;
  105 + var psize = Math.ceil(max_price / 5); // 每一段累积的价钱
  106 + var parr = [];
  107 + for (var i = 0; i < 5; i++) {
  108 + var start = i * psize;
  109 + var end = start + psize;
  110 + // 如果没有这个价格范围的商品则不列出来
  111 + var ii = false;
  112 + for (var v in price) {
  113 + var item_p = price[v];
  114 + if (item_p.final_price > start && item_p.final_price <= end) {
  115 + ii = true;
  116 + }
  117 + }
  118 + if (ii == false) continue;
  119 + var obj = {};
  120 + obj['price'] = start + "-" + end;
  121 + if (i == 0) obj['name'] = end + "元以下";
  122 + else if (i == 4) obj['name'] = start + "元以上";
  123 + else obj['name'] = start + "-" + end + '元';
  124 + parr.push(obj)
  125 + }
  126 + screen_price = parr;
  127 + }
  128 + })
  129 + }
  130 +
  131 + th.setData({screen_brand,screen_nation,screen_price,screen_cate})
  132 +
  133 + },
  134 +
  135 +
  136 + filterGoods:function (e,th){
  137 +
  138 + var index=e.currentTarget.dataset.index;
  139 + var type=e.currentTarget.dataset.type;
  140 + var url=th.data.requestUrl;
  141 +
  142 + switch (type){
  143 + case "1"://分类
  144 + var item=th.data.screen_cate[index];
  145 + if( th.data.cat_id){
  146 + var arr_m=url.split("1=1&");
  147 + var arr_m2=arr_m[1].split('&');
  148 + var url="";
  149 + for(var jj in arr_m2){
  150 + if(arr_m2[jj].indexOf('cat_id')>=-1){
  151 + url+="&cat_id="+item.id;
  152 + }else if(arr_m2[jj].indexOf('pid')>=-1){
  153 + url+="&pid="+item.parent_id;
  154 + }else{
  155 + url+="&"+arr_m2[jj];
  156 + }
  157 + }
  158 + }else {
  159 + url+="&cat_id="+item.id+"&pid="+item.parent_id;
  160 + }
  161 + url=arr_m[0]+"1=1&"+url;
  162 + break;
  163 + case "2"://国别
  164 + var item=th.data.screen_nation[index];
  165 + url+="&nation_id="+item.nation_id;
  166 + break;
  167 + case "3"://品牌
  168 + var item=th.data.screen_brand[index];
  169 + url+="&brand_id="+item.brand_id;
  170 + break;
  171 + case "4"://价格
  172 + var item=th.data.screen_price[index];
  173 + var p_arr=item.price.split('-');
  174 + url+="&startprice="+p_arr[0]+"&endprice="+p_arr[1];
  175 + break;
  176 + }
  177 +
  178 + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0,
  179 + screen_price:null,screen_cate:null,requestData:null})
  180 + th.data.currentPage=1;
  181 + //进行筛选
  182 + this.set_screen(url,th);
  183 +
  184 + th.setData({
  185 + tabname:"sort", //排序的字段
  186 + adname:"asc", //升降的字段
  187 + })
  188 +
  189 + //开始点击分类
  190 + if(th.requestGoodsList) {
  191 + //-- 开始点击分类 --
  192 + th.requestGoodsList(url);
  193 + }else if(th.requestSearch){
  194 + //-- 重新开始搜索 --
  195 + th.requestSearch(url);
  196 + }
  197 + },
  198 +
  199 + //-- 展开和收起的控制 --
  200 + open_more:function(e,th){
  201 + var type=e.currentTarget.dataset.type;
  202 + switch(type){
  203 + case "1":
  204 + if(th.data.fil_cate_state==0 || th.data.fil_cate_state==2) th.setData({fil_cate_state:1})
  205 + else th.setData({fil_cate_state:2})
  206 + break;
  207 + case "2":
  208 + if(th.data.fil_nation_state==0 || th.data.fil_nation_state==2) th.setData({fil_nation_state:1})
  209 + else th.setData({fil_nation_state:2})
  210 + break;
  211 + case "3":
  212 + if(th.data.fil_brand_state==0 || th.data.fil_brand_state==2) th.setData({fil_brand_state:1})
  213 + else th.setData({fil_brand_state:2})
  214 + break;
  215 + case "4":
  216 + if(th.data.fil_price_state==0 || th.data.fil_price_state==2) th.setData({fil_price_state:1})
  217 + else th.setData({fil_price_state:2})
  218 + break;
  219 +
  220 + }
  221 + },
  222 +
  223 + clear_fil(th){
  224 + var url=th.data.old_req_url;
  225 + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0,
  226 + screen_price:null,screen_cate:null,requestData:null})
  227 + th.data.currentPage=1;
  228 +
  229 + //进行筛选
  230 + this.set_screen(url,th);
  231 + if(th.requestGoodsList) {
  232 + //-- 开始点击分类 --
  233 + th.requestGoodsList(url);
  234 + }else if(th.requestSearch){
  235 + //-- 重新开始搜索 --
  236 + th.requestSearch(url);
  237 + }
  238 + }
  239 +
  240 +
  241 +}
0 \ No newline at end of file 242 \ No newline at end of file
packageG/pages/goods/com_screen.wxss 0 → 100644
  1 +/*--三角形的显示--*/
  2 +.arrow_down,.arrow_up{
  3 + width: 0px;
  4 + height: 0px;
  5 + font-size: 0;
  6 + line-height: 0;
  7 + border-right: 5px solid transparent;
  8 + border-left: 5px solid transparent;
  9 +}
  10 +
  11 +.arrow_down {
  12 + border-top: 5px solid #a5a5a5; margin-top: 4rpx;
  13 +}
  14 +.arrow_up{
  15 + border-bottom: 5px solid #a5a5a5;
  16 +}
  17 +
  18 +.arrow_down.on{
  19 + border-top: 5px solid #F4281C ;
  20 +}
  21 +.arrow_up.on{
  22 + border-bottom: 5px solid #F4281C;
  23 +}
  24 +
  25 +.f_cate_item{ height:80rpx; display:flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #dcdcdc;}
  26 +
  27 +.filter-items{ color: #666; overflow:hidden}
  28 +.filter-items.normal_to{ max-height: 260rpx}
  29 +.filter-items.back_to{ height: 0rpx}
  30 +
  31 +.up_ar{ transform: rotate(180deg)}
  32 +.fil_btn{ width: 47%; height:80rpx; border-radius:10rpx; display: flex;
  33 + justify-content:center; align-items: center; font-size:28rpx;color:#fff}
  34 +.fil_cancle{ background-color: #25c6fc }
  35 +.fil_sure{ background-color:#dd272c }
  36 +
  37 +.filter-modal {
  38 + position: fixed;
  39 + left: 150rpx;
  40 + top: 0;
  41 + right: 0;
  42 + bottom: 0;
  43 + z-index: 1120;
  44 + background-color: white;
  45 + overflow-x: hidden;
  46 +}
  47 +
  48 +.filter-box {
  49 + box-sizing: border-box;
  50 + width: 100%;
  51 + font-size: 28rpx;
  52 + padding: 20rpx;
  53 +}
  54 +
  55 +.filter-name {
  56 + width: 100%;
  57 + padding: 20rpx 0;
  58 + word-break: keep-all;
  59 + white-space: nowrap;
  60 + text-overflow: ellipsis;
  61 + overflow: hidden;
  62 + font-size: 30rpx;
  63 +}
  64 +
  65 +.filter-item {
  66 + float: left;
  67 + width: fit-content;
  68 + max-width: 500rpx;
  69 + word-break: keep-all;
  70 + white-space: nowrap;
  71 + text-overflow: ellipsis;
  72 + overflow: hidden;
  73 + padding: 10rpx;
  74 + border-radius: 10rpx;
  75 + border: 1rpx #ddd solid;
  76 + margin: 0 10rpx 10rpx 0;
  77 + background-color: #fdfdfd;
  78 + color: #666;
  79 +}
0 \ No newline at end of file 80 \ No newline at end of file
pages/goods/search/g_filter.wxs renamed to packageG/pages/goods/search/g_filter.wxs
pages/goods/search/search.js renamed to packageG/pages/goods/search/search.js
@@ -2,7 +2,7 @@ var t = function (t) { @@ -2,7 +2,7 @@ var t = function (t) {
2 return t && t.__esModule ? t : { 2 return t && t.__esModule ? t : {
3 default: t 3 default: t
4 }; 4 };
5 -}(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"), 5 +}(require("../../../../utils/LoadMore.js")), ut = require("../../../../utils/util.js"),
6 a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting; 6 a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting;
7 const com_fil = require("../com_screen.js"); 7 const com_fil = require("../com_screen.js");
8 8
pages/goods/search/search.json renamed to packageG/pages/goods/search/search.json
pages/goods/search/search.wxml renamed to packageG/pages/goods/search/search.wxml
pages/goods/search/search.wxss renamed to packageG/pages/goods/search/search.wxss