Commit 961b43308a4ce679b60e83e3de5a5197c161f7ed
1 parent
b2762e0b
团购列表、幸运购列表
Showing
14 changed files
with
3162 additions
and
8 deletions
app.json
... | ... | @@ -157,7 +157,8 @@ |
157 | 157 | { |
158 | 158 | "root": "packageC/", |
159 | 159 | "name":"pack3", |
160 | - "pages": [ | |
160 | + "pages": [ | |
161 | + "pages/group_list/group_list", | |
161 | 162 | "pages/presell/list/list", |
162 | 163 | "pages/presell/cart/cart", |
163 | 164 | "pages/presell/cart/cart2", |
... | ... | @@ -165,7 +166,9 @@ |
165 | 166 | "pages/presell/goodsInfo/goodsInfo", |
166 | 167 | "pages/goods/distributionCategoryList/index", |
167 | 168 | "pages/goods/goodsList/goodsList", |
168 | - "pages/payForAnother/payForAnother" | |
169 | + "pages/payForAnother/payForAnother", | |
170 | + "pages/luckyGo/luckyGo_list/luckyGo_list", | |
171 | + "pages/luckyGo/luckyGo_details/luckyGo_details" | |
169 | 172 | ] |
170 | 173 | } |
171 | 174 | ... | ... |
app.wxss
... | ... | @@ -37,6 +37,9 @@ |
37 | 37 | .pdt12 { |
38 | 38 | padding-top: 12rpx; |
39 | 39 | } |
40 | +.pdt16 { | |
41 | + padding-top: 16rpx; | |
42 | +} | |
40 | 43 | .pdb10 { |
41 | 44 | padding-bottom: 10rpx; |
42 | 45 | } |
... | ... | @@ -140,9 +143,7 @@ |
140 | 143 | color: #c7c7c7; |
141 | 144 | } |
142 | 145 | |
143 | -.c-7b { | |
144 | - color: #7b7b7b; | |
145 | -} | |
146 | + | |
146 | 147 | |
147 | 148 | .c-d { |
148 | 149 | color: #ddd; |
... | ... | @@ -711,9 +712,9 @@ background: #ffe3e2; |
711 | 712 | /* 图标字体(ty) */ |
712 | 713 | @font-face { |
713 | 714 | font-family: 'iconfont'; /* Project id 2054717 */ |
714 | - src: url('//at.alicdn.com/t/font_2054717_xyebdzzvo1i.woff2?t=1635153304877') format('woff2'), | |
715 | - url('//at.alicdn.com/t/font_2054717_xyebdzzvo1i.woff?t=1635153304877') format('woff'), | |
716 | - url('//at.alicdn.com/t/font_2054717_xyebdzzvo1i.ttf?t=1635153304877') format('truetype'); | |
715 | + src: url('//at.alicdn.com/t/font_2054717_5ibgy0a15gm.woff2?t=1635479077648') format('woff2'), | |
716 | + url('//at.alicdn.com/t/font_2054717_5ibgy0a15gm.woff?t=1635479077648') format('woff'), | |
717 | + url('//at.alicdn.com/t/font_2054717_5ibgy0a15gm.ttf?t=1635479077648') format('truetype'); | |
717 | 718 | } |
718 | 719 | |
719 | 720 | .iconfont { |
... | ... | @@ -724,6 +725,10 @@ background: #ffe3e2; |
724 | 725 | -moz-osx-font-smoothing: grayscale; |
725 | 726 | } |
726 | 727 | |
728 | +.icon-shizhong:before { | |
729 | + content: "\e74f"; | |
730 | +} | |
731 | + | |
727 | 732 | .icon-dingwei:before { |
728 | 733 | content: "\e6b4"; |
729 | 734 | } | ... | ... |
packageC/pages/group_list/group_list.js
0 → 100644
1 | +var e = getApp(), i = e.request, a = e.globalData.setting,os=a,ut = require("../../../utils/util.js"); | |
2 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | |
3 | +const app = getApp(); | |
4 | +let self = null; | |
5 | + | |
6 | +Page({ | |
7 | + | |
8 | + /** | |
9 | + * 页面的初始数据 | |
10 | + */ | |
11 | + data: { | |
12 | + // type:1, | |
13 | + // goodlist: null, | |
14 | + | |
15 | + | |
16 | + list: null, | |
17 | + isLoading: false, // 检测是否已经发送请求,防止重复发送请求 | |
18 | + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 | |
19 | + pageNum: 1, // 当前页数 | |
20 | + }, | |
21 | + | |
22 | + /** | |
23 | + * 生命周期函数--监听页面加载 | |
24 | + */ | |
25 | + onLoad: function (options) { | |
26 | + self = this; | |
27 | + | |
28 | + app.isLogin().then(function(data) {//进入页面前已经授权登录成功 | |
29 | + self.setData({ | |
30 | + userInfo: data, | |
31 | + }); | |
32 | + }); | |
33 | + }, | |
34 | + | |
35 | + /** | |
36 | + * 生命周期函数--监听页面初次渲染完成 | |
37 | + */ | |
38 | + onReady: function () { | |
39 | + | |
40 | + }, | |
41 | + | |
42 | + /** | |
43 | + * 生命周期函数--监听页面显示 | |
44 | + */ | |
45 | + onShow: function () { | |
46 | + if(app.globalData.userInfo) { | |
47 | + if(!this.data.isLogin) { | |
48 | + this.setData({ | |
49 | + userInfo: app.globalData.userInfo, | |
50 | + imghost: app.globalData.setting.imghost, | |
51 | + isLogin: true, | |
52 | + }); | |
53 | + | |
54 | + | |
55 | + let url = '/api/weshop/goods/groupBuy/page'; | |
56 | + let data = { | |
57 | + store_id: app.globalData.setting.stoid, | |
58 | + is_show: 1, | |
59 | + is_end: 0, | |
60 | + timetype:1 | |
61 | + }; | |
62 | + | |
63 | + this.setData({ | |
64 | + list: null, | |
65 | + pageNum: 1, | |
66 | + noMore: false, | |
67 | + }); | |
68 | + | |
69 | + this.getData(true, url, data).then(function() { | |
70 | + self.setData({ | |
71 | + currentData: data, | |
72 | + }); | |
73 | + }); | |
74 | + | |
75 | + // this.data.is_timer=1; | |
76 | + // this.data.ismore=1; | |
77 | + // this.data.is_timer=1; | |
78 | + // this.data.currentPage=1; | |
79 | + var th=this; | |
80 | + // th.setData({goodlist:null,}) | |
81 | + // this.requestSalelist(); | |
82 | + | |
83 | + //设置全局定时器 | |
84 | + th.data.timer = setInterval(function () { | |
85 | + th.countDown(); | |
86 | + },1000); | |
87 | + | |
88 | + | |
89 | + }; | |
90 | + }; | |
91 | + }, | |
92 | + | |
93 | + /** | |
94 | + * 生命周期函数--监听页面隐藏 | |
95 | + */ | |
96 | + onHide: function () { | |
97 | + clearInterval(this.data.timer); | |
98 | + }, | |
99 | + | |
100 | + /** | |
101 | + * 生命周期函数--监听页面卸载 | |
102 | + */ | |
103 | + onUnload: function () { | |
104 | + | |
105 | + }, | |
106 | + | |
107 | + /** | |
108 | + * 页面相关事件处理函数--监听用户下拉动作 | |
109 | + */ | |
110 | + onPullDownRefresh: function () { | |
111 | + | |
112 | + }, | |
113 | + | |
114 | + /** | |
115 | + * 页面上拉触底事件的处理函数 | |
116 | + */ | |
117 | + onReachBottom: function () { | |
118 | + let data = this.data.currentData; | |
119 | + this.scrollToLower('/api/weshop/goods/groupBuy/page', data); | |
120 | + }, | |
121 | + | |
122 | + /** | |
123 | + * 用户点击右上角分享 | |
124 | + */ | |
125 | + onShareAppMessage: function () { | |
126 | + | |
127 | + }, | |
128 | + | |
129 | + | |
130 | + /** | |
131 | + * 请求数据 | |
132 | + */ | |
133 | + getData: function(isInit, url, data) { | |
134 | + let p = app.request.promiseGet(url, { | |
135 | + data: data, | |
136 | + isShowLoading: true, | |
137 | + }) | |
138 | + .then(function(res) { | |
139 | + if(res.data.code == 0) { | |
140 | + | |
141 | + self.setData({ | |
142 | + isLoading: false | |
143 | + }); | |
144 | + | |
145 | + if(isInit) {// 第一次加载 | |
146 | + self.setData({ | |
147 | + list: res.data.data | |
148 | + }); | |
149 | + } else { | |
150 | + self.setData({ | |
151 | + 'list.pageData': self.data.list.pageData.concat(res.data.data.pageData) | |
152 | + }); | |
153 | + }; | |
154 | + | |
155 | + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { | |
156 | + self.setData({ | |
157 | + noMore: true | |
158 | + }); | |
159 | + }; | |
160 | + | |
161 | + } else { | |
162 | + self.setData({ | |
163 | + 'list.pageData': [] | |
164 | + }); | |
165 | + }; | |
166 | + | |
167 | + }); | |
168 | + | |
169 | + return p; | |
170 | + }, | |
171 | + | |
172 | + | |
173 | + /** | |
174 | + * 上拉加载 | |
175 | + */ | |
176 | + scrollToLower(url, requestData) { | |
177 | + // 数据总量 | |
178 | + let total = this.data.list.total; | |
179 | + // 单页最大数据量 | |
180 | + let pageSize = this.data.list.pageSize; | |
181 | + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’ | |
182 | + if((total != 0)&&(total <= pageSize)) { | |
183 | + this.setData({ | |
184 | + noMore: true | |
185 | + }); | |
186 | + }; | |
187 | + | |
188 | + if(!this.data.isLoading && !this.data.noMore) { | |
189 | + this.setData({ | |
190 | + isLoading: true, | |
191 | + pageNum: this.data.pageNum + 1 | |
192 | + }); | |
193 | + requestData.page = this.data.pageNum; | |
194 | + this.getData(false, url, requestData); | |
195 | + }; | |
196 | + }, | |
197 | + | |
198 | + | |
199 | + //---小于10的格式化函数---- | |
200 | + timeFormat(param) { | |
201 | + return param < 10 ? '0' + param : param; | |
202 | + }, | |
203 | + | |
204 | + | |
205 | + //----倒计时函数----- | |
206 | + countDown() { | |
207 | + // if(!this.data.is_timer) return false; | |
208 | + var th=this; | |
209 | + // 获取当前时间,同时得到活动结束时间数组 | |
210 | + let newTime = ut.gettimestamp(); | |
211 | + var endTimeList = this.data.list.pageData; | |
212 | + if(endTimeList == null) return null; | |
213 | + // 对结束时间进行处理渲染到页面 | |
214 | + for(var i = 0; i < endTimeList.length; i++) { | |
215 | + var o = endTimeList[i]; | |
216 | + var endTime = o.end_time; | |
217 | + // if(th.data.type==0) endTime = o.start_time; | |
218 | + let obj = null; | |
219 | + // 如果活动未结束,对时间进行处理 | |
220 | + if (endTime - newTime > 0) { | |
221 | + let time = (endTime - newTime); | |
222 | + // 获取天、时、分、秒 | |
223 | + let day = parseInt(time / (60 * 60 * 24)); | |
224 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
225 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
226 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
227 | + obj = { | |
228 | + day: this.timeFormat(day), hou: this.timeFormat(hou), min: this.timeFormat(min), sec: this.timeFormat(sec), hide: 1 | |
229 | + } | |
230 | + } else { | |
231 | + //活动已结束,全部设置为'00' | |
232 | + obj = { day: '00', hou: '00', min: '00', sec: '00' } | |
233 | + } | |
234 | + var txt ="goodlist["+i+"].djs"; | |
235 | + th.setData({ [txt]: obj}); | |
236 | + } | |
237 | + }, | |
238 | + | |
239 | + | |
240 | + | |
241 | + //图片失败,默认图片 | |
242 | + bind_bnerr2: function (e) { | |
243 | + var _errImg = e.target.dataset.errorimg; | |
244 | + var val = e.target.dataset.val; | |
245 | + if(val!=undefined && val!=null && val!='null' ){ | |
246 | + var _errObj = {}; | |
247 | + _errObj[_errImg] = "/public/images/default_goods_image_240.gif"; | |
248 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
249 | + } | |
250 | + }, | |
251 | + | |
252 | + goto(e) { | |
253 | + let url = e.target.dataset.url; | |
254 | + // console.log('999999',e); | |
255 | + app.goto(url); | |
256 | + }, | |
257 | + | |
258 | + | |
259 | +}) | |
0 | 260 | \ No newline at end of file | ... | ... |
packageC/pages/group_list/group_list.json
0 → 100644
packageC/pages/group_list/group_list.wxml
0 → 100644
1 | +<view class="list"> | |
2 | + <view class="list-item" wx:for="{{list.pageData}}"> | |
3 | + <view class="img-container"> | |
4 | + <image class="img-block" src="{{imghost + item.original_img}}" data-val="{{item.original_img}}" | |
5 | + data-errorimg="list.pageData[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image> | |
6 | + </view> | |
7 | + <view class="mgl20 flex fdc f1 jc_sb"> | |
8 | + <view> | |
9 | + <view class="fs30">{{item.title}}</view> | |
10 | + <view class="flex ai_c"> | |
11 | + <view class="fs26 tag">{{item.rebate}}折</view> | |
12 | + <view class="rmb c-red fs30">{{item.price}}</view> | |
13 | + <view class="rmb del fs24 c-7b pdl10">{{item.market_price}}</view> | |
14 | + </view> | |
15 | + </view> | |
16 | + <view class="flex jc_sb ai-center c-7b"> | |
17 | + <view class="fs24"> | |
18 | + <view>已售{{item.buy_num}}件</view> | |
19 | + <view class=""><text class="iconfont icon-shizhong fs24"></text>{{goodlist[index].djs.day}}天{{goodlist[index].djs.hou}}时{{goodlist[index].djs.min}}分{{goodlist[index].djs.sec}}秒</view> | |
20 | + </view> | |
21 | + <view class="btn" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.id}}&prom_type=2">去团购</view> | |
22 | + </view> | |
23 | + </view> | |
24 | + </view> | |
25 | +</view> | |
26 | + | |
27 | +<view class="no-more" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底啦 ——</view> | |
28 | +<nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata> | ... | ... |
packageC/pages/group_list/group_list.wxss
0 → 100644
1 | +page { | |
2 | + background-color: #f2f2f2; | |
3 | +} | |
4 | + | |
5 | +.list { | |
6 | + padding-left: 20rpx; | |
7 | + padding-right: 20rpx; | |
8 | +} | |
9 | + | |
10 | +.list-item { | |
11 | + background-color: white; | |
12 | + border-radius: 12rpx; | |
13 | + margin-top: 20rpx; | |
14 | + padding: 20rpx; | |
15 | + display: flex; | |
16 | +} | |
17 | + | |
18 | +.tag { | |
19 | + background-color: #ff6768; | |
20 | + color: white; | |
21 | + font-size: 24rpx; | |
22 | + padding-left: 10rpx; | |
23 | + padding-right: 10rpx; | |
24 | +} | |
25 | + | |
26 | +.img-container { | |
27 | + width: 200rpx; | |
28 | + height: 200rpx; | |
29 | +} | |
30 | + | |
31 | +.btn { | |
32 | + background-color: #ff6768; | |
33 | + color: white; | |
34 | + padding: 10rpx 30rpx; | |
35 | + border-radius: 40rpx; | |
36 | + font-size: 26rpx; | |
37 | +} | |
38 | + | |
39 | +.rmb { | |
40 | + position: relative; | |
41 | +} | |
42 | + | |
43 | +.rmb::before { | |
44 | + content: '¥'; | |
45 | + font-size: 24rpx; | |
46 | +} | |
47 | + | |
48 | +.del { | |
49 | + text-decoration: line-through; | |
50 | +} | |
51 | + | |
52 | +.no-more { | |
53 | + font-size: 24rpx; | |
54 | + line-height: 2; | |
55 | + text-align: center; | |
56 | + margin-top: 10rpx; | |
57 | + color: #ccc; | |
58 | +} | |
0 | 59 | \ No newline at end of file | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
0 → 100644
1 | +var t = require("../../../../utils/util.js"), | |
2 | + ut = t, | |
3 | + e = require("../../../../utils/common.js"), | |
4 | + a = require("../../../../utils/wxParse/wxParse.js"), | |
5 | + s = getApp(), | |
6 | + i = s.request, | |
7 | + rq = i, | |
8 | + oo = s.globalData, | |
9 | + o = s.globalData.setting, | |
10 | + os = o; | |
11 | + var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
12 | + | |
13 | +Page({ | |
14 | + data: { | |
15 | + //activity_type:1,//活动类型 商家1 阶梯2 会员3 | |
16 | + p_status:1,//会员团的详细情况 1是正在行 2是成功 3失败 | |
17 | + sf_length: 1,//人数大于5 | |
18 | + | |
19 | + erweima:false, | |
20 | + meng:false, | |
21 | + zk:true, | |
22 | + stoid: o.stoid, | |
23 | + hiddenName: true, | |
24 | + teamlist:null, | |
25 | + teamgroup:null, | |
26 | + goods:null,//商品数据 | |
27 | + pindGoods: null,//拼单数据 | |
28 | + imageurl: o.imghost, | |
29 | + pay_f:0,//支付是否成功 | |
30 | + order_sn:"",//订单编号 | |
31 | + canvasHidden:false, //画画版 | |
32 | + screenWidth:0, | |
33 | + | |
34 | + pd_xx: 0, //弹框 | |
35 | + max_num:0,//最低成团人数 | |
36 | + min_price:0,//最低价格 | |
37 | + is_show:0,//加载完才显示 | |
38 | + | |
39 | + share_img_localpath:"", //分享图片的本地图片 | |
40 | + share_ewm_localpath: "", //分享的二维码本地图片 | |
41 | + share_head:"", //分享头像的本地图片 | |
42 | + | |
43 | + iurl:os.imghost, | |
44 | + ct_price:0,//阶梯团成团价格 | |
45 | + sf_arr:null, | |
46 | + | |
47 | + }, | |
48 | + onLoad: function (t) { | |
49 | + // wx.setNavigationBarTitle({ title: "拼团订单",}) | |
50 | + | |
51 | + var that=this; | |
52 | + var th=this; | |
53 | + //获取用户设备信息,屏幕宽度 | |
54 | + wx.getSystemInfo({ | |
55 | + success: res => { | |
56 | + that.setData({ screenWidth: res.screenWidth }) | |
57 | + } | |
58 | + }) | |
59 | + var pay_f = t.payf, order_sn = t.ordersn; | |
60 | + this.setData({ pay_f: pay_f, order_sn: order_sn}); | |
61 | + this.init(order_sn); | |
62 | + | |
63 | + //-- 自定义海报 -- | |
64 | + getApp().request.promiseGet("/api/weshop/goods/poster/page",{ | |
65 | + data:{store_id:os.stoid, type:1, is_use:1 } | |
66 | + }).then(res=>{ | |
67 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){ | |
68 | + | |
69 | + var poster_data=res.data.data.pageData[0]; | |
70 | + var json_str=poster_data.jsonStr; | |
71 | + if(json_str){ | |
72 | + var json_data=JSON.parse(json_str); | |
73 | + if(json_data.bg_img){ | |
74 | + | |
75 | + //-- 把图片那到本地 -- | |
76 | + wx.getImageInfo({ | |
77 | + src:json_data.bg_img, | |
78 | + success: function(res) { | |
79 | + var path= res.path; | |
80 | + th.setData({share_b_img:path}) | |
81 | + }, | |
82 | + fail: function(res) {} | |
83 | + }); | |
84 | + } | |
85 | + th.setData({poster:json_data}) | |
86 | + } | |
87 | + } | |
88 | + }) | |
89 | + }, | |
90 | + //关闭展开列表 | |
91 | + click:function(e){ | |
92 | + this.setData({ | |
93 | + hiddenName: !this.data.hiddenName, | |
94 | + zk: !this.data.zk, | |
95 | + }) | |
96 | + }, | |
97 | + //打开收起拼团列表 | |
98 | + czk:function(e){ | |
99 | + this.setData({ | |
100 | + zk:!this.data.zk, | |
101 | + hiddenName: !this.data.hiddenName, | |
102 | + }) | |
103 | + }, | |
104 | + //打开蒙板提示 | |
105 | + cmeng:function(e){ | |
106 | + this.setData({ | |
107 | + meng:!this.data.meng, | |
108 | + }) | |
109 | + }, | |
110 | + | |
111 | + //关闭蒙板提示 | |
112 | + cmc:function(e){ | |
113 | + this.setData({ | |
114 | + meng: !this.data.meng, | |
115 | + }) | |
116 | + }, | |
117 | +//打开二维码提示 | |
118 | + cerweima:function(e){ | |
119 | + this.setData({ | |
120 | + meng: !this.data.meng, | |
121 | + erweima: !this.data.erweima, | |
122 | + }) | |
123 | + }, | |
124 | + | |
125 | + cerc:function(e){ | |
126 | + this.setData({ | |
127 | + erweima: !this.data.erweima, | |
128 | + meng: !this.data.meng, | |
129 | + }) | |
130 | + }, | |
131 | + | |
132 | + async init( order_sn) { | |
133 | + | |
134 | + wx.showLoading(); | |
135 | + | |
136 | + var goods_id = 0,//商品ID, | |
137 | + pageteam=null,// | |
138 | + original_img=null ,//商品图片 | |
139 | + order=null,//订单编号 | |
140 | + id = 0,//团购id | |
141 | + pt_listno = "",//团编号 | |
142 | + pt_prom_id = 0, //活动id | |
143 | + ee = this, | |
144 | + team_id = 0,//活动id | |
145 | + ordertx=[],//头像图片 | |
146 | + share_img=null,//分享图片 | |
147 | + teamlist=null,//活动表 | |
148 | + goods=null,//商品 | |
149 | + teamgroup=null,//活動从表 | |
150 | + max_num=0,//最低价格时的成团人数 | |
151 | + p_status=1; | |
152 | + | |
153 | + //--如果商家团的时候--- | |
154 | + await getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { | |
155 | + data: {orderSn:order_sn,storeId:os.stoid } | |
156 | + }) | |
157 | + | |
158 | + //获取order信息根据订单编号order_sn | |
159 | + await getApp().request.promiseGet("/api/weshop/order/page", { | |
160 | + data: { store_id: o.stoid, order_sn: order_sn,} | |
161 | + }).then(res => { | |
162 | + order = res.data.data.pageData[0]; | |
163 | + pt_prom_id = order.pt_prom_id; | |
164 | + pt_listno = order.pt_listno; | |
165 | + }) | |
166 | + | |
167 | + if (this.data.payf || order.pt_status == 3) p_status = 3; //失败 | |
168 | + if (order.pt_status == 2 || order.pt_status == 4 || order.pt_status == 5) | |
169 | + p_status = 2; //成功 | |
170 | + if (order.pt_status < 2 && !this.data.payf) | |
171 | + p_status = 1; //正在进行 | |
172 | + if ( order.pt_status == 6) p_status = 4; //支付尾款失败 | |
173 | + | |
174 | + //多少人参团头像 | |
175 | + await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
176 | + data: { store_id: o.stoid, pt_listno: pt_listno, } | |
177 | + }).then(res => { | |
178 | + ordertx = res.data.data.pageData; | |
179 | + }) | |
180 | + | |
181 | + | |
182 | + var min_price=0; | |
183 | + //获取活动表的信息根据活动pt_prom_id | |
184 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, { | |
185 | + data: { } | |
186 | + }).then(res => { | |
187 | + if (res.data.code==0){ | |
188 | + teamlist = res.data.data; | |
189 | + this.setData({teamlist: teamlist}); | |
190 | + //获取当前时间,并且判断剩余时间 | |
191 | + var nt = ut.gettimestamp(); | |
192 | + teamlist.status = 0; | |
193 | + if (nt >= teamlist.start_time) teamlist.status = 1; | |
194 | + | |
195 | + goods_id = res.data.data.goods_id; | |
196 | + id = res.data.data.id; | |
197 | + share_img = ee.data.imageurl + res.data.data.share_imgurl; | |
198 | + | |
199 | + //----------查看阶梯团------------ | |
200 | + if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined){ | |
201 | + var ct_rylist = JSON.parse(teamlist.ct_rylist); | |
202 | + var max=0; var pri=0; | |
203 | + ct_rylist.forEach(function (val,ind) { | |
204 | + if(val.rynum>max){ | |
205 | + max=val.rynum; | |
206 | + pri = val.price; | |
207 | + } | |
208 | + }) | |
209 | + max_num=max; | |
210 | + min_price=pri; | |
211 | + | |
212 | + } | |
213 | + | |
214 | + | |
215 | + //获取商品信息 | |
216 | + getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, { | |
217 | + }).then(res => { | |
218 | + //商品地址 | |
219 | + original_img = ee.data.imageurl+ res.data.data.original_img, | |
220 | + goods = res.data.data | |
221 | + | |
222 | + ee.setData({goods: goods,image: original_img,}) | |
223 | + | |
224 | + }) | |
225 | + | |
226 | + } | |
227 | + }) | |
228 | + | |
229 | + | |
230 | + //只装5个 | |
231 | + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num; | |
232 | + if(max_num){ | |
233 | + ct_nun=parseInt(max_num); | |
234 | + if (ct_nun < ordertx.length) ct_nun = ordertx.length; | |
235 | + } | |
236 | + | |
237 | + if(ct_nun>5) ct_nun=5; | |
238 | + for(var i=0;i<ct_nun;i++){ | |
239 | + if (i >= ordertx.length) sf_num++ | |
240 | + else | |
241 | + ordertx2.push(ordertx[i]); | |
242 | + } | |
243 | + | |
244 | + var sf_arr=[]; | |
245 | + for (var i=0;i<sf_num;i++){ | |
246 | + sf_arr.push(i); | |
247 | + } | |
248 | + | |
249 | + | |
250 | + | |
251 | + | |
252 | + //获取活动从表信息team_id:305暂时 | |
253 | + await getApp().request.promiseGet("/api/weshop/teamgroup/page" , { | |
254 | + data: { store_id: os.stoid, listno: pt_listno, team_id: pt_prom_id } | |
255 | + }).then(res => { | |
256 | + teamgroup = res.data.data.pageData[0]; | |
257 | + if (teamgroup){ | |
258 | + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss"); | |
259 | + teamgroup.buy_start_date=buy_start_date; | |
260 | + } | |
261 | + }) | |
262 | + | |
263 | + | |
264 | + var ct_price = 0, | |
265 | + num_0 = ordertx.length; | |
266 | + if (teamlist.kttype == 3){ | |
267 | + var js_data = JSON.parse(teamlist.ct_rylist); | |
268 | + js_data.forEach(function (val,ind) { | |
269 | + if (num_0<=val.rynum && ct_price==0){ | |
270 | + ct_price=val.price; | |
271 | + } | |
272 | + }) | |
273 | + if(ct_price==0) ct_price=min_price; | |
274 | + } | |
275 | + | |
276 | + //获取大家都在团信息 | |
277 | + getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { | |
278 | + data:{page:1,pageSize:2} | |
279 | + }).then(res => { | |
280 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
281 | + pageteam = res.data.data.pageData; | |
282 | + ee.setData({pageteam: pageteam,}) | |
283 | + } | |
284 | + | |
285 | + }) | |
286 | + | |
287 | + //--当是成团的时候的操作-- | |
288 | + if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){ | |
289 | + //设置值 | |
290 | + | |
291 | + ee.setData({ | |
292 | + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, min_price: min_price, | |
293 | + order: order, share_img: share_img,max_num:max_num, | |
294 | + pindGoods: teamlist,is_show:1, zk:false, | |
295 | + hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr}); | |
296 | + | |
297 | + //--是否支付了尾款-- | |
298 | + if(order.pt_status==4 || order.pt_status==5){ | |
299 | + ee.setData({is_pay_wk:1}); | |
300 | + } | |
301 | + }else{ | |
302 | + console.log("239什么鬼", teamlist); | |
303 | + //设置值 | |
304 | + ee.setData({ | |
305 | + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, | |
306 | + order: order, p_status: p_status, min_price:min_price, | |
307 | + share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1, | |
308 | + ct_price: ct_price, p_status: p_status,sf_arr:sf_arr}); | |
309 | + } | |
310 | + | |
311 | + wx.hideLoading(); | |
312 | + | |
313 | + wx.setNavigationBarTitle({ | |
314 | + title: "拼团详情", | |
315 | + }) | |
316 | + | |
317 | + ee.countDown2(); | |
318 | + | |
319 | + //获取分享图片的本地地址 | |
320 | + var path2 = os.imghost + teamlist.share_imgurl; | |
321 | + wx.getImageInfo({ | |
322 | + src: path2, | |
323 | + success: function (res) { | |
324 | + //res.path是网络图片的本地地址 | |
325 | + ee.data.share_img_localpath = res.path; | |
326 | + }, | |
327 | + fail: function (res) { | |
328 | + //失败回调 | |
329 | + } | |
330 | + }); | |
331 | + | |
332 | + | |
333 | + }, | |
334 | + //---小于10的格式化函数---- | |
335 | + timeFormat(param) { | |
336 | + return param < 10 ? '0' + param : param; | |
337 | + }, | |
338 | + countDown2() { | |
339 | + var th = this; | |
340 | + // 获取当前时间,同时得到活动结束时间数组 | |
341 | + var newTime = ut.gettimestamp(); | |
342 | + var o = this.data.teamgroup; | |
343 | + if(!o) return false; | |
344 | + | |
345 | + var endTime = o.kt_end_time; | |
346 | + if (o.status == 0) endTime = o.start_time; | |
347 | + | |
348 | + //看一下,是否要支付尾款 | |
349 | + if(o.team_type==3 && th.data.order.pt_status==2){ | |
350 | + endTime = o.wk_end_time; | |
351 | + } | |
352 | + | |
353 | + let obj = null; | |
354 | + // 如果活动未结束,对时间进行处理 | |
355 | + if (endTime - newTime > 0) { | |
356 | + let time = (endTime - newTime); | |
357 | + // 获取天、时、分、秒 | |
358 | + let day = parseInt(time / (60 * 60 * 24)); | |
359 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
360 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
361 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
362 | + obj = { | |
363 | + day: this.timeFormat(day), | |
364 | + hou: this.timeFormat(hou), | |
365 | + min: this.timeFormat(min), | |
366 | + sec: this.timeFormat(sec) | |
367 | + } | |
368 | + } else { | |
369 | + //活动已结束,全部设置为'00' | |
370 | + obj = { | |
371 | + day: '00', | |
372 | + hou: '00', | |
373 | + min: '00', | |
374 | + sec: '00' | |
375 | + } | |
376 | + } | |
377 | + var txt = "pindGoods.djs"; | |
378 | + th.setData({ | |
379 | + obj: obj | |
380 | + }); | |
381 | + setTimeout(th.countDown2, 1000); | |
382 | + }, | |
383 | + | |
384 | + //--定义的保存图片方法,分享团--- | |
385 | + saveImageToPhotosAlbum: function () { | |
386 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 | |
387 | + var type=1; | |
388 | + if(this.data.teamlist.kttype==3) type=2; | |
389 | + | |
390 | + wx.showLoading({ title: '生成中...', }) | |
391 | + var that = this, th = that; | |
392 | + //设置画板显示,才能开始绘图 | |
393 | + that.setData({ | |
394 | + canvasHidden: true, | |
395 | + }) | |
396 | + | |
397 | + if(this.data.share_hidden) { | |
398 | + this.setData({ | |
399 | + share_hidden: false, | |
400 | + }); | |
401 | + }; | |
402 | + | |
403 | + var app = getApp(); | |
404 | + var unit = that.data.screenWidth / 750 * 1.35; | |
405 | + var scene=th.data.teamgroup.id; | |
406 | + var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0; | |
407 | + if(user_id>0){ | |
408 | + scene+="_"+user_id; | |
409 | + } | |
410 | + | |
411 | + //二微码 | |
412 | + var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+ | |
413 | + os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show"; | |
414 | + | |
415 | + //读取文件成功则OK-- | |
416 | + wx.getImageInfo({ | |
417 | + src: path3, | |
418 | + success:function (res) { | |
419 | + //回调写法 | |
420 | + th.get_head_temp(th.get_goods_temp,function () { | |
421 | + var vpath = res.path; | |
422 | + var context = wx.createCanvasContext('share'); | |
423 | + | |
424 | + | |
425 | + //先画背景 | |
426 | + var pg_path = "../../../images/share/share_bg.png"; | |
427 | + //-- 如果有自定义海报的时候,判断背景的图片 -- | |
428 | + if(th.data.share_b_img){ | |
429 | + pg_path=th.data.share_b_img; | |
430 | + } | |
431 | + | |
432 | + var share_title=th.data.teamlist.share_title; | |
433 | + if(!share_title) | |
434 | + share_title=th.data.teamlist.title; | |
435 | + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | |
436 | + | |
437 | + //-- 是自定义海报的情况下 -- | |
438 | + if(th.data.poster && parseInt(th.data.poster.style)==2){ | |
439 | + //在线上分享人的情况下 | |
440 | + if(parseInt(th.data.poster.show_headpic)){ | |
441 | + //获取坐标 | |
442 | + var x=parseFloat(th.data.poster.head_x)*2; | |
443 | + var y=parseFloat(th.data.poster.head_y)*2; | |
444 | + var x1=(x+90) *unit; | |
445 | + var y1=(y+50) *unit; | |
446 | + //--昵称--- | |
447 | + context.setFontSize(24 * unit) | |
448 | + context.setFillStyle("black") | |
449 | + context.fillText(app.globalData.userInfo.nickname, x1, y1); | |
450 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | |
451 | + //强烈推荐 改许程 | |
452 | + var tj_path = "../../../images/share/q_tj.png"; | |
453 | + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); | |
454 | + context.setFontSize(16 * unit) | |
455 | + context.setLineJoin('round'); //交点设置成圆角 | |
456 | + context.setFillStyle("white") | |
457 | + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); | |
458 | + } | |
459 | + | |
460 | + }else{ | |
461 | + //--昵称--- | |
462 | + context.setFontSize(24 * unit) | |
463 | + context.setFillStyle("black") | |
464 | + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); | |
465 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; | |
466 | + //强烈推荐 | |
467 | + var tj_path = "../../../images/share/q_tj.png"; | |
468 | + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit); | |
469 | + context.setFontSize(18 * unit) | |
470 | + context.setFillStyle("white") | |
471 | + context.fillText('强烈推荐', 152 * unit + width + 20 * unit, 76 * unit); | |
472 | + } | |
473 | + | |
474 | + | |
475 | + //---产品名称--- | |
476 | + context.setFontSize(21.3 * unit); | |
477 | + context.setFillStyle("black"); | |
478 | + | |
479 | + | |
480 | + | |
481 | + | |
482 | + th.draw_Text(context,share_title, | |
483 | + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); | |
484 | + //------产品的价格------- | |
485 | + context.setFontSize(24 * unit) | |
486 | + context.setFillStyle("red") | |
487 | + | |
488 | + var pri0 = th.data.teamlist.price; | |
489 | + pri0=parseFloat(pri0).toFixed(2); | |
490 | + var wd1=th.data.screenWidth-ut.measureText(pri0, 31 * unit)-25; | |
491 | + context.fillText("¥", wd1-15, 180 * unit); | |
492 | + context.setFontSize(31 * unit) | |
493 | + context.fillText(pri0, wd1, 180 * unit); | |
494 | + | |
495 | + //---市场价划掉--- | |
496 | + context.setFillStyle("gray") | |
497 | + context.setFontSize(22 * unit) | |
498 | + pri0= "¥" + parseFloat(th.data.goods.market_price).toFixed(2); | |
499 | + var wd2=th.data.screenWidth-ut.measureText(pri0, 22 * unit)-25; | |
500 | + context.fillText(pri0, wd2, 210 * unit); | |
501 | + | |
502 | + context.setStrokeStyle('gray') | |
503 | + context.setLineWidth(1 * unit) | |
504 | + context.moveTo(wd2-5, 204 * unit) | |
505 | + context.lineTo(wd2+ut.measureText(pri0, 22 * unit)+5, 204 * unit) | |
506 | + context.stroke(); | |
507 | + console.log(th.data.share_img_localpath); | |
508 | + | |
509 | + | |
510 | + //---中间大图--- | |
511 | + context.drawImage(th.data.share_img_localpath, 68 * unit, 242 * unit, 410 * unit, 410 * unit); | |
512 | + | |
513 | + var g_ct=th.data.teamlist.ct_num-th.data.ordertx.length; | |
514 | + var wz= ""; | |
515 | + if(g_ct>0) wz="还差"+g_ct+"人成团,"; | |
516 | + else{ | |
517 | + g_ct= th.data.max_num -th.data.ordertx.length; | |
518 | + if(g_ct>0){ | |
519 | + wz="还差"+g_ct+"人享最低优惠,"; | |
520 | + }else{ | |
521 | + wz="已享受最优惠,"; | |
522 | + } | |
523 | + } | |
524 | + | |
525 | + //-------大图后面就不一样了----------- | |
526 | + switch (type) { | |
527 | + case 1://会员团和商家团的展示 | |
528 | + //---画线--- | |
529 | + context.setLineWidth(1 * unit) | |
530 | + context.moveTo(32 * unit, 670 * unit) | |
531 | + context.lineTo(520 * unit, 670 * unit) | |
532 | + context.stroke(); | |
533 | + | |
534 | + //---文字--- | |
535 | + context.setFontSize(22 * unit) | |
536 | + context.setFillStyle("black") | |
537 | + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit); | |
538 | + | |
539 | + //绘制成团图片 | |
540 | + var ct_img ="../../../images/share/ct_num.png"; | |
541 | + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); | |
542 | + var ct_num = th.data.teamlist.ct_num; | |
543 | + context.setFontSize(14 * unit) | |
544 | + | |
545 | + context.setFillStyle("red") | |
546 | + if(ct_num<10){ | |
547 | + context.fillText(ct_num+"人拼团", 92 * unit, 760 * unit); | |
548 | + }else{ | |
549 | + context.fillText(ct_num+"人拼团", 86 * unit, 760 * unit); | |
550 | + } | |
551 | + context.setFontSize(22 * unit) | |
552 | + context.fillText("已拼"+th.data.teamlist.buy_num+"份", 166 * unit, 763 * unit); | |
553 | + context.setFillStyle("gray") | |
554 | + context.fillText(wz+"快来和我一起拼团吧!", 40 * unit, 826 * unit); | |
555 | + context.setFillStyle("black") | |
556 | + | |
557 | + context.setFontSize(22 * unit) | |
558 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit); | |
559 | + //---二维吗图--- | |
560 | + //-- 自定义海报 -- | |
561 | + if(th.data.poster){ | |
562 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | |
563 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | |
564 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | |
565 | + }else{ | |
566 | + //---二维吗图--- | |
567 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | |
568 | + } | |
569 | + break | |
570 | + case 2://阶梯团的展示 | |
571 | + //---画线--- | |
572 | + context.setLineWidth(1 * unit) | |
573 | + context.moveTo(32 * unit, 670 * unit) | |
574 | + context.lineTo(520 * unit, 670 * unit) | |
575 | + context.stroke(); | |
576 | + //---文字--- | |
577 | + context.setFontSize(22 * unit) | |
578 | + context.setFillStyle("black") | |
579 | + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit); | |
580 | + //---绘制中间阶梯的价格--- | |
581 | + var list= JSON.parse(th.data.teamlist.ct_rylist); | |
582 | + for(var i=0; i<list.length;i++){ | |
583 | + var item=list[i]; | |
584 | + var wi=i*90*unit; | |
585 | + context.setFontSize(16 * unit) | |
586 | + context.setFillStyle("red") | |
587 | + context.fillText("¥", 40 * unit+wi, 756 * unit); | |
588 | + context.setFontSize(22 * unit) | |
589 | + var pri=parseFloat(item.price).toFixed(2); | |
590 | + context.fillText(pri, 56 * unit+wi, 756 * unit); | |
591 | + context.setFillStyle("gray") | |
592 | + context.fillText("满"+item.rynum+"人", 40 * unit+wi, 786 * unit); | |
593 | + } | |
594 | + | |
595 | + //----------------下面部分---------------- | |
596 | + context.setFillStyle("gray") | |
597 | + context.fillText(wz+"快来和我一起拼团吧!", 40 * unit, 830 * unit); | |
598 | + context.setFillStyle("black") | |
599 | + context.setFontSize(22 * unit) | |
600 | + | |
601 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); | |
602 | + //---二维吗图--- | |
603 | + //-- 自定义海报 -- | |
604 | + if(th.data.poster){ | |
605 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | |
606 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | |
607 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | |
608 | + }else{ | |
609 | + //---二维吗图--- | |
610 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | |
611 | + } | |
612 | + break | |
613 | + } | |
614 | + | |
615 | + //--- 如果是自定义海报的时候 --- | |
616 | + if(th.data.poster && parseInt(th.data.poster.style)==2){ | |
617 | + | |
618 | + //如果显示会员信息的话 | |
619 | + if(parseInt(th.data.poster.show_headpic)){ | |
620 | + //获取坐标 | |
621 | + var x= parseFloat(th.data.poster.head_x)*2; | |
622 | + var y=parseFloat(th.data.poster.head_y)*2; | |
623 | + //---绘制圆形要放在最后---- | |
624 | + context.save(); | |
625 | + context.beginPath(); | |
626 | + var h_x = x* unit; | |
627 | + var h_y = y * unit; | |
628 | + var h_r = 40 * unit; | |
629 | + var cx = h_x + h_r; | |
630 | + var cy = h_y + h_r; | |
631 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
632 | + context.closePath(); | |
633 | + context.fill(); | |
634 | + context.clip(); | |
635 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
636 | + context.restore(); | |
637 | + } | |
638 | + | |
639 | + }else{ | |
640 | + //---绘制圆形要放在最后---- | |
641 | + context.save(); | |
642 | + context.beginPath(); | |
643 | + var h_x = 60 * unit; | |
644 | + var h_y = 24 * unit; | |
645 | + var h_r = 40 * unit; | |
646 | + var cx = h_x + h_r; | |
647 | + var cy = h_y + h_r; | |
648 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
649 | + context.closePath(); | |
650 | + context.fill(); | |
651 | + context.clip(); | |
652 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
653 | + context.restore(); | |
654 | + } | |
655 | + | |
656 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
657 | + context.draw(false, function () { | |
658 | + setTimeout(function () { | |
659 | + wx.canvasToTempFilePath({ | |
660 | + x: 0, y: 0, | |
661 | + width: 750, | |
662 | + height: 1217, | |
663 | + destWidth: 750 * 750 / that.data.screenWidth, | |
664 | + destHeight: 1217 * 750 / that.data.screenWidth, | |
665 | + canvasId: 'share', | |
666 | + success: function (res) { | |
667 | + | |
668 | + that.setData({ | |
669 | + shareImgPath: res.tempFilePath, canvasHidden: false, | |
670 | + }) | |
671 | + if (!res.tempFilePath) { | |
672 | + wx.showModal({ | |
673 | + title: '提示', | |
674 | + content: '图片绘制中,请稍后重试', | |
675 | + showCancel: false | |
676 | + }) | |
677 | + return false; | |
678 | + } | |
679 | + | |
680 | + // wx.previewImage({ | |
681 | + // //将图片预览出来 | |
682 | + // urls: [that.data.shareImgPath] | |
683 | + // }); | |
684 | + | |
685 | + that.setData({ | |
686 | + showPoster: true, | |
687 | + }); | |
688 | + | |
689 | + wx.hideLoading(); | |
690 | + } | |
691 | + }) | |
692 | + },500) | |
693 | + }); | |
694 | + }); | |
695 | + } | |
696 | + }); | |
697 | + }, | |
698 | + | |
699 | + | |
700 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
701 | + draw_Text: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) { | |
702 | + var lineWidth = 0; | |
703 | + var lastSubStrIndex = 0; //每次开始截取的字符串的索引 | |
704 | + var han = 0; | |
705 | + for (let i = 0; i < str.length; i++) { | |
706 | + if (han == 2) return; | |
707 | + | |
708 | + //lineWidth += ctx.measureText(str[i]).width; | |
709 | + lineWidth += ut.measureText(str[i], 21.3 * unit); | |
710 | + | |
711 | + if (lineWidth > canvasWidth) { | |
712 | + han++; | |
713 | + if (han == 2) | |
714 | + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 | |
715 | + else | |
716 | + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); | |
717 | + | |
718 | + initHeight += 22; //22为字体的高度 | |
719 | + lineWidth = 0; | |
720 | + lastSubStrIndex = i; | |
721 | + titleHeight += 20; | |
722 | + } | |
723 | + if (i == str.length - 1) { //绘制剩余部分 | |
724 | + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); | |
725 | + } | |
726 | + } | |
727 | + }, | |
728 | + | |
729 | + //c点击打开拼团弹窗 | |
730 | + cpd: function() { | |
731 | + console.log("heheh"); | |
732 | + this.setData({ pd_xx: 1,}) | |
733 | + }, | |
734 | + | |
735 | + //点击关闭拼团弹窗 | |
736 | + close_pt_xx: function() { | |
737 | + this.setData({ pd_xx: 0, }) | |
738 | + }, | |
739 | + | |
740 | + go_goodsinfo:function (e) { | |
741 | + var gid=e.currentTarget.dataset.gid; | |
742 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid; | |
743 | + wx.navigateTo({ url: url, }) //跳到非tabbar页 | |
744 | + }, | |
745 | + | |
746 | + gohome:function () { | |
747 | + getApp().goto("/pages/index/index/index"); | |
748 | + }, | |
749 | + | |
750 | + //--获取头像的本地缓存,回调写法-- | |
751 | + get_head_temp:function (tt,func) { | |
752 | + var ee=this; | |
753 | + if(ee.data.share_head){ | |
754 | + tt(func); | |
755 | + return false; | |
756 | + } | |
757 | + //---获取分享图片的本地地址,头像和商品图片---- | |
758 | + var path2 = getApp().globalData.userInfo.head_pic; | |
759 | + if(path2==""){ | |
760 | + ee.data.share_head ="../../../images/share/hui_hear_pic.png"; | |
761 | + tt(func); | |
762 | + }else { | |
763 | + path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); | |
764 | + path2=path2.replace("https://thirdwx.qlogo.cn","https://wx.qlogo.cn"); | |
765 | + wx.getImageInfo({ | |
766 | + src: path2, | |
767 | + success: function (res) { | |
768 | + //res.path是网络图片的本地地址 | |
769 | + ee.data.share_head = res.path; | |
770 | + tt(func);; | |
771 | + }, | |
772 | + fail: function (res) { | |
773 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | |
774 | + tt(func); | |
775 | + } | |
776 | + }); | |
777 | + } | |
778 | + }, | |
779 | + | |
780 | + //--获取商品图片的本地缓存,回调写法-- | |
781 | + get_goods_temp:function (tt) { | |
782 | + var ee=this; | |
783 | + if(ee.data.share_img_localpath) { | |
784 | + tt(); | |
785 | + return false; | |
786 | + } | |
787 | + var path2 = os.imghost + ee.data.teamlist.share_imgurl; | |
788 | + //获取商品是分享图信息 | |
789 | + wx.getImageInfo({ | |
790 | + src: path2, | |
791 | + success: function (res) { | |
792 | + //res.path是网络图片的本地地址 | |
793 | + ee.data.share_img_localpath = res.path; | |
794 | + tt(); | |
795 | + }, | |
796 | + fail: function (res) { | |
797 | + ee.data.share_img_localpath= "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 | |
798 | + tt(); | |
799 | + } | |
800 | + }); | |
801 | + }, | |
802 | + | |
803 | + go_pay_wk:function(){ | |
804 | + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id; | |
805 | + getApp().goto(url); | |
806 | + }, | |
807 | + | |
808 | + img_show_err:function(e){ | |
809 | + var err_img = e.currentTarget.dataset.err; | |
810 | + var ob={}; | |
811 | + ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
812 | + this.setData(ob); | |
813 | + | |
814 | + }, | |
815 | + | |
816 | + //------ 分享配置 -------- | |
817 | + onShareAppMessage: function (e) { | |
818 | + var th=this; | |
819 | + var scene=this.data.teamgroup.id; | |
820 | + var url="/pages/team/team_show/team_show?tg_id="+scene; | |
821 | + //--分享图片-- | |
822 | + var img=th.data.iurl+th.data.teamlist.share_imgurl; | |
823 | + //--把会员分享出去-- | |
824 | + if(getApp().globalData.user_id){ | |
825 | + if(url.indexOf("?")>0) | |
826 | + url+="&first_leader="+getApp().globalData.user_id; | |
827 | + else | |
828 | + url+="?first_leader="+getApp().globalData.user_id; | |
829 | + } | |
830 | + // console.log('url+++++>>>>>', url, th.data.teamlist.title); | |
831 | + | |
832 | + var share_title=th.data.teamlist.title; | |
833 | + if(th.data.teamlist.share_title){ | |
834 | + share_title=th.data.teamlist.share_title; | |
835 | + } | |
836 | + | |
837 | + return { | |
838 | + path:url, | |
839 | + title: share_title, | |
840 | + imageUrl: img, | |
841 | + } | |
842 | + }, | |
843 | + | |
844 | + clickShare() { | |
845 | + this.setData({ | |
846 | + share_hidden: true, | |
847 | + }); | |
848 | + }, | |
849 | + | |
850 | + send() { | |
851 | + this.setData({ | |
852 | + share_hidden:false, | |
853 | + }); | |
854 | + }, | |
855 | + | |
856 | + cancel() { | |
857 | + this.setData({ | |
858 | + share_hidden:false, | |
859 | + }); | |
860 | + }, | |
861 | + | |
862 | + | |
863 | + closePoster() { | |
864 | + this.setData({ | |
865 | + showPoster: false, | |
866 | + }); | |
867 | + }, | |
868 | + | |
869 | + | |
870 | + // 保存图片到手机 | |
871 | + savePic() { | |
872 | + console.log('保存图片'); | |
873 | + var self = this; | |
874 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | |
875 | + this.getSetting().then((res) => { | |
876 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | |
877 | + if (!res.authSetting['scope.writePhotosAlbum']) { | |
878 | + this.authorize().then(() => { | |
879 | + // 同意授权后保存下载文件 | |
880 | + this.saveImage(self.data.shareImgPath) | |
881 | + .then(() => { | |
882 | + self.setData({ | |
883 | + showPoster: false | |
884 | + }); | |
885 | + }); | |
886 | + }) | |
887 | + } else { | |
888 | + // 如果已经授权,保存下载文件 | |
889 | + this.saveImage(self.data.shareImgPath) | |
890 | + .then(() => { | |
891 | + self.setData({ | |
892 | + showPoster: false | |
893 | + }); | |
894 | + }); | |
895 | + } | |
896 | + | |
897 | + }) | |
898 | + }, | |
899 | + | |
900 | + | |
901 | + // 保存图片到系统相册 | |
902 | + saveImage(saveUrl) { | |
903 | + var self = this; | |
904 | + return new Promise((resolve, reject) => { | |
905 | + wx.saveImageToPhotosAlbum({ | |
906 | + filePath: saveUrl, | |
907 | + success: (res) => { | |
908 | + wx.showToast({ | |
909 | + title: '保存成功', | |
910 | + duration: 1000, | |
911 | + }); | |
912 | + self.setData({ | |
913 | + showPlaybill: 'true' | |
914 | + }); | |
915 | + resolve(); | |
916 | + }, | |
917 | + fail: () => { | |
918 | + wx.showToast({ | |
919 | + title: '保存失败', | |
920 | + duration: 1000, | |
921 | + }); | |
922 | + } | |
923 | + }) | |
924 | + }) | |
925 | + }, | |
926 | + | |
927 | + // 获取用户已经授予了哪些权限 | |
928 | + getSetting() { | |
929 | + return new Promise((resolve, reject) => { | |
930 | + wx.getSetting({ | |
931 | + success: res => { | |
932 | + resolve(res) | |
933 | + } | |
934 | + }) | |
935 | + }) | |
936 | + }, | |
937 | + | |
938 | + // 发起首次授权请求 | |
939 | + authorize() { | |
940 | + // isFirst 用来记录是否为首次发起授权, | |
941 | + // 如果首次授权拒绝后,isFirst赋值为1 | |
942 | + let isFirst = wx.getStorageSync('isFirst') || 0; | |
943 | + return new Promise((resolve, reject) => { | |
944 | + wx.authorize({ | |
945 | + scope: 'scope.writePhotosAlbum', | |
946 | + // 同意授权 | |
947 | + success: () => { | |
948 | + resolve(); | |
949 | + }, | |
950 | + // 拒绝授权,这里是用户拒绝授权后的回调 | |
951 | + fail: res => { | |
952 | + if(isFirst === 0) { | |
953 | + wx.setStorageSync('isFirst', 1); | |
954 | + wx.showToast({ | |
955 | + title: '保存失败', | |
956 | + icon: 'none', | |
957 | + duration: 1000 | |
958 | + }) | |
959 | + } else { | |
960 | + this.showModal(); | |
961 | + } | |
962 | + console.log('拒绝授权'); | |
963 | + reject(); | |
964 | + } | |
965 | + }) | |
966 | + }) | |
967 | + }, | |
968 | + | |
969 | + | |
970 | + | |
971 | + | |
972 | +}) | |
973 | + | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.json
0 → 100644
1 | +{ | |
2 | + "windom": { | |
3 | + "navigationBarTitleText": "参团详情", | |
4 | + "backgroundTextStyle": "light", | |
5 | + "navigationBarTextStyle": "white", | |
6 | + "navigationBarBackgroundColor": "#ffffff", | |
7 | + "backgroundColor": "#eeeeee" | |
8 | + }, | |
9 | + "usingComponents": { | |
10 | + "share": "/components/share/share" | |
11 | + } | |
12 | +} | |
0 | 13 | \ No newline at end of file | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
0 → 100644
1 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | |
2 | +<!---- //文字"--> | |
3 | +<view> | |
4 | + | |
5 | + <view class='center'> | |
6 | + <view class='cenleft'> | |
7 | + <image src='{{image}}' binderror='img_show_err' data-err="image"></image> | |
8 | + </view> | |
9 | + <view class='cenright'> | |
10 | + <!----//图片区域----> | |
11 | + <view class='cenrt'> | |
12 | + <view class='xc-goods-details ellipsis-2 fs30'> | |
13 | + {{goods.goods_name}} | |
14 | + </view> | |
15 | + </view> | |
16 | + <view class='cenrcen flex-vertical-between'> | |
17 | + <view> | |
18 | + <view class="fs40 xc-wc" style='font-size:40rpx'> | |
19 | + <span class="fs28 xc-rmbs" style="font-weight:500;">¥</span>{{teamlist.price}}</view> | |
20 | + <view class="fs22 word-line xc-wc" style="width:172rpx;"> | |
21 | + 零售价¥{{goods.market_price}} | |
22 | + </view> | |
23 | + </view> | |
24 | + <view class="xc-wc fs24"> | |
25 | + <view> | |
26 | + <view class="">已拼{{teamlist.buy_num}}件</view> | |
27 | + <view class="flex xc-valframe t-c"> | |
28 | + <view class="xc-frame-img"> | |
29 | + <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image> | |
30 | + </view> | |
31 | + <view class="xc-people-val"> | |
32 | + {{teamlist.ct_num}}人拼 | |
33 | + </view> | |
34 | + </view> | |
35 | + </view> | |
36 | + </view> | |
37 | + </view> | |
38 | + </view> | |
39 | + <view class='clear'></view> | |
40 | + </view> | |
41 | + <!----以上商品显示完成----> | |
42 | + | |
43 | + | |
44 | + <view class='body'> | |
45 | + <!-- 阶梯团 --> | |
46 | + <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}"> | |
47 | + 当前价格 | |
48 | + <text class="xc-wc">¥{{ct_price}}</text>, | |
49 | + <block wx:if="{{max_num-ordertx.length>0}}"> | |
50 | + <text class="xc-wc">还差{{max_num-ordertx.length}}</text>人享受最低价格<text class="xc-wc">¥{{min_price}}</text> | |
51 | + </block> | |
52 | + <block wx:else> | |
53 | + 该团已经拼购到最低价了哦~ | |
54 | + </block> | |
55 | + </view> | |
56 | + <!-- 拼团成功 --> | |
57 | + <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}"> | |
58 | + <view class="xc-wc">拼团成功</view>,当前价格 | |
59 | + <text class="xc-wc">¥{{ct_price}}</text> | |
60 | + <view class="xc-img-frame oh"> | |
61 | + <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image> | |
62 | + </view> | |
63 | + </view> | |
64 | + | |
65 | + <view style="height: 20rpx" wx:if="{{teamlist.kttype==3&&p_status==4}}"></view> | |
66 | + | |
67 | + | |
68 | + <!-- 阶梯团失败 --> | |
69 | + <view class=".xc-fail-ladder flex-level fs28" wx:if="{{pay_f==1 || order.pt_status==3}}"> | |
70 | + <view class="xc-wc">拼团失败</view> | |
71 | + <view class="xc-img-frame oh" > | |
72 | + <image class="img" src="{{iurl}}/miniapp/images/xc-qtshibai.png"></image> | |
73 | + </view> | |
74 | + </view> | |
75 | + | |
76 | + <!-- 会员团和商家团 --> | |
77 | + <view class='bodytop' wx:if="{{(teamlist.kttype==2 || teamlist.kttype==1) && p_status==1}}"> | |
78 | + 还差 | |
79 | + <text class="xc-wc">{{teamlist.ct_num-ordertx.length}}</text>人成团,组团成功为您节省 | |
80 | + <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元 | |
81 | + </view> | |
82 | + <!-- 拼团成功 --> | |
83 | + <view class="xc-ptcomplete flex-level fs28" wx:if="{{p_status==2 && (teamlist.kttype==2||teamlist.kttype==1)}}"> | |
84 | + <view class="xc-wc">拼团成功</view>,为您节省 | |
85 | + <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元 | |
86 | + <view class="xc-img-frame oh"> | |
87 | + <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image> | |
88 | + </view> | |
89 | + </view> | |
90 | + | |
91 | + <!----//// //头像----> | |
92 | + <view class="flex_tou"> | |
93 | + <view class='bodyimg flex-level'> | |
94 | + <view class='d' wx:for="{{ordertx2}}" wx:key> | |
95 | + <image src='{{item.head_pic}}'></image> | |
96 | + <span wx:if="{{item.is_pt_tz==1}}">团长</span> | |
97 | + </view> | |
98 | + <view class='d' wx:for="{{sf_arr}}" wx:if="{{p_status!=2}}"> | |
99 | + <image src='{{iurl}}/miniapp/images/shafa.png'></image> | |
100 | + </view> | |
101 | + | |
102 | + <view class='xc-ellipsis-img flex-vertical' wx:if="{{ordertx.length>5}}"> | |
103 | + <image class="pictures " src="{{iurl}}/miniapp/images/xc_ellipsis.png"></image> | |
104 | + </view> | |
105 | + </view> | |
106 | + </view> | |
107 | + | |
108 | + <view class='bodytime'> | |
109 | + <!----/ //旁边直线----> | |
110 | + <view class='bodytimeleft'> | |
111 | + <view class='xian'></view> | |
112 | + </view> | |
113 | + | |
114 | + <!-- 阶梯团 开始--> | |
115 | + <view class='bodytimecen' wx:if='{{p_status==1}}'> | |
116 | + 剩余 | |
117 | + | |
118 | + <span>{{obj.hou}}</span>: | |
119 | + <span>{{obj.hou}}</span>: | |
120 | + <span>{{obj.min}}</span>: | |
121 | + <span>{{obj.sec}}</span>结束 | |
122 | + </view> | |
123 | + | |
124 | + <!-- 阶梯团 成功--> | |
125 | + <view class='bodytimecen-success' wx:if='{{teamlist.kttype==3&&p_status==2 && is_pay_wk!=1}}'> | |
126 | + 剩余支付时间: | |
127 | + | |
128 | + <span>{{obj.hou}}</span>时 | |
129 | + <span>{{obj.min}}</span>分 | |
130 | + <span>{{obj.sec}}</span>秒 | |
131 | + </view> | |
132 | + | |
133 | + <view class='bodytimecen-success' wx:if='{{teamlist.kttype==3&&p_status==4 }}'> | |
134 | + 拼团已结束 | |
135 | + </view> | |
136 | + | |
137 | + <!-- </block> --> | |
138 | + <!-- 阶梯团失败 --> | |
139 | + <view class='bodytimecen' wx:if='{{p_status==3}}'> | |
140 | + 还差 | |
141 | + <text class="xc-wc">{{teamlist.ct_num-ordertx.length}}</text>人参团, 拼团失败。 | |
142 | + </view> | |
143 | + <!-- 会员团 --> | |
144 | + <view class='bodytimecen' wx:if='{{(teamlist.kttype==1 || teamlist.kttype==2) && p_status==2}}'> | |
145 | + 已经有 | |
146 | + <text class="xc-wc">{{ordertx.length}}</text>人参团, 拼团成功。 | |
147 | + </view> | |
148 | + | |
149 | + <!----//旁边直线----> | |
150 | + <view class='bodytimeright'> | |
151 | + <view class='xian'></view> | |
152 | + </view> | |
153 | + </view> | |
154 | + | |
155 | + <!-- 阶梯团 --> | |
156 | + <view class='fs30 xc-green' wx:if='{{teamlist.kttype==3&&p_status==2}}'> | |
157 | + 拼团成功, 规定时间内支付尾款即发货 | |
158 | + </view> | |
159 | + <view class="xc-wc fs30 t-c xc-onclik" wx:if="{{p_status==1}}"> | |
160 | + 点击下方按钮分享给小伙伴,可快速成团! | |
161 | + </view> | |
162 | + | |
163 | + <!-- <block wx:if="{{pay_f!=1 && order.pt_status<2}}"> --> | |
164 | + <!----/ // // // //按钮----> | |
165 | + | |
166 | + <view wx:if="{{teamlist.kttype==3}}" class='bodybutton'> | |
167 | + <!-- 阶梯团 --> | |
168 | + <button wx:if="{{p_status==1}}" bindtap="clickShare" style='background-color:#fab55a; color:#fff'> | |
169 | + <!-- <button wx:if="{{p_status==1}}" bindtap="clickShare" bindtap='cmeng' style='background-color:#fab55a; color:#fff'> --> | |
170 | + 邀请好友参团 | |
171 | + </button> | |
172 | + <button bindtap="go_pay_wk" style='background-color:#42c780;' wx:if="{{order.pt_status==2 && order.is_zsorder==4 }}"> | |
173 | + 支付尾款 | |
174 | + </button> | |
175 | + </view> | |
176 | + <!-- <view wx:elif="{{teamlist.ct_num-ordertx.length>0}}" class='' bindtap='cmeng'> --> | |
177 | + | |
178 | + <!--会员团 商家团--> | |
179 | + <button class="bodybutton" style='background-color:#fab55a; color:#fff' bindtap='clickShare' | |
180 | + wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1}}">邀请好友参团</button> | |
181 | + | |
182 | + <!-- </view> --> | |
183 | + <!-- </block> --> | |
184 | + <view class="xc-home-page-frame"> | |
185 | + <button class="xc-home-page" bindtap='gohome'> 返回首页</button> | |
186 | + </view> | |
187 | + | |
188 | + <view class='zspan' hidden="{{hiddenName}}" bindtap='click'>查看拼团列表 | |
189 | + <view class='down-arrow1'></view> | |
190 | + </view> | |
191 | + | |
192 | + </view> | |
193 | + | |
194 | + <!---/ // // // // //展开拼团列表----> | |
195 | + <view class='bodyfoot'> | |
196 | + <view class='bodyselect' wx:if="{{zk}}" bindtap='czk'> | |
197 | + <span>查看拼团列表 | |
198 | + <view class='down-arrow'></view> | |
199 | + </span> | |
200 | + </view> | |
201 | + | |
202 | + <view class='zhangxi' hidden="{{hiddenName}}" wx:for="{{ordertx}}" wx:for-index="ky"> | |
203 | + <view class='img rel'> | |
204 | + <view class="xc-list" wx:if="{{item.is_pt_tz}}"> | |
205 | + <span>团长</span> | |
206 | + </view> | |
207 | + <image src='{{item.head_pic}}'></image>{{item.nickname}} | |
208 | + </view> | |
209 | + <!-- <view class='zssj' wx:if="{{teamlist.kttype==1}}">{{item.add_time_date}}参团</view> --> | |
210 | + <view class='zssj' wx:if="{{ky==0 &&teamlist.kttype!=1}}">{{item.add_time_date}} | |
211 | + <text>开团</text> | |
212 | + </view> | |
213 | + <view class='zssj' wx:else>{{item.add_time_date}} 参团</view> | |
214 | + <view class="clear"></view> | |
215 | + </view> | |
216 | + | |
217 | + | |
218 | + <view class='clear'></view> | |
219 | + </view> | |
220 | + <view class='clear'></view> | |
221 | + | |
222 | + <!----//大家都在团----> | |
223 | + <view class='goodslist'> | |
224 | + <view class='goodslisttop'> | |
225 | + <!-- <view class='goodslistspan fs24'>大家都在团</view> --> | |
226 | + <!-- 推荐商品 --> | |
227 | + <view class="flex-center rel xc-linellae-frame"> | |
228 | + <view class="xc-linellae"></view> | |
229 | + <view class="abs flex-center xc-recommend-frame "> | |
230 | + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"> | |
231 | + </image> | |
232 | + <view class="xc-recommend-word">大家都在团</view> | |
233 | + </view> | |
234 | + </view> | |
235 | + <view class='goodslisttopright'></view> | |
236 | + </view> | |
237 | + <view class="changxin"> | |
238 | + <view class='onegoods' wx:for="{{pageteam}}" wx:key="{{index}}" bindtap="go_goodsinfo" data-gid="{{item.goods_id}}"> | |
239 | + <view class='onegoodsimg'> | |
240 | + <image src="{{imageurl+item.share_imgurl}}"></image> | |
241 | + </view> | |
242 | + <view class="xc-buttmo-frame"> | |
243 | + <view class='onegoodsdesc '> | |
244 | + | |
245 | + <view class='price flex-vertical-between'> | |
246 | + <view class='jgleft fs32 flex-center xc-wc'> | |
247 | + <view class="xc-ping xc-wc fs26 t-c">拼</view> | |
248 | + <text class="fs20" style='height:39rpx;margin-right:5rpx;margin-left:15rpx;' >¥</text>11.00{{item.price}} | |
249 | + </view> | |
250 | + <view class='jgright'>{{item.ct_num}}2 | |
251 | + <span>人参团</span> | |
252 | + </view> | |
253 | + </view> | |
254 | + </view> | |
255 | + <view class="xc-shuoming ellipsis-2 fs26"> | |
256 | + <text>{{item.goods_name}}</text> | |
257 | + </view> | |
258 | + </view> | |
259 | + </view> | |
260 | + </view> | |
261 | + </view> | |
262 | +</view> | |
263 | + | |
264 | + | |
265 | + | |
266 | + | |
267 | +<!--二维码显示页面--> | |
268 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{canvasHidden}}'></canvas> | |
269 | +<!--拼团玩法弹出框--> | |
270 | +<!----弹起的----> | |
271 | +<block wx:if="{{pd_xx}}"> | |
272 | + <view class="bview"></view> | |
273 | + <view class="juzhong"> | |
274 | + <view class="xq"> | |
275 | + <view class="title" bindtap="close_pt_xx">拼团玩法介绍 | |
276 | + <image src="{{iurl}}/miniapp/images/gbi.png" class="close"></image> | |
277 | + </view> | |
278 | + <view>1.开团: | |
279 | + <text class="hs1">选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功;</text> | |
280 | + </view> | |
281 | + <view>2.参团: | |
282 | + <text class="hs1">进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格;</text> | |
283 | + </view> | |
284 | + <view>3.成团: | |
285 | + <text class="hs1">在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货;</text> | |
286 | + </view> | |
287 | + <view>4.组团失败: | |
288 | + <text class="hs1">在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户;</text> | |
289 | + </view> | |
290 | + <view>5. | |
291 | + <text class="hs1">组团有效期间内,拼购商品订单不允许取消。 </text> | |
292 | + </view> | |
293 | + </view> | |
294 | + </view> | |
295 | +</block> | |
296 | + | |
297 | +<!-- 分享控件,底部弹出 --> | |
298 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> | |
299 | + | |
300 | + | |
301 | +<view wx:if="{{showPoster}}"> | |
302 | + <view class="mask" catchtap="closePoster"></view> | |
303 | + <view class="poster-container"> | |
304 | + <view class="poster-wrapper"> | |
305 | + <view class="poster"> | |
306 | + <!-- <view class="poster" bindtap="previewImage"> --> | |
307 | + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | |
308 | + <view class="btn-close" catchtap="closePoster"><text class="iconfont icon-close"></text></view> | |
309 | + </view> | |
310 | + <view class="btn-container"> | |
311 | + <!--<button class="btn-share" open-type="share" bindtap="">微信好友分享</button>--> | |
312 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | |
313 | + </view> | |
314 | + </view> | |
315 | + </view> | |
316 | +</view> | |
317 | + | |
318 | + | |
319 | + | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss
0 → 100644
1 | +page{ | |
2 | + background-color:#eee; | |
3 | +} | |
4 | +.top{ | |
5 | + background-color:rgb(216, 230, 220); | |
6 | + color: rgb(98, 155, 13); | |
7 | + text-align: center; | |
8 | + height:120rpx; | |
9 | + width: 100%; | |
10 | + padding-top:24rpx; | |
11 | +} | |
12 | + | |
13 | +.center{ | |
14 | + height: 240rpx; | |
15 | + width: 100%; | |
16 | + position: relative; | |
17 | + background:#fff; | |
18 | +} | |
19 | + | |
20 | +.cenleft{ | |
21 | + width: 240rpx; | |
22 | + height: 100%; | |
23 | + | |
24 | + float: left; | |
25 | + display:flex; | |
26 | + justify-content: center; | |
27 | + align-items: center; | |
28 | +} | |
29 | + | |
30 | +.cenleft image{ | |
31 | + background-color:white ; | |
32 | + width: 200rpx; | |
33 | + height: 200rpx; | |
34 | + | |
35 | +} | |
36 | + | |
37 | + | |
38 | +.cenrt{ | |
39 | + width: 460rpx; margin-top: 10rpx; | |
40 | +} | |
41 | + | |
42 | +.cenright{ | |
43 | + height: 100%; | |
44 | + width: 460rpx; | |
45 | + | |
46 | + float: left; | |
47 | +} | |
48 | + | |
49 | +.cenrtop{ | |
50 | + margin-top: 10rpx; | |
51 | + background-color: red; | |
52 | + color: white; | |
53 | + border-radius:10rpx; | |
54 | + padding-left: 16rpx; | |
55 | + width: 140rpx; | |
56 | + font-size: 32rpx; | |
57 | + float: left; | |
58 | + height: 40rpx; | |
59 | +} | |
60 | + | |
61 | +.cenrtoptitle{ | |
62 | + float: left; | |
63 | + width: 295rpx; | |
64 | + height: 40rpx; | |
65 | + margin-left: 12rpx; | |
66 | + font-size: 28rpx; | |
67 | + margin-top:12rpx; | |
68 | +} | |
69 | + | |
70 | +.cenrtoptitle>span{ | |
71 | + width: 100%; | |
72 | + display: inline-block; | |
73 | + overflow:hidden; | |
74 | + text-overflow:ellipsis; | |
75 | + white-space:nowrap | |
76 | +} | |
77 | + | |
78 | +.cenrcen{ | |
79 | + height: 70rpx; | |
80 | + margin-top: 35rpx; | |
81 | + width:474rpx; | |
82 | +} | |
83 | +.jg{ font-size: 40rpx; | |
84 | + margin-right: 30rpx;} | |
85 | +.jgx{ | |
86 | + font-size: 28rpx; | |
87 | + color: #777; | |
88 | + text-decoration:line-through; | |
89 | + margin-left: 20rpx; | |
90 | +} | |
91 | + | |
92 | +.cenrfoot{ | |
93 | + align-content: center; | |
94 | + text-align: center; | |
95 | + border: 2rpx solid red; | |
96 | + border-radius:10rpx; | |
97 | + color: red; | |
98 | + float: left; | |
99 | + font-size: 24rpx; | |
100 | + padding: 4rpx 16rpx; | |
101 | +} | |
102 | + | |
103 | +.body{ | |
104 | + background-color: white; | |
105 | + /* min-height:418rpx; */ | |
106 | + width: 100%; | |
107 | + margin-top: 4rpx; | |
108 | + border-top:5rpx solid #eee; | |
109 | + height: auto; | |
110 | +} | |
111 | + | |
112 | +.bodytop{ | |
113 | + background-color: white; | |
114 | + text-align: center; | |
115 | + font-size: 28rpx; | |
116 | + height:100rpx; | |
117 | + line-height:117rpx; | |
118 | + | |
119 | +} | |
120 | + | |
121 | +.bodytop span{ | |
122 | + color: red; | |
123 | +} | |
124 | + | |
125 | + | |
126 | +.bodyimg{ | |
127 | + height:140rpx; | |
128 | + width:590rpx; | |
129 | + | |
130 | + | |
131 | + | |
132 | +} | |
133 | +.bodyimg image{ | |
134 | + | |
135 | +border-radius:50rpx; | |
136 | +height: 96rpx; | |
137 | +width: 96rpx; | |
138 | +background-color:burlywood; | |
139 | +margin-top: 30rpx; | |
140 | + position: absolute; | |
141 | + | |
142 | +} | |
143 | + | |
144 | +.d{ | |
145 | +width:101rpx; | |
146 | + height:101rpx; | |
147 | + display: inline-block; | |
148 | + margin-right:15rpx; | |
149 | + | |
150 | +} | |
151 | + | |
152 | +.bodyimg span{ | |
153 | + background-color:#e22b44; | |
154 | + color: white; | |
155 | + font-size: 24rpx; | |
156 | + border-radius:6rpx; | |
157 | + padding:2rpx 10rpx; | |
158 | + position: relative; | |
159 | + top: 0rpx; | |
160 | + left: 40rpx; | |
161 | +} | |
162 | + | |
163 | + | |
164 | + | |
165 | +.bodyspan{ | |
166 | + color: red; | |
167 | + text-align: center; | |
168 | + font-size: 26rpx; | |
169 | + | |
170 | +} | |
171 | + | |
172 | +.bodyselect{ | |
173 | + line-height: 47rpx; | |
174 | +} | |
175 | + | |
176 | +.bodytime{ | |
177 | + height: 88rpx; | |
178 | + width: 100%; | |
179 | + display: flex; | |
180 | + flex-wrap: nowrap; | |
181 | + margin-left:40rpx; | |
182 | + align-items:center; | |
183 | + | |
184 | +} | |
185 | + | |
186 | +.bodytimeleft{ | |
187 | + text-decoration:line-through; | |
188 | + flex-grow: 1.7; | |
189 | +} | |
190 | + | |
191 | + | |
192 | +.bodytimecen-success{ | |
193 | + text-align: center; | |
194 | + flex-grow: 1; | |
195 | + line-height:75rpx; | |
196 | + font-size: 30rpx; | |
197 | + color: #000; | |
198 | +} | |
199 | +.bodytimecen-success span{ | |
200 | + | |
201 | + color: #18ba5f; | |
202 | + border-radius:7rpx; | |
203 | + font-size: 30rpx; | |
204 | + margin: 0 auto; | |
205 | + | |
206 | +} | |
207 | +.bodytimecen{ | |
208 | + text-align: center; | |
209 | + flex-grow: 1; | |
210 | + | |
211 | + font-size: 30rpx; | |
212 | + color: #000; | |
213 | +} | |
214 | +.bodytimecen span{ | |
215 | + background-color: #333333; | |
216 | + color: white; | |
217 | + border-radius:7rpx; | |
218 | + padding-left: 10rpx; | |
219 | + font-size: 30rpx; | |
220 | + margin: 0 auto; | |
221 | + padding-right:10rpx; | |
222 | + margin-right:5px | |
223 | +} | |
224 | + | |
225 | + | |
226 | +.bodytimecen span:last-child{ | |
227 | + margin-right: 10rpx; | |
228 | +} | |
229 | + | |
230 | +.bodytimeright{ | |
231 | + flex-grow: 1.7; | |
232 | + margin-right:72rpx; | |
233 | + | |
234 | +} | |
235 | + | |
236 | +.bodybutton{ | |
237 | + width: 90%; | |
238 | + margin: 0 auto; | |
239 | + text-align: center; | |
240 | + line-height: 60rpx; | |
241 | + border-radius:15rpx; | |
242 | + height: auto; | |
243 | +} | |
244 | + | |
245 | +.bodybutton button{ | |
246 | + height:60rpx; | |
247 | + width: 100%; | |
248 | + background-color: #e4374d; | |
249 | + color: white; | |
250 | + font-size:26rpx; | |
251 | + border-radius:12rpx; | |
252 | + | |
253 | +} | |
254 | + | |
255 | +.bodyfoot{ | |
256 | + | |
257 | + width: 100%; | |
258 | + text-align: center; | |
259 | + | |
260 | + font-size: 28rpx; | |
261 | + color: #000; | |
262 | + background-color: white; | |
263 | +} | |
264 | + | |
265 | + | |
266 | + | |
267 | + | |
268 | + | |
269 | +.pintuan{ | |
270 | + width: 100%; | |
271 | + height: 84rpx; | |
272 | + background-color: white; | |
273 | + color: black; | |
274 | + text-align: center; | |
275 | + font-size:36rpx; | |
276 | + margin-top: 60rpx; | |
277 | +} | |
278 | + | |
279 | +.pintuanzhou{ | |
280 | +float: left; | |
281 | + | |
282 | +line-height: 84rpx; | |
283 | +width: 220rpx; | |
284 | +} | |
285 | + | |
286 | +.pintuanyou{ | |
287 | + float: right; | |
288 | + color: rgb(168, 167, 167); | |
289 | + line-height: 84rpx; | |
290 | + font-size: 28rpx; | |
291 | + margin-right: 20rpx; | |
292 | +} | |
293 | + | |
294 | +.onegoods{ | |
295 | + background-color: white; | |
296 | + width: 345rpx; | |
297 | + min-height: 490rpx; | |
298 | + height:auto; | |
299 | + | |
300 | + border:2rpx solid #eee; | |
301 | + | |
302 | + float: left; | |
303 | + margin-right:17rpx; | |
304 | + border-radius:20rpx; | |
305 | +} | |
306 | + | |
307 | +.goodsl{ | |
308 | + background-color: white; | |
309 | +} | |
310 | + | |
311 | +.onegoodsimg{ | |
312 | + width: 100%; | |
313 | + height: 360rpx; | |
314 | +} | |
315 | + | |
316 | +.onegoodsimg image{ | |
317 | + height: 100%; | |
318 | + width: 100%; | |
319 | + border-radius:20rpx 20rpx 0 0; | |
320 | + | |
321 | +} | |
322 | + .xc-buttmo-frame{ | |
323 | + min-height: 103rpx; | |
324 | + height: auto; | |
325 | + padding-bottom:15rpx; | |
326 | + | |
327 | + } | |
328 | +.xc-buttmo-frame .onegoodsdesc { | |
329 | + | |
330 | + height: 80rpx; | |
331 | +} | |
332 | + | |
333 | +.xc-buttmo-frame .onegoodsdesc .price{ | |
334 | + | |
335 | + padding-left:10rpx; | |
336 | + height:85rpx; | |
337 | + | |
338 | +} | |
339 | +.xc-ping{ | |
340 | + border-radius: 50%; | |
341 | + background: #fff; | |
342 | + line-height:34rpx; | |
343 | +width:34rpx; | |
344 | +height:34rpx; | |
345 | +font-size:24rpx; | |
346 | + | |
347 | +} | |
348 | +.jgleft{ | |
349 | +border-radius:36rpx; | |
350 | +height:45rpx; | |
351 | +line-height:50rpx; | |
352 | +color:#fff; | |
353 | +padding-left:7rpx; | |
354 | +padding-right:24rpx; | |
355 | +background:#e4374d; | |
356 | +} | |
357 | + | |
358 | +.jgright{ | |
359 | + font-size: 26rpx; | |
360 | + height:16rpx; | |
361 | +padding-right:10rpx; | |
362 | +color:rgb(168, 167, 167); | |
363 | +} | |
364 | + | |
365 | +.jgright span{ | |
366 | + color: rgb(168, 167, 167); | |
367 | +} | |
368 | + | |
369 | +.goodslisttop{ | |
370 | + width: 100%; | |
371 | +} | |
372 | + | |
373 | +.goodslisttop{ | |
374 | + width: 100%; | |
375 | + margin-top: 5rpx; | |
376 | + border-bottom: 4rpx solid #eee; | |
377 | + text-align: center; | |
378 | +} | |
379 | + | |
380 | +.goodslistspan{ | |
381 | + | |
382 | + margin: 0 auto; | |
383 | + padding-top: 20rpx; | |
384 | +} | |
385 | + | |
386 | +.xian{ | |
387 | + width: 100%; | |
388 | + border-bottom: 2rpx solid #eee; | |
389 | + float: left; | |
390 | +} | |
391 | + | |
392 | +.bodyselect{ | |
393 | + height: 90rpx; | |
394 | + background-color: white; | |
395 | + width: 100%; | |
396 | + line-height:90rpx; | |
397 | + | |
398 | +} | |
399 | + | |
400 | + | |
401 | +.changxin{ | |
402 | + overflow: hidden; | |
403 | + width: 100%; | |
404 | + padding-left:20rpx; | |
405 | + | |
406 | +} | |
407 | + | |
408 | +.zhangxi{ | |
409 | + width: 100%; | |
410 | + background-color:white; | |
411 | + color: black; | |
412 | +} | |
413 | + | |
414 | +.img{ | |
415 | + height: 100rpx; | |
416 | + margin-bottom: 0rpx; | |
417 | + float: left; | |
418 | + color: black; | |
419 | + line-height:100rpx; | |
420 | +display:flex; | |
421 | +align-items:center; | |
422 | + | |
423 | +} | |
424 | + | |
425 | +.zhangxi image{ | |
426 | + border-radius:50rpx; | |
427 | + height: 60rpx; | |
428 | + width: 60rpx; | |
429 | + float: left; | |
430 | + | |
431 | + background-color: red; | |
432 | + margin-left: 40rpx; | |
433 | + margin-right:10rpx; | |
434 | + | |
435 | +} | |
436 | + | |
437 | +.zhangxi .zssj{ | |
438 | + width: 413rpx; | |
439 | + margin-left: 28rpx; | |
440 | + float: right; | |
441 | + margin-top:32rpx; | |
442 | +} | |
443 | + | |
444 | +.zspan{ | |
445 | + float: left; | |
446 | + text-align: center; | |
447 | + display: flex; | |
448 | + align-items: center; | |
449 | + justify-content: center; | |
450 | + height: 48rpx; | |
451 | + font-size: 28rpx; | |
452 | + color:#000; | |
453 | + margin-bottom: 10rpx; | |
454 | + padding-bottom: 10rpx; | |
455 | + width: 100%; | |
456 | + background: #fff; | |
457 | + border-bottom:3rpx solid #eee; | |
458 | + margin-top:20rpx; | |
459 | + | |
460 | +} | |
461 | + | |
462 | + | |
463 | + | |
464 | +.mtop{ | |
465 | + text-align: center; | |
466 | + color: white; | |
467 | + background-color:rgba(0, 0, 0, .4); | |
468 | + width: 100%; | |
469 | + height: 100%; | |
470 | + position: fixed; | |
471 | + z-index: 5;top:0;left: 0; | |
472 | + | |
473 | +} | |
474 | + | |
475 | +.mt1{ | |
476 | + margin-top: 200rpx; | |
477 | + margin-bottom: 20rpx; | |
478 | +} | |
479 | + | |
480 | +.mts{ | |
481 | + color:#E1E10B; | |
482 | +} | |
483 | + | |
484 | +.mcou{ | |
485 | + font-size: 48rpx; | |
486 | + | |
487 | +} | |
488 | + | |
489 | +.mfoot{ | |
490 | + width: 100%; | |
491 | + margin-top: 700rpx; | |
492 | +} | |
493 | + | |
494 | + | |
495 | +.mbtn{ | |
496 | + margin-top: 60rrpx; | |
497 | + width: 400rpx; | |
498 | + background: #666666; | |
499 | + color: #fff; | |
500 | + border-radius: 20rpx; | |
501 | + font-size: 32rpx; | |
502 | +} | |
503 | + | |
504 | + | |
505 | + | |
506 | + | |
507 | + | |
508 | + | |
509 | + | |
510 | +.etop{ | |
511 | + padding-top: 200rpx; | |
512 | + width: 100%; | |
513 | + height: 100%; | |
514 | + position: fixed; | |
515 | + left: 0rpx; | |
516 | + top: 0rpx; | |
517 | + z-index: 12rpx; | |
518 | +background-color:rgba(0, 0, 0, .4); | |
519 | + | |
520 | +} | |
521 | + | |
522 | +.emyimage{ | |
523 | + display:flex; | |
524 | + justify-content: center; | |
525 | + align-items: center; | |
526 | +} | |
527 | + | |
528 | + | |
529 | +.emyimage image{ | |
530 | + background-color: red; | |
531 | + width: 300rpx; | |
532 | + height: 300rpx; | |
533 | + margin: 0 auto; | |
534 | + | |
535 | +} | |
536 | + | |
537 | +.espan{ | |
538 | + font-size: 32rpx; | |
539 | + margin-top: 10rpx; | |
540 | +} | |
541 | + | |
542 | +.erweima{ | |
543 | + margin-top: 10rpx; | |
544 | + display: flex; | |
545 | + width: 100%; | |
546 | + | |
547 | +} | |
548 | + | |
549 | +.erzhou{ | |
550 | + width: 200rpx; | |
551 | + | |
552 | + | |
553 | + margin-right: 20rpx; | |
554 | +} | |
555 | + | |
556 | +.erzhou image{ | |
557 | + background-color: blanchedalmond; | |
558 | + width: 200rpx; | |
559 | + height: 200rpx; | |
560 | +} | |
561 | + | |
562 | + | |
563 | +.eright{ | |
564 | + width: 500rpx; | |
565 | + font-size: 32rpx; | |
566 | + | |
567 | +} | |
568 | + | |
569 | + | |
570 | + | |
571 | +.ecc{ | |
572 | + float: right; | |
573 | + margin-right: 48rpx; | |
574 | +} | |
575 | + | |
576 | + | |
577 | +.eee{ | |
578 | + padding-top:40rpx; | |
579 | + | |
580 | +width:90%; | |
581 | +height:70%; | |
582 | + | |
583 | +padding-left:32rpx; | |
584 | +margin-left:20rpx; | |
585 | + | |
586 | +background-color:white; | |
587 | + | |
588 | +} | |
589 | + | |
590 | +.clear{ | |
591 | + clear: both; | |
592 | +} | |
593 | + | |
594 | +.down-arrow { | |
595 | + display: inline-block; | |
596 | + position: relative; | |
597 | + width: 40rpx; | |
598 | + height: 30rpx; | |
599 | + margin-right: 20rpx; | |
600 | +} | |
601 | + | |
602 | +.down-arrow::after { | |
603 | + display: inline-block; | |
604 | + content: " "; | |
605 | + height: 18rpx; | |
606 | + width: 18rpx; | |
607 | + border-width: 0 2rpx 2rpx 0; | |
608 | + border-color: #000; | |
609 | + border-style: solid; | |
610 | + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); | |
611 | + transform-origin: center; | |
612 | + transition: transform 0.3s; | |
613 | + position: absolute; | |
614 | + top: 50%; | |
615 | + right: 10rpx; | |
616 | + margin-top: -10rpx; | |
617 | +} | |
618 | + | |
619 | +.down-arrow1 { | |
620 | + display: inline-block; | |
621 | + position: relative; | |
622 | + width: 40rpx; | |
623 | + height: 30rpx; | |
624 | + margin-right: 20rpx; | |
625 | + margin-top: 12rpx; | |
626 | +} | |
627 | + | |
628 | +.down-arrow1::after { | |
629 | + display: inline-block; | |
630 | + content: " "; | |
631 | + height: 18rpx; | |
632 | + width: 18rpx; | |
633 | + border-width: 0 2rpx 2rpx 0; | |
634 | + border-color: #000; | |
635 | + border-style: solid; | |
636 | + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); | |
637 | + transform-origin: center; | |
638 | + transition: transform 0.3s; | |
639 | + position: absolute; | |
640 | + top: 50%; | |
641 | + right: 10rpx; | |
642 | + margin-top: -10rpx; | |
643 | +} | |
644 | + | |
645 | +.down-arrow1::after { | |
646 | + transform-origin: center; | |
647 | + transform: rotate(-135deg); | |
648 | + transition: transform 0.3s; | |
649 | +} | |
650 | + | |
651 | +.bview { | |
652 | + position: fixed; | |
653 | + top: 0; | |
654 | + left: 0; | |
655 | + width: 100%; | |
656 | + height: 100%; | |
657 | + background-color: rgba(0, 0, 0, 0.5); | |
658 | +} | |
659 | + | |
660 | +.juzhong { | |
661 | + position: fixed; | |
662 | + top: 0; | |
663 | + left: 0; | |
664 | + width: 100%; | |
665 | + height: 100%; | |
666 | + display: flex; | |
667 | + flex-direction: row; | |
668 | + justify-content: center; | |
669 | + align-items: center; | |
670 | +} | |
671 | + | |
672 | +.juzhong .xq { | |
673 | + padding: 0 20rpx; | |
674 | + background: #fff; | |
675 | + font-size: 30rpx; | |
676 | + padding-bottom: 20rpx; | |
677 | +} | |
678 | + | |
679 | +.juzhong .xq .title { | |
680 | + text-align: center; | |
681 | + margin: 20rpx 0; | |
682 | + position: relative; | |
683 | + height: 50rpx; | |
684 | +} | |
685 | + | |
686 | +.juzhong .xq .hs1 { | |
687 | + font-size: 28rpx; | |
688 | + color: #ab8f9e; | |
689 | +} | |
690 | + | |
691 | +.juzhong .xq .title .close { | |
692 | + position: absolute; | |
693 | + top: 0; | |
694 | + right: 0; | |
695 | + width: 45rpx; | |
696 | + height: 45rpx; | |
697 | +} | |
698 | + | |
699 | +.pt_qd { | |
700 | + margin-top: 40rpx; | |
701 | + height: auto; | |
702 | +} | |
703 | + | |
704 | +.spec-cart-btn.w100 { | |
705 | + width: 100%; | |
706 | + margin-left: 0; | |
707 | + height: 80rpx; | |
708 | + line-height: 80rpx; | |
709 | +} | |
710 | + | |
711 | +.pt_status_set{ | |
712 | + position: absolute; right: 10rpx; top:50rpx; width: 120rpx; height: 120rpx; | |
713 | +} | |
714 | + | |
715 | + | |
716 | + | |
717 | +.xc-goods-details{ | |
718 | +width:479rpx; | |
719 | +margin-top:20rpx; | |
720 | +height:77rpx; | |
721 | +} | |
722 | + | |
723 | +.xc-valframe{ | |
724 | + border-radius:7rpx; | |
725 | +border:1rpx solid; | |
726 | +margin-top:3rpx; | |
727 | +} | |
728 | +.xc-valframe .xc-frame-img{ | |
729 | + width:30rpx; | |
730 | +height:100%; | |
731 | +background:#e22b44; | |
732 | +} | |
733 | +.xc-valframe .xc-frame-img .picture{ | |
734 | + width:25rpx; | |
735 | +height:25rpx; | |
736 | +margin-top:4rpx; | |
737 | + | |
738 | +} | |
739 | +.xc-ellipsis-img{ | |
740 | +width:56rpx; | |
741 | +height:96rpx; | |
742 | + | |
743 | +} | |
744 | +.xc-ellipsis-img .pictures{ | |
745 | + width:56rpx;height:56rpx; | |
746 | +} | |
747 | +.flex_tou{ display: flex; justify-content: center; width: 100%;} | |
748 | +.xc-ptcomplete{ | |
749 | + width:74%; | |
750 | +height:105rpx; | |
751 | +line-height:105rpx; | |
752 | +float:right; | |
753 | + | |
754 | +} | |
755 | +.xc-ptcomplete .xc-img-frame .img{ | |
756 | + width: 105rpx; | |
757 | + height: 105rpx; | |
758 | + float: right; | |
759 | +} | |
760 | +.xc-ptcomplete-ladder .xc-img-frame{ | |
761 | + width:201rpx; | |
762 | + height: 105rpx; | |
763 | + margin-top:20rpx; | |
764 | +} | |
765 | +.xc-ptcomplete-ladder .xc-img-frame .img{ | |
766 | + width: 105rpx; | |
767 | + height: 105rpx; | |
768 | + float: right; | |
769 | + padding-right:6rpx; | |
770 | +} | |
771 | +.xc-ptcomplete .xc-img-frame{ | |
772 | + width:190rpx; | |
773 | + height: 105rpx; | |
774 | + margin-top:20rpx; | |
775 | +} | |
776 | +.xc-ptcomplete .xc-end{ | |
777 | + width:283rpx; | |
778 | +text-align:right; | |
779 | +} | |
780 | +.iw{ | |
781 | +padding-right:33rpx; | |
782 | +} | |
783 | +.xc-ptcomplete .xc-img-frames{ | |
784 | + width:360rpx; | |
785 | +height:105rpx; | |
786 | +margin-top:20rpx; | |
787 | + | |
788 | +} | |
789 | +.xc-ptcomplete .xc-img-frames .img{ | |
790 | + width: 105rpx; | |
791 | + height: 105rpx; | |
792 | + float: right; | |
793 | + padding-right:6rpx; | |
794 | +} | |
795 | +.xc-home-page-frame{ | |
796 | + padding-top:16rpx; | |
797 | + | |
798 | +} | |
799 | +.xc-home-page-frame .xc-home-page{ | |
800 | + background-color: #e22b44;border-radius:15rpx; | |
801 | +width:90%; | |
802 | +color:#fff; | |
803 | +height:60rpx; | |
804 | +font-size:26rpx; | |
805 | +line-height:60rpx; | |
806 | +} | |
807 | +/* */ | |
808 | +.xc-people-val{ | |
809 | + padding-left:8rpx; | |
810 | +padding-right:8rpx; | |
811 | +} | |
812 | +.xc-onclik{ | |
813 | + width:100%; | |
814 | +height:70rpx; | |
815 | + | |
816 | +} | |
817 | +.xc-green{ | |
818 | + color: #18ba5f; | |
819 | + text-align:center; | |
820 | +flex-grow:1; | |
821 | +height:90rpx; | |
822 | + | |
823 | + | |
824 | +} | |
825 | +.xc-ptcomplete-ladder{ | |
826 | + width:74%; | |
827 | +height:105rpx; | |
828 | +line-height:105rpx; | |
829 | +float:right; | |
830 | +} | |
831 | +.xc-fail-ladder{ | |
832 | + width:61%; | |
833 | +height:105rpx; | |
834 | +line-height:105rpx; | |
835 | +float:right; | |
836 | + | |
837 | +} | |
838 | +.xc-fail-ladder .xc-img-frame{ | |
839 | + width:61%; | |
840 | +height:105rpx; | |
841 | +margin-top:20rpx; | |
842 | +} | |
843 | +.xc-fail-ladder .xc-img-frame .img{ | |
844 | + width: 105rpx; | |
845 | + height: 105rpx; | |
846 | + float: right; | |
847 | + padding-right:6rpx; | |
848 | +} | |
849 | +.xc-list{ | |
850 | + background-color:#e22b44; | |
851 | +color:white; | |
852 | +font-size:17rpx; | |
853 | +border-radius:6rpx; | |
854 | +padding:0 5rpx; | |
855 | +position:absolute; | |
856 | +top:13rpx; | |
857 | +left:80rpx; | |
858 | +width:34rpx; | |
859 | +line-height:25rpx; | |
860 | + | |
861 | +} | |
862 | + | |
863 | +.xc-linellae-frame{ | |
864 | + width: 100%; | |
865 | + height: 60rpx; | |
866 | + background: #eee; | |
867 | +} | |
868 | +.xc-linellae-frame .xc-linellae{ | |
869 | + width: 425rpx; | |
870 | + height: 1rpx; | |
871 | + border-bottom: 1rpx solid #a5a5a5; | |
872 | +} | |
873 | +.xc-recommend-frame{ | |
874 | +background:#eee; | |
875 | +width:200rpx; | |
876 | +height:100%; | |
877 | + | |
878 | +} | |
879 | +.xc-recommend-frame .xc-recommend{ | |
880 | + width: 35rpx; | |
881 | + height: 27rpx; | |
882 | + margin-top:7rpx; | |
883 | +} | |
884 | +.xc-recommend-frame .xc-recommend-word{ | |
885 | +font-size:26rpx; | |
886 | +color: #a9a9a9; | |
887 | +margin-left:5rpx; | |
888 | +} | |
889 | +.xc-rmbs{ | |
890 | + | |
891 | +height:40rpx; | |
892 | +} | |
893 | +.xc-shuoming{ | |
894 | + padding-left:10rpx; | |
895 | +} | |
896 | + | |
897 | + | |
898 | +.poster-container { | |
899 | + box-sizing: border-box; | |
900 | + position: fixed; | |
901 | + top: 50%; | |
902 | + left: 50%; | |
903 | + transform: translate(-50%, -50%); | |
904 | + width: calc(100% - 210rpx); | |
905 | + z-index: 1000; | |
906 | +} | |
907 | +.mask { | |
908 | + position: fixed; | |
909 | + top: 0; | |
910 | + left: 0; | |
911 | + width: 100%; | |
912 | + height: 100%; | |
913 | + z-index: 999; | |
914 | + background-color: rgba(0,0,0,.4); | |
915 | +} | |
916 | +.poster-wrapper { | |
917 | + width: 100%; | |
918 | +} | |
919 | + | |
920 | +.poster { | |
921 | + box-sizing: border-box; | |
922 | + width: 100%; | |
923 | + height: 905rpx; | |
924 | + border-radius: 20rpx; | |
925 | + /* box-shadow: 0 8px 12px #666; */ | |
926 | + position: relative; | |
927 | + z-index: 999; | |
928 | + overflow: hidden; | |
929 | +} | |
930 | +.poster-img { | |
931 | + display: block; | |
932 | + width: 100%; | |
933 | + height: 100%; | |
934 | +} | |
935 | +.btn-container { | |
936 | + display: flex; | |
937 | + justify-content: space-around; | |
938 | +} | |
939 | +.btn-share { | |
940 | + display: block; | |
941 | + background-color: #FE6867; | |
942 | + color: white; | |
943 | + border-radius: 8rpx; | |
944 | + line-height: 80rpx; | |
945 | + margin-top: 28rpx; | |
946 | + padding: 0 60rpx; | |
947 | +} | |
948 | + | |
949 | + | |
950 | +.btn-close { | |
951 | + /* background-color: rgba(0,0,0,.5); */ | |
952 | + color: #ccc; | |
953 | + width: 50rpx; | |
954 | + height: 50rpx; | |
955 | + line-height: 50rpx; | |
956 | + text-align: center; | |
957 | + border-radius: 50%; | |
958 | + position: absolute; | |
959 | + right: 20rpx; | |
960 | + top: 20rpx; | |
961 | +} | |
962 | + | |
963 | +.icon-close { | |
964 | + font-size: 48rpx; | |
965 | +} | |
0 | 966 | \ No newline at end of file | ... | ... |
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js
0 → 100644
1 | +var t = require("../../../../utils/util.js"), | |
2 | + ut = t, | |
3 | + e = require("../../../../utils/common.js"), | |
4 | + a = require("../../../../utils/wxParse/wxParse.js"), | |
5 | + s = getApp(), | |
6 | + i = s.request, | |
7 | + rq = i, | |
8 | + oo = s.globalData, | |
9 | + o = s.globalData.setting, | |
10 | + os = o; | |
11 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
12 | +var e = getApp(),oo = e.globalData.setting; | |
13 | + | |
14 | +Page({ | |
15 | + data: { | |
16 | + wu:false, | |
17 | + imageurl: os.imghost,//有礼派图片地址, | |
18 | + iurl: os.imghost,//有礼派图片地址, | |
19 | + pt_state:0, | |
20 | + order : null,//订单数据 | |
21 | + currentTab: 0, | |
22 | + current:0, | |
23 | + ordertx:[],//头像 | |
24 | + baseUrl: "/api/weshop/order/page?1=1", | |
25 | + resourceUrl: e.globalData.setting.resourceUrl, | |
26 | + currentPage: 1, | |
27 | + requestData: null, | |
28 | + original_img:null, | |
29 | + timer:null, | |
30 | + | |
31 | + | |
32 | + | |
33 | + | |
34 | + tabArr: ['全部','参团中','已团中','未团中'], | |
35 | + currentTabIndex: 0, | |
36 | + }, | |
37 | + onLoad: function () { | |
38 | + this.data.requestData=new Array(); | |
39 | + this.init(0); | |
40 | + }, | |
41 | + onShow:function(){ | |
42 | + var th=this; | |
43 | + //设置全局定时器 | |
44 | + th.data.timer=setInterval(function () { | |
45 | + th.countDown(); | |
46 | + },1000); | |
47 | + }, | |
48 | + | |
49 | + | |
50 | + clickTab(e) { | |
51 | + this.setData({ | |
52 | + currentTabIndex: e.target.dataset.index, | |
53 | + }); | |
54 | + }, | |
55 | + | |
56 | + | |
57 | + /** | |
58 | + * 点击tab切换 | |
59 | + */ | |
60 | + swichNav: function (e) { | |
61 | + this.data.requestData=[]; | |
62 | + this.data.currentPage=1; | |
63 | + var that = this; | |
64 | + | |
65 | + if (that.data.order == null){ | |
66 | + that.setData({ | |
67 | + wu:true | |
68 | + }) | |
69 | + } | |
70 | + | |
71 | + if (this.data.currentTab === e.target.dataset.current) { | |
72 | + return false; | |
73 | + } else { | |
74 | + that.setData({ | |
75 | + currentTab: e.target.dataset.current, | |
76 | + }) | |
77 | + that.init(e.target.dataset.current); | |
78 | + } | |
79 | + }, | |
80 | + | |
81 | + async init(current) { | |
82 | + var where="1=1"; | |
83 | + var user_id = getApp().globalData.user_id; | |
84 | + switch (current){ | |
85 | + case "1": | |
86 | + where+="&pt_status=1"; | |
87 | + break; | |
88 | + case "2": | |
89 | + where += "&pt_ok=1"; | |
90 | + break; | |
91 | + case "3": | |
92 | + where += "&pt_status=3"; | |
93 | + break; | |
94 | + } | |
95 | + | |
96 | + var goods_id = 0,//商品ID, | |
97 | + original_img = [],//商品图片 | |
98 | + ee = this, | |
99 | + ordertx=[],//头像 | |
100 | + order = null,//订单数据 | |
101 | + goods = null,//商品数据 | |
102 | + users = null,//会员数据 | |
103 | + order_goods=null;//订单商品表 | |
104 | + | |
105 | + //获取订单表的信息根据活动user_id,pt_prom_id>0 AND pay_time>0 | |
106 | + /*--- | |
107 | + await getApp().request.promiseGet("/api/weshop/order/page?"+where, { | |
108 | + data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,} | |
109 | + }).then(res => { | |
110 | + order = res.data.data.pageData; | |
111 | + this.data.currentPage++; | |
112 | + })--*/ | |
113 | + | |
114 | + await getApp().request.promiseGet("/api/weshop/order/pageTuan?"+where, { | |
115 | + data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,} | |
116 | + }).then(res => { | |
117 | + order = res.data.data.pageData; | |
118 | + this.data.currentPage++; | |
119 | + }) | |
120 | + | |
121 | + | |
122 | + wx.showLoading({ title: "加载中"}); | |
123 | + for (i = 0; i < order.length; i++) { | |
124 | + //获取订单从表信息 | |
125 | + await getApp().request.promiseGet("/api/weshop/ordergoods/pageGoods", { | |
126 | + data: { store_id: os.stoid, order_id: order[i].order_id } | |
127 | + }).then(res => { | |
128 | + order_goods = res.data.data.pageData; | |
129 | + order[i].order_goods = order_goods; | |
130 | + order[i].gimage = ee.data.imageurl + order_goods[0].original_img; | |
131 | + }) | |
132 | + | |
133 | + | |
134 | + //获取订单表信息根据上面查询的订单号order[i].pt_listno | |
135 | + await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
136 | + data: { store_id: os.stoid, pt_listno: order[i].pt_listno,pageSize:60,page:1} | |
137 | + }).then(res => { | |
138 | + //console.log("ordertx"); | |
139 | + ordertx = res.data.data.pageData; | |
140 | + //console.log(ordertx); | |
141 | + order[i].tx=ordertx; | |
142 | + }) | |
143 | + | |
144 | + | |
145 | + | |
146 | + if (order[i].is_zsorder== 4) { | |
147 | + var num = 0; | |
148 | + var jt_data = JSON.parse(order[i].ct_rylist); | |
149 | + for (var m in jt_data) { | |
150 | + if (jt_data[m].rynum > num) num = jt_data[m].rynum; | |
151 | + } | |
152 | + order[i].max_ct_num = num; | |
153 | + } | |
154 | + | |
155 | + var sf_num = order[i].ct_num; | |
156 | + if (order[i].ct_num>=3){ sf_num=3;} | |
157 | + sf_num=sf_num-ordertx.length; | |
158 | + if(sf_num>0) { | |
159 | + var arr = []; | |
160 | + for(var j=0;j<sf_num;j++){ | |
161 | + arr.push(j); | |
162 | + } | |
163 | + order[i].sf_num=arr; | |
164 | + } | |
165 | + | |
166 | + } | |
167 | + //设置值 | |
168 | + for (var ii = 0; ii < order.length;ii++){ | |
169 | + this.data.requestData.push(order[ii]); | |
170 | + } | |
171 | + | |
172 | + wx.hideLoading(); | |
173 | + ee.setData({ order: this.data.requestData, ordertx: ordertx, isgo:1}); | |
174 | + }, | |
175 | + | |
176 | + //---滚动到底部加载更多--- | |
177 | + onReachBottom: function () { | |
178 | + this.init(this.data.currentTab); | |
179 | + }, | |
180 | + | |
181 | + resetData: function () { | |
182 | + n.resetConfig(), this.data.order = null, this.data.currentPage = 1; | |
183 | + }, | |
184 | + | |
185 | + //----跳转到拼单success展示----- | |
186 | + go_team_success:function(e) { | |
187 | + var order_sn=e.currentTarget.dataset.ordsn; | |
188 | + wx.navigateTo({ | |
189 | + url: "/pages/team/team_success/team_success?ordersn=" + order_sn, | |
190 | + }); | |
191 | + }, | |
192 | + | |
193 | + onHide:function(){ | |
194 | + //--清理定时器-- | |
195 | + clearInterval(this.timer); | |
196 | + }, | |
197 | + | |
198 | + //----倒计时函数----- | |
199 | + countDown() { | |
200 | + var th=this; | |
201 | + // 获取当前时间,同时得到活动结束时间数组 | |
202 | + let newTime =ut.gettimestamp(); | |
203 | + var endTimeList = this.data.order; | |
204 | + | |
205 | + if(endTimeList==null) return null | |
206 | + // 对结束时间进行处理渲染到页面 | |
207 | + for (var i = 0; i < endTimeList.length;i++){ | |
208 | + var o = endTimeList[i]; | |
209 | + if(o.kt_end_time==undefined) continue; | |
210 | + var endTime = o.kt_end_time; | |
211 | + let obj = null; | |
212 | + // 如果活动未结束,对时间进行处理 | |
213 | + if (endTime - newTime > 0){ | |
214 | + let time = (endTime - newTime); | |
215 | + // 获取天、时、分、秒 | |
216 | + let day = parseInt(time / (60 * 60 * 24)); | |
217 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
218 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
219 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
220 | + obj = { | |
221 | + day: this.timeFormat(day), hou: this.timeFormat(hou), min: this.timeFormat(min), sec: this.timeFormat(sec) | |
222 | + } | |
223 | + }else{ | |
224 | + //活动已结束,全部设置为'00' | |
225 | + obj = { day: '00', hou: '00', min: '00', sec: '00' } | |
226 | + } | |
227 | + | |
228 | + var txt ="order["+i+"].djs"; | |
229 | + th.setData({ [txt]: obj}); | |
230 | + } | |
231 | + }, | |
232 | + //---小于10的格式化函数---- | |
233 | + timeFormat(param) { | |
234 | + return param < 10 ? '0' + param : param; | |
235 | + }, | |
236 | + | |
237 | + images_err:function(e){ | |
238 | + var txt = e.currentTarget.dataset.err; | |
239 | + var ob={}; | |
240 | + ob[txt] = this.data.imageurl + "/miniapp/images/default_g_img.gif"; | |
241 | + this.setData(ob); | |
242 | + } | |
243 | + | |
244 | + | |
245 | +}) | |
246 | + | ... | ... |
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.json
0 → 100644
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml
0 → 100644
1 | +<view class="tab-hd" bindtap="clickTab"> | |
2 | + <view class="tab-hd-item {{currentTabIndex == index ? 'active':''}}" wx:for="{{tabArr}}" data-index="{{index}}">{{item}}</view> | |
3 | +</view> | |
4 | + | |
5 | +<view class="tab-bd"> | |
6 | + <view class="list"> | |
7 | + <view class="list-item"> | |
8 | + <view class="pd20"> | |
9 | + <view class="pdr40 arrow">参团中,还差<text class="c-red">2</text>人</view> | |
10 | + </view> | |
11 | + <view class="flex pd20"> | |
12 | + <view class="img-container"><image src="../../../../images/bk.png" class="img-block"></image></view> | |
13 | + <view> | |
14 | + <view class="title ellipsis-2">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view> | |
15 | + <view class="flex ai-center"> | |
16 | + <text class="rmb fs40 c-red">15</text> | |
17 | + <view class="fs24 del pdl10 c-c7">零售价<text class="rmb">25</text></view> | |
18 | + </view> | |
19 | + <view class="c-red fs24">未团中可获得XXXX帮团奖励</view> | |
20 | + </view> | |
21 | + </view> | |
22 | + <view class="flex ai-center pd20 bdt fs24 jc_sb"> | |
23 | + <view>共1件,实付金额:<text class="rmb">15.00</text></view> | |
24 | + <view class="flex"> | |
25 | + <view class="btn gray">查看订单</view> | |
26 | + <view class="btn c-red mgl20">邀请好友</view> | |
27 | + </view> | |
28 | + </view> | |
29 | + </view> | |
30 | + | |
31 | + <view class="list-item"> | |
32 | + <view class="pd20"> | |
33 | + <view class="pdr40 arrow">已团中,待发货</view> | |
34 | + </view> | |
35 | + <view class="flex pd20"> | |
36 | + <view class="img-container"><image src="../../../../images/bk.png" class="img-block"></image></view> | |
37 | + <view> | |
38 | + <view class="title ellipsis-2">商品名称商品名称</view> | |
39 | + <view class="flex ai-center"> | |
40 | + <text class="rmb fs40 c-red">15</text> | |
41 | + <view class="fs24 del pdl10 c-c7">零售价<text class="rmb">25</text></view> | |
42 | + </view> | |
43 | + <view class="c-red fs24">未团中可获得XXXX帮团奖励</view> | |
44 | + </view> | |
45 | + </view> | |
46 | + <view class="flex ai-center pd20 bdt fs24 jc_sb"> | |
47 | + <view>共1件,实付金额:<text class="rmb">15.00</text></view> | |
48 | + <view class="flex"> | |
49 | + <view class="btn gray">查看订单</view> | |
50 | + <!-- <view class="btn c-red mgl20">邀请好友</view> --> | |
51 | + </view> | |
52 | + </view> | |
53 | + </view> | |
54 | + | |
55 | + <view class="list-item"> | |
56 | + <view class="pd20"> | |
57 | + <view class="pdr40 arrow">未团中,已退款</view> | |
58 | + </view> | |
59 | + <view class="flex pd20"> | |
60 | + <view class="img-container"><image src="../../../../images/bk.png" class="img-block"></image></view> | |
61 | + <view> | |
62 | + <view class="title ellipsis-2">商品名称商品名称</view> | |
63 | + <view class="flex ai-center"> | |
64 | + <text class="rmb fs40 c-red">15</text> | |
65 | + <view class="fs24 del pdl10 c-c7">零售价<text class="rmb">25</text></view> | |
66 | + </view> | |
67 | + <view class="c-red fs24">未团中可获得XXXX帮团奖励</view> | |
68 | + </view> | |
69 | + </view> | |
70 | + <view class="flex ai-center pd20 bdt fs24 jc_sb"> | |
71 | + <view>共1件,实付金额:<text class="rmb">15.00</text></view> | |
72 | + <view class="flex"> | |
73 | + <view class="btn gray">查看订单</view> | |
74 | + <view class="btn c-red mgl20">查看奖励</view> | |
75 | + </view> | |
76 | + </view> | |
77 | + </view> | |
78 | + | |
79 | + </view> | |
80 | +</view> | |
81 | + | |
82 | + | |
83 | +<view class="popup-container"> | |
84 | + <view class="popup"> | |
85 | + <view class="pd20 flex jc_sb"> | |
86 | + <text class="c-red">帮团奖励</text> | |
87 | + <text class="iconfont icon-close fs32 c-7b"></text> | |
88 | + </view> | |
89 | + <view class="popup-list"> | |
90 | + <view class="popup-list-item"> | |
91 | + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
92 | + <view class="f1"> | |
93 | + <view class="ellipsis-2 popup-title">我是名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称</view> | |
94 | + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">100</text></view> | |
95 | + </view> | |
96 | + </view> | |
97 | + | |
98 | + <view class="popup-list-item"> | |
99 | + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
100 | + <view class="f1"> | |
101 | + <view class="ellipsis-2 popup-title">我是名称</view> | |
102 | + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">11</text></view> | |
103 | + </view> | |
104 | + </view> | |
105 | + | |
106 | + <view class="popup-list-item"> | |
107 | + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
108 | + <view class="f1"> | |
109 | + <view class="ellipsis-2 popup-title">我是名称</view> | |
110 | + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">11</text></view> | |
111 | + </view> | |
112 | + </view> | |
113 | + | |
114 | + <view class="popup-list-item"> | |
115 | + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view> | |
116 | + <view class="f1"> | |
117 | + <view class="ellipsis-2 popup-title">我是名称</view> | |
118 | + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">11</text></view> | |
119 | + </view> | |
120 | + </view> | |
121 | + | |
122 | + </view> | |
123 | + </view> | |
124 | +</view> | |
125 | + | |
126 | + | |
127 | + | |
128 | +<view class="no-more">—— 已经到底啦 ——</view> | |
129 | +<nodata nodataContainer="t-c"></nodata> | |
0 | 130 | \ No newline at end of file | ... | ... |
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss
0 → 100644
1 | +.bdt { | |
2 | + border-top: 2rpx solid #f5f5f5; | |
3 | +} | |
4 | + | |
5 | +page { | |
6 | + background-color: #f2f2f2; | |
7 | +} | |
8 | + | |
9 | +.btn { | |
10 | + border: 2rpx solid #ff6768; | |
11 | + padding: 10rpx 20rpx; | |
12 | + border-radius: 40rpx; | |
13 | +} | |
14 | + | |
15 | +.btn.gray { | |
16 | + border-color: #ccc; | |
17 | +} | |
18 | + | |
19 | +.tab-hd { | |
20 | + display: flex; | |
21 | + text-align: center; | |
22 | + font-size: 28rpx; | |
23 | + background-color: white; | |
24 | + position: sticky; | |
25 | + top: 0; | |
26 | + z-index: 2; | |
27 | +} | |
28 | + | |
29 | +.tab-hd-item { | |
30 | + flex-grow: 1; | |
31 | + padding: 20rpx; | |
32 | + position: relative; | |
33 | +} | |
34 | + | |
35 | +.tab-hd-item.active { | |
36 | + color: #ff6768; | |
37 | +} | |
38 | + | |
39 | +.tab-hd-item.active::after { | |
40 | + content: ''; | |
41 | + position: absolute; | |
42 | + width: 30%; | |
43 | + height: 4rpx; | |
44 | + left: 0; | |
45 | + right: 0; | |
46 | + bottom: 0; | |
47 | + margin: 0 auto; | |
48 | + background-color: #ff6768; | |
49 | +} | |
50 | + | |
51 | +.title { | |
52 | + height: 88rpx; | |
53 | +} | |
54 | + | |
55 | +.tab-bd { | |
56 | + padding-left: 20rpx; | |
57 | + padding-right: 20rpx; | |
58 | +} | |
59 | + | |
60 | +.list { | |
61 | + overflow: hidden; | |
62 | +} | |
63 | + | |
64 | +.list-item { | |
65 | + background-color: white; | |
66 | + margin-top: 20rpx; | |
67 | + border-radius: 12rpx; | |
68 | + font-size: 28rpx; | |
69 | +} | |
70 | + | |
71 | +.arrow { | |
72 | + position: relative; | |
73 | +} | |
74 | + | |
75 | +.arrow::after { | |
76 | + font-family: iconfont; | |
77 | + content: '\e61f'; | |
78 | + position: absolute; | |
79 | + right: 0; | |
80 | + color: #ccc; | |
81 | +} | |
82 | + | |
83 | +.img-container { | |
84 | + width: 200rpx; | |
85 | + height: 200rpx; | |
86 | + flex-shrink: 0; | |
87 | + padding-right: 20rpx; | |
88 | +} | |
89 | + | |
90 | +.rmb::before { | |
91 | + content: '¥'; | |
92 | + font-size: 24rpx; | |
93 | +} | |
94 | + | |
95 | +.del { | |
96 | + text-decoration: line-through; | |
97 | +} | |
98 | + | |
99 | +.no-more { | |
100 | + font-size: 24rpx; | |
101 | + line-height: 2; | |
102 | + text-align: center; | |
103 | + margin-top: 10rpx; | |
104 | + color: #ccc; | |
105 | +} | |
106 | + | |
107 | + | |
108 | +.popup-container { | |
109 | + position: fixed; | |
110 | + top: 0; | |
111 | + bottom: 0; | |
112 | + left: 0; | |
113 | + right: 0; | |
114 | + background-color: rgba(0,0,0,.8); | |
115 | +} | |
116 | + | |
117 | +.popup { | |
118 | + background-color: #FFFAE7; | |
119 | + position: fixed; | |
120 | + left: 50%; | |
121 | + top: 50%; | |
122 | + transform: translate(-50%, -50%); | |
123 | + border-radius: 12rpx; | |
124 | + min-width: 600rpx; | |
125 | + color: #AF481D; | |
126 | +} | |
127 | + | |
128 | + | |
129 | + | |
130 | +.popup-list-item { | |
131 | + display: flex; | |
132 | + padding: 20rpx; | |
133 | +} | |
134 | + | |
135 | +.popup-list-item .img-container { | |
136 | + width: 140rpx; | |
137 | + height: 140rpx; | |
138 | +} | |
139 | + | |
140 | + .popup-title { | |
141 | + font-size: 28rpx; | |
142 | + height: 88rpx; | |
143 | + } | |
0 | 144 | \ No newline at end of file | ... | ... |