Commit b985842cdd85d49ec5258ac68d217dd81a4d0b27

Authored by 前端开发-罗建龙
1 parent 4261f627

加购组件

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