Commit 819fb7ab41c23d4627e91108760d3491a7865184
1 parent
80fc5513
预售是商品也要用服务卡项
Showing
7 changed files
with
8243 additions
and
1 deletions
packageC/pages/presell/cardInfo/filter.wxs
0 → 100644
1 | +var is_has = function (text,val) { | ||
2 | + if(text.indexOf(","+val+",")==-1) return false; | ||
3 | + return true | ||
4 | +} | ||
5 | +function format_tt(ts) { | ||
6 | + if(ts==null || ts==undefined || ts=='') return ""; | ||
7 | + var d = getDate(ts*1000) | ||
8 | + var fm=(d.getMonth()+1)+"月"+ d.getDate()+"日"; | ||
9 | + return fm; | ||
10 | +} | ||
11 | +module.exports = { | ||
12 | + is_has: is_has, | ||
13 | + format_tt:format_tt | ||
14 | +} |
packageC/pages/presell/cardInfo/g_filter.wxs
0 → 100644
1 | +var g_filters = { | ||
2 | + //-- 判断是不是有等级价 -- | ||
3 | + is_has_rank:function(rank_switch,item){ | ||
4 | + if(!rank_switch) return false; | ||
5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | ||
6 | + return false; | ||
7 | + }, | ||
8 | + | ||
9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | ||
10 | + get_card_price:function(goods,all_card,type){ | ||
11 | + var price1=parseFloat(goods['cardprice1']); | ||
12 | + var price2=parseFloat(goods['cardprice2']); | ||
13 | + var price3=parseFloat(goods['cardprice3']); | ||
14 | + if(!all_card){ | ||
15 | + if(type==0) return 0; | ||
16 | + return ""; | ||
17 | + } | ||
18 | + | ||
19 | + var arr=[]; | ||
20 | + var min_price= 0; | ||
21 | + var min_name=""; | ||
22 | + | ||
23 | + var min_price=null; | ||
24 | + var min_name=null; | ||
25 | + //---设置对应的价格名字---- | ||
26 | + for(var i=0;i<3;i++) { | ||
27 | + var vl=all_card[i]; | ||
28 | + if(!vl) continue; | ||
29 | + if(vl['CorrPrice']=="Price1" && price1>0) | ||
30 | + { | ||
31 | + if(min_price==null) { | ||
32 | + min_price=price1;min_name=vl['CardName']; | ||
33 | + } | ||
34 | + else if(price1<min_price) { | ||
35 | + min_price=price1;min_name=vl['CardName']; | ||
36 | + } | ||
37 | + } | ||
38 | + if(vl['CorrPrice']=="Price2" && price2>0) | ||
39 | + { | ||
40 | + if(min_price==null) { | ||
41 | + min_price=price2;min_name=vl['CardName']; | ||
42 | + } | ||
43 | + else if(price2<min_price) { | ||
44 | + min_price=price2;min_name=vl['CardName']; | ||
45 | + } | ||
46 | + } | ||
47 | + | ||
48 | + if(vl['CorrPrice']=="Price3" && price3>0) | ||
49 | + { | ||
50 | + if(min_price==null) { | ||
51 | + min_price=price3;min_name=vl['CardName']; | ||
52 | + } | ||
53 | + else if(price3<min_price) { | ||
54 | + min_price=price3;min_name=vl['CardName']; | ||
55 | + } | ||
56 | + } | ||
57 | + | ||
58 | + } | ||
59 | + if(min_price==null){ | ||
60 | + if(type==0) return 0; | ||
61 | + return ""; | ||
62 | + } | ||
63 | + | ||
64 | + //if(type==0) return arr.length; | ||
65 | + //--进行排序,升序--- | ||
66 | + /*--- | ||
67 | + arr.sort(function(a,b){ | ||
68 | + if (a.price < b.price) { | ||
69 | + return -1; | ||
70 | + } else if (a.fee == b.fee) { | ||
71 | + return 0; | ||
72 | + } else { | ||
73 | + return 1; | ||
74 | + } | ||
75 | + })--*/ | ||
76 | + //-- 获取最下价钱,和相应的卡的名称 -- | ||
77 | + //min_price=min.price; | ||
78 | + //min_name=min.name; | ||
79 | + if(type==0) return min_price.toFixed(2); | ||
80 | + if(min_name.length>4) min_name=min_name.substring(0, 8); | ||
81 | + return min_name; | ||
82 | + }, | ||
83 | + | ||
84 | + toFix: function (val, count,set) { | ||
85 | + if(val===undefined) return 0; | ||
86 | + if(val===null) return 0; | ||
87 | + if(val==='') return 0; | ||
88 | + val = parseFloat(val); | ||
89 | + if(set==1 && val==0) return val; | ||
90 | + return val.toFixed(count) | ||
91 | + }, | ||
92 | + | ||
93 | + //折扣数值处理,小数位数为1时,只显示1位;小数位数为2时,才显示2位; | ||
94 | + num: function(value) { | ||
95 | + if(value != 0) { | ||
96 | + return parseFloat(value); | ||
97 | + } else { | ||
98 | + return value.toFixed(0); | ||
99 | + }; | ||
100 | + }, | ||
101 | + | ||
102 | + //跳转的接口 | ||
103 | + get_goods_url:function(item){ | ||
104 | + | ||
105 | + console.log(item,111) | ||
106 | + var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id | ||
107 | + if(item.prom_type==8){ | ||
108 | + url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&pre_id="+item.id | ||
109 | + } | ||
110 | + return url1; | ||
111 | + } | ||
112 | + | ||
113 | + | ||
114 | +} | ||
115 | +module.exports = { | ||
116 | + is_has_rank:g_filters.is_has_rank, | ||
117 | + get_card_price:g_filters.get_card_price, | ||
118 | + num:g_filters.num, | ||
119 | + get_goods_url:g_filters.get_goods_url, | ||
120 | +} | ||
0 | \ No newline at end of file | 121 | \ No newline at end of file |
packageC/pages/presell/cardInfo/goodsInfo.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 | + | ||
12 | +let self = null; | ||
13 | + | ||
14 | +//评价加载更多 | ||
15 | +var more = function(e) { | ||
16 | + return e && e.__esModule ? e : { | ||
17 | + default: e | ||
18 | + }; | ||
19 | + }(require("../../../../utils/LoadMore.js")), | ||
20 | + n = new more.default(); | ||
21 | +var utils = require('../../../../utils/util.js'); | ||
22 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | ||
23 | + | ||
24 | +Page({ | ||
25 | + data: { | ||
26 | + start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) | ||
27 | + color_type: 0, //线条控制 | ||
28 | + color_type_one: 0, | ||
29 | + color_type_two: 1, | ||
30 | + | ||
31 | + gid: "", | ||
32 | + stoid: o.stoid, | ||
33 | + url: o.url, | ||
34 | + resourceUrl: o.h5_url, //公众号那边的图片文件域名 | ||
35 | + iurl: o.imghost, | ||
36 | + defaultAvatar: o.resourceUrl + "/static/images/user68.jpg", | ||
37 | + | ||
38 | + data: null, | ||
39 | + content: "", //商品详情 | ||
40 | + | ||
41 | + gallery: null, //图片滚动 | ||
42 | + is_collect: 0, | ||
43 | + collect_id: 0, | ||
44 | + cartGoodsNum: 0, | ||
45 | + specSelect: 0, | ||
46 | + optionItemId: 0, | ||
47 | + goodsInputNum: 1, | ||
48 | + openSpecModal: !1, | ||
49 | + | ||
50 | + activeCategoryId: 0, | ||
51 | + supportPageScroll: !1, | ||
52 | + address: { | ||
53 | + address: "", | ||
54 | + district: 0, | ||
55 | + }, | ||
56 | + shipping: "", | ||
57 | + shippingCost: 0, | ||
58 | + enterAddressPage: !1, | ||
59 | + categories: [{ | ||
60 | + name: "卡项", | ||
61 | + id: 0 | ||
62 | + }, { | ||
63 | + name: "详情", | ||
64 | + id: 1 | ||
65 | + },{ | ||
66 | + name: "评价", | ||
67 | + id: 2 | ||
68 | + }], | ||
69 | + activeCategoryId2: 0, | ||
70 | + categories2: [{ | ||
71 | + name: "商品详情", | ||
72 | + id: 0 | ||
73 | + }, { | ||
74 | + name: "规格参数", | ||
75 | + id: 1 | ||
76 | + }], | ||
77 | + activeCategoryId3: 1, // 点击评价-全部、有图、好评、中评时对应的id | ||
78 | + categories3: [{ | ||
79 | + name: "全部", | ||
80 | + id: 1, | ||
81 | + num: 0 | ||
82 | + }, | ||
83 | + { | ||
84 | + name: "有图", | ||
85 | + id: 5, | ||
86 | + num: 0 | ||
87 | + }, | ||
88 | + | ||
89 | + { | ||
90 | + name: "好评", | ||
91 | + id: 2, | ||
92 | + num: 0 | ||
93 | + }, { | ||
94 | + name: "中评", | ||
95 | + id: 3, | ||
96 | + num: 0 | ||
97 | + }, { | ||
98 | + name: "差评", | ||
99 | + id: 4, | ||
100 | + num: 0 | ||
101 | + }, | ||
102 | + ], | ||
103 | + | ||
104 | + select: { | ||
105 | + price: 0, | ||
106 | + stock: 0, | ||
107 | + specName: "", | ||
108 | + activity: null | ||
109 | + }, | ||
110 | + | ||
111 | + | ||
112 | + //门店相关 | ||
113 | + ismend: 0, | ||
114 | + is_sec_mend: 0, | ||
115 | + sto_sele_name: "", //选中的门店名称 | ||
116 | + sto_sele_id: "", //选中的门店id | ||
117 | + sto_sele_keyid:'', //选中的门店线下 | ||
118 | + sto_sele_distr: "", //选择的门店的配送方式 | ||
119 | + is_show_sto_cat: 1, //是否显示门店分类 | ||
120 | + only_pk: null, | ||
121 | + all_sto: null, | ||
122 | + sec_sto: null, //选择了的门店分类 | ||
123 | + pickpu_list: null, //读出的所有门店list | ||
124 | + def_pickpu_list: null, //一开始5个门店list | ||
125 | + sec_pick_index: 0, //第二级门店选择ID | ||
126 | + fir_pick_index: 0, //第一级门店选择ID | ||
127 | + all_pick_list:null,//所有的门店先记录起来 | ||
128 | + | ||
129 | + //联系电话 | ||
130 | + mobile: '', | ||
131 | + //商品的活动类型 0普通 1秒杀 2团购 3优惠 4 积分购 6拼单 | ||
132 | + timer: [], | ||
133 | + | ||
134 | + //商品的购买次数 | ||
135 | + prom_buy_num: -1, | ||
136 | + g_buy_num: null, | ||
137 | + | ||
138 | + //会员自己的购买的拼单商品的情况 | ||
139 | + //购买的订单 | ||
140 | + buy_order: null, | ||
141 | + //1加入购物车 2立即购买 | ||
142 | + openSpecModal_ind: 0, | ||
143 | + | ||
144 | + //---计时器开关---- | ||
145 | + is_timer: 1, | ||
146 | + isshow: 0, | ||
147 | + bconfig: null, //基础配置 | ||
148 | + | ||
149 | + //会员分享的头像 | ||
150 | + share_head: "", | ||
151 | + share_goods_img: "", | ||
152 | + | ||
153 | + //----------视频图片data参数--------- | ||
154 | + current: 0, //图片计数 | ||
155 | + swiperCurrent: 0, //轮播的下标 | ||
156 | + hiddenn: 0, //控制轮播计数显示 | ||
157 | + | ||
158 | + currentTab: 0, // 选择器控制参数 | ||
159 | + mapurl: "", | ||
160 | + mapurl_f_img: "", | ||
161 | + videopicture: 0, //视频图片的控制 | ||
162 | + | ||
163 | + video: 0, //视频图片切换器 | ||
164 | + index: 0, | ||
165 | + noon: 0, //开始视频的隐藏 | ||
166 | + | ||
167 | + screenWidth: 0, | ||
168 | + canvasHidden: 1, | ||
169 | + | ||
170 | + //--推荐-- | ||
171 | + store_config: null, | ||
172 | + is_show_pl: 0, //是否品类 | ||
173 | + is_show_pp: 0, //是否品牌 | ||
174 | + is_show_gb: 0, //是否国别 | ||
175 | + is_closecoupon: 0, | ||
176 | + | ||
177 | + | ||
178 | + select_store: 0, //选择更多 | ||
179 | + index: 1, | ||
180 | + more_store: 0, //选择门店 | ||
181 | + sort_store: 0, //门店分类 | ||
182 | + choice_sort_store: 0, //选择分类门店 | ||
183 | + new_user: 0, //新用户 | ||
184 | + | ||
185 | + def_pick_store: null, // 默认的门店 | ||
186 | + fir_def_store:null, //客户默认的门店的 | ||
187 | + lat: null, //维度 | ||
188 | + lon: null, //经度 | ||
189 | + | ||
190 | + is_get_local_ok: 0, //获取坐标是否完成 | ||
191 | + region_name: "门店分类", //区域的名字 | ||
192 | + is_gps: 1, | ||
193 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | ||
194 | + default_store: {}, //创建添加默认门店地址的对象 | ||
195 | + | ||
196 | + comments_no_more:0, | ||
197 | + | ||
198 | + is_collect_load:0, //是不是处理 | ||
199 | + is_newsales_rules:0, //是否开启最新的门店规则,此时会新读门店,当点击选择门店时会触发读取线下库存 | ||
200 | + sales_rules:1, //默认是线上销售 | ||
201 | + | ||
202 | + wait_for_user_store:null, | ||
203 | + poster:null, //自定义海报 | ||
204 | + share_b_img:'', //自定义分享的背景 | ||
205 | + showPoster: false, | ||
206 | + hui_condition:null, | ||
207 | + sto_sele_name_1:'',//分享的门店名称 | ||
208 | + | ||
209 | + // 秒杀 | ||
210 | + prom_st: null, | ||
211 | + prom_r_null: 0, | ||
212 | + | ||
213 | + hiddenCS: true, //控制客服操作菜单显示和控制 | ||
214 | + | ||
215 | + openSpecModal_flash_normal: 0, | ||
216 | + keyword:'', //门店搜索 | ||
217 | + sec_i:-1,//选中分类门店 下标 | ||
218 | + }, | ||
219 | + | ||
220 | + //------初始化加载---------- | ||
221 | + onLoad:function(t) { | ||
222 | + self = this; | ||
223 | + | ||
224 | + this.setData({ | ||
225 | + options: t, | ||
226 | + }); | ||
227 | + | ||
228 | + var ee = this, | ||
229 | + that = ee, | ||
230 | + th = ee, | ||
231 | + pre_id = t.pre_id, | ||
232 | + presell_id = t.prom_id, | ||
233 | + gid = t.goods_id, | ||
234 | + first_leader=t.first_leader, | ||
235 | + room_id = t.room_id, | ||
236 | + room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id | ||
237 | + | ||
238 | + var share_openid= t.share_openid; | ||
239 | + | ||
240 | + if(pre_id || presell_id){ | ||
241 | + if(!presell_id) presell_id=pre_id; | ||
242 | + if(!pre_id) pre_id=presell_id; | ||
243 | + } | ||
244 | + | ||
245 | + //检查测肤 | ||
246 | + getApp().check_skin_face(t,1,gid); | ||
247 | + | ||
248 | + //---获取手机地址坐标-- | ||
249 | + //--如果tg_id是空的话,分享回来-- | ||
250 | + if (gid == undefined || gid == null || gid == "") { | ||
251 | + var gid_str = decodeURIComponent(t.scene); | ||
252 | + gid_str=gid_str.split("_"); | ||
253 | + gid=gid_str[0]; | ||
254 | + if(gid_str.length>1){ | ||
255 | + first_leader=gid_str[1]; | ||
256 | + } | ||
257 | + //-- 如果有room_id的获取 -- | ||
258 | + if(gid_str.length>2 && gid_str[2]) { | ||
259 | + room_id=gid_str[2]; | ||
260 | + room_user_share=1; | ||
261 | + }; | ||
262 | + }; | ||
263 | + | ||
264 | + ee.setData({ gid: gid, pre_id: pre_id, presell_id: presell_id}); | ||
265 | + | ||
266 | + if(first_leader) { | ||
267 | + getApp().globalData.first_leader=first_leader; | ||
268 | + //调用接口判断是不是会员 | ||
269 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ | ||
270 | + if(res.data.code==0) { | ||
271 | + getApp().globalData.guide_id=res.data.data.id; | ||
272 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | ||
273 | + } | ||
274 | + }) | ||
275 | + } | ||
276 | + | ||
277 | + //-- 如果有房间号 -- | ||
278 | + if (room_id) { | ||
279 | + getApp().globalData.room_id = room_id; | ||
280 | + getApp().globalData.room_goods_id = gid; | ||
281 | + //如果是会员分享过来的要记录 | ||
282 | + if (room_user_share) | ||
283 | + getApp().globalData.room_user_share = room_user_share; | ||
284 | + | ||
285 | + if (share_openid) { | ||
286 | + this.get_room_share_guide(share_openid); | ||
287 | + } | ||
288 | + } | ||
289 | + | ||
290 | + | ||
291 | + var c_guide_id=t.c_guide_id; | ||
292 | + if(c_guide_id){ | ||
293 | + th.data.c_guide_id=c_guide_id; | ||
294 | + } | ||
295 | + | ||
296 | + getApp().getConfig(function(e) { | ||
297 | + ee.setData({sto_sele_name_1:e.store_name}) | ||
298 | + }) | ||
299 | + | ||
300 | + //----获取系统参数----- | ||
301 | + getApp().getConfig2(function (e) { | ||
302 | + ee.setData({ | ||
303 | + bconfig: e, | ||
304 | + sales_rules: e.sales_rules, | ||
305 | + }); | ||
306 | + | ||
307 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { | ||
308 | + ee.setData({ | ||
309 | + is_show_pl: 1 | ||
310 | + }); | ||
311 | + } | ||
312 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { | ||
313 | + ee.setData({ | ||
314 | + is_show_pp: 1 | ||
315 | + }); | ||
316 | + } | ||
317 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { | ||
318 | + ee.setData({ | ||
319 | + is_show_gb: 1 | ||
320 | + }); | ||
321 | + } | ||
322 | + // console.log(e); | ||
323 | + var json_d = JSON.parse(e.switch_list); | ||
324 | + ee.setData({ | ||
325 | + store_config: e, | ||
326 | + sys_switch: json_d, | ||
327 | + is_closecoupon: json_d.is_closecoupon, | ||
328 | + is_newsales_rules: json_d.is_newsales_rules | ||
329 | + }); | ||
330 | + ee.init(gid); | ||
331 | + | ||
332 | + //------几人评价------- | ||
333 | + //n.init(th, "", "comments"); | ||
334 | + wx.pageScrollTo && th.setData({ | ||
335 | + supportPageScroll: !0 | ||
336 | + }); | ||
337 | + | ||
338 | + }, 1); | ||
339 | + | ||
340 | + //获取用户设备信息,屏幕宽度 | ||
341 | + wx.getSystemInfo({ | ||
342 | + success: res => { | ||
343 | + that.setData({ | ||
344 | + screenWidth: res.screenWidth | ||
345 | + }) | ||
346 | + } | ||
347 | + }); | ||
348 | + | ||
349 | + }, | ||
350 | + | ||
351 | + //-- 获取直播的分享人的导购信息 -- | ||
352 | + async get_room_share_guide(share_openid) { | ||
353 | + | ||
354 | + var url = "/api/weshop/users/page"; | ||
355 | + var first_leader = 0; | ||
356 | + | ||
357 | + //调用接口判断是不是会员 | ||
358 | + await getApp().request.promiseGet(url, { | ||
359 | + data: { | ||
360 | + stoid: os.stoid, | ||
361 | + weapp_openid: share_openid | ||
362 | + } | ||
363 | + }).then(res => { | ||
364 | + if (ut.ajax_ok(res)) { | ||
365 | + first_leader = res.data.data.pageData[0].user_id; | ||
366 | + getApp().globalData.guide_id = res.data.data.id; | ||
367 | + } | ||
368 | + }) | ||
369 | + | ||
370 | + if (!first_leader) return false; | ||
371 | + | ||
372 | + getApp().globalData.first_leader = first_leader; | ||
373 | + | ||
374 | + //调用接口判断是不是会员 | ||
375 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | ||
376 | + if (res.data.code == 0) { | ||
377 | + getApp().globalData.guide_id = res.data.data.id; | ||
378 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id | ||
379 | + } | ||
380 | + }) | ||
381 | + | ||
382 | + }, | ||
383 | + | ||
384 | + | ||
385 | + onReady() { | ||
386 | + // 用于控制保障服务折叠图标的显示 | ||
387 | + setTimeout(() => { | ||
388 | + wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => { | ||
389 | + | ||
390 | + if(res.length != 0) { | ||
391 | + this.setData({ | ||
392 | + showFold: res[0].height < res[1].height, | ||
393 | + }); | ||
394 | + }; | ||
395 | + | ||
396 | + }).exec(); | ||
397 | + }, 1000); | ||
398 | + | ||
399 | + }, | ||
400 | + | ||
401 | + | ||
402 | + //------------程序初始化入口------------- | ||
403 | + async init(gid) { | ||
404 | + var ee = this, | ||
405 | + th = ee, | ||
406 | + gallery = null, | ||
407 | + is_collect = 0, | ||
408 | + collect_id = 0, | ||
409 | + categories3 = ee.data.categories3, | ||
410 | + fir_com = null, | ||
411 | + fir_quan = null, | ||
412 | + mapurl = null, | ||
413 | + mapurl_f_img = null; | ||
414 | + | ||
415 | + | ||
416 | + //------图片滚动---------- | ||
417 | + // await getApp().request.promiseGet("/api/weshop/goodsimages/page", { | ||
418 | + // data: { | ||
419 | + // store_id: os.stoid, | ||
420 | + // goods_id: gid, | ||
421 | + // }, | ||
422 | + // }).then(res => { | ||
423 | + | ||
424 | + // var t = res; | ||
425 | + // var g = t.data.data.pageData; | ||
426 | + // if (g.length == 0) { | ||
427 | + // var ie = { | ||
428 | + // "image_url": o.imghost + "/public/images/default_goods_image_240.gif" | ||
429 | + // }; | ||
430 | + // g.push(ie); | ||
431 | + // gallery = g; | ||
432 | + // return; | ||
433 | + // } | ||
434 | + // for (var i = 0; i < g.length; i++) { | ||
435 | + // if (g[i].image_url.indexOf(o.imghost) == -1) | ||
436 | + // g[i].image_url = o.imghost + g[i].image_url; | ||
437 | + // } | ||
438 | + // gallery = g; | ||
439 | + // }) | ||
440 | + | ||
441 | + | ||
442 | + // <---- 秒杀 | ||
443 | + | ||
444 | + //------是否收藏---------- | ||
445 | + await getApp().request.promiseGet("/api/weshop/goodscollect/page", { | ||
446 | + data: { | ||
447 | + store_id: os.stoid, | ||
448 | + goods_id: gid, | ||
449 | + user_id: oo.user_id, | ||
450 | + } | ||
451 | + }).then(res => { | ||
452 | + var t = res; | ||
453 | + var data = t.data.data.pageData; | ||
454 | + if (data && data.length > 0) { | ||
455 | + //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, }); | ||
456 | + is_collect = 1; | ||
457 | + collect_id = data[0].collect_id; | ||
458 | + } | ||
459 | + }) | ||
460 | + | ||
461 | + //------获取评价的统计数量---- | ||
462 | + await getApp().request.promiseGet("/api/weshop/serviceComment/countlist/", { | ||
463 | + data: { | ||
464 | + store_id: os.stoid, | ||
465 | + service_id: gid | ||
466 | + }, | ||
467 | + }).then(res => { | ||
468 | + console.log('get评价统计数量', res.data.data); | ||
469 | + var t = res; | ||
470 | + var g = t.data.data[0]; | ||
471 | + if (g != null && g != undefined) { | ||
472 | + var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5; | ||
473 | + var num2 = g.c4 + g.c5; | ||
474 | + var num3 = g.c3; | ||
475 | + var num4 = g.c0 + g.c1 + g.c2; | ||
476 | + | ||
477 | + var dd = ee.data.categories3; | ||
478 | + dd[0].num = allnum; | ||
479 | + dd[1].num = g.cimg; | ||
480 | + dd[2].num = num2; | ||
481 | + dd[3].num = num3; | ||
482 | + dd[4].num = num4; | ||
483 | + | ||
484 | + categories3 = dd; | ||
485 | + } | ||
486 | + }); | ||
487 | + | ||
488 | + //----获取详情页的评价---- | ||
489 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | ||
490 | + data: { | ||
491 | + store_id: os.stoid, | ||
492 | + service_id: gid, | ||
493 | + pageSize: 3, | ||
494 | + parent_id: 0, | ||
495 | + page: 1, | ||
496 | + is_show: 1, | ||
497 | + }, | ||
498 | + }).then(res => { | ||
499 | + console.log('get详情页评价', res.data.data); | ||
500 | + fir_com = res.data.data.pageData; | ||
501 | + }); | ||
502 | + | ||
503 | + if (fir_com) { | ||
504 | + for (var ind in fir_com) { | ||
505 | + if (fir_com[ind].head_pic == "") fir_com[ind].head_pic = ee.data.iurl + "/miniapp/images/hui_hear_pic.png"; | ||
506 | + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); | ||
507 | + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); | ||
508 | + } | ||
509 | + }; | ||
510 | + | ||
511 | + | ||
512 | + // if (th.data.is_closecoupon != 1 && (!th.data.fir_quan || th.data.fir_quan.length<=0)) { | ||
513 | + // //----获取详情页的券的数量---- | ||
514 | + // await getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { | ||
515 | + // data: { | ||
516 | + // store_id: os.stoid, | ||
517 | + // type: 1, | ||
518 | + // pageSize: 3, | ||
519 | + // page: 1, | ||
520 | + // is_share: 0, | ||
521 | + // }, | ||
522 | + // }).then(res1 => { | ||
523 | + // fir_quan = res1.data.data.pageData; | ||
524 | + // }) | ||
525 | + // } | ||
526 | + | ||
527 | + | ||
528 | + //this.getHistoryBuy(); //获取历史购买 | ||
529 | + ee.setData({ | ||
530 | + is_collect: is_collect, | ||
531 | + collect_id: collect_id, | ||
532 | + categories3: categories3, | ||
533 | + fir_quan: fir_quan, | ||
534 | + fir_comments: fir_com, | ||
535 | + // cardComments: fir_com, | ||
536 | + }); | ||
537 | + | ||
538 | + }, | ||
539 | + | ||
540 | + //检测有没有导购分享的门店 | ||
541 | + check_guide(func){ | ||
542 | + var first_leader=getApp().globalData.first_leader; | ||
543 | + if(!first_leader){ | ||
544 | + func(); | ||
545 | + return false; | ||
546 | + } | ||
547 | + if(this.data.is_geted_guide_pick){ | ||
548 | + func(); | ||
549 | + return false; | ||
550 | + } | ||
551 | + | ||
552 | + if(getApp().globalData.guide_pick_id){ | ||
553 | + func(); | ||
554 | + return false; | ||
555 | + } | ||
556 | + var th=this; | ||
557 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | ||
558 | + if (res.data.code == 0) { | ||
559 | + getApp().globalData.guide_pick_id= res.data.data.pickup_id; | ||
560 | + } | ||
561 | + th.data.is_geted_guide_pick=1; | ||
562 | + func(); | ||
563 | + }) | ||
564 | + }, | ||
565 | + | ||
566 | + //---展示--- | ||
567 | + // gid 在onload阶段已经保存在this.data中 | ||
568 | + onShow: function() { | ||
569 | + | ||
570 | + //-- 看一下隐私政策要不要显示 -- | ||
571 | + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id | ||
572 | + if (privacy_pop) { | ||
573 | + privacy_pop.check_pri_show(); | ||
574 | + } | ||
575 | + | ||
576 | + getApp().check_can_share(); | ||
577 | + | ||
578 | + var that=this;var th=this; | ||
579 | + var ee = this,gid = this.data.gid, i = getApp().request; | ||
580 | + | ||
581 | + //判断是不是要跳转到拼团服务卡 | ||
582 | + getApp().check_go_fw(gid,function (act,url){ | ||
583 | + | ||
584 | + if(act){ | ||
585 | + wx.redirectTo({ | ||
586 | + url:url | ||
587 | + }) | ||
588 | + return false; | ||
589 | + } | ||
590 | + | ||
591 | + th.data.is_timer = 1; | ||
592 | + //获取用户的默认门店 | ||
593 | + th.check_guide(()=>{ | ||
594 | + getApp().get_user_store(function(e) { | ||
595 | + if(!e) { | ||
596 | + th.data.fir_def_store={}; //赋值空对象 | ||
597 | + return false; | ||
598 | + } | ||
599 | + | ||
600 | + if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) | ||
601 | + | ||
602 | + var ee=JSON.parse(JSON.stringify(e)); | ||
603 | + console.log(e); | ||
604 | + | ||
605 | + //--定时器推迟一下-- | ||
606 | + var appd=getApp().globalData; | ||
607 | + var w_time = setInterval(function() { | ||
608 | + if (that.data.is_get_local_ok == 0) return false; | ||
609 | + if(!th.data.data){ | ||
610 | + return false; | ||
611 | + } | ||
612 | + var ser_card=th.data.data; | ||
613 | + //--如果默认门店不在等级卡的默认们店以内 | ||
614 | + if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(ee.keyid)==-1){ | ||
615 | + ee.is_no_dis=1; | ||
616 | + } | ||
617 | + | ||
618 | + | ||
619 | + clearInterval(w_time); | ||
620 | + var distance = null; | ||
621 | + var e=JSON.parse(JSON.stringify(ee)); | ||
622 | + | ||
623 | + //如果有开启近距离的话,同时距离优不一样了 | ||
624 | + if (that.data.lat != null) { | ||
625 | + //如果经纬度有变化的话 | ||
626 | + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){ | ||
627 | + that.data.fir_def_store=e; | ||
628 | + that.setData({ | ||
629 | + def_pick_store: e, | ||
630 | + sto_sele_name: e.pickup_name, | ||
631 | + sto_sele_id: e.pickup_id, | ||
632 | + sto_sele_distr: e.distr_type, | ||
633 | + sto_sele_keyid:e.keyid, | ||
634 | + }) | ||
635 | + }else{ | ||
636 | + //要用接口是获取距离,js的计算不准 | ||
637 | + getApp().request.promiseGet("/api/weshop/pickup/list",{ | ||
638 | + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon, is_pos: 1}, | ||
639 | + }).then(res=>{ | ||
640 | + if(ut.ajax_ok(res)){ | ||
641 | + e=res.data.data.pageData[0]; | ||
642 | + if (e){ | ||
643 | + e.is_no_dis=ee.is_no_dis; | ||
644 | + appd.pk_store=e; | ||
645 | + that.data.fir_def_store=e; | ||
646 | + | ||
647 | + console.log('get_user_store--2'); | ||
648 | + console.log(e); | ||
649 | + | ||
650 | + that.setData({ | ||
651 | + def_pick_store: e, | ||
652 | + sto_sele_name: e.pickup_name, | ||
653 | + sto_sele_id: e.pickup_id, | ||
654 | + sto_sele_distr: e.distr_type, | ||
655 | + sto_sele_keyid:e.keyid, | ||
656 | + }) | ||
657 | + } | ||
658 | + | ||
659 | + } | ||
660 | + }) | ||
661 | + } | ||
662 | + | ||
663 | + //e.distance = distance; | ||
664 | + appd.lat=that.data.lat; | ||
665 | + appd.lon=that.data.lon; | ||
666 | + | ||
667 | + } else { | ||
668 | + if (e) { | ||
669 | + | ||
670 | + console.log('get_user_store3---'); | ||
671 | + console.log(e); | ||
672 | + | ||
673 | + e.distance = null; | ||
674 | + that.data.fir_def_store=e; | ||
675 | + that.setData({ | ||
676 | + def_pick_store: e, | ||
677 | + sto_sele_name: e.pickup_name, | ||
678 | + sto_sele_id: e.pickup_id, | ||
679 | + sto_sele_distr: e.distr_type, | ||
680 | + sto_sele_keyid:e.keyid, | ||
681 | + }) | ||
682 | + } | ||
683 | + } | ||
684 | + }, 200) | ||
685 | + | ||
686 | + | ||
687 | + }); | ||
688 | + }) | ||
689 | + | ||
690 | + th.wait_for_store_config(); | ||
691 | + | ||
692 | + th.get_pre_prom(()=>{ | ||
693 | + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { | ||
694 | + failRollback: !0, | ||
695 | + success: function(t) { | ||
696 | + if (t.data.code == 0) { | ||
697 | + // console.log('GET pic and video'); | ||
698 | + if(t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_url) { | ||
699 | + that.setData({ | ||
700 | + mapurl: t.data.data.listServiceVideos[0].video_url, | ||
701 | + }); | ||
702 | + }; | ||
703 | + if(t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_img) { | ||
704 | + that.setData({ | ||
705 | + mapurl_f_img: t.data.data.listServiceVideos[0].video_img, | ||
706 | + }); | ||
707 | + }; | ||
708 | + if(t.data.data.listServiceImages) { | ||
709 | + that.setData({ | ||
710 | + gallery: t.data.data.listServiceImages, | ||
711 | + }); | ||
712 | + }; | ||
713 | + if(t.data.data.listServiceItem) { | ||
714 | + that.setData({ | ||
715 | + listServiceItem: t.data.data.listServiceItem, | ||
716 | + }); | ||
717 | + }; | ||
718 | + that.setData({ | ||
719 | + 'data.goods_name': t.data.data.serviceName, | ||
720 | + 'data.shop_price': t.data.data.money, | ||
721 | + 'data.show_price': t.data.data.show_price, | ||
722 | + 'data.validDays': t.data.data.validDays, | ||
723 | + 'data.serviceContent': t.data.data.serviceContent, | ||
724 | + 'data.image_url': t.data.data.imgUrl, | ||
725 | + 'data.goods_id': t.data.data.id, | ||
726 | + 'data.id': t.data.data.id, | ||
727 | + 'data.sales_sum': t.data.data.sales_sum, | ||
728 | + 'data.storageId':t.data.data.storageId, | ||
729 | + 'data.service_sn':t.data.data.serviceSn, | ||
730 | + 'data.listServiceVideos': t.data.data.listServiceVideos, | ||
731 | + // gallery: t.data.data.listServiceImages, | ||
732 | + // mapurl: t.data.data.listServiceVideos[0].video_url, | ||
733 | + // mapurl_f_img: t.data.data.listServiceVideos[0].video_img, | ||
734 | + //listServiceItem: t.data.data.listServiceItem, | ||
735 | + }); | ||
736 | + | ||
737 | + that.getTaohe(); | ||
738 | + // ----> 预售 | ||
739 | + let prom_type = th.data.options.prom_type; | ||
740 | + | ||
741 | + let goods_id = th.data.options.goods_id; | ||
742 | + if(!goods_id) goods_id = th.data.data.goods_id; | ||
743 | + | ||
744 | + //-----商品详情--- | ||
745 | + if(!t.data.data.serviceContent) t.data.data.serviceContent=" "; | ||
746 | + a.wxParse("content", "html", ut.format_content(t.data.data.serviceContent), ee, 6); | ||
747 | + e.wxParseAddFullImageUrl(ee, "content"); | ||
748 | + | ||
749 | + //获取重表 | ||
750 | + getApp().promiseGet("/api/weshop/serviceItem/list",{ | ||
751 | + data:{store_id:o.stoid,service_id:t.data.data.id} | ||
752 | + }).then(res=>{ | ||
753 | + if(res.data.code==0){ | ||
754 | + var list=res.data.data; | ||
755 | + that.setData({service_list:list}) | ||
756 | + } | ||
757 | + }) | ||
758 | + | ||
759 | + } else { | ||
760 | + wx.showModal({ | ||
761 | + title: t.data.msg, | ||
762 | + showCancel: !1, | ||
763 | + complete: function() { | ||
764 | + wx.navigateBack(); | ||
765 | + } | ||
766 | + }); | ||
767 | + }; | ||
768 | + } | ||
769 | + }); | ||
770 | + | ||
771 | + th.data.enterAddressPage && (this.data.enterAddressPage = !1); | ||
772 | + | ||
773 | + }) | ||
774 | + | ||
775 | + | ||
776 | + }) | ||
777 | + }, | ||
778 | + | ||
779 | + enterAddress: function() { | ||
780 | + this.data.enterAddressPage = !0, wx.navigateTo({ | ||
781 | + url: "/packageF/pages/user/address_list/address_list?operate=selectAddress" | ||
782 | + }); | ||
783 | + }, | ||
784 | + | ||
785 | + onUnload: function() { | ||
786 | + // for(var i = 1; i < 100; i++) { | ||
787 | + // clearInterval(i); | ||
788 | + // } | ||
789 | + }, | ||
790 | + | ||
791 | + onHide: function() { | ||
792 | + this.data.is_timer = 0; | ||
793 | + // for(var i = 1; i < 100; i++) { | ||
794 | + // clearInterval(i); | ||
795 | + // } | ||
796 | + }, | ||
797 | + //----------三个选项按钮----------- | ||
798 | + tabClick: function(t) { | ||
799 | + var e = t.currentTarget.id; | ||
800 | + this.setData({ | ||
801 | + activeCategoryId: e | ||
802 | + }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); | ||
803 | + }, | ||
804 | + | ||
805 | + // tabClick2: function(t) { | ||
806 | + // this.setData({ | ||
807 | + // activeCategoryId2: t.currentTarget.id | ||
808 | + // }); | ||
809 | + // }, | ||
810 | + | ||
811 | + tabClick3: function(t) { | ||
812 | + var e = this; | ||
813 | + if (t.currentTarget.id != this.data.activeCategoryId3) { | ||
814 | + e.data.c_curr_p = 1; | ||
815 | + this.setData({ | ||
816 | + activeCategoryId3: t.currentTarget.id, | ||
817 | + comments: null,comments_no_more:0,get_c:0, | ||
818 | + }); | ||
819 | + this.requestComments_new(); | ||
820 | + } | ||
821 | + }, | ||
822 | + | ||
823 | + // doScrollTop: function() { | ||
824 | + // wx.pageScrollTo({ | ||
825 | + // scrollTop: 0 | ||
826 | + // }); | ||
827 | + // }, | ||
828 | + | ||
829 | + tabComment: function() { | ||
830 | + this.setData({ | ||
831 | + activeCategoryId: 2,comments_no_more:0,get_c:0 | ||
832 | + }), this.data.comments || this.requestComments_new(); | ||
833 | + }, | ||
834 | + | ||
835 | + //商品详情的时候调用 | ||
836 | + tabGoodsContent: function() { | ||
837 | + var th = this, | ||
838 | + i = getApp().request; | ||
839 | + this.setData({ | ||
840 | + activeCategoryId: 1 | ||
841 | + }); | ||
842 | + }, | ||
843 | + | ||
844 | + | ||
845 | + | ||
846 | + //------------加入购物车-------------- | ||
847 | + addCart: async function(t) { | ||
848 | + var th = this; | ||
849 | + var ind = t.currentTarget.dataset.openSpecModal_ind; | ||
850 | + var action= t.currentTarget.dataset.action; | ||
851 | + | ||
852 | + | ||
853 | + | ||
854 | + if(getApp().is_sp_hao() && action=='add'){ | ||
855 | + wx.showToast({ | ||
856 | + title: "视频号商品不允许加入购物车", | ||
857 | + icon: 'none', | ||
858 | + duration: 2000 | ||
859 | + }); | ||
860 | + return false; | ||
861 | + } | ||
862 | + | ||
863 | + | ||
864 | + if(this.data.goodsInputNum==0){ | ||
865 | + getApp().my_warnning('请输入购买数量', 1, th, 450); | ||
866 | + return false; | ||
867 | + } | ||
868 | + | ||
869 | + | ||
870 | + | ||
871 | + if(!ind) ind = t.currentTarget.dataset.openspecmodal_ind; | ||
872 | + | ||
873 | + th.setData({ | ||
874 | + open_ind_store: ind | ||
875 | + }); | ||
876 | + | ||
877 | + if(!th.data.sto_sele_name) { | ||
878 | + getApp().my_warnning('请选择门店', 1, th, 450); | ||
879 | + return false; | ||
880 | + }; | ||
881 | + | ||
882 | + // 库存 | ||
883 | + var redisNums = 0; | ||
884 | + // 限购数 | ||
885 | + var limitNum = 0; | ||
886 | + // 已购买数量 | ||
887 | + var boughtNum = 0; | ||
888 | + | ||
889 | + var is_ok=1; | ||
890 | + | ||
891 | + // 秒杀活动 | ||
892 | + if(this.data.prom_type == 1) { | ||
893 | + // 如果是秒杀活动下的单独购买,is_normal为1 | ||
894 | + if(this.data.openSpecModal_flash_normal) this.data.is_normal = 1; | ||
895 | + | ||
896 | + if(!this.data.is_normal) {// 秒杀购买 | ||
897 | + | ||
898 | + // 获取redis当前可以购买的数量 | ||
899 | + // 如果数量为0,设置和显示已抢光 | ||
900 | + // 否则,进一步判断是否超出限购或超出库存 | ||
901 | + await this.getactLen().then(async function(res) { | ||
902 | + redisNums = res; | ||
903 | + let curNum = th.data.goodsInputNum; | ||
904 | + // res: redis可购买数量 | ||
905 | + console.log('当前可以购买的数量:', res); | ||
906 | + if(res <= 0) { | ||
907 | + // 可购买数量<=0, 设置和显示已抢光 | ||
908 | + th.setData({ | ||
909 | + prom_r_null: 1, | ||
910 | + }); | ||
911 | + // wx.showModal({ | ||
912 | + // title: '超出活动库存', | ||
913 | + // }); | ||
914 | + getApp().my_warnning('超出活动库存', 0, self); | ||
915 | + is_ok=0; | ||
916 | + return false; | ||
917 | + } else { | ||
918 | + // 可购买数量>0 | ||
919 | + // 计算自己还可以购买的数量 | ||
920 | + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b | ||
921 | + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存 | ||
922 | + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 | ||
923 | + let actInfo = th.data.sele_g; | ||
924 | + await th.get_buy_num2().then(function (data) { | ||
925 | + let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a | ||
926 | + let promcardbuynum = data.data.data.promcardbuynum; | ||
927 | + let buyedNum = promcardbuynum; // 自己已经购买的数量b | ||
928 | + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | ||
929 | + limitNum = limited; | ||
930 | + boughtNum = buyedNum; | ||
931 | + | ||
932 | + if(canBuyNum <= 0) { | ||
933 | + canBuyNum = 0; | ||
934 | + }; | ||
935 | + | ||
936 | + if(canBuyNum > res) { | ||
937 | + if(curNum > res) { // t当前增减的数量 | ||
938 | + // wx.showModal({ | ||
939 | + // title: '超出活动库存', | ||
940 | + // }); | ||
941 | + getApp().my_warnning('超出活动库存', 0, self); | ||
942 | + th.setData({ | ||
943 | + goodsInputNum: res || 1 | ||
944 | + }); | ||
945 | + is_ok=0; | ||
946 | + return false; | ||
947 | + }; | ||
948 | + }; | ||
949 | + | ||
950 | + if(canBuyNum <= res) { | ||
951 | + if(curNum > canBuyNum) { | ||
952 | + // wx.showModal({ | ||
953 | + // title: '超出限购数量', | ||
954 | + // }); | ||
955 | + getApp().my_warnning('超出限购数量', 0, self); | ||
956 | + th.setData({ | ||
957 | + goodsInputNum: canBuyNum || 1, | ||
958 | + }); | ||
959 | + is_ok=0; | ||
960 | + return false; | ||
961 | + } | ||
962 | + } | ||
963 | + }) | ||
964 | + | ||
965 | + } | ||
966 | + }) | ||
967 | + | ||
968 | + } | ||
969 | + } | ||
970 | + | ||
971 | + | ||
972 | + if(!is_ok) return false; | ||
973 | + | ||
974 | + | ||
975 | + | ||
976 | + if(action=="buy"){ | ||
977 | + //--------------此时操作的数据------------ | ||
978 | + var newd = { | ||
979 | + id: th.data.data.id, | ||
980 | + goods_num: th.data.goodsInputNum, | ||
981 | + pick_id: th.data.sto_sele_id, | ||
982 | + keyid: th.data.sto_sele_keyid, | ||
983 | + }; | ||
984 | + newd['pick_name'] = th.data.sto_sele_name; | ||
985 | + newd['guide_id'] = getApp().globalData.guide_id; | ||
986 | + newd['guide_type']=0; | ||
987 | + | ||
988 | + if(getApp().globalData.groupchat_id){ | ||
989 | + newd['groupchat_id'] = getApp().globalData.groupchat_id; | ||
990 | + } | ||
991 | + if(this.data.prom_type && this.data.prom_type == 1) { | ||
992 | + newd['prom_type'] = this.data.prom_type; | ||
993 | + newd['prom_id'] = this.data.prom_id; | ||
994 | + newd['prom_price'] = this.data.prom_price; | ||
995 | + }; | ||
996 | + | ||
997 | + if(this.data.prom_type == 1 && this.data.openSpecModal_flash_normal) { | ||
998 | + newd['prom_type'] = 0; | ||
999 | + newd['prom_price'] = this.data.data.shop_price; | ||
1000 | + }; | ||
1001 | + | ||
1002 | + console.log('newd++++++++', newd); | ||
1003 | + th.buyNow(newd); | ||
1004 | + } else { | ||
1005 | + | ||
1006 | + var newd = { | ||
1007 | + service_id: th.data.data.id, | ||
1008 | + service_sn:th.data.data.service_sn, | ||
1009 | + service_name:th.data.data.goods_name, | ||
1010 | + goods_num: th.data.goodsInputNum, | ||
1011 | + pick_id: th.data.sto_sele_id, | ||
1012 | + user_id:oo.user_id, | ||
1013 | + store_id:os.stoid, | ||
1014 | + money:th.data.data.shop_price, | ||
1015 | + }; | ||
1016 | + if(getApp().globalData.guide_id) { | ||
1017 | + newd['guide_id'] = getApp().globalData.guide_id; | ||
1018 | + newd['guide_type']=0; | ||
1019 | + }; | ||
1020 | + if(getApp().globalData.groupchat_id){ | ||
1021 | + newd['groupchat_id'] = getApp().globalData.groupchat_id; | ||
1022 | + } | ||
1023 | + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价 | ||
1024 | + if(th.data.options.prom_type == 1) { | ||
1025 | + newd['prom_type'] = th.data.options.prom_type; | ||
1026 | + newd['prom_id'] = th.data.options.prom_id; | ||
1027 | + if(th.data.openSpecModal_flash_normal) { | ||
1028 | + newd['money'] = th.data.data.shop_price; | ||
1029 | + newd['is_pd_normal'] = 1; | ||
1030 | + } else { | ||
1031 | + newd['money'] = th.data.prom_price; | ||
1032 | + }; | ||
1033 | + }; | ||
1034 | + | ||
1035 | + | ||
1036 | + //----先看会员在购物车中是否加入了该商品----- | ||
1037 | + getApp().request.get("/api/weshop/cartService/page", { | ||
1038 | + data: { | ||
1039 | + store_id: os.stoid, | ||
1040 | + user_id: oo.user_id, | ||
1041 | + service_id: th.data.data.id, | ||
1042 | + }, | ||
1043 | + success: function(re) { | ||
1044 | + //-------如果购物车中有相关的数据--------- | ||
1045 | + if (re.data.data.total > 0) { | ||
1046 | + var item = null; | ||
1047 | + // 多门店问题 | ||
1048 | + var cartGoodsNum = 0; | ||
1049 | + const tmpObj = re.data.data.pageData; | ||
1050 | + for (let i = 0; i < tmpObj.length; i++) { | ||
1051 | + if (th.data.sto_sele_id != tmpObj[i].pick_id) { | ||
1052 | + cartGoodsNum += parseInt(tmpObj[i].goods_num); | ||
1053 | + } else { | ||
1054 | + item = tmpObj[i]; | ||
1055 | + } | ||
1056 | + } | ||
1057 | + // 当前门店同类商品还没加入到购物车 但是有其他门店的同类商品 | ||
1058 | + if (th.data.prom_type == 1 && !th.data.is_normal && !item) { | ||
1059 | + | ||
1060 | + // 秒杀购物车购买 修正数量 | ||
1061 | + var snum = limitNum - boughtNum; | ||
1062 | + if (snum <= 0) { | ||
1063 | + // wx.showModal({ | ||
1064 | + // title: '超出限购数量', | ||
1065 | + // }); | ||
1066 | + getApp().my_warnning('超出限购数量', 0, self); | ||
1067 | + return false; | ||
1068 | + } | ||
1069 | + | ||
1070 | + var cSnum = snum- cartGoodsNum <= 0 ? 0 : snum- cartGoodsNum; | ||
1071 | + var cRedisNums = redisNums- cartGoodsNum <= 0 ? 0 : redisNums- cartGoodsNum; | ||
1072 | + | ||
1073 | + if (newd['goods_num'] >= redisNums){ | ||
1074 | + if (redisNums > snum) { | ||
1075 | + newd['goods_num'] = cSnum; | ||
1076 | + } else { | ||
1077 | + newd['goods_num'] = cRedisNums; | ||
1078 | + } | ||
1079 | + } else { | ||
1080 | + if (newd['goods_num'] > snum) newd['goods_num'] = cSnum; | ||
1081 | + } | ||
1082 | + | ||
1083 | + if (newd['goods_num'] <= 0) { | ||
1084 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
1085 | + th.closeSpecModal(); | ||
1086 | + return false; | ||
1087 | + } | ||
1088 | + getApp().request.post("/api/weshop/cartService/save", { | ||
1089 | + data: newd, | ||
1090 | + success: function(t) { | ||
1091 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
1092 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | ||
1093 | + th.setData({ | ||
1094 | + cartGoodsNum: c_num | ||
1095 | + }); | ||
1096 | + th.closeSpecModal(); | ||
1097 | + } | ||
1098 | + }); | ||
1099 | + return false; | ||
1100 | + } | ||
1101 | + | ||
1102 | + // 以下为当前门店同类商品已经加入到购物车 | ||
1103 | + var totalNum = th.data.goodsInputNum + item.goods_num; | ||
1104 | + | ||
1105 | + // 秒杀购物车购买 修正数量 | ||
1106 | + if (th.data.prom_type == 1 && !th.data.is_normal) { | ||
1107 | + var snum = limitNum - boughtNum; | ||
1108 | + if (snum <= 0) { | ||
1109 | + // wx.showModal({ | ||
1110 | + // title: '超出限购数量', | ||
1111 | + // }); | ||
1112 | + getApp().my_warnning('超出限购数量', 0, self); | ||
1113 | + return false; | ||
1114 | + } | ||
1115 | + if (totalNum >= redisNums){ | ||
1116 | + if (redisNums > snum) { | ||
1117 | + totalNum = snum- cartGoodsNum; | ||
1118 | + } else { | ||
1119 | + totalNum = redisNums- cartGoodsNum; | ||
1120 | + } | ||
1121 | + } else { | ||
1122 | + if (totalNum > snum) | ||
1123 | + totalNum = snum- cartGoodsNum; | ||
1124 | + } | ||
1125 | + } | ||
1126 | + | ||
1127 | + var updata = { | ||
1128 | + id: item.id, | ||
1129 | + goods_num: totalNum, | ||
1130 | + money: th.data.data.shop_price, | ||
1131 | + store_id: os.stoid, | ||
1132 | + }; | ||
1133 | + | ||
1134 | + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价 | ||
1135 | + if(th.data.options.prom_type == 1) { | ||
1136 | + // updata['prom_type'] = th.data.options.prom_type; | ||
1137 | + // updata['prom_id'] = th.data.options.prom_id; | ||
1138 | + if(th.data.openSpecModal_flash_normal) { | ||
1139 | + updata['money'] = th.data.data.shop_price; | ||
1140 | + updata['is_pd_normal'] = 1; | ||
1141 | + } else { | ||
1142 | + updata['money'] = th.data.prom_price; | ||
1143 | + }; | ||
1144 | + }; | ||
1145 | + | ||
1146 | + if (getApp().globalData.guide_id) { | ||
1147 | + updata['guide_id'] = getApp().globalData.guide_id; | ||
1148 | + updata['guide_type'] = 1; | ||
1149 | + } | ||
1150 | + if(getApp().globalData.groupchat_id){ | ||
1151 | + updata['groupchat_id'] = getApp().globalData.groupchat_id; | ||
1152 | + } | ||
1153 | + getApp().request.put("/api/weshop/cartService/update", { | ||
1154 | + data: updata, | ||
1155 | + success: function(t) { | ||
1156 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
1157 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | ||
1158 | + th.setData({ | ||
1159 | + cartGoodsNum: c_num | ||
1160 | + }); | ||
1161 | + th.closeSpecModal(); | ||
1162 | + } | ||
1163 | + }); | ||
1164 | + } else { | ||
1165 | + getApp().request.post("/api/weshop/cartService/save", { | ||
1166 | + data: newd, | ||
1167 | + success: function(t) { | ||
1168 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
1169 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | ||
1170 | + th.setData({ | ||
1171 | + cartGoodsNum: c_num | ||
1172 | + }); | ||
1173 | + th.closeSpecModal(); | ||
1174 | + } | ||
1175 | + }); | ||
1176 | + } | ||
1177 | + } | ||
1178 | + }); | ||
1179 | + | ||
1180 | + }; | ||
1181 | + | ||
1182 | + | ||
1183 | + | ||
1184 | + | ||
1185 | + | ||
1186 | + | ||
1187 | + | ||
1188 | + }, | ||
1189 | + | ||
1190 | + //----------立即购买----------- | ||
1191 | + buyNow: function(e) { | ||
1192 | + getApp().globalData.service_now=e; | ||
1193 | + wx.redirectTo({ | ||
1194 | + url: "/packageA/pages/cart2_ser/cart2_ser", | ||
1195 | + }); | ||
1196 | + }, | ||
1197 | + //----------增加购买数量----------- | ||
1198 | + addCartNum: function(t) { | ||
1199 | + this.checkCartNum(this.data.goodsInputNum + 1); | ||
1200 | + }, | ||
1201 | + //----------减少购买数量----------- | ||
1202 | + subCartNum: function(t) { | ||
1203 | + this.checkCartNum(this.data.goodsInputNum - 1); | ||
1204 | + }, | ||
1205 | + //----------输入框输入购买数量----------- | ||
1206 | + inputCartNum: function(t) { | ||
1207 | + this.checkCartNum(Number(t.detail.value)); | ||
1208 | + }, | ||
1209 | + | ||
1210 | + //------检查数量是不是超出限购------ | ||
1211 | + checkCartNum: async function(t) { | ||
1212 | + var th = this; | ||
1213 | + | ||
1214 | + if(!th.data.def_pick_store) { | ||
1215 | + wx.showModal({title: '请选择门店',}); | ||
1216 | + return false; | ||
1217 | + }; | ||
1218 | + | ||
1219 | + // 非秒杀活动 | ||
1220 | + if(this.data.prom_type != 1) { | ||
1221 | + this.setData({ | ||
1222 | + goodsInputNum: t, | ||
1223 | + }); | ||
1224 | + }; | ||
1225 | + | ||
1226 | + // 秒杀活动 | ||
1227 | + if(this.data.prom_type == 1) { | ||
1228 | + // 如果是秒杀活动下的单独购买,is_normal为1 | ||
1229 | + if(this.data.openSpecModal_flash_normal) this.data.is_normal = 1; | ||
1230 | + | ||
1231 | + if(this.data.is_normal) {// 单独购买 | ||
1232 | + this.setData({ | ||
1233 | + goodsInputNum: t, | ||
1234 | + }); | ||
1235 | + } else {// 秒杀购买 | ||
1236 | + | ||
1237 | + // 获取redis当前可以购买的数量 | ||
1238 | + // 如果数量为0,设置和显示已抢光 | ||
1239 | + // 否则,进一步判断是否超出限购或超出库存 | ||
1240 | + await this.getactLen().then(async function(res) { | ||
1241 | + // res: redis可购买数量 | ||
1242 | + // console.log('当前可以购买的数量:', res); | ||
1243 | + if(res <= 0) { | ||
1244 | + // 可购买数量<=0, 设置和显示已抢光 | ||
1245 | + th.setData({ | ||
1246 | + prom_r_null: 1, | ||
1247 | + }); | ||
1248 | + } else { | ||
1249 | + // 可购买数量>0 | ||
1250 | + // 计算自己还可以购买的数量 | ||
1251 | + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b | ||
1252 | + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存 | ||
1253 | + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 | ||
1254 | + let actInfo = th.data.sele_g; | ||
1255 | + await th.get_buy_num2().then(function (data) { | ||
1256 | + let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a | ||
1257 | + let promcardbuynum = data.data.data.promcardbuynum; | ||
1258 | + let buyedNum = promcardbuynum; // 自己已经购买的数量b | ||
1259 | + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | ||
1260 | + | ||
1261 | + if(canBuyNum <= 0) { | ||
1262 | + canBuyNum = 0; | ||
1263 | + }; | ||
1264 | + | ||
1265 | + if(limited > res) { | ||
1266 | + if(t > res) { // t当前增减的数量 | ||
1267 | + // wx.showModal({ | ||
1268 | + // title: '超出活动库存', | ||
1269 | + // }); | ||
1270 | + getApp().my_warnning('超出活动库存', 0, self); | ||
1271 | + th.setData({ | ||
1272 | + goodsInputNum: res || 1, | ||
1273 | + }); | ||
1274 | + return false; | ||
1275 | + }; | ||
1276 | + }; | ||
1277 | + | ||
1278 | + if(limited <= res) { | ||
1279 | + if(t>canBuyNum) { | ||
1280 | + // wx.showModal({ | ||
1281 | + // title: '超出限购数量', | ||
1282 | + // }); | ||
1283 | + getApp().my_warnning('超出限购数量', 0, self); | ||
1284 | + th.setData({ | ||
1285 | + goodsInputNum: canBuyNum || 1, | ||
1286 | + }); | ||
1287 | + return false; | ||
1288 | + }; | ||
1289 | + }; | ||
1290 | + | ||
1291 | + th.setData({ | ||
1292 | + goodsInputNum: t, | ||
1293 | + }); | ||
1294 | + }); | ||
1295 | + }; | ||
1296 | + }); | ||
1297 | + | ||
1298 | + } | ||
1299 | + | ||
1300 | + | ||
1301 | + }; | ||
1302 | + | ||
1303 | + | ||
1304 | + | ||
1305 | + | ||
1306 | + | ||
1307 | + | ||
1308 | + | ||
1309 | + | ||
1310 | + | ||
1311 | + | ||
1312 | + | ||
1313 | + // var e = th.data.sele_g.goods_num; | ||
1314 | + // var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4 | ||
1315 | + // if (th.data.sales_rules == 2 && (p_type != 1 && p_type != 4 && p_type != 6 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) { | ||
1316 | + // if (!th.data.def_pick_store) { | ||
1317 | + // wx.showModal({title: '请选择门店',}); | ||
1318 | + // return false; | ||
1319 | + // } else { | ||
1320 | + // e = th.data.def_pick_store.CanOutQty; | ||
1321 | + // } | ||
1322 | + // } | ||
1323 | + | ||
1324 | + | ||
1325 | + // th.setData({goodsInputNum: t}); | ||
1326 | + | ||
1327 | + // }); | ||
1328 | + | ||
1329 | + | ||
1330 | + }, | ||
1331 | + | ||
1332 | + | ||
1333 | + closeSpecModal: function() { | ||
1334 | + this.setData({ | ||
1335 | + openSpecModal: !1, | ||
1336 | + openSpecModal_pt: !1, | ||
1337 | + openSpecModal_flash_normal: !1, | ||
1338 | + }); | ||
1339 | + }, | ||
1340 | + | ||
1341 | + openSpecModel: function(t) { | ||
1342 | + var th=this; var open_store = t.currentTarget.dataset.ind; | ||
1343 | + if(getApp().is_sp_hao() && open_store==1){ | ||
1344 | + wx.showToast({ | ||
1345 | + title: "视频号商品不允许加入购物车", | ||
1346 | + icon: 'none', | ||
1347 | + duration: 2000 | ||
1348 | + }); | ||
1349 | + return false; | ||
1350 | + } | ||
1351 | + | ||
1352 | + | ||
1353 | + //--先判断会员状态-- | ||
1354 | + var user_info = getApp().globalData.userInfo; | ||
1355 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
1356 | + wx.navigateTo({ | ||
1357 | + url: '/packageE/pages/togoin/togoin', | ||
1358 | + }) | ||
1359 | + return false; | ||
1360 | + } | ||
1361 | + | ||
1362 | + this.setData({ | ||
1363 | + store: 0, | ||
1364 | + choice_sort_store: 0, | ||
1365 | + sort_store: 0, | ||
1366 | + open_ind_store: open_store, | ||
1367 | + }) | ||
1368 | + | ||
1369 | + | ||
1370 | + var ind = t.currentTarget.dataset.ind; | ||
1371 | + this.setData({ | ||
1372 | + openSpecModal: !0, | ||
1373 | + openSpecModal_ind: ind, | ||
1374 | + }); | ||
1375 | + | ||
1376 | + }, | ||
1377 | + | ||
1378 | + //---------点击收藏和不收藏------------ | ||
1379 | + collectGoods: function() { | ||
1380 | + var t = this,i = getApp().request; | ||
1381 | + var user_id = s.globalData.user_id; | ||
1382 | + if (user_id == '') { | ||
1383 | + getApp().getUserFir(function() {}); | ||
1384 | + getApp().showWarning("未登录"); | ||
1385 | + return false; | ||
1386 | + } else { | ||
1387 | + | ||
1388 | + if(t.data.is_collect_load) return false; | ||
1389 | + t.data.is_collect_load=1; | ||
1390 | + | ||
1391 | + if (t.data.is_collect == 1) { //删除收藏 | ||
1392 | + i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, { | ||
1393 | + success: function(e) { | ||
1394 | + t.data.is_collect_load=0; | ||
1395 | + if (e.data.code == 0) { | ||
1396 | + t.setData({ | ||
1397 | + is_collect: 0, | ||
1398 | + collect_id: 0, | ||
1399 | + }); | ||
1400 | + } | ||
1401 | + } | ||
1402 | + }); | ||
1403 | + } else { | ||
1404 | + var timestamp = Date.parse(new Date()); | ||
1405 | + timestamp = timestamp / 1000; | ||
1406 | + var d = { | ||
1407 | + goods_id: t.data.data.goods_id, | ||
1408 | + user_id: s.globalData.user_id, | ||
1409 | + store_id: o.stoid, | ||
1410 | + add_time: timestamp, | ||
1411 | + type: 1, | ||
1412 | + }; | ||
1413 | + //加入收藏夹就是导购的ID | ||
1414 | + if(getApp().globalData.guide_id){ | ||
1415 | + d.guide_id=getApp().globalData.guide_id; | ||
1416 | + d.guide_type=2; | ||
1417 | + } | ||
1418 | + if(getApp().globalData.groupchat_id){ | ||
1419 | + d.groupchat_id = getApp().globalData.groupchat_id; | ||
1420 | + } | ||
1421 | + i.post("/api/weshop/goodscollect/save", { //添加收藏 | ||
1422 | + data: d, | ||
1423 | + success: function(e) { | ||
1424 | + t.data.is_collect_load=0; | ||
1425 | + if (e.data.code == 0) { | ||
1426 | + t.setData({ | ||
1427 | + is_collect: 1, | ||
1428 | + collect_id: e.data.data.collect_id, | ||
1429 | + }); | ||
1430 | + } | ||
1431 | + } | ||
1432 | + }); | ||
1433 | + } | ||
1434 | + } | ||
1435 | + }, | ||
1436 | + //---------联系客服------------ | ||
1437 | + contactService: function () { | ||
1438 | + this.getTel() | ||
1439 | + .then(() => { | ||
1440 | + if(self.data.store_tel) { | ||
1441 | + wx.showModal({ | ||
1442 | + title: '联系客服', | ||
1443 | + content: '客服热线:' + self.data.store_tel, | ||
1444 | + confirmText: '拨打', | ||
1445 | + success(res) { | ||
1446 | + if(res.confirm) { | ||
1447 | + wx.makePhoneCall({ | ||
1448 | + phoneNumber: self.data.store_tel, | ||
1449 | + }) | ||
1450 | + }; | ||
1451 | + }, | ||
1452 | + }); | ||
1453 | + }; | ||
1454 | + }); | ||
1455 | + }, | ||
1456 | + // 获取客服电话 | ||
1457 | + getTel() { | ||
1458 | + return new Promise((resolve, reject) => { | ||
1459 | + s.getConfig(function (t) { | ||
1460 | + if (t.store_tel == undefined) { | ||
1461 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
1462 | + isShowLoading: 1, | ||
1463 | + data: {}, | ||
1464 | + success: function (rs) { | ||
1465 | + getApp().globalData.config = rs.data.data; | ||
1466 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
1467 | + getApp().my_warnning("商家未设置电话", 0, th); | ||
1468 | + return false; | ||
1469 | + } | ||
1470 | + self.setData({ | ||
1471 | + store_tel: rs.data.data.store_tel, | ||
1472 | + }); | ||
1473 | + // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
1474 | + } | ||
1475 | + }) | ||
1476 | + } else { | ||
1477 | + self.setData({ | ||
1478 | + store_tel: t.store_tel, | ||
1479 | + }); | ||
1480 | + // s.confirmBox("请联系客服:" + t.store_tel); | ||
1481 | + }; | ||
1482 | + resolve(); | ||
1483 | + }); | ||
1484 | + }); | ||
1485 | + }, | ||
1486 | + //-------获取购物车数量---------- | ||
1487 | + requestCardNum: function() { | ||
1488 | + var t = this; | ||
1489 | + getApp().request.get("/api/weshop/cart/page", { | ||
1490 | + data: { | ||
1491 | + store_id: o.stoid, | ||
1492 | + user_id: s.globalData.user_id, | ||
1493 | + state:0, | ||
1494 | + is_gift:0 | ||
1495 | + }, | ||
1496 | + success: function(e) { | ||
1497 | + var num = 0; | ||
1498 | + for (var i = 0; i < e.data.data.pageData.length; i++) { | ||
1499 | + num += e.data.data.pageData[i].goods_num; | ||
1500 | + } | ||
1501 | + | ||
1502 | + /*-- | ||
1503 | + t.setData({ | ||
1504 | + cartGoodsNum: num | ||
1505 | + });--*/ | ||
1506 | + | ||
1507 | + //-- 读取服务卡的数量 -- | ||
1508 | + getApp().promiseGet("/api/weshop/cartService/page",{ | ||
1509 | + data:{ | ||
1510 | + store_id: s.globalData.setting.stoid, | ||
1511 | + user_id: s.globalData.user_id, | ||
1512 | + } | ||
1513 | + }).then(res=>{ | ||
1514 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | ||
1515 | + num += res.data.data.pageData[i].goods_num; | ||
1516 | + } | ||
1517 | + t.setData({cartGoodsNum:num}); | ||
1518 | + }) | ||
1519 | + | ||
1520 | + | ||
1521 | + } | ||
1522 | + }); | ||
1523 | + }, | ||
1524 | + | ||
1525 | + //--点击分享事件--- | ||
1526 | + onShareAppMessage: function(t) { | ||
1527 | + | ||
1528 | + var th = this; | ||
1529 | + var price = th.data.data.shop_price; | ||
1530 | + if (th.data.prom_act) { | ||
1531 | + price = th.data.prom_act.price; | ||
1532 | + | ||
1533 | + } | ||
1534 | + var title= th.data.data.goods_name; | ||
1535 | + var img=th.data.iurl+th.data.data.image_url; | ||
1536 | + if(th.data.prom_type==6){ | ||
1537 | + title=th.data.prom_act.share_title; | ||
1538 | + img=th.data.iurl+th.data.prom_act.share_imgurl; | ||
1539 | + } | ||
1540 | + | ||
1541 | + | ||
1542 | + | ||
1543 | + | ||
1544 | + var url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + th.data.gid; | ||
1545 | + if(getApp().globalData.user_id) { | ||
1546 | + url+="&first_leader="+getApp().globalData.user_id; | ||
1547 | + } | ||
1548 | + | ||
1549 | + //-- 如果房间分享,且不是会员分享的 -- | ||
1550 | + if(getApp().globalData.room_id && | ||
1551 | + th.data.data.goods_id==getApp().globalData.room_goods_id && | ||
1552 | + !getApp().globalData.room_user_share | ||
1553 | + ){ | ||
1554 | + url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1"; | ||
1555 | + } | ||
1556 | + | ||
1557 | + | ||
1558 | + var ob={ | ||
1559 | + title: price + "元 " +title, | ||
1560 | + path:url, | ||
1561 | + imageUrl: img, | ||
1562 | + }; | ||
1563 | + | ||
1564 | + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | ||
1565 | + if(th.data.prom_type == 1) { | ||
1566 | + if(th.data.sele_g && th.data.sele_g.share_title) { | ||
1567 | + title = th.data.sele_g.share_title; | ||
1568 | + ob.title = title; | ||
1569 | + }; | ||
1570 | + if(th.data.sele_g && th.data.sele_g.share_imgurl) { | ||
1571 | + img = th.data.iurl + th.data.sele_g.share_imgurl; | ||
1572 | + ob.imageUrl = img; | ||
1573 | + } | ||
1574 | + } | ||
1575 | + | ||
1576 | + return ob; | ||
1577 | + | ||
1578 | + }, | ||
1579 | + | ||
1580 | + //-----图片失败,默认图片----- | ||
1581 | + bind_bnerr: function(e) { | ||
1582 | + var _errImg = e.target.dataset.errorimg; | ||
1583 | + var _errObj = {}; | ||
1584 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | ||
1585 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
1586 | + }, | ||
1587 | + | ||
1588 | + //-----图片失败,默认图片----- | ||
1589 | + bind_bnerr2: function(e) { | ||
1590 | + | ||
1591 | + var _errImg = e.target.dataset.errorimg; | ||
1592 | + var _errObj = {}; | ||
1593 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/hui_hear_pic.png" | ||
1594 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
1595 | + }, | ||
1596 | + | ||
1597 | + | ||
1598 | + //---------拿出门店分类和门店------------ | ||
1599 | + get_sto(e) { | ||
1600 | + var is_normal=e; | ||
1601 | + var th = this,that=this; | ||
1602 | + | ||
1603 | + if (e == 1) { | ||
1604 | + th.setData({ | ||
1605 | + is_normal: 1 | ||
1606 | + }) | ||
1607 | + } else { | ||
1608 | + th.setData({ | ||
1609 | + is_normal: 0 | ||
1610 | + }) | ||
1611 | + } | ||
1612 | + | ||
1613 | + var timer_get = setInterval(function() { | ||
1614 | + if (th.data.is_get_local_ok == 0) return false; | ||
1615 | + if (!th.data.fir_def_store) return false; | ||
1616 | + var i = getApp().request; | ||
1617 | + if (!th.data.data) return false; | ||
1618 | + var dd= { | ||
1619 | + store_id: o.stoid, | ||
1620 | + isstop: 0, | ||
1621 | + is_pos: 1, | ||
1622 | + pageSize: 2000 | ||
1623 | + } | ||
1624 | + //如果有距离的话 | ||
1625 | + if (th.data.lat != null) { | ||
1626 | + dd.lat = th.data.lat; | ||
1627 | + dd.lon = th.data.lon; | ||
1628 | + } | ||
1629 | + clearInterval(timer_get); | ||
1630 | + | ||
1631 | + //如果会员是有默认的门店话 | ||
1632 | + if(!th.data.def_pick_store && th.data.fir_def_store){ | ||
1633 | + th.setData({def_pick_store:th.data.fir_def_store}); | ||
1634 | + } | ||
1635 | + | ||
1636 | + wx.showLoading({ | ||
1637 | + title:'加载中.' | ||
1638 | + }); | ||
1639 | + //----------获取门店---------------- | ||
1640 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | ||
1641 | + data: dd, | ||
1642 | + }).then(res => { | ||
1643 | + var e = res; | ||
1644 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { | ||
1645 | + | ||
1646 | + var his_cate_num=0; | ||
1647 | + for(let i in e.data.data.pageData){ | ||
1648 | + let item=e.data.data.pageData[i]; | ||
1649 | + if(item.category_id>0){ | ||
1650 | + his_cate_num=1;break; | ||
1651 | + } | ||
1652 | + } | ||
1653 | + e.his_cate_num=his_cate_num; | ||
1654 | + | ||
1655 | + //--普通门店排版,服务卡项有指定门店才能使用,所以要筛选一下-- | ||
1656 | + setTimeout(function(){ | ||
1657 | + var sto_list=th.data.data.storageId; | ||
1658 | + if(sto_list){ | ||
1659 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | ||
1660 | + var it=e.data.data.pageData[k]; | ||
1661 | + if (sto_list.indexOf(it.keyid)==-1) { | ||
1662 | + //删除 | ||
1663 | + e.data.data.pageData.splice(k--, 1); | ||
1664 | + } | ||
1665 | + } | ||
1666 | + | ||
1667 | + } | ||
1668 | + | ||
1669 | + //如果有秒杀的指定门店 | ||
1670 | + if(th.data.prom_type==1 && th.data.prom_act && th.data.prom_act.pick_up_lists && e.data.data.pageData.length && !is_normal){ | ||
1671 | + var pick_up_lists=th.data.prom_act.pick_up_lists; | ||
1672 | + for (var kq = 0; kq < e.data.data.pageData.length; kq++) { | ||
1673 | + var it0=e.data.data.pageData[kq]; | ||
1674 | + var idx0=pick_up_lists.findIndex(function (e){ | ||
1675 | + return e.pickup_id==it0.pickup_id; | ||
1676 | + }) | ||
1677 | + if (idx0<0) { | ||
1678 | + //删除 | ||
1679 | + e.data.data.pageData.splice(kq--, 1); | ||
1680 | + } | ||
1681 | + } | ||
1682 | + | ||
1683 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | ||
1684 | + //-- 查找一下门店有没有在 -- | ||
1685 | + var idx1=pick_up_lists.findIndex(function (e){ | ||
1686 | + return e.pickup_id==th.data.def_pick_store.pickup_id; | ||
1687 | + }) | ||
1688 | + if(idx1<0){ | ||
1689 | + //如果是秒杀的指定门店,就要设置秒杀的 | ||
1690 | + th.data.def_pick_store.is_no_dis_act=1; | ||
1691 | + that.setData({ | ||
1692 | + def_pick_store: th.data.def_pick_store | ||
1693 | + }) | ||
1694 | + } | ||
1695 | + } | ||
1696 | + | ||
1697 | + } | ||
1698 | + | ||
1699 | + //-- 如果门店过滤后,还会是数量 -- | ||
1700 | + if(e.data.data.pageData.length){ | ||
1701 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | ||
1702 | + if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){ | ||
1703 | + th.setData({ | ||
1704 | + def_pick_store:e.data.data.pageData[0], | ||
1705 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | ||
1706 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | ||
1707 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | ||
1708 | + sto_sele_keyid: e.data.data.pageData[0].keyid, | ||
1709 | + }); | ||
1710 | + th.data.fir_def_store=e.data.data.pageData[0]; | ||
1711 | + } | ||
1712 | + | ||
1713 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | ||
1714 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | ||
1715 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | ||
1716 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | ||
1717 | + e.data.data.pageData.splice(k, 1); //删除 | ||
1718 | + break; | ||
1719 | + } | ||
1720 | + } | ||
1721 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | ||
1722 | + } | ||
1723 | + | ||
1724 | + th.setData({all_pick_list:e.data.data.pageData,isshow:1}); | ||
1725 | + th.deal_pickup(e); | ||
1726 | + } | ||
1727 | + else{ | ||
1728 | + th.setData({ | ||
1729 | + isshow:1 | ||
1730 | + }) | ||
1731 | + wx.hideLoading(); | ||
1732 | + } | ||
1733 | + | ||
1734 | + | ||
1735 | + },800) | ||
1736 | + | ||
1737 | + } | ||
1738 | + }) | ||
1739 | + }, 200) | ||
1740 | + }, | ||
1741 | + //获取搜索门店输入的值 | ||
1742 | + input_store: function(e) { | ||
1743 | + this.setData({ | ||
1744 | + keyword: e.detail.value | ||
1745 | + }) | ||
1746 | + }, | ||
1747 | + //搜索门店 | ||
1748 | + searchfn(){ | ||
1749 | + let choice_sort_store = this.data.choice_sort_store | ||
1750 | + if (choice_sort_store==0) { //全局搜索 | ||
1751 | + let all_pick_list = this.data.all_pick_list | ||
1752 | + let def_pickpu_list = this.data.def_pickpu_list | ||
1753 | + let keyword = this.data.keyword | ||
1754 | + if (keyword) { | ||
1755 | + let arr=all_pick_list.filter( item =>{ | ||
1756 | + let i = item.pickup_name.indexOf(keyword) | ||
1757 | + if (i > -1) { | ||
1758 | + return true | ||
1759 | + }else{ | ||
1760 | + return false | ||
1761 | + } | ||
1762 | + }) | ||
1763 | + if (arr && arr.length>0) { | ||
1764 | + if(this.data.is_show_sto_cat==1){ | ||
1765 | + this.setData({ | ||
1766 | + def_pickpu_list:arr | ||
1767 | + }) | ||
1768 | + }else{ | ||
1769 | + this.setData({ | ||
1770 | + only_pk:arr | ||
1771 | + }) | ||
1772 | + } | ||
1773 | + }else{ | ||
1774 | + wx.showToast({ | ||
1775 | + title: '没有搜索到门店', | ||
1776 | + icon: 'none', | ||
1777 | + duration: 2000 | ||
1778 | + }) | ||
1779 | + } | ||
1780 | + }else{ | ||
1781 | + if (this.data.is_show_sto_cat==1) { | ||
1782 | + this.setData({ | ||
1783 | + def_pickpu_list:all_pick_list.slice(0,10) | ||
1784 | + }) | ||
1785 | + }else{ | ||
1786 | + this.setData({ | ||
1787 | + only_pk:all_pick_list | ||
1788 | + }) | ||
1789 | + } | ||
1790 | + | ||
1791 | + } | ||
1792 | + }else{ //分类下搜索 | ||
1793 | + let sec_i=this.data.sec_i | ||
1794 | + let all_sto = this.data.all_sto | ||
1795 | + let old_all_sto = this.data.old_all_sto | ||
1796 | + if (!old_all_sto) { | ||
1797 | + this.setData({ | ||
1798 | + old_all_sto:JSON.parse(JSON.stringify(all_sto)) | ||
1799 | + }) | ||
1800 | + } | ||
1801 | + let sec_sto= this.data.sec_sto | ||
1802 | + let sec_arr = this.data.old_all_sto[sec_i].s_arr | ||
1803 | + let keyword = this.data.keyword | ||
1804 | + let text='sec_sto.s_arr' | ||
1805 | + if (keyword) { | ||
1806 | + let arr=sec_arr.filter( item =>{ | ||
1807 | + let i = item.pickup_name.indexOf(keyword) | ||
1808 | + if (i > -1) { | ||
1809 | + return true | ||
1810 | + }else{ | ||
1811 | + return false | ||
1812 | + } | ||
1813 | + }) | ||
1814 | + if (arr && arr.length>0) { | ||
1815 | + this.setData({ | ||
1816 | + [text]:arr | ||
1817 | + }) | ||
1818 | + }else{ | ||
1819 | + wx.showToast({ | ||
1820 | + title: '没有搜索到门店', | ||
1821 | + icon: 'none', | ||
1822 | + duration: 2000 | ||
1823 | + }) | ||
1824 | + } | ||
1825 | + }else{ | ||
1826 | + if(this.data.old_all_sto){ | ||
1827 | + this.setData({ | ||
1828 | + [text]: this.data.old_all_sto[sec_i].s_arr | ||
1829 | + }) | ||
1830 | + }else{ | ||
1831 | + this.setData({ | ||
1832 | + [text]: all_sto[sec_i].s_arr | ||
1833 | + }) | ||
1834 | + } | ||
1835 | + } | ||
1836 | + | ||
1837 | + | ||
1838 | + } | ||
1839 | + }, | ||
1840 | + | ||
1841 | + | ||
1842 | + //------------处理门店--------------- | ||
1843 | + deal_pickup(e){ | ||
1844 | + var th=this; | ||
1845 | + if(!th.data.data) return false | ||
1846 | + wx.hideLoading(); | ||
1847 | + //单总量超出5个的时候 | ||
1848 | + if (e.data.data.total > 10 && e.his_cate_num) { | ||
1849 | + getApp().request.get("/api/weshop/storagecategory/page", { | ||
1850 | + data: { | ||
1851 | + store_id: o.stoid, | ||
1852 | + pageSize: 1000, | ||
1853 | + orderField:"sort", | ||
1854 | + orderType:'asc', | ||
1855 | + }, | ||
1856 | + success: function(ee) { | ||
1857 | + if (ee.data.code == 0) { | ||
1858 | + | ||
1859 | + var check_all_cate=0; | ||
1860 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){ | ||
1861 | + for(let i in ee.data.data.pageData){ | ||
1862 | + let item=ee.data.data.pageData[i]; | ||
1863 | + if(item.is_show==1){ | ||
1864 | + check_all_cate=1;break | ||
1865 | + } | ||
1866 | + } | ||
1867 | + } | ||
1868 | + | ||
1869 | + if (check_all_cate) { | ||
1870 | + | ||
1871 | + | ||
1872 | + var sto_cate = ee.data.data.pageData; | ||
1873 | + var sto_arr = e.data.data.pageData; | ||
1874 | + var newarr = new Array(); | ||
1875 | + var qita = new Array(); | ||
1876 | + | ||
1877 | + var is_del_pk=0; | ||
1878 | + | ||
1879 | + //----要进行门店分组-------- | ||
1880 | + for (var i = 0; i < sto_arr.length; i++) { | ||
1881 | + //找一下这个门店有没有在分类数组内 | ||
1882 | + var find2 = 0, find2name = "",sort=0; | ||
1883 | + is_del_pk=0; | ||
1884 | + for (var m = 0; m < sto_cate.length; m++) { | ||
1885 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | ||
1886 | + if (sto_cate[m].is_show != 1) { | ||
1887 | + is_del_pk = 1; | ||
1888 | + sto_arr.splice(i, 1); | ||
1889 | + i--; | ||
1890 | + } else { | ||
1891 | + find2 = sto_cate[m].cat_id; | ||
1892 | + find2name = sto_cate[m].cat_name; | ||
1893 | + sort = sto_cate[m].sort; | ||
1894 | + is_del_pk = 0; | ||
1895 | + } | ||
1896 | + break; | ||
1897 | + } | ||
1898 | + } | ||
1899 | + if(is_del_pk) continue; | ||
1900 | + | ||
1901 | + if (newarr.length > 0) { | ||
1902 | + var find = 0; | ||
1903 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | ||
1904 | + if (find2 != 0) { | ||
1905 | + for (var ii = 0; ii < newarr.length; ii++) { | ||
1906 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | ||
1907 | + newarr[ii].s_arr.push(sto_arr[i]); | ||
1908 | + find = 1; | ||
1909 | + break; | ||
1910 | + } | ||
1911 | + } | ||
1912 | + if (find == 0) { | ||
1913 | + var arr0 = new Array(); | ||
1914 | + arr0.push(sto_arr[i]); | ||
1915 | + var item = { | ||
1916 | + cat_id: find2, | ||
1917 | + name: find2name, | ||
1918 | + sort:sort, | ||
1919 | + s_arr: arr0 | ||
1920 | + }; | ||
1921 | + newarr.push(item); | ||
1922 | + } | ||
1923 | + } else { | ||
1924 | + qita.push(sto_arr[i]); | ||
1925 | + } | ||
1926 | + } else { | ||
1927 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | ||
1928 | + if (find2 != 0) { | ||
1929 | + var arr0 = new Array(); | ||
1930 | + arr0.push(sto_arr[i]); | ||
1931 | + var item = { | ||
1932 | + cat_id: find2, | ||
1933 | + name: find2name, | ||
1934 | + sort:sort, | ||
1935 | + s_arr: arr0 | ||
1936 | + }; | ||
1937 | + newarr.push(item); | ||
1938 | + } else { | ||
1939 | + qita.push(sto_arr[i]); | ||
1940 | + } | ||
1941 | + } | ||
1942 | + } | ||
1943 | + | ||
1944 | + var def_arr = new Array(); | ||
1945 | + //-- 开始就看10个门店 -- | ||
1946 | + for (var k = 0; k < 10; k++) { | ||
1947 | + if (k == sto_arr.length) break; | ||
1948 | + def_arr.push(sto_arr[k]); | ||
1949 | + } | ||
1950 | + | ||
1951 | + th.setData({ | ||
1952 | + def_pickpu_list: def_arr, | ||
1953 | + pickpu_list: ee.data.data.pageData | ||
1954 | + }); | ||
1955 | + | ||
1956 | + //门店分类要排序下 | ||
1957 | + function compare(property){ | ||
1958 | + return function(a,b){ | ||
1959 | + var value1 = a[property]; | ||
1960 | + var value2 = b[property]; | ||
1961 | + return value1 - value2; | ||
1962 | + } | ||
1963 | + } | ||
1964 | + if(newarr.length>0) | ||
1965 | + newarr.sort(compare("sort")); | ||
1966 | + | ||
1967 | + //----安排其他的分类----- | ||
1968 | + if (qita.length > 0) { | ||
1969 | + var item = { | ||
1970 | + cat_id: -1, | ||
1971 | + name: "其他", | ||
1972 | + s_arr: qita | ||
1973 | + }; | ||
1974 | + newarr.push(item); | ||
1975 | + } | ||
1976 | + | ||
1977 | + var sd={ | ||
1978 | + all_sto: newarr, | ||
1979 | + is_show_sto_cat:1 | ||
1980 | + } | ||
1981 | + if(!sto_arr || sto_arr.length<=10){ | ||
1982 | + sd.is_show_sto_cat=-1; | ||
1983 | + sd.only_pk=sto_arr; | ||
1984 | + } | ||
1985 | + th.setData(sd); | ||
1986 | + | ||
1987 | + } else { | ||
1988 | + th.setData({ | ||
1989 | + is_show_sto_cat: -1, | ||
1990 | + only_pk: e.data.data.pageData | ||
1991 | + }); | ||
1992 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
1993 | + if (!th.data.def_pick_store) { | ||
1994 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
1995 | + } | ||
1996 | + } | ||
1997 | + } else { | ||
1998 | + th.setData({ | ||
1999 | + is_show_sto_cat: -1, | ||
2000 | + only_pk: e.data.data.pageData | ||
2001 | + }); | ||
2002 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
2003 | + if (!th.data.def_pick_store) { | ||
2004 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
2005 | + } | ||
2006 | + | ||
2007 | + } | ||
2008 | + } | ||
2009 | + }); | ||
2010 | + } else { | ||
2011 | + th.setData({ | ||
2012 | + is_show_sto_cat: 0, | ||
2013 | + only_pk: e.data.data.pageData | ||
2014 | + }); | ||
2015 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | ||
2016 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | ||
2017 | + | ||
2018 | + if(e.data.data && e.data.data.pageData && e.data.data.pageData.length>0){ | ||
2019 | + th.setData({ | ||
2020 | + def_pick_store:e.data.data.pageData[0], | ||
2021 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | ||
2022 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | ||
2023 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | ||
2024 | + sto_sele_keyid:e.data.data.pageData[0].keyid, | ||
2025 | + }) | ||
2026 | + } | ||
2027 | + | ||
2028 | + } | ||
2029 | + } | ||
2030 | + }, | ||
2031 | + | ||
2032 | + //加载更多是靠这个函数 | ||
2033 | + onReachBottom: function() { | ||
2034 | + if (this.data.activeCategoryId == 2){ | ||
2035 | + if(!this.data.comments_no_more) this.requestComments_new(); | ||
2036 | + } | ||
2037 | + | ||
2038 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | ||
2039 | + if (goods_list) goods_list.get_list(); | ||
2040 | + }, | ||
2041 | + | ||
2042 | + | ||
2043 | + //---小于10的格式化函数---- | ||
2044 | + timeFormat(param) { | ||
2045 | + return param < 10 ? '0' + param : param; | ||
2046 | + }, | ||
2047 | + | ||
2048 | + | ||
2049 | + //--定义的保存图片方法,分享团--- | ||
2050 | + saveImageToPhotosAlbum: function() { | ||
2051 | + //--先判断会员状态-- | ||
2052 | + var user_info = getApp().globalData.userInfo; | ||
2053 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
2054 | + //getApp().my_warnning("请先登录",0,this); | ||
2055 | + wx.navigateTo({ url: '/packageE/pages/togoin/togoin', }) | ||
2056 | + return false; | ||
2057 | + } | ||
2058 | + | ||
2059 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | ||
2060 | + var type = this.data.prom_type; | ||
2061 | + if (type == 6) type = 2; | ||
2062 | + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | ||
2063 | + | ||
2064 | + wx.showLoading({ | ||
2065 | + title: '生成中...', | ||
2066 | + }) | ||
2067 | + var that = this, | ||
2068 | + th = that; | ||
2069 | + //设置画板显示,才能开始绘图 | ||
2070 | + that.setData({ | ||
2071 | + canvasHidden: false | ||
2072 | + }) | ||
2073 | + | ||
2074 | + var app = getApp(); | ||
2075 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | ||
2076 | + var path2 = that.data.data.original_img; | ||
2077 | + var scene = th.data.gid+""; | ||
2078 | + var user_id = getApp().globalData.user_id?getApp().globalData.user_id:0; | ||
2079 | + if(user_id>0) { | ||
2080 | + scene+="_"+user_id; | ||
2081 | + } | ||
2082 | + //-- 如果不是会员分享过来的要分享给别人 -- | ||
2083 | + if(getApp().globalData.room_id && th.data.data.goods_id==getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | ||
2084 | + //固定房间是第3个字符 | ||
2085 | + if(!user_id) scene+="_0"; | ||
2086 | + scene+="_"+getApp().globalData.room_id ; | ||
2087 | + } | ||
2088 | + ///二微码 | ||
2089 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | ||
2090 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | ||
2091 | + | ||
2092 | + console.log(path3); | ||
2093 | + | ||
2094 | + //读取文件成功则OK-- | ||
2095 | + wx.getImageInfo({ | ||
2096 | + src: path3, | ||
2097 | + success: function(res) { | ||
2098 | + //回调写法 | ||
2099 | + th.get_head_temp(th.get_goods_temp, function() { | ||
2100 | + var vpath = res.path; | ||
2101 | + var context = wx.createCanvasContext('share'); | ||
2102 | + //先画背景 | ||
2103 | + var pg_path = "../../../images/share/share_bg.png"; | ||
2104 | + | ||
2105 | + // context.fillStyle="#FFFFFF"; | ||
2106 | + // context.fillRect(0,0,554 * unit, 899 * unit); | ||
2107 | + | ||
2108 | + //-- 如果有自定义海报的时候,判断背景的图片 -- | ||
2109 | + if(th.data.share_b_img){ | ||
2110 | + pg_path=th.data.share_b_img; | ||
2111 | + } | ||
2112 | + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | ||
2113 | + | ||
2114 | + //-- 是自定义海报的情况下 -- | ||
2115 | + if(th.data.poster && parseInt(th.data.poster.style)==2) { | ||
2116 | + //在线上分享人的情况下 | ||
2117 | + if(parseInt(th.data.poster.show_headpic)){ | ||
2118 | + //获取坐标 | ||
2119 | + var x=parseFloat(th.data.poster.head_x)*2; | ||
2120 | + var y=parseFloat(th.data.poster.head_y)*2; | ||
2121 | + var x1=(x+90) *unit; | ||
2122 | + var y1=(y+50) *unit; | ||
2123 | + //--昵称--- | ||
2124 | + context.setFontSize(24 * unit) | ||
2125 | + context.setFillStyle("black") | ||
2126 | + context.fillText(app.globalData.userInfo.nickname, x1, y1); | ||
2127 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | ||
2128 | + //强烈推荐 改许程 | ||
2129 | + var tj_path = "../../../images/share/q_tj.png"; | ||
2130 | + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); | ||
2131 | + context.setFontSize(16 * unit) | ||
2132 | + context.setLineJoin('round'); //交点设置成圆角 | ||
2133 | + context.setFillStyle("white") | ||
2134 | + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); | ||
2135 | + | ||
2136 | + //context.setFillStyle("black") | ||
2137 | + //context.setFontSize(24 * unit) | ||
2138 | + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | ||
2139 | + } | ||
2140 | + } else { | ||
2141 | + //--昵称--- | ||
2142 | + context.setFontSize(24 * unit) | ||
2143 | + context.setFillStyle("black") | ||
2144 | + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); | ||
2145 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; | ||
2146 | + //强烈推荐 改许程 | ||
2147 | + var tj_path = "../../../images/share/q_tj.png"; | ||
2148 | + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); | ||
2149 | + context.setFontSize(16 * unit); | ||
2150 | + context.setLineJoin('round'); //交点设置成圆角 | ||
2151 | + context.setFillStyle("white"); | ||
2152 | + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit); | ||
2153 | + } | ||
2154 | + | ||
2155 | + | ||
2156 | + //---产品名称--- | ||
2157 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | ||
2158 | + if(type!=4){ | ||
2159 | + context.setFillStyle("black"); | ||
2160 | + context.setFontSize(21.3 * unit) | ||
2161 | + th.draw_Text(context, th.data.data.goods_name, | ||
2162 | + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); | ||
2163 | + //------产品的价格------- | ||
2164 | + context.setFontSize(23 * unit) | ||
2165 | + context.setFillStyle("red") | ||
2166 | + context.fillText("¥", 416 * unit, 185 * unit); | ||
2167 | + context.setFontSize(31 * unit) | ||
2168 | + var pri0 = th.data.data.shop_price; | ||
2169 | + if (th.data.prom_act) | ||
2170 | + pri0 = th.data.prom_act.price; | ||
2171 | + pri0 = parseFloat(pri0).toFixed(2); | ||
2172 | + context.fillText(pri0, 438 * unit, 185 * unit); | ||
2173 | + //---市场价划掉--- | ||
2174 | + context.setFillStyle("gray") | ||
2175 | + context.setFontSize(22 * unit) | ||
2176 | + context.fillText("¥" + th.data.data.market_price, 426 * unit, 213 * unit); | ||
2177 | + context.setStrokeStyle('gray'); | ||
2178 | + context.setLineWidth(1 * unit); | ||
2179 | + context.moveTo(426 * unit, 206 * unit); | ||
2180 | + context.lineTo(510 * unit, 206 * unit); | ||
2181 | + context.stroke(); | ||
2182 | + | ||
2183 | + }else{ | ||
2184 | + context.setFillStyle("black"); | ||
2185 | + context.setFontSize(21.3 * unit) | ||
2186 | + th.draw_Text(context, th.data.data.goods_name, | ||
2187 | + 38 * unit, 170 * unit, 20 * unit, 300*unit, unit); | ||
2188 | + //------ 产品的价格 ----- | ||
2189 | + var pri0 = th.data.prom_act.addmoney; | ||
2190 | + var integral=th.data.prom_act.integral; | ||
2191 | + var text= ""; | ||
2192 | + if(integral){text=integral+"积分"; } | ||
2193 | + if(pri0 && integral){ text+="+";} | ||
2194 | + if(pri0){ text+="¥"+pri0;} | ||
2195 | + | ||
2196 | + if(!pri0 && !integral){ text="0积分";} | ||
2197 | + context.setFillStyle("red"); | ||
2198 | + context.fillText(text, 38 * unit, 235 * unit); | ||
2199 | + | ||
2200 | + } | ||
2201 | + | ||
2202 | + //---中间大图--- | ||
2203 | + context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | ||
2204 | + //-------大图后面就不一样了----------- | ||
2205 | + switch (type) { | ||
2206 | + case 0: //普通商品的展示 | ||
2207 | + case 4: | ||
2208 | + //中间的几个字 | ||
2209 | + if(th.data.poster && parseInt(th.data.poster.style)==2 ){ | ||
2210 | + if(parseInt(th.data.poster.show_quality)){ | ||
2211 | + var g_path = "../../../images/share/s_gou.png"; | ||
2212 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2213 | + context.setFillStyle("red") | ||
2214 | + context.setFontSize(18 * unit) | ||
2215 | + context.fillText("正品保证", 84 * unit, 690 * unit); | ||
2216 | + | ||
2217 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2218 | + context.setFillStyle("red") | ||
2219 | + context.setFontSize(18 * unit) | ||
2220 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | ||
2221 | + | ||
2222 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2223 | + context.setFillStyle("red") | ||
2224 | + context.setFontSize(18 * unit) | ||
2225 | + context.fillText("官方验证", 420 * unit, 690 * unit); | ||
2226 | + } | ||
2227 | + | ||
2228 | + }else{ | ||
2229 | + var g_path = "../../../images/share/s_gou.png"; | ||
2230 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2231 | + context.setFillStyle("red") | ||
2232 | + context.setFontSize(18 * unit) | ||
2233 | + context.fillText("正品保证", 84 * unit, 690 * unit); | ||
2234 | + | ||
2235 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2236 | + context.setFillStyle("red") | ||
2237 | + context.setFontSize(18 * unit) | ||
2238 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | ||
2239 | + | ||
2240 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
2241 | + context.setFillStyle("red") | ||
2242 | + context.setFontSize(18 * unit) | ||
2243 | + context.fillText("官方验证", 420 * unit, 690 * unit); | ||
2244 | + } | ||
2245 | + | ||
2246 | + | ||
2247 | + //---画线--- | ||
2248 | + context.setLineWidth(1 * unit) | ||
2249 | + context.moveTo(32 * unit, 710 * unit) | ||
2250 | + context.lineTo(520 * unit, 710 * unit) | ||
2251 | + context.stroke(); | ||
2252 | + | ||
2253 | + //---文字--- | ||
2254 | + context.setFillStyle("black") | ||
2255 | + context.setFontSize(22 * unit) | ||
2256 | + | ||
2257 | + if(type==0){ | ||
2258 | + // 原来start ---> | ||
2259 | + context.setFontSize(24 * unit) | ||
2260 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | ||
2261 | + | ||
2262 | + context.setFontSize(22 * unit) | ||
2263 | + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 806 * unit); | ||
2264 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit); | ||
2265 | + | ||
2266 | + }else{ | ||
2267 | + context.setFontSize(24 * unit) | ||
2268 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | ||
2269 | + context.setFontSize(22 * unit) | ||
2270 | + context.fillText("长按识别二维码", 40 * unit, 806 * unit); | ||
2271 | + context.fillText("立即开始兑换", 40 * unit, 846 * unit); | ||
2272 | + | ||
2273 | + | ||
2274 | + } | ||
2275 | + | ||
2276 | + //---二维吗图--- | ||
2277 | + //-- 自定义海报 -- | ||
2278 | + if(th.data.poster){ | ||
2279 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2280 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2281 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2282 | + }else{ | ||
2283 | + //---二维吗图--- | ||
2284 | + context.drawImage(vpath, 410 * unit, 726 * unit, 115 * unit, 125 * unit); | ||
2285 | + } | ||
2286 | + | ||
2287 | + break; | ||
2288 | + case 1: //秒杀商品的展示 | ||
2289 | + //---画线--- | ||
2290 | + context.setLineWidth(1 * unit) | ||
2291 | + context.moveTo(32 * unit, 670 * unit) | ||
2292 | + context.lineTo(520 * unit, 670 * unit) | ||
2293 | + context.stroke(); | ||
2294 | + | ||
2295 | + //画秒杀的图片 | ||
2296 | + var miaos_path = '../../../images/share/miao_share.png'; | ||
2297 | + context.drawImage(miaos_path, 43 * unit, 700 * unit, 222 * unit, 40 * unit); | ||
2298 | + | ||
2299 | + context.setFillStyle("black") | ||
2300 | + context.setFontSize(24 * unit) | ||
2301 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 786 * unit); | ||
2302 | + //---文字--- | ||
2303 | + context.setFontSize(22 * unit) | ||
2304 | + context.setFillStyle("black") | ||
2305 | + context.fillText("特惠好物,限时秒杀", 40 * unit, 826 * unit); | ||
2306 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 866 * unit); | ||
2307 | + | ||
2308 | + | ||
2309 | + //---二维吗图--- | ||
2310 | + //-- 自定义海报 -- | ||
2311 | + if(th.data.poster){ | ||
2312 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2313 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2314 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2315 | + }else{ | ||
2316 | + //---二维吗图--- | ||
2317 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
2318 | + } | ||
2319 | + break; | ||
2320 | + | ||
2321 | + case 2: //会员团和商家团的展示 | ||
2322 | + //---画线--- | ||
2323 | + context.setLineWidth(1 * unit) | ||
2324 | + context.moveTo(32 * unit, 670 * unit) | ||
2325 | + context.lineTo(520 * unit, 670 * unit) | ||
2326 | + context.stroke(); | ||
2327 | + //---文字--- | ||
2328 | + | ||
2329 | + context.setFillStyle("black") | ||
2330 | + context.setFontSize(24 * unit) | ||
2331 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | ||
2332 | + | ||
2333 | + //绘制成团图片 | ||
2334 | + var ct_img = "../../../images/share/ct_num.png"; | ||
2335 | + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); | ||
2336 | + var ct_num = th.data.prom_act.ct_num; | ||
2337 | + context.setFontSize(14 * unit) | ||
2338 | + context.font = 'normal'; | ||
2339 | + context.setFillStyle("red") | ||
2340 | + if (ct_num < 10) { | ||
2341 | + context.fillText(ct_num + "人拼团", 92 * unit, 760 * unit); | ||
2342 | + } else { | ||
2343 | + context.fillText(ct_num + "人拼团", 86 * unit, 760 * unit); | ||
2344 | + } | ||
2345 | + context.setFontSize(22 * unit) | ||
2346 | + context.fillText("已拼" + th.data.prom_act.buy_num + "份", 166 * unit, 763 * unit); | ||
2347 | + | ||
2348 | + context.setFillStyle("gray") | ||
2349 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 806 * unit); | ||
2350 | + context.setFillStyle("black") | ||
2351 | + context.font = 'normal bold 18px sans-serif'; | ||
2352 | + context.setFontSize(21.3 * unit) | ||
2353 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 836 * unit); | ||
2354 | + | ||
2355 | + | ||
2356 | + //---二维吗图--- | ||
2357 | + //-- 自定义海报 -- | ||
2358 | + if(th.data.poster){ | ||
2359 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2360 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2361 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2362 | + }else{ | ||
2363 | + //---二维吗图--- | ||
2364 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
2365 | + } | ||
2366 | + break | ||
2367 | + case 3: //阶梯团的展示 | ||
2368 | + //---画线--- | ||
2369 | + context.setLineWidth(1 * unit) | ||
2370 | + context.moveTo(32 * unit, 670 * unit) | ||
2371 | + context.lineTo(520 * unit, 670 * unit) | ||
2372 | + context.stroke(); | ||
2373 | + //---文字--- | ||
2374 | + | ||
2375 | + context.setFillStyle("black") | ||
2376 | + context.setFontSize(24 * unit) | ||
2377 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | ||
2378 | + | ||
2379 | + //---绘制中间阶梯的价格--- | ||
2380 | + var list = th.data.prom_act.ct_rylist; | ||
2381 | + for (var i = 0; i < list.length; i++) { | ||
2382 | + var item = list[i]; | ||
2383 | + var wi = i * 90 * unit; | ||
2384 | + context.font = 'normal'; | ||
2385 | + context.setFontSize(16 * unit) | ||
2386 | + context.setFillStyle("red") | ||
2387 | + context.fillText("¥", 40 * unit + wi, 756 * unit); | ||
2388 | + context.setFontSize(22 * unit) | ||
2389 | + var pri = parseFloat(item.price).toFixed(2); | ||
2390 | + context.fillText(pri, 56 * unit + wi, 756 * unit); | ||
2391 | + context.setFillStyle("gray") | ||
2392 | + context.fillText("满" + item.rynum + "人", 40 * unit + wi, 786 * unit); | ||
2393 | + } | ||
2394 | + //----------------下面部分---------------- | ||
2395 | + // context.setFillStyle("gray") | ||
2396 | + // context.fillText("快来和我一起拼团吧!", 40 * unit, 830 * unit); | ||
2397 | + // context.setFillStyle("black") | ||
2398 | + // context.font = 'normal bold 18px sans-serif'; | ||
2399 | + // context.setFontSize(22 * unit) | ||
2400 | + // context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); | ||
2401 | + //context.setFillStyle("gray") | ||
2402 | + context.setFillStyle("black") | ||
2403 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 820 * unit); | ||
2404 | + //context.font = 'normal bold 18px sans-serif'; | ||
2405 | + context.setFontSize(22 * unit) | ||
2406 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 850 * unit); | ||
2407 | + | ||
2408 | + | ||
2409 | + //-- 自定义海报 -- | ||
2410 | + if(th.data.poster){ | ||
2411 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
2412 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
2413 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
2414 | + }else{ | ||
2415 | + //---二维吗图--- | ||
2416 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
2417 | + } | ||
2418 | + break | ||
2419 | + | ||
2420 | + | ||
2421 | + } | ||
2422 | + | ||
2423 | + | ||
2424 | + //--- 如果是自定义海报的时候 --- | ||
2425 | + if(th.data.poster && parseInt(th.data.poster.style)==2){ | ||
2426 | + | ||
2427 | + //如果显示会员信息的话 | ||
2428 | + if(parseInt(th.data.poster.show_headpic)){ | ||
2429 | + //获取坐标 | ||
2430 | + var x= parseFloat(th.data.poster.head_x)*2; | ||
2431 | + var y=parseFloat(th.data.poster.head_y)*2; | ||
2432 | + //---绘制圆形要放在最后---- | ||
2433 | + context.save(); | ||
2434 | + context.beginPath(); | ||
2435 | + var h_x = x* unit; | ||
2436 | + var h_y = y * unit; | ||
2437 | + var h_r = 40 * unit; | ||
2438 | + var cx = h_x + h_r; | ||
2439 | + var cy = h_y + h_r; | ||
2440 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | ||
2441 | + context.closePath(); | ||
2442 | + context.fill(); | ||
2443 | + context.clip(); | ||
2444 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | ||
2445 | + context.restore(); | ||
2446 | + } | ||
2447 | + | ||
2448 | + }else{ | ||
2449 | + //---绘制圆形要放在最后---- | ||
2450 | + context.save(); | ||
2451 | + context.beginPath(); | ||
2452 | + var h_x = 60 * unit; | ||
2453 | + var h_y = 24 * unit; | ||
2454 | + var h_r = 40 * unit; | ||
2455 | + var cx = h_x + h_r; | ||
2456 | + var cy = h_y + h_r; | ||
2457 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | ||
2458 | + context.closePath(); | ||
2459 | + context.fill(); | ||
2460 | + context.clip(); | ||
2461 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | ||
2462 | + context.restore(); | ||
2463 | + } | ||
2464 | + | ||
2465 | + | ||
2466 | + //把画板内容绘制成图片,并回调 画板图片路径 | ||
2467 | + context.draw(false, function() { | ||
2468 | + setTimeout(function() { | ||
2469 | + wx.canvasToTempFilePath({ | ||
2470 | + x: 0, | ||
2471 | + y: 0, | ||
2472 | + width: 750, | ||
2473 | + height: 1217, | ||
2474 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | ||
2475 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | ||
2476 | + canvasId: 'share', | ||
2477 | + success: function(res) { | ||
2478 | + that.setData({ | ||
2479 | + shareImgPath: res.tempFilePath, | ||
2480 | + canvasHidden: true | ||
2481 | + }) | ||
2482 | + if (!res.tempFilePath) { | ||
2483 | + wx.showModal({ | ||
2484 | + title: '提示', | ||
2485 | + content: '图片绘制中,请稍后重试', | ||
2486 | + showCancel: false | ||
2487 | + }) | ||
2488 | + return false; | ||
2489 | + } | ||
2490 | + // wx.previewImage({ | ||
2491 | + // //将图片预览出来 | ||
2492 | + // urls: [that.data.shareImgPath] | ||
2493 | + // }); | ||
2494 | + that.setData({ | ||
2495 | + showPoster: true, | ||
2496 | + }); | ||
2497 | + wx.hideLoading(); | ||
2498 | + } | ||
2499 | + }) | ||
2500 | + }, 500) | ||
2501 | + | ||
2502 | + }); | ||
2503 | + }); | ||
2504 | + } | ||
2505 | + }); | ||
2506 | + }, | ||
2507 | + | ||
2508 | + | ||
2509 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | ||
2510 | + draw_Text: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) { | ||
2511 | + var lineWidth = 0; | ||
2512 | + var lastSubStrIndex = 0; //每次开始截取的字符串的索引 | ||
2513 | + var han = 0; | ||
2514 | + for (let i = 0; i < str.length; i++) { | ||
2515 | + if (han == 2) return; | ||
2516 | + //lineWidth += ctx.measureText(str[i]).width; | ||
2517 | + lineWidth += ut.measureText(str[i], 21.3 * unit); | ||
2518 | + if (lineWidth > canvasWidth) { | ||
2519 | + han++; | ||
2520 | + | ||
2521 | + if (han == 2) | ||
2522 | + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 | ||
2523 | + else | ||
2524 | + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); | ||
2525 | + | ||
2526 | + initHeight += 22; //22为字体的高度 | ||
2527 | + lineWidth = 0; | ||
2528 | + lastSubStrIndex = i; | ||
2529 | + titleHeight += 20; | ||
2530 | + } | ||
2531 | + if (i == str.length - 1) { //绘制剩余部分 | ||
2532 | + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); | ||
2533 | + } | ||
2534 | + } | ||
2535 | + }, | ||
2536 | + | ||
2537 | + // ----视频图片---- | ||
2538 | + // 图片计数器 | ||
2539 | + swiperChange: function (e) { | ||
2540 | + var that = this; | ||
2541 | + if (e.detail.current > 0) { | ||
2542 | + that.setData({ | ||
2543 | + hiddenn: 1, | ||
2544 | + videopicture: 1, | ||
2545 | + }) | ||
2546 | + } else { | ||
2547 | + that.setData({ | ||
2548 | + hiddenn: 0, | ||
2549 | + videopicture: 0, | ||
2550 | + }) | ||
2551 | + } | ||
2552 | + if (e.detail.source == 'touch') { | ||
2553 | + that.setData({ | ||
2554 | + current: e.detail.current | ||
2555 | + }) | ||
2556 | + } | ||
2557 | + }, | ||
2558 | + | ||
2559 | + /*---视频相关--*/ | ||
2560 | + videopicture: function (e) { | ||
2561 | + var vipi = e.currentTarget.dataset.vipi; | ||
2562 | + this.setData({ | ||
2563 | + videopicture: vipi, | ||
2564 | + swiperCurrent: vipi, | ||
2565 | + noon: 0, | ||
2566 | + current: 1 | ||
2567 | + }); | ||
2568 | + }, | ||
2569 | + | ||
2570 | + videoPlay: function (e) { | ||
2571 | + var _index = e.currentTarget.id | ||
2572 | + this.setData({ | ||
2573 | + _index: _index, | ||
2574 | + noon: 1 | ||
2575 | + }) | ||
2576 | + | ||
2577 | + setTimeout(function () { | ||
2578 | + //将点击视频进行播放 | ||
2579 | + var videoContext = wx.createVideoContext(_index) | ||
2580 | + videoContext.play(); | ||
2581 | + }, 500) | ||
2582 | + }, | ||
2583 | + | ||
2584 | + //--获取头像的本地缓存,回调写法-- | ||
2585 | + get_head_temp: function(tt, func) { | ||
2586 | + var ee = this; | ||
2587 | + if (ee.data.share_head) { | ||
2588 | + tt(func); | ||
2589 | + return false; | ||
2590 | + } | ||
2591 | + //---获取分享图片的本地地址,头像和商品图片---- | ||
2592 | + var path2 = getApp().globalData.userInfo.head_pic; | ||
2593 | + if (path2 == "") { | ||
2594 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; | ||
2595 | + tt(func); | ||
2596 | + } else { | ||
2597 | + path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
2598 | + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
2599 | + wx.getImageInfo({ | ||
2600 | + src: path2, | ||
2601 | + success: function(res) { | ||
2602 | + //res.path是网络图片的本地地址 | ||
2603 | + ee.data.share_head = res.path; | ||
2604 | + tt(func); | ||
2605 | + }, | ||
2606 | + fail: function(res) { | ||
2607 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | ||
2608 | + tt(func); | ||
2609 | + } | ||
2610 | + }); | ||
2611 | + } | ||
2612 | + }, | ||
2613 | + //--获取商品图片的本地缓存,回调写法-- | ||
2614 | + get_goods_temp: function(tt) { | ||
2615 | + var ee = this; | ||
2616 | + if (ee.data.share_goods_img) { | ||
2617 | + tt(); | ||
2618 | + return false; | ||
2619 | + } | ||
2620 | + //获取商品是分享图信息 | ||
2621 | + wx.getImageInfo({ | ||
2622 | + src: ee.data.data.original_img, | ||
2623 | + success: function(res) { | ||
2624 | + //res.path是网络图片的本地地址 | ||
2625 | + ee.data.share_goods_img = res.path; | ||
2626 | + tt(); | ||
2627 | + }, | ||
2628 | + fail: function(res) { | ||
2629 | + //获取默认空白图 | ||
2630 | + wx.getImageInfo({ | ||
2631 | + src: ee.data.iurl+'/miniapp/images/default_g_img.gif', | ||
2632 | + success: function(res) { | ||
2633 | + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 | ||
2634 | + tt(); | ||
2635 | + } | ||
2636 | + }) | ||
2637 | + | ||
2638 | + } | ||
2639 | + }); | ||
2640 | + }, | ||
2641 | + | ||
2642 | + | ||
2643 | + //--跳转到商品详情页面-- | ||
2644 | + go_goods: function(e) { | ||
2645 | + var gid = e.currentTarget.dataset.gid; | ||
2646 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid; | ||
2647 | + getApp().goto(url); | ||
2648 | + }, | ||
2649 | + | ||
2650 | + | ||
2651 | + pop_err_img: function(e) { | ||
2652 | + var txt = e.currentTarget.dataset.errorimg; | ||
2653 | + var ob = {}; | ||
2654 | + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | ||
2655 | + this.setData(ob); | ||
2656 | + }, | ||
2657 | + | ||
2658 | + // 选择门店 | ||
2659 | + choice_store: function(ee) { | ||
2660 | + this.setData({ | ||
2661 | + keyword:'' | ||
2662 | + }) | ||
2663 | + var th = this; | ||
2664 | + var ind=ee.currentTarget.dataset.ind; | ||
2665 | + var bconfig = th.data.bconfig; | ||
2666 | + | ||
2667 | + //--先判断会员状态-- | ||
2668 | + var user_info = getApp().globalData.userInfo; | ||
2669 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
2670 | + wx.navigateTo({ | ||
2671 | + url: '/packageE/pages/togoin/togoin', | ||
2672 | + }) | ||
2673 | + return false; | ||
2674 | + } | ||
2675 | + | ||
2676 | + | ||
2677 | + //如果开启了,则不在选择门店 | ||
2678 | + if(this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store){ | ||
2679 | + return false; | ||
2680 | + } | ||
2681 | + if(!th.data.only_pk && !th.data.def_pickpu_list){ | ||
2682 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | ||
2683 | + return false; | ||
2684 | + } | ||
2685 | + | ||
2686 | + if(th.data.only_pk && !th.data.only_pk.length){ | ||
2687 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | ||
2688 | + return false; | ||
2689 | + } | ||
2690 | + if(th.data.def_pickpu_list && !th.data.def_pickpu_list.length){ | ||
2691 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | ||
2692 | + return false; | ||
2693 | + } | ||
2694 | + | ||
2695 | + | ||
2696 | + if (bconfig && bconfig.is_sort_storage) { | ||
2697 | + wx.getLocation({ | ||
2698 | + type: 'gcj02', | ||
2699 | + success: function(res) { | ||
2700 | + | ||
2701 | + th.data.lat = res.latitude; | ||
2702 | + th.data.lon = res.longitude; | ||
2703 | + th.data.is_get_local_ok = 1; | ||
2704 | + th.setData({ is_gps: 1 }); | ||
2705 | + th.get_sto(th.data.is_normal); | ||
2706 | + }, | ||
2707 | + fail: function(res) { | ||
2708 | + | ||
2709 | + th.data.is_get_local_ok = 1; | ||
2710 | + th.get_sto(th.data.is_normal); | ||
2711 | + if (res.errCode == 2) { | ||
2712 | + th.setData({is_gps: 0}); | ||
2713 | + if (th.data.is_gps == 0) { | ||
2714 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | ||
2715 | + } | ||
2716 | + } else { | ||
2717 | + th.setData({ is_gps: "3" }); | ||
2718 | + } | ||
2719 | + | ||
2720 | + } | ||
2721 | + }) | ||
2722 | + }else{ | ||
2723 | + th.data.is_get_local_ok = 1; | ||
2724 | + th.get_sto(th.data.is_normal); | ||
2725 | + } | ||
2726 | + | ||
2727 | + if(ind!=undefined && ind!=null ){ | ||
2728 | + this.setData({ | ||
2729 | + open_ind_store: ind, | ||
2730 | + store: 1, | ||
2731 | + openSpecModal: !1, | ||
2732 | + openSpecModal_pt: !1 | ||
2733 | + }) | ||
2734 | + }else{ | ||
2735 | + this.setData({ | ||
2736 | + store: 1, | ||
2737 | + openSpecModal: !1, | ||
2738 | + openSpecModal_pt: !1 | ||
2739 | + }) | ||
2740 | + } | ||
2741 | + }, | ||
2742 | + //关闭选择门店 | ||
2743 | + close_popup: function(e) { | ||
2744 | + var th=this; | ||
2745 | + this.setData({ | ||
2746 | + store: 0, | ||
2747 | + choice_sort_store: 0, | ||
2748 | + sort_store: 0, | ||
2749 | + fir_pick_index:0, | ||
2750 | + sec_pick_index:0 | ||
2751 | + }) | ||
2752 | + | ||
2753 | + var openindstore=this.data.open_ind_store; | ||
2754 | + if (openindstore == 1) { | ||
2755 | + th.setData({ | ||
2756 | + openSpecModal: !0, | ||
2757 | + openSpecModal_ind: openindstore, | ||
2758 | + }); | ||
2759 | + } else if (openindstore == 2) { | ||
2760 | + th.setData({ | ||
2761 | + openSpecModal: !0, | ||
2762 | + openSpecModal_ind: openindstore, | ||
2763 | + }); | ||
2764 | + } | ||
2765 | + else if (openindstore == 4) { //4就是拼团 | ||
2766 | + th.setData({ | ||
2767 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
2768 | + store: 0, //关闭门店 | ||
2769 | + choice_sort_store: 0, //关闭门店2级 | ||
2770 | + sort_store: 0, //关闭门店2级 | ||
2771 | + }); | ||
2772 | + } | ||
2773 | + else { | ||
2774 | + th.setData({ | ||
2775 | + store: 0, | ||
2776 | + choice_sort_store: 0, | ||
2777 | + sort_store: 0 | ||
2778 | + }) | ||
2779 | + } | ||
2780 | + }, | ||
2781 | + | ||
2782 | + //选择更多门店 | ||
2783 | + more_store: function() { | ||
2784 | + this.setData({ | ||
2785 | + sort_store: 1 | ||
2786 | + }); | ||
2787 | + }, | ||
2788 | + | ||
2789 | + sort_store: function() { }, | ||
2790 | + // 返回按钮 | ||
2791 | + returns: function() { | ||
2792 | + this.setData({ | ||
2793 | + sort_store: 0, | ||
2794 | + choice_sort_store: 0 | ||
2795 | + }); | ||
2796 | + }, | ||
2797 | + //---选择分类门店--- | ||
2798 | + choice_sort_store: function(e) { | ||
2799 | + var index = e.currentTarget.dataset.index; | ||
2800 | + var region_name = e.currentTarget.dataset.region; | ||
2801 | + var item = this.data.all_sto[index]; | ||
2802 | + this.setData({ | ||
2803 | + region_name: region_name, | ||
2804 | + sort_store: 0, | ||
2805 | + choice_sort_store: 1, | ||
2806 | + sec_sto: item, | ||
2807 | + sec_i:index, | ||
2808 | + sec_pick_index: 0 | ||
2809 | + }); | ||
2810 | + }, | ||
2811 | + | ||
2812 | + choose_for_store_fir: function(e) { | ||
2813 | + var index_c = e.currentTarget.dataset.ind; | ||
2814 | + var th=this; | ||
2815 | + th.setData({ | ||
2816 | + fir_pick_index: index_c | ||
2817 | + }) | ||
2818 | + | ||
2819 | + }, | ||
2820 | + | ||
2821 | + //确定def_pick为选择的门店 | ||
2822 | + sure_pick: function(e) { | ||
2823 | + var th = this; | ||
2824 | + var item = null; | ||
2825 | + var openindstore = th.data.open_ind_store; | ||
2826 | + | ||
2827 | + if (th.data.choice_sort_store == 0) { | ||
2828 | + var index = th.data.fir_pick_index; | ||
2829 | + if (th.data.is_show_sto_cat == 1) { | ||
2830 | + item = th.data.def_pickpu_list[index]; | ||
2831 | + } else { | ||
2832 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | ||
2833 | + } | ||
2834 | + | ||
2835 | + } else { | ||
2836 | + var index = th.data.sec_pick_index; | ||
2837 | + item = th.data.sec_sto.s_arr[index]; | ||
2838 | + } | ||
2839 | + | ||
2840 | + if(!item) return false; | ||
2841 | + | ||
2842 | + | ||
2843 | + var ser_card=this.data.data; | ||
2844 | + //判断门店的配送方式是不是匹配 | ||
2845 | + if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(item.keyid)==-1){ | ||
2846 | + wx.showToast({ | ||
2847 | + title: "该门店无此服务项目,请重新选择!", | ||
2848 | + icon: 'none', | ||
2849 | + duration: 2000 | ||
2850 | + }); | ||
2851 | + return false; | ||
2852 | + } | ||
2853 | + | ||
2854 | + if(!item) return false; | ||
2855 | + | ||
2856 | + th.setData({ | ||
2857 | + def_pick_store: item, | ||
2858 | + sto_sele_name: item.pickup_name, | ||
2859 | + sto_sele_id: item.pickup_id, | ||
2860 | + sto_sele_keyid: item.keyid, | ||
2861 | + sto_sele_distr: item.distr_type, | ||
2862 | + store: 0, | ||
2863 | + choice_sort_store: 0, | ||
2864 | + fir_pick_index: 0 | ||
2865 | + }); | ||
2866 | + | ||
2867 | + if (openindstore == 1) { | ||
2868 | + th.setData({ | ||
2869 | + openSpecModal: !0, | ||
2870 | + openSpecModal_ind: openindstore, | ||
2871 | + }); | ||
2872 | + } else if (openindstore == 2) { | ||
2873 | + th.setData({ | ||
2874 | + openSpecModal: !0, | ||
2875 | + openSpecModal_ind: openindstore, | ||
2876 | + }); | ||
2877 | + } | ||
2878 | + else if(openindstore == 4) { //4就是拼团 | ||
2879 | + th.setData({ | ||
2880 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
2881 | + store: 0, //关闭门店 | ||
2882 | + choice_sort_store: 0, //关闭门店2级 | ||
2883 | + sort_store: 0, //关闭门店2级 | ||
2884 | + }); | ||
2885 | + } | ||
2886 | + else { | ||
2887 | + th.setData({ | ||
2888 | + store: 0, | ||
2889 | + choice_sort_store: 0, | ||
2890 | + sort_store: 0 | ||
2891 | + }) | ||
2892 | + } | ||
2893 | + }, | ||
2894 | + | ||
2895 | + //---点击二级之后的选择--- | ||
2896 | + choose_for_store: function(e) { | ||
2897 | + var index_c = e.currentTarget.dataset.ind; | ||
2898 | + var th=this; | ||
2899 | + th.setData({ | ||
2900 | + sec_pick_index: index_c, | ||
2901 | + fir_pick_index: index_c | ||
2902 | + }) | ||
2903 | + | ||
2904 | + }, | ||
2905 | + //把选择的门店设置成默认的门店def_pick | ||
2906 | + set_def_pick: function(e) { | ||
2907 | + var th = this; | ||
2908 | + var item = null; | ||
2909 | + if (th.data.choice_sort_store == 0) { | ||
2910 | + var index = th.data.fir_pick_index; | ||
2911 | + if (th.data.is_show_sto_cat == 1) { | ||
2912 | + item = th.data.def_pickpu_list[index]; | ||
2913 | + } else { | ||
2914 | + item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候 | ||
2915 | + } | ||
2916 | + } else { | ||
2917 | + var index = th.data.sec_pick_index; | ||
2918 | + item = th.data.sec_sto.s_arr[index]; | ||
2919 | + } | ||
2920 | + | ||
2921 | + if(!item) return false; | ||
2922 | + | ||
2923 | + //判断门店的配送方式是不是匹配 | ||
2924 | + var ser_card=this.data.data; | ||
2925 | + //判断门店的配送方式是不是匹配 | ||
2926 | + if(ser_card.storageId!=null && ser_card.storageId!="" && ser_card.storageId.indexOf(item.keyid)==-1){ | ||
2927 | + wx.showToast({ | ||
2928 | + title: "该门店无此服务项目,请重新选择!", | ||
2929 | + icon: 'none', | ||
2930 | + duration: 2000 | ||
2931 | + }); | ||
2932 | + return false; | ||
2933 | + } | ||
2934 | + | ||
2935 | + | ||
2936 | + | ||
2937 | + var store_id = o.stoid; | ||
2938 | + var user_id = getApp().globalData.user_id; | ||
2939 | + var def_pickup_id = item.pickup_id; | ||
2940 | + | ||
2941 | + getApp().request.put('/api/weshop/users/update', { | ||
2942 | + data: { | ||
2943 | + user_id:user_id, | ||
2944 | + def_pickup_id:def_pickup_id | ||
2945 | + }, | ||
2946 | + success: function(res) { | ||
2947 | + if (res.data.code == 0) { | ||
2948 | + if (th.data.choice_sort_store == 0) th.setData({ | ||
2949 | + fir_pick_index: 0 | ||
2950 | + }); | ||
2951 | + getApp().globalData.pk_store = item; | ||
2952 | + } else { | ||
2953 | + //s.showWarning("设置默认门店地址失败", null, 500, !1); | ||
2954 | + getApp().my_warnning("设置默认门店地址失败",0,th) | ||
2955 | + } | ||
2956 | + | ||
2957 | + } | ||
2958 | + }); | ||
2959 | + | ||
2960 | + | ||
2961 | + if(!item) return false; | ||
2962 | + | ||
2963 | + th.setData({ | ||
2964 | + def_pick_store: item, | ||
2965 | + sto_sele_name: item.pickup_name, | ||
2966 | + sto_sele_id: item.pickup_id, | ||
2967 | + sto_sele_keyid: item.keyid, | ||
2968 | + sto_sele_distr: item.distr_type, | ||
2969 | + store: 0, | ||
2970 | + choice_sort_store: 0 | ||
2971 | + }); | ||
2972 | + | ||
2973 | + var openindstore = th.data.open_ind_store; | ||
2974 | + if (openindstore == 1) { | ||
2975 | + th.setData({ | ||
2976 | + openSpecModal: !0, | ||
2977 | + openSpecModal_ind: openindstore, | ||
2978 | + store: 0, | ||
2979 | + choice_sort_store: 0, | ||
2980 | + sort_store: 0, | ||
2981 | + }); | ||
2982 | + } else if (openindstore == 2) { | ||
2983 | + th.setData({ | ||
2984 | + openSpecModal: !0, | ||
2985 | + openSpecModal_ind: openindstore, | ||
2986 | + store: 0, | ||
2987 | + choice_sort_store: 0, | ||
2988 | + sort_store: 0, | ||
2989 | + }); | ||
2990 | + } | ||
2991 | + else if (openindstore == 4) { //4就是拼团 | ||
2992 | + th.setData({ | ||
2993 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
2994 | + store: 0, //关闭门店 | ||
2995 | + choice_sort_store: 0, //关闭门店2级 | ||
2996 | + sort_store: 0, //关闭门店2级 | ||
2997 | + }); | ||
2998 | + } | ||
2999 | + | ||
3000 | + else { | ||
3001 | + th.setData({ | ||
3002 | + store: 0, | ||
3003 | + choice_sort_store: 0, | ||
3004 | + sort_store: 0, | ||
3005 | + }) | ||
3006 | + } | ||
3007 | + | ||
3008 | + }, | ||
3009 | + | ||
3010 | + wait_for_store_config: function() { | ||
3011 | + var th = this; | ||
3012 | + var t_time = setInterval(function() { | ||
3013 | + if (th.data.bconfig == null) false; | ||
3014 | + var e = th.data.bconfig; | ||
3015 | + if (e && e.is_sort_storage) { | ||
3016 | + wx.getLocation({ | ||
3017 | + type: 'gcj02', | ||
3018 | + success: function(res) { | ||
3019 | + th.data.lat = res.latitude; | ||
3020 | + th.data.lon = res.longitude; | ||
3021 | + th.data.is_get_local_ok = 1; | ||
3022 | + }, | ||
3023 | + fail: function(res) { | ||
3024 | + if (res.errCode == 2) { | ||
3025 | + th.setData({ | ||
3026 | + is_gps: 0 | ||
3027 | + }); | ||
3028 | + if (th.data.is_gps == 0) { | ||
3029 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | ||
3030 | + } | ||
3031 | + | ||
3032 | + } else { | ||
3033 | + th.setData({ | ||
3034 | + is_gps: "3" | ||
3035 | + }); | ||
3036 | + } | ||
3037 | + | ||
3038 | + th.data.is_get_local_ok = 1; | ||
3039 | + } | ||
3040 | + }) | ||
3041 | + } else { | ||
3042 | + th.data.is_get_local_ok = 1; | ||
3043 | + } | ||
3044 | + clearInterval(t_time); | ||
3045 | + }, 500) | ||
3046 | + }, | ||
3047 | + | ||
3048 | + | ||
3049 | + //-- 根据ID拿出门店 -- | ||
3050 | + get_pick_from_list(pid){ | ||
3051 | + var all_pick_list=this.data.all_pick_list; | ||
3052 | + for(var i in all_pick_list){ | ||
3053 | + var item=all_pick_list[i]; | ||
3054 | + if(item.pickup_id==pid){ return item;} | ||
3055 | + } | ||
3056 | + }, | ||
3057 | + | ||
3058 | + closePoster() { | ||
3059 | + this.setData({ | ||
3060 | + showPoster: false, | ||
3061 | + }); | ||
3062 | + }, | ||
3063 | + | ||
3064 | + // 保存图片到手机 | ||
3065 | + savePic() { | ||
3066 | + console.log('保存图片'); | ||
3067 | + var self = this; | ||
3068 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | ||
3069 | + this.getSetting().then((res) => { | ||
3070 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | ||
3071 | + if (!res.authSetting['scope.writePhotosAlbum']) { | ||
3072 | + this.authorize().then(() => { | ||
3073 | + // 同意授权后保存下载文件 | ||
3074 | + this.saveImage(self.data.shareImgPath) | ||
3075 | + .then(() => { | ||
3076 | + self.setData({ | ||
3077 | + showPoster: false | ||
3078 | + }); | ||
3079 | + }); | ||
3080 | + }) | ||
3081 | + } else { | ||
3082 | + // 如果已经授权,保存下载文件 | ||
3083 | + this.saveImage(self.data.shareImgPath) | ||
3084 | + .then(() => { | ||
3085 | + self.setData({ showPoster: false }); | ||
3086 | + }); | ||
3087 | + } | ||
3088 | + | ||
3089 | + }) | ||
3090 | + }, | ||
3091 | + | ||
3092 | + // 获取用户已经授予了哪些权限 | ||
3093 | + getSetting() { | ||
3094 | + return new Promise((resolve, reject) => { | ||
3095 | + wx.getSetting({ | ||
3096 | + success: res => { | ||
3097 | + resolve(res) | ||
3098 | + } | ||
3099 | + }) | ||
3100 | + }) | ||
3101 | + }, | ||
3102 | + | ||
3103 | + // 发起首次授权请求 | ||
3104 | + authorize() { | ||
3105 | + // isFirst 用来记录是否为首次发起授权, | ||
3106 | + // 如果首次授权拒绝后,isFirst赋值为1 | ||
3107 | + let isFirst = wx.getStorageSync('isFirst') || 0; | ||
3108 | + return new Promise((resolve, reject) => { | ||
3109 | + wx.authorize({ | ||
3110 | + scope: 'scope.writePhotosAlbum', | ||
3111 | + // 同意授权 | ||
3112 | + success: () => { | ||
3113 | + resolve(); | ||
3114 | + }, | ||
3115 | + // 拒绝授权,这里是用户拒绝授权后的回调 | ||
3116 | + fail: res => { | ||
3117 | + if(isFirst === 0) { | ||
3118 | + wx.setStorageSync('isFirst', 1); | ||
3119 | + wx.showToast({ | ||
3120 | + title: '保存失败', | ||
3121 | + icon: 'none', | ||
3122 | + duration: 1000 | ||
3123 | + }) | ||
3124 | + } else { | ||
3125 | + this.showModal(); | ||
3126 | + } | ||
3127 | + console.log('拒绝授权'); | ||
3128 | + reject(); | ||
3129 | + } | ||
3130 | + }) | ||
3131 | + }) | ||
3132 | + }, | ||
3133 | + | ||
3134 | + // 保存图片到系统相册 | ||
3135 | + saveImage(saveUrl) { | ||
3136 | + var self = this; | ||
3137 | + return new Promise((resolve, reject) => { | ||
3138 | + wx.saveImageToPhotosAlbum({ | ||
3139 | + filePath: saveUrl, | ||
3140 | + success: (res) => { | ||
3141 | + wx.showToast({ | ||
3142 | + title: '保存成功', | ||
3143 | + duration: 1000, | ||
3144 | + }); | ||
3145 | + self.setData({ | ||
3146 | + showPlaybill: 'true' | ||
3147 | + }); | ||
3148 | + resolve(); | ||
3149 | + }, | ||
3150 | + fail: () => { | ||
3151 | + wx.showToast({ | ||
3152 | + title: '保存失败', | ||
3153 | + duration: 1000, | ||
3154 | + }); | ||
3155 | + } | ||
3156 | + }) | ||
3157 | + }) | ||
3158 | + }, | ||
3159 | + | ||
3160 | + previewImage() { | ||
3161 | + getApp().pre_img(this.data.shareImgPath); | ||
3162 | + }, | ||
3163 | + | ||
3164 | + onShareTimeline() { | ||
3165 | + getApp().globalData.no_clear=1 | ||
3166 | + | ||
3167 | + var th = this; | ||
3168 | + var price = th.data.data.shop_price; | ||
3169 | + if (th.data.prom_act) { | ||
3170 | + price = th.data.prom_act.price; | ||
3171 | + | ||
3172 | + } | ||
3173 | + var title= th.data.data.goods_name; | ||
3174 | + // var img=th.data.data.original_img; | ||
3175 | + var img=th.data.iurl+th.data.data.image_url; | ||
3176 | + if(th.data.prom_type==6){ | ||
3177 | + title=th.data.prom_act.share_title; | ||
3178 | + img=th.data.iurl+th.data.prom_act.share_imgurl; | ||
3179 | + } | ||
3180 | + | ||
3181 | + var url="goods_id=" + th.data.gid; | ||
3182 | + if(getApp().globalData.user_id) { | ||
3183 | + url+="&first_leader="+getApp().globalData.user_id; | ||
3184 | + } | ||
3185 | + | ||
3186 | + //-- 如果房间分享,且不是会员分享的 -- | ||
3187 | + if(getApp().globalData.room_id && | ||
3188 | + th.data.data.goods_id==getApp().globalData.room_goods_id && | ||
3189 | + !getApp().globalData.room_user_share | ||
3190 | + ){ | ||
3191 | + url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1"; | ||
3192 | + } | ||
3193 | + | ||
3194 | + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | ||
3195 | + if(th.data.prom_type == 1) { | ||
3196 | + if(th.data.sele_g && th.data.sele_g.share_imgurl) { | ||
3197 | + img = th.data.iurl + th.data.sele_g.share_imgurl; | ||
3198 | + }; | ||
3199 | + }; | ||
3200 | + | ||
3201 | + return { | ||
3202 | + title:price + "元 " +title, | ||
3203 | + imageUrl:img, | ||
3204 | + query: url | ||
3205 | + } | ||
3206 | + }, | ||
3207 | + | ||
3208 | + | ||
3209 | + | ||
3210 | + clickCollapse() { | ||
3211 | + this.setData({ | ||
3212 | + flag: !this.data.flag, | ||
3213 | + }) | ||
3214 | + }, | ||
3215 | + | ||
3216 | + //---------联系微信客服------------ | ||
3217 | + con_weixin:function () { | ||
3218 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
3219 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
3220 | + wx.openCustomerServiceChat({ | ||
3221 | + extInfo: {url: url}, | ||
3222 | + corpId: id, | ||
3223 | + success(res) {} | ||
3224 | + }) | ||
3225 | + }, | ||
3226 | + | ||
3227 | + //评论的调用 | ||
3228 | + requestComments_new: async function () { | ||
3229 | + var e = this, th = e, ee = e; var tp = e.data.activeCategoryId3; | ||
3230 | + var t = '/api/weshop/serviceComment/pageComment?page=' + e.data.c_curr_p; | ||
3231 | + | ||
3232 | + wx.showLoading(); | ||
3233 | + var req_where = { | ||
3234 | + store_id: o.stoid, pageSize: 5, is_show: 1, | ||
3235 | + parent_id: 0, goods_id: th.data.gid, commenttype: tp, | ||
3236 | + service_id: this.data.gid, | ||
3237 | + } | ||
3238 | + if (getApp().globalData.userInfo) { | ||
3239 | + req_where.userId = getApp().globalData.user_id; | ||
3240 | + } | ||
3241 | + | ||
3242 | + var rs_data = null; | ||
3243 | + await getApp().request.promiseGet(t, { data: req_where }).then(res => { | ||
3244 | + var tot = res.data.data.total; | ||
3245 | + e.data.c_curr_p++; | ||
3246 | + e.setData({ | ||
3247 | + com_num: tot, //已经有加载 | ||
3248 | + }); | ||
3249 | + if (res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | ||
3250 | + rs_data = res.data.data.pageData; | ||
3251 | + } else { | ||
3252 | + th.setData({ comments_no_more: 1, auto: 1 }); | ||
3253 | + } | ||
3254 | + }) | ||
3255 | + | ||
3256 | + if (rs_data) { | ||
3257 | + //var cda = th.data.comments; | ||
3258 | + var cda = rs_data, com_data = th.data.comments; | ||
3259 | + for (var ind in cda) { | ||
3260 | + var ep = cda[ind]; | ||
3261 | + if (cda[ind].head_pic == '') { | ||
3262 | + cda[ind].head_pic = th.data.iurl + "/miniapp/images/hui_hear_pic.png"; | ||
3263 | + } | ||
3264 | + if (ep.weapp_img != "" && ut.isString(ep.weapp_img)) { | ||
3265 | + cda[ind].weapp_img = JSON.parse(ep.weapp_img); | ||
3266 | + } | ||
3267 | + if (ep.img != "" && ut.isString(ep.img)) { | ||
3268 | + cda[ind].img = ut.unserialize(ep.img); | ||
3269 | + } | ||
3270 | + | ||
3271 | + //--测量多有字的宽带,计算有多少行-- | ||
3272 | + var widh = ut.measureText(ep.content, 30); | ||
3273 | + var lines = widh / 712; | ||
3274 | + cda[ind].seeMore = false; | ||
3275 | + if (lines > 3) cda[ind].seeMore = true; | ||
3276 | + | ||
3277 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | ||
3278 | + data: { | ||
3279 | + store_id: o.stoid, | ||
3280 | + parent_id: ep.comment_id, | ||
3281 | + service_id: this.data.gid, | ||
3282 | + } | ||
3283 | + }).then(res => { | ||
3284 | + if (res.data.data.pageData && res.data.data.pageData.length > 0) { | ||
3285 | + cda[ind].replay_list = res.data.data.pageData; | ||
3286 | + } | ||
3287 | + }) | ||
3288 | + } | ||
3289 | + | ||
3290 | + if (!com_data) com_data = cda; | ||
3291 | + else com_data = com_data.concat(cda); | ||
3292 | + | ||
3293 | + th.setData({ comments: com_data }); | ||
3294 | + } | ||
3295 | + th.setData({ get_c: 1 }); | ||
3296 | + wx.hideLoading(); | ||
3297 | + }, | ||
3298 | + | ||
3299 | + | ||
3300 | + | ||
3301 | + //--点赞功能-- | ||
3302 | + click_zan: function (e) { | ||
3303 | + var com_id = e.currentTarget.dataset.com_id; | ||
3304 | + var item_id = e.currentTarget.dataset.item_id; | ||
3305 | + var app = getApp(), | ||
3306 | + th = this; | ||
3307 | + | ||
3308 | + if (app.globalData.userInfo == null || app.globalData.userInfo == undefined) { | ||
3309 | + app.confirmBox("您还未登录"); | ||
3310 | + return false; | ||
3311 | + } | ||
3312 | + | ||
3313 | + var iszan = th.data.comments[item_id].userZanNum; | ||
3314 | + if (this.data.iszaning) return false; | ||
3315 | + this.data.iszaning = 1; | ||
3316 | + | ||
3317 | + | ||
3318 | + app.request.post("/api/weshop/serviceCommentZan/save", { | ||
3319 | + data: { | ||
3320 | + store_id: o.stoid, | ||
3321 | + user_id: app.globalData.user_id, | ||
3322 | + goods_id: th.data.gid, | ||
3323 | + service_id: th.data.gid, | ||
3324 | + comment_id: com_id | ||
3325 | + }, | ||
3326 | + success: function (ee) { | ||
3327 | + | ||
3328 | + if (ee.data.code == "-1") { | ||
3329 | + app.my_warnning("不能给自己点赞", 0, th); | ||
3330 | + th.data.iszaning = 0; | ||
3331 | + return; | ||
3332 | + } | ||
3333 | + | ||
3334 | + if (ee.data.code == 0 && iszan != 1) { | ||
3335 | + var num = th.data.comments[item_id].zan_num; | ||
3336 | + num++; | ||
3337 | + var text = "comments[" + item_id + "].zan_num"; | ||
3338 | + var text1 = "comments[" + item_id + "].userZanNum"; | ||
3339 | + var _errObj = {}; | ||
3340 | + _errObj[text] = num; | ||
3341 | + _errObj[text1] = 1; | ||
3342 | + th.setData(_errObj); | ||
3343 | + | ||
3344 | + } else { | ||
3345 | + var num = th.data.comments[item_id].zan_num; | ||
3346 | + num--; | ||
3347 | + var text = "comments[" + item_id + "].zan_num"; | ||
3348 | + var text1 = "comments[" + item_id + "].userZanNum"; | ||
3349 | + var _errObj = {}; | ||
3350 | + _errObj[text] = num; | ||
3351 | + _errObj[text1] = 0; | ||
3352 | + th.setData(_errObj); | ||
3353 | + } | ||
3354 | + | ||
3355 | + setTimeout(function () { | ||
3356 | + th.data.iszaning = 0; | ||
3357 | + }, 500) | ||
3358 | + | ||
3359 | + } | ||
3360 | + }) | ||
3361 | + }, | ||
3362 | + | ||
3363 | + | ||
3364 | + //--外侧评价的点击效果--- | ||
3365 | + clik_evaluate: function (e) { | ||
3366 | + var val = e.currentTarget.dataset.val; | ||
3367 | + this.setData({ | ||
3368 | + activeCategoryId: 2, | ||
3369 | + activeCategoryId3: val, | ||
3370 | + comments: null | ||
3371 | + }); | ||
3372 | + this.requestComments_new(); | ||
3373 | + }, | ||
3374 | + | ||
3375 | + | ||
3376 | + //显示全部 | ||
3377 | + toggleHandler: function (e) { | ||
3378 | + var that = this, | ||
3379 | + index = e.currentTarget.dataset.index; | ||
3380 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
3381 | + if (index == i) { | ||
3382 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
3383 | + that.data.comments[index].auto = true; | ||
3384 | + that.data.comments[index].seeMore = false; | ||
3385 | + } | ||
3386 | + } | ||
3387 | + } | ||
3388 | + that.setData({ | ||
3389 | + comments: that.data.comments | ||
3390 | + }) | ||
3391 | + }, | ||
3392 | + | ||
3393 | + //收起更多 | ||
3394 | + toggleContent: function (e) { | ||
3395 | + var that = this, | ||
3396 | + index = e.currentTarget.dataset.index; | ||
3397 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
3398 | + if (index == i) { | ||
3399 | + that.data.comments[index].auto = true; | ||
3400 | + that.data.comments[index].seeMore = true; | ||
3401 | + } | ||
3402 | + } | ||
3403 | + that.setData({ | ||
3404 | + comments: that.data.comments | ||
3405 | + }) | ||
3406 | + }, | ||
3407 | + | ||
3408 | + //--查看评价-- | ||
3409 | + look_pj: function () { | ||
3410 | + this.tabComment(); | ||
3411 | + this.doScrollTop(); | ||
3412 | + }, | ||
3413 | + | ||
3414 | + previewCommentImgs_w: function (t) { | ||
3415 | + var e = this.data.comments[t.currentTarget.dataset.cidx].weapp_img; | ||
3416 | + var b = e.slice() | ||
3417 | + // for (var i in b) { | ||
3418 | + // b[i] = this.data.iurl + e[i]; | ||
3419 | + // } | ||
3420 | + this.data.show_prew_img = 1; | ||
3421 | + wx.previewImage({ | ||
3422 | + current: b[t.currentTarget.dataset.id], | ||
3423 | + urls: b | ||
3424 | + }); | ||
3425 | + }, | ||
3426 | + | ||
3427 | + | ||
3428 | + // 判断是否开启美业,获取套盒列表 | ||
3429 | + getTaohe() { | ||
3430 | + // 判断是否开启美业 | ||
3431 | + getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { | ||
3432 | + if(res.data.code == 0) { | ||
3433 | + let enableMeiye = res.data.data.EnableMeiye; | ||
3434 | + self.setData({ | ||
3435 | + enableMeiye, | ||
3436 | + }); | ||
3437 | + | ||
3438 | + if(enableMeiye) { // 开启美业 | ||
3439 | + // 获取套盒列表 | ||
3440 | + let url = '/api/weshop/serviceGoods/list' | ||
3441 | + let data = { | ||
3442 | + store_id: getApp().globalData.setting.stoid, | ||
3443 | + service_id: this.data.data.id, | ||
3444 | + }; | ||
3445 | + // 请求数据 | ||
3446 | + getApp().promiseGet(url, { | ||
3447 | + data: data, | ||
3448 | + }).then(res => { | ||
3449 | + if (res.data.code == 0) { | ||
3450 | + console.log('请求成功套盒列表', res); | ||
3451 | + self.setData({ | ||
3452 | + taoheList: res.data.data, | ||
3453 | + }); | ||
3454 | + } else { | ||
3455 | + throw (res); | ||
3456 | + }; | ||
3457 | + }).catch(err => {}); | ||
3458 | + | ||
3459 | + }; | ||
3460 | + }; | ||
3461 | + }); | ||
3462 | + }, | ||
3463 | + | ||
3464 | + | ||
3465 | + | ||
3466 | + | ||
3467 | + //---小于10的格式化函数---- | ||
3468 | + // timeFormat(param) { | ||
3469 | + // return param < 10 ? '0' + param : param; | ||
3470 | + // }, | ||
3471 | + | ||
3472 | + //----倒计时函数----- | ||
3473 | + countDown(time, prom_st) { | ||
3474 | + if (!this.data.is_timer) return false; | ||
3475 | + var th = this; | ||
3476 | + // 获取当前时间,同时得到活动结束时间数组 | ||
3477 | + var endTime = time; | ||
3478 | + var newTime = ut.gettimestamp(); | ||
3479 | + // 对结束时间进行处理渲染到页面 | ||
3480 | + var obj = null; | ||
3481 | + // 如果活动未结束,对时间进行处理 | ||
3482 | + if (endTime - newTime > 0) { | ||
3483 | + var time = (endTime - newTime); | ||
3484 | + // 获取天、时、分、秒 | ||
3485 | + var day = parseInt(time / (60 * 60 * 24)); | ||
3486 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
3487 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
3488 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
3489 | + obj = { | ||
3490 | + day: this.timeFormat(day), | ||
3491 | + hou: this.timeFormat(hou), | ||
3492 | + min: this.timeFormat(min), | ||
3493 | + sec: this.timeFormat(sec) | ||
3494 | + } | ||
3495 | + } else { | ||
3496 | + if (th.data.prom_st == 0) { | ||
3497 | + //var endTime2 = new Date(th.data.prom_end_time).getTime(); | ||
3498 | + var endTime2 = th.data.prom_act.end_time; | ||
3499 | + th.setData({ | ||
3500 | + prom_time_text: '距结束还剩:', | ||
3501 | + prom_st: 1 | ||
3502 | + }) | ||
3503 | + setTimeout(function () { | ||
3504 | + th.countDown(endTime2) | ||
3505 | + }, 1000); | ||
3506 | + return false; | ||
3507 | + | ||
3508 | + } else { | ||
3509 | + //活动已结束,全部设置为'00' | ||
3510 | + obj = { | ||
3511 | + day: '00', | ||
3512 | + hou: '00', | ||
3513 | + min: '00', | ||
3514 | + sec: '00' | ||
3515 | + } | ||
3516 | + th.setData({ | ||
3517 | + prom_time_text: '活动已经结束:', | ||
3518 | + prom_st: 3 | ||
3519 | + }) | ||
3520 | + th.setData({ | ||
3521 | + djs: obj | ||
3522 | + }); | ||
3523 | + return false; | ||
3524 | + } | ||
3525 | + } | ||
3526 | + | ||
3527 | + th.setData({ | ||
3528 | + djs: obj | ||
3529 | + }); | ||
3530 | + setTimeout(function () { | ||
3531 | + th.countDown(endTime) | ||
3532 | + }, 1000); | ||
3533 | + }, | ||
3534 | + | ||
3535 | + | ||
3536 | + get_normal(gid) { | ||
3537 | + this.setData({ | ||
3538 | + prom_type: 0, | ||
3539 | + }); | ||
3540 | + // this.get_sku(os.stoid, this.data.data, gid); | ||
3541 | + this.get_sto(); | ||
3542 | + // this.check_is_youhui(gid, 1); | ||
3543 | + this.data.is_normal = 1; | ||
3544 | + }, | ||
3545 | + | ||
3546 | + | ||
3547 | + //获取redis中的数量 | ||
3548 | + async getactLen() { | ||
3549 | + let prom_type = this.data.options.prom_type; | ||
3550 | + let prom_id = this.data.options.prom_id; | ||
3551 | + return await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | ||
3552 | + 1: 1 | ||
3553 | + }).then(res => { | ||
3554 | + if (res.data.code == 0) { | ||
3555 | + // 当前可以购买的数量 | ||
3556 | + let r_num = res.data.data; | ||
3557 | + return r_num; | ||
3558 | + }; | ||
3559 | + }) | ||
3560 | + }, | ||
3561 | + | ||
3562 | + | ||
3563 | + | ||
3564 | + | ||
3565 | + | ||
3566 | + | ||
3567 | + | ||
3568 | + viewFlash(e) { | ||
3569 | + let prom_type = e.currentTarget.dataset.promtype; | ||
3570 | + let prom_id = e.currentTarget.dataset.promid; | ||
3571 | + let goods_id = this.data.data.goods_id; | ||
3572 | + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | ||
3573 | + if(prom_type==6){ | ||
3574 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | ||
3575 | + } | ||
3576 | + getApp().goto(url); | ||
3577 | + }, | ||
3578 | + | ||
3579 | + | ||
3580 | + | ||
3581 | + //获取更多秒杀 | ||
3582 | + get_more_flash: async function (func) { | ||
3583 | + var f_more = false; | ||
3584 | + var user_id = getApp().globalData.user_id; | ||
3585 | + if (!user_id) user_id = 0; | ||
3586 | + | ||
3587 | + var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.options.goods_id + "&user_id=" + user_id; | ||
3588 | + //获取秒杀的多规格 | ||
3589 | + await getApp().request.promiseGet(url, {}).then(res => { | ||
3590 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
3591 | + f_more = res.data.data; | ||
3592 | + } | ||
3593 | + }) | ||
3594 | + if (!f_more) { | ||
3595 | + func(false); | ||
3596 | + return false; | ||
3597 | + } | ||
3598 | + //-- 秒杀的价格要更新 -- | ||
3599 | + for (let i in f_more) { | ||
3600 | + | ||
3601 | + let item = f_more[i]; | ||
3602 | + f_more[i].prom_id = item.act_id; | ||
3603 | + f_more[i].prom_type = 1; | ||
3604 | + if (item.goods_id == this.data.data.goods_id) { | ||
3605 | + continue; | ||
3606 | + } | ||
3607 | + var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id; | ||
3608 | + await getApp().request.promiseGet(url, {}).then(rs => { | ||
3609 | + if (rs.data.code == 0) { | ||
3610 | + f_more[i].price = rs.data.data.user_price; | ||
3611 | + | ||
3612 | + } | ||
3613 | + }) | ||
3614 | + } | ||
3615 | + func(f_more); | ||
3616 | + | ||
3617 | + }, | ||
3618 | + | ||
3619 | + | ||
3620 | + | ||
3621 | + | ||
3622 | + | ||
3623 | + | ||
3624 | + //-------------获取购买数量的总函数---------------- | ||
3625 | + get_buy_num: function (gd, func) { | ||
3626 | + // var map = this.data.g_buy_num, | ||
3627 | + var th = this, | ||
3628 | + user_id = getApp().globalData.user_id; | ||
3629 | + if (user_id == null) { | ||
3630 | + // map.set(gd.goods_id, 0); | ||
3631 | + th.setData({ | ||
3632 | + // g_buy_num: map, | ||
3633 | + prom_buy_num: 0, | ||
3634 | + }); | ||
3635 | + "function" == typeof func && func(); | ||
3636 | + return false; | ||
3637 | + } | ||
3638 | + | ||
3639 | + // if (map.has(gd.goods_id)) { | ||
3640 | + // "function" == typeof func && func(); | ||
3641 | + // } else { | ||
3642 | + //----获取商品购买数---- | ||
3643 | + if (th.data.prom_type == 1) { | ||
3644 | + //----获取活动购买数---- | ||
3645 | + getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | ||
3646 | + data: { | ||
3647 | + store_id: os.stoid, | ||
3648 | + user_id: user_id, | ||
3649 | + card_id: th.data.options.goods_id, | ||
3650 | + prom_type: th.data.options.prom_type, | ||
3651 | + prom_id: th.data.options.prom_id | ||
3652 | + }, | ||
3653 | + //-----获取----- | ||
3654 | + success: function (tt) { | ||
3655 | + if (tt.data.code == 0) { | ||
3656 | + // map.set(gd.goods_id, g_buy_num); | ||
3657 | + th.setData({ | ||
3658 | + // g_buy_num: map, | ||
3659 | + promcardbuynum: tt.data.data.promcardbuynum, | ||
3660 | + cardbuynum: tt.data.data.cardbuynum, | ||
3661 | + }); | ||
3662 | + "function" == typeof func && func(); | ||
3663 | + } | ||
3664 | + } | ||
3665 | + }); | ||
3666 | + } else { | ||
3667 | + "function" == typeof func && func(); | ||
3668 | + }; | ||
3669 | + | ||
3670 | + }, | ||
3671 | + | ||
3672 | + | ||
3673 | + get_buy_num2: async function () { | ||
3674 | + // var map = this.data.g_buy_num, | ||
3675 | + var th = this, | ||
3676 | + user_id = getApp().globalData.user_id; | ||
3677 | + // if (user_id == null) { | ||
3678 | + // // map.set(gd.goods_id, 0); | ||
3679 | + // th.setData({ | ||
3680 | + // // g_buy_num: map, | ||
3681 | + // prom_buy_num: 0, | ||
3682 | + // }); | ||
3683 | + // "function" == typeof func && func(); | ||
3684 | + // return false; | ||
3685 | + // } | ||
3686 | + | ||
3687 | + | ||
3688 | + //----获取商品购买数---- | ||
3689 | + | ||
3690 | + //----获取活动购买数---- | ||
3691 | + return await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | ||
3692 | + data: { | ||
3693 | + store_id: os.stoid, | ||
3694 | + user_id: user_id, | ||
3695 | + card_id: th.data.options.goods_id, | ||
3696 | + prom_type: th.data.options.prom_type, | ||
3697 | + prom_id: th.data.options.prom_id | ||
3698 | + }, | ||
3699 | + //-----获取----- | ||
3700 | + success: function (tt) { | ||
3701 | + if (tt.data.code == 0) { | ||
3702 | + // map.set(gd.goods_id, g_buy_num); | ||
3703 | + th.setData({ | ||
3704 | + // g_buy_num: map, | ||
3705 | + promcardbuynum: tt.data.data.promcardbuynum, | ||
3706 | + cardbuynum: tt.data.data.cardbuynum, | ||
3707 | + }); | ||
3708 | + } | ||
3709 | + } | ||
3710 | + }); | ||
3711 | + | ||
3712 | + | ||
3713 | + }, | ||
3714 | + | ||
3715 | + | ||
3716 | + | ||
3717 | + | ||
3718 | + | ||
3719 | + // 促销 -> 送礼包 -> 查看详情 | ||
3720 | + viewLbDetails(e) { | ||
3721 | + let id = e.currentTarget.dataset.id; // 获取礼包id | ||
3722 | + let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 | ||
3723 | + // console.log('myurl', url); | ||
3724 | + getApp().goto(url); | ||
3725 | + }, | ||
3726 | + | ||
3727 | + go_more_ladder: function (e) { | ||
3728 | + var prom_id = e.currentTarget.dataset.id; | ||
3729 | + getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id); | ||
3730 | + }, | ||
3731 | + | ||
3732 | + getHistoryBuy() { | ||
3733 | + let _this = this; | ||
3734 | + let req_data = { | ||
3735 | + store_id: os.stoid, | ||
3736 | + goods_id: this.data.gid, | ||
3737 | + pay_status: 1, | ||
3738 | + rndid: 1 | ||
3739 | + }; | ||
3740 | + getApp().request.promiseGet('/api/weshop/ordergoods/list', { | ||
3741 | + data: req_data, | ||
3742 | + }) | ||
3743 | + .then(res => { | ||
3744 | + if (t.ajax_ok(res)) { | ||
3745 | + _this.setData({ | ||
3746 | + historyBuyInfo: res.data.data.pageData, | ||
3747 | + }) | ||
3748 | + } | ||
3749 | + }) | ||
3750 | + }, | ||
3751 | + | ||
3752 | + | ||
3753 | + | ||
3754 | + //-- 秒杀的普通购买 -- | ||
3755 | + openSpecModel_Nor: function () { | ||
3756 | + var th=this; | ||
3757 | + | ||
3758 | + // 是否授权登陆 | ||
3759 | + var user_info = getApp().globalData.userInfo; | ||
3760 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
3761 | + wx.navigateTo({ | ||
3762 | + url: '/packageE/pages/togoin/togoin', | ||
3763 | + }) | ||
3764 | + return false; | ||
3765 | + } | ||
3766 | + this.data.g_buy_num = new Map(); | ||
3767 | + var th = this; | ||
3768 | + this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4 | ||
3769 | + | ||
3770 | + this.setData({openSpecModal_flash_normal: 1}); | ||
3771 | + this.get_sto(1) | ||
3772 | + | ||
3773 | + | ||
3774 | + // if (th.data.sku_g_pt) { | ||
3775 | + // // this.get_sto(1) | ||
3776 | + // this.setData({openSpecModal_flash_normal: 1}); | ||
3777 | + // } else { | ||
3778 | + // th.get_sto(1); | ||
3779 | + // th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | ||
3780 | + // th.setData({ | ||
3781 | + // openSpecModal_flash_normal: 1 | ||
3782 | + // }); | ||
3783 | + // }); | ||
3784 | + // } | ||
3785 | + // this.check_is_youhui(th.data.gid, 1); | ||
3786 | + }, | ||
3787 | + | ||
3788 | + closeSpecModal_flash_normal: function () { | ||
3789 | + this.setData({openSpecModal_flash_normal: 0,is_normal:0}); | ||
3790 | + }, | ||
3791 | + | ||
3792 | + | ||
3793 | + //打开客服操作菜单 | ||
3794 | + openCS() { | ||
3795 | + // 判断会员状态 | ||
3796 | + let user_info = getApp().globalData.userInfo; | ||
3797 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) { | ||
3798 | + wx.navigateTo({ | ||
3799 | + url: '/packageE/pages/togoin/togoin', | ||
3800 | + }) | ||
3801 | + return false; | ||
3802 | + }; | ||
3803 | + // csType/在线客服设置: | ||
3804 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
3805 | + // 1小程序客服、 | ||
3806 | + // 2企业微信客服 | ||
3807 | + if(this.data.sys_switch) { | ||
3808 | + let csType = this.data.sys_switch.weapp_customertype; | ||
3809 | + if(csType == 0) { | ||
3810 | + // 拨打电话号码 | ||
3811 | + this.contactService(); | ||
3812 | + } else { | ||
3813 | + this.getTel() | ||
3814 | + .then(() => { | ||
3815 | + self.setData({ | ||
3816 | + hiddenCS: false, | ||
3817 | + }); | ||
3818 | + }); | ||
3819 | + }; | ||
3820 | + }; | ||
3821 | + | ||
3822 | + }, | ||
3823 | + | ||
3824 | + //关闭客服操作菜单 | ||
3825 | + closeCS() { | ||
3826 | + this.setData({ | ||
3827 | + hiddenCS: true, | ||
3828 | + }); | ||
3829 | + }, | ||
3830 | + | ||
3831 | + | ||
3832 | + click_contact:function () { | ||
3833 | + getApp().globalData.no_clear=1; | ||
3834 | + }, | ||
3835 | + | ||
3836 | + //打开客服操作菜单 | ||
3837 | + openCS() { | ||
3838 | + // csType/在线客服设置: | ||
3839 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
3840 | + // 1小程序客服、 | ||
3841 | + // 2企业微信客服 | ||
3842 | + let csType = this.data.sys_switch.weapp_customertype; | ||
3843 | + if(csType == 0) { | ||
3844 | + // 获取电话号码 | ||
3845 | + this.contactService(); | ||
3846 | + } else { | ||
3847 | + this.getTel() | ||
3848 | + .then(() => { | ||
3849 | + self.setData({ | ||
3850 | + hiddenCS: false, | ||
3851 | + }); | ||
3852 | + }); | ||
3853 | + | ||
3854 | + }; | ||
3855 | + }, | ||
3856 | + | ||
3857 | + //关闭客服操作菜单 | ||
3858 | + closeCS() { | ||
3859 | + this.setData({ | ||
3860 | + hiddenCS: true, | ||
3861 | + }); | ||
3862 | + }, | ||
3863 | + | ||
3864 | + | ||
3865 | + //-- 弹出框的同意的优化,重新获取定位 --- | ||
3866 | + agree_pri:function (){ | ||
3867 | + var th=this; | ||
3868 | + var bconfig = th.data.bconfig; | ||
3869 | + if (bconfig && bconfig.is_sort_storage) { | ||
3870 | + wx.getLocation({ | ||
3871 | + type: 'gcj02', | ||
3872 | + success: function (res) { | ||
3873 | + | ||
3874 | + th.data.lat = res.latitude; | ||
3875 | + th.data.lon = res.longitude; | ||
3876 | + th.data.is_get_local_ok = 1; | ||
3877 | + th.setData({is_gps: 1}); | ||
3878 | + th.get_sto(); | ||
3879 | + }, | ||
3880 | + fail: function (res) { | ||
3881 | + th.data.is_get_local_ok = 1; | ||
3882 | + th.get_sto(); | ||
3883 | + if (res.errCode == 2) { | ||
3884 | + th.setData({is_gps: 0}); | ||
3885 | + if (th.data.is_gps == 0) { | ||
3886 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | ||
3887 | + } | ||
3888 | + } else { | ||
3889 | + th.setData({is_gps: "3"}); | ||
3890 | + } | ||
3891 | + | ||
3892 | + } | ||
3893 | + }) | ||
3894 | + } | ||
3895 | + }, | ||
3896 | + | ||
3897 | + | ||
3898 | + //-- 获取预售的信息 -- | ||
3899 | + async get_pre_prom(func) { | ||
3900 | + var th = this; | ||
3901 | + var presell_id = null; | ||
3902 | + var pre_arr = null; | ||
3903 | + | ||
3904 | + if (!th.data.pre_id) { | ||
3905 | + var presell_id = th.data.presell_id; | ||
3906 | + var url = "/api/weshop/marketing/marketingPresellList/list" | ||
3907 | + var rd = { | ||
3908 | + store_id: os.stoid, | ||
3909 | + presell_id: presell_id, | ||
3910 | + goods_id: th.data.gid | ||
3911 | + } | ||
3912 | + console.log('获取预售从表') | ||
3913 | + //------获取预售从表---------- | ||
3914 | + await getApp().request.promiseGet(url, { | ||
3915 | + data: rd | ||
3916 | + }).then(res => { | ||
3917 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
3918 | + var arr = res.data.data[0]; | ||
3919 | + presell_id = arr.presell_id; | ||
3920 | + th.setData({ | ||
3921 | + presellList: arr, | ||
3922 | + }) | ||
3923 | + } | ||
3924 | + }) | ||
3925 | + | ||
3926 | + } else { | ||
3927 | + console.log('获取预售从表', 'pre_id', th.data.pre_id) | ||
3928 | + //------获取预售从表---------- | ||
3929 | + await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/get/" + os.stoid + "/" + th.data.pre_id, {}).then(res => { | ||
3930 | + if (res.data.code == 0 && res.data.data) { | ||
3931 | + var arr = res.data.data; | ||
3932 | + presell_id = arr.presell_id; | ||
3933 | + th.data.presell_id=presell_id; | ||
3934 | + th.setData({ | ||
3935 | + presellList: arr, | ||
3936 | + }) | ||
3937 | + } | ||
3938 | + }) | ||
3939 | + } | ||
3940 | + | ||
3941 | + if (!presell_id) { | ||
3942 | + wx.showToast({ title: "未找到活动商品", icon: 'none', duration: 3000 }); | ||
3943 | + ut.wx_back(); | ||
3944 | + return false; | ||
3945 | + } | ||
3946 | + | ||
3947 | + var gnext = 1; | ||
3948 | + //------获取预售主表---------- | ||
3949 | + await getApp().request.promiseGet(`/api/weshop/marketing/marketingPresellForm/get/${os.stoid}/${presell_id}`, {}).then(res => { | ||
3950 | + if (res.data.code == 0 && res.data.data) { | ||
3951 | + var act_data = res.data.data; | ||
3952 | + if (act_data.is_end) { | ||
3953 | + wx.showToast({ title: "活动已经结束", icon: 'none', duration: 3000 }); | ||
3954 | + setTimeout(function () { | ||
3955 | + ut.wx_back(); | ||
3956 | + }, 2000) | ||
3957 | + gnext = 0; | ||
3958 | + return false; | ||
3959 | + } | ||
3960 | + if (act_data.isuse == 0) { | ||
3961 | + wx.showToast({ title: "活动未启用", icon: 'none', duration: 3000 }); | ||
3962 | + setTimeout(function () { | ||
3963 | + ut.wx_back(); | ||
3964 | + }, 2000) | ||
3965 | + gnext = 0; | ||
3966 | + return false; | ||
3967 | + } | ||
3968 | + | ||
3969 | + var err_txt = "活动定金时间已经结束"; | ||
3970 | + var end_time = act_data.end_time; | ||
3971 | + if (act_data.presell_type == 1) { | ||
3972 | + err_txt = "活动时间已经结束"; | ||
3973 | + } | ||
3974 | + if (end_time < ut.gettimestamp()) { | ||
3975 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
3976 | + setTimeout(function () { | ||
3977 | + getApp().goto("/pages/index/index/index"); | ||
3978 | + }, 2000) | ||
3979 | + gnext = 0; | ||
3980 | + return false; | ||
3981 | + } | ||
3982 | + | ||
3983 | + if (act_data.presell_type == 0) { | ||
3984 | + end_time = act_data.pay_enddate; | ||
3985 | + err_txt = "活动尾款时间已经结束"; | ||
3986 | + } | ||
3987 | + if (end_time < ut.gettimestamp()) { | ||
3988 | + wx.showToast({ title: err_txt, icon: 'none', duration: 3000 }); | ||
3989 | + setTimeout(function () { | ||
3990 | + ut.wx_back(); | ||
3991 | + }, 2000) | ||
3992 | + gnext = 0; | ||
3993 | + return false; | ||
3994 | + } | ||
3995 | + | ||
3996 | + if (act_data.start_time > ut.gettimestamp()) { | ||
3997 | + // wx.showToast({ title: "活动还未开始", icon: 'none', duration: 3000 }); | ||
3998 | + // setTimeout(function () { | ||
3999 | + // ut.wx_back(); | ||
4000 | + // }, 2000) | ||
4001 | + // gnext = 0; | ||
4002 | + th.setData({ show: true }); | ||
4003 | + // return false; | ||
4004 | + } | ||
4005 | + | ||
4006 | + th.setData({ | ||
4007 | + presellForm: res.data.data, | ||
4008 | + }); | ||
4009 | + th.countDown(res.data.data.end_time) | ||
4010 | + } | ||
4011 | + }) | ||
4012 | + | ||
4013 | + // console.log('是否继续查询', gnext) | ||
4014 | + if (!gnext) { | ||
4015 | + return false; | ||
4016 | + } | ||
4017 | + // console.log('继续查询') | ||
4018 | + | ||
4019 | + var userInfo = getApp().globalData.userInfo; | ||
4020 | + // timetype: 1, | ||
4021 | + var pre_data = { store_id: os.stoid, is_end: 0, isuse: 1,presell_id: presell_id, pageSize: 1000 }; | ||
4022 | + if (userInfo) { | ||
4023 | + pre_data.user_id = userInfo.user_id; | ||
4024 | + } | ||
4025 | + await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/page", { | ||
4026 | + data: pre_data, | ||
4027 | + }).then(e => { | ||
4028 | + // console.log('查询marketingPresellList', e) | ||
4029 | + if (e.data.code == 0 && e.data.data.pageData && e.data.data.pageData.length > 0) { | ||
4030 | + // console.log('匹配resellList') | ||
4031 | + th.data.all_pre_goods = e.data.data.pageData; | ||
4032 | + var idx = e.data.data.pageData.findIndex(function (ele) { | ||
4033 | + return ele.id == th.data.presellList.id; | ||
4034 | + }) | ||
4035 | + | ||
4036 | + pre_arr = e.data.data.pageData[idx]; | ||
4037 | + th.setData({ pre_arr: pre_arr, show: 1 }) | ||
4038 | + th.data.prom_buy_limit = pre_arr.vip_butyqty; | ||
4039 | + } | ||
4040 | + }) | ||
4041 | + if (!pre_arr) { | ||
4042 | + // wx.showToast({ title: "当前会员身份不符或者时间已过期,无法参与", icon: 'none', duration: 3000 }); | ||
4043 | + // setTimeout(function () { | ||
4044 | + // ut.wx_back(); | ||
4045 | + // }, 2000) | ||
4046 | + th.setData({ show: true }); | ||
4047 | + // return false; | ||
4048 | + } | ||
4049 | + if (func) { | ||
4050 | + func(); | ||
4051 | + } | ||
4052 | + }, | ||
4053 | + | ||
4054 | + | ||
4055 | + | ||
4056 | + | ||
4057 | +}); | ||
4058 | + | ||
4059 | + |
packageC/pages/presell/cardInfo/goodsInfo.json
0 → 100644
1 | +{ | ||
2 | + "navigationBarTitleText": "商品详情", | ||
3 | + "enablePullDownRefresh": false, | ||
4 | + "usingComponents": { | ||
5 | + "nav_box": "/components/nav_box/nav_box", | ||
6 | + "warn": "/components/long_warn/long_warn", | ||
7 | + "goods_recommend": "/components/goods_list/goods_list", | ||
8 | + "share": "/components/share/share", | ||
9 | + "privacy_pop": "/components/privacy_pop/privacy_pop" | ||
10 | + } | ||
11 | +} | ||
0 | \ No newline at end of file | 12 | \ No newline at end of file |
packageC/pages/presell/cardInfo/goodsInfo.wxml
0 → 100644
1 | +<import src="../../../../utils/wxParse/wxParse.wxml"></import> | ||
2 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | ||
3 | +<wxs module="g_filters" src="g_filter.wxs"></wxs> | ||
4 | +<wxs module="tool" src="filter.wxs"></wxs> | ||
5 | + | ||
6 | +<!-- 判断隐私是不是显示 --> | ||
7 | +<privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | ||
8 | + | ||
9 | +<block wx:if="{{show}}"> | ||
10 | +<!-- 商品内容区域,普通商品,秒杀,拼团 --> | ||
11 | +<view class="container"> | ||
12 | + <view class="type-navbar"> | ||
13 | + <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | ||
14 | + <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | ||
15 | + {{item.name}} | ||
16 | + </view> | ||
17 | + </view> | ||
18 | + </view> | ||
19 | + <view class="goods-detail"> | ||
20 | + <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> | ||
21 | + | ||
22 | + <!-- 左上角轮播 历史购买记录 --> | ||
23 | + <view class="swiper-container" wx:if="{{historyBuyInfo.length}}"> | ||
24 | + <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000"> | ||
25 | + <swiper-item class="swiper-item" wx:for="{{historyBuyInfo}}" wx:key="order_id"> | ||
26 | + <view class="item"> | ||
27 | + <view class="avatar-container"> | ||
28 | + <image src="{{item.head_pic}}"></image> | ||
29 | + </view> | ||
30 | + <view class="flex ai_c pd10"> | ||
31 | + <view class="nickname ellipsis-1x">{{item.nickname}}下单成功</view> | ||
32 | + </view> | ||
33 | + </view> | ||
34 | + </swiper-item> | ||
35 | + </swiper> | ||
36 | + </view> | ||
37 | + | ||
38 | + <!-- 视频 --> | ||
39 | + <!-- <swiper bindchange="swiperChange"class="xc-pictures swiperContainer rel" current="{{swiperCurrent}}" | ||
40 | + indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> --> | ||
41 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove"> | ||
42 | + <view class="xc-videos-picture rel"> | ||
43 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | ||
44 | + <swiper-item wx:if="{{mapurl}}"> | ||
45 | + <view wx:if="{{noon == 0}}"> | ||
46 | + <image class="xc-picturess" src="{{iurl+mapurl_f_img}}" mode="aspectFit"> | ||
47 | + <image id="{{index}}" class="xc-play" src="{{iurl}}/miniapp/images/pofang.png" bindtap="videoPlay"></image> | ||
48 | + </image> | ||
49 | + </view> | ||
50 | + <view wx:else> | ||
51 | + <video class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video> | ||
52 | + </view> | ||
53 | + </swiper-item> | ||
54 | + <swiper-item wx:for="{{gallery}}" wx:key="gallery"> | ||
55 | + <!-- <image class="wh100" src="{{item.image_url}}" mode="aspectFit" binderror="bind_bnerr" lazy-load="true" data-errorimg="gallery[{{index}}].image_url"></image> --> | ||
56 | + <view class="wh100 g_img_box" style="background-image:url({{item.image_url}});"></view> | ||
57 | + </swiper-item> | ||
58 | + </swiper> | ||
59 | + <block wx:if="{{mapurl}}"> | ||
60 | + <view wx:if="{{hiddenn==1}}"> | ||
61 | + <view class="xc-imageCount">{{current}}/{{gallery.length}}</view> | ||
62 | + </view> | ||
63 | + <view class="xc-video-picture abs"> | ||
64 | + <view class="xc-video" data-vipi="0" bindtap="videopicture"> | ||
65 | + <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> | ||
66 | + 视频 | ||
67 | + </view> | ||
68 | + </view> | ||
69 | + <view class="xc-picture {{videopicture==1 ? 'xc-sn':''}}" data-vipi="1" bindtap="videopicture"> | ||
70 | + <view>图片</view> | ||
71 | + </view> | ||
72 | + </view> | ||
73 | + </block> | ||
74 | + </view> | ||
75 | + </view> | ||
76 | + <view class="goo"> | ||
77 | + <view class="pt_view rel"> | ||
78 | + <!-- 许程 7. 24 --> | ||
79 | + <image wx:if="{{type == 0}}" class="secondkill-img" src="{{iurl?iurl+'miniapp/images/blue_ks.png':''}}" /> | ||
80 | + <image wx:else class="secondkill-img" src="{{iurl?iurl+'miniapp/images/red_jx.png':''}}" /> | ||
81 | + <!-- <view class=""> --> | ||
82 | + <!-- <view class="flex" style='height:40rpx; margin-top:5rpx;'> --> | ||
83 | + <view class="abs xc-qt-price fs28 xc-qtsign">预售价</view> | ||
84 | + <view class="abs flex presell_price"> | ||
85 | + <view class="fs28 val" style="margin-right:60rpx">¥{{presellList.presell_price}}</view> | ||
86 | + <view wx:if="{{is_retail_price}}" class="word-line fs26 xc-qtunit-price"> | ||
87 | + 零售价¥{{filters.toFix(data.market_price,2)}} | ||
88 | + </view> | ||
89 | + </view> | ||
90 | + | ||
91 | + | ||
92 | + <block> | ||
93 | + <!-- </view> --> | ||
94 | + <view class="hy-stop word-color fs26 abs cl_r {{type==0?'pre_cl':''}}">距活动{{type==0?'开始':'结束'}}还有</view> | ||
95 | + <view class="secview flex abs fs24 " style="color: black;right: 3px; top:46rpx;"> | ||
96 | + <block wx:if="djs.day"> | ||
97 | + <view class="day-val cl_r {{type==0?'pre_cl':''}}" style="margin-top:-34rpx;"> | ||
98 | + {{djs.day}} | ||
99 | + </view> | ||
100 | + <view class="day cl_r {{type==0?'pre_cl':''}}" style="margin-top:-34rpx;margin-right:10rpx;"> | ||
101 | + 天 | ||
102 | + </view> | ||
103 | + </block> | ||
104 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | ||
105 | + {{djs.hou}} | ||
106 | + </view> | ||
107 | + <view class="xc-time {{type==0?'pre_cl':''}}">时</view> | ||
108 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | ||
109 | + {{djs.min}} | ||
110 | + </view> | ||
111 | + <view class="xc-time {{type==0?'pre_cl':''}}">分</view> | ||
112 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | ||
113 | + {{djs.sec}} | ||
114 | + </view> | ||
115 | + <view class="xc-time {{type==0?'pre_cl':''}}">秒</view> | ||
116 | + </view> | ||
117 | + </block> | ||
118 | + </view> | ||
119 | + <view class="pt_fir pd20"> | ||
120 | + <!-- --显示团类型和团价格-- --> | ||
121 | + <view class="pt_fir_title "> | ||
122 | + <view class="xc-goods-explain flex-vertical-between"> | ||
123 | + <view class="xc-explain fs32 ellipsis-2"> | ||
124 | + {{data.goods_name}} | ||
125 | + </view> | ||
126 | + <!-- 这个是分享按钮 --> | ||
127 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> | ||
128 | + <view class="iconfont icon-share"></view> | ||
129 | + <view class="fs22 c-7b">分享</view> | ||
130 | + </view> | ||
131 | + </view> | ||
132 | + </view> | ||
133 | + <view wx:if="{{presellForm.presell_type==0}}" class="fs24" style="padding-bottom:20rpx"> | ||
134 | + <view class="stock" style="color:#999">尾款:{{filters.format_time(presellForm.pay_begindate,1)}}-{{filters.format_time(presellForm.pay_enddate,1)}}</view> | ||
135 | + </view> | ||
136 | + <view class="goods-num"> | ||
137 | + <block wx:if="{{presellList.virtual_qty && type !=0}}"> | ||
138 | + <view class="stock">总数量:{{presellList.presell_sumqty+presellList.virtual_qty}}件</view> | ||
139 | + <view class="stock" wx:if="{{presellList.vip_butyqty}}">限购:{{presellList.vip_butyqty}}件</view> | ||
140 | + <view class="stock" wx:else>限购:不限</view> | ||
141 | + <view class="sales">已购:{{presellList.buy_goodnum+presellList.virtual_qty}}件</view> | ||
142 | + </block> | ||
143 | + <block wx:else> | ||
144 | + <view class="stock">总数量:{{presellList.presell_sumqty}}件</view> | ||
145 | + <view class="stock" wx:if="{{presellList.vip_butyqty}}">限购:{{presellList.vip_butyqty}}件</view> | ||
146 | + <view class="stock" wx:else>限购:不限</view> | ||
147 | + <view class="sales">已购:{{presellList.buy_goodnum}}件</view> | ||
148 | + </block> | ||
149 | + </view> | ||
150 | + </view> | ||
151 | + <view class="t_gz" wx:if="{{is_show_gz==1}}">{{prom_act.remark}}</view> | ||
152 | + </view> | ||
153 | + <!-- 许程 7.24暂时注释 --> | ||
154 | + <view class="bdt16" wx:if="{{ prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1 && sele_g.is_xz_yh !=1}}"> | ||
155 | + <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> | ||
156 | + <view class="cx-sizs fs30">领券</view> | ||
157 | + <view class="flex ai_c f1 pdh20"> | ||
158 | + <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="id"> | ||
159 | + <view class="circle xc-circular xc-one"></view> | ||
160 | + <view class="xc-coupon t-c four-level-word"> | ||
161 | + 满{{item.condition}}减{{item.money}} | ||
162 | + </view> | ||
163 | + <view class="circle xc-circular xc-two"></view> | ||
164 | + </view> | ||
165 | + </view> | ||
166 | + <view data-coupon="1" bindtap="switchCoupon" class="cx-obtain-coupon wsize"> | ||
167 | + <text class="bg_jj"></text> | ||
168 | + </view> | ||
169 | + </view> | ||
170 | + </view> | ||
171 | + <!-- 门店收货地址 --> | ||
172 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | ||
173 | + <view class="address_frame" bindtap="choice_store" data-ind="0"> | ||
174 | + <view class="flex-vertical-between "> | ||
175 | + <view class="flex-vertical select_store_height"> | ||
176 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
177 | + <view class="fs30" style="color:black;">选择门店</view> | ||
178 | + </view> | ||
179 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | ||
180 | + </view> | ||
181 | + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
182 | + <view class="flex-space-between address ai_end pdv10"> | ||
183 | + <view> | ||
184 | + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | ||
185 | + </view> | ||
186 | + <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | ||
187 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
188 | + </view> | ||
189 | + </view> | ||
190 | + <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
191 | + <block wx:else> | ||
192 | + <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
193 | + (库存不足) | ||
194 | + </view> | ||
195 | + <block wx:else> | ||
196 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
197 | + (配送不匹配) | ||
198 | + </view> | ||
199 | + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}"> | ||
200 | + (该店不可售) | ||
201 | + </view> | ||
202 | + <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0}}"> | ||
203 | + (库存不足) | ||
204 | + </view> | ||
205 | + </block> | ||
206 | + </block> | ||
207 | + <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | ||
208 | + </view> | ||
209 | + </view> | ||
210 | + </view> | ||
211 | + <!-- - 宝贝评价 -- --> | ||
212 | + <view class="bdt16"> | ||
213 | + <view class="bb_view"> | ||
214 | + <view class="bold">宝贝评价({{categories3[0].num}})</view> | ||
215 | + <view class="red_bb fs26" bindtap="look_pj"> | ||
216 | + 查看全部 | ||
217 | + <text class="bg_jj"></text> | ||
218 | + </view> | ||
219 | + </view> | ||
220 | + <view class="xc_comment"> | ||
221 | + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate"> | ||
222 | + 有图({{categories3[1].num}}) | ||
223 | + </view> | ||
224 | + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate"> | ||
225 | + 好评({{categories3[2].num}}) | ||
226 | + </view> | ||
227 | + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate"> | ||
228 | + 中评({{categories3[3].num}}) | ||
229 | + </view> | ||
230 | + <view class="xc_comment-discuss" data-val="4" bindtap="clik_evaluate"> | ||
231 | + 差评({{categories3[4].num}}) | ||
232 | + </view> | ||
233 | + </view> | ||
234 | + <scroll-view scroll-x="true" class="pj_scroll"> | ||
235 | + <view class="flex"> | ||
236 | + <view class="xc_comment-detail" wx:for="{{fir_comments}}" wx:key="fir_comments"> | ||
237 | + <view class="xc_comment-left"> | ||
238 | + <view class="xc_comment-user"> | ||
239 | + <view class="xc_user-img"> | ||
240 | + <image class="xc_imgs" src='{{item.is_anonymous!=1?item.head_pic:iurl+"/miniapp/images/hui_hear_pic.png"}}' binderror="bind_bnerr2" data-errorimg="fir_comments[{{index}}].head_pic"></image> | ||
241 | + </view> | ||
242 | + <view class="xc_user"> | ||
243 | + <view class="xc_user-name five-level-word"> | ||
244 | + {{item.is_anonymous!=1?item.username:'匿名'}} | ||
245 | + </view> | ||
246 | + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="rank"></image> | ||
247 | + </view> | ||
248 | + </view> | ||
249 | + <view class="xc_comment-font pj_word_size ellipsis-1 pdt12"> | ||
250 | + <text class="ellipsis-1">{{item.content?item.content:'此用户没有填写评价。'}}</text> | ||
251 | + </view> | ||
252 | + <view class="xc_comment-val"> | ||
253 | + <view class="xc_comment-time">{{item.add_time}}</view> | ||
254 | + </view> | ||
255 | + </view> | ||
256 | + <view class="xc_goods-img-frame"> | ||
257 | + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> | ||
258 | + <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image> | ||
259 | + <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> | ||
260 | + </view> | ||
261 | + </view> | ||
262 | + </view> | ||
263 | + </scroll-view> | ||
264 | + </view> | ||
265 | + <!-- 图文详情 --> | ||
266 | + <view class="bdt16"> | ||
267 | + <view class="t_g_info"> | ||
268 | + <view class="red_shu"></view> | ||
269 | + <view class="fs30 bold">商品详情</view> | ||
270 | + </view> | ||
271 | + <view class="pd20"> | ||
272 | + <view class="table_s"> | ||
273 | + <view class="tb_item tb-l"> | ||
274 | + <view class="item_left"> | ||
275 | + <text>商品名称</text> | ||
276 | + </view> | ||
277 | + <view class="item_right"> | ||
278 | + <text>{{data.goods_name}}</text> | ||
279 | + </view> | ||
280 | + </view> | ||
281 | + <view class="tb_item tb-l"> | ||
282 | + <view class="item_left"> | ||
283 | + <text>商品编号</text> | ||
284 | + </view> | ||
285 | + <view class="item_right"> | ||
286 | + <text>{{data.goods_sn}}</text> | ||
287 | + </view> | ||
288 | + </view> | ||
289 | + <view class="tb_item tb-l"> | ||
290 | + <view class="item_left"> | ||
291 | + <text>商品条码</text> | ||
292 | + </view> | ||
293 | + <view class="item_right"> | ||
294 | + <text>{{data.sku}}</text> | ||
295 | + </view> | ||
296 | + </view> | ||
297 | + <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | ||
298 | + <view class="item_left"> | ||
299 | + <text>品类</text> | ||
300 | + </view> | ||
301 | + <view class="item_right"> | ||
302 | + <text>{{cat_name}}</text> | ||
303 | + </view> | ||
304 | + </view> | ||
305 | + <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}"> | ||
306 | + <view class="item_left"> | ||
307 | + <text>品牌</text> | ||
308 | + </view> | ||
309 | + <view class="item_right"> | ||
310 | + <text>{{brand_name}}</text> | ||
311 | + </view> | ||
312 | + </view> | ||
313 | + <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}"> | ||
314 | + <view class="item_left"> | ||
315 | + <text>国别</text> | ||
316 | + </view> | ||
317 | + <view class="item_right"> | ||
318 | + <text>{{nation_name}}</text> | ||
319 | + </view> | ||
320 | + </view> | ||
321 | + <view class="tb_item tb-l"> | ||
322 | + <view class="item_left"> | ||
323 | + <text>规格</text> | ||
324 | + </view> | ||
325 | + <view class="item_right"> | ||
326 | + <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text> | ||
327 | + </view> | ||
328 | + </view> | ||
329 | + <view class="tb_item tb-l"> | ||
330 | + <view class="item_left"> | ||
331 | + <text>上架时间</text> | ||
332 | + </view> | ||
333 | + <view class="item_right"> | ||
334 | + <text>{{data.on_time}}</text> | ||
335 | + </view> | ||
336 | + </view> | ||
337 | + </view> | ||
338 | + </view> | ||
339 | + <!-- 详情图片 --> | ||
340 | + <view class="wxParse"> | ||
341 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | ||
342 | + </view> | ||
343 | + <!-- 详情广告 --> | ||
344 | + <view class="wxParse"> | ||
345 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> | ||
346 | + </view> | ||
347 | + </view> | ||
348 | + <!-- 推荐商品 --> | ||
349 | + <view class="flex-center rel xc-linellae-frame"> | ||
350 | + <view class="xc-linellae"></view> | ||
351 | + <view class="abs flex-center xc-recommend-frame "> | ||
352 | + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"></image> | ||
353 | + <view class="xc-recommend-word">推荐</view> | ||
354 | + </view> | ||
355 | + </view> | ||
356 | + <goods_recommend id="goods_list"></goods_recommend> | ||
357 | + <!-- 技术支持 --> | ||
358 | + <view class="logo-container t-c"> | ||
359 | + <view class="flex ai_c fs24 jc-center pdv30 white"> | ||
360 | + <image src="{{iurl + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image> | ||
361 | + 提供技术支持 | ||
362 | + </view> | ||
363 | + </view> | ||
364 | + </view> | ||
365 | + <!-- ----------商品详情图片页面-------------- --> | ||
366 | + <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> | ||
367 | + <view class="table_s"> | ||
368 | + <view class="tb_item tb-l"> | ||
369 | + <view class="item_left"> | ||
370 | + <text>商品名称</text> | ||
371 | + </view> | ||
372 | + <view class="item_right"> | ||
373 | + <text>{{data.goods_name}}</text> | ||
374 | + </view> | ||
375 | + </view> | ||
376 | + <view class="tb_item tb-l"> | ||
377 | + <view class="item_left"> | ||
378 | + <text>商品编号</text> | ||
379 | + </view> | ||
380 | + <view class="item_right"> | ||
381 | + <text>{{data.goods_sn}}</text> | ||
382 | + </view> | ||
383 | + </view> | ||
384 | + <view class="tb_item tb-l"> | ||
385 | + <view class="item_left"> | ||
386 | + <text>商品条码</text> | ||
387 | + </view> | ||
388 | + <view class="item_right"> | ||
389 | + <text>{{data.sku}}</text> | ||
390 | + </view> | ||
391 | + </view> | ||
392 | + <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | ||
393 | + <view class="item_left"> | ||
394 | + <text>品类</text> | ||
395 | + </view> | ||
396 | + <view class="item_right"> | ||
397 | + <text>{{cat_name}}</text> | ||
398 | + </view> | ||
399 | + </view> | ||
400 | + <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}"> | ||
401 | + <view class="item_left"> | ||
402 | + <text>品牌</text> | ||
403 | + </view> | ||
404 | + <view class="item_right"> | ||
405 | + <text>{{brand_name}}</text> | ||
406 | + </view> | ||
407 | + </view> | ||
408 | + <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}"> | ||
409 | + <view class="item_left"> | ||
410 | + <text>国别</text> | ||
411 | + </view> | ||
412 | + <view class="item_right"> | ||
413 | + <text>{{nation_name}}</text> | ||
414 | + </view> | ||
415 | + </view> | ||
416 | + <view class="tb_item tb-l"> | ||
417 | + <view class="item_left"> | ||
418 | + <text>规格</text> | ||
419 | + </view> | ||
420 | + <view class="item_right"> | ||
421 | + <text>{{data.goods_spec==""?"规格1":data.goods_spec}}</text> | ||
422 | + </view> | ||
423 | + </view> | ||
424 | + <view class="tb_item tb-l"> | ||
425 | + <view class="item_left"> | ||
426 | + <text>上架时间</text> | ||
427 | + </view> | ||
428 | + <view class="item_right"> | ||
429 | + <text>{{data.on_time}}</text> | ||
430 | + </view> | ||
431 | + </view> | ||
432 | + </view> | ||
433 | + <view class="wxParse"> | ||
434 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | ||
435 | + </view> | ||
436 | + <!-- 详情广告 --> | ||
437 | + <view class="wxParse"> | ||
438 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> | ||
439 | + </view> | ||
440 | + </view> | ||
441 | + <!-- -------------评价页面------------ --> | ||
442 | + <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> | ||
443 | + <view class="topframe"> | ||
444 | + <view class="topframe-top"> | ||
445 | + <view class="topframe-top-content"> | ||
446 | + <view>宝贝评价</view> | ||
447 | + <view class="topframe-top-val">({{categories3[0].num}})</view> | ||
448 | + </view> | ||
449 | + <view class="topframe-praise" wx:if="{{categories3[0].num}}"> | ||
450 | + 好评{{ filters.toFix(categories3[2].num/categories3[0].num*100,2) }}% | ||
451 | + </view> | ||
452 | + <view wx:else>好评 0%</view> | ||
453 | + </view> | ||
454 | + <view class="buttem-list"> | ||
455 | + <view bindtap="tabClick3" id="{{item.id}}" wx:for="{{categories3}}" wx:key="categories3" class="item {{activeCategoryId3==item.id?'red':''}}"> | ||
456 | + {{item.name}}({{item.num}}) | ||
457 | + </view> | ||
458 | + </view> | ||
459 | + </view> | ||
460 | + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="cIdx"> | ||
461 | + <view style='border-bottom:4rpx solid #eee;'> | ||
462 | + <view class="middle"> | ||
463 | + <view class="middle-img-frame"> | ||
464 | + <image class="middle-img" src="{{item.is_anonymous!=1?item.head_pic:iurl+'/miniapp/images/hui_hear_pic.png'}}" binderror="bind_bnerr2" data-errorimg="comments[{{cIdx}}].head_pic"></image> | ||
465 | + <view class="middle-user-frame"> | ||
466 | + <view class="middle-user"> | ||
467 | + {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}} | ||
468 | + </view> | ||
469 | + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="index"></image> | ||
470 | + </view> | ||
471 | + </view> | ||
472 | + <view class="xc-pirces"> | ||
473 | + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}"> | ||
474 | + {{item.content?item.content:'此用户没有填写评价。'}} | ||
475 | + </view> | ||
476 | + </view> | ||
477 | + <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'> | ||
478 | + 全部显示 | ||
479 | + </view> | ||
480 | + <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'> | ||
481 | + 收起 | ||
482 | + </view> | ||
483 | + <view class="img-ul"> | ||
484 | + <block wx:if="{{item.source_type==0}}"> | ||
485 | + <view class="img-li" wx:for="{{item.img}}" wx:key="index"> | ||
486 | + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image> | ||
487 | + </view> | ||
488 | + </block> | ||
489 | + <block wx:if="{{item.source_type==1}}"> | ||
490 | + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="index" wx:for-item="aitem"> | ||
491 | + <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image> | ||
492 | + </view> | ||
493 | + </block> | ||
494 | + </view> | ||
495 | + <view class="z_parameter"> | ||
496 | + <view class="parameter-font">{{item.add_time}}</view> | ||
497 | + <view class="parameter-dian" bindtap="click_zan" data-com_id="{{item.comment_id}}" data-item_id="{{cIdx}}"> | ||
498 | + <image wx:if="{{item.userZanNum==1}}" class="parameter-img" src="{{iurl}}/miniapp/images/zan_red.png"></image> | ||
499 | + <image wx:else class="parameter-img" src="{{iurl}}/miniapp/images/dianzan.png"></image> | ||
500 | + <view class="parameter-val" style='color:{{item.userZanNum==1? "#d60022":"#999" }}'> | ||
501 | + {{item.zan_num}} | ||
502 | + </view> | ||
503 | + </view> | ||
504 | + </view> | ||
505 | + </view> | ||
506 | + <view class="reply rel" wx:if="{{item.replay_list}}"> | ||
507 | + <view class="line_bulge"></view> | ||
508 | + <view class="shop-reply">店家回复:</view> | ||
509 | + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="index"> | ||
510 | + {{r_item.content}} | ||
511 | + </view> | ||
512 | + </view> | ||
513 | + </view> | ||
514 | + </block> | ||
515 | + <block wx:if="{{(!comments || comments.length==0) && get_c }}"> | ||
516 | + <text class="no_pj_list">暂无评价</text> | ||
517 | + </block> | ||
518 | + <block wx:if="{{comments.length>10 && comments_no_more}}"> | ||
519 | + <text class="no_pj_list">已经加载到底部</text> | ||
520 | + </block> | ||
521 | + </view> | ||
522 | + </view> | ||
523 | +</view> | ||
524 | +<!-- -滚动到顶部-- --> | ||
525 | +<view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> | ||
526 | + <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> | ||
527 | +</view> | ||
528 | +<!-- -----------------底部按钮------------------ --> | ||
529 | +<view class="join-cart"> | ||
530 | + <!-- bindtap="contactService" --> | ||
531 | + <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
532 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
533 | + <view>客服</view> | ||
534 | + </button> | ||
535 | + | ||
536 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split" bindtap="con_weixin"> | ||
537 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
538 | + <view>客服</view> | ||
539 | + </view> | ||
540 | + | ||
541 | + <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | ||
542 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
543 | + <view>客服</view> | ||
544 | + </view> --> | ||
545 | + | ||
546 | + <view class="custom-service cart-ico new_split" bindtap="openCS"> | ||
547 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
548 | + <view>客服</view> | ||
549 | + </view> | ||
550 | + | ||
551 | + <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | ||
552 | + <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | ||
553 | + <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | ||
554 | + <view>收藏</view> | ||
555 | + </view> | ||
556 | + <view class="shopping-cart cart-ico new_split"> | ||
557 | + <navigator open-type="switchTab" url="/pages/cart/cart/cart"> | ||
558 | + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> | ||
559 | + <!-- <view class="cart-num ellipsis-1">{{cartGoodsNum}}</view> --> | ||
560 | + <view>购物车</view> | ||
561 | + </navigator> | ||
562 | + </view> | ||
563 | + | ||
564 | + <view wx:if="{{type == 0}}" class="buy-btn cart-btn cart-btn-lg lanse set_width" style="border-radius: 56rpx;">即将开始</view> | ||
565 | + <view wx:else class="fs24 f1 flex ai-center bg-FF4732 t-c white" style="border-radius:10rpx;justify-content: center"> | ||
566 | + <view style="padding: 0 6rpx"> | ||
567 | + <view class="">{{filters.format_time(presellForm.end_time,2)}} 预售结束</view> | ||
568 | + <!-- <view class="">08.30 23:59:59 开始发货</view> --> | ||
569 | + <view class="" wx:if="{{presellForm.delivery_type==1}}">{{filters.format_time(presellForm.delivery_date,2)}} 开始发货</view> | ||
570 | + <view class="" wx:else>付款{{presellForm.delivery_daynum}} 天内发货</view> | ||
571 | + </view> | ||
572 | + | ||
573 | + <view class="line" bindtap="openSpecModel" data-ind="2" style="margin-left: 10rpx; padding-left: 10rpx"> | ||
574 | + <block wx:if="{{presellForm.presell_type==0}}"> | ||
575 | + <view class="">支付定金</view> | ||
576 | + <view class="flex"> | ||
577 | + 定金 | ||
578 | + <text class="rmb">{{presellList.presell_money}}</text> | ||
579 | + </view> | ||
580 | + </block> | ||
581 | + <block wx:else> | ||
582 | + <view class="">支付金额</view> | ||
583 | + <view class="flex"> | ||
584 | + <text class="rmb" style="margin-left:10rpx;">{{presellList.presell_price}}</text> | ||
585 | + </view> | ||
586 | + </block> | ||
587 | + </view> | ||
588 | + </view> | ||
589 | +</view> | ||
590 | +<!-- 制作一个圆球导航 --> | ||
591 | +<nav_box></nav_box> | ||
592 | +</block> | ||
593 | + | ||
594 | + | ||
595 | + | ||
596 | +<!-- --弹起来,选择规格数量,普通商品购买和秒杀---- --> | ||
597 | +<view hidden="{{!openSpecModal}}"> | ||
598 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | ||
599 | + <view class="spec-model"> | ||
600 | + <view class="pding"> | ||
601 | + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
602 | + <view class="spec-goods"> | ||
603 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="sele_g.original_img"></image> | ||
604 | + <view class="spec-goods-info"> | ||
605 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | ||
606 | + <view class="flex ai_end xc-val-money"> | ||
607 | + | ||
608 | + <view class="spec-goods-price tag"> | ||
609 | + <text class="fs20">¥</text>{{pre_arr.presell_money}} | ||
610 | + </view> | ||
611 | + <!-- 显示线下价格 --> | ||
612 | + <view wx:if="{{sele_g.offline_price}}" class="quan_price flex ai-center jc-center"> | ||
613 | + 券后¥<text class="fs32">{{sele_g.offline_price}}</text> | ||
614 | + </view> | ||
615 | + </view> | ||
616 | + | ||
617 | + <view class="flex"> | ||
618 | + <view class="spec-goods-stock"> | ||
619 | + 已售:{{pre_arr.buy_goodnum+pre_arr.virtual_qty}} | ||
620 | + </view> | ||
621 | + <view class="spec-goods-stock">可售:{{pre_arr.presell_sumqty-pre_arr.buy_goodnum}}</view> | ||
622 | + </view> | ||
623 | + | ||
624 | + | ||
625 | + </view> | ||
626 | + <!-- 选择门店模块 --> | ||
627 | + <view class="flex-space-between address ai_end xc-width "> | ||
628 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
629 | + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> | ||
630 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | ||
631 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
632 | + </view> | ||
633 | + </view> | ||
634 | + <!-- 没有门店的时候 --> | ||
635 | + <view class="flex" bindtap="choice_store" wx:else> | ||
636 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
637 | + <view class="fs30" style="color:black;">选择门店</view> | ||
638 | + </view> | ||
639 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | ||
640 | + </view> | ||
641 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
642 | + <block wx:else> | ||
643 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
644 | + <block wx:else> | ||
645 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
646 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act}}">(该店不可售)</view> | ||
647 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0}}"> | ||
648 | + (库存不足) | ||
649 | + </view> | ||
650 | + </block> | ||
651 | + </block> | ||
652 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}"> | ||
653 | + 地址:{{def_pick_store.fulladdress}} | ||
654 | + </view> | ||
655 | + </view> | ||
656 | + <!-- 商品的属性项目 --> | ||
657 | + <view class="xc-goods-attribute"> | ||
658 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | ||
659 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
660 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | ||
661 | + {{item.gg}} | ||
662 | + </view> | ||
663 | + </view> | ||
664 | + </view> | ||
665 | + <view class="b_num"> | ||
666 | + <view>购买数量</view> | ||
667 | + <view class="count"> | ||
668 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}"> | ||
669 | + - | ||
670 | + </view> | ||
671 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
672 | + <view bindtap="addCartNum" class="add">+</view> | ||
673 | + </view> | ||
674 | + </view> | ||
675 | + <!-- 提示再买多少优惠 --> | ||
676 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && openSpecModal_ind==2}}"> | ||
677 | + 再买{{hui_condition.need}} | ||
678 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | ||
679 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | ||
680 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | ||
681 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | ||
682 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | ||
683 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | ||
684 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | ||
685 | + </view> | ||
686 | + </view> | ||
687 | + <view class="spec-cart-btns"> | ||
688 | + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | ||
689 | + 门店的不匹配 | ||
690 | + </view> | ||
691 | + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | ||
692 | + 该门店不可售 | ||
693 | + </view> | ||
694 | + | ||
695 | + <block wx:else> | ||
696 | + <!-- 根本就找不到门店 --> | ||
697 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
698 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">未找到门店</view> | ||
699 | + </block> | ||
700 | + <block wx:else> | ||
701 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
702 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">未找到门店</view> | ||
703 | + </block> | ||
704 | + <block wx:else> | ||
705 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
706 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">未找到门店</view> | ||
707 | + </block> | ||
708 | + <block wx:else> | ||
709 | + <block wx:if="{{!def_pick_store}}"> | ||
710 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | ||
711 | + 请先选择门店 | ||
712 | + </view> | ||
713 | + </block> | ||
714 | + <block wx:else> | ||
715 | + | ||
716 | + <!-- 线上销售 --> | ||
717 | + <block wx:if="{{sele_g.store_count<=0 || pre_arr.presell_sumqty<=pre_arr.buy_goodnum }}"> | ||
718 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
719 | + </block> | ||
720 | + <block wx:else> | ||
721 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" | ||
722 | + data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy" data-action="buy"> | ||
723 | + <text wx:if="{{presellForm.presell_type==0}}">支付定金(¥{{pre_arr.presell_money}})</text> | ||
724 | + <text wx:else>支付金额(¥{{pre_arr.presell_price}})</text> | ||
725 | + </view> | ||
726 | + </block> | ||
727 | + | ||
728 | + </block> | ||
729 | + </block> | ||
730 | + </block> | ||
731 | + </block> | ||
732 | + </block> | ||
733 | + </view> | ||
734 | + | ||
735 | + | ||
736 | + <view class="clear"></view> | ||
737 | + <!-- 选择门店的列表 --> | ||
738 | + <view hidden="{{ismend==0}}" class="sto_v"> | ||
739 | + <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend"> | ||
740 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image> | ||
741 | + 选择门店 | ||
742 | + </view> | ||
743 | + <!-- ---第一级显示---- --> | ||
744 | + <view class="itemlists" hidden="{{is_sec_mend==1}}"> | ||
745 | + <block wx:if="{{is_show_sto_cat}}"> | ||
746 | + <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}"> | ||
747 | + {{item.name}} | ||
748 | + </view> | ||
749 | + </block> | ||
750 | + <block wx:else> | ||
751 | + <view wx:for="{{only_pk}}" wx:key="only_pk" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | ||
752 | + {{item.pickup_name}} | ||
753 | + </view> | ||
754 | + </block> | ||
755 | + </view> | ||
756 | + <!-- ---第二级显示---- --> | ||
757 | + <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend"> | ||
758 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image> | ||
759 | + {{sec_sto.name}} | ||
760 | + </view> | ||
761 | + <view class="itemlists" hidden="{{is_sec_mend==0}}"> | ||
762 | + <view wx:for="{{sec_sto.s_arr}}" wx:key="index" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | ||
763 | + {{item.pickup_name}} | ||
764 | + </view> | ||
765 | + </view> | ||
766 | + </view> | ||
767 | + </view> | ||
768 | +</view> | ||
769 | + | ||
770 | +<!-- --弹起来优惠信息---- --> | ||
771 | +<view hidden="{{!openPromModal}}"> | ||
772 | + <view bindtap="closePromModal" class="cover-layer"></view> | ||
773 | + <view class="prom-model"> | ||
774 | + <icon bindtap="closePromModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | ||
775 | + <view class="prom-title">优惠信息</view> | ||
776 | + <view class="logistics-item" wx:for="{{select.activity.data}}" wx:key="index"> | ||
777 | + <view class="item-title"> | ||
778 | + <text class="prom-item">{{item.title}}</text> | ||
779 | + </view> | ||
780 | + <view class="item-mes ellipsis-1">{{item.content}}</view> | ||
781 | + </view> | ||
782 | + </view> | ||
783 | +</view> | ||
784 | + | ||
785 | +<!-- --弹起领券-- --> | ||
786 | +<view wx:if='{{coupon==1}}'> | ||
787 | + <view class="cover-layer flex-center" data-coupon='0' bindtap="switchCoupon"></view> | ||
788 | + <view class="cx-popup {{coupon== true ? 'up' : 'down'}} "> | ||
789 | + <view class="top-frame"> | ||
790 | + <!-- <view class="top two-level-word t-c"> --> | ||
791 | + <view class="top t-c">优惠券领取</view> | ||
792 | + </view> | ||
793 | + <!-- <view class="top-frame"> | ||
794 | + <view class="xc-valid-coupon four-level-word">可以领优惠券</view> | ||
795 | + </view> --> | ||
796 | + <view class="xc-frame"> | ||
797 | + <view class="top-frame"> | ||
798 | + <view class="xc-coupon-frame "> | ||
799 | + <!-- -单张的券- --> | ||
800 | + <view class="rel" wx:for="{{quan_list}}" wx:key="index"> | ||
801 | + <view class="coupon flex"> | ||
802 | + <view class="circle xc-circular-one"></view> | ||
803 | + <view class="xc-coupon-left "> | ||
804 | + <view class="flex ai_c xc-money-frame"> | ||
805 | + <text class="xc-money two-level-word xc-rmb">¥</text> | ||
806 | + <text class="one-level-word xc-money">{{item.money}}</text> | ||
807 | + </view> | ||
808 | + <view class="xc-money four-level-word xc-spacing">满{{item.condition}}元可用</view> | ||
809 | + </view> | ||
810 | + <view class="xc-coupon-right flex"> | ||
811 | + <view class="xc-detail-coupon"> | ||
812 | + <view class="four-level-word">订单金额满{{item.condition}}元可用</view> | ||
813 | + <view class="four-level-word xc-below"> | ||
814 | + {{filters.replace_time2(item.start)}} 至 {{filters.replace_time2(item.end)}} | ||
815 | + </view> | ||
816 | + </view> | ||
817 | + <view class="flex-vertical"> | ||
818 | + <view class="three-level-word xc-get background {{item.everyone_num>0 && item.lqnum>=item.everyone_num?'nouse':''}}" data-ind="{{index}}" data-cid="{{item.id}}" bindtap="get_quan"> | ||
819 | + {{ item.linging==1?'领取中':'领取'}} | ||
820 | + </view> | ||
821 | + </view> | ||
822 | + </view> | ||
823 | + <view class="circle xc-circular-two"></view> | ||
824 | + </view> | ||
825 | + </view> | ||
826 | + </view> | ||
827 | + </view> | ||
828 | + </view> | ||
829 | + <view class="cx-confirm pd20" data-coupon='0' bindtap="switchCoupon"> | ||
830 | + <view class="confirm t-c">关闭</view> | ||
831 | + </view> | ||
832 | + </view> | ||
833 | +</view> | ||
834 | +<!-- 选择门店的弹框,1.1版最新的 --> | ||
835 | +<block wx:if="{{store==1}}"> | ||
836 | + <view class="mongolia-layer" bindtap="close_popup"></view> | ||
837 | + <view class="popup-frame"> | ||
838 | + <block wx:if="{{sort_store==0}}"> | ||
839 | + <!-- 头部 标题 --> | ||
840 | + <view class="popup-top flex-space-between"> | ||
841 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | ||
842 | + <view> | ||
843 | + <view> | ||
844 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
845 | + </view> | ||
846 | + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}" > | ||
847 | + <text class="fs26 red-co" >{{choice_sort_store==0?'更多门店':'返回'}}</text> | ||
848 | + <view class="bg_rights"></view> | ||
849 | + </view> | ||
850 | + </view> | ||
851 | + </view> | ||
852 | + <view class="searchbar flex-vertical-between storeListpadd"> | ||
853 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | ||
854 | + <view class="search flex-center" bindtap="searchfn"> | ||
855 | + <view class="fs28">搜索</view> | ||
856 | + </view> | ||
857 | + </view> | ||
858 | + <!-- 门店列表,最外层的门店列表,一开始 --> | ||
859 | + <view class="store-list"> | ||
860 | + <!-- 如果还没有点击更多门店的时候 --> | ||
861 | + <block wx:if="{{choice_sort_store==0}}"> | ||
862 | + <!-- 需要for循环 --> | ||
863 | + <block wx:if="{{is_show_sto_cat==1}}"> | ||
864 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" wx:key="dpl" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
865 | + <view class="store flex-vertical"> | ||
866 | + <!-- 需要点击事件 --> | ||
867 | + <block wx:if="{{index==fir_pick_index}}"> | ||
868 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
869 | + </block> | ||
870 | + <block wx:else> | ||
871 | + <view class="circle xc-hooks"></view> | ||
872 | + </block> | ||
873 | + <view class="address-frame xc-ash"> | ||
874 | + <view class="flex-vertical-between butttem5"> | ||
875 | + <view class="flex xc-ash"> | ||
876 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | ||
877 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | ||
878 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | ||
879 | + </view> | ||
880 | + </view> | ||
881 | + <view> | ||
882 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | ||
883 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}} | ||
884 | + </view> | ||
885 | + </view> | ||
886 | + </view> | ||
887 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
888 | + </view> | ||
889 | + </view> | ||
890 | + </view> | ||
891 | + </block> | ||
892 | + <block wx:else> | ||
893 | + <view class="store_choose flex" wx:for="{{only_pk}}" wx:key="olpk" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
894 | + <view class="store flex-vertical"> | ||
895 | + <!-- 需要点击事件 --> | ||
896 | + <block wx:if="{{index==fir_pick_index}}"> | ||
897 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
898 | + </block> | ||
899 | + <block wx:else> | ||
900 | + <view class="circle xc-hooks"></view> | ||
901 | + </block> | ||
902 | + <view class="address-frame xc-ash"> | ||
903 | + <view class="flex-vertical-between "> | ||
904 | + <view class="flex xc-ash"> | ||
905 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | ||
906 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | ||
907 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | ||
908 | + </view> | ||
909 | + </view> | ||
910 | + <view> | ||
911 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | ||
912 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | ||
913 | + </view> | ||
914 | + </view> | ||
915 | + </view> | ||
916 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
917 | + </view> | ||
918 | + </view> | ||
919 | + </view> | ||
920 | + </block> | ||
921 | + </block> | ||
922 | + <block wx:else> | ||
923 | + <!-- 如果是点击选择门店分类后显示分类下的门店 --> | ||
924 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" wx:key="sec_arr" data-ind="{{index}}" bindtap="choose_for_store"> | ||
925 | + <view class="store flex-vertical"> | ||
926 | + <!-- 需要点击事件 --> | ||
927 | + <block wx:if="{{index==sec_pick_index}}"> | ||
928 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
929 | + </block> | ||
930 | + <block wx:else> | ||
931 | + <view class="circle xc-hooks"></view> | ||
932 | + </block> | ||
933 | + <view class="address-frame xc-ash"> | ||
934 | + <view class="flex-vertical-between "> | ||
935 | + <view class="flex xc-ash"> | ||
936 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}} | ||
937 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | ||
938 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | ||
939 | + </view> | ||
940 | + </view> | ||
941 | + <view> | ||
942 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | ||
943 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | ||
944 | + </view> | ||
945 | + </view> | ||
946 | + </view> | ||
947 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
948 | + </view> | ||
949 | + </view> | ||
950 | + </view> | ||
951 | + </block> | ||
952 | + </view> | ||
953 | + <!-- 门店列表底部 --> | ||
954 | + <view class="store-bottom-frame"> | ||
955 | + <view class="store-bottom flex-vertical-between"> | ||
956 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}"> | ||
957 | + 确定 | ||
958 | + </view> | ||
959 | + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}"> | ||
960 | + 设为默认 | ||
961 | + </view> | ||
962 | + </view> | ||
963 | + </view> | ||
964 | + </block> | ||
965 | + <block wx:else> | ||
966 | + <view class="popup-top flex-space-between"> | ||
967 | + <text class="fs32 nearby_store">门店分类选择</text> | ||
968 | + <view> | ||
969 | + <view> | ||
970 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
971 | + </view> | ||
972 | + <view class="felx choose_mores" bindtap="returns"> | ||
973 | + <text class="fs26 red-co">返回</text> | ||
974 | + </view> | ||
975 | + </view> | ||
976 | + </view> | ||
977 | + <view class="sort_store_list"> | ||
978 | + <view class="sort-store-frame" wx:for="{{all_sto}}" wx:key="all_sto" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | ||
979 | + <view class="sort-store flex-vertical-between"> | ||
980 | + <view class="fs30" di>{{item.name}}</view> | ||
981 | + <view class="black_rights-frame"> | ||
982 | + <view class="black_rights"></view> | ||
983 | + </view> | ||
984 | + </view> | ||
985 | + </view> | ||
986 | + </view> | ||
987 | + </block> | ||
988 | + </view> | ||
989 | +</block> | ||
990 | +<!-- ---------------分享弹窗--------------- --> | ||
991 | +<!-- 二维码显示页面 --> | ||
992 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas> | ||
993 | +<warn id="warn"></warn> | ||
994 | +<!-- 分享控件,底部弹出 --> | ||
995 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageFn" wx:if="{{share_hidden}}"></share> | ||
996 | +<view wx:if="{{showPoster}}"> | ||
997 | + <view class="mask" catchtap="closePoster"></view> | ||
998 | + <view class="poster-container"> | ||
999 | + <view class="poster-wrapper"> | ||
1000 | + <view class="poster" bindtap="previewPoster"> | ||
1001 | + <!-- <view class="poster" bindtap="previewImage"> --> | ||
1002 | + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | ||
1003 | + <view class="btn-close" catchtap="closePoster"> | ||
1004 | + <text class="iconfont icon-close"></text> | ||
1005 | + </view> | ||
1006 | + </view> | ||
1007 | + <view class="btn-container"> | ||
1008 | + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> --> | ||
1009 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | ||
1010 | + </view> | ||
1011 | + </view> | ||
1012 | + </view> | ||
1013 | +</view> | ||
1014 | + | ||
1015 | +<include src="../../../../components/com_servicer/com_servicer.wxml"/> | ||
1016 | + | ||
1017 | + |
packageC/pages/presell/cardInfo/goodsInfo.wxss
0 → 100644
1 | +@import "../../../../utils/wxParse/wxParse.wxss"; | ||
2 | +.container { margin-bottom: 100rpx; overflow: hidden;padding-top: 80rpx;} | ||
3 | +image { | ||
4 | + vertical-align: top; | ||
5 | +} | ||
6 | +.goods-detail{overflow: hidden} | ||
7 | + | ||
8 | +.type-navbar { | ||
9 | + display: flex; | ||
10 | + justify-content: center; | ||
11 | + width: 100%; | ||
12 | + position: fixed; | ||
13 | + top: 0; | ||
14 | + z-index: 999; | ||
15 | + /* height: 80rpx; */ | ||
16 | + /* margin-bottom: 20rpx; */ | ||
17 | + background-color: #fff; | ||
18 | + border-top: 2rpx solid #ebedf0; | ||
19 | + /* border-bottom: 1rpx #fafafa solid; */ | ||
20 | +} | ||
21 | +.type-box { | ||
22 | + width: 25%; | ||
23 | + box-sizing: border-box; | ||
24 | + font-size: 32rpx; | ||
25 | + line-height: 76rpx; | ||
26 | + padding: 0 20rpx; | ||
27 | + text-align: center; | ||
28 | + display: inline-block; | ||
29 | + overflow: hidden; | ||
30 | +} | ||
31 | +.type-navbar-item { | ||
32 | + /* border-bottom: 4rpx solid #fff; */ | ||
33 | + display: flex; | ||
34 | + justify-content: center; | ||
35 | + width: 100%; | ||
36 | + font-size: 26rpx; | ||
37 | +} | ||
38 | +.type-item-on { | ||
39 | + color: #F95D74; | ||
40 | + font-weight: bold; | ||
41 | + /* border-bottom: 4rpx solid #F95D74; */ | ||
42 | + position: relative; | ||
43 | + font-size: 30rpx; | ||
44 | +} | ||
45 | +.type-item-on:after { | ||
46 | + content: ''; | ||
47 | + position: absolute; | ||
48 | + width: 50%; | ||
49 | + height: 4rpx; | ||
50 | + background-color: #F95D74; | ||
51 | + left: 0; | ||
52 | + right: 0; | ||
53 | + bottom: 0; | ||
54 | + margin: 0 auto; | ||
55 | +} | ||
56 | +.swiper_box { | ||
57 | + width: 100%; | ||
58 | + height: 750rpx; | ||
59 | +} | ||
60 | +.goods-title { | ||
61 | + display: flex; | ||
62 | + justify-content: space-between; | ||
63 | + /* overflow: hidden; */ | ||
64 | + /* height: 108rpx; */ | ||
65 | +} | ||
66 | +.goods-name { | ||
67 | + /* width: 560rpx; */ | ||
68 | + /* line-height: 46rpx; */ | ||
69 | + font-size: 32rpx; | ||
70 | + font-weight: bold; | ||
71 | + color: #333; | ||
72 | + /* margin-top: 30rpx; | ||
73 | + margin-bottom:30rpx; */ | ||
74 | + flex: 1; | ||
75 | + text-align: justify; | ||
76 | + margin: 10rpx 0 20rpx; | ||
77 | +} | ||
78 | + | ||
79 | +.goods-collect { | ||
80 | + width: 112rpx; | ||
81 | + padding-top: 30rpx; | ||
82 | +} | ||
83 | + | ||
84 | +.collect-img { | ||
85 | + width: 50rpx; | ||
86 | + height: 44rpx; | ||
87 | + margin: 0 auto; | ||
88 | + overflow: hidden; | ||
89 | +} | ||
90 | + | ||
91 | +.collect-des { | ||
92 | + text-align: center; | ||
93 | + font-size: 24rpx; | ||
94 | + color: #333; | ||
95 | +} | ||
96 | + | ||
97 | +.goods-price { | ||
98 | + font-size: 60rpx; | ||
99 | + /* padding: 20rpx 34rpx; */ | ||
100 | + /* padding:0rpx 34rpx; */ | ||
101 | + /* line-height: 60rpx; */ | ||
102 | + color: #999; | ||
103 | + padding: 20rpx; | ||
104 | + /* margin-top: 46rpx; */ | ||
105 | + /* margin-top:26rpx; | ||
106 | + padding-bottom:20rpx; */ | ||
107 | +} | ||
108 | + | ||
109 | +.prom-info { | ||
110 | + margin: 10rpx 0; | ||
111 | + color: #f23030; | ||
112 | +} | ||
113 | + | ||
114 | +.prom-info>.prom-type { | ||
115 | + color: white; | ||
116 | + background-color: #f23030; | ||
117 | + margin-right: 14rpx; | ||
118 | + padding: 2rpx 8rpx; | ||
119 | + border-radius: 4rpx; | ||
120 | +} | ||
121 | +.market-price { | ||
122 | + /* display: flex; | ||
123 | + margin-left: -5rpx; */ | ||
124 | +} | ||
125 | + | ||
126 | +.market-price .yuan{ | ||
127 | + /* top:24rpx; */ | ||
128 | + font-size: 30rpx | ||
129 | +} | ||
130 | + | ||
131 | +.market-price>view>text { | ||
132 | + text-decoration: line-through; | ||
133 | +} | ||
134 | + | ||
135 | +.market-price>.yj{ | ||
136 | + color: #999999; font-size: 24rpx;/* margin-left: 16rpx;position: relative;top:30rpx; */ | ||
137 | + display: inline-block; | ||
138 | +} | ||
139 | + | ||
140 | +.goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;} | ||
141 | + | ||
142 | +.goods-num { | ||
143 | + color: #999; | ||
144 | + display: flex; | ||
145 | + font-size: 24rpx; | ||
146 | + justify-content: space-between; | ||
147 | +} | ||
148 | + | ||
149 | +.goods-detail .twen{ | ||
150 | + background: #fff;height: 60rpx; line-height: 60rpx; font-size: 30rpx;padding-left: 30rpx;display: flex; | ||
151 | +} | ||
152 | +.goods-detail .twen .img{ width: 32rpx; height: 32rpx; margin-left: 200rpx; background: #fff} | ||
153 | +.goods-detail .twen image.img{vertical-align:auto;} | ||
154 | + | ||
155 | + | ||
156 | +.logistics-item { | ||
157 | + display: flex; | ||
158 | + justify-content: space-between; | ||
159 | + align-items: center; | ||
160 | + height: 90rpx; | ||
161 | + /*border-bottom: 1px solid #f5f5f5;*/ | ||
162 | + font-size: 32rpx; | ||
163 | + color: #666; | ||
164 | +} | ||
165 | +.logistics-item .small{color: #999; font-size: 24rpx;} | ||
166 | + | ||
167 | +.item-title { width: 180rpx;} | ||
168 | +.item-mes { | ||
169 | + color: #333; width: 420rpx; | ||
170 | + height: 90rpx; line-height: 90rpx; | ||
171 | +} | ||
172 | +.item-img { width: 32rpx; height: 32rpx;} | ||
173 | +.prom-item { | ||
174 | + color: #f23030; | ||
175 | + border: 1px solid #f23030; | ||
176 | + border-radius: 18rpx; | ||
177 | + line-height: 40rpx; | ||
178 | + height: 40rpx; | ||
179 | + padding: 2rpx 8rpx; | ||
180 | +} | ||
181 | + | ||
182 | +.guarantee { | ||
183 | + justify-content: space-around; | ||
184 | +} | ||
185 | + | ||
186 | +.ico-item { | ||
187 | + width: 32rpx; | ||
188 | + height: 32rpx; | ||
189 | + margin-right: 10rpx; | ||
190 | +} | ||
191 | + | ||
192 | +.guarantee>view { | ||
193 | + display: flex; | ||
194 | + align-items: center; | ||
195 | + height: 32rpx; | ||
196 | + color: #666; | ||
197 | +} | ||
198 | + | ||
199 | +.user-comment { | ||
200 | + margin: 10rpx 0; | ||
201 | + font-size: 28rpx; | ||
202 | +} | ||
203 | + | ||
204 | +.good-comment,.comment-num { | ||
205 | + display: flex; | ||
206 | +} | ||
207 | + | ||
208 | +.recommend { | ||
209 | + background-color: #fff; | ||
210 | + border-bottom: 1px solid #ddd; | ||
211 | + padding-bottom: 20rpx; | ||
212 | +} | ||
213 | + | ||
214 | +.recommend-title { | ||
215 | + height: 70rpx; | ||
216 | + line-height: 70rpx; | ||
217 | + font-size: 28rpx; | ||
218 | + padding: 0 30rpx; | ||
219 | +} | ||
220 | + | ||
221 | +.recommend-ul { | ||
222 | + display: flex; | ||
223 | + justify-content: flex-start; | ||
224 | +} | ||
225 | + | ||
226 | +.recommend-ul .li { | ||
227 | + width: 25%; | ||
228 | + box-sizing: border-box; | ||
229 | + text-align: center; | ||
230 | + font-size: 28rpx; | ||
231 | + color: #333; | ||
232 | +} | ||
233 | + | ||
234 | +.li-img { | ||
235 | + width: 120rpx; | ||
236 | + height: 120rpx; | ||
237 | + margin: 0 auto; | ||
238 | +} | ||
239 | + | ||
240 | +.li-title { | ||
241 | + height: 58rpx; | ||
242 | + line-height: 30rpx; | ||
243 | + margin: 10rpx 0; | ||
244 | +} | ||
245 | + | ||
246 | +.comment-item { | ||
247 | + background-color: #fff; | ||
248 | + font-size: 28rpx; | ||
249 | +} | ||
250 | + | ||
251 | +.comment-title { | ||
252 | + display: flex; | ||
253 | + justify-content: space-between; | ||
254 | + align-items: center; | ||
255 | + height: 102rpx; | ||
256 | + margin: 0 30rpx; | ||
257 | + color: #333; | ||
258 | + border-bottom: 1px solid #eee; | ||
259 | +} | ||
260 | + | ||
261 | +.user-name { | ||
262 | + display: flex; | ||
263 | + align-items: center; | ||
264 | +} | ||
265 | + | ||
266 | +.user-pic { | ||
267 | + width: 54rpx; | ||
268 | + height: 54rpx; | ||
269 | + margin-right: 10rpx; | ||
270 | + border-radius: 50%; | ||
271 | + overflow: hidden; | ||
272 | +} | ||
273 | + | ||
274 | +.stars { | ||
275 | + float: left; | ||
276 | + display: flex; | ||
277 | + height: 42rpx; | ||
278 | + line-height: 42rpx; | ||
279 | + margin: 15rpx 0; | ||
280 | + width: 200rpx; | ||
281 | +} | ||
282 | + | ||
283 | +.star { | ||
284 | + width: 26rpx; | ||
285 | + height: 26rpx; | ||
286 | + margin-right: 5rpx; | ||
287 | +} | ||
288 | + | ||
289 | +.state-spec { | ||
290 | + margin: 15rpx 0; | ||
291 | + float: right; | ||
292 | + font-size: 24rpx; | ||
293 | + color: #666; | ||
294 | + width: 460rpx; | ||
295 | + text-align: right; | ||
296 | +} | ||
297 | + | ||
298 | +.comment-cont { | ||
299 | + padding: 0 30rpx 30rpx; | ||
300 | + border-bottom: 1px solid #eee; | ||
301 | +} | ||
302 | + | ||
303 | +.comment-mes { | ||
304 | + line-height: 42rpx; | ||
305 | +} | ||
306 | + | ||
307 | +.img-ul { | ||
308 | + display: flex; | ||
309 | + flex-wrap: wrap; | ||
310 | +} | ||
311 | + | ||
312 | +.img-li { | ||
313 | + width: 150rpx; | ||
314 | + height: 150rpx; | ||
315 | + margin-top: 8rpx; | ||
316 | + margin-right: 10rpx; | ||
317 | +} | ||
318 | + | ||
319 | +.comment-btn { | ||
320 | + height: 60rpx; | ||
321 | + padding: 20rpx 30rpx; | ||
322 | +} | ||
323 | + | ||
324 | +.comment-btn .btn { | ||
325 | + display: flex; | ||
326 | + justify-content: center; | ||
327 | + align-items: center; | ||
328 | + height: 60rpx; | ||
329 | + width: 45%; | ||
330 | + border: 1px solid #eee; | ||
331 | +} | ||
332 | + | ||
333 | +.comment-btn .btn-img { | ||
334 | + width: 30rpx; | ||
335 | + height: 28rpx; | ||
336 | + margin: 0 10rpx; | ||
337 | +} | ||
338 | + | ||
339 | +.reply-ul { | ||
340 | + margin-top: 20rpx; | ||
341 | +} | ||
342 | + | ||
343 | +.reply-li { | ||
344 | + color: #aaa; | ||
345 | +} | ||
346 | + | ||
347 | +.join-cart { | ||
348 | + position: fixed; | ||
349 | + left: 0; | ||
350 | + bottom: 0; | ||
351 | + display: flex; | ||
352 | + width: 100%; | ||
353 | + height: 100rpx; | ||
354 | + background-color: #fff; | ||
355 | + z-index: 9; | ||
356 | + border-top: 4rpx solid #eee; | ||
357 | + | ||
358 | +} | ||
359 | + | ||
360 | +.join-cart>view { | ||
361 | + width: 29%; | ||
362 | +} | ||
363 | + | ||
364 | +.join-cart>.new_split { | ||
365 | + width: 13%; | ||
366 | + text-align: center; | ||
367 | + padding: 0; | ||
368 | + margin: 0; | ||
369 | +} | ||
370 | + | ||
371 | +.cart-ico { | ||
372 | + font-size: 24rpx; | ||
373 | + color: #333; | ||
374 | +} | ||
375 | + | ||
376 | +.shopping-cart { | ||
377 | + position: relative; | ||
378 | +} | ||
379 | + | ||
380 | +.cs-img { | ||
381 | + width: 45rpx; | ||
382 | + height: 40rpx; | ||
383 | + margin-top: 15rpx; | ||
384 | +} | ||
385 | + | ||
386 | +.sc-img { | ||
387 | + width: 42rpx; | ||
388 | + height: 40rpx; | ||
389 | + margin-top: 15rpx; | ||
390 | +} | ||
391 | + | ||
392 | +.cart-num { | ||
393 | + position: absolute; | ||
394 | + left: 50%; | ||
395 | + top: 1rpx; | ||
396 | + width: 40rpx; | ||
397 | + height: 40rpx; | ||
398 | + line-height: 40rpx; | ||
399 | + text-align: center; | ||
400 | + border-radius: 50%; | ||
401 | + color: #fff; | ||
402 | + background-color: rgba(217,81,99,0.9); | ||
403 | +} | ||
404 | + | ||
405 | +.cart-btn { | ||
406 | + font-size: 28rpx; | ||
407 | + color: #fff; | ||
408 | + line-height: 70rpx; | ||
409 | + margin-top: 16rpx; | ||
410 | + text-align: center; | ||
411 | + | ||
412 | + | ||
413 | +} | ||
414 | + | ||
415 | +.join-btn { | ||
416 | + background-color: #ffb03f; | ||
417 | + height: 70rpx; | ||
418 | +border-radius: 55rpx 0rpx 0rpx 55rpx; | ||
419 | +margin-top: 16rpx; | ||
420 | + | ||
421 | + | ||
422 | +} | ||
423 | + | ||
424 | +view.cart-btn-lg { | ||
425 | + width: 50%; | ||
426 | +} | ||
427 | + | ||
428 | +.buy-btn { | ||
429 | + background-color: #f23030; | ||
430 | + height: 70rpx; | ||
431 | +border-radius: 0 56rpx 55rpx 0; | ||
432 | + | ||
433 | +} | ||
434 | + | ||
435 | +.buy-btn-all{ | ||
436 | + background-color: #f23030; | ||
437 | + height: 70rpx; | ||
438 | + border-radius: 56rpx; | ||
439 | +} | ||
440 | + | ||
441 | + | ||
442 | +.toTop { | ||
443 | + position: fixed; | ||
444 | + z-index: 3; | ||
445 | + right: 20rpx; | ||
446 | + bottom: 160rpx; | ||
447 | + width: 68rpx; | ||
448 | + height: 68rpx; | ||
449 | + border: 1px solid #ddd; | ||
450 | + border-radius: 50%; | ||
451 | + overflow: hidden; | ||
452 | + cursor: pointer; | ||
453 | +} | ||
454 | + | ||
455 | +.comment-more { | ||
456 | + height: 56rpx; | ||
457 | + line-height: 56rpx; | ||
458 | + font-size: 26rpx; | ||
459 | + color: #999; | ||
460 | + text-align: center; | ||
461 | + background-color: #eee; | ||
462 | +} | ||
463 | + | ||
464 | +.goods-more { | ||
465 | + background-color: #fff; | ||
466 | +} | ||
467 | + | ||
468 | +.goods-norms { | ||
469 | + background-color: #fff; | ||
470 | +} | ||
471 | + | ||
472 | +.type-navbar2 { | ||
473 | + display: flex; | ||
474 | + height: 72rpx; | ||
475 | + border-top: 1px solid #ddd; | ||
476 | + border-bottom: 1px solid #ddd; | ||
477 | +} | ||
478 | + | ||
479 | +.type-box2 { | ||
480 | + width: 50%; | ||
481 | + font-size: 26rpx; | ||
482 | + line-height: 72rpx; | ||
483 | + text-align: center; | ||
484 | + overflow: hidden; | ||
485 | +} | ||
486 | + | ||
487 | +.type-item2-on { | ||
488 | + color: #f23030; | ||
489 | +} | ||
490 | + | ||
491 | +.parameter { | ||
492 | + padding: 40rpx 0; | ||
493 | +} | ||
494 | + | ||
495 | +.table { | ||
496 | + width: 698rpx; | ||
497 | + margin: 0 auto; | ||
498 | + border: 1px solid #ddd; | ||
499 | + border-bottom: none; | ||
500 | +} | ||
501 | + | ||
502 | +.tb { | ||
503 | + width: 100%; | ||
504 | + min-height: 69rpx; | ||
505 | + line-height: 69rpx; | ||
506 | + border-bottom: 1px solid #ddd; | ||
507 | + font-size: 28rpx; | ||
508 | + text-align: center; | ||
509 | + color: #333; | ||
510 | +} | ||
511 | + | ||
512 | +.th-thitle { | ||
513 | + font-weight: bold; | ||
514 | + background-color: #f5fafe; | ||
515 | +} | ||
516 | + | ||
517 | +.td-cont { | ||
518 | + display: flex; | ||
519 | +} | ||
520 | + | ||
521 | +.td-title { | ||
522 | + width: 259rpx; | ||
523 | + background-color: #f5fafe; | ||
524 | + border-right: 1px solid #ddd; | ||
525 | +} | ||
526 | + | ||
527 | +.td-text { | ||
528 | + width: 439rpx; | ||
529 | +} | ||
530 | + | ||
531 | +.goods-comment { | ||
532 | + background-color: #fff; | ||
533 | +} | ||
534 | + | ||
535 | +.type-navbar3 { | ||
536 | + display: flex; | ||
537 | + height: 88rpx; | ||
538 | + border-top: 1px solid #ddd; | ||
539 | + border-bottom: 1px solid #ddd; | ||
540 | + padding: 10rpx 0; | ||
541 | +} | ||
542 | + | ||
543 | +.type-box3 { | ||
544 | + width: 20%; | ||
545 | + font-size: 30rpx; | ||
546 | + line-height: 44rpx; | ||
547 | + text-align: center; | ||
548 | + overflow: hidden; | ||
549 | +} | ||
550 | + | ||
551 | +.type-item3-on { | ||
552 | + color: #f23030; | ||
553 | +} | ||
554 | + | ||
555 | +.spec-model { | ||
556 | + position: fixed; | ||
557 | + bottom: 0; | ||
558 | + z-index: 20; | ||
559 | + background: white; | ||
560 | + width: 100%; | ||
561 | + /* padding: 0 30rpx; */ | ||
562 | + font-size: 32rpx; | ||
563 | + box-sizing: border-box; | ||
564 | + border-radius: 20rpx 20rpx 0 0; | ||
565 | + /* height: 72%; */ | ||
566 | +} | ||
567 | + | ||
568 | +.spec-model .pding{padding: 0 20rpx;} | ||
569 | + | ||
570 | +.spec-goods { | ||
571 | + padding: 30rpx 0 20rpx; | ||
572 | + /* float: left; */ | ||
573 | + width: 100%; | ||
574 | + /* border-bottom:2rpx solid #eee; */ | ||
575 | +} | ||
576 | + | ||
577 | +.spec-img { | ||
578 | + float: left; | ||
579 | + height: 186rpx; | ||
580 | + width: 186rpx; | ||
581 | + border: 4rpx solid #eee | ||
582 | +} | ||
583 | + | ||
584 | +.spec-goods-info { | ||
585 | + float: left; | ||
586 | + padding: 0 25rpx; | ||
587 | + width: 400rpx; | ||
588 | +} | ||
589 | + | ||
590 | +.spec-goods-name { | ||
591 | + font-size: 30rpx; | ||
592 | + line-height: 35rpx; | ||
593 | + height: 70rpx; | ||
594 | + margin: 15rpx 20rpx 25rpx 0; | ||
595 | + overflow: hidden; | ||
596 | + text-overflow: ellipsis;color: #333; | ||
597 | +} | ||
598 | + | ||
599 | +.spec-goods-price { | ||
600 | + color: #d60021; | ||
601 | + font-size: 33rpx; | ||
602 | + font-weight: bold; | ||
603 | + | ||
604 | +} | ||
605 | + | ||
606 | +.spec-goods-price.tag { | ||
607 | + position: relative; | ||
608 | +} | ||
609 | + | ||
610 | +.spec-goods-price.tag::before { | ||
611 | + content: '预售'; | ||
612 | + color: white; | ||
613 | + background-color: #FF4732; | ||
614 | + font-size: 24rpx; | ||
615 | + border-radius: 4rpx; | ||
616 | + padding: 0 6rpx; | ||
617 | +} | ||
618 | + | ||
619 | +.spec-goods-stock { | ||
620 | + margin-top: 3rpx; | ||
621 | + font-size: 24rpx; | ||
622 | + color: #999999; | ||
623 | + margin-right: 15rpx; | ||
624 | +} | ||
625 | + | ||
626 | +.spec-name { | ||
627 | + clear: both; | ||
628 | + padding: 20rpx 0; | ||
629 | + font-size: 30rpx;color: #333; | ||
630 | +} | ||
631 | + | ||
632 | +.quhuo{font-size: 30rpx; color: #000} | ||
633 | +.b_num{ | ||
634 | + display: flex;font-size: 30rpx; color: #333; | ||
635 | + justify-content: space-between; | ||
636 | + align-items: center; | ||
637 | + padding: 20rpx 0; | ||
638 | +} | ||
639 | + | ||
640 | +.count { | ||
641 | + /* position: fixed; */ | ||
642 | + display: flex; | ||
643 | + height: 50rpx; | ||
644 | + /* border: 1rpx solid #000; */ | ||
645 | + font-size: 28rpx; | ||
646 | + right: 30rpx; | ||
647 | +} | ||
648 | + | ||
649 | + | ||
650 | +.count>view,.count>input { | ||
651 | + width: 60rpx; | ||
652 | + height: 50rpx; | ||
653 | + line-height: 50rpx; | ||
654 | + text-align: center; | ||
655 | +} | ||
656 | +.spec_bt{ | ||
657 | + background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; display: inline-block; | ||
658 | + border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; margin: 10rpx; height: 40rpx; line-height: 40rpx; | ||
659 | +} | ||
660 | +.spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;} | ||
661 | +.sub, .add, .count>input { | ||
662 | + /* border-right: 1px solid #000; */ | ||
663 | + background-color: #f8f8f8; | ||
664 | + border-radius: 8rpx; | ||
665 | +} | ||
666 | +.sub.active { | ||
667 | + /* background-color: #ddd; */ | ||
668 | + color: #ccc; | ||
669 | +} | ||
670 | +.count>input { | ||
671 | + margin: 0 10rpx; | ||
672 | +} | ||
673 | + | ||
674 | +.add { | ||
675 | + /* background-color: #f8f8f8; */ | ||
676 | + /* border-left: 1px solid #000; */ | ||
677 | +} | ||
678 | + | ||
679 | +.spec-btn { | ||
680 | + color: black; | ||
681 | + background-color: white; | ||
682 | + padding: 10rpx 10rpx; | ||
683 | + font-size: 26rpx; | ||
684 | + line-height: 28rpx; | ||
685 | + float: left; | ||
686 | + border: 1rpx solid #dedede; | ||
687 | + margin: 4rpx 10rpx 4rpx 0; | ||
688 | + border-radius: 4rpx; | ||
689 | +} | ||
690 | + | ||
691 | +.spec-btn-click { | ||
692 | + color: white; | ||
693 | + background-color: #f23030; | ||
694 | + border: 1rpx solid #f23030; | ||
695 | +} | ||
696 | + | ||
697 | +.spec-cart-btns { | ||
698 | + /* width: 92%; */ | ||
699 | + line-height: 70rpx; | ||
700 | + /* margin: 0rpx auto; | ||
701 | + margin-top: 160rpx; */ | ||
702 | + /* border-radius: 20rpx; */ | ||
703 | +/* position: fixed; */ | ||
704 | +/* bottom: 50rpx; */ | ||
705 | +/* left: 4%; */ | ||
706 | + padding: 20rpx; | ||
707 | +} | ||
708 | + | ||
709 | +.spec-cart-btn { | ||
710 | + | ||
711 | + width:100%; | ||
712 | + font-size: 30rpx; | ||
713 | + text-align: center; | ||
714 | + color: white; | ||
715 | + border-radius: 40rpx; | ||
716 | +} | ||
717 | + | ||
718 | +.spec-cart-btn.w40 { | ||
719 | + width: 46%; | ||
720 | +} | ||
721 | + | ||
722 | +.spec-add-cart { | ||
723 | + background-color: #ffb03f; | ||
724 | +} | ||
725 | + | ||
726 | +.spec-buy { | ||
727 | + background-color: #f23030; | ||
728 | + /* margin-left: 34rpx; */ | ||
729 | +} | ||
730 | + | ||
731 | +.spec-cart-disable { | ||
732 | + background: #bbbbbb; | ||
733 | +} | ||
734 | + | ||
735 | +.spec-cart-btn-lg { | ||
736 | + width: 614rpx; | ||
737 | +} | ||
738 | + | ||
739 | +.prom-model { | ||
740 | + position: fixed; | ||
741 | + bottom: 0; | ||
742 | + z-index: 20; | ||
743 | + background: white; | ||
744 | + width: 100%; | ||
745 | + padding: 0 30rpx 30rpx; | ||
746 | + font-size: 32rpx; | ||
747 | + box-sizing: border-box; | ||
748 | + overflow-x: hidden; | ||
749 | +} | ||
750 | + | ||
751 | +.prom-model .prom-title {text-align: center;margin: 30rpx 0;} | ||
752 | +.prom-model .logistics-item {border: 0;} | ||
753 | +.prom-model .item-mes {width: 500rpx;} | ||
754 | +.integral-btn {width: 100%; padding: 0rpx;margin: 0rpx;} | ||
755 | +.clear{clear: both;} | ||
756 | +.sto_v .title,.sto_v .stitle{ border-top: 1rpx solid #dedede;border-bottom: 1rpx solid #dedede; height: 78rpx; line-height: 78rpx;} | ||
757 | +.sto_v .title .tubiao,.sto_v .stitle .tubiao{width: 32rpx; height: 32rpx; margin-top: 23rpx;} | ||
758 | +.itemlists .item{border-bottom: 1rpx solid #dedede; height: 72rpx; line-height: 72rpx;font-size: 28rpx; margin: 0 10rpx;} | ||
759 | + | ||
760 | +.cshu{margin-bottom: 30rpx; margin-top: 20rpx;} | ||
761 | +.cshu view{color: #999; font-size: 30rpx; margin-left: 26rpx;} | ||
762 | + | ||
763 | + | ||
764 | +/*---活动特殊显示---*/ | ||
765 | +.prom_show{height: 120rpx; display: flex;} | ||
766 | +.prom_show .secondkill-img{width: 100%; height: 100%;} | ||
767 | +.prom_show .spike-img{width: 283rpx; height: 57rpx; top:35rpx; | ||
768 | +left:31rpx;} | ||
769 | +.prom_show .stop{ color:#d81731;top: 17rpx;right:65rpx; font-weight:600;} | ||
770 | +.prom_show .start{ color:#009ae2;top: 17rpx;right:65rpx; font-weight:600;} | ||
771 | +.prom_show .timeac { font-size: 32rpx; height: 120rpx; color: #333; } | ||
772 | +.prom_show .timeac.left{width: 66%; color: #fff;background:#f23030;} | ||
773 | +.prom_show .timeac.right{width: 34%;background-color: #d7d7d7; text-align: center} | ||
774 | + | ||
775 | +.prom_show .secview .day{padding-right:10rpx;} | ||
776 | +.prom_show .secview .time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | ||
777 | +.prom_show .secview .time{margin-right:10rpx; margin-left:10rpx;} | ||
778 | + | ||
779 | + | ||
780 | +.prom_show .timeac.left view{ margin-left: 20rpx} | ||
781 | +.prom_show .timeac.left view.firview{margin-top: 10rpx} | ||
782 | +.prom_show .timeac.left view .tr_line{ text-decoration: line-through; font-size: 28rpx;} | ||
783 | +.prom_show .timeac.left view .bprice{ font-size: 50rpx; } | ||
784 | + | ||
785 | +.prom_show .timeac.right view.firview{margin-top:12rpx; margin-bottom: 10rpx} | ||
786 | +.prom_show .timeac.right view.secview{display: flex; text-align: center; justify-content:center; flex-direction: row;} | ||
787 | +.prom_show .timeac.right view .tui-conutdown-box{ | ||
788 | + /* background: #6b6b6b; */ | ||
789 | + width: auto; | ||
790 | + /* min-width: 45rpx; */ | ||
791 | + height: 45rpx; color: #c4182e; font-size: 27rpx; text-align: center; line-height: 46rpx;} | ||
792 | + | ||
793 | +.huise{ background:gray} | ||
794 | +.lanse{background:#0199e2} | ||
795 | + | ||
796 | + | ||
797 | +/*------拼单------*/ | ||
798 | +.pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx} | ||
799 | +.pt_view .secondkill-img{width: 100%;height: 100%;} | ||
800 | +.pt_fir{ background: #fff;/* margin-bottom: 10rpx; */} | ||
801 | +.pt_fir .pt_fir_title{display: flex; align-items: center; /* margin-left: 10rpx; margin-top: 20rpx; */ font-size: 28rpx; position: relative;} | ||
802 | +.pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx; | ||
803 | + height: 40rpx; font-size: 24rpx; text-align: center;} | ||
804 | +.pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;} | ||
805 | +.pt_fir .pt_fir_title .bigw{font-size: 36rpx;} | ||
806 | +.pt_fir .pt_fir_title .tprice{text-decoration: line-through;color: #949494} | ||
807 | +.pt_fir .pt_fir_title .tprice.ml50{margin-left: 50rpx} | ||
808 | + | ||
809 | +.pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;} | ||
810 | +.pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;} | ||
811 | +.pding{padding-top: 20rpx;padding-left: 20rpx;height: 81%; | ||
812 | + padding-right: 20rpx;font-size: 26rpx;color: #ea120f} | ||
813 | +.pdres{margin-left: 10rpx;color: #8f8f94} | ||
814 | +.ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden } | ||
815 | +.shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx} | ||
816 | +.ptgz_an{position: absolute;top:5rpx; right: 6rpx} | ||
817 | +.ptgz_an .arrow-two{width:18rpx;height:18rpx;border-color:#da0b31; margin-top:30rpx;} | ||
818 | + | ||
819 | +.pt_fir.se{height: auto; margin-bottom: 10rpx} | ||
820 | +.t_gz{padding: 10rpx 20rpx; font-size:28rpx } | ||
821 | + | ||
822 | +.pt_fir.se1{height: auto; margin: 0} | ||
823 | +.pt_fir.se2{height: auto; margin: 0;/* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */} | ||
824 | + | ||
825 | +.pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx; | ||
826 | + border-bottom: 1rpx solid #E5E5E5 } | ||
827 | +.ptgz_an.xq{font-size: 32rpx; color:#d40024} | ||
828 | +.wf{display: flex; padding: 20rpx 0;} | ||
829 | +.wf .item{width: 24.5%; text-align: center; font-size: 26rpx; color: #666} | ||
830 | +.wf .item .item_txy{position: relative;width: 60rpx; height: 60rpx; background: #ea120f; border-radius: 50%;left: 50%;margin-left: -30rpx; | ||
831 | + border: 3px #dfdfdf solid; text-align: center;line-height: 60rpx; color: #fff; margin-bottom: 10rpx;} | ||
832 | +.wf .item .item_txy.hs{ background: #cbcbcb;} | ||
833 | +.po{margin-bottom: 20rpx;} | ||
834 | + | ||
835 | +.cart-btn.line-h{ line-height: 26rpx;} | ||
836 | +.cart-btn .fir-v{ margin-top: 10rpx;} | ||
837 | + | ||
838 | +.hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;} | ||
839 | +.hyt .r_f{color: #e9120f;font-size: 26rpx;position: relative;top:3rpx} | ||
840 | +.hyt .byj{color: #e9120f;font-size: 32rpx;position: relative;top:5rpx} | ||
841 | + | ||
842 | +.pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx} | ||
843 | +.pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid} | ||
844 | + | ||
845 | +.jie_price{/* padding: 10rpx 30rpx; */} | ||
846 | +.jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx} | ||
847 | +.price_list{display: flex; width: 100%;} | ||
848 | +.price_item{width: 25%;font-size: 28rpx; color: #4c336c} | ||
849 | + | ||
850 | +.pt_fir.se2 .zzk-1{/* margin-top: 23rpx; */ font-size: 30rpx;position: relative; /* margin-bottom: 30rpx; */ border-left:4rpx solid red;/* margin-left:14rpx; */height:30rpx;line-height:30rpx;/* padding-left:5rpx; */} | ||
851 | +.ckgd{/* position: absolute;top:0;right:57rpx; */ color:#d70025; font-size: 26rpx;} | ||
852 | +.ckgd .arrow-one{width:14rpx;height:14rpx;border-color:#da0b31;/* margin-top:5rpx; */ margin:auto;} | ||
853 | +.bview{ | ||
854 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | ||
855 | + background-color: rgba(0, 0, 0, 0.5); | ||
856 | +} | ||
857 | +.juzhong{ | ||
858 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | ||
859 | + display: flex; | ||
860 | + flex-direction:row; | ||
861 | + justify-content: center; | ||
862 | + align-items: center; | ||
863 | +} | ||
864 | + | ||
865 | +.juzhong .xq{ padding: 0 20rpx; background: #fff; font-size: 30rpx; padding-bottom: 20rpx;} | ||
866 | +.juzhong .xq .title{text-align: center; margin: 20rpx 0; position: relative; height: 50rpx;} | ||
867 | +.juzhong .xq .hs1{font-size: 28rpx; color: #ab8f9e} | ||
868 | +.juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;} | ||
869 | + | ||
870 | +.pt_qd{/* margin-top: 40rpx; height: auto; */padding: 20rpx;} | ||
871 | +.spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; } | ||
872 | + | ||
873 | +.sto_v{color: #333;} | ||
874 | +.ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} | ||
875 | + | ||
876 | + | ||
877 | +/*---多少人参加团--*/ | ||
878 | +.group { | ||
879 | + padding-top:20rpx; | ||
880 | + padding-bottom:20rpx; | ||
881 | + width: 100%; | ||
882 | + /* min-height: 92rpx; */ | ||
883 | + border-bottom: 2rpx solid #ebedf0; | ||
884 | + | ||
885 | +} | ||
886 | + | ||
887 | +.group .group-list { | ||
888 | + display: flex; | ||
889 | + align-items: center; | ||
890 | + justify-content: space-around; | ||
891 | + /* height: 90rpx; */ | ||
892 | + /* padding: 0 130rpx 0 100rpx; */ | ||
893 | + /* width: 470rpx; | ||
894 | + | ||
895 | + position: absolute; */ | ||
896 | +} | ||
897 | + | ||
898 | +.group .group-list .gtou { | ||
899 | + width: 70rpx; | ||
900 | + height: 70rpx; | ||
901 | + /* float: left; | ||
902 | + position: relative; | ||
903 | + top: 6rpx; | ||
904 | + left: -96rpx; */ | ||
905 | +} | ||
906 | + | ||
907 | +.group .group-list .gtou image { | ||
908 | + display: block; | ||
909 | + width: 100%; | ||
910 | + height: 100%; | ||
911 | + border-radius: 50%; | ||
912 | + background-color: #f0f0f0; | ||
913 | +} | ||
914 | + | ||
915 | +.group .group-list .gdn { | ||
916 | + width: 140rpx; | ||
917 | + text-align: center; | ||
918 | + /* float: left; */ | ||
919 | + font-size: 26rpx; | ||
920 | + /* padding-left: 20rpx; */ | ||
921 | + /* line-height: 48rpx; | ||
922 | + height: 48rpx; | ||
923 | + width: 168rpx; | ||
924 | + position: relative; | ||
925 | + left: -80rpx; | ||
926 | + top:20rpx; */ | ||
927 | + font-weight:bold; | ||
928 | +} | ||
929 | + | ||
930 | +.group .group-list .ghaicha { | ||
931 | + /* width:300rpx; */ | ||
932 | + font-size: 27rpx; | ||
933 | + /* margin-left:180rpx; | ||
934 | + top:13rpx; | ||
935 | + left:-3rpx; */ | ||
936 | + font-weight: bold; | ||
937 | + | ||
938 | + | ||
939 | +} | ||
940 | + | ||
941 | +.group .group-list .ghaicha .gred { | ||
942 | + /* height: 48rpx; | ||
943 | + width: 300rpx; */ | ||
944 | +} | ||
945 | + | ||
946 | +.gsj { | ||
947 | + float: left; | ||
948 | + color: #8f8f94; | ||
949 | +} | ||
950 | + | ||
951 | +.group .group-list .cjt { | ||
952 | + height:42rpx; | ||
953 | + width: 137rpx; | ||
954 | + /* position: absolute; | ||
955 | + right: 4rpx; | ||
956 | + top:25rpx; */ | ||
957 | + line-height: 42rpx; | ||
958 | + font-size: 24rpx; | ||
959 | + color: #fff; | ||
960 | + border:2rpx solid #d60024; | ||
961 | + background-color:#d60024; | ||
962 | + border-radius:25rpx; | ||
963 | + | ||
964 | +} | ||
965 | + | ||
966 | +.gbody { | ||
967 | + background-color: white; | ||
968 | +} | ||
969 | +.t_show{/* overflow: hidden; */ display: flex; /* width: 300rpx; */ color: #292929; /* line-height: 36rpx; */font-size:26rpx; | ||
970 | +} | ||
971 | +.join-cart>view.set_width { | ||
972 | + width:58%; | ||
973 | +} | ||
974 | + | ||
975 | +/*秒杀样式zwp*/ | ||
976 | +#zwpMs{ | ||
977 | + width: 31%; | ||
978 | + color: #fff; | ||
979 | + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; | ||
980 | + background-size: 100% 60px; | ||
981 | +} | ||
982 | + | ||
983 | + | ||
984 | +/*--------- 修改后的样式 -----------*/ | ||
985 | +.elli{ | ||
986 | + overflow : hidden; | ||
987 | + text-overflow: ellipsis; | ||
988 | + display: -webkit-box; | ||
989 | + -webkit-line-clamp: 2; | ||
990 | + -webkit-box-orient: vertical; | ||
991 | +} | ||
992 | +.one_elli{ | ||
993 | + overflow : hidden; | ||
994 | + text-overflow: ellipsis; | ||
995 | + white-space:nowrap; | ||
996 | +} | ||
997 | + | ||
998 | +.tuwen_title{ /* height: 86rpx; */ background-color:#eeeeee; /* margin-bottom: 32rpx; */ position: relative; | ||
999 | + display: flex; justify-content: center;align-items: center; padding: 20rpx;} | ||
1000 | + | ||
1001 | +.tuwen_title .g_line{ | ||
1002 | + width:496rpx; | ||
1003 | + height:1rpx; | ||
1004 | + border-bottom:#ababab 1rpx solid; | ||
1005 | +} | ||
1006 | +.tuwen_title .center_s{ | ||
1007 | + width: 124rpx; position: absolute; height: 34rpx; background-color:#eeeeee; font-size: 32rpx; display: flex; | ||
1008 | + overflow: hidden; justify-content: center;align-items: center; | ||
1009 | +} | ||
1010 | +.tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx} | ||
1011 | +.t_g_info{ /* margin: 0 34rpx;margin-bottom: 20rpx; */ display: flex; align-items: center;padding: 20rpx; } | ||
1012 | +.red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; } | ||
1013 | + | ||
1014 | +.tb-l{ /* line-height: 96rpx; */} | ||
1015 | +.table_s{ border:#e4e4e4 1rpx solid; box-sizing: border-box;font-size: 26rpx;} | ||
1016 | +.tb_item{display: flex; /* height: 96rpx; */ border-bottom: 1rpx solid #e4e4e4 } | ||
1017 | +.item_left{width: 210rpx; height: 100%; box-sizing:border-box; text-align: center;padding: 20rpx; background: #f9f9f9 ;border-right:2rpx solid #e4e4e4} .item_left text{ /* margin-left: 44rpx; */} | ||
1018 | +.item_right{flex:1; height: 100%; overflow : hidden;white-space:nowrap;text-overflow: ellipsis; padding: 20rpx;} | ||
1019 | +.item_right text{ /* margin-left: 66rpx; */} | ||
1020 | + | ||
1021 | +.table_s .tb-l:last-child {border-bottom: none;} | ||
1022 | + | ||
1023 | +.bzfu_img{ width: 164rpx; height:34rpx; /* margin-right: 18rpx; margin-left: 12rpx */ } | ||
1024 | + .bz_view{ /* height:100rpx; padding: 0 34rpx 0 13rpx; */ color: #333; font-size: 28rpx; padding: 20rpx 20rpx 20rpx 10rpx; | ||
1025 | + /* border-bottom: 3rpx solid #eee; */ | ||
1026 | + /* border-top: 3rpx solid #eee; */} | ||
1027 | + .bz_view view{ width: 460rpx; /* max-height: 70rpx; */ /* overflow: hidden; */} | ||
1028 | + | ||
1029 | +.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 20rpx; color: #333; | ||
1030 | + font-size: 30rpx; /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ } | ||
1031 | +.red_bb{ color: #d70026; /* min-width:158rpx;width: auto; */} | ||
1032 | +.bg_jj{ width: 14rpx; height:14rpx; | ||
1033 | + border-top: 2rpx solid #d70026; | ||
1034 | + border-right: 2rpx solid #d70026; | ||
1035 | + transform: rotate(45deg);display:inline-block; | ||
1036 | + margin-bottom:3rpx; | ||
1037 | +} | ||
1038 | +.bg_jj.down1{transform: rotate(135deg);} | ||
1039 | + | ||
1040 | +.bz-content { | ||
1041 | + flex-grow: 1; | ||
1042 | + text-align: justify; | ||
1043 | + padding: 0 30rpx 0 20rpx; | ||
1044 | +} | ||
1045 | + | ||
1046 | +/* 顶部边框 */ | ||
1047 | +.topframe{ | ||
1048 | + width: 100%; | ||
1049 | + height: 172rpx; | ||
1050 | + flex-direction: row; | ||
1051 | + justify-content: space-between; | ||
1052 | + border-bottom: 6rpx solid #eeeeee; | ||
1053 | + overflow: hidden; | ||
1054 | +} | ||
1055 | +/* 评价人边框*/ | ||
1056 | +.topframe .topframe-top{ | ||
1057 | + display: flex; | ||
1058 | + margin-top: 40rpx; | ||
1059 | + margin-bottom: 36rpx; | ||
1060 | + color: #7d7d7d; | ||
1061 | + padding-left: 20rpx; | ||
1062 | + font-size: 32rpx; | ||
1063 | +} | ||
1064 | +/*评价人数量*/ | ||
1065 | +.topframe .topframe-top .topframe-top-val{ | ||
1066 | + margin-left: 15rpx; | ||
1067 | + | ||
1068 | +} | ||
1069 | +.topframe-top-content{ | ||
1070 | + display: flex; | ||
1071 | + width: 36%; | ||
1072 | +} | ||
1073 | +/* 好评 */ | ||
1074 | +.topframe-praise{ | ||
1075 | + width: 61%; | ||
1076 | + text-align: right; | ||
1077 | + color: #dc4355; | ||
1078 | + font-size: 28rpx; | ||
1079 | +} | ||
1080 | +/* 按钮列表 */ | ||
1081 | +.buttem-list{ | ||
1082 | + width: 100%; | ||
1083 | + display: flex; | ||
1084 | + font-size: 20rpx; | ||
1085 | + overflow: hidden; | ||
1086 | +} | ||
1087 | + | ||
1088 | +.buttem-list .item{ | ||
1089 | + min-width: 17%; | ||
1090 | + font-size: 24rpx; | ||
1091 | + border-radius: 20rpx; | ||
1092 | + background:#ffe3e2; | ||
1093 | + height:38rpx; | ||
1094 | + text-align: center; | ||
1095 | + line-height: 38rpx; | ||
1096 | + margin-left: 20rpx; | ||
1097 | +} | ||
1098 | + | ||
1099 | +.buttem-list .item.red{ | ||
1100 | + color: #fff; | ||
1101 | + background: #d60022; | ||
1102 | +} | ||
1103 | + | ||
1104 | +/* 用户评价 */ | ||
1105 | +.middle{ | ||
1106 | + width: 95%; | ||
1107 | + margin:0 auto; | ||
1108 | +} | ||
1109 | +.middle-img-frame{ | ||
1110 | + height:65rpx; | ||
1111 | + display: flex; | ||
1112 | + margin-top: 32rpx; | ||
1113 | + | ||
1114 | +} | ||
1115 | +/* 评价的用户图片 */ | ||
1116 | +.middle-img{ | ||
1117 | + width:60rpx; | ||
1118 | + height:60rpx; | ||
1119 | + border-radius: 50%; | ||
1120 | + -moz-border-radius: 50%; | ||
1121 | + -webkit-border-radius: 50%; | ||
1122 | + margin-right: 15rpx; | ||
1123 | +} | ||
1124 | +/* 评价的用户边框 */ | ||
1125 | +.middle-user-frame{ | ||
1126 | + height: 65rpx; | ||
1127 | + overflow: hidden; | ||
1128 | +} | ||
1129 | +.middle-user{ | ||
1130 | + height: 25; | ||
1131 | + font-size: 28rpx; | ||
1132 | +} | ||
1133 | +/* 评价图片 */ | ||
1134 | +.middle-img-two{ | ||
1135 | + width: 115rpx; | ||
1136 | + height: 25rpx; | ||
1137 | + text-align: center; | ||
1138 | + margin-bottom:20rpx; | ||
1139 | + margin-left:5rpx; | ||
1140 | +} | ||
1141 | +.xc-pirces{ | ||
1142 | + margin-top: 14rpx; | ||
1143 | +} | ||
1144 | +/* 评价文字 */ | ||
1145 | +.middle-font{ | ||
1146 | + font-size: 30rpx; | ||
1147 | + | ||
1148 | +} | ||
1149 | +.iddle-goods-img{ | ||
1150 | + width: 100%; | ||
1151 | + display: flex; | ||
1152 | + margin-top:22rpx; | ||
1153 | +} | ||
1154 | +/* 商品图片 */ | ||
1155 | +.goods-img{ | ||
1156 | + width: 156rpx; | ||
1157 | + height: 156rpx; | ||
1158 | + margin-left: 22rpx; | ||
1159 | + height: 100%; | ||
1160 | +} | ||
1161 | +.parameter-frame{ | ||
1162 | + margin-top:14rxp; | ||
1163 | + margin-bottom: 14rpx; | ||
1164 | + width:50%; | ||
1165 | + height: 30rpx; | ||
1166 | +} | ||
1167 | +.z_parameter{ | ||
1168 | + width:98%; | ||
1169 | + height: 45rpx; | ||
1170 | + display:flex; | ||
1171 | + line-height: 45rpx; | ||
1172 | + margin-top: 20rpx; | ||
1173 | + margin-bottom: 14rpx; | ||
1174 | + justify-content : space-between; | ||
1175 | +} | ||
1176 | +.parameter-font{ | ||
1177 | + font-size: 26rpx; | ||
1178 | + | ||
1179 | +} | ||
1180 | +/* 规格 */ | ||
1181 | +.parameter-state{ | ||
1182 | + width: 100rpx; | ||
1183 | + font-size: 24rpx; | ||
1184 | + color: #c4c4c4; | ||
1185 | +} | ||
1186 | +.parameter-dian{ | ||
1187 | + display: flex; | ||
1188 | + width: 94rpx; | ||
1189 | + height: 33rpx; | ||
1190 | + font-size: 20rpx; | ||
1191 | + border-radius: 20rpx; | ||
1192 | + line-height:33rpx; | ||
1193 | + padding-left: 25rpx; | ||
1194 | + border:4rpx solid #eeeeee; | ||
1195 | + | ||
1196 | +} | ||
1197 | +/* 点赞图片 */ | ||
1198 | +.parameter-img{ | ||
1199 | + width: 27rpx; | ||
1200 | + height: 27rpx; | ||
1201 | + margin-top: 3rpx; | ||
1202 | +} | ||
1203 | +.parameter-val{ | ||
1204 | + margin-left:25rpx; | ||
1205 | + font-size: 26rpx; | ||
1206 | + color: #999; | ||
1207 | +} | ||
1208 | +/* 回复 */ | ||
1209 | +.reply{ | ||
1210 | + width: 95%; | ||
1211 | + height: 120rpx; | ||
1212 | + padding-top: 14rpx; | ||
1213 | + border-top:3rpx solid #eeeeee; | ||
1214 | + margin:0 auto; | ||
1215 | + | ||
1216 | +} | ||
1217 | +.shop-reply{ | ||
1218 | + height: 30rpx; | ||
1219 | + color:#d60022; | ||
1220 | + font-size:24rpx; | ||
1221 | + overflow: hidden; | ||
1222 | +} | ||
1223 | +.shop-font{ | ||
1224 | + width: 94%; | ||
1225 | + font-size: 24rpx; | ||
1226 | + padding-top: 10rpx; | ||
1227 | + | ||
1228 | +} | ||
1229 | +.line_bulge{ | ||
1230 | + width: 17rpx; | ||
1231 | + height: 17rpx; | ||
1232 | + border-top: 1rpx solid #eeeeee; | ||
1233 | + border-left: 1rpx solid #eeeeee; | ||
1234 | + transform:rotate(45deg); | ||
1235 | + position: absolute; | ||
1236 | + top: -12rpx; | ||
1237 | + left:50rpx; | ||
1238 | + background:#fff; | ||
1239 | +} | ||
1240 | + | ||
1241 | + | ||
1242 | +.xc_comment{ | ||
1243 | + display: flex; | ||
1244 | + justify-content: space-around; | ||
1245 | + width: 100%; | ||
1246 | + box-sizing: border-box; | ||
1247 | + padding: 10rpx 20rpx; | ||
1248 | + /* height: 42rpx; | ||
1249 | + padding-left: 34rpx; */ | ||
1250 | + color: #333; | ||
1251 | + | ||
1252 | +} | ||
1253 | +.xc_comment-have-pictures{ | ||
1254 | + width: 153rpx; | ||
1255 | + /* height: 42rpx; */ | ||
1256 | + line-height: 42rpx; | ||
1257 | + text-align: center; | ||
1258 | + background: #ffe3e2; | ||
1259 | + color: 28rpx; | ||
1260 | + border-radius:21rpx; | ||
1261 | + font-size: 24rpx; | ||
1262 | +} | ||
1263 | +.xc_comment-discuss{ | ||
1264 | + width: 152rpx; | ||
1265 | + height: 42rpx; | ||
1266 | + line-height: 42rpx; | ||
1267 | + text-align: center; | ||
1268 | + background: #ffe3e2; | ||
1269 | + color: 28rpx; | ||
1270 | + border-radius:20rpx; | ||
1271 | + font-size: 24rpx; | ||
1272 | + margin-left: 28rpx | ||
1273 | +} | ||
1274 | + | ||
1275 | +.xc_comment-detail{ | ||
1276 | + display: flex; | ||
1277 | + /* margin-top: 40rpx; */ | ||
1278 | + /* width: 524rpx; */ | ||
1279 | + /* margin-left: 34rpx; */ | ||
1280 | + border-radius: 24rpx; | ||
1281 | + border: 2rpx solid #ebedf0; | ||
1282 | + margin-left: 20rpx; | ||
1283 | + box-sizing: border-box; | ||
1284 | + /* overflow: hidden; */ | ||
1285 | +} | ||
1286 | + | ||
1287 | +.xc_user-img{ | ||
1288 | + border-radius:50%; | ||
1289 | + margin: auto 0; | ||
1290 | +} | ||
1291 | + | ||
1292 | +.xc_comment-user{ | ||
1293 | + display: flex; | ||
1294 | + /* margin-top: 22rpx; | ||
1295 | + margin-left: 22rpx; */ | ||
1296 | +} | ||
1297 | +.xc_user{ | ||
1298 | + width: 170rpx; | ||
1299 | + height: 60rpx; | ||
1300 | + margin-left: 6rpx; | ||
1301 | + overflow: hidden; | ||
1302 | +} | ||
1303 | +.xc_user-name{ /* height: 25rpx; */} | ||
1304 | +.xc_comment-img{ | ||
1305 | + width: 22rpx; | ||
1306 | + height: 22rpx; | ||
1307 | + /* margin-top: 14rpx; */ | ||
1308 | + margin-right: 5rpx | ||
1309 | +} | ||
1310 | +.xc_comment-font{ | ||
1311 | + /* height: 75rpx; */ | ||
1312 | + /* margin-left: 22rpx; */ | ||
1313 | + white-space:normal; | ||
1314 | + overflow: hidden; | ||
1315 | + /* margin-top: 8rpx; | ||
1316 | + line-height: 38rpx; */ | ||
1317 | + | ||
1318 | +} | ||
1319 | +.xc_comment-val{ | ||
1320 | + /* width: 88%; | ||
1321 | + height: 30rpx; | ||
1322 | + margin-left: 22rpx; | ||
1323 | + display: flex; | ||
1324 | + margin-top: 15rpx; | ||
1325 | + margin-bottom:15rpx; */ | ||
1326 | +} | ||
1327 | + | ||
1328 | +.xc_comment-time{ | ||
1329 | + /* height: 30rpx; */ | ||
1330 | + font-size: 22rpx; | ||
1331 | + color: #a5a5a5; | ||
1332 | + overflow: hidden; | ||
1333 | +} | ||
1334 | + | ||
1335 | +.xc_goods-img{ | ||
1336 | + width: 180rpx;height: 180rpx; | ||
1337 | +} | ||
1338 | +.xc_comment-left{ | ||
1339 | + display:inline-block; | ||
1340 | + width: 312rpx; | ||
1341 | + padding: 20rpx; | ||
1342 | +} | ||
1343 | +.xc_goods-img-frame{ | ||
1344 | + border-radius: 0 22rpx 22rpx 0; | ||
1345 | + overflow: hidden; | ||
1346 | + /* display:inline-block; */ | ||
1347 | + /* width: 40%; | ||
1348 | + height: 90%; | ||
1349 | + text-align: center; | ||
1350 | + padding-top: 30rpx; | ||
1351 | + vertical-align: top; */ | ||
1352 | +} | ||
1353 | +.xc_imgs{ | ||
1354 | + width: 50rpx; | ||
1355 | + height:50rpx; | ||
1356 | + border-radius:50%; | ||
1357 | + margin-right: 5rpx; | ||
1358 | +} | ||
1359 | + | ||
1360 | +.pj_word_size{ font-size: 28rpx} | ||
1361 | +.pj_scroll{ | ||
1362 | + /* white-space: nowrap; */ | ||
1363 | + /* height: 324rpx; */ | ||
1364 | + /* margin-bottom: 50rpx; */ | ||
1365 | + display: flex; | ||
1366 | + align-items: center; | ||
1367 | + padding: 20rpx 0; | ||
1368 | + /* box-sizing: border-box; */ | ||
1369 | + /* box-shadow: 0 8px 12px #e7e9eb; */ | ||
1370 | +} | ||
1371 | + | ||
1372 | + | ||
1373 | +/*领券*/ | ||
1374 | +.three-level-word{ | ||
1375 | + font-size: 25rpx; | ||
1376 | +} | ||
1377 | +.four-level-word{ | ||
1378 | + font-size: 23rpx; | ||
1379 | +} | ||
1380 | +.cx-frame{ | ||
1381 | + /* border-top:3rpx solid #eee; */ | ||
1382 | + /* width:99%; | ||
1383 | + height: 95rpx; | ||
1384 | + line-height: 95rpx; | ||
1385 | + padding-left:24rpx; */ | ||
1386 | + padding: 20rpx; | ||
1387 | +} | ||
1388 | +.cx-frame .cx-sizs{ | ||
1389 | + /* width: 68rpx; */ | ||
1390 | + /* height: 100%; */ | ||
1391 | + /* line-height: 100rpx; */ | ||
1392 | + /* overflow: hidden; */ | ||
1393 | + /* margin-left: 10rpx; */ | ||
1394 | +} | ||
1395 | +.xc-coupon-fram{ | ||
1396 | + position: relative; | ||
1397 | + margin-right: 16rpx; | ||
1398 | + /* width:200rpx; */ | ||
1399 | + /* padding-top:30rpx; */ | ||
1400 | + | ||
1401 | +} | ||
1402 | +.xc-coupon-fram .xc-coupon{ | ||
1403 | + /* width:175rpx ; | ||
1404 | + height: 40rpx; | ||
1405 | + line-height: 40rpx; */ | ||
1406 | + background-color:#d60021 ; | ||
1407 | + /* margin:0 auto; */ | ||
1408 | + color:#fff; | ||
1409 | + padding: 6rpx 20rpx; | ||
1410 | + | ||
1411 | +} | ||
1412 | +.xc-coupon-fram .xc-circular{ | ||
1413 | + width: 16rpx; | ||
1414 | + height:16rpx; | ||
1415 | + background-color: white; | ||
1416 | + position:absolute; | ||
1417 | + top: 50%; | ||
1418 | + /* left: -10rpx; */ | ||
1419 | + transform: translateY(-50%); | ||
1420 | +} | ||
1421 | +.xc-coupon-fram .xc-one{ | ||
1422 | + left: -8rpx; | ||
1423 | +} | ||
1424 | +.xc-coupon-fram .xc-two{ | ||
1425 | + right: -8rpx; | ||
1426 | +} | ||
1427 | + | ||
1428 | +.cx-obtain-coupon{ | ||
1429 | + /* width: 65rpx; | ||
1430 | + height: 100%; | ||
1431 | + padding-left:15rpx; */ | ||
1432 | + color: #d70025; | ||
1433 | + display: flex; | ||
1434 | + align-items: center; | ||
1435 | + /* position: absolute; | ||
1436 | + right: 5rpx; */ | ||
1437 | +} | ||
1438 | + | ||
1439 | +/* 自定义弹出窗口 */ | ||
1440 | +.cx-popup{ | ||
1441 | + width:100%; | ||
1442 | + background: #fff; | ||
1443 | + z-index: 35; | ||
1444 | + border-top-left-radius: 25rpx; | ||
1445 | + border-top-right-radius: 25rpx; | ||
1446 | + position:fixed; | ||
1447 | + bottom:0; | ||
1448 | +} | ||
1449 | + | ||
1450 | +.cx-popup .top{ | ||
1451 | + /* width: 90%; | ||
1452 | + height:85rpx; */ | ||
1453 | + font-size: 32rpx; | ||
1454 | + padding: 20rpx 0; | ||
1455 | + border-bottom: 2rpx solid #ebedf0; | ||
1456 | + /* padding-top: 50rpx; | ||
1457 | + font-weight:600; */ | ||
1458 | + | ||
1459 | +} | ||
1460 | +.cx-popup .top-frame{ | ||
1461 | + /* width: 100%; | ||
1462 | + display: flex; | ||
1463 | + justify-content: center; | ||
1464 | + overflow: hidden; */ | ||
1465 | +} | ||
1466 | +.xc-valid-coupon{ | ||
1467 | + width: 90%; | ||
1468 | + height:40rpx; | ||
1469 | + padding-top: 24rpx; | ||
1470 | + overflow: hidden; | ||
1471 | +} | ||
1472 | +.xc-frame{ | ||
1473 | + position: relative; | ||
1474 | +} | ||
1475 | +.xc-coupon-frame { | ||
1476 | + width: 100%; | ||
1477 | + max-height: 560rpx; | ||
1478 | + overflow: auto; | ||
1479 | + | ||
1480 | +} | ||
1481 | +.xc-coupon-frame .rel:not(:first-child) { | ||
1482 | + margin-top: 20rpx; | ||
1483 | +} | ||
1484 | +.xc-coupon-frame .coupon { | ||
1485 | + width:100%; | ||
1486 | + height: 168rpx; | ||
1487 | + border-radius: 25rpx; | ||
1488 | + border:2rpx solid #ffdcdc; | ||
1489 | + overflow: hidden; | ||
1490 | + /* margin-top:16rpx; */ | ||
1491 | + box-sizing: border-box; | ||
1492 | + | ||
1493 | +} | ||
1494 | +/* .xc-coupon-frame .coupon ~ .coupon { | ||
1495 | + margin-top:16rpx; | ||
1496 | +} */ | ||
1497 | +.xc-coupon-left{ | ||
1498 | + width: 216rpx; | ||
1499 | + /* height: 100%; */ | ||
1500 | + background-color: #ffeeef; | ||
1501 | + border-right: 4rpx dashed #ffdbd9; | ||
1502 | + overflow: hidden; | ||
1503 | + /* line-height: 100%; */ | ||
1504 | + display: flex; | ||
1505 | + flex-direction: column; | ||
1506 | + justify-content: center; | ||
1507 | + align-items: center; | ||
1508 | + flex-shrink: 0; | ||
1509 | +} | ||
1510 | +.xc-money{ | ||
1511 | + color: #f30026; | ||
1512 | + text-align:center; | ||
1513 | +} | ||
1514 | +.xc-rmb{ | ||
1515 | + /* width:44rpx; | ||
1516 | + padding-top:7rpx; */ | ||
1517 | +} | ||
1518 | +.xc-money-frame{ | ||
1519 | + /* margin-left:35rpx; | ||
1520 | + margin-top:48rpx; */ | ||
1521 | + | ||
1522 | +} | ||
1523 | +.xc-spacing{ | ||
1524 | + letter-spacing:4rpx; | ||
1525 | +} | ||
1526 | +.xc-circular-one{ | ||
1527 | + position: absolute; | ||
1528 | + top:-15rpx; | ||
1529 | + left:205rpx; | ||
1530 | + width: 30rpx; | ||
1531 | + height: 30rpx; | ||
1532 | + background: #fff; | ||
1533 | + overflow: hidden; | ||
1534 | +} | ||
1535 | +.xc-circular-two{ | ||
1536 | + position: absolute; | ||
1537 | + bottom: -15rpx; | ||
1538 | + /* top:150rpx; */ | ||
1539 | + left:205rpx; | ||
1540 | + width: 30rpx; | ||
1541 | + height:30rpx; | ||
1542 | + background: #fff; | ||
1543 | +} | ||
1544 | +.xc-detail-coupon{ | ||
1545 | + /* margin-left: 22rpx; | ||
1546 | + overflow: hidden; | ||
1547 | + padding-top: 43rpx; */ | ||
1548 | + /* display: flex; | ||
1549 | + align-items: center; */ | ||
1550 | +} | ||
1551 | +.xc-coupon-right{ | ||
1552 | + /* width: 455rpx; | ||
1553 | + height: 100%; */ | ||
1554 | + background: #fffaf9; | ||
1555 | + padding: 20rpx; | ||
1556 | + box-sizing: border-box; | ||
1557 | + width: 100%; | ||
1558 | + justify-content: space-between; | ||
1559 | + align-items: center; | ||
1560 | +} | ||
1561 | +.xc-below{ | ||
1562 | + margin-top:20rpx; | ||
1563 | + | ||
1564 | +} | ||
1565 | +.xc-get{ | ||
1566 | + | ||
1567 | + width: 140rpx; | ||
1568 | + /* height: 48rpx; */ | ||
1569 | + color: #fff; | ||
1570 | + text-align: center; | ||
1571 | + border-radius:27rpx; | ||
1572 | + line-height:54rpx; | ||
1573 | + /* margin-left:20rpx; */ | ||
1574 | +} | ||
1575 | + | ||
1576 | +.background{ | ||
1577 | + background:#f40028; | ||
1578 | +} | ||
1579 | +/*--不可使用--*/ | ||
1580 | +.background.nouse{ | ||
1581 | + background:gainsboro; | ||
1582 | +} | ||
1583 | + | ||
1584 | +.xc-background{ | ||
1585 | + background:#b9b9b9; | ||
1586 | +} | ||
1587 | + | ||
1588 | + | ||
1589 | +.cx-confirm{ | ||
1590 | + width: 100%; | ||
1591 | + padding: 20rpx; | ||
1592 | + box-sizing: border-box; | ||
1593 | + /* height: 160rpx; */ | ||
1594 | + | ||
1595 | +} | ||
1596 | +.cx-confirm .confirm{ | ||
1597 | + /* width: 372rpx; | ||
1598 | + height: 60rpx; */ | ||
1599 | + background-color: #f40026; | ||
1600 | + color: #fff; | ||
1601 | + border-radius:10rpx; | ||
1602 | + line-height: 80rpx; | ||
1603 | + font-size: 28rpx; | ||
1604 | + | ||
1605 | +} | ||
1606 | + | ||
1607 | +.up{ animation: up .7s; } | ||
1608 | +.down{ animation: down 1s; } | ||
1609 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | ||
1610 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | ||
1611 | + | ||
1612 | + | ||
1613 | +/* 分享 */ | ||
1614 | +.icon-share { | ||
1615 | + font-size: 46rpx; | ||
1616 | + color: #d60021; | ||
1617 | +} | ||
1618 | +.xc-share-frame{ | ||
1619 | + /* width: 129rpx; | ||
1620 | + height: 48rpx; | ||
1621 | + border-top-left-radius: 18rpx; | ||
1622 | + border-bottom-left-radius: 18rpx; */ | ||
1623 | + /* background: #d60021; */ | ||
1624 | + /* position:absolute; | ||
1625 | + left:622rpx; | ||
1626 | + top:-37rpx; | ||
1627 | + line-height:50rpx; | ||
1628 | + margin-top:52rpx; */ | ||
1629 | +} | ||
1630 | +.xc-share-frame-jieti{ | ||
1631 | + width: 129rpx; | ||
1632 | + height: 48rpx; | ||
1633 | + border-top-left-radius: 18rpx; | ||
1634 | + border-bottom-left-radius: 18rpx; | ||
1635 | + background: #d60021; | ||
1636 | + line-height:50rpx; | ||
1637 | +} | ||
1638 | + | ||
1639 | +.xc-share-frame .share-font,.xc-share-frame-jieti .share-font{ | ||
1640 | + font-size: 32rpx; | ||
1641 | + color:#fff; | ||
1642 | + margin-left:10rpx; | ||
1643 | + | ||
1644 | +} | ||
1645 | + | ||
1646 | + | ||
1647 | +.xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{ | ||
1648 | + width: 30rpx; | ||
1649 | + height: 30rpx; | ||
1650 | + margin-top:9rpx; | ||
1651 | + margin-left: 10rpx; | ||
1652 | + | ||
1653 | +} | ||
1654 | +.xc-share { | ||
1655 | + width:90%; | ||
1656 | + height:800rpx; | ||
1657 | + background:#fff; | ||
1658 | + z-index:35; | ||
1659 | +} | ||
1660 | +.img-frame{ | ||
1661 | + position: absolute; | ||
1662 | + top: 175rpx; | ||
1663 | + left:100rpx; | ||
1664 | + z-index: 55; | ||
1665 | + overflow:hidden; | ||
1666 | + | ||
1667 | +} | ||
1668 | +.img-frame .img{ | ||
1669 | + width: 100rpx; | ||
1670 | + height: 100rpx; | ||
1671 | + | ||
1672 | +} | ||
1673 | +.xc-share .top{ | ||
1674 | + height: 85rpx; | ||
1675 | + width: 100%; | ||
1676 | + border-bottom: 4rpx dashed #f5f5f5; | ||
1677 | + overflow:hidden; | ||
1678 | + | ||
1679 | +} | ||
1680 | +.xc-share .name{ | ||
1681 | + font-size: 25rpx; | ||
1682 | + margin-left:180rpx; | ||
1683 | + color:#000; | ||
1684 | + | ||
1685 | +} | ||
1686 | + | ||
1687 | +.xc-share .recommend{ | ||
1688 | + width: 110rpx; | ||
1689 | + height: 12rpx; | ||
1690 | + color: #fff; | ||
1691 | + background: #d60021; | ||
1692 | + font-size: 20rpx; | ||
1693 | + border-radius:25rpx; | ||
1694 | + margin-left:10rpx; | ||
1695 | + line-height:37rpx; | ||
1696 | +} | ||
1697 | +.xc-left-circle{ | ||
1698 | + width: 40rpx; | ||
1699 | + height: 25rpx; | ||
1700 | + position: absolute; | ||
1701 | + top:280rpx; | ||
1702 | + left:29rpx; | ||
1703 | + z-index: 55; | ||
1704 | + background:#727272; | ||
1705 | + border-radius:50rpx 50rpx 0 0; | ||
1706 | + transform:rotate(90deg); | ||
1707 | + | ||
1708 | +} | ||
1709 | +.xc-right-circle{ | ||
1710 | + width: 40rpx; | ||
1711 | + height: 25rpx; | ||
1712 | + position: absolute; | ||
1713 | + top: 280rpx; | ||
1714 | + left:683rpx; | ||
1715 | + z-index: 55; | ||
1716 | + background:#727272; | ||
1717 | + border-radius:50rpx 50rpx 0 0; | ||
1718 | + transform:rotate(270deg); | ||
1719 | + | ||
1720 | +} | ||
1721 | +.xc-circle-frame{ | ||
1722 | + width: 25rpx; | ||
1723 | + height: 40rpx; | ||
1724 | + overflow: hidden; | ||
1725 | +} | ||
1726 | +.xc-goods-name{ | ||
1727 | + width: 95%; | ||
1728 | + font-size: 35rpx; | ||
1729 | + padding-left: 75rpx; | ||
1730 | + height: 50rpx; | ||
1731 | + padding-top: 10rpx; | ||
1732 | + color:#000; | ||
1733 | + | ||
1734 | +} | ||
1735 | +.xc-good-img{ | ||
1736 | + width: 100%; | ||
1737 | + height: 381rpx; | ||
1738 | + margin-top:5rpx; | ||
1739 | + | ||
1740 | +} | ||
1741 | +.xc-good-img .img{ | ||
1742 | + width: 90%; | ||
1743 | + height: 381rpx; | ||
1744 | +} | ||
1745 | +.xc-ensure-frame{ | ||
1746 | + width: 90%; | ||
1747 | + height: 60rpx; | ||
1748 | + border-bottom: 2rpx solid #d8d6d7; | ||
1749 | +} | ||
1750 | +.xc-ensure{ | ||
1751 | + width: 30%; | ||
1752 | + height: 60rpx; | ||
1753 | + line-height: 60rpx; | ||
1754 | +} | ||
1755 | +xc-ensure-div{ | ||
1756 | + width: 100%; | ||
1757 | + height: 60rpx; | ||
1758 | +} | ||
1759 | +.xc-ensure .word{ | ||
1760 | + font-size: 25rpx; | ||
1761 | + color: #d30025; | ||
1762 | + margin-left:9rpx; | ||
1763 | + | ||
1764 | +} | ||
1765 | +.xc-ensure .img{ | ||
1766 | + width: 25rpx; | ||
1767 | + height: 25rpx; | ||
1768 | + margin-top:18rpx; | ||
1769 | + | ||
1770 | +} | ||
1771 | + | ||
1772 | +.xc-bottmon{ | ||
1773 | + width: 100%; | ||
1774 | +} | ||
1775 | +.xc-bottmon .xc-left{ | ||
1776 | + width: 55%; | ||
1777 | + margin-top:30rpx; | ||
1778 | + padding-left:20rpx; | ||
1779 | + | ||
1780 | +} | ||
1781 | +.xc-left .xc-top{ | ||
1782 | + font-size: 25rpx; | ||
1783 | + height:40rpx; | ||
1784 | + line-height:40rpx; | ||
1785 | + color:#000; | ||
1786 | +} | ||
1787 | +.xc-left .xc-middle{ | ||
1788 | + font-size: 25rpx; | ||
1789 | + color: #b2b2b2; | ||
1790 | + height:30rpx; | ||
1791 | + line-height:30rpx; | ||
1792 | +} | ||
1793 | +.xc-left .xc-buttem{ | ||
1794 | + font-size: 25rpx; | ||
1795 | + height:100rpx; | ||
1796 | + line-height:100rpx; | ||
1797 | + color:#000; | ||
1798 | +} | ||
1799 | +.xc-ensure-right{ | ||
1800 | + width: 30%; | ||
1801 | +} | ||
1802 | +.xc-qrcode{ | ||
1803 | + width:120rpx; | ||
1804 | + height: 120rpx; | ||
1805 | + margin-top:43rpx; | ||
1806 | + margin-left:80rpx; | ||
1807 | + | ||
1808 | +} | ||
1809 | +.xc-close{ | ||
1810 | + width:50rpx; | ||
1811 | + height:50rpx; | ||
1812 | + border-radius:50%; | ||
1813 | + border:3rpx solid #fff; | ||
1814 | + text-align:center; | ||
1815 | + line-height: 41rpx; | ||
1816 | + font-size:50rpx; | ||
1817 | + color:#fff; | ||
1818 | + font-weight: lighter; | ||
1819 | + font-family:MingLiU; | ||
1820 | + transform:rotate(270deg); | ||
1821 | + overflow:auto; | ||
1822 | + margin-top:6rpx; | ||
1823 | + margin-bottom:1rpx; | ||
1824 | + | ||
1825 | +} | ||
1826 | +.xc-close-frame{ | ||
1827 | + position:absolute; | ||
1828 | + margin-top:30rpx; | ||
1829 | + width:90%; | ||
1830 | + display:flex; | ||
1831 | + justify-content:center; | ||
1832 | + overflow: auto; | ||
1833 | + | ||
1834 | +} | ||
1835 | +.xc-guanbi{ | ||
1836 | + width: 100%; | ||
1837 | + height: 80rpx; | ||
1838 | + overflow: hidden; | ||
1839 | +} | ||
1840 | + | ||
1841 | + | ||
1842 | +/* 自定义弹出窗口 */ | ||
1843 | +.cx-popup{ | ||
1844 | + width:100%; | ||
1845 | + background: #fff; | ||
1846 | + z-index: 35; | ||
1847 | + border-top-left-radius: 10rpx; | ||
1848 | + border-top-right-radius: 10rpx; | ||
1849 | + position:fixed; | ||
1850 | + bottom:0; | ||
1851 | +} | ||
1852 | + | ||
1853 | +.xc-top-content{ | ||
1854 | + width: 88%; | ||
1855 | + height:85rpx; | ||
1856 | + padding-top: 50rpx; | ||
1857 | + font-size: 36rpx; | ||
1858 | +} | ||
1859 | + | ||
1860 | + | ||
1861 | +.xc-valid-coupon{ | ||
1862 | + width: 90%; | ||
1863 | + height:40rpx; | ||
1864 | + padding-top: 24rpx; | ||
1865 | + overflow: hidden; | ||
1866 | +} | ||
1867 | +.xc-frame { | ||
1868 | + /* width: 100%; | ||
1869 | + margin-top:20rpx; */ | ||
1870 | + padding: 20rpx; | ||
1871 | +} | ||
1872 | + | ||
1873 | +.xc-frame .list-frame{ | ||
1874 | + width: 90%; | ||
1875 | + height: 100%; | ||
1876 | + overflow-y:scroll; | ||
1877 | + | ||
1878 | + margin-top:20rpx; | ||
1879 | + | ||
1880 | +} | ||
1881 | +.xc-close-frame{ | ||
1882 | + margin-top:30rpx; | ||
1883 | + width:15%; | ||
1884 | + display:flex; | ||
1885 | +} | ||
1886 | + | ||
1887 | +.xc-close{ | ||
1888 | + width:70rpx; | ||
1889 | + height:70rpx; | ||
1890 | + border-radius:50%; | ||
1891 | + border:5rpx solid #a5a5a7; | ||
1892 | + text-align:center; | ||
1893 | + line-height: 55rpx; | ||
1894 | + font-size:80rpx; | ||
1895 | + color:#a5a5a7; | ||
1896 | + font-family:"微软正黑体"; | ||
1897 | + margin-top:8rpx; | ||
1898 | + | ||
1899 | +} | ||
1900 | +.xc-money{ | ||
1901 | + color: #ff0013; | ||
1902 | +} | ||
1903 | + | ||
1904 | +.xc-money-frame{ | ||
1905 | + /* margin-left:35rpx; */ | ||
1906 | + | ||
1907 | +} | ||
1908 | +.xc-coupon-effect{ | ||
1909 | + width: 99%; | ||
1910 | + height: 128rpx; | ||
1911 | + border-bottom:3rpx solid #ddd; | ||
1912 | + | ||
1913 | + | ||
1914 | +} | ||
1915 | +.xc-goods-coupon{ | ||
1916 | + width: 80%; | ||
1917 | + height:100%; | ||
1918 | + | ||
1919 | +} | ||
1920 | +.xc-title{ | ||
1921 | + width:50%; | ||
1922 | + margin-left:222rpx; | ||
1923 | + | ||
1924 | +} | ||
1925 | +.xc-coupon-money{ | ||
1926 | + color: #c91e31; | ||
1927 | + font-size: 35rpx; | ||
1928 | + margin-top:20rpx; | ||
1929 | + | ||
1930 | +} | ||
1931 | +.xc-coupon-time{ | ||
1932 | + height: 50rpx; | ||
1933 | + font-size: 27rpx; | ||
1934 | + color: #a4a4a4; | ||
1935 | +} | ||
1936 | +.xc-coupon-time .time{ | ||
1937 | + margin-left: 15rpx; | ||
1938 | + font-size: 27rpx; | ||
1939 | +} | ||
1940 | +.xc-coupon-selection{ | ||
1941 | + width:99%; | ||
1942 | + height:100%; | ||
1943 | + | ||
1944 | + | ||
1945 | +} | ||
1946 | +.xc-confirm { | ||
1947 | + width: 90%; | ||
1948 | + height: 75rpx; | ||
1949 | + margin:0 auto; | ||
1950 | + background:#c41830; | ||
1951 | + color:#fff; | ||
1952 | + border-radius:10rpx; | ||
1953 | + font-size:30rpx; | ||
1954 | + margin-top: 50rpx; | ||
1955 | +} | ||
1956 | +.xc-not-Selection{ | ||
1957 | + width: 60rpx; | ||
1958 | + height: 60rpx; | ||
1959 | + background: #eeeeee; | ||
1960 | +} | ||
1961 | + | ||
1962 | +/*---------------视频图片---------------*/ | ||
1963 | +.xc-imageCount { | ||
1964 | + width:95rpx; | ||
1965 | + height:50rpx; | ||
1966 | + background-color: rgba(0, 0, 0, 0.3); | ||
1967 | + border-radius:40rpx; | ||
1968 | + line-height:50rpx; | ||
1969 | + color:#fff; | ||
1970 | + text-align:center; | ||
1971 | + font-size:26rpx; | ||
1972 | + position:absolute; | ||
1973 | + | ||
1974 | + right:23rpx; | ||
1975 | + bottom:21rpx; | ||
1976 | +} | ||
1977 | + | ||
1978 | + | ||
1979 | +/* 视频图片的边框 */ | ||
1980 | +.xc-videos-picture{ | ||
1981 | + width: 100%; | ||
1982 | + height: 750rpx; | ||
1983 | +} | ||
1984 | +/* 视频 */ | ||
1985 | +.xc-videos{ | ||
1986 | + width: 100%; | ||
1987 | + height:544rpx; | ||
1988 | + | ||
1989 | + | ||
1990 | +} | ||
1991 | +/* 点击视频或图片 */ | ||
1992 | +.xc-video-picture{ | ||
1993 | + | ||
1994 | + bottom: 20rpx; | ||
1995 | + left: 0rpx; | ||
1996 | + display: flex; | ||
1997 | + align-items: center; | ||
1998 | + justify-content:center; | ||
1999 | + width: 45%; | ||
2000 | + height: 60rpx; | ||
2001 | + margin-left: 215rpx; | ||
2002 | + | ||
2003 | +} | ||
2004 | +.xc-video-button:before{ | ||
2005 | + content: ""; | ||
2006 | + position: absolute; | ||
2007 | + left: 48%; | ||
2008 | + top: 40%; | ||
2009 | + width: 0; | ||
2010 | + height: 0; | ||
2011 | + margin-left: -36rpx; | ||
2012 | + margin-top: -10rpx; | ||
2013 | + border-width:13rpx; | ||
2014 | + border-style: dashed; | ||
2015 | + border-color: transparent transparent transparent #fff; | ||
2016 | + font-size: 0; | ||
2017 | + line-height: 0; | ||
2018 | + z-index: 2; | ||
2019 | + -webkit-backface-visibility: hidden; | ||
2020 | +} | ||
2021 | +.xc-video-buttons:before{ | ||
2022 | + content: ""; | ||
2023 | + position: absolute; | ||
2024 | + left: 50%; | ||
2025 | + top:41%; | ||
2026 | + width: 0; | ||
2027 | + height: 0; | ||
2028 | + margin-left: -36rpx; | ||
2029 | + margin-top: -10rpx; | ||
2030 | + border-width:13rpx; | ||
2031 | + border-style: dashed; | ||
2032 | + border-color: transparent transparent transparent #000; | ||
2033 | + font-size: 0; | ||
2034 | + line-height: 0; | ||
2035 | + z-index: 2; | ||
2036 | + -webkit-backface-visibility: hidden; | ||
2037 | +} | ||
2038 | + | ||
2039 | +.xc-video{ | ||
2040 | + /* width:100rpx; */ | ||
2041 | + /* height: 50rpx; | ||
2042 | + line-height: 50rpx; */ | ||
2043 | + text-align: center; | ||
2044 | + /* margin-left:-30rpx; */ | ||
2045 | + | ||
2046 | + | ||
2047 | +} | ||
2048 | +/* 图片 */ | ||
2049 | +.xc-picture{ | ||
2050 | + color: #000; | ||
2051 | + background: #dcdcdc; | ||
2052 | + width: 94rpx; | ||
2053 | + height: 45rpx; | ||
2054 | + font-size: 25rpx; | ||
2055 | + border-radius: 25rpx; | ||
2056 | + font-family: 'SimHei',Arial; | ||
2057 | + text-align: center; | ||
2058 | + line-height: 45rpx; | ||
2059 | + margin-left:53rpx | ||
2060 | + | ||
2061 | +} | ||
2062 | +/* 点击视频 */ | ||
2063 | +.xc-video-button{ | ||
2064 | + position: relative; | ||
2065 | + color: #000; | ||
2066 | + background: #dcdcdc; | ||
2067 | + width: 85rpx; | ||
2068 | + height: 45rpx; | ||
2069 | + line-height: 45rpx; | ||
2070 | + font-size: 30rpx; | ||
2071 | + border-radius: 25rpx; | ||
2072 | + font-family: 'SimHei',Arial; | ||
2073 | + padding-left: 11rpx; | ||
2074 | +} | ||
2075 | + | ||
2076 | + | ||
2077 | +.xc-sn{ | ||
2078 | + color: #fff; | ||
2079 | + background: #c7161e; | ||
2080 | + border-color: transparent transparent transparent #fff; | ||
2081 | +} | ||
2082 | +/* 图片 */ | ||
2083 | +.xc-pictures{ | ||
2084 | + width: 100%; | ||
2085 | + height:529rpx; | ||
2086 | + | ||
2087 | +} | ||
2088 | +/*视频封面的图片 */ | ||
2089 | +.xc-picturess{ | ||
2090 | + position: relative; | ||
2091 | + width: 100%; | ||
2092 | + height:529rpx; | ||
2093 | +} | ||
2094 | +/* 播放 */ | ||
2095 | +.xc-play{ | ||
2096 | + width: 130rpx; | ||
2097 | + height: 130rpx; | ||
2098 | + position: absolute; | ||
2099 | + top:207rpx; | ||
2100 | + left:309rpx; | ||
2101 | +} | ||
2102 | + | ||
2103 | +.xc-video-buttons{ | ||
2104 | + position: relative; | ||
2105 | + color: #000; | ||
2106 | + background: #dcdcdc; | ||
2107 | + width: 85rpx; | ||
2108 | + height: 45rpx; | ||
2109 | + line-height: 45rpx; | ||
2110 | + font-size: 30rpx; | ||
2111 | + border-radius: 25rpx; | ||
2112 | + font-family: 'SimHei',Arial; | ||
2113 | + padding-left: 11rpx; | ||
2114 | +} | ||
2115 | + | ||
2116 | + | ||
2117 | +.wsize{font-size: 32rpx} | ||
2118 | +.five-level-word{font-size: 24rpx;} | ||
2119 | + | ||
2120 | + | ||
2121 | +/*-- 推荐商品 --*/ | ||
2122 | +.xc-goods{ | ||
2123 | + height: auto; | ||
2124 | + background: #f2f2f2; | ||
2125 | + padding: 0 20rpx; | ||
2126 | + margin-top: -25rpx; | ||
2127 | + padding-bottom: 20rpx | ||
2128 | +} | ||
2129 | + | ||
2130 | +.xc-goods-recommend { | ||
2131 | + border-radius: 20rpx; | ||
2132 | + width:345rpx; | ||
2133 | + height: 450rpx; | ||
2134 | + margin-top: 25rpx; | ||
2135 | + display: inline-block; | ||
2136 | + | ||
2137 | +} | ||
2138 | + | ||
2139 | +.xc-goods-recommend.ml{ margin-left: 22rpx} | ||
2140 | + | ||
2141 | +.xc-goods-recommend .xc-goods-imgs{ | ||
2142 | + width: 100%; | ||
2143 | + height: 325rpx; | ||
2144 | + border-radius:20rpx 20rpx 0 0; | ||
2145 | +} | ||
2146 | + | ||
2147 | +.xc-goods-bottom{ | ||
2148 | + width: 345rpx; | ||
2149 | + height: 134rpx; | ||
2150 | + background: #fff; | ||
2151 | + border-radius:0 0 20rpx 20rpx; | ||
2152 | + bottom:-8rpx; | ||
2153 | + left:0rpx; | ||
2154 | +} | ||
2155 | +.xc-goods-bottom .monry-frame{ | ||
2156 | + width:283rpx; | ||
2157 | +height:52rpx; | ||
2158 | +padding-left:24rpx; | ||
2159 | + | ||
2160 | +} | ||
2161 | +.xc-good-explain{ | ||
2162 | + width: 283rpx; | ||
2163 | + height:60rpx; | ||
2164 | + word-break: normal; | ||
2165 | + margin-left:30rpx; | ||
2166 | + font-size: 26rpx; | ||
2167 | + line-height: 30rpx; | ||
2168 | + margin-top: 5rpx; | ||
2169 | +} | ||
2170 | +.money-color-val{ | ||
2171 | + color: #c6172f; | ||
2172 | +} | ||
2173 | +.rmb-symbol{ | ||
2174 | + line-height:81rpx; | ||
2175 | + height:53rpx; | ||
2176 | + font-size: 28rpx; | ||
2177 | +} | ||
2178 | +.xc-original-price{ | ||
2179 | + color: #c0c0c0; | ||
2180 | +} | ||
2181 | +/* 文字中间加线条 */ | ||
2182 | +.word-lines{ | ||
2183 | + text-decoration:line-through; | ||
2184 | + line-height:90rpx; | ||
2185 | + margin-left:10rpx; | ||
2186 | + font-size: 20rpx; | ||
2187 | +} | ||
2188 | + | ||
2189 | + .xc-linellae-frame{ | ||
2190 | + width: 100%; | ||
2191 | + height: 70rpx; | ||
2192 | + background: #f2f2f2; | ||
2193 | +} | ||
2194 | +.xc-linellae-frame .xc-linellae{ | ||
2195 | + width: 386rpx; | ||
2196 | + height: 1rpx; | ||
2197 | + border-bottom: 1rpx solid #ebedf0; | ||
2198 | +} | ||
2199 | +.xc-recommend-frame{ | ||
2200 | +background:#f2f2f2; | ||
2201 | +width:97rpx; | ||
2202 | +height:100%; | ||
2203 | +padding-left: 10rpx; | ||
2204 | +} | ||
2205 | +.xc-recommend-frame .xc-recommend{ | ||
2206 | + width: 35rpx; | ||
2207 | + height: 27rpx; | ||
2208 | +} | ||
2209 | +.xc-recommend-frame .xc-recommend-word{ | ||
2210 | + width:58rpx; | ||
2211 | +font-size:24rpx; | ||
2212 | +color: #a9a9a9; | ||
2213 | +margin-left: 5rpx; | ||
2214 | +margin-bottom: 5rpx; | ||
2215 | +margin-top: 1rpx; | ||
2216 | + | ||
2217 | +} | ||
2218 | +.xc-price-frame{ | ||
2219 | + color: #ec0022; | ||
2220 | + align-items: baseline; | ||
2221 | +/* height:44rpx; */ | ||
2222 | +} | ||
2223 | +.xc-price-frame .sign{ | ||
2224 | +margin-top:19rpx; | ||
2225 | +margin-left:-4px; | ||
2226 | +} | ||
2227 | +.xc-val-price{ | ||
2228 | +margin-left:24rpx; | ||
2229 | +color: #ec0022; | ||
2230 | +padding-top:13rpx; | ||
2231 | +} | ||
2232 | +.xc-val-price .save{ | ||
2233 | + border-radius:10rpx; | ||
2234 | + margin-top:5rpx; | ||
2235 | + background:#fed2d9; | ||
2236 | + min-width:230rpx; | ||
2237 | + height:40rpx; | ||
2238 | + line-height:40rpx; | ||
2239 | + width: auto; | ||
2240 | + padding-left:12rpx; | ||
2241 | + padding-right:12rpx; | ||
2242 | + | ||
2243 | +} | ||
2244 | +.xc-unit-price{ | ||
2245 | + margin-top:25rpx; | ||
2246 | +padding-left:-4rpx; | ||
2247 | + | ||
2248 | +} | ||
2249 | +.xc-explain{ | ||
2250 | + color:#292929; | ||
2251 | + width:542rpx; | ||
2252 | + margin: 10rpx 0 20rpx; | ||
2253 | + width: 100%; | ||
2254 | + font-weight: bold; | ||
2255 | +} | ||
2256 | +.xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;} | ||
2257 | +.xc-item .yuan{ | ||
2258 | + width: 38rpx; | ||
2259 | + height: 38rpx; | ||
2260 | + line-height: 38rpx; | ||
2261 | + border:1rpx solid #f3f1f2; | ||
2262 | +margin-left:33rpx; | ||
2263 | + | ||
2264 | +} | ||
2265 | +.xc-item .word{ | ||
2266 | + width:104rpx; | ||
2267 | + margin-top:16rpx; | ||
2268 | + color:#363636; | ||
2269 | + font-weight:600; | ||
2270 | + | ||
2271 | +} | ||
2272 | +.xc-item .circle-color{ | ||
2273 | + background: #d60024; | ||
2274 | + color: #fff; | ||
2275 | +} | ||
2276 | +.xc-item .circle-color1{ | ||
2277 | + background: #fefefe; | ||
2278 | + color: #666666; | ||
2279 | +} | ||
2280 | +.link{ | ||
2281 | +height:6rpx; | ||
2282 | +width:180rpx; | ||
2283 | +top:54rpx; | ||
2284 | +left:32px; | ||
2285 | +} | ||
2286 | +.link1{ | ||
2287 | +height:6rpx; | ||
2288 | +width:166rpx; | ||
2289 | +top:54rpx; | ||
2290 | +left:264rpx; | ||
2291 | +} | ||
2292 | +.link2{ | ||
2293 | + height:6rpx; | ||
2294 | +width:157rpx; | ||
2295 | +top:54rpx; | ||
2296 | +right:87rpx; | ||
2297 | +} | ||
2298 | +.link-color-red{ | ||
2299 | + background: #d60024;} | ||
2300 | +.link-color{ | ||
2301 | + background: #e5e5e5; | ||
2302 | +} | ||
2303 | +.xc-qt-price{ | ||
2304 | + /* font-style: italic; */ | ||
2305 | + top:-23rpx; | ||
2306 | +left:40rpx; | ||
2307 | + color: #fff; | ||
2308 | +} | ||
2309 | +.presell_price{ | ||
2310 | + /* font-style: italic; */ | ||
2311 | + | ||
2312 | + top: 23rpx; | ||
2313 | + left:40rpx; | ||
2314 | + color: #fff; | ||
2315 | + justify-content: space-between; | ||
2316 | +} | ||
2317 | +.xc-qt-price .xc-qtunit-price{ | ||
2318 | + margin-left:6rpx; | ||
2319 | +margin-top:-4rpx; | ||
2320 | +} | ||
2321 | +.xc-nanber{ | ||
2322 | + top:-25rpx; | ||
2323 | +left:289rpx; | ||
2324 | + | ||
2325 | +} | ||
2326 | +.xc-qtsign{ | ||
2327 | +margin-top:5rpx; | ||
2328 | + | ||
2329 | +} | ||
2330 | +.xc-people-img{ | ||
2331 | + height: 36rpx; | ||
2332 | + width: 36rpx; | ||
2333 | + background: #fff; | ||
2334 | + border-radius: 7rpx; | ||
2335 | + | ||
2336 | +} | ||
2337 | +.xc-people-img .imgs{ | ||
2338 | + width: 28rpx; | ||
2339 | + height: 28rpx; | ||
2340 | + margin-top:4rpx; | ||
2341 | + | ||
2342 | +} | ||
2343 | +.xc-people-val{ | ||
2344 | + | ||
2345 | + height: 32rpx; | ||
2346 | + border-top: 1rpx solid #fff; | ||
2347 | + border-bottom: 1rpx solid #fff; | ||
2348 | + border-right: 1rpx solid #fff; | ||
2349 | + border-radius:0 7rpx 7rpx 0; | ||
2350 | + line-height:32rpx; | ||
2351 | + margin-left:-6rpx; | ||
2352 | + padding: 0 12rpx; | ||
2353 | +} | ||
2354 | +.word-color{ | ||
2355 | + color:#d70024; | ||
2356 | +} | ||
2357 | +.word-color-lan{ | ||
2358 | + color:#0393e1; | ||
2359 | +} | ||
2360 | +.pt_view .hy-stop{ | ||
2361 | + top: -23rpx; | ||
2362 | + right: 56rpx; | ||
2363 | +} | ||
2364 | +.xc-time-val{ | ||
2365 | + width:36rpx; | ||
2366 | + height:36rpx; | ||
2367 | + border-radius:7rpx; | ||
2368 | + line-height: 36rpx; | ||
2369 | + background:#d40022; | ||
2370 | +} | ||
2371 | +.xc-time{ | ||
2372 | + margin-right:10rpx; | ||
2373 | + margin-left:10rpx; | ||
2374 | + margin-top:-32rpx; | ||
2375 | + color: #d40022; | ||
2376 | +} | ||
2377 | +.ba_r { | ||
2378 | + background:#d40022; | ||
2379 | +} | ||
2380 | +.cl_r { | ||
2381 | + color: #d40022; | ||
2382 | +} | ||
2383 | +.pre_ba { | ||
2384 | + background:#0097e0; | ||
2385 | +} | ||
2386 | +.pre_cl { | ||
2387 | + color: #0097e0; | ||
2388 | +} | ||
2389 | +.xc-goods-explain{ | ||
2390 | + width:100%; | ||
2391 | + /* padding-left:30rpx; | ||
2392 | + margin-left:-9rpx; | ||
2393 | + height: 150rpx */ | ||
2394 | +} | ||
2395 | +.xc-partner-frame{ | ||
2396 | +border-bottom:2rpx solid #eee; | ||
2397 | +width:100%; | ||
2398 | +padding:20rpx; | ||
2399 | +/* height:56rpx; */ | ||
2400 | +box-sizing: border-box; | ||
2401 | +} | ||
2402 | +.xc-person-number{ | ||
2403 | + width:120rpx; | ||
2404 | + color: #999999; | ||
2405 | + padding-left:8rpx; | ||
2406 | + text-align: left | ||
2407 | +} | ||
2408 | + | ||
2409 | +.xc-miaosha-time{ | ||
2410 | +right:17rpx; top:55rpx; | ||
2411 | +} | ||
2412 | +.pd_top1{padding-top: 10rpx} | ||
2413 | +.s_ms_bth{margin-top: 85rpx} | ||
2414 | + | ||
2415 | + | ||
2416 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin: 30rpx 0; display: inline-block; font-size: 28rpx} | ||
2417 | +/* 门店地址 */ | ||
2418 | +.xc-address_frame{ | ||
2419 | + /* border-top:1rpx solid #eee; */ | ||
2420 | + width: 100%; | ||
2421 | + height: auto; | ||
2422 | + padding: 20rpx; | ||
2423 | + box-sizing: border-box; | ||
2424 | +} | ||
2425 | +.on_height{ | ||
2426 | +height: 90rpx; | ||
2427 | +} | ||
2428 | +.sn_height{ | ||
2429 | + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */ | ||
2430 | +} | ||
2431 | +.xc-address_frame .address_frame{ | ||
2432 | + width: 100%; | ||
2433 | +/* padding-left: 10rpx; | ||
2434 | +margin: auto; */ | ||
2435 | + | ||
2436 | +} | ||
2437 | +.shop_name{ | ||
2438 | + | ||
2439 | +} | ||
2440 | +.stores-img{ | ||
2441 | + width: 28rpx; | ||
2442 | + height: 28rpx; | ||
2443 | + margin-right: 10rpx; | ||
2444 | +} | ||
2445 | +.shop_name{ | ||
2446 | + margin-right: 10rpx; | ||
2447 | +} | ||
2448 | +.address{ | ||
2449 | + /* width: 100%; | ||
2450 | + margin-top: 5rpx; | ||
2451 | + margin-bottom: 5rpx; */ | ||
2452 | +} | ||
2453 | +.distance{ | ||
2454 | + padding-left: 20rpx; | ||
2455 | + padding-right: 20rpx; | ||
2456 | + background: #eee; | ||
2457 | + border-radius: 20rpx; | ||
2458 | + /* margin-right: 5rpx; */ | ||
2459 | + color: #999; | ||
2460 | + height: 38rpx; | ||
2461 | +line-height: 38rpx; | ||
2462 | + | ||
2463 | +} | ||
2464 | +/* 选择门店的弹窗 */ | ||
2465 | +.mongolia-layer{ | ||
2466 | + position: fixed; | ||
2467 | +left: 0; | ||
2468 | +top: 0; | ||
2469 | +right: 0; | ||
2470 | +bottom: 0; | ||
2471 | +z-index: 11; | ||
2472 | +background: rgba(0,0,0,0.4); | ||
2473 | +width: 100%; | ||
2474 | +height: 91.9%; | ||
2475 | + | ||
2476 | +} | ||
2477 | + | ||
2478 | +.popup-frame{ | ||
2479 | +position: fixed; | ||
2480 | +z-index: 20; | ||
2481 | +background: white; | ||
2482 | +width: 100%; | ||
2483 | +border-radius: 20rpx 20rpx 0 0; | ||
2484 | +height: auto; | ||
2485 | +bottom: 0; | ||
2486 | +} | ||
2487 | +.popup-top{ | ||
2488 | + border-bottom: 1rpx solid #eee; | ||
2489 | + height: 155rpx; | ||
2490 | + width: 95%; | ||
2491 | + margin: auto; | ||
2492 | + line-height: 155rpx; | ||
2493 | + | ||
2494 | +} | ||
2495 | +.bg_rights{ | ||
2496 | + border-top: 2rpx solid ; | ||
2497 | + border-right: 2rpx solid ; | ||
2498 | + transform: rotate(45deg); | ||
2499 | + display:inline-block; | ||
2500 | + width:15rpx;height:15rpx; | ||
2501 | + border-color:#da0b31; | ||
2502 | +} | ||
2503 | +.modal-closes { | ||
2504 | + position: absolute; | ||
2505 | + right: 30rpx; | ||
2506 | + top: -15rpx; | ||
2507 | + height: 25rpx; | ||
2508 | + | ||
2509 | +} | ||
2510 | +.choose_more{ | ||
2511 | + margin-top: 40rpx; | ||
2512 | + margin-right: 20rpx; | ||
2513 | + | ||
2514 | +} | ||
2515 | +.choose_mores{ | ||
2516 | + margin-top: 30rpx; | ||
2517 | + margin-right: 15rpx; | ||
2518 | + | ||
2519 | +} | ||
2520 | +.store-list{ | ||
2521 | + width: 95%; | ||
2522 | + min-height: 300rpx; | ||
2523 | + overflow-y: scroll; | ||
2524 | + margin: auto; | ||
2525 | + max-height: 610rpx; | ||
2526 | +} | ||
2527 | +.store-list .store_choose{ | ||
2528 | + width: 100%; | ||
2529 | + height: 120rpx; | ||
2530 | + line-height: 125rpx; | ||
2531 | + border-bottom: 1rpx solid #eee; | ||
2532 | + | ||
2533 | +} | ||
2534 | +.store-list .store_choose .store{ | ||
2535 | +width: 100%; | ||
2536 | +margin: auto; | ||
2537 | +line-height: 37rpx; | ||
2538 | +padding-left: 20rpx; | ||
2539 | + | ||
2540 | +} | ||
2541 | +.xc-hook{ | ||
2542 | + width: 35rpx; | ||
2543 | + height: 35rpx; | ||
2544 | + transform: rotate(-145deg); | ||
2545 | +line-height: 37rpx; | ||
2546 | +text-align: center; | ||
2547 | +} | ||
2548 | + .xc-hooks{ | ||
2549 | + width: 30rpx; | ||
2550 | + height: 30rpx; | ||
2551 | + border: 1rpx solid #999; | ||
2552 | + } | ||
2553 | + .address-frame{ | ||
2554 | + width: 93%; | ||
2555 | +margin-left: 7rpx; | ||
2556 | + | ||
2557 | + } | ||
2558 | + .nearby_store{ | ||
2559 | +margin-left: 17rpx; | ||
2560 | + } | ||
2561 | + .address_name{ | ||
2562 | + margin-right: 10rpx; | ||
2563 | + | ||
2564 | + } | ||
2565 | + .address-val{ | ||
2566 | + height: 38rpx; | ||
2567 | +line-height: 38rpx; | ||
2568 | + | ||
2569 | + } | ||
2570 | + .store-bottom{ | ||
2571 | + width: 85%; | ||
2572 | + margin: auto; | ||
2573 | + height: 90rpx; | ||
2574 | + } | ||
2575 | + .determine{ | ||
2576 | + width: 260rpx; | ||
2577 | + height: 55rpx; | ||
2578 | + border-radius: 50rpx; | ||
2579 | + line-height: 55rpx; | ||
2580 | + } | ||
2581 | + .default{ | ||
2582 | + width: 260rpx; | ||
2583 | + height: 55rpx; | ||
2584 | + border:3rpx solid #c8c8c8; | ||
2585 | + border-radius: 50rpx; | ||
2586 | + line-height: 55rpx; | ||
2587 | + } | ||
2588 | + .store-bottom-frame{ | ||
2589 | + width: 95%; | ||
2590 | + margin: auto; | ||
2591 | + | ||
2592 | + } | ||
2593 | + /* 门店分类列表 */ | ||
2594 | +.sort_store_list{ | ||
2595 | + max-height: 700rpx; | ||
2596 | + overflow: hidden; | ||
2597 | + overflow-y: scroll; | ||
2598 | + width: 95%; | ||
2599 | + margin: auto; | ||
2600 | +} | ||
2601 | +.sort_store_list .sort-store-frame{ | ||
2602 | + width: 100%; | ||
2603 | +height: 100rpx; | ||
2604 | +line-height:100rpx; | ||
2605 | +border-bottom: 1rpx solid #eee; | ||
2606 | + | ||
2607 | +} | ||
2608 | +.sort_store_list .sort-store-frame .sort-store{ | ||
2609 | + width: 94.5%; | ||
2610 | + margin: auto; | ||
2611 | +} | ||
2612 | +.black_rights-frame{ | ||
2613 | +width: 50%; | ||
2614 | +} | ||
2615 | +.black_rights-frame .black_rights{ | ||
2616 | + border-top: 3rpx solid; | ||
2617 | +border-right: 3rpx solid; | ||
2618 | +transform: rotate(45deg); | ||
2619 | +display: inline-block; | ||
2620 | +width: 20rpx; | ||
2621 | +height: 20rpx; | ||
2622 | +} | ||
2623 | +.xc-val-money{ | ||
2624 | + height:55rpx; | ||
2625 | +} | ||
2626 | + | ||
2627 | +.xc-distance-bottom{ | ||
2628 | + margin-bottom: 40rpx; | ||
2629 | +} | ||
2630 | +.xc-distance-top{ | ||
2631 | +margin-top: 10rpx; | ||
2632 | +} | ||
2633 | +.xc-width{ | ||
2634 | + width: 100%; | ||
2635 | +} | ||
2636 | +.right-arrow{ width: 15rpx; height:15rpx; | ||
2637 | + border-top: 2rpx solid #d70026; | ||
2638 | + border-right: 2rpx solid #d70026; | ||
2639 | + transform: rotate(45deg);display:inline-block; | ||
2640 | + margin-bottom:3rpx; | ||
2641 | +} | ||
2642 | +.xc-goods-attribute{ | ||
2643 | + border-bottom: 1px solid #eee; | ||
2644 | +padding-bottom: 20rpx; | ||
2645 | +/* margin-bottom:40rpx; */ | ||
2646 | +} | ||
2647 | +.xc-val-fream{ | ||
2648 | + width: 105rpx; | ||
2649 | +} | ||
2650 | +.is_stock{ | ||
2651 | +width: 58%; | ||
2652 | +height: 70rpx; | ||
2653 | +border-radius: 55rpx; | ||
2654 | +} | ||
2655 | +.select_store_height{ | ||
2656 | + height: 50rpx; | ||
2657 | +} | ||
2658 | +.butttem5{ | ||
2659 | + margin-bottom: 5rpx; | ||
2660 | +} | ||
2661 | + | ||
2662 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx} | ||
2663 | + | ||
2664 | + | ||
2665 | +.join-cart>view.no_store { | ||
2666 | + width: 58%; background-color: #adadad; | ||
2667 | +} | ||
2668 | + | ||
2669 | +.s_btn{ margin-top: 25rpx; } | ||
2670 | +/* 美妆价的样式 */ | ||
2671 | +.beauty-makeup-frame{ | ||
2672 | + /* width: 101.5%; | ||
2673 | + margin: auto; */ | ||
2674 | + height: 120rpx; | ||
2675 | + border-radius: 15rpx; | ||
2676 | + margin-top: 10px; | ||
2677 | + | ||
2678 | +} | ||
2679 | +.beauty-makeup-frame .left{ | ||
2680 | + width: 80%; | ||
2681 | + height: 100%; | ||
2682 | + background:#f7f7f7; | ||
2683 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | ||
2684 | + /* padding: 0 10rpx; */ | ||
2685 | +} | ||
2686 | + .card-frame{ | ||
2687 | + margin-top: 0rpx; | ||
2688 | + /* padding-right: 23rpx; | ||
2689 | + margin-right: 15rpx; */ | ||
2690 | +} | ||
2691 | +.advert-card{ | ||
2692 | + margin-top: 0rpx!important; | ||
2693 | + | ||
2694 | +} | ||
2695 | +.beauty-makeup-frame .right{ | ||
2696 | + width: 20%; | ||
2697 | + height: 100%; | ||
2698 | + background:#f3efe3; | ||
2699 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | ||
2700 | + } | ||
2701 | +.grade-card-frame{ | ||
2702 | + | ||
2703 | + /* height:45rpx ; */ | ||
2704 | + background: #3c300a; | ||
2705 | + border-radius: 20rpx; | ||
2706 | + /* margin-top: 10px; | ||
2707 | + margin-left: 7rpx; */ | ||
2708 | + justify-content: center; | ||
2709 | + padding: 4rpx 12rpx; | ||
2710 | +} | ||
2711 | +.grade-card-frame .img{ | ||
2712 | + width: 24rpx; | ||
2713 | + height: 24rpx; | ||
2714 | + margin-top: 2px; | ||
2715 | + | ||
2716 | +} | ||
2717 | +.grade-card-frame .card-name{ | ||
2718 | + margin-left: 8rpx; | ||
2719 | + /* max-width: 120rpx; */ | ||
2720 | + max-width: 165rpx; | ||
2721 | +} | ||
2722 | +.card-effect{ | ||
2723 | + /* margin-left: 15rpx; */ | ||
2724 | +} | ||
2725 | +.at_once_carde{ | ||
2726 | + width:65rpx; | ||
2727 | + height: 75rpx; | ||
2728 | + line-height:38rpx; | ||
2729 | +} | ||
2730 | +.bg_right{ width: 18rpx; height:18rpx; | ||
2731 | + border-top: 2rpx solid #333; | ||
2732 | + border-right: 2rpx solid #333; | ||
2733 | + transform: rotate(45deg);display:inline-block; | ||
2734 | + margin-bottom:3rpx; | ||
2735 | + | ||
2736 | +} | ||
2737 | +.carde_frame{ | ||
2738 | + height: 50rpx; | ||
2739 | + line-height: 18rpx | ||
2740 | +} | ||
2741 | + | ||
2742 | +button.custom-service { line-height: normal; border: 0;} | ||
2743 | +button.custom-service::after{ | ||
2744 | + border: 0; | ||
2745 | +} | ||
2746 | +.no_store{color:#d60021; font-size: 26rpx;} | ||
2747 | +.cx_show_view{ width: 580rpx; /* line-height: 30rpx; margin-bottom: 6rpx; */ } | ||
2748 | +.cx_show_view .word{ width: 400rpx} | ||
2749 | +.prom_condition { | ||
2750 | + color: #d60021; | ||
2751 | + /* width: 180rpx; */ | ||
2752 | + /* height: 30rpx; */ | ||
2753 | + font-size: 20rpx; | ||
2754 | + /* padding-top: 0.01rpx; */ | ||
2755 | + /* display: flex; | ||
2756 | + justify-content: center; | ||
2757 | + align-items: center; */ | ||
2758 | + border: 2rpx solid #d60021; | ||
2759 | + border-radius: 10rpx; | ||
2760 | + margin-right:10rpx ; | ||
2761 | + /* margin-left: 10rpx; */ | ||
2762 | + font-size: 24rpx; | ||
2763 | + padding: 0 10rpx; | ||
2764 | +} | ||
2765 | +.hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx} | ||
2766 | +.order_hui{color: #444; width: 420rpx} | ||
2767 | +.order_hui view{ height: 34rpx; line-height: 34rpx;} | ||
2768 | +.dp_img{width: 240rpx; height: 240rpx; margin: 0 40rpx} | ||
2769 | +.dp_cx_view{border-bottom: 0.02rpx solid #eee; padding-bottom: 40rpx} | ||
2770 | +.act_content{ margin-top: 40rpx} | ||
2771 | +.act_content view{ margin-bottom: 12rpx} | ||
2772 | +.color_b{color: #ff9c00} | ||
2773 | + | ||
2774 | +.poster-container { | ||
2775 | + box-sizing: border-box; | ||
2776 | + position: fixed; | ||
2777 | + top: 50%; | ||
2778 | + left: 50%; | ||
2779 | + transform: translate(-50%, -50%); | ||
2780 | + width: calc(100% - 120rpx); | ||
2781 | + z-index: 1000; | ||
2782 | +} | ||
2783 | +.mask { | ||
2784 | + position: fixed; | ||
2785 | + top: 0; | ||
2786 | + left: 0; | ||
2787 | + width: 100%; | ||
2788 | + height: 100%; | ||
2789 | + z-index: 999; | ||
2790 | + background-color: rgba(0,0,0,.4); | ||
2791 | +} | ||
2792 | +.poster-wrapper { | ||
2793 | + width: 100%; | ||
2794 | +} | ||
2795 | + | ||
2796 | +.poster { | ||
2797 | + box-sizing: border-box; | ||
2798 | + width: 100%; | ||
2799 | + height: 1055rpx; | ||
2800 | + border-radius: 20rpx; | ||
2801 | + /* box-shadow: 0 8px 12px #666; */ | ||
2802 | + position: relative; | ||
2803 | + z-index: 999; | ||
2804 | + overflow: hidden; | ||
2805 | +} | ||
2806 | +.poster-img { | ||
2807 | + display: block; | ||
2808 | + width: 100%; | ||
2809 | + height: 100%; | ||
2810 | +} | ||
2811 | +.btn-container { | ||
2812 | + display: flex; | ||
2813 | + justify-content: space-around; | ||
2814 | +} | ||
2815 | +.btn-share { | ||
2816 | + display: block; | ||
2817 | + background-color: #FE6867; | ||
2818 | + color: white; | ||
2819 | + border-radius: 8rpx; | ||
2820 | + line-height: 80rpx; | ||
2821 | + margin-top: 28rpx; | ||
2822 | + padding: 0 60rpx; | ||
2823 | +} | ||
2824 | +/* .btn-close { | ||
2825 | + background-color: rgba(0,0,0,.5); | ||
2826 | + color: white; | ||
2827 | + width: 40rpx; | ||
2828 | + height: 40rpx; | ||
2829 | + line-height: 40rpx; | ||
2830 | + text-align: center; | ||
2831 | + border-radius: 50%; | ||
2832 | + position: absolute; | ||
2833 | + right: 20rpx; | ||
2834 | + top: 10rpx; | ||
2835 | +} */ | ||
2836 | + | ||
2837 | +.goods-price .rel_txt{ | ||
2838 | + /* position: relative; top: 32rpx; */ | ||
2839 | + font-size: 30rpx; | ||
2840 | +} | ||
2841 | +.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 8rpx;} | ||
2842 | + | ||
2843 | +.btn-close { | ||
2844 | + /* background-color: rgba(0,0,0,.5); */ | ||
2845 | + color: #ccc; | ||
2846 | + width: 50rpx; | ||
2847 | + height: 50rpx; | ||
2848 | + line-height: 50rpx; | ||
2849 | + text-align: center; | ||
2850 | + border-radius: 50%; | ||
2851 | + position: absolute; | ||
2852 | + right: 20rpx; | ||
2853 | + top: 20rpx; | ||
2854 | +} | ||
2855 | + | ||
2856 | +.icon-close { | ||
2857 | + font-size: 48rpx; | ||
2858 | +} | ||
2859 | +.quan_price{ | ||
2860 | + background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; | ||
2861 | +} | ||
2862 | + | ||
2863 | +/*--闪白屏--*/ | ||
2864 | +.g_img_box{ | ||
2865 | + background-position: center center; | ||
2866 | + background-repeat: no-repeat; | ||
2867 | + -webkit-background-size: cover; | ||
2868 | + -moz-background-size: cover; | ||
2869 | + background-size: cover; | ||
2870 | +} | ||
2871 | + | ||
2872 | + | ||
2873 | + | ||
2874 | +.arrow { | ||
2875 | + width: auto !important; | ||
2876 | + position: absolute; | ||
2877 | + right: 0; | ||
2878 | + top: 10rpx; | ||
2879 | +} | ||
2880 | + | ||
2881 | + | ||
2882 | + | ||
2883 | + | ||
2884 | + | ||
2885 | + | ||
2886 | + | ||
2887 | +/* 支付预售定金 */ | ||
2888 | +.price-container { | ||
2889 | + top: 50%; | ||
2890 | + padding-left: 40rpx; | ||
2891 | + transform: translateY(-50%); | ||
2892 | + color: white; | ||
2893 | + font-weight: bold; | ||
2894 | +} | ||
2895 | + | ||
2896 | +.rmb { | ||
2897 | + display: relative; | ||
2898 | +} | ||
2899 | + | ||
2900 | +.rmb::before { | ||
2901 | + content: '¥'; | ||
2902 | + font-size: 24rpx; | ||
2903 | +} | ||
2904 | + | ||
2905 | +.no-bold { | ||
2906 | + font-weight: normal; | ||
2907 | +} | ||
2908 | + | ||
2909 | +.bg-FF4732 { | ||
2910 | + background-color: #FF4732; | ||
2911 | +} | ||
2912 | + | ||
2913 | +.line { | ||
2914 | + position: relative; | ||
2915 | +} | ||
2916 | + | ||
2917 | +.line::before { | ||
2918 | + position: absolute; | ||
2919 | + left: 0; | ||
2920 | + top: 50%; | ||
2921 | + transform: translateY(-50%); | ||
2922 | + content: ''; | ||
2923 | + width: 2rpx; | ||
2924 | + height: 60%; | ||
2925 | + background-color: rgba(255,255,255,.4); | ||
2926 | +} | ||
2927 | + | ||
2928 | + | ||
2929 | +.logo-container { | ||
2930 | + -webkit-filter: brightness(80%); | ||
2931 | + filter: brightness(80%); | ||
2932 | +} | ||
2933 | + | ||
2934 | +.logo { | ||
2935 | + width: 132rpx; | ||
2936 | + height: 37rpx; | ||
2937 | + margin-right: 10rpx; | ||
2938 | +} | ||
2939 | + | ||
2940 | + | ||
2941 | +.swiper-container { | ||
2942 | + position: absolute; | ||
2943 | + top: 70rpx; | ||
2944 | + left: 0; | ||
2945 | + padding: 20rpx 10rpx; | ||
2946 | + width: 100%; | ||
2947 | + box-sizing: border-box; | ||
2948 | + z-index: 98; | ||
2949 | +} | ||
2950 | + | ||
2951 | +.swiper { | ||
2952 | + height: 60rpx; | ||
2953 | + color: white; | ||
2954 | + font-size: 26rpx; | ||
2955 | +} | ||
2956 | + | ||
2957 | +.swiper-item { | ||
2958 | + /* width: auto !important; | ||
2959 | + background-color: rgba(0,0,0,.4); | ||
2960 | + border-radius: 60rpx; */ | ||
2961 | + position: relative; | ||
2962 | +} | ||
2963 | + | ||
2964 | +.swiper-item .item { | ||
2965 | + position: absolute; | ||
2966 | +} | ||
2967 | + | ||
2968 | +.item { | ||
2969 | + /* position: absolute; */ | ||
2970 | + display: flex; | ||
2971 | + align-items: center; | ||
2972 | + justify-content: center; | ||
2973 | + border-radius: 60rpx; | ||
2974 | + background-color: rgba(0,0,0,.4); | ||
2975 | + /* position: absolute; */ | ||
2976 | +} | ||
2977 | + | ||
2978 | +.avatar-container { | ||
2979 | + width: 60rpx; | ||
2980 | + height: 60rpx; | ||
2981 | + border-radius: 50%; | ||
2982 | + overflow: hidden; | ||
2983 | + flex-shrink: 0; | ||
2984 | +} | ||
2985 | +.avatar-container image { | ||
2986 | + width: 100%; | ||
2987 | + height: 100%; | ||
2988 | +} | ||
2989 | + | ||
2990 | +.hideArea { | ||
2991 | + position: absolute; | ||
2992 | + left: -1000px; | ||
2993 | + top: -1000px; | ||
2994 | +} | ||
2995 | + | ||
2996 | +.searchbar { | ||
2997 | + height: 95rpx; | ||
2998 | + border-bottom: 2rpx solid rgb(238, 238, 238); | ||
2999 | +} | ||
3000 | +.storeListpadd { | ||
3001 | + padding: 0rpx 31rpx; | ||
3002 | +} | ||
3003 | +.search { | ||
3004 | + width: 125rpx; | ||
3005 | + height: 45rpx; | ||
3006 | + line-height: 45rpx; | ||
3007 | + background-color: rgb(219, 27, 52); | ||
3008 | + border-radius: 30rpx; | ||
3009 | + color: rgb(255, 255, 255); | ||
3010 | +} | ||
3011 | +.inputstore { | ||
3012 | + width: 510rpx; | ||
3013 | + height: 43rpx; | ||
3014 | + line-height: 43rpx; | ||
3015 | + border-radius: 30rpx; | ||
3016 | + border: 2rpx solid rgb(238, 238, 238); | ||
3017 | + padding-left: 30rpx; | ||
3018 | +} | ||
3019 | +.c-red22{ | ||
3020 | + color: #d60021 | ||
3021 | +} |
pages/index/index/index.wxml
@@ -218,7 +218,7 @@ | @@ -218,7 +218,7 @@ | ||
218 | <view class="seckill-list"> | 218 | <view class="seckill-list"> |
219 | <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange" next-margin="25rpx"> | 219 | <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange" next-margin="25rpx"> |
220 | <swiper-item wx:for="{{preGoods}}" wx:key="*this" class="p_swiper"> | 220 | <swiper-item wx:for="{{preGoods}}" wx:key="*this" class="p_swiper"> |
221 | - <navigator bindtap="go_pre" class="nav" hover-class="none" data-url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind"> | 221 | + <navigator bindtap="go_pre" class="nav" hover-class="none" data-url="{{aitem.goods_type == 0?'/packageC/pages/presell/goodsInfo/goodsInfo':'/packageC/pages/presell/cardInfo/goodsInfo'}}?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind"> |
222 | <!-- <view class="imgview presell"> --> | 222 | <!-- <view class="imgview presell"> --> |
223 | <view class="imgview"> | 223 | <view class="imgview"> |
224 | <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="preGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> | 224 | <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="preGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> |