From b5d851227d194e542c39fe66e9e4c7eac3437276 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Tue, 26 Dec 2023 09:58:04 +0800 Subject: [PATCH] 跳转的优化 --- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js | 4 ++-- packageF/pages/team/team_more/team_more.js | 2 +- packageG/pages/team/team_show/team_show.js | 1714 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ packageG/pages/team/team_show/team_show.json | 13 +++++++++++++ packageG/pages/team/team_show/team_show.wxml | 550 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ packageG/pages/team/team_show/team_show.wxss | 2201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ packageG/pages/team/team_success/team_success.js | 4 ++-- pages/team/team_show/team_show.js | 1703 ++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/team/team_show/team_show.json | 7 ++----- pages/team/team_show/team_show.wxml | 550 ++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages/team/team_show/team_show.wxss | 2206 +++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 11 files changed, 4496 insertions(+), 4458 deletions(-) create mode 100644 packageG/pages/team/team_show/team_show.js create mode 100644 packageG/pages/team/team_show/team_show.json create mode 100644 packageG/pages/team/team_show/team_show.wxml create mode 100644 packageG/pages/team/team_show/team_show.wxss diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js index 55558dc..12a15d4 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -5038,14 +5038,14 @@ Page({ } else { wx.navigateTo({ - url: "/pages/team/team_show/team_show?tg_id=" + id, + url: "/packageG/pages/team/team_show/team_show?tg_id=" + id, }); } } //--跳转到参团-- else { wx.navigateTo({ - url: "/pages/team/team_show/team_show?tg_id=" + id, + url: "/packageG/pages/team/team_show/team_show?tg_id=" + id, }); } } diff --git a/packageF/pages/team/team_more/team_more.js b/packageF/pages/team/team_more/team_more.js index ad8343c..7aa2725 100644 --- a/packageF/pages/team/team_more/team_more.js +++ b/packageF/pages/team/team_more/team_more.js @@ -204,7 +204,7 @@ Page({ //--跳转到参团-- else if(e.data.code == 0){ wx.navigateTo({ - url: "/pages/team/team_show/team_show?tg_id="+tid+"&goods_id="+th.data.pt_act.goods_id, + url: "/packageG/pages/team/team_show/team_show?tg_id="+tid+"&goods_id="+th.data.pt_act.goods_id, }); } diff --git a/packageG/pages/team/team_show/team_show.js b/packageG/pages/team/team_show/team_show.js new file mode 100644 index 0000000..ae82c74 --- /dev/null +++ b/packageG/pages/team/team_show/team_show.js @@ -0,0 +1,1714 @@ +var t = require("../../../../utils/util.js"), + ut = t, + e = require("../../../../utils/common.js"), + a = require("../../../../utils/wxParse/wxParse.js"), + s = getApp(), + i = s.request, + rq = i, + oo = s.globalData, + o = s.globalData.setting, + os = o; +var regeneratorRuntime = require('../../../../utils/runtime.js'); + + +Page({ + data: { + + num: 1, //输入框值 加减之间的值 + minusStatus: 'disable', //禁用按钮 + ii_endname: 'disable', //吐司的禁用按钮 + pd_xx: false, //弹框 + buy_start_date: null, //转换完的时间 + ssl: null, + yijian: false, //一键参加按钮显示隐藏 + + //选择门店 + qh: true, //取货 + xz: false, //选择 + one: false, //第一层显示隐藏 + se: false, //已选择的值 + list: false, //第二层显示隐藏 + ssl_child: null, //第二层的值 + sele_dl_name: "", //选择的值 + end_name: "", //最后显示的值 + + ii: 0, //选择门店显示隐藏 + zk: true, //展开列表显示隐藏 + stoid: o.stoid, + hiddenName: false, //收起列表显示隐藏 + teamlist: null, //活动主表 + teamgroup: null, //活动从表 + goods: null, //商品数据 + pindGoods: null, //拼单数据 + imageurl: os.imghost, //有礼派图片地址 + team_id: 0, //支付是否成功 + listno: "", //订单编号 + + //选择的门店id + pick_id:0, + //会员团满团时的判断 + tg_arr:null, + //是否显示 + is_show:0, + //是不是团结束 + is_group_end:0, + //团结束的提示语句 + end_text:"", + //是开团或者参团,0参团,1开团(但是,商家团还是参团) + is_kt_or_ct:0, + //判断redis的数组 + redis_arr:null, + + iurl:os.imghost, + + + openSpecModal: !1, + openSpecModal_pt: !1, //拼单的弹起, + + + //门店相关 + ismend: 0, + is_sec_mend: 0, + sto_sele_name: "", //选中的门店名称 + sto_sele_id: "", //选中的门店id + sto_sele_distr: "", //选择的门店的配送方式 + is_show_sto_cat: 1, //是否显示门店分类 + only_pk: null, + all_sto: null, + sec_sto: null, //选择了的门店分类 + pickpu_list: null, //读出的所有门店list + def_pickpu_list: null, //一开始5个门店list + sec_pick_index: 0, //第二级门店选择ID + fir_pick_index: 0, //第一级门店选择ID + all_pick_list:null,//所有的门店先记录起来 + bconfig:null, + def_pick_store: null, // 默认的门店 + fir_def_store:null, //客户默认的门店的 + lat: null, //维度 + lon: null, //经度 + + is_get_local_ok: 0, //获取坐标是否完成 + + sort_store: 0, //门店分类 + choice_sort_store: 0, //选择分类门店 + template_id:[],//订阅消息id + }, + onLoad: async function(options) { + wx.setNavigationBarTitle({ title: "拼团订单",}) + //var postdata=getApp().globalData.to_group; + + if(options.transfer){ + let obj=getApp().globalData.ts_trans_data; + options=ut.deep_cp(obj); + getApp().globalData.ts_trans_data=null; + } + + var postdata=options; + + + var tg_id = postdata.tg_id, first_leader=options.first_leader,goods_id=options.goods_id; + //如果tg_id是空的话 + if(tg_id==null ||goods_id==null){ + var tg_id_str=decodeURIComponent(postdata.scene); + tg_id_str=tg_id_str.split("_"); + console.log(tg_id_str.length); + //tg_id_str[0] teamgroup.id tg_id_str[1] user_id tg_id_str[2] goods_id + switch(tg_id_str.length){ + case 1: + tg_id=tg_id_str[0]; + break; + case 2: + tg_id=tg_id_str[0]; + first_leader=tg_id_str[1]; + break; + case 3: + tg_id=tg_id_str[0]; + first_leader=tg_id_str[1]; + goods_id=tg_id_str[2]; + break; + } + } + //--判断一下是不是导购-- + if(first_leader){ + getApp().globalData.first_leader=first_leader; + //调用接口判断是不是会员 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ + if(res.data.code==0){ + getApp().globalData.guide_id=res.data.data.id; + getApp().globalData.guide_pick_id= res.data.data.pickup_id + } + }) + } + this.setData({tg_id: tg_id,goods_id}); + getApp().globalData.to_group=null; + + var th=this; + getApp().getConfig2(function(e) { + var json_d = JSON.parse(e.switch_list); + th.setData({ bconfig: e,sys_switch:json_d}); + th.wait_for_store_config(); //获取默认的门店 + }) + try { + let template_id =await getApp().get_template_id('1023') + this.setData({ + template_id + }) + } catch (error) {} + + }, + + //显示加载 + onShow:function(){ + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + + getApp().check_can_share(); + var tg_id = this.data.tg_id,th=this; + this.init(tg_id); + }, + + //c点击打开拼团弹窗 + cpd: function() { + this.setData({ pd_xx: true,}) + }, + + //点击关闭拼团弹窗 + close_pt_xx: function() { + this.setData({ pd_xx: false, }) + }, + //天天拼团订阅消息提醒 + sendsm: function (ee) { + let th = this; + var template_id = this.data.template_id; + // //授权订阅 + wx.requestSubscribeMessage({ + tmplIds: template_id, + success(res) { + th.cyijian(ee); + }, + fail(res) { + th.cyijian(ee); + } + }) + }, + //按钮点击一键参加团按钮 + cyijian: function(e) { + //--先判断会员状态-- + var user_info=getApp().globalData.userInfo; + if(user_info==null || user_info.mobile==undefined || user_info.mobile=="" || user_info.mobile==null){ + wx.navigateTo({ url: '/packageE/pages/togoin/togoin', }) + return false; + } + + var is_kt_or_ct=e.currentTarget.dataset.isct; + this.setData({ + yijian: true,is_kt_or_ct:is_kt_or_ct, + }) + }, + //关闭展开列表 + click: function(e) { + this.setData({ + hiddenName: !this.data.hiddenName, + zk: !this.data.zk, + }) + }, + //打开收起拼团列表 + czk: function(e) { + this.setData({ + zk: !this.data.zk, + hiddenName: !this.data.hiddenName, + }) + }, + //关闭购买页面 + cbcou: function(e) { + this.setData({ + yijian: false, + }) + + }, + //qh点击取货 + cqh: function(e) { + if(this.data.ssl) { + this.setData({ + qh: false, + xz: true, + one: true, + }) + }else{ + this.setData({ + qh: false, + xz: true, + one: false, + list:1, + }) + } + + }, + + //cxz点击选择门店 + cxz: function(e) { + this.setData({ + qh: true, + xz: false, + one: false, + }) + }, + //ccc点击选择的 + sel: function(e) { + this.setData({ + list: false, + se: false, + one: true, + xz: true, + }) + }, + //list点击底二层 + clist: function(e) { + var i = e.currentTarget.dataset.end; + var pick_id = e.currentTarget.dataset.pick_id; + var pick_dis = e.currentTarget.dataset.pick_dis; + + this.setData({ + end_name: i, + pick_id: pick_id, + ii: 1, + qh: true, + se: false, + list: false, + pick_dis: pick_dis + }) + }, + + //点击第一层 + setchild: function(e) { + var ind = e.currentTarget.dataset.bindex; + var nn = e.currentTarget.dataset.bname; + console.log(nn); + var list = this.data.ssl[ind].s_arr; + this.setData({ + ssl_child: list, + sele_dl_name: nn, + xz: false, + one: false, + list: true, + se: true + }); + }, + + //事件处理函数 + /*点击减号*/ + bindMinus: function() { + var num = this.data.num; + if (num > 1) { + num--; + } + var minusStatus = num > 1 ? 'normal' : 'disable'; + this.setData({ + num: num, + minusStatus: minusStatus, + }) + }, + + /*点击加号*/ + bindPlus: function() { + var th=this; + var num = this.data.num; + var ii = this.data.ii; + var minusStatus = num > 1 ? 'normal' : 'disable'; + + num++; + //要判断库存数量,限购数量 + th.check_num(num,minusStatus); + + }, + + async check_num(num,minusStatus){ + + var gd=this.data.goods; + var th=this; + var user_id=getApp().globalData.user_id; + var promgoodsbuynum=0; + var goodsbuynum=0; + getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { + data: { + store_id: os.stoid, + user_id: user_id, + goods_id: gd.goods_id, + prom_type: gd.prom_type, + prom_id: gd.prom_id, isnew:1 + + }, + }).then(res=>{ + var buy_num_data=res.data.data; + if(buy_num_data.promgoodsbuynum) promgoodsbuynum=buy_num_data.promgoodsbuynum; + goodsbuynum=buy_num_data.goodsbuynum; + }) + + //先判断限购 + if (num+goodsbuynum>gd.viplimited && gd.viplimited>0) { + getApp().confirmBox("超出商品限购"); + return false; + } + if (num+promgoodsbuynum>th.data.teamlist.buy_limit && th.data.teamlist.buy_limit>0) { + getApp().confirmBox("超出活动限购"); + return false; + } + //判断库存 + if ( num>gd.store_count) { + getApp().confirmBox("超出商品库存"); + return false; + } + var r_num=0; + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.teamlist.id, { + 1: 1 + }).then(res => { + var em = res; + if (em.data.code == 0) { + r_num=em.data.data; + } + }) + //--判断库存--- + if ( num>r_num) { + getApp().confirmBox("超出商品库存"); + return false; + } + + this.setData({ + num: num, + minusStatus: minusStatus, + }) + + }, + + /*输入框事件*/ + bindManual: function(e) { + var num = e.detail.value; + var minusStatus = num > 1 ? 'normal' : 'disable'; + this.setData({ + num: num, + minusStatus: minusStatus + }) + }, + + //---------------初始化代码---------------- + async init(tg_id) { + var goods_id = 0, //商品ID, + pageteam = null, // + original_img = null, //商品图片 + ee = this, + ordertx = [], + teamlist = null, //活动表 + goods = null, //商品 + teamgroup = null, //活動从表 + max_num = 0, + min_price = 0, + th=this, + that=th, + flag=null; + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/2",{ + data:{ + store_id: os.stoid, + is_end: 0, + is_show: 1, + user_id: getApp().globalData.user_id, + pageSize:1000 + } + }).then(res=>{ + let pd_list=res.data.data.pageData; + if(res.data.code==0 && pd_list.length>0){ + flag =pd_list.some(pd=>{ + // if(th.data.goods_id){ + return pd.goods_id==th.data.goods_id; + // } + }) + } + }) + if(!flag){ + wx.showToast({title: "当前会员身份不符,无法参与", icon: 'none', duration: 3000}); + setTimeout(function () { + ut.wx_back(); + }, 1000) + return false; + } + + //获取活动从表信息team_id,listno团编号(券号) + await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, { + }).then(res => { + + if(res.data.code !=0 ){ + getApp().showWarning(res.data.msg); + th.go_back(); + return false; + } + + if(res.data && res.data.data ) { + + teamgroup = res.data.data; + //获取当前时间,并且判断剩余时间 + var nt = ut.gettimestamp(); + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss"); + ee.setData({ + pindGoods: teamgroup, + buy_start_date: buy_start_date + }); + + if(nt>teamgroup.kt_end_time) { + th.setData({is_group_end:1,end_text:"团期已经结束"}) + } + if(teamgroup.state==1) { + th.setData({is_group_end:1,end_text:"团期已经结束"}) + } + if(teamgroup.state==3 || teamgroup.state==4 || teamgroup.state==5 ) { + th.setData({is_group_end:2,end_text:"团期已满"}) + } + + } + }) + + if(!teamgroup || !teamgroup.listno){ + ut.m_toast('未找到团号'); + th.go_back(); + return false; + } + + //判断是不是要继续的开关 + var is_ok=1; + + //要先读取订单,看自己有没有买过该团的商品 + await getApp().request.promiseGet("/api/weshop/order/page", { + data: { + pt_prom_id:teamgroup.team_id, + user_id: oo.user_id, + store_id: os.stoid, + pageSize: 1, + page: 1 + } + }).then(res => { + var e=res; + if (e.data.code != 0) { + getApp().showWarning("读取订单失败"); + th.go_back(); + is_ok=0; + return fasle; + } + //--跳转到已经购买的情况-- + if (e.data.data.pageData.length > 0) { + var odr = e.data.data.pageData[0]; + //还未支付 + if (odr.pt_status == 0 && odr.order_status == 1) { + wx.navigateTo({ + url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id, + }); + is_ok=0; + }else if (odr.pt_status == 1 && odr.order_status == 1){ + wx.navigateTo({ + url: "/packageG/pages/team/team_success/team_success?ordersn=" + odr.order_sn, + }); + is_ok=0; + } + } + }) + if(!is_ok) return false; + + //获取活动表的信息根据活动team_id + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, { + data: {} + }).then(res => { + if (res.data.code == 0) { + teamlist = res.data.data; + goods_id = res.data.data.goods_id; + //----------查看阶梯团------------ + if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) { + var ct_rylist = JSON.parse(teamlist.ct_rylist); + var max = 0; var pri = 0; + ct_rylist.forEach(function (val, ind) { + if (val.rynum > max) { + max = val.rynum; + pri = val.price; + } + }) + max_num = max; + min_price = pri; + } + + } + }) + + if(!teamlist){ + getApp().showWarning("未找到活动"); + is_ok=0; + }else{ + if(teamlist.is_end==1){ + getApp().showWarning("拼单活动已经结束"); is_ok=0; + } + var now=ut.gettimestamp(); + if(teamlist.end_time { + ordertx = res.data.data.pageData; + }) + + //获取商品信息 + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, { + }).then(res => { + //商品地址 + original_img = ee.data.imageurl + res.data.data.original_img, + goods = res.data.data + }) + + //显示商品规格 + var gg = ""; + if(goods.goods_spec=="null" || goods.goods_spec==null ) goods.goods_spec=""; + if(goods.goods_color=="null" || goods.goods_color==null) goods.goods_color=""; + + if (goods.goods_spec != "" && goods.goods_color != "") { + gg = goods.goods_spec + "/" + goods.goods_color; + } else if (goods.goods_spec != "" || goods.goods_color != "") { + gg = goods.goods_spec + goods.goods_color; + } else { + gg = "规格1"; + } + goods.gg = gg; + + //只装5个 + var ordertx2 = [], sf_num = 0, ct_nun = teamlist.ct_num; + if (max_num) { + ct_nun = parseInt(max_num); + if (ct_nun < ordertx.length) ct_nun = ordertx.length; + } + + if (ct_nun > 5) ct_nun = 5; + for (var i = 0; i < ct_nun; i++) { + if (i >= ordertx.length) sf_num++ + else + ordertx2.push(ordertx[i]); + } + + var sf_arr = []; + for (var i = 0; i < sf_num; i++) { + sf_arr.push(i); + } + + + + if(th.data.is_group_end==1 || th.data.is_group_end==2 ){ + getApp().confirmBox(th.data.end_text); + wx.redirectTo({ + url: "/pages/goods/goodsInfo/goodsInfo?goods_id=" + goods.goods_id, + }); + return false; + } + + //--当是会员团的时候才显示倒计时多久可以参团-- + if(teamlist.kttype==2) { + //显示判断多久才能购买商品,获取没有支付的会员 + await getApp().request.promiseGet("/api/weshop/teamgroup/getTeamUser/" + os.stoid + "/" + teamgroup.id, { + 1: 1 + }).then(res => { + var em = res; + if (em.data.code == 0) { + var tg_list = em.data.data.split("|"); + var t_obj = {}; + t_obj.order_id = tg_list[0]; + t_obj.time = parseFloat(tg_list[1]) + 5 * 60; //五分钟后 + t_obj.user_name = tg_list[2]; + th.setData({tg_arr: t_obj}) + } + }) + } + + //获取大家都在团信息 + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/"+os.stoid, { + data: { + pageSize: 2, + page: 1, + store_id: 1, + is_end: 0, + is_show: 1 + } + }).then(res => { + if(ut.ajax_ok(res)){ + pageteam = res.data.data.pageData; + } + }); + + //-- 获取用户的默认门店 -- + getApp().get_user_store(function(ee) { + if(!ee) { + th.data.fir_def_store={}; //赋值空对象 + return false; + } + + if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) + //--定时器推迟一下-- + + var appd=getApp().globalData; + var w_time = setInterval(function() { + if (that.data.is_get_local_ok == 0) return false; + if(!th.data.goods) return false; + var g_distr_type=th.data.goods.distr_type; + //--如果默认门店的配送方式不对,就不能被选择-- + if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ + //th.data.fir_def_store={}; //赋值空对象 + //return false; + ee.is_no_dis=1; + } + + clearInterval(w_time); + + var distance = null; + var e=JSON.parse(JSON.stringify(ee)); + + //如果有开启近距离的话,同时距离优不一样了 + if (that.data.lat != null) { + //如果经纬度有变化的话 + if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){ + that.data.fir_def_store=e; + that.setData({ + def_pick_store: e, + sto_sele_name: e.pickup_name, + sto_sele_id: e.pickup_id, + sto_sele_distr: e.distr_type + }) + }else{ + //要用接口是获取距离,js的计算不准 + getApp().request.promiseGet("/api/weshop/pickup/list",{ + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon,is_pos: 1}, + }).then(res=>{ + if(ut.ajax_ok(res)){ + e=res.data.data.pageData[0]; + if (e){ + appd.pk_store=e; + that.data.fir_def_store=e; + that.setData({ + def_pick_store: e, + sto_sele_name: e.pickup_name, + sto_sele_id: e.pickup_id, + sto_sele_distr: e.distr_type + }) + } + + } + }) + } + + //e.distance = distance; + appd.lat=that.data.lat; + appd.lon=that.data.lon; + + }else{ + if (e) { + e.distance = null; + that.data.fir_def_store=e; + that.setData({ + def_pick_store: e, + sto_sele_name: e.pickup_name, + sto_sele_id: e.pickup_id, + sto_sele_distr: e.distr_type + }) + } + } + + }, 500) + + }); + + //获取下redis长度,如果团已经弄完,或者拼单已经卖完 + //设置值 + ee.setData({ + ordertx2: ordertx2, + ordertx: ordertx, + teamlist: teamlist, + teamgroup: teamgroup, + goods: goods, + pageteam: pageteam, + image: original_img, + is_show:1, + sf_arr: sf_arr + }); + ee.countDown2(); + //---设置门店--- + ee.get_sto(); + //---定时设置一下待支付的订单--- + ee.time_out(); + }, + + onHide:function(){ + this.setData({is_show:0,}); + }, + go_back:function(){ + if(getCurrentPages()>1) + wx.navigateBack({delta: 1}) + else + wx.navigateTo({ + url: "/pages/index/index/index" + }); + }, + //---小于10的格式化函数---- + timeFormat(param) { + return param < 10 ? '0' + param : param; + }, + countDown2() { + var th = this; + // 获取当前时间,同时得到活动结束时间数组 + var newTime = ut.gettimestamp(); + var o = this.data.pindGoods; + var endTime = o.kt_end_time; + + let obj = null; + // 如果活动未结束,对时间进行处理 + if (endTime - newTime > 0) { + let time = (endTime - newTime); + // 获取天、时、分、秒 + let day = parseInt(time / (60 * 60 * 24)); + let hou = parseInt(time % (60 * 60 * 24) / 3600); + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); + obj = { + day: this.timeFormat(day), + hou: this.timeFormat(hou), + min: this.timeFormat(min), + sec: this.timeFormat(sec) + } + } else { + //活动已结束,全部设置为'00' + obj = { + day: '00', + hou: '00', + min: '00', + sec: '00' + } + } + var txt = "pindGoods.djs"; + th.setData({ + obj: obj + }); + setTimeout(th.countDown2, 1000); + }, + + //------去支付,购买------- + go_pay:function () { + var th=this; + var def_pick_store=this.data.def_pick_store; + if(def_pick_store && def_pick_store.pickup_id) { + th.data.pick_id=def_pick_store.pickup_id; //选择门店 + th.data.end_name=def_pick_store.pickup_name; + } + if (!th.data.pick_id) return s.my_warnning("请选择门店", 0, th); + if (th.data.pick_id==0) return s.my_warnning("请选择门店", 0, th); + + //----判断起购数---- + var qnum=parseFloat(th.data.teamlist.minbuynum); + if(qnum>0 && qnum>th.data.num ){ + getApp().confirmBox("拼团商品至少要买"+qnum+"件!"); + return false; + } + //先判断团的redis数量 + this.buy_check_redis(function () { + var arr=th.data.redis_arr; + if(th.data.num>arr[0]){ + if(arr[0]>0){ + getApp().showWarning("超出活动库存"); + }else{ + getApp().showWarning("拼单已经抢光"); + } + return false; + } + if(th.data.teamlist.kttype==2 && 1>arr[1]){ + getApp().showWarning("拼团已满"); + return false; + } + + //--------------此时操作的数据------------ + var newd = { + goods_id: th.data.goods.goods_id, + goods_num: th.data.num, + pick_id: th.data.pick_id, + user_id: oo.user_id, + store_id: th.data.stoid, + goods_name: th.data.goods.goods_name, + goods_sn: th.data.goods.goods_sn, + }; + + //---是不是从收藏夹出来的--- + if(th.data.c_guide_id){ + newd['guide_id'] = th.data.c_guide_id; + newd['guide_type']=2; + + }else{ + if(getApp().globalData.guide_id){ + newd['guide_id'] = getApp().globalData.guide_id; + newd['guide_type']=0; + + } + } + + //-----拼团----- + newd.goods_price = th.data.teamlist.price; + newd.prom_type = 6; + newd.prom_id = th.data.teamlist.id; + newd.kt_type = th.data.teamlist.kttype; //开团类型 + newd.is_pt_tz = 0; + newd.pick_name = th.data.end_name; + newd.pick_dis = 1; + newd.is_normal = 0; + //判断开团还是参团 + switch (th.data.is_kt_or_ct) { + case "0": + //如果不是商家团,就要带团期号 + if(th.data.teamlist.kttype>1){ + newd.qh=th.data.teamgroup.listno; + } + break; + case "1": + //阶梯团和会员团都要设置is_pt_tz + if (newd.kt_type > 1) { + newd.is_pt_tz = 1; //开团类型 + } + break; + } + newd['pick_dis'] = th.data.pick_dis; + + if(getApp().globalData.guide_id){ + newd['guide_id'] = getApp().globalData.guide_id; + newd['guide_type']=0; + } + + s.set_b_now(newd); + wx.navigateTo({ + url: "/packageE/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + th.data.goods.goods_id, + }); + }); + }, + + //购买前的判断redis + async buy_check_redis(func){ + //获取redis中的数量 + var r_num=0,prom_type=6,prom_id=this.data.teamlist.id; + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { + 1: 1 + }).then(res => { + var em = res; + if (em.data.code == 0) { + r_num=em.data.data; + } + }) + + //只有会员团要判断团的人数 + var gr_num=0,grp_id=this.data.teamgroup.id; + if(this.data.teamlist.kttype==2){ + await getApp().request.promiseGet("/api/weshop/activitylist/getActTuanLen/" + os.stoid + "/" + grp_id, { + 1: 1 + }).then(res => { + var em = res; + if (em.data.code == 0) { + gr_num=em.data.data; + } + }) + } + var arr=[];arr.push(r_num);arr.push(gr_num); + this.data.redis_arr=arr; + func(); + }, + + //定时设置一下待支付的订单 + time_out:function () { + var list=this.data.tg_arr,th=this; + if(!list) return false; + // 获取当前时间,同时得到活动结束时间数组 + var newTime = ut.gettimestamp(); + var endTime = list.time; + + let obj = null; + // 如果活动未结束,对时间进行处理 + if (endTime - newTime > 0) { + let time = (endTime - newTime); + // 获取天、时、分、秒 + let day = parseInt(time / (60 * 60 * 24)); + let hou = parseInt(time % (60 * 60 * 24) / 3600); + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); + obj = { + day: th.timeFormat(day), + hou: th.timeFormat(hou), + min: th.timeFormat(min), + sec: th.timeFormat(sec) + } + } else { + //活动已结束,全部设置为'00' + obj = { + day: '00', + hou: '00', + min: '00', + sec: '00' + } + + //调用接口清理订单,并且返回redis数量 + th.back_order(function () { + th.setData({ tg_arr: null}); + }); + return false; + } + var txt = "pindGoods.djs"; + th.setData({ + r_obj: obj + }); + setTimeout(th.time_out, 1000); + }, + + //清理订单,并且返回redis数量ss + back_order:function (func) { + var th=this; + //---取消订单--- + getApp().request.delete("/api/weshop/order/cancelTeamOrder/"+th.data.stoid+"/"+th.data.tg_arr.order_id,{ + data:{}, + success: function(t) { + if(t.data.code==0){ + th.setData({tg_arr:null}) + } + }, + }) + }, + + go_goodsinfo:function (e) { + var gid=e.currentTarget.dataset.gid; + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; + wx.navigateTo({ url: url, }) //跳到非tabbar页 + }, + + gohome:function(){ + getApp().goto("/pages/index/index/index"); + }, + + //-----图片失败,默认图片----- + bind_bnerr: function (e) { + var _errImg = e.target.dataset.errorimg; + var _errObj = {}; + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; + }, + + //------ 分享配置 -------- + onShareAppMessage: function (e) { + getApp().globalData.no_clear=1; + var curPage=this; + var pagePath = curPage.route; //当前页面url + if (pagePath.indexOf('/') != 0) { + pagePath = '/' + pagePath; + } + var url=pagePath; + + //--分享图片-- + img=th.data.iurl+th.data.teamlist.share_imgurl; + //--把会员分享出去-- + if(getApp().globalData.user_id){ + if(url.indexOf("?")>0) + url+="&first_leader="+getApp().globalData.user_id; + else + url+="?first_leader="+getApp().globalData.user_id; + } + + if(url.indexOf('goods_id')==-1){ + url+="&goods_id="+this.data.goods.goods_id; + } + if(url.indexOf('tg_id')==-1){ + url+="&tg_id="+this.data.teamgroup.id; + } + + + return { + path:url, + title: "商品分类", + imageUrl: img, + } + }, + + + + + + closeSpecModal: function() { + this.setData({ + yijian: false + }); + }, + + close_popup: function() { + this.setData({ + showStore: true + }); + }, + + + + //-- 选择门店。此时的门店选择与门店有关系 -- + choice_store: function(ee) { + + //--先判断会员状态-- + var user_info = getApp().globalData.userInfo; + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { + wx.navigateTo({ + url: '/packageE/pages/togoin/togoin', + }) + return false; + } + + var th = this; + var bconfig = th.data.bconfig; + + //如果开启了,则不在选择门店 + if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ + return false; + } + + if(!th.data.only_pk && !th.data.def_pickpu_list){ + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + if(th.data.only_pk && !th.data.only_pk.length){ + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + if(th.data.def_pickpu_list && !th.data.def_pickpu_list.length){ + getApp().confirmBox("门店库存不足", null, 25000, !1); + return false; + } + + if ( bconfig && bconfig.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function(res) { + + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + th.setData({ + is_gps: 1 + }); + //th.onShow(); + th.get_sto(); + }, + fail: function(res) { + //th.onShow(); + th.data.is_get_local_ok = 1; + th.get_sto(); + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 25000, !1); + } + } else { + th.setData({ + is_gps: "3" + }); + } + + } + }) + }else{ + th.data.is_get_local_ok = 1; + th.get_sto(); + } + + this.setData({ + store: 1, + yijian: false, + choice_sort_store:0 + }) + + }, + + + //选择更多门店 + more_store: function() { + this.setData({ sort_store: 1}); + }, + + // 返回按钮 + returns: function() { + this.setData({ + sort_store: 0,choice_sort_store: 0 + }); + }, + + + //-- 等待获取定位系统 -- + wait_for_store_config: function() { + var th = this; + var t_time = setInterval(function() { + if (th.data.bconfig == null) false; + var e = th.data.bconfig; + if (e && e.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function(res) { + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + }, + fail: function(res) { + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 10000, !1); + } + + } else { + th.setData({ + is_gps: "3" + }); + } + + th.data.is_get_local_ok = 1; + } + }) + } else { + th.data.is_get_local_ok = 1; + } + clearInterval(t_time); + }, 500) + }, + + + //---------拿出门店分类和门店------------ + get_sto(e) { + var th = this,that=this; + var timer_get = setInterval(function() { + if (th.data.is_get_local_ok == 0) return false; + if (!th.data.goods) return false; + var dd = null, + i = getApp().request; + var g_distr_type = th.data.goods.distr_type; + if (g_distr_type != 0) { + dd = { + store_id: o.stoid, + distr_type: g_distr_type, + isstop: 0, + is_pos: 1, + pageSize: 2000 + } + } else { + dd = { + store_id: o.stoid, + isstop: 0, + is_pos: 1, + pageSize: 2000 + } + } + //如果有距离的话 + if (th.data.lat != null) { + dd.lat = th.data.lat; + dd.lon = th.data.lon; + } + clearInterval(timer_get); + + //如果会员是有默认的门店话 + if(!th.data.def_pick_store && th.data.fir_def_store){ + th.setData({def_pick_store:th.data.fir_def_store}); + } + + //----------获取门店---------------- + getApp().request.promiseGet("/api/weshop/pickup/list", { + data: dd, + }).then(res => { + var e = res; + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { + + var pickup_ids=null; + //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店 + if( th.data.teamlist.pick_up_lists){ + pickup_ids=th.data.teamlist.pick_up_lists + } + + //-- 如果有指定门店的时候 -- + if(pickup_ids){ + var ok_arr=[]; + for (let i in e.data.data.pageData) { + let ite = e.data.data.pageData[i]; + //-- 查找一下门店有没有在 -- + var idx=pickup_ids.findIndex(function (e){ + return e.pickup_id==ite.pickup_id; + }) + if(idx>-1){ + ok_arr.push(ite) + } + } + + //判断会员的默认的门店是不是匹配指定的门店 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ + //-- 查找一下门店有没有在 -- + var idx1=pickup_ids.findIndex(function (e){ + return e.pickup_id==th.data.def_pick_store.pickup_id; + }) + + if(idx1<0){ + th.data.def_pick_store.is_no_dis_act=1; + }else{ + th.data.def_pick_store.is_no_dis_act=0; + } + + that.setData({ + def_pick_store: th.data.def_pick_store + }) + + } + e.data.data.pageData=ok_arr; //数组重新赋值 + e.data.data.total=ok_arr.length; //数组的长度 + } + else{ + //-- 多规格指定门店优化 -- + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ + th.data.def_pick_store.is_no_dis_act=0; + that.setData({ + def_pick_store: th.data.def_pick_store + }) + } + } + + + + var his_cate_num=0; + for(let i in e.data.data.pageData){ + let item=e.data.data.pageData[i]; + if(item.category_id>0){ + his_cate_num=1;break; + } + } + e.his_cate_num=his_cate_num; + + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 + if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){ + th.setData({ + def_pick_store:e.data.data.pageData[0], + sto_sele_name: e.data.data.pageData[0].pickup_name, + sto_sele_id: e.data.data.pageData[0].pickup_id, + sto_sele_distr: e.data.data.pageData[0].distr_type + }); + th.data.fir_def_store=e.data.data.pageData[0]; + } + + //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ + for (var k = 0; k < e.data.data.pageData.length; k++) { + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { + e.data.data.pageData.splice(k, 1); //删除 + break; + } + } + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 + } + + + th.setData({all_pick_list:e.data.data.pageData}); + + + setTimeout(function(){ + th.deal_pickup(e); //--普通门店排版-- + },800) + + } + }) + }, 200) + + }, + + //------------处理门店,拼团活动只有线上库存--------------- + deal_pickup(e){ + var th=this; + var g_distr_type=th.data.goods.distr_type; + //单总量超出5个的时候 + if (e.data.data.total > 10 && e.his_cate_num) { + getApp().request.get("/api/weshop/storagecategory/page", { + data: { + store_id: o.stoid, + pageSize: 1000, + orderField:"sort", + orderType:'asc', + }, + success: function(ee) { + if (ee.data.code == 0) { + + var check_all_cate=0; + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){ + for(let i in ee.data.data.pageData){ + let item=ee.data.data.pageData[i]; + if(item.is_show==1){ + check_all_cate=1;break + } + } + } + + + + if (check_all_cate) { + + var sto_cate = ee.data.data.pageData; + var sto_arr = e.data.data.pageData; + var newarr = new Array(); + var qita = new Array(); + + var is_del_pk=0; + //----要进行门店分组-------- + for (var i = 0; i < sto_arr.length; i++) { + //找一下这个门店有没有在分类数组内 + var find2 = 0,find2name = "",sort=0; + is_del_pk=0; + for (var m = 0; m < sto_cate.length; m++) { + if (sto_arr[i].category_id == sto_cate[m].cat_id) { + if(sto_cate[m].is_show!=1){ + is_del_pk=1; sto_arr.splice(i,1); + i--; + }else { + find2 = sto_cate[m].cat_id; + find2name = sto_cate[m].cat_name; + sort = sto_cate[m].sort; + is_del_pk=0; + } + break; + } + } + if(is_del_pk) continue; + + if (newarr.length > 0) { + var find = 0; + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 + if (find2 != 0) { + for (var ii = 0; ii < newarr.length; ii++) { + if (sto_arr[i].category_id == newarr[ii].cat_id) { + newarr[ii].s_arr.push(sto_arr[i]); + find = 1; + break; + } + } + if (find == 0) { + var arr0 = new Array(); + arr0.push(sto_arr[i]); + var item = { + cat_id: find2, + name: find2name, + sort:sort, + s_arr: arr0 + }; + newarr.push(item); + } + } else { + qita.push(sto_arr[i]); + } + } else { + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 + if (find2 != 0) { + var arr0 = new Array(); + arr0.push(sto_arr[i]); + var item = { + cat_id: find2, + name: find2name, + sort:sort, + s_arr: arr0 + }; + newarr.push(item); + } else { + qita.push(sto_arr[i]); + } + } + } + + var def_arr = new Array(); + //-- 开始就看10个门店 -- + for (var k = 0; k < 10; k++) { + if (k == sto_arr.length) break; + def_arr.push(sto_arr[k]); + } + + th.setData({ + def_pickpu_list: def_arr, + pickpu_list: ee.data.data.pageData + }); + + //门店分类要排序下 + function compare(property){ + return function(a,b){ + var value1 = a[property]; + var value2 = b[property]; + return value1 - value2; + } + } + if(newarr.length>0) + newarr.sort(compare("sort")); + + + //----安排其他的分类----- + if (qita.length > 0) { + var item = { + cat_id: -1, + name: "其他", + s_arr: qita + }; + newarr.push(item); + } + + var sd={ + all_sto: newarr, + is_show_sto_cat:1 + } + if(!sto_arr || sto_arr.length<=10){ + sd.is_show_sto_cat=-1; + sd.only_pk=sto_arr; + } + th.setData(sd); + + } else { + th.setData({ + is_show_sto_cat: -1, + only_pk: e.data.data.pageData + }); + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ + if (!th.data.def_pick_store) { + th.setData({def_pick_store:e.data.data.pageData[0]}) + } + } + } else { + th.setData({ + is_show_sto_cat: -1, + only_pk: e.data.data.pageData + }); + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ + if (!th.data.def_pick_store) { + th.setData({def_pick_store:e.data.data.pageData[0]}) + } + + } + } + }); + } else { + th.setData({ + is_show_sto_cat: 0, + only_pk: e.data.data.pageData + }); + //-----如果没有默认门店,要取第一个门店作为默认店------ + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { + th.setData({ + def_pick_store:e.data.data.pageData[0], + sto_sele_name: e.data.data.pageData[0].pickup_name, + sto_sele_id: e.data.data.pageData[0].pickup_id, + sto_sele_distr: e.data.data.pageData[0].distr_type + }) + } + } + }, + + + + //---选择分类门店--- + choice_sort_store: function(e) { + var index = e.currentTarget.dataset.index; + var region_name = e.currentTarget.dataset.region; + var item = this.data.all_sto[index]; + this.setData({ + region_name: region_name, + sort_store: 0, + choice_sort_store: 1, + sec_sto: item, + sec_pick_index: 0, + }); + }, + + choose_for_store_fir: function(e) { + var index_c = e.currentTarget.dataset.ind; + var th=this; + th.setData({ + fir_pick_index: index_c + }) + }, + + //---点击二级之后的选择--- + choose_for_store: function(e) { + var index_c = e.currentTarget.dataset.ind; + var th=this; + th.setData({ + sec_pick_index: index_c, + fir_pick_index: index_c + }) + + }, + + //确定def_pick为选择的门店 + sure_pick: function(e) { + var th = this; + var item = null; + + if (th.data.choice_sort_store == 0) { + var index = th.data.fir_pick_index; + if (th.data.is_show_sto_cat == 1) { + item = th.data.def_pickpu_list[index]; + } else { + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 + } + + } else { + var index = th.data.sec_pick_index; + item = th.data.sec_sto.s_arr[index]; + } + if(!item) return false; + + + th.setData({ + def_pick_store: item, + sto_sele_name: item.pickup_name, + sto_sele_id: item.pickup_id, + sto_sele_distr: item.distr_type, + store: 0, + choice_sort_store: 0, + fir_pick_index: 0 + }); + + + th.setData({ + yijian: 1, //打开拼团购买界面 + store: 0, //关闭门店 + choice_sort_store: 0, //关闭门店2级 + sort_store: 0, //关闭门店2级 + }); + + + }, + + + + //把选择的门店设置成默认的门店def_pick + set_def_pick: function(e) { + var th = this; + var item = null; + if (th.data.choice_sort_store == 0) { + var index = th.data.fir_pick_index; + if (th.data.is_show_sto_cat == 1) { + item = th.data.def_pickpu_list[index]; + } else { + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 + } + } else { + var index = th.data.sec_pick_index; + item = th.data.sec_sto.s_arr[index]; + } + + if(!item) return false; + + + var store_id = o.stoid; + var user_id = getApp().globalData.user_id; + var def_pickup_id = item.pickup_id; + + getApp().request.put('/api/weshop/users/update', { + data: { + user_id, + def_pickup_id + }, + success: function(res) { + if (res.data.code == 0) { + if (th.data.choice_sort_store == 0) th.setData({ + fir_pick_index: 0 + }); + getApp().globalData.pk_store = item; + } else { + getApp().my_warnning("设置默认门店地址失败",0,th) + } + + } + }); + + th.setData({ + def_pick_store: item, + sto_sele_name: item.pickup_name, + sto_sele_id: item.pickup_id, + sto_sele_distr: item.distr_type, + store: 0, + choice_sort_store: 0 + }); + + //4就是拼团 + th.setData({ + yijian: 1, //打开拼团购买界面 + store: 0, //关闭门店 + choice_sort_store: 0, //关闭门店2级 + sort_store: 0, //关闭门店2级 + }); + + }, + + + //-- 关闭选择门店 -- + close_popup: function(e) { + var th=this; + this.setData({ + store: 0, + choice_sort_store: 0, + sort_store: 0, + fir_pick_index:0, + sec_pick_index:0, + yijian: 1, //打开拼团购买界面 + }) + + }, + + //-- 弹出框的同意的优化,重新获取定位 --- + agree_pri:function (){ + var th=this; + var bconfig = th.data.bconfig; + if (bconfig && bconfig.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function (res) { + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + th.setData({ + is_gps: 1 + }); + //th.onShow(); + th.get_sto(); + }, + fail: function (res) { + //th.onShow(); + th.data.is_get_local_ok = 1; + th.get_sto(); + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 25000, !1); + } + } else { + th.setData({ + is_gps: "3" + }); + } + + } + }) + } + }, + + + + +}) \ No newline at end of file diff --git a/packageG/pages/team/team_show/team_show.json b/packageG/pages/team/team_show/team_show.json new file mode 100644 index 0000000..199474a --- /dev/null +++ b/packageG/pages/team/team_show/team_show.json @@ -0,0 +1,13 @@ +{ + "windom": { + "navigationBarTitleText": "拼团订单", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" + }, + "usingComponents": { + "warn": "/components/long_warn/long_warn", + "privacy_pop": "/components/privacy_pop/privacy_pop" + } +} \ No newline at end of file diff --git a/packageG/pages/team/team_show/team_show.wxml b/packageG/pages/team/team_show/team_show.wxml new file mode 100644 index 0000000..7f4f542 --- /dev/null +++ b/packageG/pages/team/team_show/team_show.wxml @@ -0,0 +1,550 @@ + + + + + + + + + + + + + + + + + {{goods.goods_name}} + + + + + + {{teamlist.price}} + + ¥{{goods.shop_price}} + + + + + 已拼{{teamlist.buy_num}}件 + + + + + + {{teamlist.ct_num}}人拼 + + + + + + + + + + + + + + + 拼团成功,为您节省25元 + + + + + + + 拼团失败 + + + + + + + + + + 团长 + + + + + + + + + + + + + + + + + + + + + 剩余 + {{obj.day}} : + {{obj.hou}} : + {{obj.min}} : + {{obj.sec}} 结束 + + + + + + + + + + + + + + + 去参团 + 返回首页 + + + 一键参团 + 返回首页 + + + 一键参团 + 返回首页 + + + + + 会员'{{tg_arr.user_name}}'待付款,若{{r_obj.min}}分{{r_obj.sec}}秒后该会员未支付您可以继续参团哦! + + + + 去参团 + 返回首页 + + + + + + + + + + 展开拼团列表 + + + + + + + 收起拼团列表 + + + + + + + {{item.nickname}} + + {{item.add_time_date}} 开团 + {{item.add_time_date}} 参团 + + + + + + + + + + 大家都在团 + + + + + + + + + {{item.goods_name}} + + + ¥{{item.price}} + {{item.ct_num}}人 + 参团 + + + + + + + + + + + + + + + + + + + + + + + {{goods.goods_name}} + + + ¥{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}} + + + + 已售:{{teamlist.buy_num}} + 可售:{{teamlist.goods_num-teamlist.buy_num}} + + + + + + + + + + {{def_pick_store.pickup_name}} + + + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} + + + + + + + 选择门店 + + + + + + + (配送不匹配) + (该店不可售) + 地址:{{def_pick_store.fulladdress}} + + + + + + + + + + + + + + + + + + + + + 配送不匹配 + 该店不可售 + 确定 + + + + + + + + + + + + + + + + {{choice_sort_store==0?'附近的门店':region_name}} + + + + + + {{choice_sort_store==0?'更多门店':'返回'}} + + + + + + + + + + + + + + + Г + + + + + + + + {{item.pickup_name}} + (配送不匹配) + (该店不可售) + + + + + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}} + + + 地址:{{item.fulladdress}} + + + + + + + + + + Г + + + + + + + + + {{item.pickup_name}} + (配送不匹配) + (该店不可售) + + + + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} + + + + 地址:{{item.fulladdress}} + + + + + + + + + + + Г + + + + + + + + + {{item.pickup_name}} + (配送不匹配) + (该店不可售) + + + + + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} + + + 地址:{{item.fulladdress}} + + + + + + + + + + + 确定 + 设为默认 + + + + + + + + + 门店分类选择 + + + 返回 + + + + + + {{item.name}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{toastText}} + + + + + + + + + + + 拼团玩法介绍 + + + 1.开团: + 选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功; + + 2.参团: + 进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格; + + 3.成团: + 在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货; + + 4.组团失败: + 在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户; + + 5. + 组团有效期间内,拼购商品订单不允许取消。 + + + + + + diff --git a/packageG/pages/team/team_show/team_show.wxss b/packageG/pages/team/team_show/team_show.wxss new file mode 100644 index 0000000..cbff3ff --- /dev/null +++ b/packageG/pages/team/team_show/team_show.wxss @@ -0,0 +1,2201 @@ +page { + background-color: #eee; +} + +.top { + background-color: rgb(216, 230, 220); + color: rgb(98, 155, 13); + text-align: center; + height: 110rpx; + width: 100%; +} + +.center { + height: 240rpx; + width: 100%; + background: #fff; +} + +.cenleft { + width: 240rpx; + height: 100%; + float: left; + display: flex; + justify-content: center; + align-items: center; +} + +.cenleft image { + background-color: white; + width: 200rpx; + height: 200rpx; +} + +.cenrt {} + +.cenright { + height: 100%; + width: auto; + float: left; +} + +.cenrtoptitle { + float: left; + width: 240rpx; + height: 40rpx; + margin-left: 12rpx; + font-size: 28rpx; + margin-top: 12rpx; +} + +.cenrcen { + height: 70rpx; + margin-top: 35rpx; + width: 479rpx; +} + +.jg { + font-size: 40rpx; + margin-right: 30rpx; +} + +.jgx { + font-size: 24rpx; + color: #777; + text-decoration: line-through; + margin-top: 12rpx; +} + +.cenrfoot { + align-content: center; + text-align: center; + border: 2rpx solid red; + border-radius: 10rpx; + color: red; + float: left; + font-size: 24rpx; + padding: 4rpx 16rpx; + margin-top: 12rpx; +} + +.body { + background-color: white; + height: 472rpx; + width: 100%; + margin-top: 4rpx; +} + +.d { + font-size: 24rpx; +} + +.bodytop { + background-color: white; + text-align: center; + font-size: 28rpx; + padding-top: 16rpx; + height: 90rpx; + +} + +.bodytop span { + color: red; +} + +.bodyimg { + height: 155rpx; + /* display: flex; + justify-content: center; + align-items: center; */ + + +} + +.bodyimg image { + border-radius: 50rpx; + height: 96rpx; + width: 96rpx; + margin-top: 30rpx; + position: absolute; + +} + +.d { + width: 101rpx; + height: 101rpx; + display: inline-block; + +} + +.bodyimg span { + background-color: #e22b44; + color: white; + font-size: 24rpx; + border-radius: 6rpx; + padding: 3rpx 10rpx; + position: relative; + top: 8px; + left: 40rpx; +} + +.bodyspan { + color: red; + text-align: center; + font-size: 24rpx; +} + +.bodytime { + height: 55rpx; + width: 100%; + display: flex; + flex-wrap: nowrap; + padding-left: 40rpx; + align-items: center; + +} + +.bodytimeleft { + text-decoration: line-through; + flex-grow: 1.7; +} + +.bodytimecen { + text-align: center; + flex-grow: 1; + + font-size: 30rpx; + color: #000; + width: 415rpx; + +} + +.bodytimecen span { + background-color: #333333; + color: white; + border-radius: 7rpx; + padding-left: 20rpx; + font-size: 30rpx; + margin: 0 auto; + padding-right: 10rpx; + margin-right: 5px; + + +} + +.bodytimecen span:last-child { + margin-right: 10rpx; + +} + +.bodytimeright { + flex-grow: 1.7; + margin-right: 72rpx; + +} + +.bodybutton { + min-height: 170rpx; + width: 90%; + margin: 0 auto; + text-align: center; + line-height: 70rpx; + border-radius: 15rpx; + height: auto; + padding-top: 38rpx +} + +.bodybutton button { + height: 100%; + width: 100%; + background-color: red; + color: white; + font-size: 32rpx; +} + +.bodybutton.co-w { + color: #333; + background-color: #adadad; + font-size: 32rpx; + +} + + + +.bodyfoot { + width: 100%; + text-align: center; + font-size: 28rpx; + color: #777; + background-color: white; +} + +.pintuan { + width: 100%; + height: 84rpx; + background-color: white; + color: black; + text-align: center; + font-size: 36rpx; + margin-top: 0rpx; +} + + +.pintuanzhou { + float: left; + line-height: 84rpx; + width: 226rpx; + background: url('https://mshopimg.yolipai.net/miniapp/images/user/wh.png') no-repeat right center; + background-size: 42rpx; + margin-left: -18rpx; + font-size: 32rpx; +} + +.pintuanyou { + float: right; + color: rgb(168, 167, 167); + line-height: 84rpx; + font-size: 32rpx; + margin-right: 24rpx; +} + +.onegoods { + background-color: white; + width: 372rpx; + height: 560rpx; + border-left: 2rpx solid #eee; + float: left; +} + +.goodsl { + background-color: white; +} + +.onegoodsimg { + width: 100%; + height: 360rpx; + margin-bottom: 20rpx; +} + +.onegoodsimg image { + height: 100%; + width: 100%; +} + +.onegoodsdesc { + color: rgb(168, 167, 167); + padding-left: 20rpx; + height: 100rpx; + font-size: 32rpx; + width: 92%; + line-height: 100rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 20rpx; +} + +.onegoodsdesc text {} + +.price { + color: red; + width: 100%; +} + +.jgleft { + float: left; + width: 100rpx; + margin-left: 20rpx; + font-size: 40rpx; + margin-top: -8rpx; +} + +.jgright { + font-size: 28rpx; + float: right; + width: 120rpx; +} + +.jgright span { + color: rgb(168, 167, 167); +} + +.goodslisttop { + background-color: white; + width: 100%; +} + +.goodslist { + background-color: white; +} + +.goodslisttop { + background-color: white; + width: 100%; + height: 80rpx; + margin-top: 20rpx; + text-align: center; +} + +.goodslistspan { + margin: 0 auto; + padding-top: 20rpx; + display: inline-block; + padding: 0 10px; + background: #fff; + margin-top: 12rpx; + font-size: 28rpx; + color: rgb(168, 167, 167); +} + +.xian { + height: 50%; + width: 100%; + border-bottom: 4rpx solid #eee; + float: left; +} + +.bodyselect { + height: 50px; + background-color: white; + width: 100%; + line-height: 50px; + font-size: 28rpx; +} + +.changxin { + float: left; + width: 100%; +} + +.zhangxi { + width: 100%; + min-height: 100rpx; + background-color: white; + color: black; +} + +.img { + width: 30%; + height: 100rpx; + margin-bottom: 0rpx; + color: black; + margin-left: 36rpx; + font-size: 26rpx; + display: flex; +} + +.img span { + height: 100rpx; + display: block; + line-height: 100rpx; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + padding: 0rpx; + width: 120rpx; +} + +.zhangxi image { + border-radius: 50rpx; + height: 80rpx; + width: 80rpx; + float: left; + margin-top: 12rpx; + background-color: red; + margin-right: 10rpx; +} + +.zhangxi .zssj { + height: 100rpx; + width: 70%; + margin-right: 40rpx; + line-height: 100rpx; + font-size: 26rpx; + text-align: right; +} + +.zhangxi .zssj text { + width: 100%; +} + +.ia { + display: flex; +} + +.zspan { + text-align: center; + border-bottom: 2rpx #eee solid; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #777; + line-height: 100rpx; + height: auto; + +} + +.mtop { + text-align: center; + color: white; + background-color: #4c4c4c; + width: 100%; + height: 100%; + position: fixed; + z-index: 5; + top: 0; + left: 0; +} + +.mt1 { + margin-top: 100px; + margin-bottom: 20rpx; +} + +.mts { + color: #e1e10b; +} + +.mcou { + font-size: 48rpx; +} + +.mfoot { + width: 100%; + margin-top: 700rpx; +} + +.mbtn { + margin-top: 60rpx; + width: 400rpx; + background: #666; + color: #fff; + border-radius: 20rpx; + font-size: 32rpx; +} + +.etop { + padding-top: 200rpx; + width: 100%; + height: 100%; + position: fixed; + left: 0rpx; + top: 0rpx; + z-index: 12rpx; + background-color: white; +} + +.emyimage { + display: flex; + justify-content: center; + align-items: center; +} + +.emyimage image { + background-color: red; + width: 160rpx; + height: 160rpx; + margin: 0 auto; +} + +.espan { + font-size: 32rpx; + margin-top: 10rpx; +} + +.erweima { + margin-top: 10rpx; + width: 100%; +} + +.erzhou { + width: 200rpx; + float: left; + margin-right: 20rpx; +} + +.erzhou image { + background-color: blanchedalmond; + width: 200rpx; + height: 200rpx; +} + +.eright { + width: 500rpx; + float: left; + font-size: 32rpx; +} + +.body { + background-color: white; + height: auto; + width: 100%; + margin-top: 4rpx; +} + +.cenrtoptitle { + float: left; + width: 450rpx; + font-size: 28rpx; + margin-top: 20rpx; + +} + +.cenrtop { + margin-top: 20rpx; + background-color: red; + color: white; + border-radius: 10rpx; + padding: 0 16rpx; + font-size: 28rpx; + float: left; + height: 40rpx; +} + +.yijian { + position: fixed; + top: 0rpx; + left: 0rpx; + width: 100%; + height: 100%; + z-index: 14rpx; + background-color: rgba(0, 0, 0, 0.3); +} + +.buy-option { + background: #fff; + box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); + padding: 20rpx; + min-height: 400rpx; + padding-bottom: 120rpx; + width: 100%; + margin-top: 180rpx; +} + +.buy-top { + width: 100%; +} + +.buy-image { + margin-right: 20rpx; + width: 320rpx; + height: 200rpx; + float: left; +} + +.buy-image image { + width: 200rpx; + height: 200rpx; + background-color: burlywood; + float: left; +} + +.buy-image text { + margin-left: 10rpx; + color: red; +} + +.buy-cou { + float: right; + width: 100rpx; + height: 200rpx; + background-color: white; + font-size: 60rpx; + color: black; +} + +.t1 { + float: left; + font-size: 28rpx; + padding-left: 4rpx; + color: red; + padding-top: 10rpx; +} + +.buy-button { + width: 100%; + float: left; + margin-top: 22rpx; +} + +.buy-button text { + float: left; +} + +.stepper { + height: 52rpx; + float: left; + border: 2rpx solid #ccc; + border-radius: 6rpx; + margin-left: 28rpx; +} + +/*加号和减号*/ + +.stepper text { + float: left; + width: 76rpx; + line-height: 52rpx; + text-align: center; +} + +/*数值*/ + +.stepper input { + width: 80rpx; + height: 52rpx; + float: left; + margin: 0 auto; + text-align: center; + font-size: 24rpx; + border-left: 2rpx solid #ccc; + border-right: 2rpx solid #ccc; +} + +/*普通样式*/ + +.stepper .normal { + color: black; +} + +/*禁用样式*/ + +.stepper .disable { + color: #ccc; +} + +.quhuo { + width: 100%; + color: rgb(51, 51, 51); + float: left; + margin-top: 20rpx; +} + +.x-z { + width: 100%; + float: left; + color: rgb(51, 51, 51); + font-size: 36rpx; +} + +.btn { + width: 94%; + background-color: red; + color: white; + text-align: center; + height: 88rpx; + line-height: 88rpx; + float: left; + margin: 0 auto; +} + +.mck { + min-height: 100rpx; + width: 100%; + border-bottom: 24rpx #eee solid; +} + +/* pages/yi/yi.wxss */ + +.buy-option { + background: #fff; + padding: 20rpx; + margin-top: 650rpx; + width: 100%; +} + +.buy-top { + width: 100%; +} + +.buy-image { + margin-right: 20rpx; + width: 630rpx; + height: 200rpx; + float: left; +} + +.buy-image image { + width: 200rpx; + height: 200rpx; + background-color: burlywood; + float: left; + margin-right: 16rpx; +} + + +.buy-image text { + margin-left: 10rpx; + color: red; +} + +.buy-cou { + float: right; + width: 60rpx; + height: 60rpx; + background-color: white; + font-size: 60rpx; + color: black; + margin-right: 40rpx; + text-align: center; + line-height: 60rpx; + padding-bottom: 4rpx; +} + +.t1 { + font-size: 28rpx; + padding-left: 4rpx; + color: red; + padding-top: 10rpx; +} + +.buy-button { + width: 100%; + margin-top: 30rpx; +} + +.buy-button text { + /*float: left;*/ + display: inline-block; +} + +.stepper { + height: 52rpx; + display: inline-block; + border: 2rpx solid #ccc; + border-radius: 6rpx; + margin-left: 28rpx; +} + +/*加号和减号*/ + +.stepper text { + float: left; + width: 65rpx; + line-height: 52rpx; + text-align: center; +} + +/*数值*/ + +.stepper input { + width: 84rpx; + height: 52rpx; + float: left; + margin: 0 auto; + text-align: center; + font-size: 24rpx; + border-left: 2rpx solid #ccc; + border-right: 2rpx solid #ccc; +} + +/*普通样式*/ + +.stepper .normal { + color: black; +} + +/*禁用样式*/ + +.stepper .disable { + color: #ccc; +} + +.quhuo { + width: 100%; + color: rgb(51, 51, 51); + margin-top: 45rpx; + font-size: 32rpx +} + +.quhuo image { + width: 40rpx; + height: 40rpx; + display: inline-block; + position: relative; + left: 500rpx; +} + +.ttxz { + display: inline-block; +} + +.xuanze { + width: 100%; + height: 80rpx; + display: inline-block; + border-bottom: 1rpx #e7e7e7 solid; + font-size: 32rpx; + line-height: 80rpx; +} + +.xuanze1 { + width: 100%; + color: rgb(51, 51, 51); + height: 80rpx; + display: inline-block; + border-bottom: 1rpx #e7e7e7 solid; + line-height: 80rpx; + overflow: hidden; +} + +.x-z { + width: 100%; + color: rgb(51, 51, 51); + font-size: 36rpx; + height: auto; +} + +.btn { + width: 100%; + background-color: red; + color: white; + text-align: center; + height: 88rpx; + line-height: 88rpx; +} + +.clear { + clear: both; +} + +.fir_view { + max-height: 300rpx; + overflow-y: scroll; +} + +.pop_up { + min-height: 200rpx; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + background-color: rgba(0, 0, 0, 0.3); + font-size: 34rpx; + color: rgb(51, 51, 51); + +} + +.end_name { + display: inline-block; +} + +/*mask*/ + +.toast_mask { + opacity: 0; + width: 100%; + height: 100%; + overflow: hidden; + position: fixed; + top: 0rpx; + left: 0rpx; + z-index: 888; +} + +/*toast*/ + +.toast_content_box { + display: flex; + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + position: fixed; + z-index: 999; + top: 0rpx; +} + +.toast_content { + width: 50%; + padding: 20rpx; + background: rgba(0, 0, 0, 0.5); + border-radius: 20rpx; +} + +.toast_content_text { + height: 100%; + width: 100%; + color: #fff; + font-size: 28rpx; + text-align: center; +} + +.jt { + width: 30rpx; + height: 30rpx; + display: inline-block; +} + +.jiajian { + color: #999; +} + +.t_wz { + line-height: 110rpx; + height: 110rpx; + font-size: 36rpx; +} + +.down-arrow { + display: inline-block; + position: relative; + width: 40rpx; + height: 30rpx; + margin-right: 20rpx; +} + +.down-arrow::after { + display: inline-block; + content: " "; + height: 18rpx; + width: 18rpx; + border-width: 0 2rpx 2rpx 0; + border-color: #999; + border-style: solid; + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + transform-origin: center; + transition: transform 0.3s; + position: absolute; + top: 50%; + right: 10rpx; + margin-top: -10rpx; +} + +.down-arrow1 { + display: inline-block; + position: relative; + width: 40rpx; + height: 30rpx; + margin-right: 20rpx; + margin-top: 12rpx; +} + +.down-arrow1::after { + display: inline-block; + content: " "; + height: 18rpx; + width: 18rpx; + border-width: 0 2rpx 2rpx 0; + border-color: #999; + border-style: solid; + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + transform-origin: center; + transition: transform 0.3s; + position: absolute; + top: 50%; + right: 10rpx; + margin-top: -10rpx; +} + +.down-arrow1::after { + transform-origin: center; + transform: rotate(-135deg); + transition: transform 0.3s; +} + +.goodslisttop::after { + content: ""; + width: 100%; + height: 1px; + border-bottom: 1px #d4d4d4 solid; + display: block; + margin-top: -12px; +} + +.ia { + display: flex; + width: 100%; +} + +.bview { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); +} + +.juzhong { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.juzhong .xq { + padding: 0 20rpx; + background: #fff; + font-size: 30rpx; + padding-bottom: 20rpx; +} + +.juzhong .xq .title { + text-align: center; + margin: 20rpx 0; + position: relative; + height: 50rpx; +} + +.juzhong .xq .hs1 { + font-size: 28rpx; + color: #ab8f9e; +} + +.juzhong .xq .title .close { + position: absolute; + top: 0; + right: 0; + width: 45rpx; + height: 45rpx; +} + +/* .pt_qd { + margin-top: 40rpx; + height: auto; +} */ + +.spec-cart-btn.w100 { + width: 100%; + margin-left: 0; + height: 80rpx; + line-height: 80rpx; +} + + +.bview { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); +} + +.juzhong { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.juzhong .xq { + padding: 0 20rpx; + background: #fff; + font-size: 30rpx; + padding-bottom: 20rpx; +} + +.juzhong .xq .title { + text-align: center; + margin: 20rpx 0; + position: relative; + height: 50rpx; +} + +.juzhong .xq .hs1 { + font-size: 28rpx; + color: #ab8f9e; +} + +.juzhong .xq .title .close { + position: absolute; + top: 0; + right: 0; + width: 45rpx; + height: 45rpx; +} + +.pt_qd { + /* margin-top: 40rpx; + height: auto; */ + padding: 20rpx; +} + +.spec-cart-btn.w100 { + width: 100%; + margin-left: 0; + height: 80rpx; + line-height: 80rpx; +} + +.show_zf_dd { + display: flex; + padding: 15rpx 40rpx; + justify-content: space-between; + font-size: 30rpx; + color: #666; +} + +.flex_tou { + display: flex; + justify-content: center; + width: 100%; + height: 175rpx; + align-items: center; +} + +.xc-goods-details { + width: 479rpx; + margin-top: 20rpx; + height: 80rpx; + align-items: center; + +} + +.xc-valframe { + border-radius: 7rpx; + border: 1rpx solid; + margin-top: 3rpx; +} + +.xc-valframe .xc-frame-img { + width: 30rpx; + height: 100%; + background: #e22b44; +} + +.xc-valframe .xc-frame-img .picture { + width: 25rpx; + height: 25rpx; + margin-top: 4rpx; + +} + +.bodybutton .xc-good-friend { + background: #fab55a; + border-radius: 15rpx; +} + +.bodybutton .xc-home-page { + margin-top: 20rpx; + background-color: #e22b44; + border-radius: 15rpx; +} + +.xc-ellipsis-img { + width: 56rpx; + height: 56rpx; + padding-top: 15rpx; +} + +.xc-ptcomplete { + width: 74%; + height: 105rpx; + line-height: 105rpx; + float: right; + +} + +.xc-ptcomplete .xc-img-frame .img { + width: 105rpx; + height: 105rpx; + float: right; +} + +.xc-ptcomplete .xc-img-frame { + width: 205rpx; + height: 105rpx; + margin-top: 20rpx; +} + +.xc-ptcomplete .xc-end { + width: 283rpx; + text-align: right; +} + +.iw { + padding-right: 33rpx; +} + +.xc-ptcomplete .xc-img-frames { + width: 345rpx; + height: 105rpx; + margin-top: 20rpx; + +} + +.xc-ptcomplete .xc-img-frames .img { + width: 105rpx; + height: 105rpx; + float: right; +} + +.bodybutton .xc-good-friend.co-w { + background-color: #aeaeae +} + + + + + + + + + + + + + + + +.spec-model { + position: fixed; + bottom: 0; + z-index: 20; + background: white; + width: 100%; + /* padding: 0 30rpx; */ + font-size: 32rpx; + box-sizing: border-box; + border-radius: 20rpx; + /* height: 72%; */ +} + +.spec-model .pding { + padding: 0 30rpx; +} + +.spec-goods { + padding: 30rpx 0 20rpx; + float: left; + width: 100%; + border-bottom: 2rpx solid #eee; +} + +.spec-img { + float: left; + height: 186rpx; + width: 186rpx; + border: 4rpx solid #eee +} + +.spec-goods-info { + float: left; + padding: 0 25rpx; + width: 400rpx; +} + +.spec-goods-name { + font-size: 30rpx; + line-height: 35rpx; + height: 70rpx; + margin: 15rpx 20rpx 25rpx 0; + overflow: hidden; + text-overflow: ellipsis; + color: #333; +} + +.spec-goods-price { + color: #d60021; + font-size: 33rpx; + font-weight: bold; +} + +.spec-goods-stock { + margin-top: 3rpx; + font-size: 24rpx; + color: #999999; + margin-right: 15rpx; +} + +.spec-name { + clear: both; + padding: 20rpx 0; + font-size: 30rpx; + color: #333; +} + +.quhuo { + font-size: 30rpx; + color: #000 +} + +.b_num { + display: flex; + font-size: 30rpx; + color: #333; + justify-content: space-between; +} + +.count { + /* position: fixed; */ + display: flex; + height: 50rpx; + /* border: 1rpx solid #000; */ + font-size: 28rpx; + /* right: 30rpx; */ + /* justify-content: space-between; */ +} + + +.count>view, +.count>input { + width: 60rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; +} + +.spec_bt { + background: fff; + color: #333; + margin-left: 10rpx; + padding: 4rpx 15rpx 4rpx; + display: inline-block; + border-radius: 30rpx; + font-size: 24rpx; + border: 1rpx solid #ccc; + margin: 10rpx; + height: 40rpx; + line-height: 40rpx; +} + +.spec_bt.act { + background: #d60021; + color: #fff; + border: 1rpx solid #d60021; +} + +.sub, .add, .count>input { + /* border-right: 1px solid #000; */ + background-color: #f8f8f8; + border-radius: 8rpx; +} +.sub.active { + /* background-color: #ddd; */ + color: #ccc; +} +.count>input { + margin: 0 10rpx; + line-height: normal; +} + +/* .sub { + border-right: 1px solid #000; +} + +.add { + border-left: 1px solid #000; +} */ + +.spec-btn { + color: black; + background-color: white; + padding: 10rpx 10rpx; + font-size: 26rpx; + line-height: 28rpx; + float: left; + border: 1rpx solid #dedede; + margin: 4rpx 10rpx 4rpx 0; + border-radius: 4rpx; +} + +.spec-btn-click { + color: white; + background-color: #f23030; + border: 1rpx solid #f23030; +} + +.spec-cart-btns { + width: 92%; + line-height: 70rpx; + margin: 0rpx auto; + margin-top: 160rpx; + border-radius: 20rpx; + position: fixed; + bottom: 50rpx; + left: 4%; + +} + +.spec-cart-btn { + + width: 100%; + font-size: 30rpx; + text-align: center; + color: white; + border-radius: 40rpx; +} + +.spec-add-cart { + background-color: #ffb03f; +} + +.spec-buy { + background-color: #f23030; + /* margin-left: 34rpx; */ +} + +.spec-cart-disable { + background: #bbbbbb; +} + +.spec-cart-btn-lg { + width: 614rpx; +} + +.prom-model { + position: fixed; + bottom: 0; + z-index: 20; + background: white; + width: 100%; + padding: 0 30rpx 30rpx; + font-size: 32rpx; + box-sizing: border-box; + overflow-x: hidden; +} + +.prom-model .prom-title { + text-align: center; + margin: 30rpx 0; +} + +.prom-model .logistics-item { + border: 0; +} + +.prom-model .item-mes { + width: 500rpx; +} + +.integral-btn { + width: 100%; + padding: 0rpx; + margin: 0rpx; +} + +.clear { + clear: both; +} + +.sto_v .title, +.sto_v .stitle { + border-top: 1rpx solid #dedede; + border-bottom: 1rpx solid #dedede; + height: 78rpx; + line-height: 78rpx; +} + +.sto_v .title .tubiao, +.sto_v .stitle .tubiao { + width: 32rpx; + height: 32rpx; + margin-top: 23rpx; +} + +.itemlists .item { + border-bottom: 1rpx solid #dedede; + height: 72rpx; + line-height: 72rpx; + font-size: 28rpx; + margin: 0 10rpx; +} + +.cshu { + margin-bottom: 30rpx; + margin-top: 20rpx; +} + +.cshu view { + color: #999; + font-size: 30rpx; + margin-left: 26rpx; +} + + +/*---活动特殊显示---*/ +.prom_show { + height: 120rpx; + display: flex; +} + +.prom_show .secondkill-img { + width: 100%; + height: 100%; +} + +.prom_show .spike-img { + width: 283rpx; + height: 57rpx; + top: 35rpx; + left: 31rpx; +} + +.prom_show .stop { + color: #d81731; + top: 17rpx; + right: 65rpx; + font-weight: 600; +} + +.prom_show .start { + color: #009ae2; + top: 17rpx; + right: 65rpx; + font-weight: 600; +} + +.prom_show .timeac { + font-size: 32rpx; + height: 120rpx; + color: #333; +} + +.prom_show .timeac.left { + width: 66%; + color: #fff; + background: #f23030; +} + +.prom_show .timeac.right { + width: 34%; + background-color: #d7d7d7; + text-align: center +} + +.prom_show .secview .day { + padding-right: 10rpx; +} + +.prom_show .secview .time-val { + width: 36rpx; + height: 36rpx; + border-radius: 7rpx; + line-height: 36rpx; +} + +.prom_show .secview .time { + margin-right: 10rpx; + margin-left: 10rpx; +} + + +.prom_show .timeac.left view { + margin-left: 20rpx +} + +.prom_show .timeac.left view.firview { + margin-top: 10rpx +} + +.prom_show .timeac.left view .tr_line { + text-decoration: line-through; + font-size: 28rpx; +} + +.prom_show .timeac.left view .bprice { + font-size: 50rpx; +} + +.prom_show .timeac.right view.firview { + margin-top: 12rpx; + margin-bottom: 10rpx +} + +.prom_show .timeac.right view.secview { + display: flex; + text-align: center; + justify-content: center; + flex-direction: row; +} + +.prom_show .timeac.right view .tui-conutdown-box { + /* background: #6b6b6b; */ + width: auto; + /* min-width: 45rpx; */ + height: 45rpx; + color: #c4182e; + font-size: 27rpx; + text-align: center; + line-height: 46rpx; +} + +.huise { + background: gray +} + +.lanse { + background: #0199e2 +} + + +/*------拼单------*/ +.pt_view { + text-align: center; + width: 100%; + height: 100rpx; + line-height: 100rpx; + font-size: 26rpx +} + +.pt_view .secondkill-img { + width: 100%; + height: 100%; +} + +.pt_fir { + background: #fff; + margin-bottom: 10rpx; +} + +.pt_fir .pt_fir_title { + display: flex; + align-items: center; + margin-left: 10rpx; + margin-top: 20rpx; + font-size: 28rpx; + position: relative; +} + +.pt_fir .pt_fir_title .kt_type { + color: #fff; + background: #e9030d; + width: 100rpx; + line-height: 40rpx; + border-radius: 6rpx; + margin: 0 10rpx; + height: 40rpx; + font-size: 24rpx; + text-align: center; +} + +.pt_fir .pt_fir_title .price { + color: #e9030d; + font-size: 26rpx; +} + +.pt_fir .pt_fir_title .bigw { + font-size: 36rpx; +} + +.pt_fir .pt_fir_title .tprice { + text-decoration: line-through; + color: #949494 +} + +.pt_fir .pt_fir_title .tprice.ml50 { + margin-left: 50rpx +} + +.pt_fir .pt_fir_title .js { + padding: 0 15rpx; + height: 40rpx; + background: #e9030d; + text-align: center; + border-radius: 8rpx; + color: #fff; + margin-left: 10rpx; +} + +.pt_fir .pt_fir_title .tuannum { + color: #e9030d; + position: absolute; + right: 20rpx; + font-size: 26rpx; +} + +.pding { + padding-top: 20rpx; + padding-left: 20rpx; + height: 81%; + padding-right: 20rpx; + font-size: 26rpx; + color: #ea120f +} + +.pdres { + margin-left: 10rpx; + color: #8f8f94 +} + +.ptgz { + position: relative; + font-size: 30rpx; + padding-left: 20rpx; + margin-top: 10rpx; + overflow: hidden +} + +.shuxian { + width: 6rpx; + height: 28rpx; + background: #ea120f; + display: inline-block; + top: 5rpx; + position: relative; + margin-right: 5rpx +} + +.ptgz_an { + position: absolute; + top: 5rpx; + right: 6rpx +} + +.ptgz_an .arrow-two { + width: 18rpx; + height: 18rpx; + border-color: #da0b31; + margin-top: 30rpx; +} + +.pt_fir.se { + height: auto; + margin-bottom: 10rpx +} + +.t_gz { + padding: 10rpx 20rpx; + font-size: 28rpx +} + +.pt_fir.se1 { + height: auto; + margin: 0 +} + +.pt_fir.se2 { + height: auto; + margin: 0; + border-top: 6rpx solid #eeeeee; + border-bottom: 2rpx solid #eeeeee; +} + +.pt_hb { + height: 78rpx; + line-height: 75rpx; + position: relative; + font-size: 32rpx; + overflow: hidden; + width: 695rpx; + margin-left: 28rpx; + border-bottom: 1rpx solid #E5E5E5 +} + +.ptgz_an.xq { + font-size: 32rpx; + color: #d40024 +} + +.wf { + display: flex; + padding: 20rpx 0; +} + +.wf .item { + width: 24.5%; + text-align: center; + font-size: 26rpx; + color: #666 +} + +.wf .item .item_txy { + position: relative; + width: 60rpx; + height: 60rpx; + background: #ea120f; + border-radius: 50%; + left: 50%; + margin-left: -30rpx; + border: 3px #dfdfdf solid; + text-align: center; + line-height: 60rpx; + color: #fff; + margin-bottom: 10rpx; +} + +.wf .item .item_txy.hs { + background: #cbcbcb; +} + +.po { + margin-bottom: 20rpx; +} + +.cart-btn.line-h { + line-height: 26rpx; +} + +.cart-btn .fir-v { + margin-top: 10rpx; +} + +.hyt { + padding: 0 20rpx; + font-size: 30rpx; + display: flex; + align-items: center; + margin-top: 10rpx; +} + +.hyt .r_f { + color: #e9120f; + font-size: 26rpx; + position: relative; + top: 3rpx +} + +.hyt .byj { + color: #e9120f; + font-size: 32rpx; + position: relative; + top: 5rpx +} + +.pt_fir .pt_fir_title.no-mar-b { + margin-bottom: 0; + padding-bottom: 10rpx; + margin-left: 20rpx +} + +.pt_fir .pt_fir_title.boder-1 { + border-bottom: 1rpx #e7e7e7 solid +} + +.jie_price { + padding: 10rpx 30rpx; +} + +.jie_price_title { + font-size: 30rpx; + color: #a26270; + margin-bottom: 10rpx +} + +.price_list { + display: flex; + width: 100%; +} + +.price_item { + width: 25%; + font-size: 28rpx; + color: #4c336c +} + +.pt_fir.se2 .zzk-1 { + margin-top: 23rpx; + font-size: 30rpx; + position: relative; + margin-bottom: 30rpx; + border-left: 4rpx solid red; + margin-left: 14rpx; + height: 30rpx; + line-height: 30rpx; + padding-left: 5rpx; +} + +.ckgd { + position: absolute; + top: 0; + right: 57rpx; + color: #d70025; + font-size: 32rpx; +} + +.ckgd .arrow-one { + width: 18rpx; + height: 18rpx; + border-color: #da0b31; + margin-top: 5rpx; +} + +.bview { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); +} + +.juzhong { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.juzhong .xq { + padding: 0 20rpx; + background: #fff; + font-size: 30rpx; + padding-bottom: 20rpx; +} + +.juzhong .xq .title { + text-align: center; + margin: 20rpx 0; + position: relative; + height: 50rpx; +} + +.juzhong .xq .hs1 { + font-size: 28rpx; + color: #ab8f9e +} + +.juzhong .xq .title .close { + position: absolute; + top: 0; + right: 0; + width: 45rpx; + height: 45rpx; +} + +.pt_qd { + /* margin-top: 40rpx; + height: auto; */ +} + +.spec-cart-btn.w100 { + width: 95%; + margin-left: 0; + height: 75rpx; + line-height: 75rpx; + margin: auto; +} + +.sto_v { + color: #333; +} + +.ellipsis { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + + + + +/* 房子图标 */ +.stores-img { + width: 40rpx; + height: 35rpx; + margin-right: 10rpx; +} + +.right-arrow { + width: 15rpx; + height: 15rpx; + border-top: 2rpx solid #d70026; + border-right: 2rpx solid #d70026; + transform: rotate(45deg); + display: inline-block; + margin-bottom: 3rpx; +} + +.distance{ + padding-left: 15rpx; + padding-right: 15rpx; + background: #eee; + border-radius: 20rpx; + margin-right: 5rpx; + color: #999; + height: 38rpx; + line-height: 38rpx; +} + +.shop_name{ + margin-right: 10rpx; +} + +.xc-distance-top{ + margin-top: 10rpx; +} + + +.popup-frame{ + position: fixed; + /* bottom:99rpx; */ + bottom: 0; + z-index: 20; + background: white; + width: 100%; + border-radius: 20rpx 20rpx 0 0; + height: auto; +} + +.popup-top{ + border-bottom: 1rpx solid #eee; + height: 155rpx; + width: 95%; + margin: auto; + line-height: 155rpx; + +} + + +/* .flex-space-between{ + display: flex; + justify-content:space-between; +} */ + +.modal-closes { + position: absolute; + right: 30rpx; + top: -15rpx; + height: 25rpx; +} + +.choose_more{ + margin-top: 40rpx; + margin-right: 20rpx; + +} +.choose_mores{ + margin-top: 30rpx; + margin-right: 15rpx; + +} + +.bg_rights{ + border-top: 2rpx solid ; + border-right: 2rpx solid ; + transform: rotate(45deg); + display: inline-block; + width: 15rpx;height:15rpx; + border-color: #da0b31; +} + + +.mongolia-layer{ + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; + z-index: 11; + background: rgba(0,0,0,0.4); + width: 100%; + height: 91.9%; +} + + + + +.store-list{ + width: 95%; + min-height:300rpx; + overflow-y: scroll; + margin: auto; + max-height: 610rpx; +} + +.store-list .store_choose{ + width: 100%; + height: 120rpx; + line-height: 125rpx; + border-bottom: 1rpx solid #eee; +} + +.store-list .store_choose .store{ + width: 100%; + margin: auto; + line-height: 37rpx; + padding-left: 20rpx; +} + +.xc-hook{ + width: 35rpx; + height: 35rpx; + transform: rotate(-145deg); + line-height: 37rpx; + text-align: center; +} + +.butttem5{ + margin-bottom: 5rpx; +} + +.address-frame{ + width: 93%; + margin-left: 7rpx; +} + +.store-bottom{ + width: 85%; + margin: auto; + height: 90rpx; + } + + .determine{ + width: 260rpx; + height: 55rpx; + border-radius: 50rpx; + line-height: 55rpx; + } + + .default{ + width: 260rpx; + height: 55rpx; + border:3rpx solid #c8c8c8; + border-radius: 50rpx; + line-height: 55rpx; + } + + .sort_store_list .sort-store-frame .sort-store { + width: 94.5%; + margin: auto; + } + + + .sort_store_list .sort-store-frame{ + width: 100%; + height: 100rpx; + line-height:100rpx; + border-bottom: 1rpx solid #eee; + } + + .black_rights-frame .black_rights{ + border-top: 3rpx solid; + border-right: 3rpx solid; + transform: rotate(45deg); + display: inline-block; + width: 20rpx; + height: 20rpx; + } + + + .sort_store_list{ + max-height: 700rpx; + overflow: hidden; + overflow-y: scroll; + width: 95%; + margin: auto; + } + + .xc-hooks{ + width: 30rpx; + height: 30rpx; + border: 1rpx solid #999; +} + +.no_store{color:#d60021; font-size: 26rpx;} + +.sub.active { + /* background-color: #ddd; */ + color: #ccc; +} + +.c-red22{ color:#d60021; } diff --git a/packageG/pages/team/team_success/team_success.js b/packageG/pages/team/team_success/team_success.js index ae21080..49fdbfc 100644 --- a/packageG/pages/team/team_success/team_success.js +++ b/packageG/pages/team/team_success/team_success.js @@ -448,7 +448,7 @@ Page({ //二微码 var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+ - os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show"; + os.stoid+"?sceneValue="+scene+"&pageValue=packageG/pages/team/team_show/team_show"; console.log(path3,6000); @@ -840,7 +840,7 @@ Page({ var th=this; var scene=this.data.teamgroup.id; var goods_id=this.data.teamlist.goods_id; - var url="/pages/team/team_show/team_show?tg_id="+scene+"&goods_id="+goods_id; + var url="/packageG/pages/team/team_show/team_show?tg_id="+scene+"&goods_id="+goods_id; //--分享图片-- var img=th.data.iurl+th.data.teamlist.share_imgurl; //--把会员分享出去-- diff --git a/pages/team/team_show/team_show.js b/pages/team/team_show/team_show.js index 1281fa6..9121d16 100644 --- a/pages/team/team_show/team_show.js +++ b/pages/team/team_show/team_show.js @@ -1,1705 +1,10 @@ -var t = require("../../../utils/util.js"), - ut = t, - e = require("../../../utils/common.js"), - a = require("../../../utils/wxParse/wxParse.js"), - s = getApp(), - i = s.request, - rq = i, - oo = s.globalData, - o = s.globalData.setting, - os = o; -var regeneratorRuntime = require('../../../utils/runtime.js'); - - Page({ - data: { - - num: 1, //输入框值 加减之间的值 - minusStatus: 'disable', //禁用按钮 - ii_endname: 'disable', //吐司的禁用按钮 - pd_xx: false, //弹框 - buy_start_date: null, //转换完的时间 - ssl: null, - yijian: false, //一键参加按钮显示隐藏 - - //选择门店 - qh: true, //取货 - xz: false, //选择 - one: false, //第一层显示隐藏 - se: false, //已选择的值 - list: false, //第二层显示隐藏 - ssl_child: null, //第二层的值 - sele_dl_name: "", //选择的值 - end_name: "", //最后显示的值 - - ii: 0, //选择门店显示隐藏 - zk: true, //展开列表显示隐藏 - stoid: o.stoid, - hiddenName: false, //收起列表显示隐藏 - teamlist: null, //活动主表 - teamgroup: null, //活动从表 - goods: null, //商品数据 - pindGoods: null, //拼单数据 - imageurl: os.imghost, //有礼派图片地址 - team_id: 0, //支付是否成功 - listno: "", //订单编号 - - //选择的门店id - pick_id:0, - //会员团满团时的判断 - tg_arr:null, - //是否显示 - is_show:0, - //是不是团结束 - is_group_end:0, - //团结束的提示语句 - end_text:"", - //是开团或者参团,0参团,1开团(但是,商家团还是参团) - is_kt_or_ct:0, - //判断redis的数组 - redis_arr:null, - - iurl:os.imghost, - - - openSpecModal: !1, - openSpecModal_pt: !1, //拼单的弹起, - - - //门店相关 - ismend: 0, - is_sec_mend: 0, - sto_sele_name: "", //选中的门店名称 - sto_sele_id: "", //选中的门店id - sto_sele_distr: "", //选择的门店的配送方式 - is_show_sto_cat: 1, //是否显示门店分类 - only_pk: null, - all_sto: null, - sec_sto: null, //选择了的门店分类 - pickpu_list: null, //读出的所有门店list - def_pickpu_list: null, //一开始5个门店list - sec_pick_index: 0, //第二级门店选择ID - fir_pick_index: 0, //第一级门店选择ID - all_pick_list:null,//所有的门店先记录起来 - bconfig:null, - def_pick_store: null, // 默认的门店 - fir_def_store:null, //客户默认的门店的 - lat: null, //维度 - lon: null, //经度 - - is_get_local_ok: 0, //获取坐标是否完成 - - sort_store: 0, //门店分类 - choice_sort_store: 0, //选择分类门店 - template_id:[],//订阅消息id - }, + data: {}, onLoad: async function(options) { - wx.setNavigationBarTitle({ title: "拼团订单",}) - //var postdata=getApp().globalData.to_group; - var postdata=options; - var tg_id = postdata.tg_id, first_leader=options.first_leader,goods_id=options.goods_id; - //如果tg_id是空的话 - if(tg_id==null ||goods_id==null){ - var tg_id_str=decodeURIComponent(postdata.scene); - tg_id_str=tg_id_str.split("_"); - console.log(tg_id_str.length); - //tg_id_str[0] teamgroup.id tg_id_str[1] user_id tg_id_str[2] goods_id - switch(tg_id_str.length){ - case 1: - tg_id=tg_id_str[0]; - break; - case 2: - tg_id=tg_id_str[0]; - first_leader=tg_id_str[1]; - break; - case 3: - tg_id=tg_id_str[0]; - first_leader=tg_id_str[1]; - goods_id=tg_id_str[2]; - break; - } - } - //--判断一下是不是导购-- - if(first_leader){ - getApp().globalData.first_leader=first_leader; - //调用接口判断是不是会员 - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ - if(res.data.code==0){ - getApp().globalData.guide_id=res.data.data.id; - getApp().globalData.guide_pick_id= res.data.data.pickup_id - } - }) - } - this.setData({tg_id: tg_id,goods_id}); - getApp().globalData.to_group=null; - - var th=this; - getApp().getConfig2(function(e) { - var json_d = JSON.parse(e.switch_list); - th.setData({ bconfig: e,sys_switch:json_d}); - th.wait_for_store_config(); //获取默认的门店 - }) - try { - let template_id =await getApp().get_template_id('1023') - this.setData({ - template_id - }) - } catch (error) {} - + getApp().globalData.ts_trans_data=options; + getApp().goto('/packageG/pages/team/team_show/team_show?transfer=1'); }, - //显示加载 - onShow:function(){ - //-- 看一下隐私政策要不要显示 -- - var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id - if (privacy_pop) { - privacy_pop.check_pri_show(); - } - - getApp().check_can_share(); - var tg_id = this.data.tg_id,th=this; - this.init(tg_id); - }, - - //c点击打开拼团弹窗 - cpd: function() { - this.setData({ pd_xx: true,}) - }, - - //点击关闭拼团弹窗 - close_pt_xx: function() { - this.setData({ pd_xx: false, }) - }, - //天天拼团订阅消息提醒 - sendsm: function (ee) { - let th = this; - var template_id = this.data.template_id; - // //授权订阅 - wx.requestSubscribeMessage({ - tmplIds: template_id, - success(res) { - th.cyijian(ee); - }, - fail(res) { - th.cyijian(ee); - } - }) - }, - //按钮点击一键参加团按钮 - cyijian: function(e) { - //--先判断会员状态-- - var user_info=getApp().globalData.userInfo; - if(user_info==null || user_info.mobile==undefined || user_info.mobile=="" || user_info.mobile==null){ - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', }) - return false; - } - - var is_kt_or_ct=e.currentTarget.dataset.isct; - this.setData({ - yijian: true,is_kt_or_ct:is_kt_or_ct, - }) - }, - //关闭展开列表 - click: function(e) { - this.setData({ - hiddenName: !this.data.hiddenName, - zk: !this.data.zk, - }) - }, - //打开收起拼团列表 - czk: function(e) { - this.setData({ - zk: !this.data.zk, - hiddenName: !this.data.hiddenName, - }) - }, - //关闭购买页面 - cbcou: function(e) { - this.setData({ - yijian: false, - }) - - }, - //qh点击取货 - cqh: function(e) { - if(this.data.ssl) { - this.setData({ - qh: false, - xz: true, - one: true, - }) - }else{ - this.setData({ - qh: false, - xz: true, - one: false, - list:1, - }) - } - - }, - - //cxz点击选择门店 - cxz: function(e) { - this.setData({ - qh: true, - xz: false, - one: false, - }) - }, - //ccc点击选择的 - sel: function(e) { - this.setData({ - list: false, - se: false, - one: true, - xz: true, - }) - }, - //list点击底二层 - clist: function(e) { - var i = e.currentTarget.dataset.end; - var pick_id = e.currentTarget.dataset.pick_id; - var pick_dis = e.currentTarget.dataset.pick_dis; - - this.setData({ - end_name: i, - pick_id: pick_id, - ii: 1, - qh: true, - se: false, - list: false, - pick_dis: pick_dis - }) - }, - - //点击第一层 - setchild: function(e) { - var ind = e.currentTarget.dataset.bindex; - var nn = e.currentTarget.dataset.bname; - console.log(nn); - var list = this.data.ssl[ind].s_arr; - this.setData({ - ssl_child: list, - sele_dl_name: nn, - xz: false, - one: false, - list: true, - se: true - }); - }, - - //事件处理函数 - /*点击减号*/ - bindMinus: function() { - var num = this.data.num; - if (num > 1) { - num--; - } - var minusStatus = num > 1 ? 'normal' : 'disable'; - this.setData({ - num: num, - minusStatus: minusStatus, - }) - }, - - /*点击加号*/ - bindPlus: function() { - var th=this; - var num = this.data.num; - var ii = this.data.ii; - var minusStatus = num > 1 ? 'normal' : 'disable'; - - num++; - //要判断库存数量,限购数量 - th.check_num(num,minusStatus); - - }, - - async check_num(num,minusStatus){ - - var gd=this.data.goods; - var th=this; - var user_id=getApp().globalData.user_id; - var promgoodsbuynum=0; - var goodsbuynum=0; - getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { - data: { - store_id: os.stoid, - user_id: user_id, - goods_id: gd.goods_id, - prom_type: gd.prom_type, - prom_id: gd.prom_id, isnew:1 - - }, - }).then(res=>{ - var buy_num_data=res.data.data; - if(buy_num_data.promgoodsbuynum) promgoodsbuynum=buy_num_data.promgoodsbuynum; - goodsbuynum=buy_num_data.goodsbuynum; - }) - - //先判断限购 - if (num+goodsbuynum>gd.viplimited && gd.viplimited>0) { - getApp().confirmBox("超出商品限购"); - return false; - } - if (num+promgoodsbuynum>th.data.teamlist.buy_limit && th.data.teamlist.buy_limit>0) { - getApp().confirmBox("超出活动限购"); - return false; - } - //判断库存 - if ( num>gd.store_count) { - getApp().confirmBox("超出商品库存"); - return false; - } - var r_num=0; - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.teamlist.id, { - 1: 1 - }).then(res => { - var em = res; - if (em.data.code == 0) { - r_num=em.data.data; - } - }) - //--判断库存--- - if ( num>r_num) { - getApp().confirmBox("超出商品库存"); - return false; - } - - this.setData({ - num: num, - minusStatus: minusStatus, - }) - - }, - - /*输入框事件*/ - bindManual: function(e) { - var num = e.detail.value; - var minusStatus = num > 1 ? 'normal' : 'disable'; - this.setData({ - num: num, - minusStatus: minusStatus - }) - }, - - //---------------初始化代码---------------- - async init(tg_id) { - var goods_id = 0, //商品ID, - pageteam = null, // - original_img = null, //商品图片 - ee = this, - ordertx = [], - teamlist = null, //活动表 - goods = null, //商品 - teamgroup = null, //活動从表 - max_num = 0, - min_price = 0, - th=this, - that=th, - flag=null; - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/2",{ - data:{ - store_id: os.stoid, - is_end: 0, - is_show: 1, - user_id: getApp().globalData.user_id, - pageSize:1000 - } - }).then(res=>{ - let pd_list=res.data.data.pageData; - if(res.data.code==0 && pd_list.length>0){ - flag =pd_list.some(pd=>{ - // if(th.data.goods_id){ - return pd.goods_id==th.data.goods_id; - // } - }) - } - }) - if(!flag){ - wx.showToast({title: "当前会员身份不符,无法参与", icon: 'none', duration: 3000}); - setTimeout(function () { - ut.wx_back(); - }, 1000) - return false; - } - - //获取活动从表信息team_id,listno团编号(券号) - await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, { - }).then(res => { - - if(res.data.code !=0 ){ - getApp().showWarning(res.data.msg); - th.go_back(); - return false; - } - - if(res.data && res.data.data ) { - - teamgroup = res.data.data; - //获取当前时间,并且判断剩余时间 - var nt = ut.gettimestamp(); - var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss"); - ee.setData({ - pindGoods: teamgroup, - buy_start_date: buy_start_date - }); - - if(nt>teamgroup.kt_end_time) { - th.setData({is_group_end:1,end_text:"团期已经结束"}) - } - if(teamgroup.state==1) { - th.setData({is_group_end:1,end_text:"团期已经结束"}) - } - if(teamgroup.state==3 || teamgroup.state==4 || teamgroup.state==5 ) { - th.setData({is_group_end:2,end_text:"团期已满"}) - } - - } - }) - - if(!teamgroup || !teamgroup.listno){ - ut.m_toast('未找到团号'); - th.go_back(); - return false; - } - - //判断是不是要继续的开关 - var is_ok=1; - - //要先读取订单,看自己有没有买过该团的商品 - await getApp().request.promiseGet("/api/weshop/order/page", { - data: { - pt_prom_id:teamgroup.team_id, - user_id: oo.user_id, - store_id: os.stoid, - pageSize: 1, - page: 1 - } - }).then(res => { - var e=res; - if (e.data.code != 0) { - getApp().showWarning("读取订单失败"); - th.go_back(); - is_ok=0; - return fasle; - } - //--跳转到已经购买的情况-- - if (e.data.data.pageData.length > 0) { - var odr = e.data.data.pageData[0]; - //还未支付 - if (odr.pt_status == 0 && odr.order_status == 1) { - wx.navigateTo({ - url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id, - }); - is_ok=0; - }else if (odr.pt_status == 1 && odr.order_status == 1){ - wx.navigateTo({ - url: "/packageG/pages/team/team_success/team_success?ordersn=" + odr.order_sn, - }); - is_ok=0; - } - } - }) - if(!is_ok) return false; - - //获取活动表的信息根据活动team_id - await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, { - data: {} - }).then(res => { - if (res.data.code == 0) { - teamlist = res.data.data; - goods_id = res.data.data.goods_id; - //----------查看阶梯团------------ - if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) { - var ct_rylist = JSON.parse(teamlist.ct_rylist); - var max = 0; var pri = 0; - ct_rylist.forEach(function (val, ind) { - if (val.rynum > max) { - max = val.rynum; - pri = val.price; - } - }) - max_num = max; - min_price = pri; - } - - } - }) - - if(!teamlist){ - getApp().showWarning("未找到活动"); - is_ok=0; - }else{ - if(teamlist.is_end==1){ - getApp().showWarning("拼单活动已经结束"); is_ok=0; - } - var now=ut.gettimestamp(); - if(teamlist.end_time { - ordertx = res.data.data.pageData; - }) - - //获取商品信息 - await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, { - }).then(res => { - //商品地址 - original_img = ee.data.imageurl + res.data.data.original_img, - goods = res.data.data - }) - - //显示商品规格 - var gg = ""; - if(goods.goods_spec=="null" || goods.goods_spec==null ) goods.goods_spec=""; - if(goods.goods_color=="null" || goods.goods_color==null) goods.goods_color=""; - - if (goods.goods_spec != "" && goods.goods_color != "") { - gg = goods.goods_spec + "/" + goods.goods_color; - } else if (goods.goods_spec != "" || goods.goods_color != "") { - gg = goods.goods_spec + goods.goods_color; - } else { - gg = "规格1"; - } - goods.gg = gg; - - //只装5个 - var ordertx2 = [], sf_num = 0, ct_nun = teamlist.ct_num; - if (max_num) { - ct_nun = parseInt(max_num); - if (ct_nun < ordertx.length) ct_nun = ordertx.length; - } - - if (ct_nun > 5) ct_nun = 5; - for (var i = 0; i < ct_nun; i++) { - if (i >= ordertx.length) sf_num++ - else - ordertx2.push(ordertx[i]); - } - - var sf_arr = []; - for (var i = 0; i < sf_num; i++) { - sf_arr.push(i); - } - - - - if(th.data.is_group_end==1 || th.data.is_group_end==2 ){ - getApp().confirmBox(th.data.end_text); - wx.redirectTo({ - url: "/pages/goods/goodsInfo/goodsInfo?goods_id=" + goods.goods_id, - }); - return false; - } - - //--当是会员团的时候才显示倒计时多久可以参团-- - if(teamlist.kttype==2) { - //显示判断多久才能购买商品,获取没有支付的会员 - await getApp().request.promiseGet("/api/weshop/teamgroup/getTeamUser/" + os.stoid + "/" + teamgroup.id, { - 1: 1 - }).then(res => { - var em = res; - if (em.data.code == 0) { - var tg_list = em.data.data.split("|"); - var t_obj = {}; - t_obj.order_id = tg_list[0]; - t_obj.time = parseFloat(tg_list[1]) + 5 * 60; //五分钟后 - t_obj.user_name = tg_list[2]; - th.setData({tg_arr: t_obj}) - } - }) - } - - //获取大家都在团信息 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/"+os.stoid, { - data: { - pageSize: 2, - page: 1, - store_id: 1, - is_end: 0, - is_show: 1 - } - }).then(res => { - if(ut.ajax_ok(res)){ - pageteam = res.data.data.pageData; - } - }); - - //-- 获取用户的默认门店 -- - getApp().get_user_store(function(ee) { - if(!ee) { - th.data.fir_def_store={}; //赋值空对象 - return false; - } - - if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) - //--定时器推迟一下-- - - var appd=getApp().globalData; - var w_time = setInterval(function() { - if (that.data.is_get_local_ok == 0) return false; - if(!th.data.goods) return false; - var g_distr_type=th.data.goods.distr_type; - //--如果默认门店的配送方式不对,就不能被选择-- - if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ - //th.data.fir_def_store={}; //赋值空对象 - //return false; - ee.is_no_dis=1; - } - - clearInterval(w_time); - - var distance = null; - var e=JSON.parse(JSON.stringify(ee)); - - //如果有开启近距离的话,同时距离优不一样了 - if (that.data.lat != null) { - //如果经纬度有变化的话 - if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){ - that.data.fir_def_store=e; - that.setData({ - def_pick_store: e, - sto_sele_name: e.pickup_name, - sto_sele_id: e.pickup_id, - sto_sele_distr: e.distr_type - }) - }else{ - //要用接口是获取距离,js的计算不准 - getApp().request.promiseGet("/api/weshop/pickup/list",{ - data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon,is_pos: 1}, - }).then(res=>{ - if(ut.ajax_ok(res)){ - e=res.data.data.pageData[0]; - if (e){ - appd.pk_store=e; - that.data.fir_def_store=e; - that.setData({ - def_pick_store: e, - sto_sele_name: e.pickup_name, - sto_sele_id: e.pickup_id, - sto_sele_distr: e.distr_type - }) - } - - } - }) - } - - //e.distance = distance; - appd.lat=that.data.lat; - appd.lon=that.data.lon; - - }else{ - if (e) { - e.distance = null; - that.data.fir_def_store=e; - that.setData({ - def_pick_store: e, - sto_sele_name: e.pickup_name, - sto_sele_id: e.pickup_id, - sto_sele_distr: e.distr_type - }) - } - } - - }, 500) - - }); - - //获取下redis长度,如果团已经弄完,或者拼单已经卖完 - //设置值 - ee.setData({ - ordertx2: ordertx2, - ordertx: ordertx, - teamlist: teamlist, - teamgroup: teamgroup, - goods: goods, - pageteam: pageteam, - image: original_img, - is_show:1, - sf_arr: sf_arr - }); - ee.countDown2(); - //---设置门店--- - ee.get_sto(); - //---定时设置一下待支付的订单--- - ee.time_out(); - }, - - onHide:function(){ - this.setData({is_show:0,}); - }, - go_back:function(){ - if(getCurrentPages()>1) - wx.navigateBack({delta: 1}) - else - wx.navigateTo({ - url: "/pages/index/index/index" - }); - }, - //---小于10的格式化函数---- - timeFormat(param) { - return param < 10 ? '0' + param : param; - }, - countDown2() { - var th = this; - // 获取当前时间,同时得到活动结束时间数组 - var newTime = ut.gettimestamp(); - var o = this.data.pindGoods; - var endTime = o.kt_end_time; - - let obj = null; - // 如果活动未结束,对时间进行处理 - if (endTime - newTime > 0) { - let time = (endTime - newTime); - // 获取天、时、分、秒 - let day = parseInt(time / (60 * 60 * 24)); - let hou = parseInt(time % (60 * 60 * 24) / 3600); - let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); - let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); - obj = { - day: this.timeFormat(day), - hou: this.timeFormat(hou), - min: this.timeFormat(min), - sec: this.timeFormat(sec) - } - } else { - //活动已结束,全部设置为'00' - obj = { - day: '00', - hou: '00', - min: '00', - sec: '00' - } - } - var txt = "pindGoods.djs"; - th.setData({ - obj: obj - }); - setTimeout(th.countDown2, 1000); - }, - - //------去支付,购买------- - go_pay:function () { - var th=this; - var def_pick_store=this.data.def_pick_store; - if(def_pick_store && def_pick_store.pickup_id) { - th.data.pick_id=def_pick_store.pickup_id; //选择门店 - th.data.end_name=def_pick_store.pickup_name; - } - if (!th.data.pick_id) return s.my_warnning("请选择门店", 0, th); - if (th.data.pick_id==0) return s.my_warnning("请选择门店", 0, th); - - //----判断起购数---- - var qnum=parseFloat(th.data.teamlist.minbuynum); - if(qnum>0 && qnum>th.data.num ){ - getApp().confirmBox("拼团商品至少要买"+qnum+"件!"); - return false; - } - //先判断团的redis数量 - this.buy_check_redis(function () { - var arr=th.data.redis_arr; - if(th.data.num>arr[0]){ - if(arr[0]>0){ - getApp().showWarning("超出活动库存"); - }else{ - getApp().showWarning("拼单已经抢光"); - } - return false; - } - if(th.data.teamlist.kttype==2 && 1>arr[1]){ - getApp().showWarning("拼团已满"); - return false; - } - - //--------------此时操作的数据------------ - var newd = { - goods_id: th.data.goods.goods_id, - goods_num: th.data.num, - pick_id: th.data.pick_id, - user_id: oo.user_id, - store_id: th.data.stoid, - goods_name: th.data.goods.goods_name, - goods_sn: th.data.goods.goods_sn, - }; - - //---是不是从收藏夹出来的--- - if(th.data.c_guide_id){ - newd['guide_id'] = th.data.c_guide_id; - newd['guide_type']=2; - - }else{ - if(getApp().globalData.guide_id){ - newd['guide_id'] = getApp().globalData.guide_id; - newd['guide_type']=0; - - } - } - - //-----拼团----- - newd.goods_price = th.data.teamlist.price; - newd.prom_type = 6; - newd.prom_id = th.data.teamlist.id; - newd.kt_type = th.data.teamlist.kttype; //开团类型 - newd.is_pt_tz = 0; - newd.pick_name = th.data.end_name; - newd.pick_dis = 1; - newd.is_normal = 0; - //判断开团还是参团 - switch (th.data.is_kt_or_ct) { - case "0": - //如果不是商家团,就要带团期号 - if(th.data.teamlist.kttype>1){ - newd.qh=th.data.teamgroup.listno; - } - break; - case "1": - //阶梯团和会员团都要设置is_pt_tz - if (newd.kt_type > 1) { - newd.is_pt_tz = 1; //开团类型 - } - break; - } - newd['pick_dis'] = th.data.pick_dis; - - if(getApp().globalData.guide_id){ - newd['guide_id'] = getApp().globalData.guide_id; - newd['guide_type']=0; - } - - s.set_b_now(newd); - wx.navigateTo({ - url: "/packageE/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + th.data.goods.goods_id, - }); - }); - }, - - //购买前的判断redis - async buy_check_redis(func){ - //获取redis中的数量 - var r_num=0,prom_type=6,prom_id=this.data.teamlist.id; - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { - 1: 1 - }).then(res => { - var em = res; - if (em.data.code == 0) { - r_num=em.data.data; - } - }) - - //只有会员团要判断团的人数 - var gr_num=0,grp_id=this.data.teamgroup.id; - if(this.data.teamlist.kttype==2){ - await getApp().request.promiseGet("/api/weshop/activitylist/getActTuanLen/" + os.stoid + "/" + grp_id, { - 1: 1 - }).then(res => { - var em = res; - if (em.data.code == 0) { - gr_num=em.data.data; - } - }) - } - var arr=[];arr.push(r_num);arr.push(gr_num); - this.data.redis_arr=arr; - func(); - }, - - //定时设置一下待支付的订单 - time_out:function () { - var list=this.data.tg_arr,th=this; - if(!list) return false; - // 获取当前时间,同时得到活动结束时间数组 - var newTime = ut.gettimestamp(); - var endTime = list.time; - - let obj = null; - // 如果活动未结束,对时间进行处理 - if (endTime - newTime > 0) { - let time = (endTime - newTime); - // 获取天、时、分、秒 - let day = parseInt(time / (60 * 60 * 24)); - let hou = parseInt(time % (60 * 60 * 24) / 3600); - let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); - let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); - obj = { - day: th.timeFormat(day), - hou: th.timeFormat(hou), - min: th.timeFormat(min), - sec: th.timeFormat(sec) - } - } else { - //活动已结束,全部设置为'00' - obj = { - day: '00', - hou: '00', - min: '00', - sec: '00' - } - - //调用接口清理订单,并且返回redis数量 - th.back_order(function () { - th.setData({ tg_arr: null}); - }); - return false; - } - var txt = "pindGoods.djs"; - th.setData({ - r_obj: obj - }); - setTimeout(th.time_out, 1000); - }, - - //清理订单,并且返回redis数量ss - back_order:function (func) { - var th=this; - //---取消订单--- - getApp().request.delete("/api/weshop/order/cancelTeamOrder/"+th.data.stoid+"/"+th.data.tg_arr.order_id,{ - data:{}, - success: function(t) { - if(t.data.code==0){ - th.setData({tg_arr:null}) - } - }, - }) - }, - - go_goodsinfo:function (e) { - var gid=e.currentTarget.dataset.gid; - var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; - wx.navigateTo({ url: url, }) //跳到非tabbar页 - }, - - gohome:function(){ - getApp().goto("/pages/index/index/index"); - }, - - //-----图片失败,默认图片----- - bind_bnerr: function (e) { - var _errImg = e.target.dataset.errorimg; - var _errObj = {}; - _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; - }, - - //------ 分享配置 -------- - onShareAppMessage: function (e) { - getApp().globalData.no_clear=1; - var curPage=this; - var pagePath = curPage.route; //当前页面url - if (pagePath.indexOf('/') != 0) { - pagePath = '/' + pagePath; - } - var url=pagePath; - - //--分享图片-- - img=th.data.iurl+th.data.teamlist.share_imgurl; - //--把会员分享出去-- - if(getApp().globalData.user_id){ - if(url.indexOf("?")>0) - url+="&first_leader="+getApp().globalData.user_id; - else - url+="?first_leader="+getApp().globalData.user_id; - } - - if(url.indexOf('goods_id')==-1){ - url+="&goods_id="+this.data.goods.goods_id; - } - if(url.indexOf('tg_id')==-1){ - url+="&tg_id="+this.data.teamgroup.id; - } - - - return { - path:url, - title: "商品分类", - imageUrl: img, - } - }, - - - - - - closeSpecModal: function() { - this.setData({ - yijian: false - }); - }, - - close_popup: function() { - this.setData({ - showStore: true - }); - }, - - - - //-- 选择门店。此时的门店选择与门店有关系 -- - choice_store: function(ee) { - - //--先判断会员状态-- - var user_info = getApp().globalData.userInfo; - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { - wx.navigateTo({ - url: '/packageE/pages/togoin/togoin', - }) - return false; - } - - var th = this; - var bconfig = th.data.bconfig; - - //如果开启了,则不在选择门店 - if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ - return false; - } - - if(!th.data.only_pk && !th.data.def_pickpu_list){ - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - if(th.data.only_pk && !th.data.only_pk.length){ - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - if(th.data.def_pickpu_list && !th.data.def_pickpu_list.length){ - getApp().confirmBox("门店库存不足", null, 25000, !1); - return false; - } - - if ( bconfig && bconfig.is_sort_storage) { - wx.getLocation({ - type: 'gcj02', - success: function(res) { - - th.data.lat = res.latitude; - th.data.lon = res.longitude; - th.data.is_get_local_ok = 1; - th.setData({ - is_gps: 1 - }); - //th.onShow(); - th.get_sto(); - }, - fail: function(res) { - //th.onShow(); - th.data.is_get_local_ok = 1; - th.get_sto(); - if (res.errCode == 2) { - th.setData({ - is_gps: 0 - }); - if (th.data.is_gps == 0) { - getApp().confirmBox("请开启GPS定位", null, 25000, !1); - } - } else { - th.setData({ - is_gps: "3" - }); - } - - } - }) - }else{ - th.data.is_get_local_ok = 1; - th.get_sto(); - } - - this.setData({ - store: 1, - yijian: false, - choice_sort_store:0 - }) - - }, - - - //选择更多门店 - more_store: function() { - this.setData({ sort_store: 1}); - }, - - // 返回按钮 - returns: function() { - this.setData({ - sort_store: 0,choice_sort_store: 0 - }); - }, - - - //-- 等待获取定位系统 -- - wait_for_store_config: function() { - var th = this; - var t_time = setInterval(function() { - if (th.data.bconfig == null) false; - var e = th.data.bconfig; - if (e && e.is_sort_storage) { - wx.getLocation({ - type: 'gcj02', - success: function(res) { - th.data.lat = res.latitude; - th.data.lon = res.longitude; - th.data.is_get_local_ok = 1; - }, - fail: function(res) { - if (res.errCode == 2) { - th.setData({ - is_gps: 0 - }); - if (th.data.is_gps == 0) { - getApp().confirmBox("请开启GPS定位", null, 10000, !1); - } - - } else { - th.setData({ - is_gps: "3" - }); - } - - th.data.is_get_local_ok = 1; - } - }) - } else { - th.data.is_get_local_ok = 1; - } - clearInterval(t_time); - }, 500) - }, - - - //---------拿出门店分类和门店------------ - get_sto(e) { - var th = this,that=this; - var timer_get = setInterval(function() { - if (th.data.is_get_local_ok == 0) return false; - if (!th.data.goods) return false; - var dd = null, - i = getApp().request; - var g_distr_type = th.data.goods.distr_type; - if (g_distr_type != 0) { - dd = { - store_id: o.stoid, - distr_type: g_distr_type, - isstop: 0, - is_pos: 1, - pageSize: 2000 - } - } else { - dd = { - store_id: o.stoid, - isstop: 0, - is_pos: 1, - pageSize: 2000 - } - } - //如果有距离的话 - if (th.data.lat != null) { - dd.lat = th.data.lat; - dd.lon = th.data.lon; - } - clearInterval(timer_get); - - //如果会员是有默认的门店话 - if(!th.data.def_pick_store && th.data.fir_def_store){ - th.setData({def_pick_store:th.data.fir_def_store}); - } - - //----------获取门店---------------- - getApp().request.promiseGet("/api/weshop/pickup/list", { - data: dd, - }).then(res => { - var e = res; - if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { - - var pickup_ids=null; - //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店 - if( th.data.teamlist.pick_up_lists){ - pickup_ids=th.data.teamlist.pick_up_lists - } - - //-- 如果有指定门店的时候 -- - if(pickup_ids){ - var ok_arr=[]; - for (let i in e.data.data.pageData) { - let ite = e.data.data.pageData[i]; - //-- 查找一下门店有没有在 -- - var idx=pickup_ids.findIndex(function (e){ - return e.pickup_id==ite.pickup_id; - }) - if(idx>-1){ - ok_arr.push(ite) - } - } - - //判断会员的默认的门店是不是匹配指定的门店 - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ - //-- 查找一下门店有没有在 -- - var idx1=pickup_ids.findIndex(function (e){ - return e.pickup_id==th.data.def_pick_store.pickup_id; - }) - - if(idx1<0){ - th.data.def_pick_store.is_no_dis_act=1; - }else{ - th.data.def_pick_store.is_no_dis_act=0; - } - - that.setData({ - def_pick_store: th.data.def_pick_store - }) - - } - e.data.data.pageData=ok_arr; //数组重新赋值 - e.data.data.total=ok_arr.length; //数组的长度 - } - else{ - //-- 多规格指定门店优化 -- - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ - th.data.def_pick_store.is_no_dis_act=0; - that.setData({ - def_pick_store: th.data.def_pick_store - }) - } - } - - - - var his_cate_num=0; - for(let i in e.data.data.pageData){ - let item=e.data.data.pageData[i]; - if(item.category_id>0){ - his_cate_num=1;break; - } - } - e.his_cate_num=his_cate_num; - - //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 - if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){ - th.setData({ - def_pick_store:e.data.data.pageData[0], - sto_sele_name: e.data.data.pageData[0].pickup_name, - sto_sele_id: e.data.data.pageData[0].pickup_id, - sto_sele_distr: e.data.data.pageData[0].distr_type - }); - th.data.fir_def_store=e.data.data.pageData[0]; - } - - //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ - for (var k = 0; k < e.data.data.pageData.length; k++) { - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { - e.data.data.pageData.splice(k, 1); //删除 - break; - } - } - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 - } - - - th.setData({all_pick_list:e.data.data.pageData}); - - - setTimeout(function(){ - th.deal_pickup(e); //--普通门店排版-- - },800) - - } - }) - }, 200) - - }, - - //------------处理门店,拼团活动只有线上库存--------------- - deal_pickup(e){ - var th=this; - var g_distr_type=th.data.goods.distr_type; - //单总量超出5个的时候 - if (e.data.data.total > 10 && e.his_cate_num) { - getApp().request.get("/api/weshop/storagecategory/page", { - data: { - store_id: o.stoid, - pageSize: 1000, - orderField:"sort", - orderType:'asc', - }, - success: function(ee) { - if (ee.data.code == 0) { - - var check_all_cate=0; - if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){ - for(let i in ee.data.data.pageData){ - let item=ee.data.data.pageData[i]; - if(item.is_show==1){ - check_all_cate=1;break - } - } - } - - - - if (check_all_cate) { - - var sto_cate = ee.data.data.pageData; - var sto_arr = e.data.data.pageData; - var newarr = new Array(); - var qita = new Array(); - - var is_del_pk=0; - //----要进行门店分组-------- - for (var i = 0; i < sto_arr.length; i++) { - //找一下这个门店有没有在分类数组内 - var find2 = 0,find2name = "",sort=0; - is_del_pk=0; - for (var m = 0; m < sto_cate.length; m++) { - if (sto_arr[i].category_id == sto_cate[m].cat_id) { - if(sto_cate[m].is_show!=1){ - is_del_pk=1; sto_arr.splice(i,1); - i--; - }else { - find2 = sto_cate[m].cat_id; - find2name = sto_cate[m].cat_name; - sort = sto_cate[m].sort; - is_del_pk=0; - } - break; - } - } - if(is_del_pk) continue; - - if (newarr.length > 0) { - var find = 0; - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 - if (find2 != 0) { - for (var ii = 0; ii < newarr.length; ii++) { - if (sto_arr[i].category_id == newarr[ii].cat_id) { - newarr[ii].s_arr.push(sto_arr[i]); - find = 1; - break; - } - } - if (find == 0) { - var arr0 = new Array(); - arr0.push(sto_arr[i]); - var item = { - cat_id: find2, - name: find2name, - sort:sort, - s_arr: arr0 - }; - newarr.push(item); - } - } else { - qita.push(sto_arr[i]); - } - } else { - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 - if (find2 != 0) { - var arr0 = new Array(); - arr0.push(sto_arr[i]); - var item = { - cat_id: find2, - name: find2name, - sort:sort, - s_arr: arr0 - }; - newarr.push(item); - } else { - qita.push(sto_arr[i]); - } - } - } - - var def_arr = new Array(); - //-- 开始就看10个门店 -- - for (var k = 0; k < 10; k++) { - if (k == sto_arr.length) break; - def_arr.push(sto_arr[k]); - } - - th.setData({ - def_pickpu_list: def_arr, - pickpu_list: ee.data.data.pageData - }); - - //门店分类要排序下 - function compare(property){ - return function(a,b){ - var value1 = a[property]; - var value2 = b[property]; - return value1 - value2; - } - } - if(newarr.length>0) - newarr.sort(compare("sort")); - - - //----安排其他的分类----- - if (qita.length > 0) { - var item = { - cat_id: -1, - name: "其他", - s_arr: qita - }; - newarr.push(item); - } - - var sd={ - all_sto: newarr, - is_show_sto_cat:1 - } - if(!sto_arr || sto_arr.length<=10){ - sd.is_show_sto_cat=-1; - sd.only_pk=sto_arr; - } - th.setData(sd); - - } else { - th.setData({ - is_show_sto_cat: -1, - only_pk: e.data.data.pageData - }); - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ - if (!th.data.def_pick_store) { - th.setData({def_pick_store:e.data.data.pageData[0]}) - } - } - } else { - th.setData({ - is_show_sto_cat: -1, - only_pk: e.data.data.pageData - }); - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ - if (!th.data.def_pick_store) { - th.setData({def_pick_store:e.data.data.pageData[0]}) - } - - } - } - }); - } else { - th.setData({ - is_show_sto_cat: 0, - only_pk: e.data.data.pageData - }); - //-----如果没有默认门店,要取第一个门店作为默认店------ - if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { - th.setData({ - def_pick_store:e.data.data.pageData[0], - sto_sele_name: e.data.data.pageData[0].pickup_name, - sto_sele_id: e.data.data.pageData[0].pickup_id, - sto_sele_distr: e.data.data.pageData[0].distr_type - }) - } - } - }, - - - - //---选择分类门店--- - choice_sort_store: function(e) { - var index = e.currentTarget.dataset.index; - var region_name = e.currentTarget.dataset.region; - var item = this.data.all_sto[index]; - this.setData({ - region_name: region_name, - sort_store: 0, - choice_sort_store: 1, - sec_sto: item, - sec_pick_index: 0, - }); - }, - - choose_for_store_fir: function(e) { - var index_c = e.currentTarget.dataset.ind; - var th=this; - th.setData({ - fir_pick_index: index_c - }) - }, - - //---点击二级之后的选择--- - choose_for_store: function(e) { - var index_c = e.currentTarget.dataset.ind; - var th=this; - th.setData({ - sec_pick_index: index_c, - fir_pick_index: index_c - }) - - }, - - //确定def_pick为选择的门店 - sure_pick: function(e) { - var th = this; - var item = null; - - if (th.data.choice_sort_store == 0) { - var index = th.data.fir_pick_index; - if (th.data.is_show_sto_cat == 1) { - item = th.data.def_pickpu_list[index]; - } else { - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 - } - - } else { - var index = th.data.sec_pick_index; - item = th.data.sec_sto.s_arr[index]; - } - if(!item) return false; - - - th.setData({ - def_pick_store: item, - sto_sele_name: item.pickup_name, - sto_sele_id: item.pickup_id, - sto_sele_distr: item.distr_type, - store: 0, - choice_sort_store: 0, - fir_pick_index: 0 - }); - - - th.setData({ - yijian: 1, //打开拼团购买界面 - store: 0, //关闭门店 - choice_sort_store: 0, //关闭门店2级 - sort_store: 0, //关闭门店2级 - }); - - - }, - - - - //把选择的门店设置成默认的门店def_pick - set_def_pick: function(e) { - var th = this; - var item = null; - if (th.data.choice_sort_store == 0) { - var index = th.data.fir_pick_index; - if (th.data.is_show_sto_cat == 1) { - item = th.data.def_pickpu_list[index]; - } else { - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 - } - } else { - var index = th.data.sec_pick_index; - item = th.data.sec_sto.s_arr[index]; - } - - if(!item) return false; - - - var store_id = o.stoid; - var user_id = getApp().globalData.user_id; - var def_pickup_id = item.pickup_id; - - getApp().request.put('/api/weshop/users/update', { - data: { - user_id, - def_pickup_id - }, - success: function(res) { - if (res.data.code == 0) { - if (th.data.choice_sort_store == 0) th.setData({ - fir_pick_index: 0 - }); - getApp().globalData.pk_store = item; - } else { - getApp().my_warnning("设置默认门店地址失败",0,th) - } - - } - }); - - th.setData({ - def_pick_store: item, - sto_sele_name: item.pickup_name, - sto_sele_id: item.pickup_id, - sto_sele_distr: item.distr_type, - store: 0, - choice_sort_store: 0 - }); - - //4就是拼团 - th.setData({ - yijian: 1, //打开拼团购买界面 - store: 0, //关闭门店 - choice_sort_store: 0, //关闭门店2级 - sort_store: 0, //关闭门店2级 - }); - - }, - - - //-- 关闭选择门店 -- - close_popup: function(e) { - var th=this; - this.setData({ - store: 0, - choice_sort_store: 0, - sort_store: 0, - fir_pick_index:0, - sec_pick_index:0, - yijian: 1, //打开拼团购买界面 - }) - - }, - - //-- 弹出框的同意的优化,重新获取定位 --- - agree_pri:function (){ - var th=this; - var bconfig = th.data.bconfig; - if (bconfig && bconfig.is_sort_storage) { - wx.getLocation({ - type: 'gcj02', - success: function (res) { - th.data.lat = res.latitude; - th.data.lon = res.longitude; - th.data.is_get_local_ok = 1; - th.setData({ - is_gps: 1 - }); - //th.onShow(); - th.get_sto(); - }, - fail: function (res) { - //th.onShow(); - th.data.is_get_local_ok = 1; - th.get_sto(); - if (res.errCode == 2) { - th.setData({ - is_gps: 0 - }); - if (th.data.is_gps == 0) { - getApp().confirmBox("请开启GPS定位", null, 25000, !1); - } - } else { - th.setData({ - is_gps: "3" - }); - } - - } - }) - } - }, - - - + onShow:function(){ }, }) \ No newline at end of file diff --git a/pages/team/team_show/team_show.json b/pages/team/team_show/team_show.json index 199474a..0b59e95 100644 --- a/pages/team/team_show/team_show.json +++ b/pages/team/team_show/team_show.json @@ -1,13 +1,10 @@ { "windom": { - "navigationBarTitleText": "拼团订单", + "navigationBarTitleText": "加载中.", "backgroundTextStyle": "light", "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#ffffff", "backgroundColor": "#eeeeee" - }, - "usingComponents": { - "warn": "/components/long_warn/long_warn", - "privacy_pop": "/components/privacy_pop/privacy_pop" } + } \ No newline at end of file diff --git a/pages/team/team_show/team_show.wxml b/pages/team/team_show/team_show.wxml index 7f4f542..c2af0c2 100644 --- a/pages/team/team_show/team_show.wxml +++ b/pages/team/team_show/team_show.wxml @@ -1,550 +1,4 @@ - - - - - - - - - - - - - - - - {{goods.goods_name}} - - - - - - {{teamlist.price}} - - ¥{{goods.shop_price}} - - - - - 已拼{{teamlist.buy_num}}件 - - - - - - {{teamlist.ct_num}}人拼 - - - - - - - - - - - - - - - 拼团成功,为您节省25元 - - - - - - - 拼团失败 - - - - - - - - - - 团长 - - - - - - - - - - - - - - - - - - - - - 剩余 - {{obj.day}} : - {{obj.hou}} : - {{obj.min}} : - {{obj.sec}} 结束 - - - - - - - - - - - - - - - 去参团 - 返回首页 - - - 一键参团 - 返回首页 - - - 一键参团 - 返回首页 - - - - - 会员'{{tg_arr.user_name}}'待付款,若{{r_obj.min}}分{{r_obj.sec}}秒后该会员未支付您可以继续参团哦! - - - - 去参团 - 返回首页 - - - - - - - - - - 展开拼团列表 - - - - - - - 收起拼团列表 - - - - - - - {{item.nickname}} - - {{item.add_time_date}} 开团 - {{item.add_time_date}} 参团 - - - - - - - - - - 大家都在团 - - - - - - - - - {{item.goods_name}} - - - ¥{{item.price}} - {{item.ct_num}}人 - 参团 - - - - - + + 加载中。。 - - - - - - - - - - - - - - - - - {{goods.goods_name}} - - - ¥{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}} - - - - 已售:{{teamlist.buy_num}} - 可售:{{teamlist.goods_num-teamlist.buy_num}} - - - - - - - - - - {{def_pick_store.pickup_name}} - - - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} - - - - - - - 选择门店 - - - - - - - (配送不匹配) - (该店不可售) - 地址:{{def_pick_store.fulladdress}} - - - - - - - - - - - - - - - - - - - - - 配送不匹配 - 该店不可售 - 确定 - - - - - - - - - - - - - - - - {{choice_sort_store==0?'附近的门店':region_name}} - - - - - - {{choice_sort_store==0?'更多门店':'返回'}} - - - - - - - - - - - - - - - Г - - - - - - - - {{item.pickup_name}} - (配送不匹配) - (该店不可售) - - - - - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}} - - - 地址:{{item.fulladdress}} - - - - - - - - - - Г - - - - - - - - - {{item.pickup_name}} - (配送不匹配) - (该店不可售) - - - - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} - - - - 地址:{{item.fulladdress}} - - - - - - - - - - - Г - - - - - - - - - {{item.pickup_name}} - (配送不匹配) - (该店不可售) - - - - - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} - - - 地址:{{item.fulladdress}} - - - - - - - - - - - 确定 - 设为默认 - - - - - - - - - 门店分类选择 - - - 返回 - - - - - - {{item.name}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{toastText}} - - - - - - - - - - - 拼团玩法介绍 - - - 1.开团: - 选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功; - - 2.参团: - 进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格; - - 3.成团: - 在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货; - - 4.组团失败: - 在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户; - - 5. - 组团有效期间内,拼购商品订单不允许取消。 - - - - - - diff --git a/pages/team/team_show/team_show.wxss b/pages/team/team_show/team_show.wxss index cbff3ff..cc6cc05 100644 --- a/pages/team/team_show/team_show.wxss +++ b/pages/team/team_show/team_show.wxss @@ -1,2201 +1,5 @@ -page { - background-color: #eee; -} - -.top { - background-color: rgb(216, 230, 220); - color: rgb(98, 155, 13); - text-align: center; - height: 110rpx; - width: 100%; -} - -.center { - height: 240rpx; - width: 100%; - background: #fff; -} - -.cenleft { - width: 240rpx; - height: 100%; - float: left; - display: flex; - justify-content: center; - align-items: center; -} - -.cenleft image { - background-color: white; - width: 200rpx; - height: 200rpx; -} - -.cenrt {} - -.cenright { - height: 100%; - width: auto; - float: left; -} - -.cenrtoptitle { - float: left; - width: 240rpx; - height: 40rpx; - margin-left: 12rpx; - font-size: 28rpx; - margin-top: 12rpx; -} - -.cenrcen { - height: 70rpx; - margin-top: 35rpx; - width: 479rpx; -} - -.jg { - font-size: 40rpx; - margin-right: 30rpx; -} - -.jgx { - font-size: 24rpx; - color: #777; - text-decoration: line-through; - margin-top: 12rpx; -} - -.cenrfoot { - align-content: center; - text-align: center; - border: 2rpx solid red; - border-radius: 10rpx; - color: red; - float: left; - font-size: 24rpx; - padding: 4rpx 16rpx; - margin-top: 12rpx; -} - -.body { - background-color: white; - height: 472rpx; - width: 100%; - margin-top: 4rpx; -} - -.d { - font-size: 24rpx; -} - -.bodytop { - background-color: white; - text-align: center; - font-size: 28rpx; - padding-top: 16rpx; - height: 90rpx; - -} - -.bodytop span { - color: red; -} - -.bodyimg { - height: 155rpx; - /* display: flex; - justify-content: center; - align-items: center; */ - - -} - -.bodyimg image { - border-radius: 50rpx; - height: 96rpx; - width: 96rpx; - margin-top: 30rpx; - position: absolute; - -} - -.d { - width: 101rpx; - height: 101rpx; - display: inline-block; - -} - -.bodyimg span { - background-color: #e22b44; - color: white; - font-size: 24rpx; - border-radius: 6rpx; - padding: 3rpx 10rpx; - position: relative; - top: 8px; - left: 40rpx; -} - -.bodyspan { - color: red; - text-align: center; - font-size: 24rpx; -} - -.bodytime { - height: 55rpx; - width: 100%; - display: flex; - flex-wrap: nowrap; - padding-left: 40rpx; - align-items: center; - -} - -.bodytimeleft { - text-decoration: line-through; - flex-grow: 1.7; -} - -.bodytimecen { - text-align: center; - flex-grow: 1; - - font-size: 30rpx; - color: #000; - width: 415rpx; - -} - -.bodytimecen span { - background-color: #333333; - color: white; - border-radius: 7rpx; - padding-left: 20rpx; - font-size: 30rpx; - margin: 0 auto; - padding-right: 10rpx; - margin-right: 5px; - - -} - -.bodytimecen span:last-child { - margin-right: 10rpx; - -} - -.bodytimeright { - flex-grow: 1.7; - margin-right: 72rpx; - -} - -.bodybutton { - min-height: 170rpx; - width: 90%; - margin: 0 auto; - text-align: center; - line-height: 70rpx; - border-radius: 15rpx; - height: auto; - padding-top: 38rpx -} - -.bodybutton button { - height: 100%; - width: 100%; - background-color: red; - color: white; - font-size: 32rpx; -} - -.bodybutton.co-w { - color: #333; - background-color: #adadad; - font-size: 32rpx; - -} - - - -.bodyfoot { - width: 100%; - text-align: center; - font-size: 28rpx; - color: #777; - background-color: white; -} - -.pintuan { - width: 100%; - height: 84rpx; - background-color: white; - color: black; - text-align: center; - font-size: 36rpx; - margin-top: 0rpx; -} - - -.pintuanzhou { - float: left; - line-height: 84rpx; - width: 226rpx; - background: url('https://mshopimg.yolipai.net/miniapp/images/user/wh.png') no-repeat right center; - background-size: 42rpx; - margin-left: -18rpx; - font-size: 32rpx; -} - -.pintuanyou { - float: right; - color: rgb(168, 167, 167); - line-height: 84rpx; - font-size: 32rpx; - margin-right: 24rpx; -} - -.onegoods { - background-color: white; - width: 372rpx; - height: 560rpx; - border-left: 2rpx solid #eee; - float: left; -} - -.goodsl { - background-color: white; -} - -.onegoodsimg { - width: 100%; - height: 360rpx; - margin-bottom: 20rpx; -} - -.onegoodsimg image { - height: 100%; - width: 100%; -} - -.onegoodsdesc { - color: rgb(168, 167, 167); - padding-left: 20rpx; - height: 100rpx; - font-size: 32rpx; - width: 92%; - line-height: 100rpx; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - padding-right: 20rpx; -} - -.onegoodsdesc text {} - -.price { - color: red; - width: 100%; -} - -.jgleft { - float: left; - width: 100rpx; - margin-left: 20rpx; - font-size: 40rpx; - margin-top: -8rpx; -} - -.jgright { - font-size: 28rpx; - float: right; - width: 120rpx; -} - -.jgright span { - color: rgb(168, 167, 167); -} - -.goodslisttop { - background-color: white; - width: 100%; -} - -.goodslist { - background-color: white; -} - -.goodslisttop { - background-color: white; - width: 100%; - height: 80rpx; - margin-top: 20rpx; - text-align: center; -} - -.goodslistspan { - margin: 0 auto; - padding-top: 20rpx; - display: inline-block; - padding: 0 10px; - background: #fff; - margin-top: 12rpx; - font-size: 28rpx; - color: rgb(168, 167, 167); -} - -.xian { - height: 50%; - width: 100%; - border-bottom: 4rpx solid #eee; - float: left; -} - -.bodyselect { - height: 50px; - background-color: white; - width: 100%; - line-height: 50px; - font-size: 28rpx; -} - -.changxin { - float: left; - width: 100%; -} - -.zhangxi { - width: 100%; - min-height: 100rpx; - background-color: white; - color: black; -} - -.img { - width: 30%; - height: 100rpx; - margin-bottom: 0rpx; - color: black; - margin-left: 36rpx; - font-size: 26rpx; - display: flex; -} - -.img span { - height: 100rpx; - display: block; - line-height: 100rpx; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - padding: 0rpx; - width: 120rpx; -} - -.zhangxi image { - border-radius: 50rpx; - height: 80rpx; - width: 80rpx; - float: left; - margin-top: 12rpx; - background-color: red; - margin-right: 10rpx; -} - -.zhangxi .zssj { - height: 100rpx; - width: 70%; - margin-right: 40rpx; - line-height: 100rpx; - font-size: 26rpx; - text-align: right; -} - -.zhangxi .zssj text { - width: 100%; -} - -.ia { - display: flex; -} - -.zspan { - text-align: center; - border-bottom: 2rpx #eee solid; - width: 100%; - display: flex; - align-items: center; - justify-content: center; - font-size: 28rpx; - color: #777; - line-height: 100rpx; - height: auto; - -} - -.mtop { - text-align: center; - color: white; - background-color: #4c4c4c; - width: 100%; - height: 100%; - position: fixed; - z-index: 5; - top: 0; - left: 0; -} - -.mt1 { - margin-top: 100px; - margin-bottom: 20rpx; -} - -.mts { - color: #e1e10b; -} - -.mcou { - font-size: 48rpx; -} - -.mfoot { - width: 100%; - margin-top: 700rpx; -} - -.mbtn { - margin-top: 60rpx; - width: 400rpx; - background: #666; - color: #fff; - border-radius: 20rpx; - font-size: 32rpx; -} - -.etop { - padding-top: 200rpx; - width: 100%; - height: 100%; - position: fixed; - left: 0rpx; - top: 0rpx; - z-index: 12rpx; - background-color: white; -} - -.emyimage { - display: flex; - justify-content: center; - align-items: center; -} - -.emyimage image { - background-color: red; - width: 160rpx; - height: 160rpx; - margin: 0 auto; -} - -.espan { - font-size: 32rpx; - margin-top: 10rpx; -} - -.erweima { - margin-top: 10rpx; - width: 100%; -} - -.erzhou { - width: 200rpx; - float: left; - margin-right: 20rpx; -} - -.erzhou image { - background-color: blanchedalmond; - width: 200rpx; - height: 200rpx; -} - -.eright { - width: 500rpx; - float: left; - font-size: 32rpx; -} - -.body { - background-color: white; - height: auto; - width: 100%; - margin-top: 4rpx; -} - -.cenrtoptitle { - float: left; - width: 450rpx; - font-size: 28rpx; - margin-top: 20rpx; - -} - -.cenrtop { - margin-top: 20rpx; - background-color: red; - color: white; - border-radius: 10rpx; - padding: 0 16rpx; - font-size: 28rpx; - float: left; - height: 40rpx; -} - -.yijian { - position: fixed; - top: 0rpx; - left: 0rpx; - width: 100%; - height: 100%; - z-index: 14rpx; - background-color: rgba(0, 0, 0, 0.3); -} - -.buy-option { - background: #fff; - box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); - padding: 20rpx; - min-height: 400rpx; - padding-bottom: 120rpx; - width: 100%; - margin-top: 180rpx; -} - -.buy-top { - width: 100%; -} - -.buy-image { - margin-right: 20rpx; - width: 320rpx; - height: 200rpx; - float: left; -} - -.buy-image image { - width: 200rpx; - height: 200rpx; - background-color: burlywood; - float: left; -} - -.buy-image text { - margin-left: 10rpx; - color: red; -} - -.buy-cou { - float: right; - width: 100rpx; - height: 200rpx; - background-color: white; - font-size: 60rpx; - color: black; -} - -.t1 { - float: left; - font-size: 28rpx; - padding-left: 4rpx; - color: red; - padding-top: 10rpx; -} - -.buy-button { - width: 100%; - float: left; - margin-top: 22rpx; -} - -.buy-button text { - float: left; -} - -.stepper { - height: 52rpx; - float: left; - border: 2rpx solid #ccc; - border-radius: 6rpx; - margin-left: 28rpx; -} - -/*加号和减号*/ - -.stepper text { - float: left; - width: 76rpx; - line-height: 52rpx; - text-align: center; -} - -/*数值*/ - -.stepper input { - width: 80rpx; - height: 52rpx; - float: left; - margin: 0 auto; - text-align: center; - font-size: 24rpx; - border-left: 2rpx solid #ccc; - border-right: 2rpx solid #ccc; -} - -/*普通样式*/ - -.stepper .normal { - color: black; -} - -/*禁用样式*/ - -.stepper .disable { - color: #ccc; -} - -.quhuo { - width: 100%; - color: rgb(51, 51, 51); - float: left; - margin-top: 20rpx; -} - -.x-z { - width: 100%; - float: left; - color: rgb(51, 51, 51); - font-size: 36rpx; -} - -.btn { - width: 94%; - background-color: red; - color: white; - text-align: center; - height: 88rpx; - line-height: 88rpx; - float: left; - margin: 0 auto; -} - -.mck { - min-height: 100rpx; - width: 100%; - border-bottom: 24rpx #eee solid; -} - -/* pages/yi/yi.wxss */ - -.buy-option { - background: #fff; - padding: 20rpx; - margin-top: 650rpx; - width: 100%; -} - -.buy-top { - width: 100%; -} - -.buy-image { - margin-right: 20rpx; - width: 630rpx; - height: 200rpx; - float: left; -} - -.buy-image image { - width: 200rpx; - height: 200rpx; - background-color: burlywood; - float: left; - margin-right: 16rpx; -} - - -.buy-image text { - margin-left: 10rpx; - color: red; -} - -.buy-cou { - float: right; - width: 60rpx; - height: 60rpx; - background-color: white; - font-size: 60rpx; - color: black; - margin-right: 40rpx; - text-align: center; - line-height: 60rpx; - padding-bottom: 4rpx; -} - -.t1 { - font-size: 28rpx; - padding-left: 4rpx; - color: red; - padding-top: 10rpx; -} - -.buy-button { - width: 100%; - margin-top: 30rpx; -} - -.buy-button text { - /*float: left;*/ - display: inline-block; -} - -.stepper { - height: 52rpx; - display: inline-block; - border: 2rpx solid #ccc; - border-radius: 6rpx; - margin-left: 28rpx; -} - -/*加号和减号*/ - -.stepper text { - float: left; - width: 65rpx; - line-height: 52rpx; - text-align: center; -} - -/*数值*/ - -.stepper input { - width: 84rpx; - height: 52rpx; - float: left; - margin: 0 auto; - text-align: center; - font-size: 24rpx; - border-left: 2rpx solid #ccc; - border-right: 2rpx solid #ccc; -} - -/*普通样式*/ - -.stepper .normal { - color: black; -} - -/*禁用样式*/ - -.stepper .disable { - color: #ccc; -} - -.quhuo { - width: 100%; - color: rgb(51, 51, 51); - margin-top: 45rpx; - font-size: 32rpx -} - -.quhuo image { - width: 40rpx; - height: 40rpx; - display: inline-block; - position: relative; - left: 500rpx; -} - -.ttxz { - display: inline-block; -} - -.xuanze { - width: 100%; - height: 80rpx; - display: inline-block; - border-bottom: 1rpx #e7e7e7 solid; - font-size: 32rpx; - line-height: 80rpx; -} - -.xuanze1 { - width: 100%; - color: rgb(51, 51, 51); - height: 80rpx; - display: inline-block; - border-bottom: 1rpx #e7e7e7 solid; - line-height: 80rpx; - overflow: hidden; -} - -.x-z { - width: 100%; - color: rgb(51, 51, 51); - font-size: 36rpx; - height: auto; -} - -.btn { - width: 100%; - background-color: red; - color: white; - text-align: center; - height: 88rpx; - line-height: 88rpx; -} - -.clear { - clear: both; -} - -.fir_view { - max-height: 300rpx; - overflow-y: scroll; -} - -.pop_up { - min-height: 200rpx; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - background-color: rgba(0, 0, 0, 0.3); - font-size: 34rpx; - color: rgb(51, 51, 51); - -} - -.end_name { - display: inline-block; -} - -/*mask*/ - -.toast_mask { - opacity: 0; - width: 100%; - height: 100%; - overflow: hidden; - position: fixed; - top: 0rpx; - left: 0rpx; - z-index: 888; -} - -/*toast*/ - -.toast_content_box { - display: flex; - width: 100%; - height: 100%; - justify-content: center; - align-items: center; - position: fixed; - z-index: 999; - top: 0rpx; -} - -.toast_content { - width: 50%; - padding: 20rpx; - background: rgba(0, 0, 0, 0.5); - border-radius: 20rpx; -} - -.toast_content_text { - height: 100%; - width: 100%; - color: #fff; - font-size: 28rpx; - text-align: center; -} - -.jt { - width: 30rpx; - height: 30rpx; - display: inline-block; -} - -.jiajian { - color: #999; -} - -.t_wz { - line-height: 110rpx; - height: 110rpx; - font-size: 36rpx; -} - -.down-arrow { - display: inline-block; - position: relative; - width: 40rpx; - height: 30rpx; - margin-right: 20rpx; -} - -.down-arrow::after { - display: inline-block; - content: " "; - height: 18rpx; - width: 18rpx; - border-width: 0 2rpx 2rpx 0; - border-color: #999; - border-style: solid; - transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); - transform-origin: center; - transition: transform 0.3s; - position: absolute; - top: 50%; - right: 10rpx; - margin-top: -10rpx; -} - -.down-arrow1 { - display: inline-block; - position: relative; - width: 40rpx; - height: 30rpx; - margin-right: 20rpx; - margin-top: 12rpx; -} - -.down-arrow1::after { - display: inline-block; - content: " "; - height: 18rpx; - width: 18rpx; - border-width: 0 2rpx 2rpx 0; - border-color: #999; - border-style: solid; - transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); - transform-origin: center; - transition: transform 0.3s; - position: absolute; - top: 50%; - right: 10rpx; - margin-top: -10rpx; -} - -.down-arrow1::after { - transform-origin: center; - transform: rotate(-135deg); - transition: transform 0.3s; -} - -.goodslisttop::after { - content: ""; - width: 100%; - height: 1px; - border-bottom: 1px #d4d4d4 solid; - display: block; - margin-top: -12px; -} - -.ia { - display: flex; - width: 100%; -} - -.bview { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.5); -} - -.juzhong { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; -} - -.juzhong .xq { - padding: 0 20rpx; - background: #fff; - font-size: 30rpx; - padding-bottom: 20rpx; -} - -.juzhong .xq .title { - text-align: center; - margin: 20rpx 0; - position: relative; - height: 50rpx; -} - -.juzhong .xq .hs1 { - font-size: 28rpx; - color: #ab8f9e; -} - -.juzhong .xq .title .close { - position: absolute; - top: 0; - right: 0; - width: 45rpx; - height: 45rpx; -} - -/* .pt_qd { - margin-top: 40rpx; - height: auto; -} */ - -.spec-cart-btn.w100 { - width: 100%; - margin-left: 0; - height: 80rpx; - line-height: 80rpx; -} - - -.bview { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.5); -} - -.juzhong { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; -} - -.juzhong .xq { - padding: 0 20rpx; - background: #fff; - font-size: 30rpx; - padding-bottom: 20rpx; -} - -.juzhong .xq .title { - text-align: center; - margin: 20rpx 0; - position: relative; - height: 50rpx; -} - -.juzhong .xq .hs1 { - font-size: 28rpx; - color: #ab8f9e; -} - -.juzhong .xq .title .close { - position: absolute; - top: 0; - right: 0; - width: 45rpx; - height: 45rpx; -} - -.pt_qd { - /* margin-top: 40rpx; - height: auto; */ - padding: 20rpx; -} - -.spec-cart-btn.w100 { - width: 100%; - margin-left: 0; - height: 80rpx; - line-height: 80rpx; -} - -.show_zf_dd { - display: flex; - padding: 15rpx 40rpx; - justify-content: space-between; - font-size: 30rpx; - color: #666; -} - -.flex_tou { - display: flex; - justify-content: center; - width: 100%; - height: 175rpx; - align-items: center; -} - -.xc-goods-details { - width: 479rpx; - margin-top: 20rpx; - height: 80rpx; - align-items: center; - -} - -.xc-valframe { - border-radius: 7rpx; - border: 1rpx solid; - margin-top: 3rpx; -} - -.xc-valframe .xc-frame-img { - width: 30rpx; - height: 100%; - background: #e22b44; -} - -.xc-valframe .xc-frame-img .picture { - width: 25rpx; - height: 25rpx; - margin-top: 4rpx; - -} - -.bodybutton .xc-good-friend { - background: #fab55a; - border-radius: 15rpx; -} - -.bodybutton .xc-home-page { - margin-top: 20rpx; - background-color: #e22b44; - border-radius: 15rpx; -} - -.xc-ellipsis-img { - width: 56rpx; - height: 56rpx; - padding-top: 15rpx; -} - -.xc-ptcomplete { - width: 74%; - height: 105rpx; - line-height: 105rpx; - float: right; - -} - -.xc-ptcomplete .xc-img-frame .img { - width: 105rpx; - height: 105rpx; - float: right; -} - -.xc-ptcomplete .xc-img-frame { - width: 205rpx; - height: 105rpx; - margin-top: 20rpx; -} - -.xc-ptcomplete .xc-end { - width: 283rpx; - text-align: right; -} - -.iw { - padding-right: 33rpx; -} - -.xc-ptcomplete .xc-img-frames { - width: 345rpx; - height: 105rpx; - margin-top: 20rpx; - -} - -.xc-ptcomplete .xc-img-frames .img { - width: 105rpx; - height: 105rpx; - float: right; -} - -.bodybutton .xc-good-friend.co-w { - background-color: #aeaeae -} - - - - - - - - - - - - - - - -.spec-model { - position: fixed; - bottom: 0; - z-index: 20; - background: white; - width: 100%; - /* padding: 0 30rpx; */ - font-size: 32rpx; - box-sizing: border-box; - border-radius: 20rpx; - /* height: 72%; */ -} - -.spec-model .pding { - padding: 0 30rpx; -} - -.spec-goods { - padding: 30rpx 0 20rpx; - float: left; - width: 100%; - border-bottom: 2rpx solid #eee; -} - -.spec-img { - float: left; - height: 186rpx; - width: 186rpx; - border: 4rpx solid #eee -} - -.spec-goods-info { - float: left; - padding: 0 25rpx; - width: 400rpx; -} - -.spec-goods-name { - font-size: 30rpx; - line-height: 35rpx; - height: 70rpx; - margin: 15rpx 20rpx 25rpx 0; - overflow: hidden; - text-overflow: ellipsis; - color: #333; -} - -.spec-goods-price { - color: #d60021; - font-size: 33rpx; - font-weight: bold; -} - -.spec-goods-stock { - margin-top: 3rpx; - font-size: 24rpx; - color: #999999; - margin-right: 15rpx; -} - -.spec-name { - clear: both; - padding: 20rpx 0; - font-size: 30rpx; - color: #333; -} - -.quhuo { - font-size: 30rpx; - color: #000 -} - -.b_num { - display: flex; - font-size: 30rpx; - color: #333; - justify-content: space-between; -} - -.count { - /* position: fixed; */ - display: flex; - height: 50rpx; - /* border: 1rpx solid #000; */ - font-size: 28rpx; - /* right: 30rpx; */ - /* justify-content: space-between; */ -} - - -.count>view, -.count>input { - width: 60rpx; - height: 50rpx; - line-height: 50rpx; - text-align: center; -} - -.spec_bt { - background: fff; - color: #333; - margin-left: 10rpx; - padding: 4rpx 15rpx 4rpx; - display: inline-block; - border-radius: 30rpx; - font-size: 24rpx; - border: 1rpx solid #ccc; - margin: 10rpx; - height: 40rpx; - line-height: 40rpx; -} - -.spec_bt.act { - background: #d60021; - color: #fff; - border: 1rpx solid #d60021; -} - -.sub, .add, .count>input { - /* border-right: 1px solid #000; */ - background-color: #f8f8f8; - border-radius: 8rpx; -} -.sub.active { - /* background-color: #ddd; */ - color: #ccc; -} -.count>input { - margin: 0 10rpx; - line-height: normal; -} - -/* .sub { - border-right: 1px solid #000; -} - -.add { - border-left: 1px solid #000; -} */ - -.spec-btn { - color: black; - background-color: white; - padding: 10rpx 10rpx; - font-size: 26rpx; - line-height: 28rpx; - float: left; - border: 1rpx solid #dedede; - margin: 4rpx 10rpx 4rpx 0; - border-radius: 4rpx; -} - -.spec-btn-click { - color: white; - background-color: #f23030; - border: 1rpx solid #f23030; -} - -.spec-cart-btns { - width: 92%; - line-height: 70rpx; - margin: 0rpx auto; - margin-top: 160rpx; - border-radius: 20rpx; - position: fixed; - bottom: 50rpx; - left: 4%; - -} - -.spec-cart-btn { - - width: 100%; - font-size: 30rpx; - text-align: center; - color: white; - border-radius: 40rpx; -} - -.spec-add-cart { - background-color: #ffb03f; -} - -.spec-buy { - background-color: #f23030; - /* margin-left: 34rpx; */ -} - -.spec-cart-disable { - background: #bbbbbb; -} - -.spec-cart-btn-lg { - width: 614rpx; -} - -.prom-model { - position: fixed; - bottom: 0; - z-index: 20; - background: white; - width: 100%; - padding: 0 30rpx 30rpx; - font-size: 32rpx; - box-sizing: border-box; - overflow-x: hidden; -} - -.prom-model .prom-title { - text-align: center; - margin: 30rpx 0; -} - -.prom-model .logistics-item { - border: 0; -} - -.prom-model .item-mes { - width: 500rpx; -} - -.integral-btn { - width: 100%; - padding: 0rpx; - margin: 0rpx; -} - -.clear { - clear: both; -} - -.sto_v .title, -.sto_v .stitle { - border-top: 1rpx solid #dedede; - border-bottom: 1rpx solid #dedede; - height: 78rpx; - line-height: 78rpx; -} - -.sto_v .title .tubiao, -.sto_v .stitle .tubiao { - width: 32rpx; - height: 32rpx; - margin-top: 23rpx; -} - -.itemlists .item { - border-bottom: 1rpx solid #dedede; - height: 72rpx; - line-height: 72rpx; - font-size: 28rpx; - margin: 0 10rpx; -} - -.cshu { - margin-bottom: 30rpx; - margin-top: 20rpx; -} - -.cshu view { - color: #999; - font-size: 30rpx; - margin-left: 26rpx; -} - - -/*---活动特殊显示---*/ -.prom_show { - height: 120rpx; - display: flex; -} - -.prom_show .secondkill-img { - width: 100%; - height: 100%; -} - -.prom_show .spike-img { - width: 283rpx; - height: 57rpx; - top: 35rpx; - left: 31rpx; -} - -.prom_show .stop { - color: #d81731; - top: 17rpx; - right: 65rpx; - font-weight: 600; -} - -.prom_show .start { - color: #009ae2; - top: 17rpx; - right: 65rpx; - font-weight: 600; -} - -.prom_show .timeac { - font-size: 32rpx; - height: 120rpx; - color: #333; -} - -.prom_show .timeac.left { - width: 66%; - color: #fff; - background: #f23030; -} - -.prom_show .timeac.right { - width: 34%; - background-color: #d7d7d7; - text-align: center -} - -.prom_show .secview .day { - padding-right: 10rpx; -} - -.prom_show .secview .time-val { - width: 36rpx; - height: 36rpx; - border-radius: 7rpx; - line-height: 36rpx; -} - -.prom_show .secview .time { - margin-right: 10rpx; - margin-left: 10rpx; -} - - -.prom_show .timeac.left view { - margin-left: 20rpx -} - -.prom_show .timeac.left view.firview { - margin-top: 10rpx -} - -.prom_show .timeac.left view .tr_line { - text-decoration: line-through; - font-size: 28rpx; -} - -.prom_show .timeac.left view .bprice { - font-size: 50rpx; -} - -.prom_show .timeac.right view.firview { - margin-top: 12rpx; - margin-bottom: 10rpx -} - -.prom_show .timeac.right view.secview { - display: flex; - text-align: center; - justify-content: center; - flex-direction: row; -} - -.prom_show .timeac.right view .tui-conutdown-box { - /* background: #6b6b6b; */ - width: auto; - /* min-width: 45rpx; */ - height: 45rpx; - color: #c4182e; - font-size: 27rpx; - text-align: center; - line-height: 46rpx; -} - -.huise { - background: gray -} - -.lanse { - background: #0199e2 -} - - -/*------拼单------*/ -.pt_view { - text-align: center; - width: 100%; - height: 100rpx; - line-height: 100rpx; - font-size: 26rpx -} - -.pt_view .secondkill-img { - width: 100%; - height: 100%; -} - -.pt_fir { - background: #fff; - margin-bottom: 10rpx; -} - -.pt_fir .pt_fir_title { - display: flex; - align-items: center; - margin-left: 10rpx; - margin-top: 20rpx; - font-size: 28rpx; - position: relative; -} - -.pt_fir .pt_fir_title .kt_type { - color: #fff; - background: #e9030d; - width: 100rpx; - line-height: 40rpx; - border-radius: 6rpx; - margin: 0 10rpx; - height: 40rpx; - font-size: 24rpx; - text-align: center; -} - -.pt_fir .pt_fir_title .price { - color: #e9030d; - font-size: 26rpx; -} - -.pt_fir .pt_fir_title .bigw { - font-size: 36rpx; -} - -.pt_fir .pt_fir_title .tprice { - text-decoration: line-through; - color: #949494 -} - -.pt_fir .pt_fir_title .tprice.ml50 { - margin-left: 50rpx -} - -.pt_fir .pt_fir_title .js { - padding: 0 15rpx; - height: 40rpx; - background: #e9030d; - text-align: center; - border-radius: 8rpx; - color: #fff; - margin-left: 10rpx; -} - -.pt_fir .pt_fir_title .tuannum { - color: #e9030d; - position: absolute; - right: 20rpx; - font-size: 26rpx; -} - -.pding { - padding-top: 20rpx; - padding-left: 20rpx; - height: 81%; - padding-right: 20rpx; - font-size: 26rpx; - color: #ea120f -} - -.pdres { - margin-left: 10rpx; - color: #8f8f94 -} - -.ptgz { - position: relative; - font-size: 30rpx; - padding-left: 20rpx; - margin-top: 10rpx; - overflow: hidden -} - -.shuxian { - width: 6rpx; - height: 28rpx; - background: #ea120f; - display: inline-block; - top: 5rpx; - position: relative; - margin-right: 5rpx -} - -.ptgz_an { - position: absolute; - top: 5rpx; - right: 6rpx -} - -.ptgz_an .arrow-two { - width: 18rpx; - height: 18rpx; - border-color: #da0b31; - margin-top: 30rpx; -} - -.pt_fir.se { - height: auto; - margin-bottom: 10rpx -} - -.t_gz { - padding: 10rpx 20rpx; - font-size: 28rpx -} - -.pt_fir.se1 { - height: auto; - margin: 0 -} - -.pt_fir.se2 { - height: auto; - margin: 0; - border-top: 6rpx solid #eeeeee; - border-bottom: 2rpx solid #eeeeee; -} - -.pt_hb { - height: 78rpx; - line-height: 75rpx; - position: relative; - font-size: 32rpx; - overflow: hidden; - width: 695rpx; - margin-left: 28rpx; - border-bottom: 1rpx solid #E5E5E5 -} - -.ptgz_an.xq { - font-size: 32rpx; - color: #d40024 -} - -.wf { - display: flex; - padding: 20rpx 0; -} - -.wf .item { - width: 24.5%; - text-align: center; - font-size: 26rpx; - color: #666 -} - -.wf .item .item_txy { - position: relative; - width: 60rpx; - height: 60rpx; - background: #ea120f; - border-radius: 50%; - left: 50%; - margin-left: -30rpx; - border: 3px #dfdfdf solid; - text-align: center; - line-height: 60rpx; - color: #fff; - margin-bottom: 10rpx; -} - -.wf .item .item_txy.hs { - background: #cbcbcb; -} - -.po { - margin-bottom: 20rpx; -} - -.cart-btn.line-h { - line-height: 26rpx; -} - -.cart-btn .fir-v { - margin-top: 10rpx; -} - -.hyt { - padding: 0 20rpx; - font-size: 30rpx; - display: flex; - align-items: center; - margin-top: 10rpx; -} - -.hyt .r_f { - color: #e9120f; - font-size: 26rpx; - position: relative; - top: 3rpx -} - -.hyt .byj { - color: #e9120f; - font-size: 32rpx; - position: relative; - top: 5rpx -} - -.pt_fir .pt_fir_title.no-mar-b { - margin-bottom: 0; - padding-bottom: 10rpx; - margin-left: 20rpx -} - -.pt_fir .pt_fir_title.boder-1 { - border-bottom: 1rpx #e7e7e7 solid -} - -.jie_price { - padding: 10rpx 30rpx; -} - -.jie_price_title { - font-size: 30rpx; - color: #a26270; - margin-bottom: 10rpx -} - -.price_list { - display: flex; - width: 100%; -} - -.price_item { - width: 25%; - font-size: 28rpx; - color: #4c336c -} - -.pt_fir.se2 .zzk-1 { - margin-top: 23rpx; - font-size: 30rpx; - position: relative; - margin-bottom: 30rpx; - border-left: 4rpx solid red; - margin-left: 14rpx; - height: 30rpx; - line-height: 30rpx; - padding-left: 5rpx; -} - -.ckgd { - position: absolute; - top: 0; - right: 57rpx; - color: #d70025; - font-size: 32rpx; -} - -.ckgd .arrow-one { - width: 18rpx; - height: 18rpx; - border-color: #da0b31; - margin-top: 5rpx; -} - -.bview { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.5); -} - -.juzhong { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; -} - -.juzhong .xq { - padding: 0 20rpx; - background: #fff; - font-size: 30rpx; - padding-bottom: 20rpx; -} - -.juzhong .xq .title { - text-align: center; - margin: 20rpx 0; - position: relative; - height: 50rpx; -} - -.juzhong .xq .hs1 { - font-size: 28rpx; - color: #ab8f9e -} - -.juzhong .xq .title .close { - position: absolute; - top: 0; - right: 0; - width: 45rpx; - height: 45rpx; -} - -.pt_qd { - /* margin-top: 40rpx; - height: auto; */ -} - -.spec-cart-btn.w100 { - width: 95%; - margin-left: 0; - height: 75rpx; - line-height: 75rpx; - margin: auto; -} - -.sto_v { - color: #333; -} - -.ellipsis { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - - - - -/* 房子图标 */ -.stores-img { - width: 40rpx; - height: 35rpx; - margin-right: 10rpx; -} - -.right-arrow { - width: 15rpx; - height: 15rpx; - border-top: 2rpx solid #d70026; - border-right: 2rpx solid #d70026; - transform: rotate(45deg); - display: inline-block; - margin-bottom: 3rpx; -} - -.distance{ - padding-left: 15rpx; - padding-right: 15rpx; - background: #eee; - border-radius: 20rpx; - margin-right: 5rpx; - color: #999; - height: 38rpx; - line-height: 38rpx; -} - -.shop_name{ - margin-right: 10rpx; -} - -.xc-distance-top{ - margin-top: 10rpx; -} - - -.popup-frame{ - position: fixed; - /* bottom:99rpx; */ - bottom: 0; - z-index: 20; - background: white; - width: 100%; - border-radius: 20rpx 20rpx 0 0; - height: auto; -} - -.popup-top{ - border-bottom: 1rpx solid #eee; - height: 155rpx; - width: 95%; - margin: auto; - line-height: 155rpx; - -} - - -/* .flex-space-between{ - display: flex; - justify-content:space-between; -} */ - -.modal-closes { - position: absolute; - right: 30rpx; - top: -15rpx; - height: 25rpx; -} - -.choose_more{ - margin-top: 40rpx; - margin-right: 20rpx; - -} -.choose_mores{ - margin-top: 30rpx; - margin-right: 15rpx; - -} - -.bg_rights{ - border-top: 2rpx solid ; - border-right: 2rpx solid ; - transform: rotate(45deg); - display: inline-block; - width: 15rpx;height:15rpx; - border-color: #da0b31; -} - - -.mongolia-layer{ - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - z-index: 11; - background: rgba(0,0,0,0.4); - width: 100%; - height: 91.9%; -} - - - - -.store-list{ - width: 95%; - min-height:300rpx; - overflow-y: scroll; - margin: auto; - max-height: 610rpx; -} - -.store-list .store_choose{ - width: 100%; - height: 120rpx; - line-height: 125rpx; - border-bottom: 1rpx solid #eee; -} - -.store-list .store_choose .store{ - width: 100%; - margin: auto; - line-height: 37rpx; - padding-left: 20rpx; -} - -.xc-hook{ - width: 35rpx; - height: 35rpx; - transform: rotate(-145deg); - line-height: 37rpx; - text-align: center; -} - -.butttem5{ - margin-bottom: 5rpx; -} - -.address-frame{ - width: 93%; - margin-left: 7rpx; -} - -.store-bottom{ - width: 85%; - margin: auto; - height: 90rpx; - } - - .determine{ - width: 260rpx; - height: 55rpx; - border-radius: 50rpx; - line-height: 55rpx; - } - - .default{ - width: 260rpx; - height: 55rpx; - border:3rpx solid #c8c8c8; - border-radius: 50rpx; - line-height: 55rpx; - } - - .sort_store_list .sort-store-frame .sort-store { - width: 94.5%; - margin: auto; - } - - - .sort_store_list .sort-store-frame{ - width: 100%; - height: 100rpx; - line-height:100rpx; - border-bottom: 1rpx solid #eee; - } - - .black_rights-frame .black_rights{ - border-top: 3rpx solid; - border-right: 3rpx solid; - transform: rotate(45deg); - display: inline-block; - width: 20rpx; - height: 20rpx; - } - - - .sort_store_list{ - max-height: 700rpx; - overflow: hidden; - overflow-y: scroll; - width: 95%; - margin: auto; - } - - .xc-hooks{ - width: 30rpx; - height: 30rpx; - border: 1rpx solid #999; -} - -.no_store{color:#d60021; font-size: 26rpx;} - -.sub.active { - /* background-color: #ddd; */ - color: #ccc; -} - -.c-red22{ color:#d60021; } +.rty{ + display:flex; justify-content: center; align-items: center; + width:100%; + height:100% +} \ No newline at end of file -- libgit2 0.21.4