Commit 83c9e34ca474a3291615b4f8ad34746c3d2ba5f2

Authored by WXD-SEASON\season
2 parents 9caaa5ed 2fbd29c3

合并

Showing 112 changed files with 11162 additions and 499 deletions

Too many changes.

To preserve performance only 100 of 112 files are displayed.

... ... @@ -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 320 initExt: function () {
296 321 var tt = t;
... ...
app.json
... ... @@ -6,13 +6,13 @@
6 6 "pages/cart/cart4/cart4",
7 7 "pages/goods/goodsInfo/goodsInfo",
8 8 "pages/goods/goodsList/goodsList",
9   - "pages/goods/search/search",
  9 +
10 10 "pages/order/refund_order/refund_order",
11 11 "pages/payment/payment/payment",
12 12 "pages/user/index/index",
13 13 "pages/user/order_list/order_list",
14 14 "pages/user/order_detail/order_detail",
15   - "pages/user/userinfo/userinfo",
  15 +
16 16 "pages/user/coupon/coupon",
17 17 "pages/user/checkcoupon/checkcoupon",
18 18  
... ... @@ -23,16 +23,16 @@
23 23  
24 24 "pages/user/userqy/userqy",
25 25 "pages/user/user_spsy/user_spsy",
26   - "pages/payment/pay_success/pay_success",
  26 +
27 27 "pages/user/plus/plus",
28   - "pages/user/my_service/appment_main",
  28 +
29 29 "pages/user/my_service/i_service",
30   - "pages/user/my_service/cosmetology_list",
  30 +
31 31 "pages/user/my_service/hist_service",
32 32 "pages/user/my_service/tment_details",
33 33 "pages/user/my_service/tment_eval",
34   - "pages/user/my_service/tment_order_list",
35   - "pages/user/my_service/beauty_deta",
  34 +
  35 +
36 36 "pages/giftpack/birthdaygift/birthdaygift",
37 37 "pages/giftpack/evaluategift/evaluategift",
38 38 "pages/giftpack/newvipgift/newvipgift",
... ... @@ -243,7 +243,14 @@
243 243 "pages/store/index",
244 244 "pages/user/express/express",
245 245 "pages/team/team_success/team_success",
246   - "pages/plus_agreement/plus_agreement"
  246 + "pages/plus_agreement/plus_agreement",
  247 + "pages/goods/search/search",
  248 + "pages/payment/pay_success/pay_success",
  249 + "pages/user/userinfo/userinfo",
  250 + "pages/user/my_service/appment_main",
  251 + "pages/user/my_service/cosmetology_list",
  252 + "pages/user/my_service/beauty_deta",
  253 + "pages/user/my_service/tment_order_list"
247 254 ]
248 255 }
249 256 ],
... ...
components/add_purchase/add_purchase.js 0 → 100644
Changes suppressed. Click to show
  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 + lifetimes: {
  22 + attached: function () {
  23 + // this.clearTime()
  24 + self = this
  25 + // 在组件实例进入页面节点树时执行
  26 + let ee = this, that = ee, th = ee;
  27 + //先获取一下导购的门店
  28 + th.check_guide(() => {
  29 + th.get_user_store();
  30 + })
  31 + //----获取系统参数-----
  32 + getApp().getConfig2(function (e) {
  33 + ee.setData({
  34 + bconfig: e,
  35 + sales_rules: e.sales_rules,
  36 + });
  37 + th.wait_for_store_config();
  38 + if (e.categoryset.indexOf("," + 1 + ",") != -1) {
  39 + ee.setData({
  40 + is_show_pl: 1
  41 + });
  42 + }
  43 + if (e.categoryset.indexOf("," + 3 + ",") != -1) {
  44 + ee.setData({
  45 + is_show_pp: 1
  46 + });
  47 + }
  48 + if (e.categoryset.indexOf("," + 2 + ",") != -1) {
  49 + ee.setData({
  50 + is_show_gb: 1
  51 + });
  52 + }
  53 + console.log('获取系统参数');
  54 + console.log(e);
  55 + var json_d = JSON.parse(e.switch_list);
  56 + ee.setData({
  57 + store_config: e,
  58 + sys_switch: json_d,
  59 + is_closecoupon: json_d.is_closecoupon,
  60 + is_newsales_rules: json_d.is_newsales_rules,
  61 + is_retail_price: json_d.is_retail_price || 0,
  62 + appoint_pick_keyid: json_d.appoint_pick_keyid,
  63 + // goods_bottomconent:e.goods_bottomconent
  64 + });
  65 +
  66 + //判断商品详情要有东西
  67 + // if (e && e.goods_bottomconent) {
  68 + // //商品详情广告----
  69 + // a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
  70 + // common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
  71 + // //-------
  72 + // }
  73 +
  74 + //------几人评价-------
  75 + //n.init(th, "", "comments");
  76 +
  77 + // th.requestCardNum(),
  78 + wx.pageScrollTo && th.setData({
  79 + supportPageScroll: !0
  80 + });
  81 +
  82 + //计算等级价相关
  83 + var swithc_list = e.switch_list;
  84 + var sw_arr = JSON.parse(swithc_list);
  85 + console.log('plus-111')
  86 + //---如果后台又开等级卡的开关---
  87 + ut.get_plus_name_price(sw_arr, th);
  88 +
  89 + }, 1);
  90 + }
  91 + },
  92 + /**
  93 + * 组件的初始数据
  94 + */
  95 + data: {
  96 + add_cart_show: false, //是否显示
  97 + iurl: getApp().globalData.setting.imghost,
  98 + prom_price: null,
  99 + sele_g: null,
  100 + gid: '',
  101 + prom_type: '',
  102 + prom_id: '',
  103 + goodsInputNum: 1,
  104 + def_pick_store: null, // 默认的门店
  105 + openSpecModal_ind: 1,
  106 + goods_type: 0,
  107 + iscart: 0, //是否从购物车过来的
  108 + cx_prom_group: [], //促销活动,用于显示和判断默认要用什么促销活动
  109 + //门店相关
  110 + ismend: 0,
  111 + only_pk: null,
  112 + stoid: o.stoid,
  113 + is_get_local_ok: 0, //获取坐标是否完成
  114 + def_pickpu_list: null,
  115 + more_store: 0, //选择门店
  116 + sort_store: 0, //门店分类
  117 + choice_sort_store: 0, //选择分类门店
  118 + sec_pick_index: 0, //第二级门店选择ID
  119 + fir_pick_index: 0, //第一级门店选择ID
  120 + all_pick_list: null, //所有的门店先记录起来
  121 + fir_def_store: null, //客户默认的门店的
  122 + keyword: '', //门店搜索
  123 + is_no_new: 1,
  124 + },
  125 +
  126 + /**
  127 + * 组件的方法列表
  128 + */
  129 + methods: {
  130 + closeSpecModal() {
  131 + this.clearTime()
  132 + this.setData({
  133 + add_cart_show: false
  134 + })
  135 +
  136 + this.triggerEvent('hide_add_purchase', {})
  137 + },
  138 + clearTime() {
  139 + if (timer_get) {
  140 + clearInterval(timer_get);
  141 + }
  142 + if (w_time) {
  143 + clearInterval(w_time);
  144 + }
  145 + if (t_time) {
  146 + clearInterval(t_time);
  147 + }
  148 +
  149 + },
  150 + previewImage(e) {
  151 + // this.data.show_prew_img = 1;
  152 + getApp().pre_img(this.data.sele_g.original_img);
  153 + },
  154 + init(gid, prom_type, prom_id, goods_type = 0, iscart = 0, cartid = 0) {
  155 + // this.clearTime()
  156 + //--先判断会员状态--
  157 + var user_info = getApp().globalData.userInfo;
  158 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  159 + wx.showModal({
  160 + title: '提示',
  161 + content: '你还没有登录',
  162 + confirmText: '去登录',
  163 + success(res) {
  164 +
  165 + if (res.confirm) {
  166 + wx.navigateTo({
  167 + url: '/packageE/pages/togoin/togoin',
  168 + })
  169 + } else if (res.cancel) {
  170 + console.log('用户点击取消')
  171 + }
  172 + }
  173 + })
  174 + return false;
  175 + }
  176 +
  177 +
  178 + if (!gid) {
  179 + wx.showToast({
  180 + title: '商品信息不对',
  181 + icon: 'none'
  182 + })
  183 + return
  184 + }
  185 + this.setData({
  186 + gid,
  187 + prom_id,
  188 + prom_type,
  189 + goods_type,
  190 + add_cart_show: true,
  191 + goodsInputNum: 1,
  192 + iscart,
  193 + cartid
  194 + })
  195 + if (goods_type == 1) {
  196 + this.get_ser_info()
  197 + } else {
  198 + this.get_goods_info()
  199 + }
  200 +
  201 + },
  202 + //获取服务详情
  203 + get_ser_info() {
  204 + let i = getApp().request;
  205 + let gid = this.data.gid
  206 + let ee = this;
  207 + let that = this
  208 + let th = this;
  209 + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, {
  210 + failRollback: !0,
  211 + success: function (t) {
  212 + if (t.data.code == 0) {
  213 + // console.log('GET pic and video');
  214 + if (t.data.data.listServiceItem) {
  215 + that.setData({
  216 + listServiceItem: t.data.data.listServiceItem,
  217 + });
  218 + };
  219 + that.setData({
  220 + 'sele_g.goods_name': t.data.data.serviceName,
  221 + 'sele_g.shop_price': t.data.data.money,
  222 + 'sele_g.show_price': t.data.data.show_price,
  223 + 'sele_g.validDays': t.data.data.validDays,
  224 + 'sele_g.serviceContent': t.data.data.serviceContent,
  225 + 'sele_g.image_url': t.data.data.imgUrl,
  226 + 'sele_g.original_img': that.data.iurl + t.data.data.imgUrl,
  227 + 'sele_g.goods_id': t.data.data.id,
  228 + 'sele_g.id': t.data.data.id,
  229 + 'sele_g.sales_sum': t.data.data.sales_sum,
  230 + 'sele_g.storageId': t.data.data.storageId,
  231 + 'sele_g.service_sn': t.data.data.serviceSn,
  232 + 'sele_g.listServiceVideos': t.data.data.listServiceVideos,
  233 +
  234 + 'data.goods_name': t.data.data.serviceName,
  235 + 'data.shop_price': t.data.data.money,
  236 + 'data.show_price': t.data.data.show_price,
  237 + 'data.validDays': t.data.data.validDays,
  238 + 'data.serviceContent': t.data.data.serviceContent,
  239 + 'data.image_url': t.data.data.imgUrl,
  240 + 'data.original_img': that.data.iurl + t.data.data.imgUrl,
  241 + 'data.goods_id': t.data.data.id,
  242 + 'data.id': t.data.data.id,
  243 + 'data.sales_sum': t.data.data.sales_sum,
  244 + 'data.storageId': t.data.data.storageId,
  245 + 'data.service_sn': t.data.data.serviceSn,
  246 + 'data.listServiceVideos': t.data.data.listServiceVideos,
  247 + });
  248 +
  249 + // that.getTaohe();
  250 + // ----> 秒杀
  251 + let prom_type = th.data.prom_type;
  252 +
  253 + let goods_id = th.data.goods_id;
  254 + if (!goods_id) goods_id = th.data.sele_g.goods_id;
  255 +
  256 + if (prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入
  257 + let prom_id = th.data.prom_id;
  258 + // 检查活动是否开始
  259 + th.ser_check_prom(goods_id, prom_type, prom_id);
  260 +
  261 + } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数
  262 + getApp().request.promiseGet('/api/weshop/activitylist/listGoodActInfo2', {
  263 + data: {
  264 + store_id: os.stoid,
  265 + goods_id: goods_id,
  266 + goods_type: 1,
  267 + user_id: oo.user_id,
  268 + }
  269 + }).then(res => {
  270 + if (res.data.code == 0) {
  271 + let result = res.data.data;
  272 + let resLength = result.length;
  273 + if (resLength == 1) { // 如果数组长度为1,则直接显示当前活动
  274 + let goods_id = th.data.gid;
  275 + let prom_type = result[0].prom_type;
  276 + let prom_id = result[0].act_id;
  277 + th.setData({
  278 + prom_type: prom_type,
  279 + prom_id: prom_id,
  280 + });
  281 + // 检查活动是否开始
  282 + th.ser_check_prom(goods_id, prom_type, prom_id);
  283 + } else if (resLength > 1) { //如果数组长度大于1,表示当前商品参加多个活动,以列表形式显示多活动
  284 + th.setData({
  285 + actList: res.data.data,
  286 + });
  287 + };
  288 +
  289 + } else {
  290 + th.setData({
  291 + actList: res.data.data,
  292 + });
  293 + }
  294 + });
  295 + };
  296 +
  297 + // console.log('0xxxxx999999', t.data.data);
  298 + //-----商品详情---
  299 + //if(!t.data.data.serviceContent) t.data.data.serviceContent=" ";
  300 + //a.wxParse("content", "html", ut.format_content(t.data.data.serviceContent), ee, 6);
  301 + //e.wxParseAddFullImageUrl(ee, "content");
  302 + // getApp().deal_iframe(a,e,'content',t.data.data.serviceContent,ee);
  303 +
  304 + //获取重表
  305 + getApp().promiseGet("/api/weshop/serviceItem/list", {
  306 + data: { store_id: o.stoid, service_id: t.data.data.id }
  307 + }).then(res => {
  308 + if (res.data.code == 0) {
  309 + var list = res.data.data;
  310 + that.setData({ service_list: list })
  311 + }
  312 + })
  313 +
  314 + } else {
  315 + wx.showModal({
  316 + title: t.data.msg,
  317 + showCancel: !1,
  318 + complete: function () {
  319 + wx.navigateBack();
  320 + }
  321 + });
  322 + };
  323 + }
  324 + });
  325 +
  326 + },
  327 + get_normal(gid) {
  328 + this.setData({
  329 + prom_type: 0,
  330 + isshow: 1,
  331 + });
  332 + if (this.data.goods_type != 1) {
  333 +
  334 + this.get_sku(os.stoid, this.data.data, gid);
  335 + }
  336 +
  337 + this.get_sto();
  338 + if (!this.data.data.whsle_id)
  339 + this.check_is_youhui(gid);
  340 + this.data.is_normal = 1;
  341 + },
  342 + //获取商品详情
  343 + get_goods_info() {
  344 +
  345 + let i = getApp().request;
  346 + let gid = this.data.gid
  347 + let ee = this;
  348 + i.get("/api/weshop/goods/get/" + getApp().globalData.setting.stoid + "/" + this.data.gid, {
  349 + failRollback: !0,
  350 + success: (t) => {
  351 + console.log(t);
  352 + // t.data.data.prom_type=0
  353 + if (t.data.code == 0) {
  354 + // if (t.data.data && t.data.data.prom_type == 4) {
  355 + // if (ee.data.prom_type4 == 1) {
  356 + // t.data.data.prom_type = 0
  357 + // }
  358 + // }
  359 + if (t.data.data.is_on_sale != 1) {
  360 + wx.showToast({
  361 + title: '商品已经下架',
  362 + icon: 'none',
  363 + duration: 2000
  364 + })
  365 + return
  366 + }
  367 + // ee.init(gid);
  368 + var timestamp = Date.parse(new Date());
  369 + timestamp = timestamp / 1000;
  370 + if (t.data.data.on_time > timestamp) {
  371 + wx.showToast({
  372 + title: '商品还未上架',
  373 + icon: 'none',
  374 + duration: 2000
  375 + })
  376 + return
  377 + }
  378 +
  379 + if (t.data.data.down_time > 0) {
  380 + if (t.data.data.down_time < timestamp) {
  381 + wx.showToast({
  382 + title: '商品已经到期下架',
  383 + icon: 'none',
  384 + duration: 2000
  385 + })
  386 + return
  387 + }
  388 + }
  389 +
  390 + // let p_type = parseInt(this.data.prom_type ? ee.data.prom_type : 0);
  391 +
  392 +
  393 +
  394 + //-- 把商品的赋值,同时给活动赋值 --
  395 + ee.data.fir_goods = JSON.parse(JSON.stringify(t.data.data));
  396 +
  397 + t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss');
  398 +
  399 + let cur_price = t.data.data.shop_price;
  400 + if (getApp().globalData.userInfo && getApp().globalData.userInfo.card_field) {
  401 + let cfile = getApp().globalData.userInfo.card_field;
  402 + if (t.data.data[cfile]) {
  403 + cur_price = t.data.data[cfile];
  404 + }
  405 + }
  406 + let txt = (cur_price / t.data.data.market_price * 10).toFixed(2).toString();
  407 + txt = parseFloat(txt);
  408 +
  409 + t.data.data['disc'] = txt;
  410 +
  411 + if (t.data.data.original_img.indexOf(o.imghost) == -1)
  412 + t.data.data.original_img = o.imghost + t.data.data.original_img;
  413 +
  414 +
  415 + t.data.data.prom_type = ee.data.prom_type;
  416 + t.data.data.prom_id = ee.data.prom_id;
  417 +
  418 + //只有是普通商品的时候,才要给商品赋值指定门店
  419 + 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) {
  420 + t.data.data.pickup_ids = t.data.data.pick_up_lists;
  421 + }
  422 + //}
  423 + ee.setData({
  424 + data: t.data.data,
  425 + sele_g: t.data.data,
  426 + userInfo: getApp().globalData.userInfo
  427 + });
  428 +
  429 + //一件代发商品不去计算优惠
  430 + 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) {
  431 + ee.check_is_youhui(ee.data.gid);
  432 + }
  433 +
  434 +
  435 + //获取统一条形码,普通商品和优惠促销的商品
  436 + 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) {
  437 + ee.get_sto();
  438 + ee.get_sku(o.stoid, t.data.data, gid);
  439 + ee.check_has_flash();
  440 +
  441 + } else {
  442 + var gg = "",
  443 + item = t.data.data;
  444 +
  445 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  446 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  447 +
  448 + if (item.goods_spec != "" && item.goods_color != "") {
  449 + gg = item.goods_spec + "/" + item.goods_color;
  450 + } else if (item.goods_spec != "" || item.goods_color != "") {
  451 + gg = item.goods_spec + item.goods_color;
  452 + } else {
  453 + gg = "规格1";
  454 + }
  455 + t.data.data.gg = gg;
  456 + var uu = [];
  457 + uu.push(t.data.data);
  458 +
  459 + ee.setData({
  460 + sku_g: uu,
  461 + });
  462 + }
  463 + ee.data.g_buy_num = new Map();
  464 +
  465 + //-- 增加相同的活动 --
  466 + ee.check_prom(gid, ee.data.data.prom_type, ee.data.data.prom_id);
  467 + } else {
  468 + wx.showModal({
  469 + title: t.data.msg,
  470 + showCancel: !1,
  471 + });
  472 + }
  473 + }
  474 + });
  475 + },
  476 + //----------装载同一条形码的商品----------
  477 + async get_sku(stoid, gd, g_id, is_normal, func) {
  478 + console.log('get_sku');
  479 + var tt = this,
  480 + arrdata = null;
  481 + var now = ut.gettimestamp();
  482 + await getApp().request.promiseGet("/api/weshop/goods/page", {
  483 + data: {
  484 + store_id: o.stoid,
  485 + sku: gd.sku,
  486 + more_spec: gd.more_spec,
  487 + isonsale: 1,
  488 + is_on_sale: 1,
  489 + pageSize: 500,
  490 + orderField: 'gg_ordid,goods_spec,sort',
  491 + isnewwhere: 1,
  492 + js_pickup_id: 0
  493 + }
  494 + }).then(res => {
  495 + var e = res;
  496 + if (e.data.code == 0) arrdata = e.data.data.pageData;
  497 + })
  498 + if (!arrdata) return false;
  499 +
  500 + // if(arrdata[0]){
  501 + // tt.setData({
  502 + // new_share_imgurl:arrdata[0].share_imgurl
  503 + // })
  504 + // }
  505 +
  506 + var arrsku = new Array();
  507 + var gitem = null;
  508 + var gb = 1,
  509 + gg = "";
  510 + for (var i = 0; i < arrdata.length; i++) {
  511 + var goodsinfo = arrdata[i],
  512 + prom = null;
  513 +
  514 + if (goodsinfo.goods_id != g_id) {
  515 +
  516 +
  517 + //要判断一下商品的活动是不是多活动,确定一下商品的prom_type
  518 + var url = '/api/weshop/activitylist/listGoodActInfo2New';
  519 + var req_d = {
  520 + "store_id": os.stoid,
  521 + "goods_id": goodsinfo.goods_id,
  522 + "user_id": getApp().globalData.user_id,
  523 + }
  524 + var ck_res = await getApp().request.promiseGet("/api/weshop/activitylist/listGoodActInfo2New", { data: req_d });
  525 + if (ck_res.data.code == 0 && ck_res.data.data && ck_res.data.data.length > 0) {
  526 + var arr = ck_res.data.data;
  527 + //-- 预热也要计算 --
  528 + var arr2 = arr.filter(function (e) {
  529 + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp())
  530 + })
  531 +
  532 + if (arr2.length == 1) {
  533 + goodsinfo.prom_type = arr2[0].prom_type;
  534 + goodsinfo.prom_id = arr2[0].act_id;
  535 + }
  536 + }
  537 +
  538 + switch (goodsinfo.prom_type) {
  539 + case 1:
  540 +
  541 + if (goodsinfo.prom_id) {
  542 + await getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => {
  543 + if (res.data.code == 0) prom = res.data.data;
  544 + })
  545 + }
  546 +
  547 +
  548 + break;
  549 + case 6:
  550 + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => {
  551 + console.log(res);
  552 + if (res.data.code == 0) prom = res.data.data;
  553 + })
  554 +
  555 + break;
  556 + case 2:
  557 + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {
  558 + if (res.data.code == 0) prom = res.data.data;
  559 + })
  560 + break;
  561 + case 4:
  562 + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {
  563 + if (res.data.code == 0) prom = res.data.data;
  564 + })
  565 + break
  566 + //预售和幸运购不参与
  567 + case 8:
  568 + case 9:
  569 + continue;
  570 + }
  571 +
  572 + } else {
  573 +
  574 + //只有是普通商品的时候,才要给商品赋值指定门店
  575 + if ([1, 2, 4, 6, 8, 9].indexOf(parseInt(this.data.prom_type)) < 0 || is_normal) {
  576 + //如果商品有设置分组
  577 + if (goodsinfo.pick_group_ids) {
  578 + goodsinfo.pickup_ids = goodsinfo.pick_up_lists;
  579 + }
  580 + }
  581 +
  582 + }
  583 + //---如果有活动,不算在一起---
  584 + if (prom) {
  585 + if ([1, 2, 4, 6].indexOf(parseInt(goodsinfo.prom_type)) > -1) {
  586 + console.log(prom);
  587 + if (prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom.show_time && prom.show_time < now))) continue;
  588 + } else {
  589 + continue;
  590 + }
  591 + }
  592 + var item = arrdata[i], gg = "";
  593 +
  594 + if (goodsinfo.goods_id != g_id) {
  595 + //-- 如果商品有设置分组 --
  596 + if (item.pick_group_ids) {
  597 + item.pickup_ids = item.pick_up_lists;
  598 + }
  599 + }
  600 +
  601 +
  602 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  603 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  604 +
  605 + if (item.goods_spec != "" && item.goods_color != "") {
  606 + gg = item.goods_spec + "/" + item.goods_color;
  607 + } else if (item.goods_spec != "" || item.goods_color != "") {
  608 + gg = item.goods_spec + item.goods_color;
  609 + } else {
  610 + gg = "规格" + gb;
  611 + gb++;
  612 + }
  613 + item.gg = gg;
  614 +
  615 + if (item.spec_img)
  616 + item.original_img = os.imghost + item.spec_img;
  617 + else
  618 + item.original_img = os.imghost + item.original_img;
  619 +
  620 +
  621 + if (item.goods_id == g_id) {
  622 + gitem = item;
  623 + } else {
  624 + arrsku.push(item);
  625 + }
  626 + }
  627 +
  628 + //-----------排列在最前面-------------
  629 + arrsku.splice(0, 0, gitem);
  630 +
  631 + if (is_normal == 1) {
  632 + tt.setData({
  633 + sku_g_pt: arrsku,
  634 + sele_g: gitem
  635 + });
  636 + func();
  637 + } else {
  638 + tt.setData({
  639 + sku_g: arrsku,
  640 + sele_g: gitem
  641 + });
  642 + }
  643 + },
  644 +
  645 + //-- 判断是否有秒杀 --
  646 + check_has_flash: function (gid) {
  647 + var th = this;
  648 + var url = "/api/weshop/activitylist/getGoodActInfo";
  649 + var user_id = getApp().globalData.user_id;
  650 + if (!user_id) user_id = 0;
  651 +
  652 + if (!gid) gid = this.data.data.goods_id
  653 +
  654 + var req_data = {
  655 + store_id: os.stoid,
  656 + goodsidlist: gid,
  657 + is_detail: 1,
  658 + user_id: user_id,
  659 + timetype: 0
  660 + };
  661 + //获取秒杀的多规格
  662 + getApp().request.promiseGet(url, {
  663 + data: req_data
  664 + }).then(async function (res) {
  665 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  666 + var arr_data = res.data.data;
  667 + var new_arr = [];
  668 + for (let i in arr_data) {
  669 + let item = arr_data[i];
  670 + //找不到活动要剔除
  671 + if (!item.act_name) continue;
  672 +
  673 + if ([1, 2, 4, 6, 8, 9].indexOf(item.prom_type) == -1) continue;
  674 + new_arr.push(item);
  675 + }
  676 +
  677 + // if (new_arr.length == 1) {
  678 + // th.data.prom_id = new_arr[0].act_id;
  679 + // th.data.prom_type = new_arr[0].prom_type;
  680 + // }
  681 +
  682 + th.setData({
  683 + more_flash: new_arr
  684 + });
  685 + }
  686 + })
  687 + },
  688 +
  689 +
  690 + //--------检查是否活动,活动是否开始,或者是否结束-------
  691 + async check_prom(gid, prom_type, prom_id) {
  692 +
  693 + console.log('check_prom');
  694 + var ee = this,
  695 + th = ee;
  696 + var user_id = getApp().globalData.user_id;
  697 + if (!user_id) user_id = 0;
  698 +
  699 + if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9 || prom_type == 10) {
  700 + this.setData({
  701 + prom_type: 0,
  702 + isshow: 1,
  703 + });
  704 + return false;
  705 + }
  706 +
  707 + if (prom_type == 2) {
  708 + //-------判断团购活动是否抢光---------
  709 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  710 + 1: 1
  711 + }).then(res => {
  712 + var em = res;
  713 + if (em.data.code == 0) {
  714 + if (em.data.data <= 0) ee.setData({
  715 + prom_r_null: 1
  716 + });
  717 + //拿取价格并且判断时间--
  718 + getApp().request.get("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gid + "/" + prom_id, {
  719 + success: function (t) {
  720 + if (t.data.code != 0) {
  721 + ee.get_normal(gid);
  722 + return false;
  723 + }
  724 + //----已经结束-----
  725 + if (t.data.data.is_end == 1) {
  726 + ee.get_normal(gid);
  727 + return false;
  728 + }
  729 + //----已经过期-----
  730 + var now = ut.gettimestamp();
  731 + if (t.data.data.end_time < now || t.data.data.start_time > now) {
  732 + ee.get_normal(gid);
  733 + return false;
  734 + }
  735 +
  736 + /*-- 还没有开始预热的也不显示 --*/
  737 + if (t.data.data.show_time > now) {
  738 + ee.get_normal(gid);
  739 + return false;
  740 + }
  741 +
  742 + var t_gd = ee.data.data;
  743 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  744 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  745 +
  746 + ee.setData({
  747 + prom_price: t.data.data.price,
  748 + prom_type: 2,
  749 + prom_id: prom_id,
  750 + prom_buy_limit: t.data.data.buy_limit,
  751 + prom_act: t.data.data,
  752 + prom_end_time: prom_end_time,
  753 + prom_start_time: prom_start_time,
  754 + isshow: 1,
  755 + });
  756 +
  757 + ee.get_sto();
  758 + var newTime = ut.gettimestamp();
  759 + var endTime2 = t.data.data.end_time;
  760 + var endTime1 = t.data.data.start_time;
  761 + if (endTime1 > newTime) {
  762 + ee.setData({
  763 + prom_time_text: '距团购开始还有'
  764 + })
  765 + // ee.countDown(endTime1, 0);
  766 + } else {
  767 + if (endTime2 > newTime) {
  768 + ee.setData({
  769 + prom_time_text: '距团购结束还有',
  770 + prom_st: 1
  771 + })
  772 + // ee.countDown(endTime2);
  773 + }
  774 + }
  775 +
  776 + }
  777 + });
  778 + }
  779 + })
  780 + }
  781 +
  782 + if (prom_type == 1 && prom_id == 0) {
  783 + this.setData({
  784 + prom_type: 0,
  785 + isshow: 1,
  786 + });
  787 +
  788 + //获取门店
  789 + this.get_sto();
  790 + this.get_sku(o.stoid, this.data.data, gid);
  791 + this.check_has_flash();
  792 + this.data.is_normal = 1;
  793 + if (!this.data.data.whsle_id) this.check_is_youhui(gid, 1);
  794 + return false;
  795 + }
  796 +
  797 + //if (prom_type != 3 && prom_type!=0){
  798 + //---判断秒杀----
  799 + if (prom_type == 1 && prom_id > 0) {
  800 + //-------判断活动是否抢光---------
  801 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  802 + 1: 1
  803 + }).then(res => {
  804 + var em = res;
  805 + if (em.data.code == 0) {
  806 +
  807 + if (em.data.data <= 0) ee.setData({
  808 + prom_r_null: 1, pro_null: 1
  809 + });
  810 + //拿取价格并且判断时间--
  811 + getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {
  812 + success: function (t) {
  813 + if (t.data.code != 0) {
  814 + ee.get_normal(gid);
  815 + return false;
  816 + }
  817 + ee.setData({
  818 + is_share_text: t.data.data.is_share_text
  819 + })
  820 + //----已经结束-----
  821 + if (t.data.data.is_end == 1) {
  822 + ee.get_normal(gid);
  823 + return false;
  824 + }
  825 + //----已经过期-----
  826 + var now = ut.gettimestamp();
  827 + if (t.data.data.end_time < now) {
  828 + ee.get_normal(gid);
  829 + return false;
  830 + }
  831 + /*-- 还没有开始预热的也不显示 --*/
  832 + if (t.data.data.show_time > now) {
  833 + ee.get_normal(gid);
  834 + return false;
  835 + }
  836 +
  837 + var t_gd = ee.data.data;
  838 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  839 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  840 +
  841 + ee.setData({
  842 + prom_price: t.data.data.user_price,
  843 + prom_type: 1,
  844 + prom_id: prom_id,
  845 + prom_buy_limit: t.data.data.buy_limit,
  846 + prom_act: t.data.data,
  847 + prom_end_time: prom_end_time,
  848 + prom_start_time: prom_start_time,
  849 + isshow: 1,
  850 + });
  851 +
  852 + ee.get_sto();
  853 + var newTime = ut.gettimestamp();
  854 + var endTime2 = t.data.data.end_time;
  855 + var endTime1 = t.data.data.start_time;
  856 + if (endTime1 > newTime) {
  857 + ee.setData({
  858 + prom_time_text: '距秒杀开始还有'
  859 + })
  860 + // ee.countDown(endTime1, 0);
  861 + } else {
  862 + if (endTime2 > newTime) {
  863 + ee.setData({
  864 + prom_time_text: '距秒杀结束还有',
  865 + prom_st: 1
  866 + })
  867 + // ee.countDown(endTime2);
  868 + }
  869 + }
  870 +
  871 + //如果是进行中的话
  872 + if (endTime1 < newTime) {
  873 + //-- 获取秒杀活动的多少规格 --
  874 + ee.get_more_flahs(function (list) {
  875 + if (list && list.length > 1) {
  876 +
  877 + var n_item = list[0];
  878 + var ind = list.findIndex(function (ele) {
  879 + return ele.goods_id == ee.data.data.goods_id;
  880 + })
  881 + if (ind < 0) return false;
  882 + if (ind > 0) {
  883 + n_item = JSON.parse(JSON.stringify(list[ind]));
  884 + list.splice(ind, 1);
  885 + list.unshift(n_item);
  886 + }
  887 +
  888 + ee.data.sele_g.viplimited = n_item.viplimited;
  889 + ee.data.data.viplimited = n_item.viplimited;
  890 +
  891 + ee.data.sele_g.prom_type = 1;
  892 + ee.data.sele_g.prom_id = n_item.act_id;
  893 +
  894 + var gb = 1;
  895 + //-- 显示多规格 --
  896 + for (let i in list) {
  897 + let item = list[i];
  898 + var gg = "";
  899 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  900 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  901 +
  902 + if (item.goods_spec != "" && item.goods_color != "") {
  903 + gg = item.goods_spec + "/" + item.goods_color;
  904 + } else if (item.goods_spec != "" || item.goods_color != "") {
  905 + gg = item.goods_spec + item.goods_color;
  906 + } else {
  907 + gg = "规格" + gb;
  908 + gb++;
  909 + }
  910 + item.gg = gg;
  911 + item.prom_id = item.prom_id;
  912 + item.prom_type = 1;
  913 + }
  914 +
  915 + ee.setData({
  916 + sku_g: list,
  917 + is_more_flash: 1
  918 + });
  919 +
  920 + }
  921 + })
  922 + }
  923 +
  924 + }
  925 + });
  926 + }
  927 + })
  928 + }
  929 +
  930 + if (prom_type == 4) {
  931 + //th.setData({is_integral_normal:1});
  932 + var rdata = {
  933 + store_id: o.stoid,
  934 + stype: 1,
  935 + stypeup: 1,
  936 + goods_id: gid,
  937 + timetype: 2,
  938 + user_id: getApp().globalData.user_id,
  939 + }
  940 +
  941 + var integrals = 0;
  942 + var get_datas = {
  943 + user_id: getApp().globalData.user_id,
  944 + store_id: o.stoid,
  945 + };
  946 + await getApp().request.promiseGet("/api/weshop/users/getAllPoints", {
  947 + data: get_datas
  948 + }).then(res => {
  949 + if (res.data.code == 0) {
  950 + integrals = res.data.data?.Integral ? res.data.data?.Integral : 0;
  951 + }
  952 + })
  953 +
  954 + //获取一下积分活动
  955 + await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList", {
  956 + data: rdata
  957 + }).then(res => {
  958 + //调用接口有数据的时候
  959 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  960 + var inte_data = res.data.data.pageData[0];
  961 + var can_integral = (parseFloat(integrals) >= parseFloat(inte_data.integral));
  962 + let times = new Date().getTime()
  963 + inte_data.show_time_off = ""
  964 + let atimes = inte_data.start_time * 1000
  965 +
  966 + if (atimes > times) {
  967 + inte_data.show_time_off = ut.formatTime(inte_data.start_time)
  968 + }
  969 +
  970 + ee.setData({
  971 + prom_price: parseFloat(inte_data.addmoney),
  972 + prom_integral: parseFloat(inte_data.integral),
  973 + prom_type: 4,
  974 + prom_id: inte_data.id,
  975 + prom_buy_limit: inte_data.limitvipqty,
  976 + prom_act: inte_data,
  977 + isshow: 1,
  978 + can_integral: can_integral,
  979 + is_shopbuy: parseInt(inte_data.is_shopbuy ? inte_data.is_shopbuy : 0)
  980 + });
  981 + ee.get_sto();
  982 +
  983 + } else {
  984 + ee.get_normal(gid);
  985 + return false;
  986 + }
  987 + })
  988 +
  989 + }
  990 +
  991 + //---判断拼单----
  992 + if (prom_type == 6) {
  993 +
  994 + th.setData({
  995 + user_order_pt_state: 0
  996 + });
  997 +
  998 + //-------判断活动是否抢光---------
  999 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  1000 + 1: 1
  1001 + }).then(res => {
  1002 + var em = res;
  1003 + var flag = null;
  1004 + if (em.data.code == 0) {
  1005 + if (em.data.data <= 0) ee.setData({
  1006 + prom_r_null: 1
  1007 + });
  1008 + //-- 拿取价格并且判断时间,同时判断会员身份 --
  1009 + getApp().request.get("/api/weshop/teamlist/getUser/" + os.stoid + "/" + prom_id + "/" + getApp().globalData.user_id, {
  1010 + success: async function (t) {
  1011 + if (t.data.code != 0) {
  1012 + ee.get_normal(gid);
  1013 + return false;
  1014 + }
  1015 + //----已经结束-----
  1016 + if (t.data.data.is_end == 1) {
  1017 + ee.get_normal(gid);
  1018 + return false;
  1019 + }
  1020 + //----已经过期-----
  1021 + var now = ut.gettimestamp();
  1022 + if (t.data.data.end_time < now) {
  1023 + ee.get_normal(gid);
  1024 + return false;
  1025 + }
  1026 +
  1027 + /*-- 还没有开始预热的也不显示 --*/
  1028 + if (t.data.data.show_time > now) {
  1029 + ee.get_normal(gid);
  1030 + return false;
  1031 + }
  1032 +
  1033 + /*-- 判断拼单是否启用 --*/
  1034 + if (!t.data.data.is_show) {
  1035 + console.log('没启用');
  1036 + wx.setNavigationBarTitle({
  1037 + title: '系统提示',
  1038 + });
  1039 + wx.showToast({
  1040 + title: '此商品暂时没有拼单活动',
  1041 + icon: 'none',
  1042 + success() {
  1043 + setTimeout(() => {
  1044 + wx.navigateBack()
  1045 + }, 2000)
  1046 + }
  1047 + });
  1048 + return false
  1049 + }
  1050 +
  1051 +
  1052 + //-------查看自己是不是有买过该团的商品,并还为支付,或者在进行中-------
  1053 + await getApp().request.promiseGet("/api/weshop/order/page", {
  1054 + data: {
  1055 + pt_prom_id: prom_id,
  1056 + user_id: oo.user_id,
  1057 + store_id: os.stoid,
  1058 + pageSize: 1,
  1059 + page: 1
  1060 + }
  1061 + }).then(e => {
  1062 + if (e.data.code == 0 && e.data.data.pageData.length > 0) {
  1063 + var odr = e.data.data.pageData[0];
  1064 + th.data.buy_order = odr;
  1065 + if (odr.pt_status == 0 && odr.order_status == 1) {
  1066 + th.setData({
  1067 + user_order_pt_state: 1
  1068 + });
  1069 + }
  1070 + if (odr.pt_status == 1 && odr.order_status == 1) {
  1071 + if (odr.is_zsorder == 4) {
  1072 + getApp().request.promiseGet("/api/weshop/teamgroup/page/", {
  1073 + data: {
  1074 + store_id: os.stoid,
  1075 + team_id: odr.pt_prom_id,
  1076 + listno: odr.pt_listno
  1077 + }
  1078 + }).then(res => {
  1079 + var now = ut.gettimestamp();
  1080 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  1081 + var tgr = res.data.data.pageData[0];
  1082 + //如果团的时间已经到了
  1083 + if (now >= tgr.kt_end_time) {
  1084 + th.update_jiti(tgr.id);
  1085 + } else {
  1086 + th.setData({
  1087 + user_order_pt_state: 2
  1088 + });
  1089 + }
  1090 + }
  1091 + })
  1092 +
  1093 + } else {
  1094 + th.setData({
  1095 + user_order_pt_state: 2
  1096 + });
  1097 + }
  1098 + }
  1099 +
  1100 + if (odr.pt_status == 2 && odr.is_zsorder == 4) {
  1101 + th.setData({
  1102 + user_order_pt_state: 3,
  1103 + });
  1104 + th.data.wk_order_id = odr.order_id;
  1105 + }
  1106 + }
  1107 + })
  1108 +
  1109 + //----------查看阶梯团------------
  1110 + if (t.data.data.ct_rylist != "null" && t.data.data.ct_rylist != "" && t.data.data.ct_rylist != null && t.data.data.ct_rylist != undefined) {
  1111 + t.data.data.ct_rylist = JSON.parse(t.data.data.ct_rylist);
  1112 + var max_num = 0;
  1113 + t.data.data.ct_rylist.forEach(function (val, ind) {
  1114 + if (parseInt(val.rynum) > max_num) max_num = parseInt(val.rynum);
  1115 + })
  1116 + t.data.data.max_ct_num = max_num;
  1117 + }
  1118 +
  1119 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  1120 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  1121 + ee.setData({
  1122 + prom_price: t.data.data.price,
  1123 + prom_type: 6,
  1124 + prom_id: prom_id,
  1125 + prom_buy_limit: t.data.data.buy_limit,
  1126 + prom_act: t.data.data,
  1127 + prom_end_time: prom_end_time,
  1128 + prom_start_time: prom_start_time,
  1129 + isshow: 1,
  1130 + });
  1131 +
  1132 + ee.get_sto();
  1133 +
  1134 + var newTime = now;
  1135 + var endTime2 = t.data.data.end_time;
  1136 + var endTime1 = t.data.data.start_time;
  1137 +
  1138 + if (endTime1 > newTime) {
  1139 + ee.setData({
  1140 + prom_time_text: '距拼单开始还剩:'
  1141 + })
  1142 + // ee.countDown(endTime1, 0);
  1143 + } else {
  1144 + if (endTime2 > newTime) {
  1145 + ee.setData({
  1146 + prom_time_text: '距拼单结束还剩:',
  1147 + prom_st: 1
  1148 + })
  1149 + // ee.countDown(endTime2);
  1150 + }
  1151 + }
  1152 + //-------查看有多少人在开这个团-------
  1153 + // th.get_team_group(prom_id);
  1154 + }
  1155 + });
  1156 + }
  1157 + })
  1158 + }
  1159 + },
  1160 +
  1161 +
  1162 + //--------服务卡检查是否活动,活动是否开始,或者是否结束-------
  1163 + async ser_check_prom(gid, prom_type, prom_id) {
  1164 + var ee = this, th = ee;
  1165 + var user_id = getApp().globalData.user_id;
  1166 + if (!user_id) user_id = 0;
  1167 +
  1168 + if (prom_type == 1 && prom_id == 0) {
  1169 + this.setData({
  1170 + prom_type: 0
  1171 + });
  1172 +
  1173 + //获取门店
  1174 + this.get_sto();
  1175 + // this.get_sku(o.stoid, this.data.data, gid);
  1176 + this.check_has_flash();
  1177 + this.data.is_normal = 1;
  1178 + // this.check_is_youhui(gid, 1);
  1179 + return false;
  1180 + }
  1181 +
  1182 + //---判断秒杀----
  1183 + if (prom_type == 1 && prom_id > 0) {
  1184 + //-------判断活动是否抢光---------
  1185 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  1186 + 1: 1
  1187 + }).then(res => {
  1188 + var em = res;
  1189 + if (em.data.code == 0) {
  1190 +
  1191 + if (em.data.data <= 0) {
  1192 + th.setData({
  1193 + prom_r_null: 1,
  1194 + goodsInputNum: res.data.data,
  1195 + });
  1196 +
  1197 + // th.setData({goodsInputNum: redis_num})
  1198 + };
  1199 + //拿取价格并且判断时间--
  1200 + getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {
  1201 + success: function (t) {
  1202 + let sele_g_new = t.data.data
  1203 + let sele_g = th.data.sele_g
  1204 + if (sele_g_new && sele_g_new.original_img && !sele_g.original_img) {
  1205 + sele_g.original_img=sele_g_new.original_img
  1206 + }
  1207 + th.setData({
  1208 + sele_g
  1209 + });
  1210 +
  1211 + if (t.data.code != 0) {
  1212 + ee.get_normal(gid);
  1213 + return false;
  1214 + }
  1215 + //----已经结束-----
  1216 + if (t.data.data.is_end == 1) {
  1217 + ee.get_normal(gid);
  1218 + return false;
  1219 + }
  1220 + //----已经过期-----
  1221 + var now = ut.gettimestamp();
  1222 + if (t.data.data.end_time < now) {
  1223 + ee.get_normal(gid);
  1224 + return false;
  1225 + }
  1226 + /*-- 还没有开始预热的也不显示 --*/
  1227 + if (t.data.data.show_time > now) {
  1228 + ee.get_normal(gid);
  1229 + return false;
  1230 + }
  1231 +
  1232 + var t_gd = ee.data.data;
  1233 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  1234 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  1235 +
  1236 + ee.setData({
  1237 + prom_price: t.data.data.user_price,
  1238 + prom_type: 1,
  1239 + prom_id: prom_id,
  1240 + prom_buy_limit: t.data.data.buy_limit,
  1241 + prom_act: t.data.data,
  1242 + prom_end_time: prom_end_time,
  1243 + prom_start_time: prom_start_time,
  1244 + });
  1245 +
  1246 + ee.get_sto();
  1247 + var newTime = ut.gettimestamp();
  1248 + var endTime2 = t.data.data.end_time;
  1249 + var endTime1 = t.data.data.start_time;
  1250 + if (endTime1 > newTime) {
  1251 + ee.setData({
  1252 + prom_time_text: '距秒杀开始还有',
  1253 + prom_st: 0,
  1254 + })
  1255 + // ee.countDown(endTime1, 0);
  1256 + } else {
  1257 + if (endTime2 > newTime) {
  1258 + ee.setData({
  1259 + prom_time_text: '距秒杀结束还有',
  1260 + prom_st: 1
  1261 + })
  1262 + // ee.countDown(endTime2);
  1263 + }
  1264 + }
  1265 +
  1266 + //如果是进行中的话
  1267 + if (endTime1 < newTime) {
  1268 + //-- 获取秒杀活动的多少规格 --
  1269 + ee.get_more_flash(function (list) {
  1270 + if (list && list.length > 1) {
  1271 +
  1272 + var n_item = list[0];
  1273 + var ind = list.findIndex(function (ele) {
  1274 + return ele.goods_id == ee.data.data.goods_id;
  1275 + })
  1276 + if (ind < 0) return false;
  1277 + if (ind > 0) {
  1278 + n_item = JSON.parse(JSON.stringify(list[ind]));
  1279 + list.splice(ind, 1);
  1280 + list.unshift(n_item);
  1281 + }
  1282 +
  1283 + ee.data.sele_g.viplimited = n_item.viplimited;
  1284 + ee.data.data.viplimited = n_item.viplimited;
  1285 +
  1286 + var gb = 1;
  1287 + //-- 显示多规格 --
  1288 + for (let i in list) {
  1289 + let item = list[i];
  1290 + var gg = "";
  1291 + if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  1292 + if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  1293 +
  1294 + if (item.goods_spec != "" && item.goods_color != "") {
  1295 + gg = item.goods_spec + "/" + item.goods_color;
  1296 + } else if (item.goods_spec != "" || item.goods_color != "") {
  1297 + gg = item.goods_spec + item.goods_color;
  1298 + } else {
  1299 + gg = "规格" + gb;
  1300 + gb++;
  1301 + }
  1302 + item.gg = gg;
  1303 + item.prom_id = item.prom_id;
  1304 + item.prom_type = 1;
  1305 + }
  1306 +
  1307 + ee.setData({
  1308 + sku_g: list,
  1309 + });
  1310 +
  1311 + }
  1312 + })
  1313 + }
  1314 +
  1315 + }
  1316 + });
  1317 + }
  1318 + })
  1319 + }
  1320 +
  1321 + },
  1322 + //获取更多秒杀
  1323 + get_more_flash: async function (func) {
  1324 +
  1325 + var f_more = false;
  1326 + var user_id = getApp().globalData.user_id;
  1327 + if (!user_id) user_id = 0;
  1328 +
  1329 + var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.gid + "&user_id=" + user_id;
  1330 + //获取秒杀的多规格
  1331 + await getApp().request.promiseGet(url, {}).then(res => {
  1332 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  1333 + f_more = res.data.data;
  1334 + }
  1335 + })
  1336 + if (!f_more) {
  1337 + func(false);
  1338 + return false;
  1339 + }
  1340 + //-- 秒杀的价格要更新 --
  1341 + for (let i in f_more) {
  1342 +
  1343 + let item = f_more[i];
  1344 + f_more[i].prom_id = item.act_id;
  1345 + f_more[i].prom_type = 1;
  1346 + if (item.goods_id == this.data.sele_g.goods_id) {
  1347 + continue;
  1348 + }
  1349 + var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id;
  1350 + await getApp().request.promiseGet(url, {}).then(rs => {
  1351 + if (rs.data.code == 0) {
  1352 + f_more[i].price = rs.data.data.user_price;
  1353 +
  1354 + }
  1355 + })
  1356 + }
  1357 + func(f_more);
  1358 +
  1359 + },
  1360 + //---------拿出门店分类和门店------------
  1361 + get_sto(e, func, item) {
  1362 +
  1363 + var th = this,
  1364 + that = this;
  1365 + var is_normal = e;
  1366 +
  1367 + if (e == 1) {
  1368 + th.setData({
  1369 + is_normal: 1
  1370 + })
  1371 + } else {
  1372 + th.setData({
  1373 + is_normal: 0
  1374 + })
  1375 + }
  1376 +
  1377 + timer_get = setInterval(function () {
  1378 +
  1379 + if (th.data.is_get_local_ok == 0) return false;
  1380 + if (!th.data.fir_def_store) return false;
  1381 +
  1382 + var dd = null,
  1383 + i = getApp().request;
  1384 + if (!th.data.sele_g) return false;
  1385 +
  1386 + var g_distr_type = th.data.sele_g.distr_type;
  1387 + if ( g_distr_type && g_distr_type != 0) {
  1388 + dd = {
  1389 + store_id: o.stoid,
  1390 + distr_type: g_distr_type,
  1391 + isstop: 0,
  1392 + is_pos: 1,
  1393 + pageSize: 2000
  1394 + }
  1395 + } else {
  1396 + dd = {
  1397 + store_id: o.stoid,
  1398 + isstop: 0,
  1399 + is_pos: 1,
  1400 + pageSize: 2000
  1401 + }
  1402 + }
  1403 + //如果有距离的话
  1404 + if (th.data.lat != null) {
  1405 + dd.lat = th.data.lat;
  1406 + dd.lon = th.data.lon;
  1407 + }
  1408 +
  1409 + clearInterval(timer_get);
  1410 +
  1411 + //如果会员是有默认的门店话
  1412 + if (!th.data.def_pick_store && th.data.fir_def_store && Object.keys(th.data.fir_def_store).length > 0) {
  1413 + th.setData({
  1414 + def_pick_store: th.data.fir_def_store
  1415 + });
  1416 + }
  1417 + wx.showLoading({
  1418 + title: '加载中.'
  1419 + });
  1420 + //----------获取门店----------------
  1421 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  1422 + data: dd,
  1423 + }).then(res => {
  1424 + var e = res;
  1425 +
  1426 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
  1427 +
  1428 + var pickup_ids = th.data.sele_g.pickup_ids;
  1429 + //不是单独购买的时候,要清空商品pickup_ids
  1430 +
  1431 + var py = parseFloat(th.data.prom_type + '');
  1432 + if (!is_normal && py > 0 && [3, 5, 7, 10].indexOf(py) < 0) {
  1433 + pickup_ids = null;
  1434 + }
  1435 + //-- 把秒杀的指定对象带入 --
  1436 + if (item) {
  1437 + if (item.is_pickup && item.pick_up_lists) {
  1438 + pickup_ids = item.pick_up_lists
  1439 + } else {
  1440 + pickup_ids = null;
  1441 + }
  1442 +
  1443 + } else if (!is_normal && [1, 2, 6].indexOf(py) > -1 && th.data.prom_act.pick_up_lists) { //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店
  1444 + pickup_ids = th.data.prom_act.pick_up_lists
  1445 + }
  1446 +
  1447 + //-- 如果有指定门店的时候 --
  1448 + if (pickup_ids) {
  1449 +
  1450 + var ok_arr = [];
  1451 + for (let i in e.data.data.pageData) {
  1452 + let ite = e.data.data.pageData[i];
  1453 + //-- 查找一下门店有没有在 --
  1454 + var idx = pickup_ids.findIndex(function (e) {
  1455 + return e.pickup_id == ite.pickup_id;
  1456 + })
  1457 + if (idx > -1) {
  1458 + ok_arr.push(ite)
  1459 + }
  1460 + }
  1461 +
  1462 + //判断会员的默认的门店是不是匹配指定的门店
  1463 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1464 + //-- 查找一下门店有没有在 --
  1465 + var idx1 = pickup_ids.findIndex(function (e) {
  1466 + return e.pickup_id == th.data.def_pick_store.pickup_id;
  1467 + })
  1468 +
  1469 + if (idx1 < 0) {
  1470 + //如果是秒杀的指定门店,就要设置秒杀的
  1471 + if (!is_normal && [1, 2, 6].indexOf(py) > -1) {
  1472 + th.data.def_pick_store.is_no_dis_act = 1;
  1473 + } else {
  1474 + th.data.def_pick_store.is_no_dis_nor = 1;
  1475 + }
  1476 + } else {
  1477 + th.data.def_pick_store.is_no_dis_nor = 0;
  1478 + th.data.def_pick_store.is_no_dis_act = 0;
  1479 + }
  1480 +
  1481 + that.setData({
  1482 + def_pick_store: th.data.def_pick_store
  1483 + })
  1484 +
  1485 + }
  1486 + e.data.data.pageData = ok_arr; //数组重新赋值
  1487 + e.data.data.total = ok_arr.length; //数组的长度
  1488 + }
  1489 + else {
  1490 + //-- 多规格指定门店优化 --
  1491 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1492 +
  1493 + th.data.def_pick_store.is_no_dis_nor = 0;
  1494 + th.data.def_pick_store.is_no_dis_act = 0;
  1495 + that.setData({
  1496 + def_pick_store: th.data.def_pick_store
  1497 + })
  1498 + }
  1499 + }
  1500 +
  1501 + //过滤后门店数量还是要大于0
  1502 + if (e.data.data.pageData.length > 0) {
  1503 +
  1504 + var his_cate_num = 0;
  1505 + for (let i in e.data.data.pageData) {
  1506 + let item = e.data.data.pageData[i];
  1507 + if (item.category_id > 0) {
  1508 + his_cate_num = 1;
  1509 + }
  1510 + if (getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) {
  1511 + e.data.data.pageData[i].CanOutQty = 100000;
  1512 + }
  1513 + }
  1514 +
  1515 + e.his_cate_num = his_cate_num;
  1516 +
  1517 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}' &&
  1518 + getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) {
  1519 + th.setData({
  1520 + 'def_pick_store.CanOutQty': 100000
  1521 + })
  1522 + }
  1523 +
  1524 + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
  1525 + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  1526 + th.setData({
  1527 + def_pick_store: e.data.data.pageData[0],
  1528 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1529 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1530 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1531 + });
  1532 + th.data.fir_def_store = e.data.data.pageData[0];
  1533 + }
  1534 +
  1535 + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 --
  1536 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1537 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  1538 + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
  1539 + e.data.data.pageData.splice(k, 1); //删除
  1540 + break;
  1541 + }
  1542 + }
  1543 + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
  1544 + }
  1545 +
  1546 +
  1547 + th.setData({
  1548 + all_pick_list: e.data.data.pageData
  1549 + });
  1550 +
  1551 + //--获取线下库存,而且不是新的门店规则, 同时是普通购买的时候,或者同时不能是活动,秒杀,拼团,积分购--
  1552 + if (!getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2 && !th.data.is_newsales_rules
  1553 + && !th.data.sele_g.whsle_id && ([1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) == -1 || is_normal == 1)) {
  1554 + setTimeout(function () {
  1555 + th.deal_pickup_dline(e);
  1556 + }, 800)
  1557 + } else {
  1558 + setTimeout(function () {
  1559 + th.deal_pickup(e); //--普通门店排版--
  1560 + }, 800)
  1561 + }
  1562 + if (func) func();
  1563 + } else {
  1564 +
  1565 + if (func) func();
  1566 + th.setData({ sp_seleing: 0 })
  1567 + wx.hideLoading();
  1568 + }
  1569 + } else {
  1570 + if (func) func();
  1571 + th.setData({ sp_seleing: 0 })
  1572 + wx.hideLoading();
  1573 + }
  1574 + }, err => {
  1575 + ut.m_toast('网络繁忙,请稍后重试');
  1576 + if (func) func();
  1577 + th.setData({ sp_seleing: 0 })
  1578 + wx.hideLoading();
  1579 + })
  1580 + }, 200)
  1581 +
  1582 + },
  1583 +
  1584 + //------------处理门店---------------
  1585 + deal_pickup(e) {
  1586 +
  1587 + var th = this;
  1588 + if (!th.data.sele_g) {
  1589 + wx.hideLoading();
  1590 + return false
  1591 + }
  1592 +
  1593 + var g_distr_type = th.data.sele_g.distr_type;
  1594 + wx.hideLoading()
  1595 +
  1596 +
  1597 + /*--- 判断初始的用户的默认门店要不要弄进去 ---*/
  1598 + var fid = -1;
  1599 + if (th.data.fir_def_store) {
  1600 + var fid = e.data.data.pageData.findIndex((e) => {
  1601 + return e.pickup_id == th.data.fir_def_store.pickup_id;
  1602 + })
  1603 + }
  1604 + //--如果找到默认门店,同时也应该判断配送方式对不对--
  1605 + if (th.data.fir_def_store && th.data.fir_def_store.pickup_id && fid < 0 &&
  1606 + (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
  1607 + th.data.fir_def_store.CanOutQty = 0;
  1608 + //--当选择的门店是客户默认的门店的时候--
  1609 + if (th.data.def_pick_store && th.data.fir_def_store.pickup_id == th.data.def_pick_store.pickup_id) {
  1610 + th.setData({
  1611 + def_pick_store: th.data.fir_def_store
  1612 + });
  1613 + e.data.data.pageData.unshift(th.data.def_pick_store);
  1614 + } else {
  1615 + e.data.data.pageData.splice(1, 0, th.data.fir_def_store);
  1616 + }
  1617 + }
  1618 +
  1619 +
  1620 +
  1621 + //单总量超出10个的时候,同时门店有分类
  1622 + if (e.data.data.total > 10 && e.his_cate_num) {
  1623 + getApp().request.get("/api/weshop/storagecategory/page", {
  1624 + data: {
  1625 + store_id: o.stoid,
  1626 + pageSize: 1000,
  1627 + orderField: "sort",
  1628 + orderType: 'asc',
  1629 + },
  1630 + success: function (ee) {
  1631 + if (ee.data.code == 0) {
  1632 + var check_all_cate = 0;
  1633 + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) {
  1634 + for (let i in ee.data.data.pageData) {
  1635 + let item = ee.data.data.pageData[i];
  1636 + if (item.is_show == 1) {
  1637 + check_all_cate = 1;
  1638 + break
  1639 + }
  1640 + }
  1641 + }
  1642 + if (check_all_cate) {
  1643 + var sto_cate = ee.data.data.pageData;
  1644 + var sto_arr = e.data.data.pageData;
  1645 + var newarr = new Array();
  1646 + var qita = new Array();
  1647 +
  1648 + var is_del_pk = 0;
  1649 + //----要进行门店分组--------
  1650 + for (var i = 0; i < sto_arr.length; i++) {
  1651 + //找一下这个门店有没有在分类数组内
  1652 + var find2 = 0,
  1653 + find2name = "",
  1654 + sort = 0;
  1655 + is_del_pk = 0;
  1656 + for (var m = 0; m < sto_cate.length; m++) {
  1657 + if (sto_arr[i].category_id == sto_cate[m].cat_id) {
  1658 + if (sto_cate[m].is_show != 1) {
  1659 + is_del_pk = 1;
  1660 + sto_arr.splice(i, 1);
  1661 + i--;
  1662 + } else {
  1663 + find2 = sto_cate[m].cat_id;
  1664 + find2name = sto_cate[m].cat_name;
  1665 + sort = sto_cate[m].sort;
  1666 + is_del_pk = 0;
  1667 + }
  1668 + break;
  1669 + }
  1670 + }
  1671 + if (is_del_pk) continue;
  1672 +
  1673 + if (newarr.length > 0) {
  1674 + var find = 0;
  1675 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1676 + if (find2 != 0) {
  1677 + for (var ii = 0; ii < newarr.length; ii++) {
  1678 + if (sto_arr[i].category_id == newarr[ii].cat_id) {
  1679 + newarr[ii].s_arr.push(sto_arr[i]);
  1680 + find = 1;
  1681 + break;
  1682 + }
  1683 + }
  1684 + if (find == 0) {
  1685 + var arr0 = new Array();
  1686 + arr0.push(sto_arr[i]);
  1687 + var item = {
  1688 + cat_id: find2,
  1689 + name: find2name,
  1690 + sort: sort,
  1691 + s_arr: arr0
  1692 + };
  1693 + newarr.push(item);
  1694 + }
  1695 + } else {
  1696 + qita.push(sto_arr[i]);
  1697 + }
  1698 + } else {
  1699 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1700 + if (find2 != 0) {
  1701 + var arr0 = new Array();
  1702 + arr0.push(sto_arr[i]);
  1703 + var item = {
  1704 + cat_id: find2,
  1705 + name: find2name,
  1706 + sort: sort,
  1707 + s_arr: arr0
  1708 + };
  1709 + newarr.push(item);
  1710 + } else {
  1711 + qita.push(sto_arr[i]);
  1712 + }
  1713 + }
  1714 + }
  1715 +
  1716 + var def_arr = new Array();
  1717 + //-- 开始就看10个门店 --
  1718 + for (var k = 0; k < 10; k++) {
  1719 + if (k == sto_arr.length) break;
  1720 + def_arr.push(sto_arr[k]);
  1721 + }
  1722 +
  1723 + th.setData({
  1724 + def_pickpu_list: def_arr,
  1725 + pickpu_list: ee.data.data.pageData
  1726 + });
  1727 +
  1728 +
  1729 + //门店分类要排序下
  1730 + function compare(property) {
  1731 + return function (a, b) {
  1732 + var value1 = a[property];
  1733 + var value2 = b[property];
  1734 + return value1 - value2;
  1735 + }
  1736 + }
  1737 +
  1738 + if (newarr.length > 0)
  1739 + newarr.sort(compare("sort"));
  1740 +
  1741 +
  1742 + //----安排其他的分类-----
  1743 + if (qita.length > 0) {
  1744 + var item = {
  1745 + cat_id: -1,
  1746 + name: "其他",
  1747 + s_arr: qita
  1748 + };
  1749 + newarr.push(item);
  1750 + }
  1751 +
  1752 + var sd = {
  1753 + all_sto: newarr,
  1754 + is_show_sto_cat: 1
  1755 + }
  1756 + if (!sto_arr || sto_arr.length <= 10) {
  1757 + sd.is_show_sto_cat = -1;
  1758 + sd.only_pk = sto_arr;
  1759 + }
  1760 + th.setData(sd);
  1761 +
  1762 + } else {
  1763 + th.setData({
  1764 + is_show_sto_cat: -1,
  1765 + only_pk: e.data.data.pageData
  1766 + });
  1767 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  1768 + if (!th.data.def_pick_store) {
  1769 + th.setData({
  1770 + def_pick_store: e.data.data.pageData[0],
  1771 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1772 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1773 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1774 + })
  1775 + }
  1776 + }
  1777 + } else {
  1778 + th.setData({
  1779 + is_show_sto_cat: -1,
  1780 + only_pk: e.data.data.pageData
  1781 + });
  1782 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  1783 + if (!th.data.def_pick_store) {
  1784 + th.setData({
  1785 + def_pick_store: e.data.data.pageData[0],
  1786 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1787 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1788 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1789 + })
  1790 + }
  1791 +
  1792 + }
  1793 + }
  1794 + });
  1795 + } else {
  1796 +
  1797 + th.setData({
  1798 + is_show_sto_cat: 0,
  1799 + only_pk: e.data.data.pageData
  1800 + });
  1801 + //-----如果没有默认门店,要取第一个门店作为默认店------
  1802 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  1803 + th.setData({
  1804 + def_pick_store: e.data.data.pageData[0],
  1805 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1806 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1807 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1808 + })
  1809 + }
  1810 + }
  1811 + },
  1812 +
  1813 + //------------处理线下门店库存--------
  1814 + deal_pickup_dline(e) {
  1815 + var pkno = [],
  1816 + th = this;
  1817 + if (!th.data.sele_g) {
  1818 + wx.hideLoading();
  1819 + return false;
  1820 + }
  1821 +
  1822 + if (this.data.def_pick_store) {
  1823 + pkno.push(this.data.def_pick_store.pickup_no);
  1824 + }
  1825 + for (var i in e.data.data.pageData) {
  1826 + var item = e.data.data.pageData[i];
  1827 + if (pkno.indexOf(item.pickup_no) < 0)
  1828 + pkno.push(item.pickup_no);
  1829 + }
  1830 + pkno.sort();
  1831 + var pkno_str = pkno.join(",");
  1832 + var o_plist = e.data.data.pageData;
  1833 + var new_list = [];
  1834 + var is_find_def_store = 0;
  1835 +
  1836 +
  1837 + var g_distr_type = th.data.sele_g.distr_type;
  1838 + var lock = [];
  1839 +
  1840 + var lock_rq = {
  1841 + store_id: os.stoid,
  1842 + wareId: th.data.sele_g.goods_id,
  1843 + pageSize: 1000
  1844 + };
  1845 +
  1846 + if (th.data.sales_rules == 3) {
  1847 + lock_rq.appoint_pick_keyid = th.data.appoint_pick_keyid;
  1848 + }
  1849 +
  1850 + //先读取门店的lock,采用链式写法,少用await
  1851 + getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
  1852 + data: lock_rq
  1853 + }).then(res => {
  1854 + if (res.data.code == 0 && res.data.data.total > 0) {
  1855 + lock = res.data.data.pageData
  1856 + }
  1857 + var sto_rq = {
  1858 + wareIds: encodeURIComponent(th.data.sele_g.erpwareid),
  1859 + storeId: os.stoid,
  1860 + pageSize: 2000
  1861 + }
  1862 +
  1863 + if (th.data.sales_rules == 3) {
  1864 + sto_rq.storageIds = th.data.appoint_pick_keyid;
  1865 + } else {
  1866 + sto_rq.storageNos = pkno_str;
  1867 + }
  1868 +
  1869 +
  1870 + //---通过接口获取门店的线下库存信息--
  1871 + return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
  1872 + data: sto_rq
  1873 + })
  1874 + }).then(res => {
  1875 +
  1876 + wx.hideLoading();
  1877 + if (res.data.code == 0) {
  1878 +
  1879 + if (res.data.data.pageData && res.data.data.pageData.length > 0) {
  1880 +
  1881 + var def_pick_store = th.data.def_pick_store;
  1882 + var plist = res.data.data.pageData;
  1883 +
  1884 + if (th.data.sales_rules == 3) {
  1885 + var lock_num = 0;
  1886 + var Qty = 0;
  1887 + //-- 计算锁住的库存 --
  1888 + for (var i in lock) lock_num += lock[i].outQty;
  1889 + Qty = plist[0].CanOutQty - lock_num;
  1890 +
  1891 + if (Qty > 0) {
  1892 + for (var kk in o_plist) {
  1893 + o_plist[kk].CanOutQty = Qty;
  1894 + new_list.push(o_plist[kk]);
  1895 + }
  1896 + if (th.data.fir_def_store &&
  1897 + (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))) {
  1898 + th.data.fir_def_store.Qty = Qty;
  1899 + if (def_pick_store && def_pick_store.pickup_id == th.data.fir_def_store.pickup_id)
  1900 + th.setData({
  1901 + def_pick_store: th.data.fir_def_store
  1902 + })
  1903 + is_find_def_store = 1;
  1904 + }
  1905 +
  1906 + if (def_pick_store) {
  1907 + //-- 如果库存为0就要重新赋值 --
  1908 + def_pick_store.CanOutQty = Qty;
  1909 + th.setData({
  1910 + def_pick_store
  1911 + })
  1912 + }
  1913 +
  1914 +
  1915 + } else {
  1916 + th.setData({
  1917 + all_sto: null,
  1918 + only_pk: null,
  1919 + def_pickpu_list: null
  1920 + });
  1921 + return false;
  1922 + }
  1923 +
  1924 + } else {
  1925 +
  1926 +
  1927 + //以原来的数组为外循环,保证距离的顺序
  1928 + for (var kk in o_plist) {
  1929 + for (var ii in plist) {
  1930 + //线下的门店小心
  1931 + var n_item = plist[ii];
  1932 + if (n_item.StorageNo == o_plist[kk].pickup_no) {
  1933 +
  1934 + //拿到锁库的数量
  1935 + var lock_num = th.find_lock_num(o_plist[kk].pickup_id, lock);
  1936 + //可出库数大于预出库库存的数量,可以判断为有库存
  1937 + if (n_item.CanOutQty > lock_num) {
  1938 + o_plist[kk].CanOutQty = n_item.CanOutQty - lock_num;
  1939 + new_list.push(o_plist[kk]);
  1940 +
  1941 + var ck_store = th.data.fir_def_store;
  1942 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1943 + ck_store = th.data.def_pick_store;
  1944 + }
  1945 +
  1946 +
  1947 + //--如果找到默认门店,同时也应该判断配送方式对不对--
  1948 + 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)) {
  1949 + th.data.fir_def_store.CanOutQty = n_item.CanOutQty - lock_num;
  1950 + if (def_pick_store && def_pick_store.pickup_id == th.data.fir_def_store.pickup_id)
  1951 + th.setData({
  1952 + def_pick_store: th.data.fir_def_store
  1953 + })
  1954 + is_find_def_store = 1;
  1955 + }
  1956 +
  1957 + //-- 如果库存为0就要重新赋值 --
  1958 + if (def_pick_store && n_item.StorageNo == def_pick_store.pickup_no) {
  1959 + def_pick_store.CanOutQty = o_plist[kk].CanOutQty;
  1960 + th.setData({ def_pick_store })
  1961 + }
  1962 +
  1963 + }
  1964 + break;
  1965 + }
  1966 + }
  1967 + }
  1968 +
  1969 + }
  1970 +
  1971 +
  1972 +
  1973 + //数据组装下
  1974 + var em = {};
  1975 + em.data = {};
  1976 + em.data.data = {};
  1977 + em.data.data.total = new_list.length;
  1978 + em.data.data.pageData = new_list;
  1979 + em.his_cate_num = e.his_cate_num;
  1980 +
  1981 +
  1982 + var fid = -1;
  1983 + if (th.data.fir_def_store) {
  1984 + var fid = em.data.data.pageData.findIndex((e) => {
  1985 + return e.pickup_id == th.data.fir_def_store.pickup_id;
  1986 + })
  1987 + }
  1988 + //--如果找到默认门店,同时也应该判断配送方式对不对--
  1989 + if (th.data.fir_def_store && th.data.fir_def_store.pickup_id && fid < 0 &&
  1990 + (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
  1991 + th.data.fir_def_store.CanOutQty = 0;
  1992 + //--当选择的门店是客户默认的门店的时候--
  1993 + if (th.data.def_pick_store && th.data.fir_def_store.pickup_id == th.data.def_pick_store.pickup_id) {
  1994 + th.setData({
  1995 + def_pick_store: th.data.fir_def_store
  1996 + });
  1997 + em.data.data.pageData.unshift(th.data.def_pick_store);
  1998 + } else {
  1999 + em.data.data.pageData.splice(1, 0, th.data.fir_def_store);
  2000 + }
  2001 + }
  2002 +
  2003 + for (let j = 0; j < em.data.data.pageData.length; j++) {
  2004 + var iu = em.data.data.pageData[j];
  2005 + if (iu.CanOutQty <= 0) iu.is_no_qyt = 1;
  2006 +
  2007 + }
  2008 +
  2009 + //---把数组组装进去---
  2010 + th.deal_pickup(em);
  2011 +
  2012 + } else {
  2013 +
  2014 + th.setData({
  2015 + all_sto: null,
  2016 + only_pk: null,
  2017 + def_pickpu_list: null
  2018 + })
  2019 + }
  2020 +
  2021 + } else {
  2022 +
  2023 + th.setData({
  2024 + all_sto: null,
  2025 + only_pk: null,
  2026 + def_pickpu_list: null
  2027 + })
  2028 + }
  2029 + })
  2030 + },
  2031 +
  2032 + //------------加入购物车--------------
  2033 + addCart: function (t) {
  2034 + //如果是切换规格的时候,让商品不能提交到确认订单的页面,否则活动会出错,金额也不对
  2035 + if (this.data.sp_seleing) {
  2036 + return false;
  2037 + }
  2038 +
  2039 + var th = this;
  2040 + var ind = t.currentTarget.dataset.openSpecModal_ind;
  2041 + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
  2042 + th.setData({
  2043 + open_ind_store: ind
  2044 + });
  2045 +
  2046 +
  2047 + if ("add" == t.currentTarget.dataset.action && getApp().is_sp_hao()) {
  2048 + wx.showToast({
  2049 + title: "视频号商品不允许加入购物车",
  2050 + icon: 'none',
  2051 + duration: 2000
  2052 + });
  2053 + return false;
  2054 + }
  2055 +
  2056 + if (th.data.adding) return false;
  2057 + th.data.adding = 1;
  2058 +
  2059 + wx.showLoading({
  2060 + mask: true
  2061 + })
  2062 +
  2063 +
  2064 +
  2065 + //如果是秒杀的话,要看redis够不够
  2066 + if (this.data.prom_type == 1 || this.data.prom_type == 2) {
  2067 +
  2068 + if (this.data.openSpecModal_flash_normal) {
  2069 + this.data.is_normal = 1; //是普通购买
  2070 + th.add_cart_func(t);
  2071 + return false;
  2072 + }
  2073 +
  2074 +
  2075 + this.getactLen(function (num) {
  2076 + if (num < th.data.goodsInputNum) {
  2077 + wx.hideLoading();
  2078 + th.data.adding = 0;
  2079 + // getApp().my_warnning("活动库存不足!", 0, th);
  2080 + wx.showToast({
  2081 + title: '活动库存不足!',
  2082 + icon: 'none',
  2083 + });
  2084 + return false;
  2085 + } else {
  2086 + th.add_cart_func(t);
  2087 + }
  2088 + });
  2089 + } else {
  2090 + th.add_cart_func(t);
  2091 + }
  2092 + },
  2093 +
  2094 + //------------加入购物车--------------
  2095 + addCartSer: async function (t) {
  2096 + var th = this;
  2097 + var ind = t.currentTarget.dataset.openSpecModal_ind;
  2098 + var action = t.currentTarget.dataset.action;
  2099 +
  2100 +
  2101 +
  2102 + if (getApp().is_sp_hao() && action == 'add') {
  2103 + wx.showToast({
  2104 + title: "视频号商品不允许加入购物车",
  2105 + icon: 'none',
  2106 + duration: 2000
  2107 + });
  2108 + return false;
  2109 + }
  2110 +
  2111 +
  2112 + if (this.data.goodsInputNum == 0) {
  2113 + getApp().my_warnning('请输入购买数量', 1, th, 450);
  2114 + return false;
  2115 + }
  2116 +
  2117 +
  2118 +
  2119 + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
  2120 +
  2121 + th.setData({
  2122 + open_ind_store: ind
  2123 + });
  2124 +
  2125 + if (!th.data.sto_sele_name) {
  2126 + getApp().my_warnning('请选择门店', 1, th, 450);
  2127 + return false;
  2128 + };
  2129 +
  2130 + // 库存
  2131 + var redisNums = 0;
  2132 + // 限购数
  2133 + var limitNum = 0;
  2134 + // 已购买数量
  2135 + var boughtNum = 0;
  2136 +
  2137 + var is_ok = 1;
  2138 +
  2139 + // 秒杀活动
  2140 + if (this.data.prom_type == 1) {
  2141 + // 如果是秒杀活动下的单独购买,is_normal为1
  2142 + if (this.data.openSpecModal_flash_normal) this.data.is_normal = 1;
  2143 +
  2144 + if (!this.data.is_normal) {// 秒杀购买
  2145 +
  2146 + // 获取redis当前可以购买的数量
  2147 + // 如果数量为0,设置和显示已抢光
  2148 + // 否则,进一步判断是否超出限购或超出库存
  2149 + await this.getactLenser().then(async function (res) {
  2150 + redisNums = res;
  2151 + let curNum = th.data.goodsInputNum;
  2152 + // res: redis可购买数量
  2153 + console.log('当前可以购买的数量:', res);
  2154 + if (res <= 0) {
  2155 + // 可购买数量<=0, 设置和显示已抢光
  2156 + th.setData({
  2157 + prom_r_null: 1,
  2158 + });
  2159 + // wx.showModal({
  2160 + // title: '超出活动库存',
  2161 + // });
  2162 + getApp().my_warnning('超出活动库存', 0, self);
  2163 + is_ok = 0;
  2164 + return false;
  2165 + } else {
  2166 + // 可购买数量>0
  2167 + // 计算自己还可以购买的数量
  2168 + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b
  2169 + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存
  2170 + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
  2171 + let actInfo = th.data.sele_g;
  2172 + await th.get_buy_num2().then(function (data) {
  2173 + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a
  2174 + let promcardbuynum = data.data.data.promcardbuynum;
  2175 + let buyedNum = promcardbuynum; // 自己已经购买的数量b
  2176 + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
  2177 + limitNum = limited;
  2178 + boughtNum = buyedNum;
  2179 +
  2180 + if (canBuyNum <= 0) {
  2181 + canBuyNum = 0;
  2182 + };
  2183 +
  2184 + if (canBuyNum > res) {
  2185 + if (curNum > res) { // t当前增减的数量
  2186 + // wx.showModal({
  2187 + // title: '超出活动库存',
  2188 + // });
  2189 + getApp().my_warnning('超出活动库存', 0, self);
  2190 + th.setData({
  2191 + goodsInputNum: res || 1
  2192 + });
  2193 + is_ok = 0;
  2194 + return false;
  2195 + };
  2196 + };
  2197 +
  2198 + if (canBuyNum <= res) {
  2199 + if (curNum > canBuyNum) {
  2200 + // wx.showModal({
  2201 + // title: '超出限购数量',
  2202 + // });
  2203 + getApp().my_warnning('超出限购数量', 0, self);
  2204 + th.setData({
  2205 + goodsInputNum: canBuyNum || 1,
  2206 + });
  2207 + is_ok = 0;
  2208 + return false;
  2209 + }
  2210 + }
  2211 + })
  2212 +
  2213 + }
  2214 + })
  2215 +
  2216 + }
  2217 + }
  2218 +
  2219 +
  2220 + if (!is_ok) return false;
  2221 +
  2222 +
  2223 +
  2224 + if (action == "buy") {
  2225 + //--------------此时操作的数据------------
  2226 + var newd = {
  2227 + id: th.data.data.id,
  2228 + goods_num: th.data.goodsInputNum,
  2229 + pick_id: th.data.sto_sele_id,
  2230 + keyid: th.data.sto_sele_keyid,
  2231 + };
  2232 + newd['pick_name'] = th.data.sto_sele_name;
  2233 + newd['guide_id'] = getApp().globalData.guide_id;
  2234 + newd['guide_type'] = 0;
  2235 +
  2236 + if (getApp().globalData.groupchat_id) {
  2237 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  2238 + }
  2239 + if (this.data.prom_type && this.data.prom_type == 1) {
  2240 + newd['prom_type'] = this.data.prom_type;
  2241 + newd['prom_id'] = this.data.prom_id;
  2242 + newd['prom_price'] = this.data.prom_price;
  2243 + };
  2244 +
  2245 + if (this.data.prom_type == 1 && this.data.openSpecModal_flash_normal) {
  2246 + newd['prom_type'] = 0;
  2247 + newd['prom_price'] = this.data.data.shop_price;
  2248 + };
  2249 +
  2250 + console.log('newd++++++++', newd);
  2251 + th.buyNow(newd);
  2252 + } else {
  2253 +
  2254 + var newd = {
  2255 + service_id: th.data.data.id,
  2256 + service_sn: th.data.data.service_sn,
  2257 + service_name: th.data.data.goods_name,
  2258 + goods_num: th.data.goodsInputNum,
  2259 + pick_id: th.data.sto_sele_id,
  2260 + user_id: oo.user_id,
  2261 + store_id: os.stoid,
  2262 + money: th.data.data.shop_price,
  2263 + };
  2264 + if (getApp().globalData.guide_id) {
  2265 + newd['guide_id'] = getApp().globalData.guide_id;
  2266 + newd['guide_type'] = 0;
  2267 + };
  2268 + if (getApp().globalData.groupchat_id) {
  2269 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  2270 + }
  2271 + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价
  2272 + if (th.data.prom_type == 1) {
  2273 + newd['prom_type'] = th.data.prom_type;
  2274 + newd['prom_id'] = th.data.prom_id;
  2275 + if (th.data.openSpecModal_flash_normal) {
  2276 + newd['money'] = th.data.data.shop_price;
  2277 + newd['is_pd_normal'] = 1;
  2278 + } else {
  2279 + newd['money'] = th.data.prom_price;
  2280 + };
  2281 + };
  2282 +
  2283 +
  2284 + //----先看会员在购物车中是否加入了该商品-----
  2285 + getApp().request.get("/api/weshop/cartService/page", {
  2286 + data: {
  2287 + store_id: os.stoid,
  2288 + user_id: oo.user_id,
  2289 + service_id: th.data.data.id,
  2290 + },
  2291 + success: function (re) {
  2292 + //-------如果购物车中有相关的数据---------
  2293 + if (re.data.data.total > 0) {
  2294 + var item = null;
  2295 + // 多门店问题
  2296 + var cartGoodsNum = 0;
  2297 + const tmpObj = re.data.data.pageData;
  2298 + for (let i = 0; i < tmpObj.length; i++) {
  2299 + if (th.data.sto_sele_id != tmpObj[i].pick_id) {
  2300 + cartGoodsNum += parseInt(tmpObj[i].goods_num);
  2301 + } else {
  2302 + item = tmpObj[i];
  2303 + }
  2304 + }
  2305 + // 当前门店同类商品还没加入到购物车 但是有其他门店的同类商品
  2306 + if (th.data.prom_type == 1 && !th.data.is_normal && !item) {
  2307 +
  2308 + // 秒杀购物车购买 修正数量
  2309 + var snum = limitNum - boughtNum;
  2310 + if (snum <= 0) {
  2311 + // wx.showModal({
  2312 + // title: '超出限购数量',
  2313 + // });
  2314 + getApp().my_warnning('超出限购数量', 0, self);
  2315 + return false;
  2316 + }
  2317 +
  2318 + var cSnum = snum - cartGoodsNum <= 0 ? 0 : snum - cartGoodsNum;
  2319 + var cRedisNums = redisNums - cartGoodsNum <= 0 ? 0 : redisNums - cartGoodsNum;
  2320 +
  2321 + if (newd['goods_num'] >= redisNums) {
  2322 + if (redisNums > snum) {
  2323 + newd['goods_num'] = cSnum;
  2324 + } else {
  2325 + newd['goods_num'] = cRedisNums;
  2326 + }
  2327 + } else {
  2328 + if (newd['goods_num'] > snum) newd['goods_num'] = cSnum;
  2329 + }
  2330 +
  2331 + if (newd['goods_num'] <= 0) {
  2332 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2333 + th.closeSpecModal();
  2334 + return false;
  2335 + }
  2336 + getApp().request.post("/api/weshop/cartService/save", {
  2337 + data: newd,
  2338 + success: function (t) {
  2339 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2340 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  2341 + th.setData({
  2342 + cartGoodsNum: c_num
  2343 + });
  2344 + th.closeSpecModal();
  2345 + }
  2346 + });
  2347 + return false;
  2348 + }
  2349 +
  2350 + // 以下为当前门店同类商品已经加入到购物车
  2351 + var totalNum = th.data.goodsInputNum + item.goods_num;
  2352 +
  2353 + // 秒杀购物车购买 修正数量
  2354 + if (th.data.prom_type == 1 && !th.data.is_normal) {
  2355 + var snum = limitNum - boughtNum;
  2356 + if (snum <= 0) {
  2357 + // wx.showModal({
  2358 + // title: '超出限购数量',
  2359 + // });
  2360 + getApp().my_warnning('超出限购数量', 0, self);
  2361 + return false;
  2362 + }
  2363 + if (totalNum >= redisNums) {
  2364 + if (redisNums > snum) {
  2365 + totalNum = snum - cartGoodsNum;
  2366 + } else {
  2367 + totalNum = redisNums - cartGoodsNum;
  2368 + }
  2369 + } else {
  2370 + if (totalNum > snum)
  2371 + totalNum = snum - cartGoodsNum;
  2372 + }
  2373 + }
  2374 +
  2375 + var updata = {
  2376 + id: item.id,
  2377 + goods_num: totalNum,
  2378 + money: th.data.data.shop_price,
  2379 + store_id: os.stoid,
  2380 + };
  2381 +
  2382 + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价
  2383 + if (th.data.prom_type == 1) {
  2384 + // updata['prom_type'] = th.data.options.prom_type;
  2385 + // updata['prom_id'] = th.data.options.prom_id;
  2386 + if (th.data.openSpecModal_flash_normal) {
  2387 + updata['money'] = th.data.data.shop_price;
  2388 + updata['is_pd_normal'] = 1;
  2389 + } else {
  2390 + updata['money'] = th.data.prom_price;
  2391 + };
  2392 + };
  2393 +
  2394 + if (getApp().globalData.guide_id) {
  2395 + updata['guide_id'] = getApp().globalData.guide_id;
  2396 + updata['guide_type'] = 1;
  2397 + }
  2398 + if (getApp().globalData.groupchat_id) {
  2399 + updata['groupchat_id'] = getApp().globalData.groupchat_id;
  2400 + }
  2401 + getApp().request.put("/api/weshop/cartService/update", {
  2402 + data: updata,
  2403 + success: function (t) {
  2404 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2405 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  2406 + th.setData({
  2407 + cartGoodsNum: c_num
  2408 + });
  2409 + th.closeSpecModal();
  2410 + }
  2411 + });
  2412 + } else {
  2413 + getApp().request.post("/api/weshop/cartService/save", {
  2414 + data: newd,
  2415 + success: function (t) {
  2416 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  2417 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  2418 + th.setData({
  2419 + cartGoodsNum: c_num
  2420 + });
  2421 + th.closeSpecModal();
  2422 + }
  2423 + });
  2424 + }
  2425 + }
  2426 + });
  2427 +
  2428 + };
  2429 +
  2430 +
  2431 +
  2432 +
  2433 +
  2434 +
  2435 +
  2436 + },
  2437 + get_buy_num2: async function () {
  2438 + // var map = this.data.g_buy_num,
  2439 + var th = this,
  2440 + user_id = getApp().globalData.user_id;
  2441 + // if (user_id == null) {
  2442 + // // map.set(gd.goods_id, 0);
  2443 + // th.setData({
  2444 + // // g_buy_num: map,
  2445 + // prom_buy_num: 0,
  2446 + // });
  2447 + // "function" == typeof func && func();
  2448 + // return false;
  2449 + // }
  2450 +
  2451 +
  2452 + //----获取商品购买数----
  2453 +
  2454 + //----获取活动购买数----
  2455 + return await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
  2456 + data: {
  2457 + store_id: os.stoid,
  2458 + user_id: user_id,
  2459 + card_id: th.data.gid,
  2460 + prom_type: th.data.prom_type,
  2461 + prom_id: th.data.prom_id
  2462 + },
  2463 + //-----获取-----
  2464 + success: function (tt) {
  2465 + if (tt.data.code == 0) {
  2466 + // map.set(gd.goods_id, g_buy_num);
  2467 + th.setData({
  2468 + // g_buy_num: map,
  2469 + promcardbuynum: tt.data.data.promcardbuynum,
  2470 + cardbuynum: tt.data.data.cardbuynum,
  2471 + });
  2472 + }
  2473 + }
  2474 + });
  2475 +
  2476 +
  2477 + },
  2478 +
  2479 + //-- 加入购物的函数 --
  2480 + add_cart_func: function (t) {
  2481 + var i = getApp().request;
  2482 + if (oo.user_id == null) {
  2483 + wx.hideLoading();
  2484 + th.data.adding = 0;
  2485 + return s.my_warnning("还未登录!", 0, this);
  2486 + }
  2487 +
  2488 + if (!getApp().globalData.userInfo) {
  2489 + wx.hideLoading();
  2490 + th.data.adding = 0;
  2491 + return s.my_warnning("还未登录!", 0, this);
  2492 + }
  2493 +
  2494 + var e = this,
  2495 + th = e,
  2496 + a = 0,
  2497 + o = this.data.sele_g;
  2498 + a = o.goods_id;
  2499 +
  2500 + //----------添加到购物车时,要判断限购数量,--------
  2501 + e.get_buy_num(o, function (ee) {
  2502 + //---判断商品是否超出限购---
  2503 + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) {
  2504 + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) {
  2505 + wx.hideLoading();
  2506 + th.data.adding = 0;
  2507 + wx.showToast({
  2508 + title: '超出商品限购',
  2509 + icon: 'none',
  2510 + });
  2511 + // s.my_warnning('超出商品限购', 0, th);
  2512 + return false;
  2513 + }
  2514 + }
  2515 + //---判断商品是否超出活动限购---
  2516 + if ((th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) && !th.data.is_normal) {
  2517 + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) {
  2518 + wx.hideLoading();
  2519 + th.data.adding = 0;
  2520 + wx.showToast({
  2521 + title: '超出商品活动限购',
  2522 + icon: 'none',
  2523 + });
  2524 + // s.my_warnning('超出商品活动限购', 0, th);
  2525 + return false;
  2526 + }
  2527 + }
  2528 +
  2529 + if (th.data.goodsInputNum <= 0) {
  2530 + wx.hideLoading();
  2531 + th.data.adding = 0;
  2532 + return s.my_warnning("商品数量不能为0", 0, th);
  2533 + }
  2534 + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined)
  2535 + th.setData({
  2536 + sto_sele_name: ""
  2537 + });
  2538 + if (th.data.sto_sele_name == "") {
  2539 + wx.hideLoading();
  2540 + th.data.adding = 0;
  2541 + return s.my_warnning("请选择门店", 0, th);
  2542 + }
  2543 +
  2544 + //--------------此时操作的数据------------
  2545 + var newd = {
  2546 + goods_id: o.goods_id,
  2547 + goods_num: th.data.goodsInputNum,
  2548 + pick_id: th.data.sto_sele_id,
  2549 + user_id: oo.user_id,
  2550 + store_id: th.data.stoid,
  2551 + goods_price: o.shop_price,
  2552 + member_goods_price: o.shop_price,
  2553 + goods_name: o.goods_name,
  2554 + goods_sn: o.goods_sn,
  2555 + sku: o.sku,
  2556 + prom_id: th.data.sele_g.prom_id,
  2557 + prom_type: th.data.sele_g.prom_type,
  2558 + };
  2559 +
  2560 + //-- 代发商品不参加优惠 --
  2561 + if (th.data.sele_g.whsle_id) {
  2562 + newd.prom_type = 0;
  2563 + newd.prom_id = 0;
  2564 + }
  2565 +
  2566 + //---是不是从收藏夹出来的---
  2567 + if (th.data.c_guide_id) {
  2568 + newd['guide_id'] = th.data.c_guide_id;
  2569 + newd['guide_type'] = 2;
  2570 + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3;
  2571 + } else {
  2572 + if (getApp().globalData.guide_id) {
  2573 + newd['guide_id'] = getApp().globalData.guide_id;
  2574 + newd['guide_type'] = 0;
  2575 + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1;
  2576 + }
  2577 + }
  2578 + if (getApp().globalData.groupchat_id) {
  2579 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  2580 + }
  2581 + //让商品带上房间号
  2582 + //让商品带上房间号
  2583 + if (!th.data.sys_switch.is_skuroom_id && th.data.sys_switch.is_skuroom_id == 1) {
  2584 + if (th.data.data.goods_id == getApp().globalData.room_goods_id) {
  2585 + newd.room_id = getApp().globalData.room_id;
  2586 + }
  2587 + } else {
  2588 + if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id;
  2589 + }
  2590 +
  2591 + //如果是积分够,is_integral_normal就要有积分购普通购买字段
  2592 + if (th.data.openSpecModal_inte_normal == 1 && th.data.prom_type == 4) {
  2593 + newd.is_integral_normal = 1;
  2594 + }
  2595 +
  2596 + //如果有线下取价
  2597 + if (o.offline_price) {
  2598 + newd.offline_price = o.offline_price;
  2599 + newd.pricing_type = o.pricing_type;
  2600 + }
  2601 +
  2602 +
  2603 + //获取到优惠测序类型
  2604 + //-----如果是秒杀,团购,积分购,拼团-----
  2605 + if (th.data.prom_type == 1 || th.data.prom_type == 2) {
  2606 +
  2607 + if (th.data.openSpecModal_flash_normal) {
  2608 +
  2609 + newd.prom_type = 0;
  2610 + newd.prom_id = 0;
  2611 + newd.is_pd_normal = 1;
  2612 + //---如果是线下门店销售的时候---
  2613 + if (th.data.sales_rules >= 2) {
  2614 + var pick = th.get_pick_from_list(th.data.sto_sele_id)
  2615 + //---通过接口获取门店的线下库存信息--
  2616 + th.check_CanOutQty(th.data.sele_g, pick, function (CanOutQty) {
  2617 + if (CanOutQty) {
  2618 + if (CanOutQty < e.data.goodsInputNum) {
  2619 + wx.hideLoading();
  2620 + th.data.adding = 0;
  2621 + wx.showToast({
  2622 + title: '库存不足!',
  2623 + icon: 'none',
  2624 + });
  2625 + return false;
  2626 + }
  2627 +
  2628 + th.add_cart_next(e, t, a, o, newd, CanOutQty);
  2629 + } else {
  2630 + wx.hideLoading();
  2631 + th.data.adding = 0;
  2632 + wx.showToast({
  2633 + title: '库存不足!',
  2634 + icon: 'none',
  2635 + });
  2636 + return false;
  2637 + }
  2638 + })
  2639 +
  2640 +
  2641 + } else {
  2642 + if (o.store_count <= 0) {
  2643 + wx.hideLoading();
  2644 + th.data.adding = 0;
  2645 + wx.showToast({
  2646 + title: '库存已为空!',
  2647 + icon: 'none'
  2648 + });
  2649 + return false;
  2650 + }
  2651 + if (o.store_count < e.data.goodsInputNum) {
  2652 + wx.hideLoading();
  2653 + th.data.adding = 0;
  2654 + wx.showToast({
  2655 + title: '库存不足!',
  2656 + icon: 'none',
  2657 + });
  2658 + return false;
  2659 + // return s.my_warnning("库存不足!", 0, th);
  2660 + }
  2661 + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2662 + };
  2663 + return false;
  2664 + }
  2665 +
  2666 + newd.goods_price = th.data.prom_price;
  2667 + newd.member_goods_price = th.data.prom_price,
  2668 + newd.prom_type = th.data.prom_type;
  2669 + newd.prom_id = th.data.prom_id;
  2670 +
  2671 + if (o.store_count <= 0) {
  2672 + wx.hideLoading();
  2673 + th.data.adding = 0;
  2674 + wx.showToast({
  2675 + title: '库存已为空!',
  2676 + icon: 'none',
  2677 + });
  2678 + return false;
  2679 + }
  2680 + if (o.store_count < e.data.goodsInputNum) {
  2681 + wx.hideLoading();
  2682 + th.data.adding = 0;
  2683 + wx.showToast({
  2684 + title: '库存不足!',
  2685 + icon: 'none',
  2686 + });
  2687 + return false;
  2688 + }
  2689 + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2690 +
  2691 + }
  2692 + // else if (o.prom_type == 7) {
  2693 + //
  2694 + // //判断进行中的活动,是不是要判断线下库存
  2695 + // th.check_zh_acting(function (ee) {
  2696 + // newd.prom_id = 0;
  2697 + // newd.prom_type = 0;
  2698 + // if (ee && th.data.sele_g.act) {
  2699 + // newd.prom_id = th.data.sele_g.act.id;
  2700 + // newd.prom_type = 7;
  2701 + // if (o.store_count <= 0) {
  2702 + // wx.hideLoading();
  2703 + // th.data.adding=0;
  2704 + // wx.showToast({
  2705 + // title: '库存已为空!',
  2706 + // icon: 'none',
  2707 + // });
  2708 + // return false;
  2709 + // };
  2710 + // if (o.store_count < e.data.goodsInputNum) {
  2711 + // wx.hideLoading();
  2712 + // th.data.adding=0;
  2713 + // wx.showToast({
  2714 + // title: '库存不足!',
  2715 + // icon: 'none',
  2716 + // });
  2717 + // return false;
  2718 + // //return s.my_warnning("库存不足!", 0, th);
  2719 + // };
  2720 + // th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2721 + // return false;
  2722 + // } else {
  2723 + // //---如果是线下门店销售的时候---
  2724 + // if (!th.data.sele_g.whsle_id && th.data.sales_rules >= 2) {
  2725 + // var pick = th.get_pick_from_list(th.data.sto_sele_id)
  2726 + //
  2727 + // th.check_CanOutQty(th.data.sele_g, pick, function (CanOutQty) {
  2728 + // if (CanOutQty) {
  2729 + //
  2730 + // if (CanOutQty < e.data.goodsInputNum) {
  2731 + // wx.hideLoading();
  2732 + // th.data.adding=0;
  2733 + // wx.showToast({
  2734 + // title: '库存不足!',
  2735 + // icon: 'none',
  2736 + // });
  2737 + // return false;
  2738 + // }
  2739 + //
  2740 + // th.add_cart_next(e, t, a, o, newd, CanOutQty);
  2741 + // } else {
  2742 + // wx.hideLoading();
  2743 + // th.data.adding=0;
  2744 + // wx.showToast({
  2745 + // title: '库存不足!',
  2746 + // icon: 'none',
  2747 + // });
  2748 + // return false;
  2749 + // }
  2750 + // })
  2751 + //
  2752 + // } else {
  2753 + // if (o.store_count <= 0) {
  2754 + // wx.hideLoading();
  2755 + // th.data.adding=0;
  2756 + // wx.showToast({
  2757 + // title: '库存已为空!',
  2758 + // icon: 'none',
  2759 + // });
  2760 + // return false;
  2761 + // //return s.my_warnning("库存已为空!", 0, th);
  2762 + // };
  2763 + // if (o.store_count < e.data.goodsInputNum) {
  2764 + // wx.hideLoading();
  2765 + // th.data.adding=0;
  2766 + // wx.showToast({
  2767 + // title: '库存不足!',
  2768 + // icon: 'none',
  2769 + // });
  2770 + // return false;
  2771 + // //return s.my_warnning("库存不足!", 0, th);
  2772 + // };
  2773 + // th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2774 + // }
  2775 + // }
  2776 + // })
  2777 + // }
  2778 + //要包含积分购的普通购买0 3,5,7,10, is_integral_normal积分普通购买字段
  2779 + else if ([0, 3, 5, 7, 10].indexOf(th.data.prom_type) > -1 || newd.is_integral_normal) {
  2780 + newd.prom_type = 0;
  2781 + newd.prom_id = 0;
  2782 +
  2783 + //---如果是线下门店销售的时候---
  2784 + if (th.data.sales_rules >= 2 && !th.data.sele_g.whsle_id) {
  2785 + var pick = th.get_pick_from_list(th.data.sto_sele_id)
  2786 + //---通过接口获取门店的线下库存信息--
  2787 + th.check_CanOutQty(th.data.sele_g, pick, function (CanOutQty) {
  2788 + if (CanOutQty) {
  2789 +
  2790 + if (CanOutQty < e.data.goodsInputNum) {
  2791 + wx.hideLoading();
  2792 + th.data.adding = 0;
  2793 + wx.showToast({
  2794 + title: '库存不足!',
  2795 + icon: 'none',
  2796 + });
  2797 + return false;
  2798 + }
  2799 +
  2800 + th.add_cart_next(e, t, a, o, newd, CanOutQty);
  2801 + } else {
  2802 + wx.hideLoading();
  2803 + wx.showToast({
  2804 + title: '库存不足!',
  2805 + icon: 'none',
  2806 + });
  2807 + return false;
  2808 + }
  2809 + })
  2810 +
  2811 + } else {
  2812 + if (o.store_count <= 0) {
  2813 + wx.hideLoading();
  2814 + wx.showToast({
  2815 + title: '库存已为空!',
  2816 + icon: 'none',
  2817 + });
  2818 + return false;
  2819 + //return s.my_warnning("库存已为空!", 0, th);
  2820 + };
  2821 + if (o.store_count < e.data.goodsInputNum) {
  2822 + wx.hideLoading();
  2823 + wx.showToast({
  2824 + title: '库存不足!',
  2825 + icon: 'none',
  2826 + });
  2827 + return false;
  2828 + //return s.my_warnning("库存不足!", 0, th);
  2829 + }
  2830 + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  2831 + }
  2832 + }
  2833 +
  2834 +
  2835 +
  2836 + })
  2837 + },
  2838 +
  2839 + //---加入购物车的最后一步---
  2840 + add_cart_next(e, t, a, o, newd, CanOutQty) {
  2841 +
  2842 +
  2843 + if (getApp().globalData.groupchat_id) {
  2844 + newd.groupchat_id = getApp().globalData.groupchat_id
  2845 + }
  2846 + var th = this,
  2847 + i = getApp().request;
  2848 + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------
  2849 + if ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 && o.prom_type != 1) || th.data.is_normal) {
  2850 + var conf = th.data.bconfig;
  2851 + if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) {
  2852 + var s_list = JSON.parse(conf.switch_list);
  2853 + var now = ut.gettimestamp();
  2854 +
  2855 +
  2856 + var str = getApp().globalData.userInfo['card_expiredate'].replace(/-/g, '/');
  2857 + var end = new Date(str);
  2858 + end = Date.parse(end) / 1000;
  2859 +
  2860 +
  2861 + //--如果后台有开启等级价的功能,而且会员的等级没有过期的情况下--
  2862 + if (parseInt(s_list.rank_switch) == 2 && end > now) {
  2863 + var card_price = o[getApp().globalData.userInfo['card_field']];
  2864 + //如果会员有等级价
  2865 + if (getApp().globalData.userInfo['card_field'] != undefined && getApp().globalData.userInfo['card_field'] != null &&
  2866 + getApp().globalData.userInfo['card_field'] != "" && card_price > 0) {
  2867 + newd.goods_price = card_price;
  2868 + newd.member_goods_price = card_price;
  2869 + }
  2870 + }
  2871 + }
  2872 + }
  2873 +
  2874 + //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d);
  2875 + if ("add" == t.currentTarget.dataset.action) {
  2876 +
  2877 + if ([3, 5, 7, 10].indexOf(newd.prom_type) > -1) {
  2878 + newd.prom_type = 0;
  2879 + newd.prom_id = 0;
  2880 + }
  2881 +
  2882 + wxlog.info(getApp().globalData.user_id + '-加入购物车:' + JSON.stringify(newd));
  2883 + //
  2884 + // //如果有搭配购的时候的时候
  2885 + // if(th.data.collocationGoods && newd.prom_type==0){
  2886 + // newd.prom_type = 5;
  2887 + // newd.prom_id = th.data.collocationGoods.id;
  2888 + // }
  2889 + //
  2890 + // //如果有搭配购的时候的时候
  2891 + // 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){
  2892 + // newd.prom_type = 7;
  2893 + // newd.prom_id = th.data.zh_act.id;
  2894 + // }
  2895 +
  2896 + //----先看会员在购物车中是否加入了该商品-----
  2897 + i.get("/api/weshop/cart/page", {
  2898 + data: {
  2899 + store_id: e.data.stoid,
  2900 + user_id: oo.user_id,
  2901 + goods_id: a,
  2902 + pick_id: e.data.sto_sele_id,
  2903 + prom_type: newd.prom_type,
  2904 + prom_id: newd.prom_id,
  2905 + state: 0,
  2906 + },
  2907 + success: function (re) {
  2908 +
  2909 + //-- 判断活动是不是一样 --
  2910 + var item = null;
  2911 + //-------如果购物车中有相关的数据---------
  2912 + if (re.data.data.total > 0) {
  2913 + for (var j = 0; j < re.data.data.pageData.length; j++) {
  2914 + if (!th.check_is_like(re.data.data.pageData[j], newd, 1)) continue;
  2915 + item = re.data.data.pageData[j];
  2916 + break;
  2917 + }
  2918 +
  2919 + if (!item) {
  2920 + for (var j = 0; j < re.data.data.pageData.length; j++) {
  2921 + if (!th.check_is_like(re.data.data.pageData[j], newd)) continue;
  2922 + item = re.data.data.pageData[j];
  2923 + break;
  2924 + }
  2925 + }
  2926 +
  2927 + }
  2928 +
  2929 + if (item) {
  2930 + item = re.data.data.pageData[0];
  2931 + //判断数量,要看下购物车中有没有该商品
  2932 + if (CanOutQty) {
  2933 + if (item.goods_num + th.data.goodsInputNum > CanOutQty) {
  2934 + wx.hideLoading();
  2935 + th.data.adding = 0;
  2936 + wx.showToast({
  2937 + title: '库存不足!',
  2938 + icon: 'none',
  2939 + });
  2940 + return false;
  2941 + // return s.my_warnning("库存不足!", 0, th);
  2942 + }
  2943 + } else {
  2944 + if (item.goods_num + th.data.goodsInputNum > o.store_count) {
  2945 + wx.hideLoading();
  2946 + th.data.adding = 0;
  2947 + wx.showToast({
  2948 + title: '库存不足!',
  2949 + icon: 'none',
  2950 + });
  2951 + return false;
  2952 + //return s.my_warnning("库存不足!", 0, th);
  2953 + }
  2954 +
  2955 + //秒杀有限购的时候,同时不是普通购买
  2956 + 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)) {
  2957 + wx.hideLoading();
  2958 + th.data.adding = 0;
  2959 + wx.showToast({
  2960 + title: '此商品已在购物车,去购物车结算!',
  2961 + icon: 'none',
  2962 + });
  2963 + return false;
  2964 + //return s.my_warnning("库存不足!", 0, th);
  2965 + }
  2966 + }
  2967 +
  2968 + var updata = {
  2969 + id: item.id,
  2970 + goods_num: e.data.goodsInputNum + item.goods_num,
  2971 + goods_price: newd.goods_price,
  2972 + member_goods_price: newd.goods_price,
  2973 + store_id: th.data.stoid,
  2974 + prom_id: newd.prom_id, //把活动id带上去(用于购物车失效变成有效商品)
  2975 + prom_type: newd.prom_type
  2976 + };
  2977 +
  2978 + if (newd.is_pd_normal) {
  2979 + updata.is_pd_normal = 1
  2980 + }
  2981 +
  2982 + //---是不是从收藏夹出来的---
  2983 + if (th.data.c_guide_id) {
  2984 + updata['guide_id'] = th.data.c_guide_id;
  2985 + updata['guide_type'] = 3; //加入购物车之后就变成了3
  2986 + } else {
  2987 + if (getApp().globalData.guide_id) {
  2988 + updata['guide_id'] = getApp().globalData.guide_id;
  2989 + updata['guide_type'] = 0;
  2990 + }
  2991 + }
  2992 + if (getApp().globalData.groupchat_id) {
  2993 + updata['groupchat_id'] = getApp().globalData.groupchat_id;
  2994 + }
  2995 +
  2996 + getApp().request.put("/api/weshop/cart/update", {
  2997 + data: updata,
  2998 + success: function (t) {
  2999 + wx.hideLoading();
  3000 + th.data.adding = 0;
  3001 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  3002 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  3003 + th.setData({
  3004 + cartGoodsNum: c_num
  3005 + });
  3006 + th.closeSpecModal();
  3007 + }
  3008 + });
  3009 + } else {
  3010 + getApp().request.post("/api/weshop/cart/save", {
  3011 + data: newd,
  3012 + success: function (t) {
  3013 + wx.hideLoading();
  3014 + th.data.adding = 0;
  3015 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  3016 + var c_num = th.data.cartGoodsNum + e.data.goodsInputNum;
  3017 + th.setData({
  3018 + cartGoodsNum: c_num
  3019 + });
  3020 + th.closeSpecModal();
  3021 + }
  3022 + });
  3023 + }
  3024 + }
  3025 + });
  3026 +
  3027 + } else {
  3028 +
  3029 + newd['pick_name'] = th.data.sto_sele_name;
  3030 + newd['pick_dis'] = th.data.sto_sele_distr;
  3031 + th.buyNow(newd);
  3032 +
  3033 + }
  3034 + },
  3035 +
  3036 + //-------------获取购买数量的总函数----------------
  3037 + get_buy_num: function (gd, func) {
  3038 + var map = this.data.g_buy_num,
  3039 + th = this,
  3040 + user_id = getApp().globalData.user_id;
  3041 + if (user_id == null) {
  3042 + map.set(gd.goods_id, 0);
  3043 + th.setData({
  3044 + g_buy_num: map,
  3045 + prom_buy_num: 0,
  3046 + });
  3047 + "function" == typeof func && func();
  3048 + return false;
  3049 + }
  3050 +
  3051 + if (map.has(gd.goods_id)) {
  3052 + "function" == typeof func && func();
  3053 + } else {
  3054 + //----获取商品购买数----
  3055 + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  3056 + data: {
  3057 + store_id: os.stoid,
  3058 + user_id: user_id,
  3059 + goods_id: gd.goods_id, isnew: 1
  3060 + },
  3061 + success: function (t) {
  3062 + if (t.data.code == 0) {
  3063 + var g_buy_num = t.data.data.goodsbuynum;
  3064 +
  3065 + //如果是秒杀的时候
  3066 + if (th.data.prom_type == 0 && gd.prom_type == 1) {
  3067 + gd.prom_type = 0;
  3068 + }
  3069 + //如果全场优惠,商品做了秒杀
  3070 + if (th.data.prom_type == 3 && gd.prom_type == 1) {
  3071 + gd.prom_type = 0;
  3072 + }
  3073 + //如果全场阶梯优惠,商品做了秒杀
  3074 + if (th.data.prom_type == 10 && gd.prom_type == 1) {
  3075 + gd.prom_type = 0;
  3076 + }
  3077 +
  3078 +
  3079 + if (!th.data.is_normal && (gd.prom_type == 1 || gd.prom_type == 2 || gd.prom_type == 4 || gd.prom_type == 6)) {
  3080 + //----获取活动购买数----
  3081 + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  3082 + data: {
  3083 + store_id: os.stoid,
  3084 + user_id: user_id,
  3085 + goods_id: gd.goods_id,
  3086 + prom_type: gd.prom_type,
  3087 + prom_id: gd.prom_id, isnew: 1
  3088 + },
  3089 + //-----获取-----
  3090 + success: function (tt) {
  3091 + if (tt.data.code == 0) {
  3092 + map.set(gd.goods_id, g_buy_num);
  3093 + th.setData({
  3094 + g_buy_num: map,
  3095 + prom_buy_num: tt.data.data.promgoodsbuynum,
  3096 + });
  3097 + "function" == typeof func && func();
  3098 + }
  3099 + }
  3100 + });
  3101 + } else {
  3102 + map.set(gd.goods_id, g_buy_num);
  3103 + th.setData({
  3104 + g_buy_num: map
  3105 + });
  3106 + "function" == typeof func && func();
  3107 + }
  3108 + }
  3109 + }
  3110 + });
  3111 + }
  3112 + },
  3113 + //--- 获取卡类列表 ---
  3114 + getPlusCardType: function (func) {
  3115 + var storid = os.stoid;
  3116 + var th = this;
  3117 + var user = getApp().globalData.userInfo;
  3118 + if (!user) return false;
  3119 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  3120 + var plusCard = res.data.data;
  3121 + var arr = [1219, 2089, 3031];
  3122 + var new_arr = new Array();
  3123 + var card_name_map = new Map();
  3124 +
  3125 + var list = [];
  3126 + for (var i = 0; i < plusCard.length; i++) {
  3127 + if ((!user || user.card_field == null || user.card_field == "") && plusCard[i].IsStopBuy == true) continue;
  3128 + var name = "card" + plusCard[i].CorrPrice.toLowerCase();
  3129 + card_name_map.set(name, plusCard[i].CardName);
  3130 + list.push(plusCard[i]);
  3131 + }
  3132 +
  3133 + var ob = {
  3134 + "card_list": list,
  3135 + "name_map": card_name_map
  3136 + };
  3137 + func(ob);
  3138 + })
  3139 + },
  3140 +
  3141 +
  3142 + //----------增加购买数量-----------
  3143 + addCartNum: function (t) {
  3144 + var add_num = 1;
  3145 + var p_type = parseInt(this.data.prom_type)
  3146 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || this.data.openSpecModal_inte_normal == 1 || this.data.is_normal == 1) {
  3147 + add_num = getApp().get_limit_qty(this.data.sele_g, this.data.is_act, 1);
  3148 + }
  3149 +
  3150 + this.checkCartNum(this.data.goodsInputNum + add_num);
  3151 + },
  3152 + //------检查数量是不是超出限购------
  3153 + checkCartNum: function (t) {
  3154 + var th = this;
  3155 +
  3156 + var mo_num = getApp().get_limit_qty(th.data.sele_g, th.data.is_act);
  3157 + var steep = getApp().get_limit_qty(th.data.sele_g, th.data.is_act, 1);
  3158 + this.get_buy_num(this.data.sele_g, async function () {
  3159 +
  3160 + var is_show_bs = 0;
  3161 + var l_num = -1;
  3162 +
  3163 + //--判断商品是否超出限购--
  3164 + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) {
  3165 +
  3166 + var gd_buy_num = th.data.g_buy_num.get(th.data.sele_g.goods_id);
  3167 +
  3168 + if (t + gd_buy_num > th.data.sele_g.viplimited) {
  3169 + wx.showToast({
  3170 + title: '超出商品限购',
  3171 + icon: 'none',
  3172 + });
  3173 +
  3174 + is_show_bs = 1;
  3175 +
  3176 + // s.my_warnning('超出商品限购', 0, th);
  3177 + l_num = th.data.sele_g.viplimited - gd_buy_num;
  3178 + if (l_num < 0) l_num = 0;
  3179 + // th.setData({
  3180 + // goodsInputNum: num
  3181 + // })
  3182 + // return false;
  3183 + }
  3184 + }
  3185 +
  3186 + //如果是普通购买的情况下
  3187 + if (th.data.openSpecModal_flash_normal) th.data.is_normal = 1;
  3188 +
  3189 + //--判断商品是否超出活动限购--
  3190 + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && !th.data.is_normal) {
  3191 + if (t + th.data.prom_buy_num > th.data.prom_buy_limit) {
  3192 + wx.showToast({
  3193 + title: '超出商品活动限购',
  3194 + icon: 'none',
  3195 + });
  3196 + // s.my_warnning('超出商品活动限购', 0, th);
  3197 + var num = th.data.prom_buy_limit - th.data.prom_buy_num;
  3198 + if (num < 0) num = 0;
  3199 + th.setData({
  3200 + goodsInputNum: num
  3201 + })
  3202 + return false;
  3203 + }
  3204 + }
  3205 +
  3206 + 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) {
  3207 + var redis_num = 0;
  3208 + //------判断活动是否抢光-----
  3209 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
  3210 + os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, {
  3211 + 1: 1
  3212 + }).then(res => {
  3213 + redis_num = res.data.data;
  3214 + });
  3215 +
  3216 + if (t > redis_num) {
  3217 + wx.showToast({
  3218 + title: '超出商品活动库存',
  3219 + icon: 'none',
  3220 + });
  3221 + // s.my_warnning('超出商品活动库存', 0, th);
  3222 + th.setData({
  3223 + goodsInputNum: redis_num
  3224 + })
  3225 + return false;
  3226 + }
  3227 + }
  3228 + var e = th.data.sele_g.store_count;
  3229 + var p_type = parseInt(th.data.prom_type + ''); //&& p_type!=1 && p_type!=4
  3230 + if (!th.data.sele_g.whsle_id && th.data.sales_rules >= 2 &&
  3231 + ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) {
  3232 +
  3233 + //-- 如果是虚拟商品,默认给最大值 --
  3234 + if (getApp().is_virtual(th.data.sele_g)) {
  3235 + e = 100000;
  3236 + } else {
  3237 + if (!th.data.def_pick_store) {
  3238 + wx.showToast({
  3239 + title: '请选择门店',
  3240 + icon: 'none',
  3241 + });
  3242 + // wx.showModal({title: '请选择门店',});
  3243 + return false;
  3244 + } else {
  3245 + e = th.data.def_pick_store.CanOutQty;
  3246 + }
  3247 + }
  3248 + }
  3249 +
  3250 + //-- 限购数量也要进行计算一下 --
  3251 + if (l_num > -1) {
  3252 + if (e > l_num) e = l_num;
  3253 + }
  3254 +
  3255 + //--- 促销活动也不控制起订量, 这里很重要的一个控制,起订量的 ----
  3256 + if ([0, 3, 5, 7, 10].indexOf(p_type) > -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1) {
  3257 + if (t < mo_num) {
  3258 + t = mo_num;
  3259 + if (!is_show_bs) {
  3260 + wx.showToast({
  3261 + title: '购买数未达到起订量',
  3262 + icon: 'none',
  3263 + });
  3264 + }
  3265 + is_show_bs = 1;
  3266 + }
  3267 + if (t > mo_num && (t - mo_num) % steep != 0) {
  3268 +
  3269 + if (!is_show_bs) {
  3270 + wx.showToast({
  3271 + title: '购买数必须是起订量的倍数',
  3272 + icon: 'none',
  3273 + });
  3274 + }
  3275 +
  3276 + t = mo_num + parseInt((t - mo_num) / steep) * steep + steep;
  3277 + is_show_bs = 1;
  3278 + }
  3279 + }
  3280 +
  3281 + if (!e) e = 0;
  3282 + //库存不足,不增加
  3283 + if (e < t) {
  3284 + if (!is_show_bs) {
  3285 + wx.showToast({
  3286 + title: '库存不足',
  3287 + icon: 'none',
  3288 + });
  3289 + }
  3290 +
  3291 + // wx.showModal({title: '库存不足',});
  3292 + if (e < 0) e = 0;
  3293 +
  3294 + //只有普通商品才有起购数
  3295 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1) {
  3296 + if (e < mo_num) e = mo_num;
  3297 + if (e > mo_num && (e - mo_num) % steep != 0) {
  3298 + e = mo_num + parseInt((e - mo_num) / steep) * steep;
  3299 + }
  3300 + }
  3301 + th.setData({
  3302 + goodsInputNum: e
  3303 + });
  3304 + return false;
  3305 + }
  3306 +
  3307 + //var steep=getApp().get_limit_qty(th.data.sele_g,0,1);
  3308 + t > e || 0 == e ? t = e : t < 1 && (t = 1);
  3309 +
  3310 +
  3311 + //只有普通商品才有起购数
  3312 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1) {
  3313 + if (t < mo_num) t = mo_num;
  3314 + }
  3315 +
  3316 +
  3317 + th.setData({
  3318 + goodsInputNum: t
  3319 + });
  3320 + th.is_show_more_buy();
  3321 +
  3322 + })
  3323 + },
  3324 + is_show_more_buy: async function () {
  3325 + var prom_goods = this.data.prom_goods;
  3326 + if (!prom_goods) return false;
  3327 + //如果系统默认的顺序不是以优惠促销为默认第一位的时候
  3328 + if (this.check_prom_custom(1) !== 3) {
  3329 + return false;
  3330 + }
  3331 +
  3332 + if (!this.data.sele_g) return false;
  3333 +
  3334 + var per_price = this.data.sele_g.shop_price
  3335 + if (this.data.card_field && this.data.sele_g[this.data.card_field] > 0) {
  3336 + per_price = this.data.sele_g[this.data.card_field];
  3337 + }
  3338 +
  3339 + var all_price = per_price * this.data.goodsInputNum;
  3340 + var con = null;
  3341 + for (var i in prom_goods) {
  3342 + var item = prom_goods[i];
  3343 + if (item.prom_type == 1) {
  3344 + if (item.condition > this.data.goodsInputNum) {
  3345 + con = item;
  3346 + con.need = (item.condition - this.data.goodsInputNum).toFixed(2) + "件";
  3347 + break;
  3348 + }
  3349 + } else {
  3350 + if (parseFloat(item.condition) > parseFloat(parseFloat(all_price).toFixed(2))) {
  3351 + con = item;
  3352 + con.need = (item.condition - all_price).toFixed(2) + "元";
  3353 + break;
  3354 + }
  3355 + }
  3356 + }
  3357 + //获取用户参与优惠促销的次数
  3358 + //if(con && con.prom_id){
  3359 + //await this.getUserBuyPromNum_pre(con.prom_id);
  3360 + //}
  3361 + this.setData({
  3362 + hui_condition: con
  3363 + });
  3364 +
  3365 + },
  3366 +
  3367 + //----------减少购买数量-----------
  3368 + subCartNum: function (t) {
  3369 + var add_num = 1;
  3370 + var p_type = parseInt(this.data.prom_type)
  3371 + if ([1, 2, 4, 6, 8, 9].indexOf(p_type) == -1 || this.data.openSpecModal_inte_normal == 1 || this.data.is_normal == 1) {
  3372 + add_num = getApp().get_limit_qty(this.data.sele_g, this.data.is_act, 1);
  3373 + var mo_num = getApp().get_limit_qty(this.data.sele_g, this.data.is_act);
  3374 + if (this.data.goodsInputNum - add_num < mo_num) {
  3375 + wx.showToast({
  3376 + title: '购买数量不能小于起订量',
  3377 + icon: 'none',
  3378 + });
  3379 + return false;
  3380 + }
  3381 + }
  3382 + this.checkCartNum(this.data.goodsInputNum - add_num);
  3383 + },
  3384 + //----------输入框输入购买数量-----------
  3385 + inputCartNum: function (t) {
  3386 + this.checkCartNum(Number(t.detail.value));
  3387 + },
  3388 + //统一一下获取线下库存的函数
  3389 + async check_CanOutQty(goodsinfo, item, func) {
  3390 +
  3391 + var sales_rules = this.data.sales_rules;
  3392 + //如果默认是商品
  3393 + if (getApp().is_virtual(goodsinfo)) {
  3394 + return func(100000);
  3395 + }
  3396 +
  3397 + var lock_rq = {
  3398 + store_id: os.stoid,
  3399 + wareId: goodsinfo.goods_id,
  3400 + pageSize: 1000
  3401 + };
  3402 +
  3403 + if (sales_rules == 2) {
  3404 + lock_rq.storageId = item.pickup_id
  3405 + } else {
  3406 + lock_rq.appoint_pick_keyid = encodeURIComponent(this.data.appoint_pick_keyid)
  3407 + }
  3408 +
  3409 + var lock = 0;
  3410 + var CanOutQty = 0;
  3411 + var plist = null;
  3412 + //先读取门店的lock
  3413 + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
  3414 + data: lock_rq
  3415 + }).then(res => {
  3416 + if (res.data.code == 0 && res.data.data.total > 0) {
  3417 + for (var i in res.data.data.pageData)
  3418 + lock += res.data.data.pageData[i].outQty;
  3419 + }
  3420 + })
  3421 +
  3422 + var sto_req = {
  3423 + wareIds: encodeURIComponent(goodsinfo.erpwareid),
  3424 + storeId: os.stoid
  3425 + }
  3426 + if (sales_rules == 2) {
  3427 + sto_req.storageNos = item.pickup_no
  3428 + } else {
  3429 + sto_req.storageIds = encodeURIComponent(this.data.appoint_pick_keyid)
  3430 + }
  3431 +
  3432 +
  3433 +
  3434 + //读取线下的门店库存
  3435 + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
  3436 + data: sto_req
  3437 + }).then(res => {
  3438 + if (res.data.code == 0 && res.data.data.total > 0) {
  3439 + plist = res.data.data.pageData[0];
  3440 + }
  3441 + })
  3442 +
  3443 + if (plist && plist.CanOutQty - lock > 0) {
  3444 + CanOutQty = plist.CanOutQty - lock;
  3445 + }
  3446 +
  3447 + if (func) func(CanOutQty);
  3448 +
  3449 + },
  3450 + //获取更多秒杀
  3451 + get_more_flahs: async function (func) {
  3452 + var f_more = false;
  3453 + var user_id = getApp().globalData.user_id;
  3454 + if (!user_id) user_id = 0;
  3455 +
  3456 + var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.data.goods_id + "&user_id=" + user_id;
  3457 + //获取秒杀的多规格
  3458 + await getApp().request.promiseGet(url, {}).then(res => {
  3459 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  3460 + f_more = res.data.data;
  3461 + }
  3462 + })
  3463 + if (!f_more) {
  3464 + func(false);
  3465 + return false;
  3466 + }
  3467 + //-- 秒杀的价格要更新 --
  3468 + for (let i in f_more) {
  3469 +
  3470 + let item = f_more[i];
  3471 + f_more[i].prom_id = item.act_id;
  3472 + f_more[i].prom_type = 1;
  3473 +
  3474 + var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id;
  3475 + await getApp().request.promiseGet(url, {}).then(rs => {
  3476 + if (rs.data.code == 0 && rs.data.data) {
  3477 + f_more[i].price = rs.data.data.user_price;
  3478 + f_more[i].is_pickup = rs.data.data.is_pickup;
  3479 + f_more[i].pick_up_lists = rs.data.data.pick_up_lists;
  3480 + }
  3481 + })
  3482 + }
  3483 + func(f_more);
  3484 +
  3485 + },
  3486 + //获取redis中的数量
  3487 + async getactLen(func) {
  3488 + var r_num = 0,
  3489 + prom_type = this.data.prom_type,
  3490 + prom_id = this.data.prom_id;
  3491 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  3492 + 1: 1
  3493 + }).then(res => {
  3494 + var em = res;
  3495 + if (em.data.code == 0) {
  3496 + r_num = em.data.data;
  3497 + }
  3498 + })
  3499 + func(r_num);
  3500 + },
  3501 + //获取redis中的数量
  3502 + async getactLenser() {
  3503 + let prom_type = this.data.prom_type;
  3504 + let prom_id = this.data.prom_id;
  3505 + return await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  3506 + 1: 1
  3507 + }).then(res => {
  3508 + if (res.data.code == 0) {
  3509 + // 当前可以购买的数量
  3510 + let r_num = res.data.data;
  3511 + return r_num;
  3512 + };
  3513 + })
  3514 + },
  3515 +
  3516 + //因为在购物车 普通商品和 优惠促销,搭配购,组合购 阶梯购是一样的
  3517 + check_is_like(e, newd, idx) {
  3518 + if (e.prom_type == newd.prom_type) return true;
  3519 + if (!idx) {
  3520 + if (e.prom_type == 0) {
  3521 + if ([3, 5, 7, 10].indexOf(newd.prom_type) > -1) return true;
  3522 + }
  3523 + if (newd.prom_type == 0) {
  3524 + if ([3, 5, 7, 10].indexOf(e.prom_type) > -1) return true;
  3525 + }
  3526 + }
  3527 + return false;
  3528 + },
  3529 + //----------增加购买数量-----------
  3530 + addCartNumser: function (t) {
  3531 + this.checkCartNumser(this.data.goodsInputNum + 1);
  3532 + },
  3533 + //----------减少购买数量-----------
  3534 + subCartNumser: function (t) {
  3535 + this.checkCartNumser(this.data.goodsInputNum - 1);
  3536 + },
  3537 + //----------输入框输入购买数量-----------
  3538 + inputCartNumser: function (t) {
  3539 + this.checkCartNumser(Number(t.detail.value));
  3540 + },
  3541 +
  3542 + //------检查数量是不是超出限购------
  3543 + checkCartNumser: async function (t) {
  3544 + var th = this;
  3545 +
  3546 + if (!th.data.def_pick_store) {
  3547 + wx.showModal({ title: '请选择门店', });
  3548 + return false;
  3549 + };
  3550 +
  3551 + // 非秒杀活动
  3552 + if (this.data.prom_type != 1) {
  3553 + this.setData({
  3554 + goodsInputNum: t,
  3555 + });
  3556 + };
  3557 +
  3558 + // 秒杀活动
  3559 + if (this.data.prom_type == 1) {
  3560 + // 如果是秒杀活动下的单独购买,is_normal为1
  3561 + if (this.data.openSpecModal_flash_normal) this.data.is_normal = 1;
  3562 +
  3563 + if (this.data.is_normal) {// 单独购买
  3564 + this.setData({
  3565 + goodsInputNum: t,
  3566 + });
  3567 + } else {// 秒杀购买
  3568 +
  3569 + // 获取redis当前可以购买的数量
  3570 + // 如果数量为0,设置和显示已抢光
  3571 + // 否则,进一步判断是否超出限购或超出库存
  3572 + await this.getactLenser().then(async function (res) {
  3573 + // res: redis可购买数量
  3574 + // console.log('当前可以购买的数量:', res);
  3575 + if (res <= 0) {
  3576 + // 可购买数量<=0, 设置和显示已抢光
  3577 + th.setData({
  3578 + prom_r_null: 1,
  3579 + });
  3580 + } else {
  3581 + // 可购买数量>0
  3582 + // 计算自己还可以购买的数量
  3583 + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b
  3584 + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存
  3585 + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
  3586 + let actInfo = th.data.sele_g;
  3587 + await th.get_buy_num2().then(function (data) {
  3588 + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a
  3589 + let promcardbuynum = data.data.data.promcardbuynum;
  3590 + let buyedNum = promcardbuynum; // 自己已经购买的数量b
  3591 + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
  3592 +
  3593 + if (canBuyNum <= 0) {
  3594 + canBuyNum = 0;
  3595 + };
  3596 +
  3597 + if (limited > res) {
  3598 + if (t > res) { // t当前增减的数量
  3599 + // wx.showModal({
  3600 + // title: '超出活动库存',
  3601 + // });
  3602 + getApp().my_warnning('超出活动库存', 0, self);
  3603 + th.setData({
  3604 + goodsInputNum: res || 1,
  3605 + });
  3606 + return false;
  3607 + };
  3608 + };
  3609 +
  3610 + if (limited <= res) {
  3611 + if (t > canBuyNum) {
  3612 + // wx.showModal({
  3613 + // title: '超出限购数量',
  3614 + // });
  3615 + getApp().my_warnning('超出限购数量', 0, self);
  3616 + th.setData({
  3617 + goodsInputNum: canBuyNum || 1,
  3618 + });
  3619 + return false;
  3620 + };
  3621 + };
  3622 +
  3623 + th.setData({
  3624 + goodsInputNum: t,
  3625 + });
  3626 + });
  3627 + };
  3628 + });
  3629 +
  3630 + }
  3631 +
  3632 +
  3633 + };
  3634 +
  3635 +
  3636 +
  3637 +
  3638 +
  3639 +
  3640 +
  3641 +
  3642 +
  3643 +
  3644 +
  3645 + // var e = th.data.sele_g.goods_num;
  3646 + // var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4
  3647 + // 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)) {
  3648 + // if (!th.data.def_pick_store) {
  3649 + // wx.showModal({title: '请选择门店',});
  3650 + // return false;
  3651 + // } else {
  3652 + // e = th.data.def_pick_store.CanOutQty;
  3653 + // }
  3654 + // }
  3655 +
  3656 +
  3657 + // th.setData({goodsInputNum: t});
  3658 +
  3659 + // });
  3660 +
  3661 +
  3662 + },
  3663 + //-----------选择属性的按钮事件----------
  3664 + sele_spec: function (e) {
  3665 +
  3666 + //如果只有一个规格直接结束
  3667 + if ((this.data.sku_g && this.data.sku_g.length==1) || (this.data.sku_g_pt && this.data.sku_g_pt.length==1)) {
  3668 + return
  3669 + }
  3670 + if (this.data.sp_seleing) {
  3671 + return false;
  3672 + }
  3673 +
  3674 + this.setData({ sp_seleing: 1 })
  3675 +
  3676 + var that = this;
  3677 + var th = this;
  3678 +
  3679 + //在切换规格的时候,指定门店不匹配的状态要清理
  3680 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  3681 + th.data.def_pick_store.is_no_dis_nor = 0;
  3682 + that.setData({
  3683 + def_pick_store: th.data.def_pick_store
  3684 + })
  3685 + }
  3686 +
  3687 + //切换完商品后,海报图片都要跟换
  3688 + this.data.share_goods_img = null;
  3689 +
  3690 + var gid = e.currentTarget.dataset.gid;
  3691 + var nor = e.currentTarget.dataset.nor;
  3692 + var user_id = getApp().globalData.user_id;
  3693 +
  3694 + var sku_g = this.data.sku_g;
  3695 + if (nor || (gid != this.data.base_nor_goods_id && this.data.base_nor)) {
  3696 + sku_g = this.data.sku_g_pt;
  3697 + if (nor) this.data.base_nor = nor;
  3698 + }
  3699 +
  3700 + //要把不匹配还原
  3701 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  3702 + th.data.def_pick_store.is_no_dis = 0;
  3703 + th.data.def_pick_store.is_no_dis_nor = 0;
  3704 + th.setData({ def_pick_store: th.data.def_pick_store })
  3705 + }
  3706 +
  3707 + //普通商品多规格的时候,商品切换
  3708 + if (this.data.base_nor_prom_type) this.data.base_nor_prom_type = parseInt(this.data.base_nor_prom_type);
  3709 + if ([1, 2, 4, 6, 8, 9].indexOf(this.data.base_nor_prom_type) == -1) {
  3710 +
  3711 + this.setData({
  3712 + prom_goods: null,
  3713 + jieti_prom: null,
  3714 + order_prom: null,
  3715 + zh_act: null,
  3716 + more_flash: null,
  3717 + })
  3718 + }
  3719 +
  3720 + //拼团在点击回来的时候,还是只能是立即购买,不能有购物车的情况
  3721 + if (this.data.base_nor_prom_type == 6 && parseInt(gid + '') == parseInt(this.data.base_nor_goods_id + '')) {
  3722 + this.setData({
  3723 + openSpecModal_pt: 1,
  3724 + openSpecModal: 0,
  3725 + sku_g: this.data.sku_g_pt,
  3726 + is_normal: 1
  3727 + })
  3728 + nor = 1;
  3729 + }
  3730 +
  3731 +
  3732 + //that.data.change=1;
  3733 + var item = null;
  3734 + for (var i in sku_g) {
  3735 + if (sku_g[i].goods_id == gid) {
  3736 + item = sku_g[i];
  3737 + if (item.original_img.indexOf(that.data.iurl) == -1) {
  3738 + item.original_img = that.data.iurl + item.original_img;
  3739 + }
  3740 + break
  3741 + }
  3742 + }
  3743 + console.log(item, 2000);
  3744 + var cur_price = item.shop_price;
  3745 + if (getApp().globalData.userInfo && getApp().globalData.userInfo.card_field) {
  3746 + var cfile = getApp().globalData.userInfo.card_field;
  3747 + console.log('cfile', cfile);
  3748 + if (item[cfile]) {
  3749 + cur_price = item[cfile];
  3750 + }
  3751 + }
  3752 + var txt = (cur_price / item.market_price * 10).toFixed(2).toString();
  3753 + txt = parseFloat(txt);
  3754 + item['disc'] = txt;
  3755 + if (item) this.setData({
  3756 + sele_g: item,
  3757 + gid: gid,
  3758 + data: item,
  3759 + });
  3760 +
  3761 +
  3762 + if (nor) {
  3763 + that.set_sele_g(sku_g)
  3764 + that.get_sto(1, () => {
  3765 + that.sele_spec_next(that, item, gid, nor);
  3766 + });
  3767 + }
  3768 + else that.get_sto(null, () => {
  3769 + that.sele_spec_next(that, item, gid, nor);
  3770 + }, item);
  3771 +
  3772 + },
  3773 + //-- 选择规格下一步 --
  3774 + sele_spec_next(that, item, gid, nor) {
  3775 + let th = this;
  3776 + if (!item.whsle_id && ([1, 2, 4, 6].indexOf(item.prom_type) == -1 || this.data.is_normal == 1))
  3777 + that.check_is_youhui(gid, that.data.is_normal, 1);
  3778 +
  3779 + //默认门店要拿下门店库存
  3780 + 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) {
  3781 + var lock = 0,
  3782 + plist = null;
  3783 +
  3784 + that.check_CanOutQty(that.data.sele_g, that.data.def_pick_store, function (CanOutQty) {
  3785 + that.data.def_pick_store.CanOutQty = CanOutQty;
  3786 + //--给门店赋值线下库存--
  3787 + that.setData({
  3788 + def_pick_store: that.data.def_pick_store
  3789 + });
  3790 + })
  3791 +
  3792 + }
  3793 + that.sele_spec_chech_activity(nor);
  3794 +
  3795 + //如果是秒杀,拼团等互动,就不重新算界面
  3796 + if ([1, 2, 4, 6, 8, 9].indexOf(this.data.base_nor_prom_type) > -1) {
  3797 + return false;
  3798 + }
  3799 +
  3800 + that.check_has_flash(gid);
  3801 + var url = '/api/weshop/activitylist/listGoodActInfo2New';
  3802 + var req_d = {
  3803 + "store_id": os.stoid,
  3804 + "goods_id": that.data.gid,
  3805 + "user_id": getApp().globalData.user_id,
  3806 + }
  3807 + getApp().request.get(url, {
  3808 + data: req_d,
  3809 + success: function (e) {
  3810 + if (e.data.code != 0 || !e.data.data || e.data.data.length <= 0) return false;
  3811 + var arr = e.data.data;
  3812 + if (!arr || !arr.length) {
  3813 + return false;
  3814 + }
  3815 + var arr3 = arr.filter(function (e) {
  3816 + return e.s_time < ut.gettimestamp() && e.prom_type == 7;
  3817 + })
  3818 +
  3819 + //-- 组合购要在面前计算 --,计算完之后,再来计算check_is_youhui --
  3820 + if (arr3 && arr3.length > 0) {
  3821 + //获取活动信息
  3822 + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" +
  3823 + arr3[0].act_id + "/" + getApp().globalData.user_id;
  3824 + getApp().request.get(url, {
  3825 + success: function (e) {
  3826 + if (e.data.code == 0 && e.data.data) {
  3827 + if (ut.gettimestamp() < e.data.data.start_time) {
  3828 + return false;
  3829 + }
  3830 + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) {
  3831 + //-- 获取商品列表 --
  3832 + th.setData({
  3833 + zh_act: e.data.data
  3834 + });
  3835 + th.getUserBuyPromNum(e.data.data.id)
  3836 + }
  3837 + }
  3838 + if (!item.whsle_id) that.check_is_youhui(gid, that.data.is_normal);
  3839 + }
  3840 + });
  3841 + } else {
  3842 + if (!item.whsle_id) that.check_is_youhui(gid, that.data.is_normal);
  3843 + }
  3844 +
  3845 + }
  3846 + })
  3847 + },
  3848 + //选择了不同的规格的时候要判断是不是有活动正在进行中
  3849 + async sele_spec_chech_activity(nor) {
  3850 + //---如果是活动的时候---
  3851 + var prom = null, goodsinfo = this.data.sele_g, th = this;
  3852 +
  3853 + //如果是普通购买的时候,要返回原先
  3854 + if (goodsinfo.goods_id == this.data.base_nor_goods_id) {
  3855 + goodsinfo.prom_type = this.data.base_nor_prom_type;
  3856 + goodsinfo.prom_id = this.data.base_nor_prom_id;
  3857 +
  3858 + this.setData({
  3859 + prom_type: this.data.base_nor_prom_type,
  3860 + prom_id: this.data.base_nor_prom_id,
  3861 + })
  3862 + }
  3863 +
  3864 + var user_id = getApp().globalData.user_id;
  3865 + if (!user_id) user_id = 0;
  3866 + if (goodsinfo.prom_type == 1) {
  3867 + await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + goodsinfo.prom_id, {}).then(res => {
  3868 + if (res.data.code == 0 && res.data.data) {
  3869 + prom = res.data.data;
  3870 + prom.price = prom.user_price;
  3871 + this.setData({
  3872 + is_share_text: prom.is_share_text
  3873 + })
  3874 + }
  3875 + })
  3876 + }
  3877 + if (goodsinfo.prom_type == 6) {
  3878 + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + goodsinfo.prom_id, {}).then(res => {
  3879 + if (res.data.code == 0) {
  3880 + prom = res.data.data;
  3881 +
  3882 +
  3883 + //----------查看阶梯团------------
  3884 + if (prom.ct_rylist != "null" && prom.ct_rylist != "" && prom.ct_rylist != null && prom.ct_rylist != undefined) {
  3885 + prom.ct_rylist = JSON.parse(prom.ct_rylist);
  3886 + var max_num = 0;
  3887 + prom.ct_rylist.forEach(function (val, ind) {
  3888 + if (parseInt(val.rynum) > max_num) max_num = parseInt(val.rynum);
  3889 + })
  3890 + prom.max_ct_num = max_num;
  3891 + }
  3892 +
  3893 + }
  3894 + })
  3895 + }
  3896 +
  3897 + if (goodsinfo.prom_type == 4) {
  3898 + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {
  3899 + if (res.data.code == 0) {
  3900 + prom = res.data.data;
  3901 + }
  3902 + })
  3903 +
  3904 + if (prom) {
  3905 + let times = new Date().getTime()
  3906 + prom.show_time_off = ""
  3907 + let atimes = prom.start_time * 1000
  3908 +
  3909 + if (atimes > times) {
  3910 + prom.show_time_off = ut.formatTime(prom.start_time)
  3911 + }
  3912 + }
  3913 +
  3914 + }
  3915 + console.log('活动详情------------');
  3916 + console.log(prom);
  3917 + //----------如果有活动,并且在进行中,就不计算线下库存---------------
  3918 + var now = ut.gettimestamp();
  3919 + if (prom) {
  3920 +
  3921 + var t1 = prom.start_time;
  3922 + var prom_st = 1;
  3923 + if (prom.show_time) {
  3924 + t1 = prom.show_time;
  3925 + if (prom.start_time > now) prom_st = 0;
  3926 + }
  3927 + if (prom.is_end == 0 && prom.end_time > now && t1 < now) {
  3928 + th.setData({
  3929 + prom_type: goodsinfo.prom_type,
  3930 + prom_price: prom.price,
  3931 + prom_buy_limit: prom.buy_limit ? prom.buy_limit : (prom.limitvipqty ? prom.limitvipqty : 0),
  3932 + prom_end_time: prom.end_time,
  3933 + prom_start_time: prom.start_time,
  3934 + prom_st: prom_st,
  3935 + prom_act: prom,
  3936 + prom_id: prom.id,
  3937 + sp_seleing: 0
  3938 + })
  3939 +
  3940 + var pro_null = null;
  3941 + if (goodsinfo.prom_type == 1) {
  3942 + var rs = await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/1/" + prom.id, {});
  3943 + if (rs && rs.data.code == 0 && rs.data.data <= 0) {
  3944 + pro_null = 1;
  3945 + }
  3946 + }
  3947 + th.setData({ pro_null });
  3948 +
  3949 +
  3950 + //却换图片
  3951 + th.init(goodsinfo.goods_id);
  3952 + var newTime = ut.gettimestamp();
  3953 + var endTime2 = prom.end_time;
  3954 + var endTime1 = prom.start_time;
  3955 +
  3956 + this.data.is_timer = 0;
  3957 +
  3958 + setTimeout(function () {
  3959 + th.data.is_timer = 1;
  3960 + if (endTime1 > newTime) {
  3961 + th.setData({
  3962 + prom_time_text: '距秒杀开始还有'
  3963 + })
  3964 + // th.countDown(endTime1, 0);
  3965 + } else {
  3966 + if (endTime2 > newTime) {
  3967 + th.setData({
  3968 + prom_time_text: '距秒杀结束还有',
  3969 + prom_st: 1
  3970 + })
  3971 + // th.countDown(endTime2);
  3972 + }
  3973 + }
  3974 +
  3975 + }, 1000)
  3976 +
  3977 + return false;
  3978 + }
  3979 + }
  3980 +
  3981 + if (nor) {
  3982 + th.setData({ sp_seleing: 0 })
  3983 + return false;
  3984 + }
  3985 +
  3986 + //---设置普通商品---
  3987 + th.setData({
  3988 + prom_type: 0,
  3989 + prom_price: null,
  3990 + prom_buy_limit: null,
  3991 + prom_end_time: null,
  3992 + prom_start_time: null,
  3993 + prom_st: null,
  3994 + sp_seleing: 0
  3995 + })
  3996 +
  3997 + },
  3998 + //---检查有没有优惠活动--- is_nor的普通购买的时候,is_spec是切换规格的时候
  3999 + check_is_youhui: async function (gid, is_nor, is_spec) {
  4000 + var th = this;
  4001 + var user_id = getApp().globalData.user_id;
  4002 + if (!user_id) user_id = 0;
  4003 +
  4004 + //普通购买的时候,重新算一下组合购有没有
  4005 + if (is_nor || is_spec) {
  4006 +
  4007 +
  4008 + th.setData({
  4009 + cx_prom_group: []
  4010 + })
  4011 +
  4012 + var arr3 = null;
  4013 + var url = '/api/weshop/activitylist/listGoodActInfo2New';
  4014 + var req_d = {
  4015 + "store_id": os.stoid,
  4016 + "goods_id": gid,
  4017 + "user_id": user_id,
  4018 + }
  4019 + await getApp().request.promiseGet(url, {
  4020 + data: req_d,
  4021 + }).then(e => {
  4022 + if (e.data.code == 0 && e.data.data && e.data.data.length > 0) {
  4023 + var arr = e.data.data;
  4024 + if (arr.length) {
  4025 + arr3 = arr.filter(function (e) {
  4026 + return e.s_time < ut.gettimestamp() && e.prom_type == 7;
  4027 + })
  4028 + }
  4029 + }
  4030 + })
  4031 +
  4032 + if (arr3 && arr3.length > 0) {
  4033 + //获取活动信息
  4034 + var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + arr3[0].act_id + "/" + getApp().globalData.user_id;
  4035 + await getApp().request.promiseGet(url, {
  4036 +
  4037 + }).then(e => {
  4038 + if (e.data.code == 0 && e.data.data) {
  4039 + if (ut.gettimestamp() < e.data.data.start_time) {
  4040 + return false;
  4041 + }
  4042 + if (e.data.data.is_end == 0 && ut.gettimestamp() < e.data.data.end_time) {
  4043 + //-- 获取商品列表 --
  4044 +
  4045 + if (is_spec) {
  4046 + th.setData({
  4047 + zh_act: e.data.data
  4048 + })
  4049 + } else {
  4050 + th.data.zh_act = e.data.data;
  4051 + }
  4052 +
  4053 + th.getUserBuyPromNum(e.data.data.id)
  4054 + }
  4055 + }
  4056 + })
  4057 + }
  4058 + }
  4059 +
  4060 + var r_data = null;
  4061 +
  4062 +
  4063 + //-- 如果有组合购的时候 --
  4064 + if (th.data.zh_act) {
  4065 + var show_time = ut.formatTime(th.data.zh_act.start_time) + "至" + ut.formatTime(th.data.zh_act.end_time);
  4066 + //-- 开始组装数据 --
  4067 + th.add_cx_prom_group({
  4068 + id: th.data.zh_act.id,
  4069 + title: th.data.zh_act.name,
  4070 + show_time: show_time,
  4071 + prom_type: 7
  4072 + });
  4073 + }
  4074 +
  4075 + //调用接口判断订单优惠,
  4076 + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromListNew1/" + os.stoid + "/" + gid + "/0" + "/" + user_id, {}).then(async res => {
  4077 + if (res.data.code == 0 && res.data.data) {
  4078 + r_data = res.data.data;
  4079 + var max = 0,
  4080 + min = 0;
  4081 +
  4082 + //如果是搭配购的时候
  4083 + if (r_data.collocationList) {
  4084 + for (var i in r_data.collocationList) {
  4085 + if (max == 0) max = r_data.collocationList[i].price;
  4086 + if (min == 0) min = r_data.collocationList[i].price;
  4087 +
  4088 + if (max < parseFloat(r_data.collocationList[i].price)) max = r_data.collocationList[i].price;
  4089 + if (min > parseFloat(r_data.collocationList[i].price)) min = r_data.collocationList[i].price;
  4090 + }
  4091 + r_data.collocationPromList.max = (max + th.data.data.shop_price).toFixed(2);
  4092 + r_data.collocationPromList.min = (min + th.data.data.shop_price).toFixed(2);
  4093 + var show_price = '¥' + r_data.collocationPromList.max + '-' + r_data.collocationPromList.min;
  4094 + var show_time = ut.formatTime(r_data.collocationPromList.start_time) + "至" + ut.formatTime(r_data.collocationPromList.end_time);
  4095 +
  4096 + //-- 开始组装数据 --
  4097 + th.add_cx_prom_group({
  4098 + id: r_data.collocationPromList.id,
  4099 + title: r_data.collocationPromList.title,
  4100 + show_price: show_price,
  4101 + show_time: show_time,
  4102 + prom_type: 5,
  4103 + main_gid: gid
  4104 + });
  4105 + }
  4106 +
  4107 +
  4108 +
  4109 + //优惠促销的时候
  4110 + if (r_data.promGoodsLists) {
  4111 +
  4112 + var fir_act = r_data.promGoodsLists[0];
  4113 + var is_yh_out_limit = 0;
  4114 +
  4115 +
  4116 + //-- 计算一下限购,满足限购数才显示 --
  4117 + if (fir_act.limit_num) {
  4118 + await this.getUserBuyPromNum_pre(fir_act.prom_id);
  4119 + if (th.data.user_pre_buynum >= fir_act.limit_num) {
  4120 + is_yh_out_limit = 1;
  4121 + }
  4122 + }
  4123 +
  4124 + //如果是有限购的时候
  4125 + if (fir_act.gd_limit_num > 0 && !is_yh_out_limit) {
  4126 + var lrs = {
  4127 + store_id: os.stoid,
  4128 + user_id: user_id,
  4129 + goods_id: gid,
  4130 + prom_type: 3,
  4131 + prom_id: fir_act.prom_id, isnew: 1
  4132 + };
  4133 + var gd_limit_rs = await getApp().promiseGet('/api/weshop/ordergoods/getUserBuyGoodsNum', { data: lrs });
  4134 + var pro_by_num = 0;
  4135 + if (gd_limit_rs && gd_limit_rs.data.code == 0) {
  4136 + pro_by_num = gd_limit_rs.data.data.promgoodsbuynum
  4137 + }
  4138 + if (pro_by_num >= fir_act.gd_limit_num) {
  4139 + is_yh_out_limit = 1;
  4140 + }
  4141 + }
  4142 + //-- 如果超出限购,就不显示了 --
  4143 + if (!is_yh_out_limit) {
  4144 + var more_arr = ut.format_yh_act(fir_act);
  4145 +
  4146 + var limit = '每人' + (fir_act.limit_num ? '限参与' + fir_act.limit_num + '次' : '参与不限次');
  4147 + if (fir_act.gd_limit_num > 0) {
  4148 + limit += ",限购" + fir_act.gd_limit_num + "件";
  4149 + }
  4150 +
  4151 + //-- 开始组装数据 --
  4152 + th.add_cx_prom_group({
  4153 + id: fir_act.prom_id,
  4154 + condition: fir_act.condition + (fir_act.prom_type == 1 ? '件' : '元'),
  4155 + limit: limit,
  4156 + gd_limit_num: fir_act.gd_limit_num > 0 ? fir_act.gd_limit_num : 0,
  4157 + more: more_arr,
  4158 + prom_type: 3,
  4159 + promGoodsListsDtos: r_data.promGoodsLists,
  4160 + is_yh_out_limit: is_yh_out_limit
  4161 + });
  4162 + }
  4163 +
  4164 + }
  4165 +
  4166 + //普通购买不在界面显示
  4167 + if (is_nor) {
  4168 + th.data.collocationGoods = r_data.collocationPromList;
  4169 + th.data.prom_goods = r_data.promGoodsLists;
  4170 + } else {
  4171 + th.setData({
  4172 + order_prom: r_data.promOrder,
  4173 + collocationGoods: r_data.collocationPromList,
  4174 + prom_goods: r_data.promGoodsLists,
  4175 + })
  4176 + }
  4177 +
  4178 +
  4179 + }
  4180 + })
  4181 +
  4182 +
  4183 + //-- 如果有阶梯购的时候 --
  4184 + if (r_data && r_data.ladderLists) {
  4185 + var act_id = r_data.ladderLists[0].form_id;
  4186 + //-- 判断会员能不能参与阶梯促销 --
  4187 + await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => {
  4188 + if (res.data.code == 0 && res.data.data) {
  4189 + var prom_content = "";
  4190 + //暂定优惠促销还不能重叠
  4191 + // if (res.data.data.good_object == 0 && (r_data.promGoodsLists || th.data.zh_act)) {
  4192 + // return false;
  4193 + // }
  4194 + // if (res.data.data.good_object == 1) {
  4195 + // r_data.promGoodsLists = null;
  4196 + // }
  4197 +
  4198 + for (let jj in r_data.ladderLists) {
  4199 + if (r_data.ladderLists[jj].discount == 10) {
  4200 + prom_content += "第" + (parseInt(jj) + 1) + "件原价,";
  4201 + } else {
  4202 + prom_content += "第" + (parseInt(jj) + 1) + "件" + r_data.ladderLists[jj].discount + "折,";
  4203 + }
  4204 + }
  4205 + prom_content = ut.sub_last(prom_content);
  4206 + th.data.prom_type = 10;
  4207 + th.data.prom_id = act_id;
  4208 + th.setData({
  4209 + jieti_prom: prom_content,
  4210 + ladder_act_id: act_id
  4211 + })
  4212 +
  4213 + //-- 组装一下阶梯促销 --
  4214 + var s_time = res.data.data.start_time;
  4215 + var e_time = res.data.data.end_time;
  4216 + th.add_cx_prom_group({
  4217 + id: act_id,
  4218 + title: prom_content,
  4219 + show_time: ut.formatTime(s_time) + "至" + ut.formatTime(e_time),
  4220 + prom_type: 10
  4221 + });
  4222 +
  4223 + }
  4224 + })
  4225 + }
  4226 +
  4227 + th.is_show_more_buy();
  4228 +
  4229 + //-- 如果有促销活动也算是有参与活动,参与活动的也统一不进行计算起订的数量 --
  4230 + this.data.is_act = 0;
  4231 + if (this.data.zh_act || this.data.prom_goods || this.data.jieti_prom || this.data.collocationGoods) {
  4232 + this.data.is_act = 1;
  4233 + }
  4234 +
  4235 + console.log("11111111-gd");
  4236 + console.log(th.data.sele_g);
  4237 +
  4238 + //-- 更新默认购买的数量 ---
  4239 + var mo_num = getApp().get_limit_qty(th.data.sele_g, this.data.is_act);
  4240 + this.setData({
  4241 + goodsInputNum: mo_num
  4242 + })
  4243 + this.setData({
  4244 + mo_num: mo_num
  4245 + })
  4246 + },
  4247 + //获取促销活动的组合
  4248 + add_cx_prom_group(data) {
  4249 + var th = this;
  4250 + getApp().getConfig2(function (e) {
  4251 + //需要读者系统顺序
  4252 + var json_d = JSON.parse(e.switch_list);
  4253 + var auto_promote_sale = json_d.auto_promote_sale;
  4254 + if (auto_promote_sale) {
  4255 + var auto_promote_sale = auto_promote_sale.split(',');
  4256 + var fd = auto_promote_sale.indexOf(data.prom_type + '');
  4257 + data.sort = fd;
  4258 + } else {
  4259 + data.sort = data.prom_type;
  4260 + }
  4261 +
  4262 + var fdix = th.data.cx_prom_group.findIndex(function (em) {
  4263 + return em.prom_type == data.prom_type
  4264 + })
  4265 +
  4266 + if (fdix > -1) {
  4267 + th.data.cx_prom_group.splice(fdix, 1);
  4268 + }
  4269 +
  4270 + th.data.cx_prom_group.push(data);
  4271 +
  4272 + //-- 排序一下 --
  4273 + function comp(a, b) {
  4274 + return a.sort - b.sort; //升序
  4275 + }
  4276 + var ppdata = th.data.cx_prom_group;
  4277 + //使用sort排序
  4278 + ppdata.sort(comp);
  4279 +
  4280 + th.setData({
  4281 + cx_prom_group: ppdata
  4282 + })
  4283 +
  4284 + })
  4285 + },
  4286 + find_lock_num(pick_id, lock) {
  4287 + var lock_num = 0;
  4288 + if (!lock) return 0;
  4289 + if (lock.length < 0) return 0;
  4290 + for (var i in lock) {
  4291 + if (pick_id == lock[i].pickupId) {
  4292 + lock_num += lock[i].outQty;
  4293 + }
  4294 + }
  4295 + return lock_num;
  4296 + },
  4297 + //--- 获取默认的促销活动的默认活动 ---
  4298 + check_prom_custom(ind) {
  4299 + if (ind) {
  4300 + if (!this.data.cx_prom_group.length) return 0;
  4301 + } else {
  4302 + if (!this.data.cx_prom_group.length) return {
  4303 + prom_type: 0,
  4304 + id: 0
  4305 + };
  4306 + }
  4307 +
  4308 + var prom = null;
  4309 + prom = JSON.parse(JSON.stringify(this.data.cx_prom_group[0]));
  4310 +
  4311 + //-- 要判断有没有超出限购 --
  4312 + if (prom.prom_type == 3 && prom.is_yh_out_limit) {
  4313 + if (this.data.cx_prom_group.length > 1) {
  4314 + prom = this.data.cx_prom_group[1];
  4315 + } else {
  4316 + prom.prom_type = 0;
  4317 + prom.id = 0;
  4318 + }
  4319 + }
  4320 +
  4321 + if (ind) {
  4322 + return prom.prom_type;
  4323 + }
  4324 + return prom;
  4325 + },
  4326 + // 选择门店
  4327 + choice_store: function (ee) {
  4328 + var th = this;
  4329 + var ind = ee.currentTarget.dataset.ind;
  4330 + var bconfig = th.data.bconfig;
  4331 + this.setData({
  4332 + keyword: ''
  4333 + })
  4334 + //--先判断会员状态--
  4335 + var user_info = getApp().globalData.userInfo;
  4336 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  4337 + wx.navigateTo({
  4338 + url: '/packageE/pages/togoin/togoin',
  4339 + })
  4340 + return false;
  4341 + }
  4342 +
  4343 +
  4344 + //如果开启了,则不在选择门店
  4345 + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  4346 + return false;
  4347 + }
  4348 +
  4349 + if (!th.data.only_pk && !th.data.def_pickpu_list && !th.data.change) {
  4350 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  4351 + wx.showToast({
  4352 + title: '门店库存不足',
  4353 + icon: 'none',
  4354 + });
  4355 + return false;
  4356 + }
  4357 + th.data.change = 0;
  4358 +
  4359 + if (th.data.only_pk && !th.data.only_pk.length) {
  4360 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  4361 + wx.showToast({
  4362 + title: '门店库存不足',
  4363 + icon: 'none',
  4364 + });
  4365 + return false;
  4366 + }
  4367 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  4368 + // getApp().confirmBox("门店库存不足", null, 25000, !1);
  4369 + wx.showToast({
  4370 + title: '门店库存不足',
  4371 + icon: 'none',
  4372 + });
  4373 + return false;
  4374 + }
  4375 +
  4376 + //如果开启了,则不在选择门店
  4377 + if (th.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  4378 + return false;
  4379 + }
  4380 +
  4381 +
  4382 +
  4383 + if (bconfig && bconfig.is_sort_storage) {
  4384 + wx.getLocation({
  4385 + type: 'gcj02',
  4386 + success: function (res) {
  4387 +
  4388 + th.data.lat = res.latitude;
  4389 + th.data.lon = res.longitude;
  4390 + th.data.is_get_local_ok = 1;
  4391 + th.setData({
  4392 + is_gps: 1
  4393 + });
  4394 + //th.onShow();
  4395 + th.get_sto(th.data.is_normal);
  4396 + },
  4397 + fail: function (res) {
  4398 +
  4399 +
  4400 +
  4401 + //th.onShow();
  4402 + th.data.is_get_local_ok = 1;
  4403 + th.get_sto(th.data.is_normal);
  4404 + if (res.errCode == 2) {
  4405 + th.setData({
  4406 + is_gps: 0
  4407 + });
  4408 + if (th.data.is_gps == 0) {
  4409 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  4410 + }
  4411 + } else {
  4412 + th.setData({
  4413 + is_gps: "3"
  4414 + });
  4415 + }
  4416 +
  4417 + }
  4418 + })
  4419 + } else {
  4420 + th.data.is_get_local_ok = 1;
  4421 + th.get_sto(th.data.is_normal);
  4422 + }
  4423 +
  4424 + if (ind != undefined && ind != null) {
  4425 + this.setData({
  4426 + open_ind_store: ind,
  4427 + store: 1,
  4428 + openSpecModal: !1,
  4429 + openSpecModal_pt: !1,
  4430 + openSpecModal_flash_normal: !1,
  4431 + })
  4432 + } else {
  4433 + this.setData({
  4434 + store: 1,
  4435 + openSpecModal: !1,
  4436 + openSpecModal_pt: !1,
  4437 + openSpecModal_flash_normal: !1
  4438 +
  4439 + })
  4440 + }
  4441 + },
  4442 +
  4443 + //关闭选择门店
  4444 + close_popup: function (e) {
  4445 + var th = this;
  4446 + this.setData({
  4447 + store: 0,
  4448 + choice_sort_store: 0,
  4449 + sort_store: 0,
  4450 + fir_pick_index: 0,
  4451 + sec_pick_index: 0
  4452 + })
  4453 +
  4454 + var openindstore = this.data.open_ind_store;
  4455 + if (openindstore == 1) {
  4456 + th.setData({
  4457 + openSpecModal: !0,
  4458 + openSpecModal_ind: openindstore,
  4459 + });
  4460 + } else if (openindstore == 2) {
  4461 + th.setData({
  4462 + openSpecModal: !0,
  4463 + openSpecModal_ind: openindstore,
  4464 + });
  4465 + } else if (openindstore == 4) { //4就是拼团
  4466 + th.setData({
  4467 + openSpecModal_pt: 1, //打开拼团购买界面
  4468 + store: 0, //关闭门店
  4469 + choice_sort_store: 0, //关闭门店2级
  4470 + sort_store: 0, //关闭门店2级
  4471 + });
  4472 + } else {
  4473 + th.setData({
  4474 + store: 0,
  4475 + choice_sort_store: 0,
  4476 + sort_store: 0
  4477 + })
  4478 + }
  4479 +
  4480 +
  4481 + },
  4482 + choose_for_store_fir: function (e) {
  4483 + var index_c = e.currentTarget.dataset.ind;
  4484 + var th = this;
  4485 + th.setData({
  4486 + fir_pick_index: index_c
  4487 + })
  4488 +
  4489 + },
  4490 + //选择更多门店
  4491 + more_store: function () {
  4492 + this.setData({
  4493 + sort_store: 1
  4494 + });
  4495 + },
  4496 + check_guide(func) {
  4497 + var first_leader = getApp().globalData.first_leader;
  4498 + if (!first_leader) {
  4499 + func();
  4500 + return false;
  4501 + }
  4502 + if (this.data.is_geted_guide_pick) {
  4503 + func();
  4504 + return false;
  4505 + }
  4506 +
  4507 + if (getApp().globalData.guide_pick_id) {
  4508 + func();
  4509 + return false;
  4510 + }
  4511 + var th = this;
  4512 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  4513 + if (res.data.code == 0) {
  4514 + getApp().globalData.guide_pick_id = res.data.data.pickup_id;
  4515 + }
  4516 + th.data.is_geted_guide_pick = 1;
  4517 + func();
  4518 + })
  4519 + },
  4520 +
  4521 + //确定def_pick为选择的门店
  4522 + sure_pick: function (e) {
  4523 + var th = this;
  4524 + var item = null;
  4525 + var openindstore = parseInt(th.data.open_ind_store);
  4526 +
  4527 + if (th.data.choice_sort_store == 0) {
  4528 + var index = th.data.fir_pick_index;
  4529 + if (th.data.is_show_sto_cat == 1) {
  4530 + item = th.data.def_pickpu_list[index];
  4531 + } else {
  4532 + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候
  4533 + }
  4534 +
  4535 + } else {
  4536 + var index = th.data.sec_pick_index;
  4537 + item = th.data.sec_sto.s_arr[index];
  4538 + }
  4539 +
  4540 + if (!item) return false;
  4541 +
  4542 + if (item.is_no_dis_nor || (item.is_no_dis_act && !th.data.is_normal)) {
  4543 + wx.showToast({
  4544 + title: "该门店不可售,请选择其他门店",
  4545 + icon: 'none',
  4546 + duration: 2000
  4547 + });
  4548 + return false;
  4549 + }
  4550 +
  4551 +
  4552 + if (!th.data.sele_g) return false;
  4553 + //判断门店的配送方式是不是匹配
  4554 + var g_distr_type = th.data.sele_g.distr_type;
  4555 + if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) {
  4556 + wx.showToast({
  4557 + title: "门店配送方式不匹配,请选择其他门店",
  4558 + icon: 'none',
  4559 + duration: 2000
  4560 + });
  4561 + return false;
  4562 + }
  4563 +
  4564 + //--回调函数的用法--
  4565 + th.check_the_pick(item, function () {
  4566 + th.setData({
  4567 + def_pick_store: item,
  4568 + sto_sele_name: item.pickup_name,
  4569 + sto_sele_id: item.pickup_id,
  4570 + sto_sele_distr: item.distr_type,
  4571 + store: 0,
  4572 + choice_sort_store: 0,
  4573 + fir_pick_index: 0
  4574 + });
  4575 +
  4576 + switch (openindstore) {
  4577 + case 1:
  4578 + th.setData({
  4579 + openSpecModal: !0,
  4580 + openSpecModal_ind: openindstore,
  4581 + });
  4582 + break;
  4583 + case 2:
  4584 + th.setData({
  4585 + openSpecModal: !0,
  4586 + openSpecModal_ind: openindstore,
  4587 + });
  4588 + break;
  4589 + case 4:
  4590 + th.setData({
  4591 + openSpecModal_pt: 1, //打开拼团购买界面
  4592 + store: 0, //关闭门店
  4593 + choice_sort_store: 0, //关闭门店2级
  4594 + sort_store: 0, //关闭门店2级
  4595 + });
  4596 + break;
  4597 + case 5:
  4598 + th.setData({
  4599 + openSpecModal_flash_normal: 1, //打开拼团购买界面
  4600 + store: 0, //关闭门店
  4601 + choice_sort_store: 0, //关闭门店2级
  4602 + sort_store: 0, //关闭门店2级
  4603 + });
  4604 + break;
  4605 + default:
  4606 + th.setData({
  4607 + store: 0,
  4608 + choice_sort_store: 0,
  4609 + sort_store: 0
  4610 + })
  4611 + break
  4612 + }
  4613 +
  4614 + //如果商品没有其他活动,要取一下线下价格
  4615 + th.get_off_price();
  4616 + })
  4617 + },
  4618 + //---点击二级之后的选择---
  4619 + choose_for_store: function (e) {
  4620 + var index_c = e.currentTarget.dataset.ind;
  4621 + var th = this;
  4622 + th.setData({
  4623 + sec_pick_index: index_c,
  4624 + fir_pick_index: index_c
  4625 + })
  4626 +
  4627 + },
  4628 + //把选择的门店设置成默认的门店def_pick
  4629 + set_def_pick: function (e) {
  4630 + var th = this;
  4631 + var item = null;
  4632 + if (th.data.choice_sort_store == 0) {
  4633 + var index = th.data.fir_pick_index;
  4634 + if (th.data.is_show_sto_cat == 1) {
  4635 + item = th.data.def_pickpu_list[index];
  4636 + } else {
  4637 + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候
  4638 + }
  4639 + } else {
  4640 + var index = th.data.sec_pick_index;
  4641 + item = th.data.sec_sto.s_arr[index];
  4642 + }
  4643 +
  4644 + if (!item) return false;
  4645 +
  4646 + //判断门店的配送方式是不是匹配
  4647 + var g_distr_type = th.data.sele_g.distr_type;
  4648 + if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) {
  4649 + wx.showToast({
  4650 + title: "门店配送方式不匹配",
  4651 + icon: 'none',
  4652 + duration: 2000
  4653 + });
  4654 + return false;
  4655 + }
  4656 +
  4657 + //先设置之前,要判断是不是有库存
  4658 + th.check_the_pick(item, function () {
  4659 + var store_id = o.stoid;
  4660 + var user_id = getApp().globalData.user_id;
  4661 + var def_pickup_id = item.pickup_id;
  4662 +
  4663 + getApp().request.put('/api/weshop/users/update', {
  4664 + data: {
  4665 + user_id: user_id,
  4666 + def_pickup_id: def_pickup_id
  4667 + },
  4668 + success: function (res) {
  4669 + if (res.data.code == 0) {
  4670 + if (th.data.choice_sort_store == 0) th.setData({
  4671 + fir_pick_index: 0
  4672 + });
  4673 + getApp().globalData.pk_store = item;
  4674 + } else {
  4675 + //s.showWarning("设置默认门店地址失败", null, 500, !1);
  4676 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  4677 + }
  4678 +
  4679 + }
  4680 + });
  4681 +
  4682 + th.setData({
  4683 + def_pick_store: item,
  4684 + sto_sele_name: item.pickup_name,
  4685 + sto_sele_id: item.pickup_id,
  4686 + sto_sele_distr: item.distr_type,
  4687 + store: 0,
  4688 + choice_sort_store: 0
  4689 + });
  4690 +
  4691 + var openindstore = th.data.open_ind_store;
  4692 + if (openindstore == 1) {
  4693 + th.setData({
  4694 + openSpecModal: !0,
  4695 + openSpecModal_ind: openindstore,
  4696 + store: 0,
  4697 + choice_sort_store: 0,
  4698 + sort_store: 0,
  4699 + });
  4700 + } else if (openindstore == 2) {
  4701 + th.setData({
  4702 + openSpecModal: !0,
  4703 + openSpecModal_ind: openindstore,
  4704 + store: 0,
  4705 + choice_sort_store: 0,
  4706 + sort_store: 0,
  4707 + });
  4708 + } else if (openindstore == 4) { //4就是拼团
  4709 + th.setData({
  4710 + openSpecModal_pt: 1, //打开拼团购买界面
  4711 + store: 0, //关闭门店
  4712 + choice_sort_store: 0, //关闭门店2级
  4713 + sort_store: 0, //关闭门店2级
  4714 + });
  4715 + } else {
  4716 + th.setData({
  4717 + store: 0,
  4718 + choice_sort_store: 0,
  4719 + sort_store: 0,
  4720 + })
  4721 + }
  4722 +
  4723 + //如果商品没有其他活动,要取一下线下价格
  4724 + th.get_off_price();
  4725 +
  4726 + })
  4727 + },
  4728 +
  4729 +
  4730 + get_user_store() {
  4731 +
  4732 + var th = this;
  4733 + var that = this;
  4734 + //--获取用户的默认门店
  4735 + getApp().get_user_store(function (e) {
  4736 + if (!e) {
  4737 + th.data.fir_def_store = {}; //赋值空对象
  4738 + return false;
  4739 + }
  4740 + if (getApp().globalData.is_dj_pk) th.setData({
  4741 + has_def: 1
  4742 + });
  4743 +
  4744 + var ee = JSON.parse(JSON.stringify(e));
  4745 +
  4746 + //--定时器推迟一下--
  4747 + var appd = getApp().globalData;
  4748 + w_time = setInterval(function () {
  4749 + if (that.data.is_get_local_ok == 0) return false;
  4750 + if (!that.data.sele_g) return false;
  4751 + if (th.data.fir_goods) var g_distr_type = th.data.fir_goods.distr_type;
  4752 + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对--
  4753 + if (ee.distr_type != 0 && g_distr_type != 0 && ee.distr_type != g_distr_type) {
  4754 + ee.is_no_dis = 1;
  4755 + }
  4756 +
  4757 + //-- 如果有指定门店的时候,pickup_ids是经过判断是不是普通商品后才会有的 --
  4758 + if (th.data.sele_g && th.data.sele_g.pickup_ids && th.data.prom_type == 0) {
  4759 + var idx = th.data.sele_g.pickup_ids.findIndex(function (e) {
  4760 + return e.pickup_id == ee.pickup_id;
  4761 + })
  4762 + if (idx < 0) {
  4763 + ee.is_no_dis_nor = 1;
  4764 + }
  4765 + }
  4766 +
  4767 + clearInterval(w_time);
  4768 + var distance = null;
  4769 + var e = JSON.parse(JSON.stringify(ee));
  4770 +
  4771 + //如果有开启近距离的话,同时距离优不一样了
  4772 + if (that.data.lat != null) {
  4773 + //如果经纬度有变化的话
  4774 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  4775 + that.set_def_storage(e);
  4776 + } else {
  4777 + //要用接口是获取距离,js的计算不准
  4778 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  4779 + data: {
  4780 + store_id: os.stoid,
  4781 + pickup_id: e.pickup_id,
  4782 + lat: th.data.lat,
  4783 + lon: th.data.lon,
  4784 + isstop: 0,
  4785 + is_pos: 1
  4786 + },
  4787 + }).then(res => {
  4788 + if (res.data.code == 0) {
  4789 + e = res.data.data.pageData[0];
  4790 + if (e) {
  4791 + e.is_no_dis = ee.is_no_dis;
  4792 + appd.pk_store = e;
  4793 + that.set_def_storage(e);
  4794 + }
  4795 +
  4796 + }
  4797 + })
  4798 + }
  4799 + //e.distance = distance;
  4800 + appd.lat = that.data.lat;
  4801 + appd.lon = that.data.lon;
  4802 +
  4803 + } else {
  4804 + if (e) {
  4805 + e.distance = null;
  4806 + that.set_def_storage(e);
  4807 + }
  4808 + }
  4809 + }, 200)
  4810 +
  4811 + });
  4812 + },
  4813 + //如果开启线下库存,已经急速库存才会使用
  4814 + check_the_pick(item, func) {
  4815 + var th = this;
  4816 + var goodsinfo = th.data.sele_g;
  4817 + var erpwareid = goodsinfo.erpwareid;
  4818 + var plist = null;
  4819 + var lock = 0;
  4820 +
  4821 + //---如果是活动的时候,同时不是普通购买---
  4822 + 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)) {
  4823 + func();
  4824 + return false;
  4825 + }
  4826 +
  4827 + if (this.data.sales_rules == 1) {
  4828 + func();
  4829 + } else {
  4830 + // if (plist && plist.CanOutQty - lock > 0) {
  4831 + // item.CanOutQty = plist.CanOutQty - lock;
  4832 + // func();
  4833 + // return false;
  4834 + // }
  4835 + this.check_CanOutQty(goodsinfo, item, function (CanOutQty) {
  4836 +
  4837 + // let str = item.pickup_name + '库存不足!';
  4838 + if (!CanOutQty) {
  4839 + wx.showToast({
  4840 + title: item.pickup_name + '库存不足!',
  4841 + icon: 'none',
  4842 + });
  4843 + return false;
  4844 + }
  4845 + item.CanOutQty = CanOutQty;
  4846 + func();
  4847 +
  4848 + });
  4849 +
  4850 + }
  4851 + },
  4852 + //----获取线下价格-------
  4853 + get_off_price() {
  4854 + var th = this;
  4855 + //没有开启就返回
  4856 + if (!th.data.is_open_offline) return false;
  4857 + //先看下购买的功能有没有到期
  4858 + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=6", {}).then(res => {
  4859 + //未购买
  4860 + if (res.data.code != 0 || !res.data.data || !res.data.data.pageData || !res.data.data.pageData.length) {
  4861 + return false;
  4862 + } else {
  4863 + //已经过期
  4864 + var item = res.data.data.pageData[0];
  4865 + if (item.end_time < ut.gettimestamp()) {
  4866 + return false;
  4867 + }
  4868 + }
  4869 +
  4870 +
  4871 + var cur_goods = this.data.sele_g;
  4872 + var cur_price = cur_goods.shop_price;
  4873 + if (th.data.card_field && cur_goods[th.data.card_field] > 0) {
  4874 + cur_price = cur_goods[th.data.card_field];
  4875 + }
  4876 +
  4877 + var user_info = getApp().globalData.userInfo;
  4878 + //获取一下接口,判断是不是有线下接口,必须是普通商品,全局优惠活动也是不行
  4879 + if (cur_goods.prom_type == 0 && !this.data.prom_goods) {
  4880 + cur_goods.offline_price = null;
  4881 + //如果没有门店,不用计算线下价格
  4882 + var def_pick_store = this.data.def_pick_store;
  4883 + if (!def_pick_store) return false;
  4884 + getApp().request.get("/api/weshop/goods/listWarePrice", {
  4885 + data: {
  4886 + VIPId: encodeURIComponent(user_info.erpvipid),
  4887 + store_id: os.stoid,
  4888 + PickupId: def_pick_store.pickup_id,
  4889 + WareIds: encodeURIComponent(cur_goods.erpwareid)
  4890 + },
  4891 + success: function (res) {
  4892 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  4893 + var datalist = res.data.data;
  4894 + if (datalist[0].WarePrice < cur_price) {
  4895 + cur_goods.offline_price = datalist[0].WarePrice; //存储线下活动的价格
  4896 + cur_goods.pricing_type = datalist[0].PriceType; //存储线下活动的类型
  4897 + }
  4898 + }
  4899 + th.setData({
  4900 + sele_g: cur_goods
  4901 + });
  4902 + }
  4903 +
  4904 + })
  4905 + }
  4906 +
  4907 + })
  4908 +
  4909 +
  4910 + },
  4911 + //--- 设置一下默认库存的数量 ----
  4912 + set_def_storage(ee) {
  4913 + var that = this,
  4914 + th = this;
  4915 + getApp().getConfig2(function (e) {
  4916 + var sales_rules = e.sales_rules;
  4917 + if (sales_rules >= 2 && [1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) == -1 && !th.data.sele_g.whsle_id) {
  4918 + getApp().waitfor2(that, "wait_for_user_store", "fir_goods", function () {
  4919 + var lock = 0,
  4920 + plist = null;
  4921 + var gd = that.data.fir_goods;
  4922 + //先读取门店的lock,采用链式写法,少用await
  4923 + // getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
  4924 + // data: {
  4925 + // store_id: os.stoid,
  4926 + // wareId: that.data.fir_goods.goods_id,
  4927 + // storageId: ee.pickup_id,
  4928 + // pageSize: 1000
  4929 + // }
  4930 + // }).then(res => {
  4931 + // if (res.data.code == 0 && res.data.data.total > 0) {
  4932 + // for (var i in res.data.data.pageData)
  4933 + // lock += res.data.data.pageData[i].outQty
  4934 + // }
  4935 + // //---通过接口获取门店的线下库存信息--
  4936 + // return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
  4937 + // data: {
  4938 + // storageNos: ee.pickup_no,
  4939 + // wareIds: encodeURIComponent(th.data.data.erpwareid),
  4940 + // storeId: os.stoid
  4941 + // }
  4942 + // })
  4943 + // }).then(res => {
  4944 + // if (res.data.code == 0 && res.data.data.total > 0) {
  4945 + // plist = res.data.data.pageData[0];
  4946 + // } else {
  4947 + // wx.showToast({
  4948 + // title: '库存不足,请更换其他门店',
  4949 + // icon: 'none',
  4950 + // });
  4951 + // }
  4952 + //
  4953 + // if (plist && plist.CanOutQty - lock > 0) {
  4954 + // ee.CanOutQty = plist.CanOutQty - lock;
  4955 + // } else {
  4956 + // ee.CanOutQty = 0;
  4957 + // }
  4958 + // //--给门店赋值线下库存--
  4959 + // that.data.fir_def_store = ee;
  4960 + // that.setData({
  4961 + // def_pick_store: ee,
  4962 + // sto_sele_name: ee.pickup_name,
  4963 + // sto_sele_id: ee.pickup_id,
  4964 + // sto_sele_distr: ee.distr_type
  4965 + // })
  4966 + // })
  4967 + //最新的获取线下门店库存
  4968 + th.check_CanOutQty(gd, ee, function (CanOutQty) {
  4969 + ee.CanOutQty = CanOutQty;
  4970 + //--给门店赋值线下库存--
  4971 + that.data.fir_def_store = ee;
  4972 + that.setData({
  4973 + def_pick_store: ee,
  4974 + sto_sele_name: ee.pickup_name,
  4975 + sto_sele_id: ee.pickup_id,
  4976 + sto_sele_distr: ee.distr_type
  4977 + })
  4978 + })
  4979 +
  4980 +
  4981 + })
  4982 + } else {
  4983 + that.data.fir_def_store = ee;
  4984 + that.setData({
  4985 + def_pick_store: ee,
  4986 + sto_sele_name: ee.pickup_name,
  4987 + sto_sele_id: ee.pickup_id,
  4988 + sto_sele_distr: ee.distr_type
  4989 + })
  4990 + }
  4991 + })
  4992 +
  4993 + },
  4994 + wait_for_store_config: function () {
  4995 + var th = this;
  4996 + //----获取系统参数-----
  4997 + getApp().getConfig2(function (e) {
  4998 + th.setData({
  4999 + bconfig: e,
  5000 + });
  5001 + })
  5002 + t_time = setInterval(function () {
  5003 +
  5004 +
  5005 + if (th.data.bconfig == null) false;
  5006 + var e = th.data.bconfig;
  5007 + if (e && e.is_sort_storage) {
  5008 +
  5009 +
  5010 + wx.getLocation({
  5011 + type: 'gcj02',
  5012 + success: function (res) {
  5013 + th.data.lat = res.latitude;
  5014 + th.data.lon = res.longitude;
  5015 + th.data.is_get_local_ok = 1;
  5016 + },
  5017 + fail: function (res) {
  5018 + if (res.errCode == 2) {
  5019 + th.setData({
  5020 + is_gps: 0
  5021 + });
  5022 + if (th.data.is_gps == 0) {
  5023 + getApp().confirmBox("请开启GPS定位", null, 10000, !1);
  5024 + }
  5025 +
  5026 + } else {
  5027 + th.setData({
  5028 + is_gps: "3"
  5029 + });
  5030 + }
  5031 +
  5032 + th.data.is_get_local_ok = 1;
  5033 + }
  5034 + })
  5035 + } else {
  5036 + th.data.is_get_local_ok = 1;
  5037 + }
  5038 + clearInterval(t_time);
  5039 + }, 500)
  5040 + },
  5041 + //获取搜索门店输入的值
  5042 + input_store: function (e) {
  5043 + this.setData({
  5044 + keyword: e.detail.value
  5045 + })
  5046 + },
  5047 + //搜索门店
  5048 + searchfn() {
  5049 + let choice_sort_store = this.data.choice_sort_store
  5050 + if (choice_sort_store == 0) { //全局搜索
  5051 + let all_pick_list = this.data.all_pick_list
  5052 + let def_pickpu_list = this.data.def_pickpu_list
  5053 + let keyword = this.data.keyword
  5054 + if (keyword) {
  5055 + let arr = all_pick_list.filter(item => {
  5056 + let i = item.pickup_name.indexOf(keyword)
  5057 + if (i > -1) {
  5058 + return true
  5059 + } else {
  5060 + return false
  5061 + }
  5062 + })
  5063 + if (arr && arr.length > 0) {
  5064 + if (this.data.is_show_sto_cat == 1) {
  5065 + this.setData({
  5066 + def_pickpu_list: arr
  5067 + })
  5068 + } else {
  5069 + this.setData({
  5070 + only_pk: arr
  5071 + })
  5072 + }
  5073 + } else {
  5074 + wx.showToast({
  5075 + title: '没有搜索到门店',
  5076 + icon: 'none',
  5077 + duration: 2000
  5078 + })
  5079 + }
  5080 + } else {
  5081 + if (this.data.is_show_sto_cat == 1) {
  5082 + this.setData({
  5083 + def_pickpu_list: all_pick_list.slice(0, 10)
  5084 + })
  5085 + } else {
  5086 + this.setData({
  5087 + only_pk: all_pick_list
  5088 + })
  5089 + }
  5090 +
  5091 + }
  5092 + } else { //分类下搜索
  5093 + let sec_i = this.data.sec_i
  5094 + let all_sto = this.data.all_sto
  5095 + let old_all_sto = this.data.old_all_sto
  5096 + if (!old_all_sto) {
  5097 + this.setData({
  5098 + old_all_sto: JSON.parse(JSON.stringify(all_sto))
  5099 + })
  5100 + }
  5101 + let sec_sto = this.data.sec_sto
  5102 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  5103 + let keyword = this.data.keyword
  5104 + let text = 'sec_sto.s_arr'
  5105 + if (keyword) {
  5106 + let arr = sec_arr.filter(item => {
  5107 + let i = item.pickup_name.indexOf(keyword)
  5108 + if (i > -1) {
  5109 + return true
  5110 + } else {
  5111 + return false
  5112 + }
  5113 + })
  5114 + if (arr && arr.length > 0) {
  5115 + this.setData({
  5116 + [text]: arr
  5117 + })
  5118 + } else {
  5119 + wx.showToast({
  5120 + title: '没有搜索到门店',
  5121 + icon: 'none',
  5122 + duration: 2000
  5123 + })
  5124 + }
  5125 + } else {
  5126 + if (this.data.old_all_sto) {
  5127 + this.setData({
  5128 + [text]: this.data.old_all_sto[sec_i].s_arr
  5129 + })
  5130 + } else {
  5131 + this.setData({
  5132 + [text]: all_sto[sec_i].s_arr
  5133 + })
  5134 + }
  5135 + }
  5136 +
  5137 +
  5138 + }
  5139 + },
  5140 + //---选择分类门店---
  5141 + choice_sort_store: function (e) {
  5142 + var index = e.currentTarget.dataset.index;
  5143 + var region_name = e.currentTarget.dataset.region;
  5144 + var item = this.data.all_sto[index];
  5145 + this.setData({
  5146 + region_name: region_name,
  5147 + sort_store: 0,
  5148 + choice_sort_store: 1,
  5149 + sec_sto: item,
  5150 + sec_i: index,
  5151 + sec_pick_index: 0
  5152 + });
  5153 + },
  5154 + // 返回按钮
  5155 + returns: function () {
  5156 + this.setData({
  5157 + sort_store: 0,
  5158 + choice_sort_store: 0
  5159 + });
  5160 + },
  5161 + pop_err_img: function (e) {
  5162 + var txt = e.currentTarget.dataset.errorimg;
  5163 + var ob = {};
  5164 + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  5165 + this.setData(ob);
  5166 + },
  5167 + async getUserBuyPromNum(prom_id,is_zh) {
  5168 + var userInfo = getApp().globalData.userInfo;
  5169 + var url = `/api/weshop/ordergoods/getUserBuyPromNum?store_id=${os.stoid}&user_id=${userInfo.user_id}&prom_type=7&prom_id=${prom_id}`;
  5170 + let res = await getApp().request.promiseGet(url, {
  5171 + data: {}
  5172 + });
  5173 + let userbuynum = 0
  5174 + if (res.data.code == 0 && res.data.data) {
  5175 + userbuynum = res.data.data.userbuynum
  5176 + }
  5177 + this.setData({
  5178 + userbuynum
  5179 + })
  5180 + if(is_zh) this.data.user_zh_buy_num=userbuynum;
  5181 + // return userbuynum
  5182 + },
  5183 +
  5184 +
  5185 + }
  5186 +})
