diff --git a/components/diy_advertising/diy_advertising.wxml b/components/diy_advertising/diy_advertising.wxml index 89e5931..9ef022d 100644 --- a/components/diy_advertising/diy_advertising.wxml +++ b/components/diy_advertising/diy_advertising.wxml @@ -1,27 +1,35 @@ - - - - - - 建议宽度640 - - - + + + + + + 建议宽度640 + + + + - - + + + + - - - + + + + + + + + + - - - + + + @@ -34,16 +42,24 @@ 建议宽度640 - - - + + + + + + + + + + - - - + + + + + - @@ -62,13 +78,30 @@ 300*300 - + + + + + + + + + + + + + + + + + + @@ -80,8 +113,7 @@ - + @@ -90,8 +122,29 @@ 200*200 - - + + + + + + + + + + + + + + + + + + @@ -100,8 +153,29 @@ 200*200 - - + + + + + + + + + + + + + + + + + + @@ -118,12 +192,21 @@ 300*300 - > - - - - - + + + + + + + + + + + + + + + @@ -133,13 +216,29 @@ 300*150 - - + + + + + + + + + + + + + + + + + @@ -149,12 +248,29 @@ 300*150 - + + + + + + + + + + + + + + + + + + @@ -171,13 +287,28 @@ 200*200 - - + + + + + + + + + + + + + + + + @@ -186,13 +317,28 @@ 400*200 - + + + + + + + + + + + + + + + + @@ -204,13 +350,28 @@ 400*200 - - - + + + + + + + + + + + + + + + + @@ -219,13 +380,28 @@ 200*200 - + + + + + + + + + + + + + + + + @@ -241,13 +417,28 @@ 300*150 - + + + + + + + + + + + + + + + + @@ -257,12 +448,27 @@ 300*300 - + + + + + + + + + + + + + + + + @@ -275,13 +481,28 @@ 300*300 - - + + + + + + + + + + + + + + + + @@ -290,13 +511,28 @@ 300*150 - + + + + + + + + + + + + + + + + @@ -314,13 +550,28 @@ 200*200 - - + + + + + + + + + + + + + + + + @@ -329,13 +580,28 @@ 200*200 - + + + + + + + + + + + + + + + + @@ -347,13 +613,29 @@ 200*200 - + + + + + + + + + + + + + + + + + @@ -363,13 +645,22 @@ 200*200 - - - + + + + + + + + + + + + + + + - - - @@ -382,13 +673,21 @@ 200*420 - - - - - - - + + + + + + + + + + + + + + + @@ -401,34 +700,36 @@ - - - + + - - - - {{item.title}} - - + + + + + {{item.title}} + + + - - - + + + + {{item.title}} - - - + + + + + + + + {{item.title}} + + + + - - - - - + \ No newline at end of file diff --git a/components/diy_nav/diy_nav.wxml b/components/diy_nav/diy_nav.wxml index 47c11d1..4ab5090 100644 --- a/components/diy_nav/diy_nav.wxml +++ b/components/diy_nav/diy_nav.wxml @@ -3,13 +3,21 @@ - - - - - - + + + + + + + + + + + + + + + @@ -18,14 +26,21 @@ - - - - - - + + + + + + + + + + + + + + + - - + \ No newline at end of file diff --git a/components/diy_picMax/diy_picMax.wxml b/components/diy_picMax/diy_picMax.wxml index bfda429..77393e1 100644 --- a/components/diy_picMax/diy_picMax.wxml +++ b/components/diy_picMax/diy_picMax.wxml @@ -9,6 +9,11 @@ + + + + + @@ -25,7 +30,7 @@ - + diff --git a/components/diy_store_select/diy_store_select.wxss b/components/diy_store_select/diy_store_select.wxss index 26797c1..db12656 100644 --- a/components/diy_store_select/diy_store_select.wxss +++ b/components/diy_store_select/diy_store_select.wxss @@ -188,7 +188,7 @@ /* 门店分类列表 */ .sort_store_list { - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageA/pages/distribution/shop/shop.js b/packageA/pages/distribution/shop/shop.js index d9f78d6..f9452e5 100644 --- a/packageA/pages/distribution/shop/shop.js +++ b/packageA/pages/distribution/shop/shop.js @@ -196,7 +196,7 @@ Page({ //--- 判断是等级会员,且在有效期范围内 --- if (user.card_field && now < end) { var card_name = ob.name_map.get(user.card_field); - if (card_name.length > 4) card_name = card_name.substring(0, 8); + if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8); th.setData({ card_field: user.card_field, card_name: card_name, diff --git a/packageA/pages/goodsInfo/goodsInfo.wxss b/packageA/pages/goodsInfo/goodsInfo.wxss index d6ac50e..0c694bc 100644 --- a/packageA/pages/goodsInfo/goodsInfo.wxss +++ b/packageA/pages/goodsInfo/goodsInfo.wxss @@ -2575,7 +2575,7 @@ line-height: 38rpx; } /* 门店分类列表 */ .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageA/pages/profile/profile.wxss b/packageA/pages/profile/profile.wxss index 00dfc79..dad2d8e 100644 --- a/packageA/pages/profile/profile.wxss +++ b/packageA/pages/profile/profile.wxss @@ -532,7 +532,7 @@ input { /* 门店分类列表 */ .sort_store_list { - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageA/pages/prom_list/prom_list.wxss b/packageA/pages/prom_list/prom_list.wxss index 4d5aad5..123ef64 100644 --- a/packageA/pages/prom_list/prom_list.wxss +++ b/packageA/pages/prom_list/prom_list.wxss @@ -267,7 +267,7 @@ } /* 门店分类列表 */ .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageA/pages/serviceCard_pd/team_show/team_show.wxss b/packageA/pages/serviceCard_pd/team_show/team_show.wxss index 75fa735..34fe160 100644 --- a/packageA/pages/serviceCard_pd/team_show/team_show.wxss +++ b/packageA/pages/serviceCard_pd/team_show/team_show.wxss @@ -2178,7 +2178,7 @@ page { .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageA/pages/serviceCard_pd/team_success/team_success.js b/packageA/pages/serviceCard_pd/team_success/team_success.js new file mode 100644 index 0000000..a1cbd08 --- /dev/null +++ b/packageA/pages/serviceCard_pd/team_success/team_success.js @@ -0,0 +1,991 @@ +var ut = require("../../../../utils/util.js"), + e = require("../../../../utils/common.js"), + a = require("../../../../utils/wxParse/wxParse.js"), + s = getApp(), + i = s.request, + o = s.globalData.setting, + os = o; + var regeneratorRuntime = require('../../../../utils/runtime.js'); + +Page({ + data: { + //activity_type:1,//活动类型 商家1 阶梯2 会员3 + p_status:1,//会员团的详细情况 1是正在行 2是成功 3失败 + sf_length: 1,//人数大于5 + + erweima:false, + meng:false, + zk:true, + stoid: o.stoid, + hiddenName: true, + teamlist:null, + teamgroup:null, + goods:null,//商品数据 + pindGoods: null,//拼单数据 + imageurl: o.imghost, + pay_f:0,//支付是否成功 + order_sn:"",//订单编号 + canvasHidden:false, //画画版 + screenWidth:0, + + pd_xx: 0, //弹框 + max_num:0,//最低成团人数 + min_price:0,//最低价格 + is_show:0,//加载完才显示 + + share_img_localpath:"", //分享图片的本地图片 + share_ewm_localpath: "", //分享的二维码本地图片 + share_head:"", //分享头像的本地图片 + + iurl:os.imghost, + ct_price:0,//阶梯团成团价格 + sf_arr:null, + + }, + onLoad: function (t) { + wx.setNavigationBarTitle({ title: "拼团订单",}) + var that=this; + var th=this; + //获取用户设备信息,屏幕宽度 + wx.getSystemInfo({ + success: res => { + that.setData({ screenWidth: res.screenWidth }) + } + }) + var pay_f = t.payf, order_sn = t.ordersn; + this.setData({ pay_f: pay_f, order_sn: order_sn}); + this.init(order_sn); + + //-- 自定义海报 -- + getApp().request.promiseGet("/api/weshop/goods/poster/page",{ + data:{store_id:os.stoid, type:1, is_use:1 } + }).then(res=>{ + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){ + + var poster_data=res.data.data.pageData[0]; + var json_str=poster_data.jsonStr; + if(json_str){ + var json_data=JSON.parse(json_str); + if(json_data.bg_img){ + + //-- 把图片那到本地 -- + wx.getImageInfo({ + src:json_data.bg_img, + success: function(res) { + var path= res.path; + th.setData({share_b_img:path}) + }, + fail: function(res) {} + }); + } + th.setData({poster:json_data}) + } + } + }) + }, + onShow:function () { + getApp().check_can_share(); + }, + + //关闭展开列表 + 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, + }) + }, + //打开蒙板提示 + cmeng:function(e){ + this.setData({ + meng:!this.data.meng, + }) + }, + + //关闭蒙板提示 + cmc:function(e){ + this.setData({ + meng: !this.data.meng, + }) + }, +//打开二维码提示 + cerweima:function(e){ + this.setData({ + meng: !this.data.meng, + erweima: !this.data.erweima, + }) + }, + + cerc:function(e){ + this.setData({ + erweima: !this.data.erweima, + meng: !this.data.meng, + }) + }, + + async init( order_sn) { + + wx.showLoading(); + + var goods_id = 0,//商品ID, + pageteam=null,// + original_img=null ,//商品图片 + order=null,//订单编号 + service_list=null, //服务卡崇拜 + id = 0,//团购id + pt_listno = "",//团编号 + pt_prom_id = 0, //活动id + ee = this, + team_id = 0,//活动id + ordertx=[],//头像图片 + share_img=null,//分享图片 + teamlist=null,//活动表 + teamgroup=null,//活動从表 + max_num=0,//最低价格时的成团人数 + p_status=1; + + //--如果商家团的时候,这个要改--- + await getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { + data: {orderSn:order_sn,storeId:os.stoid } + }) + + await getApp().request.promiseGet("/api/weshop/recharge/get/"+os.stoid+"/"+order_sn, { + }).then(rs1=>{ + if(rs1.data.code==0){ + order=rs1.data.data; + } + }) + + + //获取order信息根据订单编号order_sn + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/page", { + data: { store_id: os.stoid, order_id: order.order_id,} + }).then(res => { + service_list = res.data.data.pageData[0]; + pt_prom_id = service_list.prom_id; + pt_listno = service_list.pt_listno; + }) + + if (this.data.payf || service_list.pt_status == 3) p_status = 3; //失败 + if (service_list.pt_status == 2 || service_list.pt_status == 4 || service_list.pt_status == 5) + p_status = 2; //成功 + if (service_list.pt_status < 2 && !this.data.payf) + p_status = 1; //正在进行 + if ( service_list.pt_status == 6) p_status = 4; //支付尾款失败 + + //多少人参团头像 + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/pagePtList", { + data: { store_id: o.stoid, pt_listno: pt_listno, } + }).then(res => { + ordertx = res.data.data.pageData; + }) + + var min_price=0; + //获取活动表的信息根据活动pt_prom_id + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, { + data: { } + }).then(res => { + if(res.data.code==0){ + teamlist=res.data.data; + this.setData({ + teamlist:teamlist + }); + var nt =ut.gettimestamp(); + teamlist.status=0; + + if (nt >= teamlist.start_time) teamlist.status = 1; + goods_id = res.data.data.goods_id; + id = res.data.data.id; + share_img = ee.data.imageurl + res.data.data.share_imgurl; + + //----------查看阶梯团------------ + 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; + } + + } + + //-- 商品地址 -- + original_img = ee.data.imageurl+ service_list.img_url, + ee.setData({goods: service_list,image: original_img,}) + + + }) + + //只装5个 + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num; + if(max_num){ + ct_nun=parseInt(max_num); + if (ordertx && ct_nun < ordertx.length) ct_nun = ordertx.length; + } + + if(ct_nun>5) ct_nun=5; + for(var i=0;i= ordertx.length) sf_num++ + else + ordertx2.push(ordertx[i]); + } + + var sf_arr=[]; + for (var i=0;i { + teamgroup = res.data.data.pageData[0]; + if (teamgroup){ + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss"); + teamgroup.buy_start_date=buy_start_date; + } + }) + + + var ct_price = 0, + num_0 = ordertx.length; + if (teamlist.kttype == 3){ + var js_data = JSON.parse(teamlist.ct_rylist); + js_data.forEach(function (val,ind) { + if (num_0<=val.rynum && ct_price==0){ + ct_price=val.price; + } + }) + if(ct_price==0) ct_price=min_price; + } + + //获取大家都在团信息 + getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { + data:{page:1,pageSize:2} + }).then(res => { + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ + pageteam = res.data.data.pageData; + ee.setData({pageteam: pageteam,}) + } + + }) + + //--当是成团的时候的操作-- + if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){ + //设置值 + + ee.setData({ + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, min_price: min_price, + order: order, share_img: share_img,max_num:max_num, + pindGoods: teamlist,is_show:1, zk:false, + hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr}); + + //--是否支付了尾款-- + if(order.pt_status==4 || order.pt_status==5){ + ee.setData({is_pay_wk:1}); + } + }else{ + console.log("239什么鬼", teamlist); + //设置值 + ee.setData({ + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, + order: order, p_status: p_status, min_price:min_price, + share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1, + ct_price: ct_price, p_status: p_status,sf_arr:sf_arr}); + } + + wx.hideLoading(); + + wx.setNavigationBarTitle({ + title: "拼团详情", + }) + + ee.countDown2(); + + //获取分享图片的本地地址 + var path2 = os.imghost + teamlist.share_imgurl; + wx.getImageInfo({ + src: path2, + success: function (res) { + //res.path是网络图片的本地地址 + ee.data.share_img_localpath = res.path; + }, + fail: function (res) { + //失败回调 + } + }); + + + }, + //---小于10的格式化函数---- + timeFormat(param) { + return param < 10 ? '0' + param : param; + }, + countDown2() { + var th = this; + // 获取当前时间,同时得到活动结束时间数组 + var newTime = ut.gettimestamp(); + var o = this.data.teamgroup; + if(!o) return false; + + var endTime = o.kt_end_time; + if (o.status == 0) endTime = o.start_time; + + //看一下,是否要支付尾款 + if(o.team_type==3 && th.data.order.pt_status==2){ + endTime = o.wk_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); + }, + + //--定义的保存图片方法,分享团--- + saveImageToPhotosAlbum: function () { + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 + var type=1; + if(this.data.teamlist.kttype==3) type=2; + + wx.showLoading({ title: '生成中...', }) + var that = this, th = that; + //设置画板显示,才能开始绘图 + that.setData({ + canvasHidden: true, + }) + + if(this.data.share_hidden) { + this.setData({ + share_hidden: false, + }); + }; + + var app = getApp(); + var unit = that.data.screenWidth / 750 * 1.35; + var scene=th.data.teamgroup.id; + var goods_id=th.data.teamlist.goods_id; + var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0; + if(user_id>0){ + scene+="_"+user_id; + } + if(goods_id !==""){ + scene+="_"+goods_id; + } + + //二微码 + var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+ + os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show"; + + console.log(path3,6000); + + //读取文件成功则OK-- + wx.getImageInfo({ + src: path3, + success:function (res) { + console.log(res,5000); + //回调写法 + th.get_head_temp(th.get_goods_temp,function () { + var vpath = res.path; + var context = wx.createCanvasContext('share'); + + + //先画背景 + var pg_path = "../../../../images/share/share_bg.png"; + //-- 如果有自定义海报的时候,判断背景的图片 -- + if(th.data.share_b_img){ + pg_path=th.data.share_b_img; + } + + var share_title=th.data.teamlist.share_title; + if(!share_title) + share_title=th.data.teamlist.title; + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); + + //-- 是自定义海报的情况下 -- + if(th.data.poster && parseInt(th.data.poster.style)==2){ + //在线上分享人的情况下 + if(parseInt(th.data.poster.show_headpic)){ + //获取坐标 + var x=parseFloat(th.data.poster.head_x)*2; + var y=parseFloat(th.data.poster.head_y)*2; + var x1=(x+90) *unit; + var y1=(y+50) *unit; + //--昵称--- + context.setFontSize(24 * unit) + context.setFillStyle("black") + context.fillText(app.globalData.userInfo.nickname, x1, y1); + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; + //强烈推荐 改许程 + var tj_path = "../../../../images/share/q_tj.png"; + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); + context.setFontSize(16 * unit) + context.setLineJoin('round'); //交点设置成圆角 + context.setFillStyle("white") + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); + } + + }else{ + //--昵称--- + context.setFontSize(24 * unit) + context.setFillStyle("black") + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; + //强烈推荐 + var tj_path = "../../../../images/share/q_tj.png"; + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit); + context.setFontSize(18 * unit) + context.setFillStyle("white") + context.fillText('强烈推荐', 152 * unit + width + 20 * unit, 76 * unit); + } + + + //---产品名称--- + context.setFontSize(21.3 * unit); + context.setFillStyle("black"); + + + + + th.draw_Text(context,share_title, + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); + //------产品的价格------- + context.setFontSize(24 * unit) + context.setFillStyle("red") + + var pri0 = th.data.teamlist.price; + pri0=parseFloat(pri0).toFixed(2); + var wd1=th.data.screenWidth-ut.measureText(pri0, 31 * unit)-25; + context.fillText("¥", wd1-15, 180 * unit); + context.setFontSize(31 * unit) + context.fillText(pri0, wd1, 180 * unit); + + //---市场价划掉--- + context.setFillStyle("gray") + context.setFontSize(22 * unit) + pri0= "¥" + parseFloat(th.data.goods.market_price).toFixed(2); + var wd2=th.data.screenWidth-ut.measureText(pri0, 22 * unit)-25; + context.fillText(pri0, wd2, 210 * unit); + + context.setStrokeStyle('gray') + context.setLineWidth(1 * unit) + context.moveTo(wd2-5, 204 * unit) + context.lineTo(wd2+ut.measureText(pri0, 22 * unit)+5, 204 * unit) + context.stroke(); + console.log(th.data.share_img_localpath); + + + //---中间大图--- + context.drawImage(th.data.share_img_localpath, 68 * unit, 242 * unit, 410 * unit, 410 * unit); + + var g_ct=th.data.teamlist.ct_num-th.data.ordertx.length; + var wz= ""; + if(g_ct>0) wz="还差"+g_ct+"人成团,"; + else{ + g_ct= th.data.max_num -th.data.ordertx.length; + if(g_ct>0){ + wz="还差"+g_ct+"人享最低优惠,"; + }else{ + wz="已享受最优惠,"; + } + } + + //-------大图后面就不一样了----------- + switch (type) { + case 1://会员团和商家团的展示 + //---画线--- + context.setLineWidth(1 * unit) + context.moveTo(32 * unit, 670 * unit) + context.lineTo(520 * unit, 670 * unit) + context.stroke(); + + //---文字--- + context.setFontSize(22 * unit) + context.setFillStyle("black") + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit); + + //绘制成团图片 + var ct_img ="../../../../images/share/ct_num.png"; + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); + var ct_num = th.data.teamlist.ct_num; + context.setFontSize(14 * unit) + + context.setFillStyle("red") + if(ct_num<10){ + context.fillText(ct_num+"人拼团", 92 * unit, 760 * unit); + }else{ + context.fillText(ct_num+"人拼团", 86 * unit, 760 * unit); + } + context.setFontSize(22 * unit) + context.fillText("已拼"+th.data.teamlist.buy_num+"份", 166 * unit, 763 * unit); + context.setFillStyle("gray") + context.fillText(wz+"快来和我一起拼团吧!", 40 * unit, 826 * unit); + context.setFillStyle("black") + + context.setFontSize(22 * unit) + context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit); + //---二维吗图--- + //-- 自定义海报 -- + if(th.data.poster){ + var erm_x= parseFloat(th.data.poster.ewm_x)*2; + var erm_y= parseFloat(th.data.poster.ewm_y)*2; + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); + }else{ + //---二维吗图--- + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); + } + break + case 2://阶梯团的展示 + //---画线--- + context.setLineWidth(1 * unit) + context.moveTo(32 * unit, 670 * unit) + context.lineTo(520 * unit, 670 * unit) + context.stroke(); + //---文字--- + context.setFontSize(22 * unit) + context.setFillStyle("black") + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit); + //---绘制中间阶梯的价格--- + var list= JSON.parse(th.data.teamlist.ct_rylist); + for(var i=0; i canvasWidth) { + han++; + if (han == 2) + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 + else + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); + + initHeight += 22; //22为字体的高度 + lineWidth = 0; + lastSubStrIndex = i; + titleHeight += 20; + } + if (i == str.length - 1) { //绘制剩余部分 + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); + } + } + }, + + //c点击打开拼团弹窗 + cpd: function() { + console.log("heheh"); + this.setData({ pd_xx: 1,}) + }, + + //点击关闭拼团弹窗 + close_pt_xx: function() { + this.setData({ pd_xx: 0, }) + }, + + go_goodsinfo:function (e) { + var index=e.currentTarget.dataset.index; + var item=this.data.pageteam[index]; + var gid=item.goods_id; + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+item.id+"&prom_type=6"; + if(item.goods_type==1){ + url="/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+item.id+"&prom_type=6"; + } + getApp().goto(url); //跳到非tabbar页 + }, + + gohome:function () { + getApp().goto("/pages/index/index/index"); + }, + + //--获取头像的本地缓存,回调写法-- + get_head_temp:function (tt,func) { + var ee=this; + if(ee.data.share_head){ + tt(func); + return false; + } + //---获取分享图片的本地地址,头像和商品图片---- + var path2 = getApp().globalData.userInfo.head_pic; + if(path2==""){ + ee.data.share_head ="../../../images/share/hui_hear_pic.png"; + tt(func); + }else { + path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); + path2=path2.replace("https://thirdwx.qlogo.cn","https://wx.qlogo.cn"); + wx.getImageInfo({ + src: path2, + success: function (res) { + //res.path是网络图片的本地地址 + ee.data.share_head = res.path; + tt(func);; + }, + fail: function (res) { + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 + tt(func); + } + }); + } + }, + + //--获取商品图片的本地缓存,回调写法-- + get_goods_temp:function (tt) { + var ee=this; + if(ee.data.share_img_localpath) { + tt(); + return false; + } + var path2 = os.imghost + ee.data.teamlist.share_imgurl; + //获取商品是分享图信息 + wx.getImageInfo({ + src: path2, + success: function (res) { + //res.path是网络图片的本地地址 + ee.data.share_img_localpath = res.path; + tt(); + }, + fail: function (res) { + ee.data.share_img_localpath= "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 + tt(); + } + }); + }, + + go_pay_wk:function(){ + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id; + getApp().goto(url); + }, + + img_show_err:function(e){ + var err_img = e.currentTarget.dataset.err; + var ob={}; + ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif"; + this.setData(ob); + + }, + + //------ 分享配置 -------- + onShareAppMessage: function (e) { + getApp().globalData.no_clear=1; + 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 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; + } + // console.log('url+++++>>>>>', url, th.data.teamlist.title); + + var share_title=th.data.teamlist.title; + if(th.data.teamlist.share_title){ + share_title=th.data.teamlist.share_title; + } + return { + path:url, + title: share_title, + imageUrl: img, + } + }, + + clickShare() { + if(!getApp().globalData.user_id){ + getApp().goto("/pages/togoin/togoin"); + return false; + } + this.setData({ + share_hidden: true, + }); + }, + + send() { + this.setData({ + share_hidden:false, + }); + }, + + cancel() { + this.setData({ + share_hidden:false, + }); + }, + + + closePoster() { + this.setData({ + showPoster: false, + }); + }, + + + // 保存图片到手机 + savePic() { + console.log('保存图片'); + var self = this; + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 + this.getSetting().then((res) => { + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 + if (!res.authSetting['scope.writePhotosAlbum']) { + this.authorize().then(() => { + // 同意授权后保存下载文件 + this.saveImage(self.data.shareImgPath) + .then(() => { + self.setData({ + showPoster: false + }); + }); + }) + } else { + // 如果已经授权,保存下载文件 + this.saveImage(self.data.shareImgPath) + .then(() => { + self.setData({ + showPoster: false + }); + }); + } + + }) + }, + + + // 保存图片到系统相册 + saveImage(saveUrl) { + var self = this; + return new Promise((resolve, reject) => { + wx.saveImageToPhotosAlbum({ + filePath: saveUrl, + success: (res) => { + wx.showToast({ + title: '保存成功', + duration: 1000, + }); + self.setData({ + showPlaybill: 'true' + }); + resolve(); + }, + fail: () => { + wx.showToast({ + title: '保存失败', + duration: 1000, + }); + } + }) + }) + }, + + // 获取用户已经授予了哪些权限 + getSetting() { + return new Promise((resolve, reject) => { + wx.getSetting({ + success: res => { + resolve(res) + } + }) + }) + }, + + // 发起首次授权请求 + authorize() { + // isFirst 用来记录是否为首次发起授权, + // 如果首次授权拒绝后,isFirst赋值为1 + let isFirst = wx.getStorageSync('isFirst') || 0; + return new Promise((resolve, reject) => { + wx.authorize({ + scope: 'scope.writePhotosAlbum', + // 同意授权 + success: () => { + resolve(); + }, + // 拒绝授权,这里是用户拒绝授权后的回调 + fail: res => { + if(isFirst === 0) { + wx.setStorageSync('isFirst', 1); + wx.showToast({ + title: '保存失败', + icon: 'none', + duration: 1000 + }) + } else { + this.showModal(); + } + console.log('拒绝授权'); + reject(); + } + }) + }) + }, + + + go_to:function (e) { + var url=e.currentTarget.dataset.url; + getApp().goto(url); + } + +}) + diff --git a/packageA/pages/serviceCard_pd/team_success/team_success.json b/packageA/pages/serviceCard_pd/team_success/team_success.json new file mode 100644 index 0000000..528e630 --- /dev/null +++ b/packageA/pages/serviceCard_pd/team_success/team_success.json @@ -0,0 +1,12 @@ +{ + "windom": { + "navigationBarTitleText": "拼团订单", + "backgroundTextStyle": "light", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#ffffff", + "backgroundColor": "#eeeeee" + }, + "usingComponents": { + "share": "/components/share/share" + } +} \ No newline at end of file diff --git a/packageA/pages/serviceCard_pd/team_success/team_success.wxml b/packageA/pages/serviceCard_pd/team_success/team_success.wxml new file mode 100644 index 0000000..4889b15 --- /dev/null +++ b/packageA/pages/serviceCard_pd/team_success/team_success.wxml @@ -0,0 +1,310 @@ + + + + + + + + + + + + + {{goods.service_name}} + + + + + + {{teamlist.price}} + + 零售价¥{{goods.show_price}} + + + + + 已拼{{teamlist.buy_num}}件 + + + + + + {{teamlist.ct_num}}人拼 + + + + + + + + + + + + + + + 当前价格 + ¥{{ct_price}}, + + 还差{{max_num-ordertx.length}}人享受最低价格¥{{min_price}} + + + 该团已经拼购到最低价了哦~ + + + + + 拼团成功,当前价格 + ¥{{ct_price}} + + + + + + + + + + + 拼团失败 + + + + + + + + 还差 + {{teamlist.ct_num-ordertx.length}}人成团,组团成功为您节省 + {{filters.toFix(goods.show_price-teamlist.price,2)}}元 + + + + 拼团成功,为您节省 + {{filters.toFix(goods.market_price-teamlist.price,2)}}元 + + + + + + + + + + + 团长 + + + + + + + + + + + + + + + + + + + + 剩余 + + {{obj.hou}}: + {{obj.hou}}: + {{obj.min}}: + {{obj.sec}}结束 + + + + + 剩余支付时间: + + {{obj.hou}}时 + {{obj.min}}分 + {{obj.sec}}秒 + + + + 拼团已结束 + + + + + + 还差 + {{teamlist.ct_num-ordertx.length}}人参团, 拼团失败。 + + + + 已经有 + {{ordertx.length}}人参团, 拼团成功。 + + + + + + + + + + + 拼团成功, 规定时间内支付尾款即发货 + + + 点击下方按钮分享给小伙伴,可快速成团! + + + + + + + + + + + + + + + + + + + + + + + + + + 查看拼团列表 + + + + + + + + + + + + + + + + + + + + + 大家都在团 + + + + + + + + + + + + + + + + ¥{{item.price}} + + {{item.ct_num}} + 人参团 + + + + + {{item.goods_name}} + + + + + + + + + + + + + + + + + 拼团玩法介绍 + + + 1.开团: + 选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功; + + 2.参团: + 进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格; + + 3.成团: + 在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货; + + 4.组团失败: + 在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户; + + 5. + 组团有效期间内,拼购商品订单不允许取消。 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packageA/pages/serviceCard_pd/team_success/team_success.wxss b/packageA/pages/serviceCard_pd/team_success/team_success.wxss new file mode 100644 index 0000000..9d13c9f --- /dev/null +++ b/packageA/pages/serviceCard_pd/team_success/team_success.wxss @@ -0,0 +1,965 @@ +page{ + background-color:#eee; +} +.top{ + background-color:rgb(216, 230, 220); + color: rgb(98, 155, 13); + text-align: center; + height:120rpx; + width: 100%; + padding-top:24rpx; +} + +.center{ + height: 240rpx; + width: 100%; + position: relative; + 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{ + width: 460rpx; margin-top: 10rpx; +} + +.cenright{ + height: 100%; + width: 460rpx; + + float: left; +} + +.cenrtop{ + margin-top: 10rpx; + background-color: red; + color: white; + border-radius:10rpx; + padding-left: 16rpx; + width: 140rpx; + font-size: 32rpx; + float: left; + height: 40rpx; +} + +.cenrtoptitle{ + float: left; + width: 295rpx; + height: 40rpx; + margin-left: 12rpx; + font-size: 28rpx; + margin-top:12rpx; +} + +.cenrtoptitle>span{ + width: 100%; + display: inline-block; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap +} + +.cenrcen{ + height: 70rpx; + margin-top: 35rpx; + width:474rpx; +} +.jg{ font-size: 40rpx; + margin-right: 30rpx;} +.jgx{ + font-size: 28rpx; + color: #777; + text-decoration:line-through; + margin-left: 20rpx; +} + +.cenrfoot{ + align-content: center; + text-align: center; + border: 2rpx solid red; + border-radius:10rpx; + color: red; + float: left; + font-size: 24rpx; + padding: 4rpx 16rpx; +} + +.body{ + background-color: white; + /* min-height:418rpx; */ + width: 100%; + margin-top: 4rpx; + border-top:5rpx solid #eee; + height: auto; +} + +.bodytop{ + background-color: white; + text-align: center; + font-size: 28rpx; + height:100rpx; + line-height:117rpx; + +} + +.bodytop span{ + color: red; +} + + +.bodyimg{ + height:140rpx; + width:590rpx; + + + +} +.bodyimg image{ + +border-radius:50rpx; +height: 96rpx; +width: 96rpx; +background-color:burlywood; +margin-top: 30rpx; + position: absolute; + +} + +.d{ +width:101rpx; + height:101rpx; + display: inline-block; + margin-right:15rpx; + +} + +.bodyimg span{ + background-color:#e22b44; + color: white; + font-size: 24rpx; + border-radius:6rpx; + padding:2rpx 10rpx; + position: relative; + top: 0rpx; + left: 40rpx; +} + + + +.bodyspan{ + color: red; + text-align: center; + font-size: 26rpx; + +} + +.bodyselect{ + line-height: 47rpx; +} + +.bodytime{ + height: 88rpx; + width: 100%; + display: flex; + flex-wrap: nowrap; + margin-left:40rpx; + align-items:center; + +} + +.bodytimeleft{ + text-decoration:line-through; + flex-grow: 1.7; +} + + +.bodytimecen-success{ + text-align: center; + flex-grow: 1; + line-height:75rpx; + font-size: 30rpx; + color: #000; +} +.bodytimecen-success span{ + + color: #18ba5f; + border-radius:7rpx; + font-size: 30rpx; + margin: 0 auto; + +} +.bodytimecen{ + text-align: center; + flex-grow: 1; + + font-size: 30rpx; + color: #000; +} +.bodytimecen span{ + background-color: #333333; + color: white; + border-radius:7rpx; + padding-left: 10rpx; + 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{ + width: 90%; + margin: 0 auto; + text-align: center; + line-height: 60rpx; + border-radius:15rpx; + height: auto; +} + +.bodybutton button{ + height:60rpx; + width: 100%; + background-color: #e4374d; + color: white; + font-size:26rpx; + border-radius:12rpx; + +} + +.bodyfoot{ + + width: 100%; + text-align: center; + + font-size: 28rpx; + color: #000; + background-color: white; +} + + + + + +.pintuan{ + width: 100%; + height: 84rpx; + background-color: white; + color: black; + text-align: center; + font-size:36rpx; + margin-top: 60rpx; +} + +.pintuanzhou{ +float: left; + +line-height: 84rpx; +width: 220rpx; +} + +.pintuanyou{ + float: right; + color: rgb(168, 167, 167); + line-height: 84rpx; + font-size: 28rpx; + margin-right: 20rpx; +} + +.onegoods{ + background-color: white; + width: 345rpx; + min-height: 490rpx; + height:auto; + + border:2rpx solid #eee; + + float: left; + margin-right:17rpx; + border-radius:20rpx; +} + +.goodsl{ + background-color: white; +} + +.onegoodsimg{ + width: 100%; + height: 360rpx; +} + +.onegoodsimg image{ + height: 100%; + width: 100%; + border-radius:20rpx 20rpx 0 0; + +} + .xc-buttmo-frame{ + min-height: 103rpx; + height: auto; + padding-bottom:15rpx; + + } +.xc-buttmo-frame .onegoodsdesc { + + height: 80rpx; +} + +.xc-buttmo-frame .onegoodsdesc .price{ + + padding-left:10rpx; + height:85rpx; + +} +.xc-ping{ + border-radius: 50%; + background: #fff; + line-height:34rpx; +width:34rpx; +height:34rpx; +font-size:24rpx; + +} +.jgleft{ +border-radius:36rpx; +height:45rpx; +line-height:50rpx; +color:#fff; +padding-left:7rpx; +padding-right:24rpx; +background:#e4374d; +} + +.jgright{ + font-size: 26rpx; + height:16rpx; +padding-right:10rpx; +color:rgb(168, 167, 167); +} + +.jgright span{ + color: rgb(168, 167, 167); +} + +.goodslisttop{ + width: 100%; +} + +.goodslisttop{ + width: 100%; + margin-top: 5rpx; + border-bottom: 4rpx solid #eee; + text-align: center; +} + +.goodslistspan{ + + margin: 0 auto; + padding-top: 20rpx; +} + +.xian{ + width: 100%; + border-bottom: 2rpx solid #eee; + float: left; +} + +.bodyselect{ + height: 90rpx; + background-color: white; + width: 100%; + line-height:90rpx; + +} + + +.changxin{ + overflow: hidden; + width: 100%; + padding-left:20rpx; + +} + +.zhangxi{ + width: 100%; + background-color:white; + color: black; +} + +.img{ + height: 100rpx; + margin-bottom: 0rpx; + float: left; + color: black; + line-height:100rpx; +display:flex; +align-items:center; + +} + +.zhangxi image{ + border-radius:50rpx; + height: 60rpx; + width: 60rpx; + float: left; + + background-color: red; + margin-left: 40rpx; + margin-right:10rpx; + +} + +.zhangxi .zssj{ + width: 413rpx; + margin-left: 28rpx; + float: right; + margin-top:32rpx; +} + +.zspan{ + float: left; + text-align: center; + display: flex; + align-items: center; + justify-content: center; + height: 48rpx; + font-size: 28rpx; + color:#000; + margin-bottom: 10rpx; + padding-bottom: 10rpx; + width: 100%; + background: #fff; + border-bottom:3rpx solid #eee; + margin-top:20rpx; + +} + + + +.mtop{ + text-align: center; + color: white; + background-color:rgba(0, 0, 0, .4); + width: 100%; + height: 100%; + position: fixed; + z-index: 5;top:0;left: 0; + +} + +.mt1{ + margin-top: 200rpx; + margin-bottom: 20rpx; +} + +.mts{ + color:#E1E10B; +} + +.mcou{ + font-size: 48rpx; + +} + +.mfoot{ + width: 100%; + margin-top: 700rpx; +} + + +.mbtn{ + margin-top: 60rrpx; + width: 400rpx; + background: #666666; + 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:rgba(0, 0, 0, .4); + +} + +.emyimage{ + display:flex; + justify-content: center; + align-items: center; +} + + +.emyimage image{ + background-color: red; + width: 300rpx; + height: 300rpx; + margin: 0 auto; + +} + +.espan{ + font-size: 32rpx; + margin-top: 10rpx; +} + +.erweima{ + margin-top: 10rpx; + display: flex; + width: 100%; + +} + +.erzhou{ + width: 200rpx; + + + margin-right: 20rpx; +} + +.erzhou image{ + background-color: blanchedalmond; + width: 200rpx; + height: 200rpx; +} + + +.eright{ + width: 500rpx; + font-size: 32rpx; + +} + + + +.ecc{ + float: right; + margin-right: 48rpx; +} + + +.eee{ + padding-top:40rpx; + +width:90%; +height:70%; + +padding-left:32rpx; +margin-left:20rpx; + +background-color:white; + +} + +.clear{ + clear: both; +} + +.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: #000; + 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: #000; + 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; +} + +.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; +} + +.pt_status_set{ + position: absolute; right: 10rpx; top:50rpx; width: 120rpx; height: 120rpx; +} + + + +.xc-goods-details{ +width:479rpx; +margin-top:20rpx; +height:77rpx; +} + +.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; + +} +.xc-ellipsis-img{ +width:56rpx; +height:96rpx; + +} +.xc-ellipsis-img .pictures{ + width:56rpx;height:56rpx; +} +.flex_tou{ display: flex; justify-content: center; width: 100%;} +.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-ladder .xc-img-frame{ + width:201rpx; + height: 105rpx; + margin-top:20rpx; +} +.xc-ptcomplete-ladder .xc-img-frame .img{ + width: 105rpx; + height: 105rpx; + float: right; + padding-right:6rpx; +} +.xc-ptcomplete .xc-img-frame{ + width:190rpx; + height: 105rpx; + margin-top:20rpx; +} +.xc-ptcomplete .xc-end{ + width:283rpx; +text-align:right; +} +.iw{ +padding-right:33rpx; +} +.xc-ptcomplete .xc-img-frames{ + width:360rpx; +height:105rpx; +margin-top:20rpx; + +} +.xc-ptcomplete .xc-img-frames .img{ + width: 105rpx; + height: 105rpx; + float: right; + padding-right:6rpx; +} +.xc-home-page-frame{ + padding-top:16rpx; + +} +.xc-home-page-frame .xc-home-page{ + background-color: #e22b44;border-radius:15rpx; +width:90%; +color:#fff; +height:60rpx; +font-size:26rpx; +line-height:60rpx; +} +/* */ +.xc-people-val{ + padding-left:8rpx; +padding-right:8rpx; +} +.xc-onclik{ + width:100%; +height:70rpx; + +} +.xc-green{ + color: #18ba5f; + text-align:center; +flex-grow:1; +height:90rpx; + + +} +.xc-ptcomplete-ladder{ + width:74%; +height:105rpx; +line-height:105rpx; +float:right; +} +.xc-fail-ladder{ + width:61%; +height:105rpx; +line-height:105rpx; +float:right; + +} +.xc-fail-ladder .xc-img-frame{ + width:61%; +height:105rpx; +margin-top:20rpx; +} +.xc-fail-ladder .xc-img-frame .img{ + width: 105rpx; + height: 105rpx; + float: right; + padding-right:6rpx; +} +.xc-list{ + background-color:#e22b44; +color:white; +font-size:17rpx; +border-radius:6rpx; +padding:0 5rpx; +position:absolute; +top:13rpx; +left:80rpx; +width:34rpx; +line-height:25rpx; + +} + +.xc-linellae-frame{ + width: 100%; + height: 60rpx; + background: #eee; +} +.xc-linellae-frame .xc-linellae{ + width: 425rpx; + height: 1rpx; + border-bottom: 1rpx solid #a5a5a5; +} +.xc-recommend-frame{ +background:#eee; +width:200rpx; +height:100%; + +} +.xc-recommend-frame .xc-recommend{ + width: 35rpx; + height: 27rpx; + margin-top:7rpx; +} +.xc-recommend-frame .xc-recommend-word{ +font-size:26rpx; +color: #a9a9a9; +margin-left:5rpx; +} +.xc-rmbs{ + +height:40rpx; +} +.xc-shuoming{ + padding-left:10rpx; +} + + +.poster-container { + box-sizing: border-box; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: calc(100% - 210rpx); + z-index: 1000; +} +.mask { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + background-color: rgba(0,0,0,.4); +} +.poster-wrapper { + width: 100%; +} + +.poster { + box-sizing: border-box; + width: 100%; + height: 905rpx; + border-radius: 20rpx; + /* box-shadow: 0 8px 12px #666; */ + position: relative; + z-index: 999; + overflow: hidden; +} +.poster-img { + display: block; + width: 100%; + height: 100%; +} +.btn-container { + display: flex; + justify-content: space-around; +} +.btn-share { + display: block; + background-color: #FE6867; + color: white; + border-radius: 8rpx; + line-height: 80rpx; + margin-top: 28rpx; + padding: 0 60rpx; +} + + +.btn-close { + /* background-color: rgba(0,0,0,.5); */ + color: #ccc; + width: 50rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; + border-radius: 50%; + position: absolute; + right: 20rpx; + top: 20rpx; +} + +.icon-close { + font-size: 48rpx; +} \ No newline at end of file diff --git a/packageB/pages/zuhegou/index/index.wxss b/packageB/pages/zuhegou/index/index.wxss index 2577190..a2ca988 100644 --- a/packageB/pages/zuhegou/index/index.wxss +++ b/packageB/pages/zuhegou/index/index.wxss @@ -338,7 +338,7 @@ page { } /* 门店分类列表 */ .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageB/pages/zuhegou/preindex/index.wxss b/packageB/pages/zuhegou/preindex/index.wxss index f9e3077..24e1c0d 100644 --- a/packageB/pages/zuhegou/preindex/index.wxss +++ b/packageB/pages/zuhegou/preindex/index.wxss @@ -334,7 +334,7 @@ page { } /* 门店分类列表 */ .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss index b67b9b9..c0ea42b 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss @@ -2574,7 +2574,7 @@ line-height: 38rpx; } /* 门店分类列表 */ .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.wxss b/packageC/pages/presell/goodsInfo/goodsInfo.wxss index bff91ce..24d9bd8 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.wxss +++ b/packageC/pages/presell/goodsInfo/goodsInfo.wxss @@ -2570,7 +2570,7 @@ line-height: 38rpx; } /* 门店分类列表 */ .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/packageC/pages/presell/list/list.js b/packageC/pages/presell/list/list.js index 5dac02b..562f4f1 100644 --- a/packageC/pages/presell/list/list.js +++ b/packageC/pages/presell/list/list.js @@ -68,6 +68,14 @@ Page({ if (room_user_share) getApp().globalData.room_user_share = room_user_share; } + + if(this.data.act_id){ + getApp().promiseGet("/api/weshop/marketing/marketingPresellForm/get/"+os.stoid+"/"+this.data.act_id,{}).then(res=>{ + if(res.data.code==0) + th.data.pre_act=res.data.data + }) + } + }, onShow: function (t) { var userInfo=getApp().globalData.userInfo; @@ -260,8 +268,16 @@ Page({ } var url = "/packageC/pages/presell/list/list"; + + if(this.data.act_id){ + url += "?act_id=" + this.data.act_id; + } if (getApp().globalData.user_id) { - url += "&first_leader=" + getApp().globalData.user_id; + + if(url.indexOf("?")==-1) + url += "?first_leader=" + getApp().globalData.user_id; + else + url += "&first_leader=" + getApp().globalData.user_id; } //-- 如果房间分享,且不是会员分享的 -- if (getApp().globalData.room_id && @@ -271,13 +287,18 @@ Page({ url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1"; } - var ob = { - title: "预售列表", path: url, - }; + var ob={}; + if(this.data.pre_act){ + ob = { title: this.data.pre_act.share_title, path: url,imageUrl:os.imghost+this.data.pre_act.share_img }; + }else{ - if(img){ - ob.imageUrl=img; + ob = { title: "预售列表", path: url, }; + if(img){ + ob.imageUrl=img; + } } + + return ob; } diff --git a/packageC/pages/presell/pregoodsInfo/goodsInfo.wxss b/packageC/pages/presell/pregoodsInfo/goodsInfo.wxss index bff91ce..24d9bd8 100644 --- a/packageC/pages/presell/pregoodsInfo/goodsInfo.wxss +++ b/packageC/pages/presell/pregoodsInfo/goodsInfo.wxss @@ -2570,7 +2570,7 @@ line-height: 38rpx; } /* 门店分类列表 */ .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js index e4d7082..47c4498 100644 --- a/pages/cart/cart2/cart2.js +++ b/pages/cart/cart2/cart2.js @@ -173,7 +173,7 @@ Page({ is_no_by: {}, is_by: {}, send_gf: {}, - send_lb:{}, + send_lb: {}, }) }, @@ -453,7 +453,7 @@ Page({ //要把优惠活动加入,prom_goods_map中,赠品不要运算 if (item1.prom_type == 3 && item1.is_gift != 1) { - th.check_is_youhui(item1.goods_id, item1.pick_id); + // th.check_is_youhui(item1.goods_id, item1.pick_id); await th.add_prom_goods_map(item1); } @@ -916,7 +916,7 @@ Page({ t.data.data.prom_id = gg.prom_id; t.data.data.prom_type = 3; //如果是优惠活动,就要调用活动,计算价格 - th.check_is_youhui(gg.goods_id,gg.pick_id); + // th.check_is_youhui(gg.goods_id, gg.pick_id); th.buy_now_prom_goods(gg.prom_id, t.data.data, function (data) { //判断一下购买商品的数量是不是超过 if (data.gift_goods_id && (!data.zp_mode || parseInt(data.zp_mode) == 0)) { @@ -1213,7 +1213,8 @@ Page({ item_map.s_intValue = get_data.intValue; item_map.s_coupon_id = get_data.coupon_id; item_map.s_coupon_num = get_data.coupon_num; - + item_map.lbtitle = get_data.lbtitle; + item_map.zxlbtitle = get_data.zxlbtitle; if (get_data.gift_id && parseInt(get_data.zp_mode) != 1 && get_data.zp_num * item_map.bs <= get_data.limit_num @@ -1364,22 +1365,22 @@ Page({ if (item_map.s_libao) { if (!cart_item.s_libao) { cart_item.s_libao = item_map.s_libao + ""; - cart_item.g_lb_num = [{ 'l_id': item_map.s_libao, "num": item_map.s_lb_num }]; + cart_item.g_lb_num = [{ 'l_id': item_map.s_libao, "num": item_map.s_lb_num, 'lbtitle': item_map.lbtitle }]; } else { cart_item.s_libao += "," + item_map.s_libao; - cart_item.g_lb_num.push({ 'l_id': item_map.s_libao, "num": item_map.s_lb_num }) + cart_item.g_lb_num.push({ 'l_id': item_map.s_libao, "num": item_map.s_lb_num, 'lbtitle': item_map.lbtitle }) } } if (item_map.zx_libao) { if (!cart_item.zx_libao) { cart_item.zx_libao = item_map.zx_libao + ""; - cart_item.g_zxlb_num = [{ 'l_id': item_map.zx_libao, "num": item_map.zx_lb_num }]; + cart_item.g_zxlb_num = [{ 'l_id': item_map.zx_libao, "num": item_map.zx_lb_num, 'zxlbtitle': item_map.zxlbtitle }]; } else { cart_item.zx_libao += "," + item_map.zx_libao; - cart_item.g_zxlb_num.push({ 'l_id': item_map.zx_libao, "num": item_map.zx_lb_num }) + cart_item.g_zxlb_num.push({ 'l_id': item_map.zx_libao, "num": item_map.zx_lb_num, 'zxlbtitle': item_map.zxlbtitle }) } } } @@ -1390,7 +1391,7 @@ Page({ var arr = Object.keys(send_gf); var arr2 = Object.keys(th.data.send_gf); if (arr2.length > 0) return false; - + th.calclate_lbNum(c_arr); if (arr.length > 0) { th.setData({ send_gf: send_gf }) } else { @@ -1398,6 +1399,60 @@ Page({ } }, + calclate_lbNum(r_data) { + let send_lb = this.data.send_lb; + //g_lb_num我的礼包 g_zxlb_num专享礼包 + r_data.forEach(r_d => { + let arr = []; + if (r_d.g_zxlb_num) { + let g_lb = r_d.g_zxlb_num; + for (let i = 0; i < g_lb.length; i++) { + let item = g_lb[i]; + let new_lb = g_lb.filter(lb => { + return item.l_id === lb.l_id; + }); + if (new_lb.length == 1) { + arr.push(item); + } else { + item.num = new_lb.reduce((pre, next) => { + return pre + next.num; + }, 0); + arr.push(item); + g_lb = g_lb.filter(ii => { + return ii.l_id !== item.l_id; + }); + } + send_lb[r_d.pickup_id] = arr; + } + } + if (r_d.g_lb_num) { + let zx_lb = r_d.g_lb_num; + for (let i = 0; i < zx_lb.length; i++) { + let item = zx_lb[i]; + item.flag = 1; + let new_lb = zx_lb.filter(lb => { + return item.l_id === lb.l_id; + }); + if (new_lb.length == 1) { + arr.push(item); + } else { + item.num = new_lb.reduce((pre, next) => { + return pre + next.num; + }, 0); + arr.push(item); + zx_lb = zx_lb.filter(ii => { + return ii.l_id !== item.l_id; + }); + } + send_lb[r_d.pickup_id] = arr; + } + } + }) + this.setData({ + send_lb, + }) + + }, //-------------------计算订单价格------------------- calculatePrice: function (t, s) { @@ -4099,7 +4154,8 @@ Page({ } arr.s_libao = get_data.libao; arr.s_lb_num = get_data.lb_num; - + arr.lbtitle = get_data.lbtitle; + arr.zxlbtitle = get_data.zxlbtitle; arr.zx_libao = get_data.zxlibao; arr.zx_lb_num = get_data.zxlb_num; @@ -4195,7 +4251,6 @@ Page({ ob.is_xz_yh = prom.is_xz_yh; ob.goods = new Array(); ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); - var obj = {}; obj[item.prom_id] = ob; map[pickid] = obj; @@ -4203,87 +4258,78 @@ Page({ } }, //---检查有没有优惠活动--- - check_is_youhui: function (gid, pick_id) { - let th = this; - let user_id = getApp().globalData.user_id; - let send_lb = th.data.send_lb; - if (!user_id) user_id = 0; - //调用接口判断订单优惠, - getApp().request.get("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + gid + "/0" + "/" + user_id, { - success: function (res) { - if (res.data.code == 0 && res.data.data) { - let r_data = res.data.data.promGoodsLists.filter(lb => { - return lb.lb_id ?? lb.zxlb_id; - }); - r_data.forEach(item => { - if (send_lb[pick_id]) { - for (let i = 0; i < send_lb[pick_id].length; i++) { - let sends = send_lb[pick_id][i]; + check_is_youhui: function (r_data, pick_id) { + let send_lb = this.data.send_lb; + let lodash = null; + r_data.forEach(item => { + if (send_lb[pick_id]) { + for (let i = 0; i < send_lb[pick_id].length; i++) { + let sends = send_lb[pick_id][i]; + if (item.lb_id) { + if (sends.id === item.lb_id) { + sends['num']++; + } else { + let send_arr1 = send_lb[pick_id].filter(ii => ii.id === item.lb_id); + if (send_arr1.length == 0) { if (item.lb_id) { - if (sends.id === item.lb_id) { - sends['num']++; - } else { - let send_arr1 = send_lb[pick_id].filter(ii=>ii.id === item.lb_id); - if (send_arr1.length == 0) { - if (item.lb_id) { - let ob = {}; - ob.num = 1; - ob.title = item.lbtitle; - ob.id = item.lb_id; - send_lb[pick_id].push(ob); - break; - } - } - - } - } - if (item.zxlb_id) { - if (sends.id === item.zxlb_id) { - sends['num']++; - } else { - let send_arr = send_lb[pick_id].filter(ii=>ii.id === item.zxlb_id); - if (send_arr.length == 0) { - if (item.zxlb_id) { - let ob = {}; - ob.num = 1; - ob.flag = 1; - ob.title = item.zxlbtitle; - ob.id = item.zxlb_id; - send_lb[pick_id].push(ob); - break; - } - } - } + let ob = {}; + ob.num = 1; + ob.title = item.lbtitle; + ob.id = item.lb_id; + lodash.push(ob); + // break; } } + } + } + if (item.zxlb_id) { + if (sends.id === item.zxlb_id) { + sends['num']++; } else { - let arr = new Array(); - if (item.lb_id) { - let ob = {}; - ob.num = 1; - ob.title = item.lbtitle; - ob.id = item.lb_id; - arr.push(ob); - } - if (item.zxlb_id) { - let ob = {}; - ob.num = 1; - ob.flag = 1; - ob.title = item.zxlbtitle; - ob.id = item.zxlb_id; - arr.push(ob); + let send_arr = send_lb[pick_id].filter(ii => ii.id === item.zxlb_id); + if (send_arr.length == 0) { + if (item.zxlb_id) { + let ob = {}; + ob.num = 1; + ob.flag = 1; + ob.title = item.zxlbtitle; + ob.id = item.zxlb_id; + lodash.push(ob); + // break; + } } - send_lb[pick_id] = arr; } - }) - th.setData({ - send_lb, - }) + } + } + } else { + let arr = new Array(); + if (item.lb_id) { + let ob = {}; + ob.num = 1; + ob.title = item.lbtitle; + ob.id = item.lb_id; + arr.push(ob); + } + if (item.zxlb_id) { + let ob = {}; + ob.num = 1; + ob.flag = 1; + ob.title = item.zxlbtitle; + ob.id = item.zxlb_id; + arr.push(ob); } + send_lb[pick_id] = arr; + lodash = JSON.parse(JSON.stringify(send_lb[pick_id])); } }) + send_lb[pick_id] = lodash; + th.setData({ + send_lb, + }) + + }, //计算立即购买赠品的物流费用 diff --git a/pages/cart/cart2/cart2.wxml b/pages/cart/cart2/cart2.wxml index 9526ed4..d80a6ae 100644 --- a/pages/cart/cart2/cart2.wxml +++ b/pages/cart/cart2/cart2.wxml @@ -182,7 +182,7 @@ - {{send.title}} + {{send.zxlbtitle?send.zxlbtitle:send.lbtitle}} @@ -359,18 +359,28 @@ - - - + + - {{send.title}} + {{bn_goods.lbtitle}} - x{{send.num}} + x{{bn_goods.s_lb_num}} + + + + + + + + {{bn_goods.zxlbtitle}} + + + + x{{bn_goods.zx_lb_num}} - diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml index 6c467ff..57948bd 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxml +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml @@ -1,3 +1,4 @@ + @@ -20,7 +21,7 @@ 我的礼包 - + @@ -48,8 +49,11 @@ {{"零售价:¥"+items.giftPosPrice}} - - {{"活动结束时间:"+items.endTime}} + + {{"活动开始时间:"+items.starTime}} + + + {{"活动结束时间:"+items.endTime}} @@ -57,7 +61,7 @@ {{"已售:"+items.giftQty+"件"}} - + @@ -91,8 +95,8 @@ - - 活动还未开始 + + diff --git a/pages/giftpack/public/buy_com.js b/pages/giftpack/public/buy_com.js index 95adf88..6013fb5 100644 --- a/pages/giftpack/public/buy_com.js +++ b/pages/giftpack/public/buy_com.js @@ -227,7 +227,7 @@ module.exports = { json.guide_id=that.data.guide_id } - if(that.data.def_pick_store){ + if(th.data.sele_g.is_pickup && that.data.def_pick_store){ json.pickup_id=that.data.def_pick_store.pickup_id; } diff --git a/pages/goods/goodsInfo/goodsInfo.wxss b/pages/goods/goodsInfo/goodsInfo.wxss index f7c4e64..027b2d2 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxss +++ b/pages/goods/goodsInfo/goodsInfo.wxss @@ -3447,7 +3447,7 @@ margin: auto; */ /* 门店分类列表 */ .sort_store_list { - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss index 8b248d8..6183737 100644 --- a/pages/index/index/index.wxss +++ b/pages/index/index/index.wxss @@ -1028,7 +1028,7 @@ page { .container.nor{ - padding-top: 80rpx; + padding-top: 140rpx; } /* page, diff --git a/pages/team/team_show/team_show.wxss b/pages/team/team_show/team_show.wxss index 75fa735..34fe160 100644 --- a/pages/team/team_show/team_show.wxss +++ b/pages/team/team_show/team_show.wxss @@ -2178,7 +2178,7 @@ page { .sort_store_list{ - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/pages/user/index/filter.wxs b/pages/user/index/filter.wxs index 99a224d..855ef50 100644 --- a/pages/user/index/filter.wxs +++ b/pages/user/index/filter.wxs @@ -8,7 +8,7 @@ var is_close = function (name,c_list) { map['我的权益']="5"; map['联系客服']="6"; map['收藏夹']="7"; - map['附近门店']="8"; + map['我的地址']="8"; map['收入卡包']="9"; map['专享礼包']="10"; map['我的服务']="12"; @@ -19,6 +19,7 @@ var is_close = function (name,c_list) { map['幸运大转盘']="17"; map['幸运购']="18"; map['AI测肤']="20"; + map['附近门店']="21"; var index=map[name]; //我的权益要判断5,和11 diff --git a/pages/user/userinfo/userinfo.wxss b/pages/user/userinfo/userinfo.wxss index dbe1b38..efaf211 100644 --- a/pages/user/userinfo/userinfo.wxss +++ b/pages/user/userinfo/userinfo.wxss @@ -529,7 +529,7 @@ input { /* 门店分类列表 */ .sort_store_list { - height: 82%; + max-height: 700rpx; overflow: hidden; overflow-y: scroll; width: 95%; diff --git a/utils/filter.wxs b/utils/filter.wxs index c5d1959..83c952b 100644 --- a/utils/filter.wxs +++ b/utils/filter.wxs @@ -10,6 +10,13 @@ var filters = { if (!val) return "不限"; return val.replace("00:00:00", ""); }, + gettimestamp: function (date) { + console.log(date); + var timestamp = getDate(date).getTime(); + console.log(timestamp); + timestamp = parseInt(timestamp / 1000) + return timestamp; + }, replace_time2: function (val) { if (val == null || val == undefined || val == '') return ""; @@ -278,5 +285,6 @@ module.exports = { JSONStringify: filters.JSONStringify, count: filters.count, isExpired: filters.isExpired, + gettimestamp: filters.gettimestamp, showStartAndEndDate: filters.showStartAndEndDate, } \ No newline at end of file