... ...
components/add_purchase/add_purchase.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 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 wx:if="{{add_cart_show}}">
  4 + <view bindtap="closeSpecModal" 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 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 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 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 62 is_get:0,
63 63  
64 64 is_retail_price:0, //是否显示零售价
65   - swiperHeight:0
  65 + swiperHeight:0,
66 66 // action_index:0, //选中的tab项
  67 + add_purchase:false,
67 68 },
68 69  
69 70 lifetimes: {
... ... @@ -626,7 +627,29 @@ Component({
626 627 if (this.data.object.goodscount * this.data.page < this.data.total) {
627 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 2 "component": true,
3 3 "usingComponents": {
4 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 9 \ No newline at end of file
... ...
components/diy_goodsGroup/diy_goodsGroup.wxml
... ... @@ -79,7 +79,7 @@
79 79 </view>
80 80 </view>
81 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 83 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
84 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 85 </view>
... ... @@ -127,7 +127,7 @@
127 127 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
128 128 </view>
129 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 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 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 133 </view>
... ... @@ -175,7 +175,7 @@
175 175 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
176 176 </view>
177 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 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 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 181 </view>
... ... @@ -222,7 +222,7 @@
222 222  
223 223 </view>
224 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 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 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 228 </view>
... ... @@ -277,7 +277,7 @@
277 277 </view>
278 278 </view>
279 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 281 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
282 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 283 </view>
... ... @@ -315,7 +315,7 @@
315 315 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
316 316 </view>
317 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 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 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 321 </view>
... ... @@ -353,7 +353,7 @@
353 353 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
354 354 </view>
355 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 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 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 359 </view>
... ... @@ -448,7 +448,7 @@
448 448 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
449 449 </view>
450 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 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 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 454 </view>
... ... @@ -1360,4 +1360,8 @@
1360 1360 <image style="width: 40rpx; height: 40rpx; " src="{{url}}/miniapp/images/loader.gif"></image>
1361 1361 </view>
1362 1362 </block>
1363   -</view>
1364 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 1369 \ No newline at end of file
... ...
components/diy_public/diy_public.js
... ... @@ -55,7 +55,7 @@ Component({
55 55 },
56 56 nav1:'/packageA/pages/goodsInfo/goodsInfo?',
57 57 nav2:'/pages/goods/goodsInfo/goodsInfo?',
58   -
  58 + add_purchase:false,
59 59 },
60 60  
61 61 pageLifetimes: {
... ... @@ -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 2 "component": true,
3   - "usingComponents": {}
  3 + "usingComponents": {
  4 + "add_purchase": "/components/add_purchase/add_purchase"
  5 + }
4 6 }
5 7 \ No newline at end of file
... ...
components/diy_public/diy_public.wxml
... ... @@ -61,7 +61,7 @@
61 61 </view>
62 62 </view>
63 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 65 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
66 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 67 </view>
... ... @@ -115,7 +115,7 @@
115 115 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view>
116 116 </view>
117 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 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 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 121 </view>
... ... @@ -163,7 +163,7 @@
163 163 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view>
164 164 </view>
165 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 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 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 169 </view>
... ... @@ -214,7 +214,7 @@
214 214  
215 215 </view>
216 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 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 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 220 </view>
... ... @@ -273,7 +273,7 @@
273 273 </view>
274 274 </view>
275 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 277 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
278 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 279 </view>
... ... @@ -315,7 +315,7 @@
315 315 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view>
316 316 </view>
317 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 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 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 321 </view>
... ... @@ -357,7 +357,7 @@
357 357 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view>
358 358 </view>
359 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 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 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 363 </view>
... ... @@ -452,10 +452,10 @@
452 452 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view>
453 453 </view>
454 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 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 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 459 </view>
460 460 </navigator>
461 461 </view>
... ... @@ -464,4 +464,13 @@
464 464 <!-- </swiper> -->
465 465 </block>
466 466 </block>
467   -</block>
468 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 32 success: (res) => {
33 33 var result = res.result;
34 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 67 click_sear:function(){
68 68 //如果搜索的单词为空的时候,就要跳到搜索页
69 69 if(this.data.keyword!=''){
70   - getApp().goto("/pages/goods/search/search");
  70 + getApp().goto("/packageG/pages/goods/search/search");
71 71 return false;
72 72 }
73 73 this.setData({first:0,inputShowed:1,inputval:''});
... ... @@ -94,7 +94,7 @@ Component({
94 94 this.setData({inputval:val});
95 95 },
96 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 98 getApp().goto(url);
99 99 },
100 100  
... ... @@ -108,7 +108,7 @@ Component({
108 108 sear_key:function(e){
109 109 this.data.click_sear=1;
110 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 112 this.data.click_sear=0;
113 113 getApp().goto(url);
114 114  
... ...
components/diy_seckill/diy_seckill.js
... ... @@ -38,7 +38,9 @@ Component({
38 38 user_id:0,
39 39 img_width:100,
40 40 img_height:100,
41   - swiperHeight:0
  41 + swiperHeight:0,
  42 + prom_type:1,
  43 + add_purchase:false,
42 44 },
43 45  
44 46 pageLifetimes: {
... ... @@ -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 2 "component": true,
3   - "usingComponents": {}
  3 + "usingComponents": {
  4 + "add_purchase": "/components/add_purchase/add_purchase"
  5 + }
4 6 }
5 7 \ No newline at end of file
... ...
components/diy_seckill/diy_seckill.wxml
  1 +<wxs module="filter" src="../../utils/filter.wxs"></wxs>
1 2 <block wx:if="{{goods_array.length>0}}">
2 3 <!--新版秒杀组件-->
3 4 <block wx:if="{{object.column_action_name}}">
... ... @@ -56,7 +57,7 @@
56 57 </view>
57 58 </view>
58 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 61 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
61 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 63 </view>
... ... @@ -104,7 +105,7 @@
104 105 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
105 106 </view>
106 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 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 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 111 </view>
... ... @@ -152,7 +153,7 @@
152 153 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
153 154 </view>
154 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 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 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 159 </view>
... ... @@ -199,7 +200,7 @@
199 200  
200 201 </view>
201 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 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 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 206 </view>
... ... @@ -254,7 +255,7 @@
254 255 </view>
255 256 </view>
256 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 259 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" class="imgbox1"></image>
259 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 261 </view>
... ... @@ -292,7 +293,7 @@
292 293 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
293 294 </view>
294 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 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 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 299 </view>
... ... @@ -330,7 +331,7 @@
330 331 <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view>
331 332 </view>
332 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 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 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 337 </view>
... ... @@ -425,7 +426,7 @@
425 426 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
426 427 </view>
427 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 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 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 432 </view>
... ... @@ -571,4 +572,9 @@
571 572 </view>
572 573 <view class='clear'></view>
573 574 </block>
574   -</block>
575 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 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 2 border: 1px solid #adadad; box-shadow: 0 0 10px 2px #adadad; line-height: 28rpx;
3 3 position: fixed; top: 40%; right: 2rpx; display: flex;align-items: center;justify-content: center;}
4 4  
5 5 .cs-img{ width: 36rpx; height: 36rpx;}
6   -.s_title{ font-size: 20rpx;}
7 6 \ No newline at end of file
  7 +.s_title{ font-size: 14rpx;}
8 8 \ No newline at end of file
... ...
components/nav_b/nav_b.js
... ... @@ -9,7 +9,7 @@ Component({
9 9 nav_center: "预约", //导航中间
10 10 nav_right: "我的", //导航右边
11 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 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 46  
47 47 /*------------------------*/
48 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 55 this.data.fir_in=1;
... ... @@ -68,19 +69,25 @@ Page({
68 69  
69 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 93 onUnload: function() {
... ... @@ -289,7 +296,7 @@ Page({
289 296 if(fy) return false;
290 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 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 689 });
683 690 setTimeout(function () {
684 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 694 }, 1000)
688 695  
... ... @@ -728,7 +735,7 @@ Page({
728 735 // });
729 736 // setTimeout(function () {
730 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 740 // }, 1000)
734 741 // },
... ... @@ -799,7 +806,7 @@ Page({
799 806 });
800 807 "function" == typeof success && success();
801 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 812 fail: function(n) {
... ... @@ -816,7 +823,7 @@ Page({
816 823 var template_id = this.data.template_id;
817 824 // //授权订阅
818 825 wx.requestSubscribeMessage({
819   - tmplIds: [template_id],
  826 + tmplIds: template_id,
820 827 success(res) {
821 828 func();
822 829 },
... ...
packageA/pages/details_serviceCard/details_serviceCard.js
... ... @@ -966,7 +966,7 @@ Page({
966 966 }
967 967 else{
968 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 1009 console.log(n), getApp().showSuccess("支付成功!");
1010 1010 "function" == typeof success && success();
1011 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 1015 fail: function(n) {
... ...
packageA/pages/my_service/appment_main.js
... ... @@ -532,7 +532,7 @@ Page({
532 532 is_textea: 1
533 533 })
534 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 536 wx.navigateTo({
537 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 84 </view>
85 85  
86 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 88 <view>我的预约</view>
89 89 </navigator> -->
90 90 <form report-submit='true' bindtap="sub_success">
... ...
packageA/pages/my_service/i_service.wxml
... ... @@ -63,7 +63,7 @@
63 63 <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
64 64 <view>立即使用</view>
65 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 67 <view>预约</view>
68 68 </view>
69 69 </view> -->
... ...
packageA/pages/my_service/tment_eval.js
... ... @@ -242,7 +242,7 @@ Page({
242 242 evaluate_qt:function(){
243 243  
244 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/appment_main.js
... ... @@ -479,7 +479,7 @@ Page({
479 479 })
480 480  
481 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 483 wx.navigateTo({
484 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 88 </view>
89 89  
90 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 92 <view>我的预约</view>
93 93 </navigator>
94 94 <form report-submit='true' bindtap="sub_success">
... ...
packageA/pages/my_service2/tment_eval.js
... ... @@ -242,7 +242,7 @@ Page({
242 242 evaluate_qt:function(){
243 243  
244 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/serviceCard_pd/cart/cart.js
... ... @@ -5,7 +5,7 @@ var regeneratorRuntime = require(&#39;../../../../utils/runtime.js&#39;);
5 5 var util_pay = require("../../../../utils/pay.js");
6 6 var t_pay = require("../../../../utils/pay2.js");
7 7  
8   -Page({
  8 +Page({
9 9 data: {
10 10 url: t.globalData.setting.url,
11 11 resourceUrl: t.globalData.setting.resourceUrl,
... ... @@ -65,11 +65,11 @@ Page({
65 65 card_name: '', //显示的卡的名称
66 66  
67 67 card_cut_price: null,//减价多少钱
68   -
  68 + template_id:[],
69 69 //dis_config:null, //因为拼团有佣金抵扣
70 70 //bn_use_commission: 0, //是不是使用佣金
71 71 },
72   - onLoad: function (t) {
  72 + onLoad: async function (t) {
73 73 console.log("onLoad_pt_cart");
74 74 //定义第一次进入
75 75 this.data.fir_in=1;
... ... @@ -94,6 +94,12 @@ Page({
94 94 //先获取物流,再获取用户信息,再展示页面
95 95 //th.get_wuliu(th.get_info(th.show_page));
96 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 105 onUnload: function () { this.setData({ isclose: 1 }) },
... ... @@ -536,7 +542,7 @@ Page({
536 542 var template_id = this.data.template_id;
537 543 // //授权订阅
538 544 wx.requestSubscribeMessage({
539   - tmplIds: [template_id],
  545 + tmplIds: template_id,
540 546 success(res) {
541 547 func();
542 548 },
... ...
packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
... ... @@ -107,7 +107,7 @@ Page({
107 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 112 ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
113 113 if(!th.data.wk_pyed) return false;
... ... @@ -737,7 +737,7 @@ Page({
737 737 //------支付成功页面--------
738 738 jumpPaymentPage: function (order_id, order_amount) {
739 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 4 oo = getApp().globalData,
5 5 os = oo.setting;
6 6 var s=getApp();
7   -//评价加载更多
  7 +//评价加载更多
8 8 var more = function (e) {
9 9 return e && e.__esModule ? e : {
10 10 default: e
... ... @@ -203,10 +203,11 @@ Page({
203 203 nav_type: 2, //导航类型
204 204 istop: 0, //是否置顶风格为1
205 205 searchbox_transparent: 1,
  206 + template_id:[],//订阅消息id
206 207 },
207 208  
208 209 //------初始化加载----------
209   - onLoad: function (t) {
  210 + onLoad: async function (t) {
210 211 self = this;
211 212 this.setData({options: t,});
212 213 var ee = this, that = ee, th = ee,
... ... @@ -447,6 +448,12 @@ Page({
447 448  
448 449 });
449 450  
  451 + try {
  452 + let template_id =await getApp().get_template_id('1023')
  453 + this.setData({
  454 + template_id
  455 + })
  456 + } catch (error) {}
450 457  
451 458 },
452 459  
... ... @@ -3363,6 +3370,21 @@ Page({
3363 3370 });
3364 3371 },
3365 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 + },
3366 3388 //--点击弹起拼单--
3367 3389 openSpecModel_pt: function (e) {
3368 3390  
... ...
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
... ... @@ -594,12 +594,12 @@
594 594 </view>
595 595 <block wx:if="{{user_order_pt_state==0}}">
596 596 <!-- --商家团-- -->
597   - <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">
598 598 <view class="fir-v">¥{{prom_act.price}}</view>
599 599 <view>去参团</view>
600 600 </view>
601 601 <!-- --会员团-- -->
602   - <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">
603 603  
604 604 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}">
605 605 <view>一键开团</view>
... ... @@ -616,7 +616,7 @@
616 616 </view>
617 617 </view>
618 618 <!-- -阶梯团-- -->
619   - <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">
620 620 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view>
621 621 <view>支付定金</view>
622 622 </view>
... ...
packageB/pages/user/Change_phone/Change_phone.js
... ... @@ -143,7 +143,7 @@ Page({
143 143 getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, {
144 144 success: function(res) {
145 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 147 getApp().globalData.userInfo.mobile = mobile;
148 148 getApp().my_warnning("更换成功", 0, th);
149 149 getApp().goto(url);
... ...
packageB/pages/user/choice_guide/choice_guide.js
... ... @@ -107,7 +107,7 @@ Page({
107 107 if( this.data.is_back)
108 108 wx.navigateBack({ delta: 1 })
109 109 else
110   - getApp().goto("/pages/user/userinfo/userinfo");
  110 + getApp().goto("/packageG/pages/user/userinfo/userinfo");
111 111 },
112 112  
113 113 img_err:function (e) {
... ...
packageB/pages/zuhegou/index/index.wxml
... ... @@ -61,7 +61,7 @@
61 61 <view class="c-red pdr10 {{item.haveAdded ? 'active':''}}" catchtap="addToCart"
62 62 data-index="{{index}}">
63 63 <text class="iconfont icon-gouwuche fs60"></text>
64   - </view>
  64 + </view>
65 65 </view>
66 66 </view>
67 67 </view>
... ...
packageC/pages/goods/goodsList/goodsList.wxml
... ... @@ -50,7 +50,7 @@
50 50 </view>
51 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 54 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
55 55 </navigator> -->
56 56 </view>
... ...
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
... ... @@ -2873,7 +2873,7 @@ Page({
2873 2873 //app.my_warnning("支付成功",1,th);
2874 2874 //setTimeout(function () {
2875 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 2878 //},1000)
2879 2879  
... ... @@ -2905,7 +2905,7 @@ Page({
2905 2905 //setTimeout(function () {
2906 2906 th.setData({ isclose: 0 });
2907 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 2910 //}, 1000)
2911 2911 }
... ...
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
... ... @@ -79,6 +79,7 @@ Page({
79 79 same_ok:1, //同城配送的控制,默认ok
80 80 bconfig: null,
81 81 showFold:true,
  82 + template_id:[],
82 83 },
83 84  
84 85  
... ... @@ -126,7 +127,7 @@ Page({
126 127 flag: !this.data.flag,
127 128 })
128 129 },
129   - onLoad: function (t) {
  130 + onLoad: async function (t) {
130 131  
131 132 //定义第一次进入
132 133 this.data.fir_in=1;
... ... @@ -181,6 +182,12 @@ Page({
181 182  
182 183 //判断是不是佣金抵扣
183 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 193 onUnload: function () {
... ... @@ -1260,7 +1267,22 @@ Page({
1260 1267 //});
1261 1268  
1262 1269 },
1263   -
  1270 + //订阅消息提醒
  1271 + sendsm: function (t) {
  1272 + let that = this;
  1273 + let template_id = this.data.template_id;
  1274 + // //授权订阅
  1275 + wx.requestSubscribeMessage({
  1276 + tmplIds: template_id,
  1277 + success(res) {
  1278 + that.submitConfirm(t)
  1279 + },
  1280 + fail(res) {
  1281 + that.submitConfirm(t)
  1282 + }
  1283 + })
  1284 +
  1285 + },
1264 1286  
1265 1287 // 提交订单前弹出确认对话框
1266 1288 submitConfirm(e) {
... ... @@ -1534,7 +1556,7 @@ Page({
1534 1556 util_pay.pay(data.data, function () {
1535 1557 setTimeout(function () {
1536 1558 // wx.reLaunch({
1537   - // //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
  1559 + // //url: "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
1538 1560 // url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data,
1539 1561 // })
1540 1562  
... ... @@ -1604,7 +1626,7 @@ Page({
1604 1626 // url: "/pages/user/order_list/order_list",
1605 1627 // })--*/
1606 1628  
1607   - // // var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data;
  1629 + // // var url="/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data;
1608 1630 // // wx.reLaunch({
1609 1631 // // url: url
1610 1632 // // })
... ...
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
1 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2   -<form bindsubmit="submitConfirm">
  2 +<form bindsubmit="sendsm">
3 3 <view class="container">
4 4  
5 5 <block wx:if="{{is_show_sub}}">
... ...
packageC/pages/payForAnother/payForAnother.js
... ... @@ -2549,7 +2549,7 @@ Page({
2549 2549 //app.my_warnning("支付成功",1,th);
2550 2550 //setTimeout(function () {
2551 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 2554 //},1000)
2555 2555  
... ... @@ -2581,7 +2581,7 @@ Page({
2581 2581 //setTimeout(function () {
2582 2582 th.setData({isclose: 0});
2583 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 2586 //}, 1000)
2587 2587 }
... ...
packageC/pages/presell/cart/cart2.js
... ... @@ -223,11 +223,11 @@ Page({
223 223 t_pay.set_fir();
224 224  
225 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 228 if(th.data.is_fwk){
229 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 1375 });
1376 1376 setTimeout(function () {
1377 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 1380 }, 1000)
1381 1381  
... ... @@ -1963,7 +1963,7 @@ Page({
1963 1963 //app.my_warnning("支付成功",1,th);
1964 1964 //setTimeout(function () {
1965 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 1968 //},1000)
1969 1969  
... ... @@ -1995,7 +1995,7 @@ Page({
1995 1995 //setTimeout(function () {
1996 1996 th.setData({ isclose: 0 });
1997 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 2000 //}, 1000)
2001 2001 }
... ...
packageC/pages/presell/cart/cart2_pre.js
... ... @@ -60,6 +60,7 @@ Page({
60 60 showFold:true,
61 61  
62 62 is_fwk:0, //判断服务卡项的类型
  63 + template_id:[],
63 64 },
64 65 onReady() {
65 66 setTimeout(() => {
... ... @@ -80,7 +81,7 @@ Page({
80 81 flag: !this.data.flag,
81 82 })
82 83 },
83   - onLoad: function (t) {
  84 + onLoad: async function (t) {
84 85 //定义第一次进入
85 86 this.data.fir_in=1;
86 87  
... ... @@ -97,11 +98,16 @@ Page({
97 98 }, 1);
98 99  
99 100 var gg = getApp().get_b_now();
100   - debugger;
  101 +
101 102 if(gg.fwk){
102 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 112 onUnload: function () { this.setData({ isclose: 1 }) },
107 113  
... ... @@ -1248,7 +1254,22 @@ Page({
1248 1254 complete: function () { }
1249 1255 })
1250 1256 },
  1257 + //订阅消息提醒
  1258 + sendsm: function (t) {
  1259 + let that = this;
  1260 + let template_id = this.data.template_id;
  1261 + // //授权订阅
  1262 + wx.requestSubscribeMessage({
  1263 + tmplIds: template_id,
  1264 + success(res) {
  1265 + that.submitForm(t)
  1266 + },
  1267 + fail(res) {
  1268 + that.submitForm(t)
  1269 + }
  1270 + })
1251 1271  
  1272 + },
1252 1273 //--------------------提交订单-----------------------
1253 1274 submitForm: function (t) {
1254 1275 var th = this;
... ...
packageC/pages/presell/cart/cart2_pre.wxml
1 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 4 <view class="tab-container" wx:if="{{act.presell_type==1}}">
5 5 <view class="tab-wrapper">
6 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 10 data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
11 11  
12 12 </view>
13   - </view>
  13 + </view>
14 14  
15 15 <block wx:if="{{act.presell_type==1}}">
16 16 <!--要进行判断地址是否显示---->
... ...
packageD/pages/user/deposit/prepaid/msg/msg.js
... ... @@ -57,7 +57,7 @@ Page({
57 57 my_confirm.open_cancel(0);
58 58 },
59 59 function () {
60   - let url = '/pages/user/userinfo/userinfo?isstcsp=1';
  60 + let url = '/packageG/pages/user/userinfo/userinfo?isstcsp=1';
61 61 wx.redirectTo({url: url,}) //跳到非tabbar页
62 62 }
63 63 );
... ...
packageE/pages/cart/cart2/cart2.js
... ... @@ -169,7 +169,8 @@ Page({
169 169 bconfig: null,
170 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 195 })
195 196 },
196 197  
197   - onLoad: function (t) {
  198 + onLoad:async function (t) {
198 199  
199 200 this.data.fir_in=1;
200 201  
... ... @@ -219,18 +220,23 @@ Page({
219 220 if (t.state) {
220 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 241 getApp().is_distribut(this);
236 242  
... ... @@ -285,7 +291,7 @@ Page({
285 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 295 "/pages/user/order_list/order_list",function (){
290 296 //支付信息会先记录着
291 297 if(!th.data.ok_order_sn) return false;
... ... @@ -297,7 +303,7 @@ Page({
297 303 //支付支付,返回首页
298 304 ut.m_toast('支付成功');
299 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 307 },1000)
302 308  
303 309 }else{
... ... @@ -4395,26 +4401,32 @@ Page({
4395 4401 requestSubscribe() {
4396 4402 const th = this;
4397 4403 const template_id = this.data.template_id;
4398   - wx.getSetting({
4399   - withSubscriptions: true,
4400   - success(res) {
4401   - let itemSettings = res.subscriptionsSetting.itemSettings;
4402   - if (itemSettings && itemSettings[template_id] == "accept") {
4403   - //要检查一下赠品有可以足够
4404   - th.sub_check_gift(function () {
4405   - th.submit_func();
4406   - })
4407   -
4408   - } else {
4409   - th.sendsm(function () {
4410   - //要检查一下赠品有可以足够
4411   - th.sub_check_gift(function () {
4412   - th.submit_func();
4413   - })
4414   - })
4415   - }
4416   - }
  4404 + th.sendsm(function () {
  4405 + //要检查一下赠品有可以足够
  4406 + th.sub_check_gift(function () {
  4407 + th.submit_func();
  4408 + })
4417 4409 })
  4410 + // wx.getSetting({
  4411 + // withSubscriptions: true,
  4412 + // success(res) {
  4413 + // let itemSettings = res.subscriptionsSetting.itemSettings;
  4414 + // if (itemSettings && itemSettings[template_id] == "accept") {
  4415 + // //要检查一下赠品有可以足够
  4416 + // th.sub_check_gift(function () {
  4417 + // th.submit_func();
  4418 + // })
  4419 +
  4420 + // } else {
  4421 + // th.sendsm(function () {
  4422 + // //要检查一下赠品有可以足够
  4423 + // th.sub_check_gift(function () {
  4424 + // th.submit_func();
  4425 + // })
  4426 + // })
  4427 + // }
  4428 + // }
  4429 + // })
4418 4430 this.setData({
4419 4431 submit: 1,
4420 4432 })
... ... @@ -5479,15 +5491,15 @@ Page({
5479 5491 // }
5480 5492 // wx.hideLoading()
5481 5493 // wx.redirectTo({
5482   - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
  5494 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5483 5495 // })
5484 5496 // } else {
5485 5497 // wx.redirectTo({
5486   - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
  5498 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5487 5499 // })
5488 5500 // }
5489 5501 wx.redirectTo({
5490   - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
  5502 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5491 5503 })
5492 5504 //},1000)
5493 5505  
... ... @@ -5522,17 +5534,17 @@ Page({
5522 5534 // wx.hideLoading()
5523 5535 // th.setData({ isclose: 0 });
5524 5536 // wx.redirectTo({
5525   - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
  5537 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5526 5538 // })
5527 5539 // } else {
5528 5540 // th.setData({ isclose: 0 });
5529 5541 // wx.redirectTo({
5530   - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
  5542 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5531 5543 // })
5532 5544 // }
5533 5545 th.setData({ isclose: 0 });
5534 5546 wx.redirectTo({
5535   - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
  5547 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5536 5548 })
5537 5549 //}, 1000)
5538 5550 }
... ... @@ -7311,7 +7323,7 @@ Page({
7311 7323 var template_id = this.data.template_id;
7312 7324 // //授权订阅
7313 7325 wx.requestSubscribeMessage({
7314   - tmplIds: [template_id],
  7326 + tmplIds: template_id,
7315 7327 success(res) {
7316 7328 func();
7317 7329 },
... ...
packageE/pages/cart/cart2_inte/cart2_inte.js
... ... @@ -85,6 +85,7 @@ Page({
85 85 same_ok:1, //同城配送的控制,默认ok
86 86 bconfig: null,
87 87 showFold:true,
  88 + template_id:[]
88 89 },
89 90  
90 91  
... ... @@ -109,7 +110,7 @@ Page({
109 110 flag: !this.data.flag,
110 111 })
111 112 },
112   - onLoad: function (t) {
  113 + onLoad: async function (t) {
113 114  
114 115 this.data.fir_in=1;
115 116 wx.setNavigationBarTitle({ title: "填写订单", })
... ... @@ -193,7 +194,12 @@ Page({
193 194 //判断是不是佣金抵扣
194 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 204 onUnload: function () { this.setData({ isclose: 1 }) },
199 205 onHide: function () {
... ... @@ -225,7 +231,7 @@ Page({
225 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 235 "/pages/user/order_list/order_list",function (){
230 236 if(!th.data.ok_order_sn) return false;
231 237 getApp().request.promiseGet("/api/weshop/order/page",
... ... @@ -236,7 +242,7 @@ Page({
236 242 //支付支付,返回首页
237 243 ut.m_toast('支付成功');
238 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 246 },1000)
241 247  
242 248 }else{
... ... @@ -1150,7 +1156,22 @@ Page({
1150 1156 //});
1151 1157  
1152 1158 },
  1159 + //订阅消息提醒
  1160 + sendsm: function (t) {
  1161 + let that = this;
  1162 + let template_id = this.data.template_id;
  1163 + // //授权订阅
  1164 + wx.requestSubscribeMessage({
  1165 + tmplIds: template_id,
  1166 + success(res) {
  1167 + that.submitForm(t)
  1168 + },
  1169 + fail(res) {
  1170 + that.submitForm(t)
  1171 + }
  1172 + })
1153 1173  
  1174 + },
1154 1175 //--------------------提交订单-----------------------
1155 1176 async submitForm(t) {
1156 1177 var sub_value = t;
... ... @@ -1382,7 +1403,7 @@ Page({
1382 1403 //app.my_warnning("支付成功",1,th);
1383 1404 //setTimeout(function () {
1384 1405 wx.redirectTo({
1385   - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
  1406 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
1386 1407 })
1387 1408 //},1000)
1388 1409  
... ... @@ -1408,7 +1429,7 @@ Page({
1408 1429 //setTimeout(function () {
1409 1430 th.setData({ isclose: 0 });
1410 1431 wx.redirectTo({
1411   - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
  1432 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
1412 1433 })
1413 1434 //}, 1000)
1414 1435 }
... ...
packageE/pages/cart/cart2_inte/cart2_inte.wxml
... ... @@ -2,7 +2,7 @@
2 2 <wxs src="filter.wxs" module="util"></wxs>
3 3 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
4 4  
5   -<form bindsubmit="submitForm">
  5 +<form bindsubmit="sendsm">
6 6 <view class="container">
7 7  
8 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 6  
7 7 Page({
8 8  
9   - data: {
  9 + data: {
10 10 url: t.globalData.setting.url,
11 11 resourceUrl: t.globalData.setting.resourceUrl,
12 12 imgUrl: t.globalData.setting.imghost,
... ... @@ -76,6 +76,7 @@ Page({
76 76 same_ok:1, //同城配送的控制,默认ok
77 77 bconfig:null,
78 78 showFold:true,
  79 + template_id:[],
79 80 },
80 81  
81 82  
... ... @@ -100,7 +101,7 @@ Page({
100 101 flag: !this.data.flag,
101 102 })
102 103 },
103   - onLoad: function (t) {
  104 + onLoad: async function (t) {
104 105 this.data.fir_in=1;
105 106 wx.setNavigationBarTitle({ title: "填写订单", })
106 107 var th = this;
... ... @@ -132,6 +133,12 @@ Page({
132 133 //th.get_wuliu(th.get_info(th.show_page));
133 134 //判断是不是佣金抵扣
134 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 143 onUnload: function () {
137 144 this.setData({ isclose: 1 })
... ... @@ -1154,6 +1161,22 @@ Page({
1154 1161 //});
1155 1162  
1156 1163 },
  1164 + //订阅消息提醒
  1165 + sendsm: function (t) {
  1166 + let that = this;
  1167 + let template_id = this.data.template_id;
  1168 + // //授权订阅
  1169 + wx.requestSubscribeMessage({
  1170 + tmplIds: template_id,
  1171 + success(res) {
  1172 + that.submitForm(t)
  1173 + },
  1174 + fail(res) {
  1175 + that.submitForm(t)
  1176 + }
  1177 + })
  1178 +
  1179 + },
1157 1180 //--------------------提交订单-----------------------
1158 1181 submitForm: async function (t) {
1159 1182 if (this.data.is_summit_ing == 1) return false; //--提交中退出--
... ... @@ -1388,7 +1411,7 @@ Page({
1388 1411 util_pay.pay(data.data, function () {
1389 1412 setTimeout(function () {
1390 1413 wx.reLaunch({
1391   - //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
  1414 + //url: "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
1392 1415 url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data,
1393 1416 })
1394 1417 }, 1000)
... ... @@ -1428,7 +1451,7 @@ Page({
1428 1451 wx.navigateTo({
1429 1452 url: "/pages/user/order_list/order_list",
1430 1453 })--*/
1431   - var url = "/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data;
  1454 + var url = "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data;
1432 1455 wx.reLaunch({
1433 1456 url: url
1434 1457 })
... ...
packageE/pages/cart/cart2_pt/cart2_pt.wxml
1 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2   -<form bindsubmit="submitForm">
  2 +<form bindsubmit="sendsm">
3 3 <view class="container">
4 4  
5 5 <block wx:if="{{show_btn}}">
... ... @@ -9,7 +9,7 @@
9 9  
10 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 13 <block wx:if="{{show_same_city}}">
14 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 15 </block>
... ...
packageE/pages/cart/cart_wk/cart_wk.js
... ... @@ -111,7 +111,7 @@ Page({
111 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 115 if(!th.data.ok_order_sn) return false;
116 116 getApp().request.promiseGet("/api/weshop/order/page",
117 117 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
... ... @@ -123,7 +123,7 @@ Page({
123 123 //支付支付,返回首页
124 124 ut.m_toast('支付成功');
125 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 127 },1000)
128 128  
129 129 }else{
... ... @@ -1240,7 +1240,7 @@ Page({
1240 1240 //------支付成功页面--------
1241 1241 jumpPaymentPage: function (order_sn, order_amount) {
1242 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 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 145 bindGetUserInfo: function (ee) {
... ... @@ -485,16 +529,51 @@ Page({
485 529  
486 530 // 是否同意协议
487 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
... ... @@ -333,7 +333,7 @@ Page({
333 333 })
334 334  
335 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 338 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
339 339 remark = "兴趣标签赠送";
... ...
packageE/pages/user/labels/labels.wxml
... ... @@ -5,19 +5,18 @@
5 5 <view class="flex-vertical-between labels_head">
6 6 <view class="fs36">兴趣标签</view>
7 7  
  8 +
8 9 <!-- 如果是注册的时候 -->
9 10 <block wx:if="{{is_reg }}">
10   - <view wx:if="{{!label_required}}" class="skip flex-center fs28" data-url="/pages/user/userinfo/userinfo" bindtap="goto_user">
  11 + <view wx:if="{{!label_required}}" class="skip flex-center fs28" data-url="/packageG/pages/user/userinfo/userinfo" bindtap="goto_user">
11 12 <view>跳过</view>
12 13 </view>
13 14 </block>
14 15 <block wx:else>
15   - <view class="skip flex-center fs28" data-url="/pages/user/userinfo/userinfo" bindtap="goto">
16   - <view>关闭</view>
17   - </view>
  16 + <view class="skip flex-center fs28" data-url="/packageG/pages/user/userinfo/userinfo" bindtap="goto">
  17 + <view>关闭</view>
  18 + </view>
18 19 </block>
19   -
20   -
21 20  
22 21 </view>
23 22  
... ... @@ -45,7 +44,7 @@
45 44  
46 45 <!-- 领取选择标签的奖励按钮 -->
47 46 <block wx:if="{{is_modify==0}}">
48   - <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">
49 48 <block>
50 49 <view>保存</view>
51 50 </block>
... ... @@ -69,7 +68,7 @@
69 68 </view>
70 69 </block>
71 70 <block wx:if="{{is_modify==1}}">
72   - <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">
73 72 <view>提交修改</view>
74 73 </view>
75 74 </block>
... ...
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 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 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 2 return t && t.__esModule ? t : {
3 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 6 a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting;
7 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
pages/payment/pay_success/pay_success.js renamed to packageG/pages/payment/pay_success/pay_success.js
1 1 var e = getApp();
2   -var regeneratorRuntime = require('../../../utils/runtime.js');
3   -var ut = require("../../../utils/util.js");
  2 +var regeneratorRuntime = require('../../../../utils/runtime.js');
  3 +var ut = require("../../../../utils/util.js");
4 4 Page({
5 5 /**
6 6 * 页面的初始数据
... ...
pages/payment/pay_success/pay_success.json renamed to packageG/pages/payment/pay_success/pay_success.json
pages/payment/pay_success/pay_success.wxml renamed to packageG/pages/payment/pay_success/pay_success.wxml
1   -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 2 <view>
3 3 <!-- 支付成功提示 -->
4 4 <view class="payradio">
... ...
pages/payment/pay_success/pay_success.wxss renamed to packageG/pages/payment/pay_success/pay_success.wxss
pages/user/my_service/appment_main.js renamed to packageG/pages/user/my_service/appment_main.js
... ... @@ -34,7 +34,7 @@ Page({
34 34 is_success: 0, //是否提交成功
35 35 remarks: "", //备注
36 36 storageId: "", //线下门店id
37   - url: "/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来
  37 + url: "/packageG/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来
38 38 buyType: "", //项目类型
39 39 time: "", //选择预约时间
40 40 tment_count: "", //可预约人数
... ... @@ -517,7 +517,7 @@ Page({
517 517 is_textea: 1
518 518 })
519 519 wx.navigateTo({
520   - url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id
  520 + url: "/packageG/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id
521 521 });
522 522  
523 523 }
... ...
pages/user/my_service/appment_main.json renamed to packageG/pages/user/my_service/appment_main.json
pages/user/my_service/appment_main.wxml renamed to packageG/pages/user/my_service/appment_main.wxml
1   -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 2 <view class="container" catchtap="close">
3 3 <image class="main" src="{{iurl}}/miniapp/images/yyservice/main.png"></image>
4 4  
... ... @@ -55,7 +55,7 @@
55 55 </view>
56 56  
57 57 <!-- 选择时间 -->
58   - <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
  58 + <view class="flex-vertical-between fs26 select" data-url="/packageG/pages/user/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
59 59 <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view>
60 60 <view class="angle angler">∟</view>
61 61 </view>
... ... @@ -84,7 +84,7 @@
84 84 </view>
85 85  
86 86 <view class="submitMax flex-space-between 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 88 <view>我的预约</view>
89 89 </navigator>
90 90 <form report-submit='true' bindtap="sub_success">
... ...
pages/user/my_service/appment_main.wxss renamed to packageG/pages/user/my_service/appment_main.wxss
pages/user/my_service/beauty_deta.js renamed to packageG/pages/user/my_service/beauty_deta.js
pages/user/my_service/beauty_deta.json renamed to packageG/pages/user/my_service/beauty_deta.json
pages/user/my_service/beauty_deta.wxml renamed to packageG/pages/user/my_service/beauty_deta.wxml
pages/user/my_service/beauty_deta.wxss renamed to packageG/pages/user/my_service/beauty_deta.wxss
pages/user/my_service/cosmetology_list.js renamed to packageG/pages/user/my_service/cosmetology_list.js
pages/user/my_service/cosmetology_list.json renamed to packageG/pages/user/my_service/cosmetology_list.json
pages/user/my_service/cosmetology_list.wxml renamed to packageG/pages/user/my_service/cosmetology_list.wxml
... ... @@ -27,7 +27,7 @@
27 27 </view>
28 28  
29 29 <!-- 预约状态 -->
30   - <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?StorageId={{item.StorageId}}&BeauticianID={{item.staffid}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}">
  30 + <navigator class="flex-center gofu go" url="/packageG/pages/user/my_service/beauty_deta?StorageId={{item.StorageId}}&BeauticianID={{item.staffid}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}">
31 31 <view class="fs24">预约</view>
32 32 </navigator>
33 33 </view>
... ...
pages/user/my_service/cosmetology_list.wxss renamed to packageG/pages/user/my_service/cosmetology_list.wxss
pages/user/my_service/tment_order_list.js renamed to packageG/pages/user/my_service/tment_order_list.js
pages/user/my_service/tment_order_list.json renamed to packageG/pages/user/my_service/tment_order_list.json
pages/user/my_service/tment_order_list.wxml renamed to packageG/pages/user/my_service/tment_order_list.wxml
... ... @@ -70,9 +70,9 @@
70 70 <block wx:else>
71 71 <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator>
72 72 </block>
73   - <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">更改时间</navigator>
  73 + <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/packageG/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">更改时间</navigator>
74 74 <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}" class="important Unimportance flex-level">发表评价</navigator>
75   - <navigator wx:if="{{item.State==2 || item.State==3}}" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}" class="important Unimportance flex-level">重新预约</navigator>
  75 + <navigator wx:if="{{item.State==2 || item.State==3}}" url="/packageG/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}" class="important Unimportance flex-level">重新预约</navigator>
76 76 <navigator wx:if="{{item.State==4}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}" class="important Unimportance flex-level">评价详情</navigator>
77 77 </view>
78 78 </view>
... ...
pages/user/my_service/tment_order_list.wxss renamed to packageG/pages/user/my_service/tment_order_list.wxss
pages/user/userinfo/userinfo.js renamed to packageG/pages/user/userinfo/userinfo.js
... ... @@ -10,8 +10,8 @@ function e(e, a, r) {
10 10 var a = getApp(),
11 11 r = a.globalData.setting,
12 12 t = a.request,
13   - s = require("../../../utils/common.js"),
14   - util = require("../../../utils/util.js"),
  13 + s = require("../../../../utils/common.js"),
  14 + util = require("../../../../utils/util.js"),
15 15 ut = util,
16 16 d = getApp().globalData;
17 17  
... ... @@ -20,7 +20,7 @@ var date = new Date(timestamp);
20 20 const {
21 21 barcode,
22 22 qrcode
23   -} = require('../../../utils/index.js');
  23 +} = require('../../../../utils/index.js');
24 24  
25 25 Page({
26 26 data: {
... ...
pages/user/userinfo/userinfo.json renamed to packageG/pages/user/userinfo/userinfo.json
pages/user/userinfo/userinfo.wxml renamed to packageG/pages/user/userinfo/userinfo.wxml
1   -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 2 <view class="container">
3 3  
4 4 <!-- 头像,昵称,多个卡 -->
... ...
pages/user/userinfo/userinfo.wxss renamed to packageG/pages/user/userinfo/userinfo.wxss
pages/goods/categoryList/categoryList.js
... ... @@ -729,7 +729,7 @@ Page({
729 729  
730 730 goseach: function () {
731 731 wx.navigateTo({
732   - url: "/pages/goods/search/search"
  732 + url: "/packageG/pages/goods/search/search"
733 733 });
734 734 },
735 735  
... ... @@ -876,7 +876,7 @@ Page({
876 876 success: (res) => {
877 877 var result = res.result;
878 878 wx.navigateTo({
879   - url: "/pages/goods/search/search?s_key=" + result,
  879 + url: "/packageG/pages/goods/search/search?s_key=" + result,
880 880 });
881 881 }
882 882 })
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -13,7 +13,7 @@ var t = require(&quot;../../../utils/util.js&quot;),
13 13 var wxlog = require("../../../utils/wxlog.js");
14 14 let self = null;
15 15  
16   -//评价加载更多
  16 +//评价加载更多
17 17 var more = function (e) {
18 18 return e && e.__esModule ? e : {
19 19 default: e
... ... @@ -284,11 +284,11 @@ Page({
284 284 nav_type: 2, //导航类型
285 285 istop: 0, //是否置顶风格为1
286 286 searchbox_transparent: 1,
287   -
  287 + template_id:[],//订阅消息id
288 288 },
289 289  
290 290 //------初始化加载----------
291   - onLoad: function (t) {
  291 + onLoad: async function (t) {
292 292 var ee = this,
293 293 that = ee,
294 294 th = ee,
... ... @@ -553,6 +553,12 @@ Page({
553 553 }
554 554 });
555 555  
  556 + try {
  557 + let template_id =await getApp().get_template_id('1023')
  558 + this.setData({
  559 + template_id
  560 + })
  561 + } catch (error) {}
556 562  
557 563 },
558 564  
... ... @@ -3902,6 +3908,7 @@ Page({
3902 3908 }, 800)
3903 3909 } else {
3904 3910 setTimeout(function () {
  3911 +
3905 3912 th.deal_pickup(e); //--普通门店排版--
3906 3913 }, 800)
3907 3914 }
... ... @@ -4257,6 +4264,7 @@ Page({
4257 4264  
4258 4265 //------------处理线下门店库存--------
4259 4266 deal_pickup_dline(e) {
  4267 +
4260 4268 var pkno = [],
4261 4269 th = this;
4262 4270 if (!th.data.sele_g){
... ... @@ -4450,7 +4458,7 @@ Page({
4450 4458 if (iu.CanOutQty <= 0) iu.is_no_qyt = 1;
4451 4459  
4452 4460 }
4453   -
  4461 +
4454 4462 //---把数组组装进去---
4455 4463 th.deal_pickup(em);
4456 4464  
... ... @@ -5371,7 +5379,21 @@ Page({
5371 5379 pd_xx: 0,
5372 5380 })
5373 5381 },
5374   -
  5382 + //天天拼团订阅消息提醒
  5383 + sendsm: function (ee) {
  5384 + let th = this;
  5385 + var template_id = this.data.template_id;
  5386 + // //授权订阅
  5387 + wx.requestSubscribeMessage({
  5388 + tmplIds: template_id,
  5389 + success(res) {
  5390 + th.openSpecModel_pt(ee);
  5391 + },
  5392 + fail(res) {
  5393 + th.openSpecModel_pt(ee);
  5394 + }
  5395 + })
  5396 + },
5375 5397 //--点击弹起拼单--
5376 5398 openSpecModel_pt:function (e) {
5377 5399  
... ... @@ -8426,7 +8448,7 @@ Page({
8426 8448 img = th.data.iurl + th.data.prom_act.share_imgurl;
8427 8449 }
8428 8450 let user_id = getApp().globalData.user_id
8429   - console.error(img);
  8451 +
8430 8452 return {
8431 8453 title: this.data.data.goods_name + '-' + store_name,
8432 8454 // imageUrl: this.data.gallery[0].image_url,
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -11,7 +11,7 @@
11 11 <wxs module="g_filters" src="g_filter.wxs"></wxs>
12 12 <wxs module="tool" src="filter.wxs"></wxs>
13 13  
14   -<!-- 商品内容区域,普通商品,秒杀,拼团 -->
  14 +<!-- 商品内容区域,普通商品,秒杀,拼团 -->
15 15 <block wx:if="{{isshow}}">
16 16 <view class="container">
17 17 <!-- 拼单规则规则 -->
... ... @@ -1187,12 +1187,12 @@
1187 1187 </view>
1188 1188 <block wx:if="{{user_order_pt_state==0}}">
1189 1189 <!-- --商家团-- -->
1190   - <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">
  1190 + <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">
1191 1191 <view class="fir-v">¥{{prom_act.price}}</view>
1192 1192 <view>去参团</view>
1193 1193 </view>
1194 1194 <!-- --会员团-- -->
1195   - <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">
  1195 + <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">
1196 1196 <!-- <view class="fir-v">¥{{prom_act.price}}</view> -->
1197 1197 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}">
1198 1198 <view>一键开团</view>
... ... @@ -1210,7 +1210,7 @@
1210 1210 </view>
1211 1211 </view>
1212 1212 <!-- -阶梯团-- -->
1213   - <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">
  1213 + <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">
1214 1214 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view>
1215 1215 <view>支付定金</view>
1216 1216 </view>
... ...
pages/goods/goodsInfo/goodsInfo.wxss
1   -@import "../../../utils/wxParse/wxParse.wxss";
  1 +@import "../../../utils/wxParse/wxParse.wxss";
2 2  
3 3 .container {
4 4 margin-bottom: 100rpx;
... ...
pages/goods/goodsList/goodsList.js
... ... @@ -6,7 +6,7 @@
6 6 var regeneratorRuntime = require('../../../utils/runtime.js');
7 7 var com_fil= require('../com_screen.js');
8 8  
9   -Page({
  9 +Page({
10 10 data: {
11 11 url: e.globalData.setting.imghost,
12 12 resourceUrl: e.globalData.setting.resourceUrl,
... ... @@ -44,6 +44,7 @@ Page({
44 44 limit_num:0,
45 45 gr_fir:0, //分组第一次
46 46 share_imgurl:'', //分享图片
  47 + add_purchase:false,
47 48 },
48 49  
49 50 onLoad: function(t) {
... ... @@ -601,7 +602,29 @@ Page({
601 602 open_more(e){ com_fil.open_more(e,this); },
602 603 clear_fil(){ //清空
603 604 this.data.gr_fir=0;com_fil.clear_fil(this);
604   - }
  605 + },
  606 + // 加购方法show
  607 + addPurchase(even){
  608 + this.setData({
  609 + add_purchase:true
  610 + })
  611 + let gid = even.currentTarget.dataset.gid
  612 + let prom_id = even.currentTarget.dataset.prom_id
  613 + let prom_type = even.currentTarget.dataset.prom_type
  614 + let goods_type= even.currentTarget.dataset.goods_type
  615 + let add_purchase = this.selectComponent("#add_purchase");
  616 + if (add_purchase) {
  617 + add_purchase.init(gid,prom_type,prom_id,goods_type)
  618 + }
  619 + },
  620 + // 加购方法 hide
  621 + hide_add_purchase(){
  622 + setTimeout(()=>{
  623 + this.setData({
  624 + add_purchase:false
  625 + })
  626 + },1000)
  627 + }
605 628  
606 629  
607 630 });
608 631 \ No newline at end of file
... ...
pages/goods/goodsList/goodsList.json
... ... @@ -2,6 +2,7 @@
2 2 "backgroundTextStyle": "dark",
3 3 "navigationBarTitleText": "商品列表",
4 4 "usingComponents": {
5   - "share_box": "/components/share_box/share_box"
  5 + "share_box": "/components/share_box/share_box",
  6 + "add_purchase": "/components/add_purchase/add_purchase"
6 7 }
7   -}
8 8 \ No newline at end of file
  9 +}
9 10 \ No newline at end of file
... ...
pages/goods/goodsList/goodsList.wxml
1   -<wxs module="g_filter" src="../search/g_filter.wxs"></wxs>
  1 +<wxs module="g_filter" src="../g_filter.wxs"></wxs>
  2 +<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
2 3 <view class="container" wx:if="{{show_all}}">
3 4 <view>
4 5  
5   - <view wx:if="{{prom_goods_list}}" class="fs30"><text style="color: red;" wx:if="{{index==0 && limit_num>0}}">每人限参与{{limit_num}}次;</text></view>
6   - <block wx:for="{{prom_goods_list}}">
7   - <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx">
8   - 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text>
9   - <text space="{{true}}" wx:if="{{item.content.is_money && item.content.is_money!='0'}}">减{{item.content.money}}元 </text>
10   - <text space="{{true}}" wx:if="{{item.content.past && item.content.past!='0'}}">包邮 </text>
11   - <text space="{{true}}" wx:if="{{item.content.is_sale && item.content.is_sale!='0'}}">打{{item.content.sale}}折 </text>
12   - <text space="{{true}}" wx:if="{{item.content.is_int && item.content.is_int!='0'}}">送{{item.content.int}}积分 </text>
13   - <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon_money}}元优惠券 </text>
14   - <text space="{{true}}" wx:if="{{item.content.is_gift && item.content.is_gift!='0'}}">送{{item.content.zp_mode==1?'多赠品':item.content.gift_name}} </text>
15   - <text space="{{true}}" wx:if="{{item.content.is_libao && item.content.is_libao!='0'}}">送{{item.content.lb_name}} </text>
16   - <text space="{{true}}" wx:if="{{item.content.is_zxlibao && item.content.is_zxlibao!='0'}}">送{{item.content.zxlb_name}} </text>
17   - <text space="{{true}}" wx:if="{{item.content.is_monthgiftbag && item.content.is_monthgiftbag!='0'}}">送{{item.content.monthgift_name}} </text>
18   - </view>
19   - </block>
20   -
21   - <!-- 新增 -->
22   - <view wx:if="{{jieti_prom}}" class="fs30 ellipsis-1" style="padding: 20rpx">阶梯促销:{{jieti_prom}}</view>
  6 + <view wx:if="{{prom_goods_list}}" class="fs30"><text style="color: red;" wx:if="{{index==0 && limit_num>0}}">每人限参与{{limit_num}}次;</text></view>
  7 + <block wx:for="{{prom_goods_list}}">
  8 + <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx">
  9 + 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text>
  10 + <text space="{{true}}" wx:if="{{item.content.is_money && item.content.is_money!='0'}}">减{{item.content.money}}元 </text>
  11 + <text space="{{true}}" wx:if="{{item.content.past && item.content.past!='0'}}">包邮 </text>
  12 + <text space="{{true}}" wx:if="{{item.content.is_sale && item.content.is_sale!='0'}}">打{{item.content.sale}}折 </text>
  13 + <text space="{{true}}" wx:if="{{item.content.is_int && item.content.is_int!='0'}}">送{{item.content.int}}积分 </text>
  14 + <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon_money}}元优惠券 </text>
  15 + <text space="{{true}}" wx:if="{{item.content.is_gift && item.content.is_gift!='0'}}">送{{item.content.zp_mode==1?'多赠品':item.content.gift_name}} </text>
  16 + <text space="{{true}}" wx:if="{{item.content.is_libao && item.content.is_libao!='0'}}">送{{item.content.lb_name}} </text>
  17 + <text space="{{true}}" wx:if="{{item.content.is_zxlibao && item.content.is_zxlibao!='0'}}">送{{item.content.zxlb_name}} </text>
  18 + <text space="{{true}}" wx:if="{{item.content.is_monthgiftbag && item.content.is_monthgiftbag!='0'}}">送{{item.content.monthgift_name}} </text>
  19 + </view>
  20 + </block>
  21 +
  22 + <!-- 新增 -->
  23 + <view wx:if="{{jieti_prom}}" class="fs30 ellipsis-1" style="padding: 20rpx">阶梯促销:{{jieti_prom}}</view>
23 24  
24 25 </view>
25   - <view class="pd20 flex ai-center jc_sb search_fixed">
26   - <!-- 搜索框 -->
27   - <view class="search-box f1">
28   - <view hover-class="none" data-url="/pages/goods/search/search?ladder_id={{ladder_id}}" bindtap="go_url"><text class="iconfont icon-sousuo pdr10"></text>请输入商品关键字</view>
29   - </view>
30   - <!-- 单列/双列 显示切换 -->
31   - <text class="iconfont {{isToggle ? 'icon-fenlie':'icon-fenxiang'}} pdl30 fs36" bindtap="bindToggleDisplay"></text>
32   - </view>
33   -
34   - <view class="nav-box">
35   - <view class="nav">
36   -
37   -
38   - <navigator class="nav-item">
39   - <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">
40   - <text wx:if="{{tabname=='on_time'}}">新品</text>
41   - <text wx:elif="{{tabname=='comment_count'}}">评论</text>
42   - <text wx:else>综合</text>
43   - </picker>
44   - <view class="arrow_down"></view>
45   -
46   - </navigator>
47   -
48   -
49   - <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量
50   -<!-- <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">-->
51   -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
52   -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
53   -<!-- </view>-->
54   - <view>
55   - <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>
56   - <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>
57   - </view>
58   -
59   - </navigator>
60   - <navigator bindtap="changeTab" class="nav-item" data-href="final_price" data-ad="{{adname}}">
61   - 价格
62   -<!-- <view class="ico-dg" wx:if="{{tabname=='final_price'}}">-->
63   -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
64   -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
65   -<!-- </view>-->
66   - <view>
67   - <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>
68   - <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>
69   - </view>
70   - </navigator>
71   - <navigator bindtap="openFilterModal" class="nav-item">
72   - 筛选<view class="ico-filter">
73   - <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image>
74   - </view>
75   - </navigator>
76   -
77   - <!-- <navigator class="nav-item search" url="/pages/goods/search/search">
  26 + <view class="pd20 flex ai-center jc_sb search_fixed">
  27 + <!-- 搜索框 -->
  28 + <view class="search-box f1">
  29 + <view hover-class="none" data-url="/packageG/pages/goods/search/search?ladder_id={{ladder_id}}" bindtap="go_url"><text class="iconfont icon-sousuo pdr10"></text>请输入商品关键字</view>
  30 + </view>
  31 + <!-- 单列/双列 显示切换 -->
  32 + <text class="iconfont {{isToggle ? 'icon-fenlie':'icon-fenxiang'}} pdl30 fs36" bindtap="bindToggleDisplay"></text>
  33 + </view>
  34 +
  35 + <view class="nav-box">
  36 + <view class="nav">
  37 +
  38 +
  39 + <navigator class="nav-item">
  40 + <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">
  41 + <text wx:if="{{tabname=='on_time'}}">新品</text>
  42 + <text wx:elif="{{tabname=='comment_count'}}">评论</text>
  43 + <text wx:else>综合</text>
  44 + </picker>
  45 + <view class="arrow_down"></view>
  46 +
  47 + </navigator>
  48 +
  49 +
  50 + <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量
  51 + <!-- <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">-->
  52 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
  53 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
  54 + <!-- </view>-->
  55 + <view>
  56 + <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>
  57 + <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>
  58 + </view>
  59 +
  60 + </navigator>
  61 + <navigator bindtap="changeTab" class="nav-item" data-href="final_price" data-ad="{{adname}}">
  62 + 价格
  63 + <!-- <view class="ico-dg" wx:if="{{tabname=='final_price'}}">-->
  64 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
  65 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
  66 + <!-- </view>-->
  67 + <view>
  68 + <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>
  69 + <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>
  70 + </view>
  71 + </navigator>
  72 + <navigator bindtap="openFilterModal" class="nav-item">
  73 + 筛选<view class="ico-filter">
  74 + <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image>
  75 + </view>
  76 + </navigator>
  77 +
  78 + <!-- <navigator class="nav-item search" url="/packageG/pages/goods/search/search">
78 79 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
79 80 </navigator> -->
80   - </view>
81   - </view>
82   -
83   - <view class="choice_list" wx:if="{{!isToggle}}">
  81 + </view>
  82 + </view>
  83 +
  84 + <view class="choice_list" style="position: relative;" wx:if="{{!isToggle}}">
84 85 <navigator class="choice_item" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">
85 86 <view class="img-wrap">
86 87 <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image>
... ... @@ -89,24 +90,142 @@
89 90 <view class="title ellipsis-2">{{item.goods_name}}</view>
90 91 <!-- 判断是否有活动价 -->
91 92 <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10 }}">
92   - <view class="flex on">
93   - <!-- 活动价 -->
94   - <view class="price">
95   - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
96   - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
97   - <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
98   - </view>
99   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
100   - </view>
101   -
102   -
  93 + <view class="flex on">
  94 + <!-- 活动价 -->
  95 + <view class="price">
  96 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  97 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  98 + <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
  99 + </view>
  100 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
  101 + </view>
  102 +
  103 +
  104 + <view class="comment pdt10">
  105 + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->
  106 + <view class="fs24 t-r">
  107 + <span>评论{{item.comment_count}}</span>
  108 + <span class="pdl30">已售{{item.sales_sum}}</span>
  109 + </view>
  110 + </view>
  111 + </block>
  112 + <block wx:else>
  113 + <!-- 商品价格,先判断下是后又等级价-->
  114 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
  115 + <!-- 当会员是等级卡的时候 -->
  116 + <block wx:if="{{card_field}}">
  117 + <!-- 等级价>0 -->
  118 + <block wx:if="{{item[card_field]>0}}">
  119 + <view class="flex ai-center">
  120 + <view class="price rmb">{{item[card_field]}}</view>
  121 + <view class="card_bg ellipsis-1">
  122 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  123 + <text class="card_name">{{card_name}}</text>
  124 + </view>
  125 + </view>
  126 + <view class="comment">
  127 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
  128 + <view class="fs24 t-r">
  129 + <span>评论{{item.comment_count}}</span>
  130 + <span class="pdl30">已售{{item.sales_sum}}</span>
  131 + </view>
  132 + </view>
  133 + </block>
  134 + <block wx:else>
  135 + <view class="price rmb">{{item.shop_price}}</view>
  136 + <view class="comment">
  137 + <!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  138 + <view class="fs24 t-r">
  139 + <span>评论{{item.comment_count}}</span>
  140 + <span class="pdl30">已售{{item.sales_sum}}</span>
  141 + </view>
  142 + </view>
  143 + </block>
  144 + </block>
  145 + <block wx:else>
  146 + <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
  147 + <view class="flex ai-center">
  148 + <view class="price rmb">{{item.shop_price}}</view>
  149 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb no_line_c">{{item.market_price}}</view>
  150 + </view>
  151 + <view class="comment">
  152 + <view class="flex ai-center">
  153 + <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view>
  154 + <view class="card_bg ellipsis-1">
  155 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  156 + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
  157 + </view>
  158 + </view>
  159 + <view class="fs24 pdt10 t-r">
  160 + <span class="">评论{{item.comment_count}}</span>
  161 + <span class="pdl30">已售{{item.sales_sum}}</span>
  162 + </view>
  163 + </view>
  164 + </view>
  165 + <block wx:else>
  166 + <view>
  167 + <view class="price rmb">{{item.shop_price}}</view>
  168 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
  169 + </view>
  170 + <!-- <view class="price">¥{{item.shop_price}}</view> -->
  171 + <view class="comment pdt10">
  172 + <view class="fs24 t-r">
  173 + <span>评论{{item.comment_count}}</span>
  174 + <span class="pdl30">已售{{item.sales_sum}}</span>
  175 + </view>
  176 + </view>
  177 + </block>
  178 + </block>
  179 + </block>
  180 + <view wx:else>
  181 + <view class="flex ai-center">
  182 + <view class="price rmb">{{item.shop_price}}</view>
  183 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
  184 + </view>
  185 +
103 186 <view class="comment pdt10">
104   - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->
105 187 <view class="fs24 t-r">
106   - <span>评论{{item.comment_count}}</span>
107   - <span class="pdl30">已售{{item.sales_sum}}</span>
108   - </view>
  188 + <span>评论{{item.comment_count}}</span>
  189 + <span class="pdl30">已售{{item.sales_sum}}</span>
  190 + </view>
109 191 </view>
  192 + </view>
  193 + </block>
  194 + </view>
  195 + <view class="gicon" catchtap="addPurchase" wx:if="{{filter.has_add_goods(item.prom_type)}}" data-gid="{{item.goods_id}}" data-prom_id="{{item.id}}" data-prom_type="{{item.prom_type}}" data-goods_type="{{item.goods_type}}">
  196 + <text class="iconfont icon-gouwuche fs60" style="color: #f23030;"></text>
  197 + </view>
  198 + </navigator>
  199 + </view>
  200 +
  201 +
  202 + <view class="choice_list on" wx:else>
  203 + <navigator class="choice_item" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">
  204 + <view class="img-wrap">
  205 + <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image>
  206 + </view>
  207 + <view class="item-cont" style="position: relative;">
  208 + <view class="title ellipsis-2">{{item.goods_name}}</view>
  209 + <!-- 判断是否有活动价 -->
  210 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
  211 + <view class="flex on">
  212 + <!-- 活动价 -->
  213 + <view class="price">
  214 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  215 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  216 + <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
  217 + </view>
  218 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
  219 + </view>
  220 +
  221 +
  222 + <view class="comment pdt10">
  223 + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
  224 + <view class="fs24 t-r">
  225 + <span>评论{{item.comment_count}}</span>
  226 + <span class="pdl30">已售{{item.sales_sum}}</span>
  227 + </view>
  228 + </view>
110 229 </block>
111 230 <block wx:else>
112 231 <!-- 商品价格,先判断下是后又等级价-->
... ... @@ -125,19 +244,19 @@
125 244 <view class="comment">
126 245 <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
127 246 <view class="fs24 t-r">
128   - <span>评论{{item.comment_count}}</span>
129   - <span class="pdl30">已售{{item.sales_sum}}</span>
130   - </view>
  247 + <span>评论{{item.comment_count}}</span>
  248 + <span class="pdl30">已售{{item.sales_sum}}</span>
  249 + </view>
131 250 </view>
132 251 </block>
133 252 <block wx:else>
134 253 <view class="price rmb">{{item.shop_price}}</view>
135 254 <view class="comment">
136   -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  255 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
137 256 <view class="fs24 t-r">
138   - <span>评论{{item.comment_count}}</span>
139   - <span class="pdl30">已售{{item.sales_sum}}</span>
140   - </view>
  257 + <span>评论{{item.comment_count}}</span>
  258 + <span class="pdl30">已售{{item.sales_sum}}</span>
  259 + </view>
141 260 </view>
142 261 </block>
143 262 </block>
... ... @@ -156,176 +275,73 @@
156 275 </view>
157 276 </view>
158 277 <view class="fs24 pdt10 t-r">
159   - <span class="">评论{{item.comment_count}}</span>
160   - <span class="pdl30">已售{{item.sales_sum}}</span>
161   - </view>
  278 + <span class="">评论{{item.comment_count}}</span>
  279 + <span class="pdl30">已售{{item.sales_sum}}</span>
  280 + </view>
162 281 </view>
163 282 </view>
164 283 <block wx:else>
165   - <view>
166   - <view class="price rmb">{{item.shop_price}}</view>
167   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
168   - </view>
  284 + <view>
  285 + <view class="price rmb">{{item.shop_price}}</view>
  286 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
  287 + </view>
169 288 <!-- <view class="price">¥{{item.shop_price}}</view> -->
170 289 <view class="comment pdt10">
171 290 <view class="fs24 t-r">
172   - <span>评论{{item.comment_count}}</span>
173   - <span class="pdl30">已售{{item.sales_sum}}</span>
174   - </view>
  291 + <span>评论{{item.comment_count}}</span>
  292 + <span class="pdl30">已售{{item.sales_sum}}</span>
  293 + </view>
175 294 </view>
176 295 </block>
177 296 </block>
178 297 </block>
179 298 <view wx:else>
180   - <view class="flex ai-center">
181   - <view class="price rmb">{{item.shop_price}}</view>
182   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
183   - </view>
184   -
  299 + <view class="">
  300 + <view class="price rmb">{{item.shop_price}}</view>
  301 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
  302 + </view>
185 303 <view class="comment pdt10">
186 304 <view class="fs24 t-r">
187   - <span>评论{{item.comment_count}}</span>
188   - <span class="pdl30">已售{{item.sales_sum}}</span>
189   - </view>
  305 + <span>评论{{item.comment_count}}</span>
  306 + <span class="pdl30">已售{{item.sales_sum}}</span>
  307 + </view>
190 308 </view>
191 309 </view>
192 310 </block>
  311 +
  312 + <view class="gicon2" catchtap="addPurchase" wx:if="{{filter.has_add_goods(item.prom_type)}}" data-gid="{{item.goods_id}}" data-prom_id="{{item.id}}" data-prom_type="{{item.prom_type}}" data-goods_type="{{item.goods_type}}">
  313 + <text class="iconfont icon-gouwuche fs60" style="color: #f23030;"></text>
193 314 </view>
  315 + </view>
194 316 </navigator>
195   - </view>
196   -
197   -
198   - <view class="choice_list on" wx:else>
199   - <navigator class="choice_item" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">
200   - <view class="img-wrap">
201   - <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image>
202   - </view>
203   - <view class="item-cont">
204   - <view class="title ellipsis-2">{{item.goods_name}}</view>
205   - <!-- 判断是否有活动价 -->
206   - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
207   - <view class="flex on">
208   - <!-- 活动价 -->
209   - <view class="price">
210   - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
211   - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
212   - <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
213   - </view>
214   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
215   - </view>
216   -
217   -
218   - <view class="comment pdt10">
219   -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
220   - <view class="fs24 t-r">
221   - <span>评论{{item.comment_count}}</span>
222   - <span class="pdl30">已售{{item.sales_sum}}</span>
223   - </view>
224   - </view>
225   - </block>
226   - <block wx:else>
227   - <!-- 商品价格,先判断下是后又等级价-->
228   - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
229   - <!-- 当会员是等级卡的时候 -->
230   - <block wx:if="{{card_field}}">
231   - <!-- 等级价>0 -->
232   - <block wx:if="{{item[card_field]>0}}">
233   - <view class="flex ai-center">
234   - <view class="price rmb">{{item[card_field]}}</view>
235   - <view class="card_bg ellipsis-1">
236   - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
237   - <text class="card_name">{{card_name}}</text>
238   - </view>
239   - </view>
240   - <view class="comment">
241   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
242   - <view class="fs24 t-r">
243   - <span>评论{{item.comment_count}}</span>
244   - <span class="pdl30">已售{{item.sales_sum}}</span>
245   - </view>
246   - </view>
247   - </block>
248   - <block wx:else>
249   - <view class="price rmb">{{item.shop_price}}</view>
250   - <view class="comment">
251   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
252   - <view class="fs24 t-r">
253   - <span>评论{{item.comment_count}}</span>
254   - <span class="pdl30">已售{{item.sales_sum}}</span>
255   - </view>
256   - </view>
257   - </block>
258   - </block>
259   - <block wx:else>
260   - <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
261   - <view class="flex ai-center">
262   - <view class="price rmb">{{item.shop_price}}</view>
263   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb no_line_c">{{item.market_price}}</view>
264   - </view>
265   - <view class="comment">
266   - <view class="flex ai-center">
267   - <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view>
268   - <view class="card_bg ellipsis-1">
269   - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
270   - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
271   - </view>
272   - </view>
273   - <view class="fs24 pdt10 t-r">
274   - <span class="">评论{{item.comment_count}}</span>
275   - <span class="pdl30">已售{{item.sales_sum}}</span>
276   - </view>
277   - </view>
278   - </view>
279   - <block wx:else>
280   - <view>
281   - <view class="price rmb">{{item.shop_price}}</view>
282   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
283   - </view>
284   - <!-- <view class="price">¥{{item.shop_price}}</view> -->
285   - <view class="comment pdt10">
286   - <view class="fs24 t-r">
287   - <span>评论{{item.comment_count}}</span>
288   - <span class="pdl30">已售{{item.sales_sum}}</span>
289   - </view>
290   - </view>
291   - </block>
292   - </block>
293   - </block>
294   - <view wx:else>
295   - <view class="">
296   - <view class="price rmb">{{item.shop_price}}</view>
297   - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
298   - </view>
299   - <view class="comment pdt10">
300   - <view class="fs24 t-r">
301   - <span>评论{{item.comment_count}}</span>
302   - <span class="pdl30">已售{{item.sales_sum}}</span>
303   - </view>
304   - </view>
305   - </view>
306   - </block>
307   - </view>
308   - </navigator>
309   - </view>
310   -
311   -
312   -
313   -
314   -
315   - <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}">
316   - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
317   - <view class="no-data-title">暂无相关商品</view>
318   - <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
319   - </view>
320 317 </view>
321 318  
  319 +
  320 +
  321 +
  322 +
  323 + <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}">
  324 + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
  325 + <view class="no-data-title">暂无相关商品</view>
  326 + <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
  327 + </view>
  328 +</view>
  329 +
322 330 <include src="../com_screen.wxml" />
323 331  
324 332 <share_box id="share"></share_box>
325 333 <view class="t-c fs32" wx:if="{{err_txt}}">
326   - <view class="no-data">
327   - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
328   - <view class="no-data-title">{{err_txt}}</view>
329   - <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
330   - </view>
331   -</view>
332 334 \ No newline at end of file
  335 + <view class="no-data">
  336 + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
  337 + <view class="no-data-title">{{err_txt}}</view>
  338 + <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
  339 + </view>
  340 +</view>
  341 +
  342 +
  343 +<!-- 加购 -->
  344 +<add_purchase id="add_purchase" bindhide_add_purchase="hide_add_purchase" wx:if="{{add_purchase}}"></add_purchase>
  345 +
  346 +
  347 +
  348 +
... ...
pages/goods/goodsList/goodsList.wxss
... ... @@ -48,7 +48,7 @@ page {
48 48 top: 0;
49 49 /* width: 95%; */
50 50 background-color: #f0f0f0;
51   - z-index: 999;
  51 + z-index: 11;
52 52 }
53 53  
54 54 .nav-box {
... ... @@ -56,7 +56,7 @@ page {
56 56 top: 114rpx;
57 57 /* width: 95%; */
58 58 background-color: #f0f0f0;
59   - z-index: 999;
  59 + z-index: 11;
60 60 }
61 61  
62 62 .ico-dir {
... ... @@ -294,5 +294,20 @@ page {
294 294 color: white;
295 295 padding: 20rpx 50rpx;
296 296 }
297   -
  297 +.gicon{
  298 + position: absolute;
  299 + right: 20rpx;
  300 + top: 0;
  301 + bottom: 0;
  302 + display: flex;
  303 + align-items: center;
  304 +}
  305 +.gicon2{
  306 + position: absolute;
  307 + right: 20rpx;
  308 + top: 0;
  309 + bottom: 0;
  310 + display: flex;
  311 + align-items: center;
  312 +}
298 313 @import '../com_screen.wxss';
299 314 \ No newline at end of file
... ...
pages/index/index/index.js
... ... @@ -932,7 +932,7 @@ Page({
932 932 },
933 933 jumpSearch: function () {
934 934 wx.navigateTo({
935   - url: "/pages/goods/search/search"
  935 + url: "/packageG/pages/goods/search/search"
936 936 });
937 937 },
938 938 onShareAppMessage: function (e) {
... ... @@ -1149,7 +1149,7 @@ Page({
1149 1149 success: (res) => {
1150 1150 var result = res.result;
1151 1151 wx.navigateTo({
1152   - url: "/pages/goods/search/search?s_key=" + result,
  1152 + url: "/packageG/pages/goods/search/search?s_key=" + result,
1153 1153 });
1154 1154 }
1155 1155 })
... ...
pages/index/index/index.json
... ... @@ -25,7 +25,8 @@
25 25 "serviceCard": "/components/diy_serviceCard/diy_serviceCard",
26 26 "live": "/components/diy_live/diy_live",
27 27 "mp-dialog": "weui-miniprogram/dialog/dialog",
28   - "mp-sticky": "/components/mp-sticky/mp-sticky",
  28 + "mp-sticky": "/components/mp-sticky/mp-sticky",
  29 + "floatingWindow": "/components/diy_floatingWindow/diy_floatingWindow",
29 30 "privacy_pop": "/components/privacy_pop/privacy_pop"
30 31 },
31 32 "enablePullDownRefresh": false,
... ...
pages/index/index/index.wxml
... ... @@ -495,6 +495,10 @@
495 495 <block wx:if="{{item.ename=='title'}}">
496 496 <title object="{{item.content}}"></title>
497 497 </block>
  498 + <!--悬浮窗口-->
  499 + <block wx:if="{{item.ename=='floatingWindow'}}">
  500 + <floatingWindow object="{{item.content}}"></floatingWindow>
  501 + </block>
498 502 <!--辅助空白-->
499 503 <block wx:if="{{item.ename=='white'}}">
500 504 <assist object="{{item.content}}"></assist>
... ...
pages/order/refund_order/refund_order.js
... ... @@ -15,9 +15,10 @@ Page({
15 15 reasonSelect: 0,
16 16 reasonList: [ "没有收到货", "不喜欢/不想要", "个人原因拍错/漏拍", "空包裹", "未按照约定时间发货", "快递/物流未送达", "快递/物流无跟踪记录", "发错快递", "商品破损", "商品尺寸规格不符", "商品质量差,与网上描述不符", "其他原因" ],
17 17 refund_type:0,
18   - isloading:0,
  18 + isloading:0,
  19 + template_id:[],
19 20 },
20   - onLoad: function(t) {
  21 + onLoad: async function(t) {
21 22 var th=this;
22 23 getApp().getConfig2(function (em) {
23 24  
... ... @@ -53,8 +54,30 @@ Page({
53 54 })
54 55 });
55 56 })
  57 + try {
  58 + let template_id =await getApp().get_template_id('1025')
  59 + this.setData({
  60 + template_id
  61 + })
  62 + } catch (error) {}
56 63 },
57   -
  64 + //订阅消息提醒
  65 + sendsm: function (ee) {
  66 + let th = this;
  67 + var template_id = this.data.template_id;
  68 + console.error('退款');
  69 + console.error(template_id);
  70 + // //授权订阅
  71 + wx.requestSubscribeMessage({
  72 + tmplIds: template_id,
  73 + success(res) {
  74 + th.refundOrder(ee);
  75 + },
  76 + fail(res) {
  77 + th.refundOrder(ee);
  78 + }
  79 + })
  80 + },
58 81 //------提交退款申请-------
59 82 refundOrder: function(e) {
60 83 //if(!this.data.back_money){
... ...