Commit d9d09bf30f13ef7638eeb794d0b988e27ce065f9
1 parent
9d2f981e
拼团尾款的优化
Showing
4 changed files
with
1420 additions
and
0 deletions
packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
0 → 100644
1 | +// pages/cart/cart_wk/cart_wk.js | ||
2 | +var t = getApp(), | ||
3 | + oo = t.globalData.setting, | ||
4 | + os=oo; | ||
5 | +var ut=require("../../../../utils/util.js"); | ||
6 | +var util_pay=require("../../../../utils/pay.js"); | ||
7 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | ||
8 | + | ||
9 | +Page({ | ||
10 | + /** | ||
11 | + * 页面的初始数据 | ||
12 | + */ | ||
13 | + data: { | ||
14 | + imgUrl: t.globalData.setting.imghost, | ||
15 | + order_id: 0, //订单ID | ||
16 | + order: null, //订单所有字段 | ||
17 | + user_addr: null, //会员地址 | ||
18 | + pickup: null, //门店 | ||
19 | + goods: null, //商品 | ||
20 | + /*------------------------*/ | ||
21 | + userinfo: null, //获取会员 | ||
22 | + /*----------物流选择--------*/ | ||
23 | + wu_arr: null, | ||
24 | + index: 0, | ||
25 | + is_express: 0, | ||
26 | + //申请提现的金额 | ||
27 | + txmon: 0, | ||
28 | + yuer: 0, | ||
29 | + //判断页面是返回回来的还是 首次进入的 | ||
30 | + isclose: 1, | ||
31 | + | ||
32 | + //配送方式 0=用户自选 1=自提 2=物流 | ||
33 | + distr_type: 0, | ||
34 | + //实际配送方式 0物流 1自提 | ||
35 | + exp_type: 1, | ||
36 | + //------物流费用------ | ||
37 | + exp_price: 0, | ||
38 | + enterAddressPage: 0, //进入地址页面 | ||
39 | + is_no_by: {}, | ||
40 | + allpice: 0, | ||
41 | + show_pay_type: 0, | ||
42 | + | ||
43 | + teamgroup: null, | ||
44 | + submit:1, //默认按钮是灰色 | ||
45 | + show_submit:0, //不线上 | ||
46 | + | ||
47 | + dis_config: null, | ||
48 | + bn_use_commission: 0, //是不是使用佣金 | ||
49 | + | ||
50 | + bn_is_order_yh:1, //是不是订单优惠 | ||
51 | + bn_is_post_temp:1, //是不是进行计算包邮模板 | ||
52 | + | ||
53 | + paying:0, //支付中 | ||
54 | + same_ok:1 //同城配送的控制 | ||
55 | + | ||
56 | + }, | ||
57 | + | ||
58 | + /** | ||
59 | + * 生命周期函数--监听页面加载 | ||
60 | + */ | ||
61 | + onLoad: function (options) { | ||
62 | + | ||
63 | + //清空is_pick_up | ||
64 | + getApp().request.put("/api/weshop/useraddress/updatePickUp", { | ||
65 | + data: { user_id: getApp().globalData.user_id, is_pickup: 0 }, | ||
66 | + success: function (s) { | ||
67 | + } | ||
68 | + }); | ||
69 | + | ||
70 | + var th = this; | ||
71 | + this.data.order_id = options.order_id; | ||
72 | + //--初始化-- | ||
73 | + getApp().getConfig2(function (e) { | ||
74 | + var json_d = JSON.parse(e.switch_list); | ||
75 | + | ||
76 | + //测试强行写死,后面一定要删除 | ||
77 | + //json_d.pickupway=2; | ||
78 | + | ||
79 | + | ||
80 | + th.data.json_d = json_d; | ||
81 | + var is_default_logistics = json_d.is_default_logistics; | ||
82 | + var is_same_city = json_d.is_same_city; | ||
83 | + th.setData({ is_default_logistics: is_default_logistics,is_same_city:is_same_city }); | ||
84 | + | ||
85 | + th.get_wuliu(th.get_info(th.show_page)); | ||
86 | + }, 1) | ||
87 | + | ||
88 | + //判断是不是佣金抵扣 | ||
89 | + getApp().is_distribut(this); | ||
90 | + | ||
91 | + }, | ||
92 | + /** | ||
93 | + * 生命周期函数--监听页面显示 | ||
94 | + */ | ||
95 | + onShow: function () { | ||
96 | + | ||
97 | + ut.fy_back('',0); | ||
98 | + this.data.paying=0; | ||
99 | + util_pay.set_fir(); | ||
100 | + getApp().check_can_share(); | ||
101 | + var th = this; | ||
102 | + if (th.data.isclose == 0) { | ||
103 | + wx.navigateTo({ | ||
104 | + url: "/pages/index/index/index" | ||
105 | + }) | ||
106 | + } | ||
107 | + th.getuser_addr(function (addr) { | ||
108 | + if (addr == null || addr == undefined || addr.length == 0) { | ||
109 | + th.setData({ user_addr: null, enterAddressPage: 1,same_ok:1 }); | ||
110 | + } else { | ||
111 | + th.setData({ | ||
112 | + user_addr: addr, enterAddressPage: 0,same_ok:1 | ||
113 | + }); | ||
114 | + } | ||
115 | + }) | ||
116 | + | ||
117 | + //--更新默认地址--,看一下是不是跳到地址页面 | ||
118 | + if (!getApp().globalData.is_cart_old) { | ||
119 | + this.update_code(); | ||
120 | + } else { | ||
121 | + getApp().globalData.is_cart_old = 0; | ||
122 | + } | ||
123 | + | ||
124 | + }, | ||
125 | + /** | ||
126 | + * 用户点击右上角分享 | ||
127 | + */ | ||
128 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 }, | ||
129 | + //---------------获取物流--------------- | ||
130 | + get_wuliu(func) { | ||
131 | + var th = this, | ||
132 | + to = getApp(); | ||
133 | + to.getwuliu(function (e) { | ||
134 | + //如果第一个不是开启默认,说明要让用户自己选 | ||
135 | + if (!e[0].is_default) { | ||
136 | + th.setData({ is_default_logistics: 0 }); | ||
137 | + } | ||
138 | + | ||
139 | + th.setData({ wu_arr: e }) | ||
140 | + typeof func == "function" && func(); | ||
141 | + }) | ||
142 | + }, | ||
143 | + //------获取会员信息-----先获取用户信息,在进行下一步--- | ||
144 | + get_info: function (func) { | ||
145 | + var user_id = t.globalData.user_id, | ||
146 | + to = getApp(); | ||
147 | + to.auth.get_u(func); | ||
148 | + }, | ||
149 | + | ||
150 | + //------获取会员收货地址----- | ||
151 | + getuser_addr: function (func) { | ||
152 | + var to = getApp(), | ||
153 | + a = to.request; | ||
154 | + | ||
155 | + a.get("/api/weshop/useraddress/page", { | ||
156 | + data: { | ||
157 | + user_id: to.globalData.user_id, | ||
158 | + store_id: oo.stoid, | ||
159 | + pageSize: 600 | ||
160 | + }, | ||
161 | + success: function (su) { | ||
162 | + var user_addr = su.data.data.pageData; | ||
163 | + var item = null; | ||
164 | + var def_item = null; | ||
165 | + for (var i = 0; i < user_addr.length; i++) { | ||
166 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; } | ||
167 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | ||
168 | + } | ||
169 | + | ||
170 | + if (item == null) item = def_item; | ||
171 | + if (item == null) item = user_addr[0]; | ||
172 | + if (item == undefined) item = null; | ||
173 | + func(item); | ||
174 | + } | ||
175 | + }); | ||
176 | + | ||
177 | + }, | ||
178 | + | ||
179 | + //----------------展示页面,是再获取用户信息之后-------------- | ||
180 | + show_page: function () { | ||
181 | + var th = this, | ||
182 | + to = getApp(); | ||
183 | + th.setData({ | ||
184 | + userinfo: to.globalData.userInfo, | ||
185 | + }); | ||
186 | + //选获取地址 | ||
187 | + th.getuser_addr(function (addr) { | ||
188 | + | ||
189 | + if (addr == null || addr == undefined || addr.length == 0) { | ||
190 | + th.setData({ | ||
191 | + enterAddressPage: 1, | ||
192 | + }); | ||
193 | + | ||
194 | + } else { | ||
195 | + th.setData({ | ||
196 | + user_addr: addr, enterAddressPage: 0, | ||
197 | + }); | ||
198 | + } | ||
199 | + //获取立即购买的商品信息 | ||
200 | + th.get_buy_goods(th.data.order_id); | ||
201 | + }); | ||
202 | + //获取提现金额 | ||
203 | + getApp().request.get("/api/weshop/withdrawals/summoney", { | ||
204 | + data: { | ||
205 | + user_id: to.globalData.user_id, | ||
206 | + store_id: oo.stoid, | ||
207 | + status: 0 | ||
208 | + }, | ||
209 | + success: function (su) { | ||
210 | + console.log("withdrawals"); | ||
211 | + if (su.data.code == 0) { | ||
212 | + var yuer = parseFloat(th.data.userinfo.user_money - | ||
213 | + th.data.userinfo.frozen_money - su.data.data.summoney).toFixed(2); | ||
214 | + th.setData({ | ||
215 | + txmon: su.data.data.summoney, | ||
216 | + yuer: yuer | ||
217 | + }); | ||
218 | + } | ||
219 | + } | ||
220 | + }); | ||
221 | + }, | ||
222 | + | ||
223 | + //-----获取商品------ | ||
224 | + async get_buy_goods(ord) { | ||
225 | + var order = null, | ||
226 | + order_goods = null, | ||
227 | + goods = null, | ||
228 | + pickup = null, | ||
229 | + distr_type = 0, | ||
230 | + exp_type = 0, | ||
231 | + teamgroup = null, | ||
232 | + teamlist=null, | ||
233 | + th = this; | ||
234 | + | ||
235 | + //---获取订单--- | ||
236 | + await getApp().request.promiseGet("/api/weshop/recharge/list", { | ||
237 | + data:{store_id:oo.stoid,order_id: ord } | ||
238 | + }).then(res => { | ||
239 | + if(res.data.code==0 && res.data.data.length){ | ||
240 | + order = res.data.data[0]; | ||
241 | + }else{ | ||
242 | + wx.showToast({ | ||
243 | + title: "订单未找到", | ||
244 | + icon: 'none', | ||
245 | + duration: 2000 | ||
246 | + }) | ||
247 | + } | ||
248 | + }); | ||
249 | + | ||
250 | + if(!order) return false; | ||
251 | + | ||
252 | + //---获取订单从表--- | ||
253 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/page", { | ||
254 | + data: { | ||
255 | + store_id: oo.stoid, | ||
256 | + order_id: ord | ||
257 | + } | ||
258 | + }).then(res => { | ||
259 | + if(ut.ajax_ok(res)){ | ||
260 | + order_goods = res.data.data.pageData[0]; | ||
261 | + } | ||
262 | + }); | ||
263 | + | ||
264 | + order.pt_listno=order_goods.pt_listno; | ||
265 | + order.pt_status=order_goods.pt_status; | ||
266 | + order.pt_prom_id=order_goods.prom_id; | ||
267 | + order.pt_tail_money=order_goods.pt_tail_money; | ||
268 | + order.tail_pay_type=order_goods.tail_pay_type; | ||
269 | + order.pickup_id=order_goods.pickup_id; | ||
270 | + order.order_amount=order.account; | ||
271 | + order_goods.goods_num=order_goods.qty; | ||
272 | + | ||
273 | + //---获取商品--- | ||
274 | + await getApp().request.promiseGet("/api/weshop/serviceCard/get/" + oo.stoid + "/" + order_goods.card_id, {}).then(res => { | ||
275 | + goods = res.data.data; | ||
276 | + order.show_img = oo.imghost + goods.img_url; | ||
277 | + }); | ||
278 | + //---获取门店--- | ||
279 | + await getApp().request.promiseGet("/api/weshop/pickup/get/" + oo.stoid + "/" + order.pickup_id, {}).then(res => { | ||
280 | + pickup = res.data.data; | ||
281 | + }); | ||
282 | + | ||
283 | + //---获取尾款价格--- | ||
284 | + await getApp().request.promiseGet("/api/weshop/teamgroup/page", { | ||
285 | + data: { store_id: oo.stoid, team_id: order.pt_prom_id, listno: order.pt_listno } | ||
286 | + }).then(res => { | ||
287 | + teamgroup = res.data.data.pageData[0]; | ||
288 | + }); | ||
289 | + | ||
290 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + order.pt_prom_id, { | ||
291 | + data: { } | ||
292 | + }).then(res => { | ||
293 | + if(res.data.code==0) teamlist=res.data.data; | ||
294 | + }); | ||
295 | + | ||
296 | + | ||
297 | + var act_set=null; | ||
298 | + var url = '/api/weshop/activitylist/getActInfo1/'+os.stoid+'/6/'+order.pt_prom_id; | ||
299 | + await getApp().promiseGet(url, {}).then(res => { | ||
300 | + if(res.data.code==0){ | ||
301 | + act_set=res.data.data; | ||
302 | + } | ||
303 | + }) | ||
304 | + | ||
305 | + | ||
306 | + // if(act_set.is_order_yh){ | ||
307 | + // th.data.bn_is_order_yh=1; | ||
308 | + // }else{ | ||
309 | + // th.data.bn_is_order_yh=0; | ||
310 | + // } | ||
311 | + th.data.bn_is_order_yh=0; | ||
312 | + th.data.bn_is_post_temp=0; | ||
313 | + | ||
314 | + // if(act_set.is_post_temp){ | ||
315 | + // th.data.bn_is_post_temp=1; | ||
316 | + // }else{ | ||
317 | + // th.data.bn_is_post_temp=0; | ||
318 | + // } | ||
319 | + | ||
320 | + | ||
321 | + var jsarr = JSON.parse(teamgroup.jt_json); | ||
322 | + var count = teamgroup.jt_ct_num; | ||
323 | + if(teamgroup.is_xuni_ct) count=teamlist.ct_num; | ||
324 | + | ||
325 | + //要计算尾款的价钱 | ||
326 | + var price = 0; | ||
327 | + jsarr.forEach(function (value, index) { | ||
328 | + if (count >= value['rynum']) price = value['price']; | ||
329 | + }) | ||
330 | + var tail_money = (price * order_goods.goods_num - order['order_amount']).toFixed(2); | ||
331 | + | ||
332 | + tail_money = parseFloat(tail_money); | ||
333 | + order.tail_money = tail_money; | ||
334 | + | ||
335 | + if (!goods) return false; | ||
336 | + | ||
337 | + if(goods.is_minishop==1 && getApp().is_sp_hao()){ | ||
338 | + | ||
339 | + if(goods.distr_type==1 || pickup.distr_type==1) { | ||
340 | + wx.showToast({ | ||
341 | + title: "视频号仅支持物流", | ||
342 | + icon: 'none', | ||
343 | + duration: 2000 | ||
344 | + }) | ||
345 | + | ||
346 | + setTimeout(function(){ | ||
347 | + wx.navigateBack({delta: 1}) | ||
348 | + },1000) | ||
349 | + | ||
350 | + return false | ||
351 | + } | ||
352 | + | ||
353 | + goods.distr_type=2; | ||
354 | + th.setData({show_same_city:0}) | ||
355 | + | ||
356 | + } | ||
357 | + | ||
358 | + //--判断物流-- | ||
359 | + if (goods.distr_type) | ||
360 | + distr_type = goods.distr_type; | ||
361 | + else | ||
362 | + distr_type = pickup.distr_type; | ||
363 | + | ||
364 | + | ||
365 | + //-- 如果商品有同城配送的参数的时候,一件代发商品不能显示同城配送按钮 -- | ||
366 | + if(goods.is_same_city && th.data.is_same_city && goods.whsle_id<=0){ | ||
367 | + await getApp().request.promiseGet("/api/weshop/pickup/get/"+os.stoid+"/"+order.pickup_id, {}).then(res=>{ | ||
368 | + if(res.data.code==0){ | ||
369 | + var pk=res.data.data; | ||
370 | + if(pk && pk.is_same_city){ | ||
371 | + th.setData({show_same_city:1}) | ||
372 | + } | ||
373 | + } | ||
374 | + }) | ||
375 | + } | ||
376 | + | ||
377 | + exp_type = 1; | ||
378 | + order.order_goods = order_goods; | ||
379 | + | ||
380 | + //-- 计算获得佣金的金额 -- | ||
381 | + if (getApp().globalData.userInfo.is_distribut | ||
382 | + && th.data.dis_config && th.data.dis_config.is_yongjin_dk) { | ||
383 | + var fir_num = 0; | ||
384 | + var sec_num = 0; | ||
385 | + var thi_num = 0; | ||
386 | + if (th.data.dis_config.pattern == 1) { | ||
387 | + fir_num = (teamlist.fir_rate || 0) * order_goods.goods_num; | ||
388 | + sec_num = (teamlist.sec_rate || 0) * order_goods.goods_num; | ||
389 | + thi_num = (teamlist.thi_rate || 0) * order_goods.goods_num; | ||
390 | + } else { | ||
391 | + fir_num = parseFloat((teamlist.commission || 0) * order_goods.goods_num * (th.data.dis_config.firstRate || 0) / 100).toFixed(2); | ||
392 | + sec_num = parseFloat((teamlist.commission || 0) * order_goods.goods_num * (th.data.dis_config.secondRate || 0) / 100).toFixed(2); | ||
393 | + thi_num = parseFloat((teamlist.commission || 0) * order_goods.goods_num * (th.data.dis_config.thirdRate || 0) / 100).toFixed(2); | ||
394 | + } | ||
395 | + var c_num = getApp().get_commission(fir_num, sec_num, thi_num, th); | ||
396 | + goods.use_commission = parseFloat(c_num.toFixed(2)); | ||
397 | + | ||
398 | + } | ||
399 | + | ||
400 | + this.setData({ | ||
401 | + order: order, | ||
402 | + distr_type: distr_type, | ||
403 | + pickup: pickup, | ||
404 | + exp_type: exp_type, | ||
405 | + goods: goods, | ||
406 | + teamgroup: teamgroup, | ||
407 | + teamlist: teamlist, | ||
408 | + }); | ||
409 | + | ||
410 | + //--计算价格-- | ||
411 | + th.calculatePrice2(); | ||
412 | + }, | ||
413 | + | ||
414 | + | ||
415 | + calculatePrice2: async function () { | ||
416 | + wx.showLoading(); | ||
417 | + var th = this; | ||
418 | + th.setData({submit: 1}) | ||
419 | + | ||
420 | + var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.tail_money; | ||
421 | + var o_condition = allpice; | ||
422 | + var ord_prom=null; | ||
423 | + var order_prom_amount=0; | ||
424 | + | ||
425 | + if (th.data.bn_is_order_yh) { | ||
426 | + await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", { | ||
427 | + data: {store_id: os.stoid, orderAmount: o_condition, user_id: getApp().globalData.user_id} | ||
428 | + }).then(res => { | ||
429 | + if (res.data.code == 0) { | ||
430 | + ord_prom = res.data.data; | ||
431 | + } | ||
432 | + }) | ||
433 | + } | ||
434 | + | ||
435 | + th.data.ord_prom=ord_prom; | ||
436 | + | ||
437 | + //--计算物流-- | ||
438 | + if (th.data.exp_type == 0) { | ||
439 | + th.calculate_wuliu(); | ||
440 | + return false; | ||
441 | + }else if(th.data.exp_type == 2){ | ||
442 | + th.calculate_same_city(); | ||
443 | + return false; | ||
444 | + } else { | ||
445 | + | ||
446 | + var order_prom_id=0; | ||
447 | + if (ord_prom) { | ||
448 | + order_prom_id = ord_prom['id']; | ||
449 | + switch (ord_prom['type']) { | ||
450 | + case 0: | ||
451 | + allpice = Math.round(o_condition * ord_prom['expression']) / 100;//满额打折 | ||
452 | + order_prom_amount = (o_condition - order_m).toFixed(2); | ||
453 | + break; | ||
454 | + case 1: | ||
455 | + //-- 如果有优惠促销倍减的时候 -- | ||
456 | + var bs = 1; | ||
457 | + if (ord_prom.is_bz) { | ||
458 | + bs = Math.floor(o_condition / ord_prom.money); | ||
459 | + } | ||
460 | + allpice = o_condition - bs * ord_prom['expression'];//满额优惠金额 | ||
461 | + order_prom_amount = ord_prom['expression']; | ||
462 | + break; | ||
463 | + } | ||
464 | + } | ||
465 | + | ||
466 | + | ||
467 | + //--订单优惠的显示-- | ||
468 | + var order_prom_txt1 = "formData.order_prom_id"; | ||
469 | + var order_prom_txt2 = "formData.order_prom_amount"; | ||
470 | + if (order_prom_id > 0) { | ||
471 | + th.setData({[order_prom_txt1]: order_prom_id, [order_prom_txt2]: order_prom_amount}) | ||
472 | + } else { | ||
473 | + th.setData({[order_prom_txt1]: 0, [order_prom_txt2]: 0}) | ||
474 | + } | ||
475 | + | ||
476 | + if (th.data.bn_use_commission) { | ||
477 | + allpice -= th.data.goods.use_commission; | ||
478 | + } | ||
479 | + | ||
480 | + | ||
481 | + allpice = allpice.toFixed(2); | ||
482 | + | ||
483 | + th.setData({exp_price: 0, allpice: allpice, submit: 0, show_submit: 1}) | ||
484 | + wx.hideLoading(); | ||
485 | + } | ||
486 | + }, | ||
487 | + | ||
488 | + //--图片失败,默认图片-- | ||
489 | + bind_bnerr: function (e) { | ||
490 | + var _errImg = e.target.dataset.errorimg; | ||
491 | + var _errObj = {}; | ||
492 | + _errObj[_errImg] = this.data.imgUrl + "/miniapp/images/del/logo.jpg"; | ||
493 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
494 | + }, | ||
495 | + | ||
496 | + //-------------------获取物流--------------- | ||
497 | + get_wuliu(func) { | ||
498 | + var th = this, to = getApp(); | ||
499 | + to.getwuliu(function (e) { | ||
500 | + th.setData({ | ||
501 | + wu_arr: e | ||
502 | + }) | ||
503 | + typeof func == "function" && func(); | ||
504 | + }) | ||
505 | + }, | ||
506 | + | ||
507 | + //--------点击选择---------- | ||
508 | + set_wuliu: function (e) { | ||
509 | + var type = e.currentTarget.dataset.type, th = this; | ||
510 | + this.setData({ | ||
511 | + exp_type: type,same_ok:1 | ||
512 | + }); | ||
513 | + //--计算物流的值-- | ||
514 | + if (type == 0) { | ||
515 | + th.calculate_wuliu(); | ||
516 | + } else if(type==1){ | ||
517 | + var allpice = parseFloat(th.data.order.order_amount) | ||
518 | + + parseFloat(th.data.order.user_money) | ||
519 | + + parseFloat(th.data.order.tail_money); | ||
520 | + allpice = allpice.toFixed(2); | ||
521 | + this.setData({ | ||
522 | + allpice: allpice, exp_price: 0,show_submit:1,submit:0 | ||
523 | + }); | ||
524 | + }else{ | ||
525 | + th.calculate_same_city(); | ||
526 | + } | ||
527 | + }, | ||
528 | + | ||
529 | + //关闭支付 | ||
530 | + close_show_pay: function () { | ||
531 | + this.setData({ show_pay_type: 0 }); | ||
532 | + }, | ||
533 | + | ||
534 | + //--弹起支付框-- | ||
535 | + to_pay() { | ||
536 | + //如果有再计算价格的过程中,不能提交订单 | ||
537 | + if(this.data.submit){ return false} | ||
538 | + if(!this.data.same_ok){ return false} | ||
539 | + this.set_pay_type(1); | ||
540 | + }, | ||
541 | + | ||
542 | + //选择支付方式 | ||
543 | + set_pay_type: function (e) { | ||
544 | + | ||
545 | + if(this.data.paying) return false; | ||
546 | + this.data.paying=1; | ||
547 | + this.to_pay_type(1); | ||
548 | + }, | ||
549 | + | ||
550 | + //--立即支付-- | ||
551 | + to_pay_type: function (ind) { | ||
552 | + var th = this; | ||
553 | + | ||
554 | + | ||
555 | + th.data.exp_type=parseInt(th.data.exp_type+''); | ||
556 | + //---支付参数-- | ||
557 | + var dd = { | ||
558 | + order_sn: th.data.order.order_sn, | ||
559 | + order_id: th.data.order.order_id, | ||
560 | + store_id: oo.stoid, | ||
561 | + exp_type: th.data.exp_type, | ||
562 | + user_id: t.globalData.user_id, | ||
563 | + listno: th.data.order.pt_listno, | ||
564 | + prom_id: th.data.order.pt_prom_id, | ||
565 | + tail_pay_type: ind,//0微信支付 1余额支付 | ||
566 | + }; | ||
567 | + | ||
568 | + if(getApp().globalData.scene){ | ||
569 | + dd.scene=getApp().globalData.scene; | ||
570 | + } | ||
571 | + | ||
572 | + if(th.data.bn_use_commission){ | ||
573 | + dd.use_commission=th.data.goods.use_commission; | ||
574 | + } | ||
575 | + | ||
576 | + if(th.data.bn_use_commission){ | ||
577 | + dd.use_commission=th.data.goods.use_commission; | ||
578 | + } | ||
579 | + | ||
580 | + //--判断有没有优惠活动-- | ||
581 | + if (th.data.formData.order_prom_amount > 0) { | ||
582 | + var order_prom_list = {}; | ||
583 | + order_prom_list.order_prom_id = th.data.formData.order_prom_id; | ||
584 | + order_prom_list.order_prom_amount = th.data.formData.order_prom_amount; | ||
585 | + dd.order_prom_list = order_prom_list; | ||
586 | + } | ||
587 | + | ||
588 | + var arr = []; | ||
589 | + arr.push(dd); | ||
590 | + console.log(JSON.stringify(arr)); | ||
591 | + | ||
592 | + wx.request({ | ||
593 | + url: oo.url + '/api/weshop/order/pay/payTuanWk', | ||
594 | + data: JSON.stringify(arr), | ||
595 | + method: 'POST', | ||
596 | + header: { | ||
597 | + 'content-type': 'application/json' | ||
598 | + },// 设置请求的 header | ||
599 | + success: function (t) { | ||
600 | + | ||
601 | + //---用微信支付--- | ||
602 | + if (dd.tail_pay_type == 0) { | ||
603 | + | ||
604 | + if (t.data.code != 0) { | ||
605 | + getApp().my_warnning(t.data.msg, 1, th); | ||
606 | + th.data.paying=0; | ||
607 | + return false; | ||
608 | + } | ||
609 | + | ||
610 | + util_pay.pay_data(t,function (){ | ||
611 | + var allmoney = th.data.allpice; | ||
612 | + th.jumpPaymentPage(th.data.order.order_sn, allmoney); | ||
613 | + },function (){ | ||
614 | + th.data.paying=0; | ||
615 | + //getApp().my_warnning("支付失败", 0, th); | ||
616 | + }) | ||
617 | + | ||
618 | + } else { | ||
619 | + if (t.data.code == 0) { | ||
620 | + //---用余额支付--- | ||
621 | + // getApp().my_warnning("支付成功", 1, th); | ||
622 | + wx.showToast({ | ||
623 | + title: '支付成功', | ||
624 | + icon: 'success', | ||
625 | + duration: 2000 | ||
626 | + }); | ||
627 | + setTimeout(function () { | ||
628 | + th.setData({ isclose: 0 }); | ||
629 | + th.data.paying=0; | ||
630 | + wx.redirectTo({ | ||
631 | + url: "/pages/user/order_list/order_list?index=1" | ||
632 | + }) | ||
633 | + }, 1000) | ||
634 | + } else { | ||
635 | + | ||
636 | + th.data.paying=0; | ||
637 | + getApp().my_warnning(t.data.msg, 1, th); | ||
638 | + } | ||
639 | + } | ||
640 | + } | ||
641 | + }); | ||
642 | + }, | ||
643 | + | ||
644 | + //检查区域是不是包邮 | ||
645 | + check_area: function (arr) { | ||
646 | + var user_addr = this.data.user_addr; | ||
647 | + if (!user_addr) return 0; | ||
648 | + for (var i in arr) { | ||
649 | + var item = arr[i]; | ||
650 | + if (user_addr.twon == item || user_addr.district == item | ||
651 | + || user_addr.city == item || user_addr.province == item) { | ||
652 | + return 0; | ||
653 | + } | ||
654 | + } | ||
655 | + return 1; | ||
656 | + }, | ||
657 | + | ||
658 | + //检查立即购买的商品是不是不包邮 | ||
659 | + check_good: function (arr, goods_id) { | ||
660 | + if (!goods_id) goods_id = this.data.goods.goods_id; | ||
661 | + for (var i in arr) { | ||
662 | + var item = arr[i]; | ||
663 | + if (goods_id == item) return 0; | ||
664 | + } | ||
665 | + return 1; | ||
666 | + }, | ||
667 | + check_by_area: function (region_list) { | ||
668 | + var arr = region_list.split(","); | ||
669 | + var check = this.check_area(arr); | ||
670 | + return !check; | ||
671 | + }, | ||
672 | + check_by_goods: function (goods_list, goods_id) { | ||
673 | + var arr = goods_list.split(","); | ||
674 | + var check = this.check_good(arr, goods_id); | ||
675 | + return !check; | ||
676 | + }, | ||
677 | + | ||
678 | + //------------循环获取config----------- | ||
679 | + get_wuliu_config: function (region_id, code, rs) { | ||
680 | + var item = null, rslist = rs.pageData; | ||
681 | + for (var i = 0; i < rslist.length; i++) { | ||
682 | + if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i]; } | ||
683 | + } | ||
684 | + return item; | ||
685 | + }, | ||
686 | + //-------循环获取config,code default------- | ||
687 | + get_wuliu_default: function (code, rs) { | ||
688 | + var item = null, rslist = rs.pageData; | ||
689 | + for (var i = 0; i < rslist.length; i++) { | ||
690 | + if (rslist[i].shipping_code == code && rslist[i].is_default == 1) { item = rslist[i]; } | ||
691 | + } | ||
692 | + return item; | ||
693 | + }, | ||
694 | + | ||
695 | + | ||
696 | + //------支付成功页面-------- | ||
697 | + jumpPaymentPage: function (order_sn, order_amount) { | ||
698 | + wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({ | ||
699 | + url: "/pages/payment/pay_success/pay_success?order_sn=" + order_sn + "&type=1", | ||
700 | + }); | ||
701 | + }, | ||
702 | + | ||
703 | + //------调起支付框-------- | ||
704 | + weixinPay: function (n, success, fail) { | ||
705 | + if (!n) return false; | ||
706 | + var th = this; | ||
707 | + | ||
708 | + getApp().globalData.no_clear=1; | ||
709 | + | ||
710 | + wx.requestPayment({ | ||
711 | + timeStamp: String(n.timeStamp), | ||
712 | + nonceStr: n.nonceStr, | ||
713 | + package: n.packageValue, | ||
714 | + signType: n.signType, | ||
715 | + paySign: n.paySign, | ||
716 | + success: function (n) { | ||
717 | + // console.log(n), getApp().showSuccess("支付成功!"); | ||
718 | + wx.showToast({ | ||
719 | + title: '支付成功', | ||
720 | + icon: 'success', | ||
721 | + duration: 2000 | ||
722 | + }); | ||
723 | + "function" == typeof success && success(); | ||
724 | + }, | ||
725 | + fail: function (n) { | ||
726 | + console.log(n), "requestPayment:fail" == n.errMsg ? getApp().my_warnning("支付失败", 0, th) : "requestPayment:fail cancel" == n.errMsg ? getApp().my_warnning("您已取消支付", 0, th) : getApp().my_warnning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length), 0, th), | ||
727 | + "function" == typeof fail && fail(); | ||
728 | + } | ||
729 | + }); | ||
730 | + }, | ||
731 | + | ||
732 | + | ||
733 | + //使用 | ||
734 | + set_bn_commission:function(){ | ||
735 | + var th = this; | ||
736 | + th.setData({bn_use_commission: !th.data.bn_use_commission}); | ||
737 | + th.calculatePrice2(); | ||
738 | + } | ||
739 | + | ||
740 | +}) | ||
0 | \ No newline at end of file | 741 | \ No newline at end of file |
packageA/pages/serviceCard_pd/cart_wk/cart_wk.json
0 → 100644
packageA/pages/serviceCard_pd/cart_wk/cart_wk.wxml
0 → 100644
1 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | ||
2 | + | ||
3 | +<!--头部门店显示--> | ||
4 | +<view class='top bdr_t-14 flex'> | ||
5 | + <image class="t_img" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image> | ||
6 | + <view class='t_wz'>{{pickup.pickup_name}}</view> | ||
7 | +</view> | ||
8 | + | ||
9 | +<!--商品图片显示--> | ||
10 | +<view class='center'> | ||
11 | + <view class='cen_img'> | ||
12 | + <image src="{{order.show_img}}" binderror="bind_bnerr" data-errorimg="order.show_img"></image> | ||
13 | + </view> | ||
14 | + | ||
15 | + <view class="details-container"> | ||
16 | + <view class='cen_name ellipsis-3'>{{order.order_goods.service_name}}</view> | ||
17 | + <view class="flex jc_sb"> | ||
18 | + <view class='cen_jg'>¥{{order.order_goods.price}}</view> | ||
19 | + <view class='cen_sl'>x{{order.order_goods.qty}}</view> | ||
20 | + </view> | ||
21 | + </view> | ||
22 | + | ||
23 | +</view> | ||
24 | + | ||
25 | +<view class="use-item bdr_b-14 jc_sb" wx:if='{{exp_type==0 && !is_default_logistics}}'> | ||
26 | + <view>选择物流:</view> | ||
27 | + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;"> | ||
28 | + <view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view> | ||
29 | + </view> | ||
30 | +</view> | ||
31 | + | ||
32 | +<!--成团人数--> | ||
33 | +<view class='chentuan bdr14'> | ||
34 | + <view class='ct_one jc_sb'> | ||
35 | + <view class='ct_one_left'>成团人数</view> | ||
36 | + <view class='ct_one_right'> | ||
37 | + <text wx:if="{{teamgroup.is_xuni_ct}}" class='redwz'>{{teamgroup.jt_ct_num}}</text> | ||
38 | + <text wx:else class='redwz'>{{teamgroup.jt_ct_num}}</text> | ||
39 | + 人 | ||
40 | + </view> | ||
41 | + </view> | ||
42 | + <view class='ct_one jc_sb'> | ||
43 | + <view class='ct_one_left'>成团金额</view> | ||
44 | + <view class='ct_one_right'><text class='redwz'>¥{{filters.toFix(order.account+order.tail_money,2)}}</text></view> | ||
45 | + </view> | ||
46 | + | ||
47 | + <view class='ct_one jc_sb'> | ||
48 | + <view class='ct_one_left'>支付定金</view> | ||
49 | + <view class='ct_one_right'><text class='redwz'>¥{{filters.toFix(order.account,2)}}</text> | ||
50 | + </view> | ||
51 | + </view> | ||
52 | +</view> | ||
53 | + | ||
54 | +<!--尾款--> | ||
55 | +<view class='chentuan bdr14'> | ||
56 | + <view class='ct_one jc_sb'> | ||
57 | + <view class='ct_one_left'>尾款金额</view> | ||
58 | + <view class='ct_one_right'> | ||
59 | + <text class='redwz'>¥{{order.tail_money}}</text> | ||
60 | + </view> | ||
61 | + </view> | ||
62 | + <view class='ct_one jc_sb' wx:if="{{exp_price>0}}"> | ||
63 | + <view class='ct_one_left'>配送费用</view> | ||
64 | + <view class='ct_one_right'> | ||
65 | + <text class='redwz'>¥{{exp_price}}</text> | ||
66 | + </view> | ||
67 | + </view> | ||
68 | + <!-- 订单优惠优惠金额 --> | ||
69 | + <view class="ct_one jc_sb" wx:if="{{formData.order_prom_amount>0}}"> | ||
70 | + <view>订单优惠</view> | ||
71 | + <view class="co-red">- ¥ {{filters.toFix(formData.order_prom_amount, 2)}}</view> | ||
72 | + </view> | ||
73 | +</view> | ||
74 | + | ||
75 | + | ||
76 | +<!-----使用佣金抵扣,只有佣金小于尾款金额的时候------> | ||
77 | +<view class="set-mes mgt20" wx:if="{{goods.use_commission>0 && can_commission && goods.use_commission<order.tail_money+exp_price}}"> | ||
78 | + <view class="use-item" bindtap='set_bn_commission'> | ||
79 | + <icon color="{{bn_use_commission?'red':'gray'}}" size="16" type="success"></icon> | ||
80 | + <view class="yu_er">使用佣金 :¥{{goods.use_commission}} </view> | ||
81 | + </view> | ||
82 | +</view> | ||
83 | + | ||
84 | +<view style="height:100rpx"></view> | ||
85 | + | ||
86 | + | ||
87 | +<!--支付--> | ||
88 | +<view class='zf shadow'> | ||
89 | + <!-- <view class='zf_left'> | ||
90 | + <text class='zf_left_wz'>支付合计:</text> | ||
91 | + <text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text> | ||
92 | + </view> --> | ||
93 | + <view class='zf_left'>支付合计:<text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price-(bn_use_commission?goods.use_commission:0)-formData.order_prom_amount ,2)}}</text></view> | ||
94 | + <view class="zf_btn {{(submit || !same_ok)?'gray':''}}" bindtap="to_pay">支付尾款</view> | ||
95 | +</view> | ||
96 | + | ||
97 | + | ||
98 | +<!--支付的方式选择,0微信支付 1余额支付--> | ||
99 | +<block wx:if="{{show_pay_type}}"> | ||
100 | + <view class="cover-layer" bindtap="close_show_pay"></view> | ||
101 | + <view class="pay_type_view"> | ||
102 | + <view class="title">请选择支付方式</view> | ||
103 | + <view class="anniu_view"> | ||
104 | + <view bindtap="set_pay_type" data-type="0" >微信支付</view> | ||
105 | + <view bindtap="set_pay_type" data-type="1" >余额支付</view> | ||
106 | + </view> | ||
107 | + </view> | ||
108 | +</block> | ||
109 | + | ||
110 | +<warn id="warn"></warn> | ||
111 | + | ||
112 | +<!----弹起选择物流名的列表----> | ||
113 | +<view wx:if='{{open_express==1}}' > | ||
114 | + <view class="cover-layer flex-center " bindtap='close_express'> | ||
115 | + </view> | ||
116 | + | ||
117 | + <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" > | ||
118 | + <view class="tops flex"> | ||
119 | + <view class="top-content fs32"> | ||
120 | + <view> | ||
121 | + 选择物流名字 | ||
122 | + </view> | ||
123 | + </view> | ||
124 | + <view class="close-frame" bindtap='close_express' > | ||
125 | + <view class="xc-close-express">×</view> | ||
126 | + </view> | ||
127 | + </view> | ||
128 | + <view class="express_list"> | ||
129 | + <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> | ||
130 | + <view class="express_list_frame" bindtap="click_express_name" | ||
131 | + data-shippingcode="{{express_list.shipping_code}}" | ||
132 | + data-name="{{express_list.name}}" data-idxe="{{idx}}"> | ||
133 | + | ||
134 | + <block wx:if="{{is_express==idx}}"> | ||
135 | + <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view> | ||
136 | + </block> | ||
137 | + <block wx:else> | ||
138 | + <view class="circle xc-hooks"></view> | ||
139 | + </block> | ||
140 | + <view class="fs30">{{express_list.name}}</view> | ||
141 | + | ||
142 | + </view> | ||
143 | + </view> | ||
144 | + </view> | ||
145 | + <view class="flex click-buttem" > | ||
146 | + <view class="xc-determine flex-center" bindtap="determine_expres"> | ||
147 | + <view class="flex-vertical t-c">确定</view> | ||
148 | + </view> | ||
149 | + <view class="xc-confirms flex-center" bindtap="select_default_logistics"> | ||
150 | + <view class="flex-vertical t-c">设为默认</view> | ||
151 | + </view> | ||
152 | + </view> | ||
153 | + | ||
154 | + </view > | ||
155 | +</view> | ||
156 | +<view style="height: 50rpx"></view> | ||
157 | + |
packageA/pages/serviceCard_pd/cart_wk/cart_wk.wxss
0 → 100644
1 | +page{ color: #333;} | ||
2 | +.bdr_t-14 { | ||
3 | + border-top-left-radius: 14rpx; | ||
4 | + border-top-right-radius: 14rpx; | ||
5 | +} | ||
6 | +.bdr_b-14 { | ||
7 | + border-bottom-left-radius: 14rpx; | ||
8 | + border-bottom-right-radius: 14rpx; | ||
9 | +} | ||
10 | +.bdr14 { | ||
11 | + border-radius: 14rpx; | ||
12 | +} | ||
13 | +.mgt20 { | ||
14 | + margin-top: 20rpx; | ||
15 | +} | ||
16 | +.shadow { | ||
17 | + box-shadow: 0 4rpx 12px #e7e9eb; | ||
18 | +} | ||
19 | +.shadow-1 { | ||
20 | + box-shadow: 16rpx 0px 12px #e7e9eb; | ||
21 | +} | ||
22 | + | ||
23 | +page { | ||
24 | + background-color: #F0F0F0; | ||
25 | + padding: 0 22rpx; | ||
26 | + box-sizing: border-box; | ||
27 | +} | ||
28 | + | ||
29 | +.user-mes { | ||
30 | + position: relative; | ||
31 | + background-color: #fff; | ||
32 | + font-size: 32rpx; | ||
33 | + color: #444; | ||
34 | + /* margin-top: 28rpx; */ | ||
35 | + border-radius: 14rpx; | ||
36 | +} | ||
37 | +.user-contact { | ||
38 | + padding: 24rpx 26rpx; | ||
39 | + font-weight: 600; | ||
40 | +} | ||
41 | + | ||
42 | +.location { | ||
43 | + position: relative; | ||
44 | + padding: 0 70rpx 24rpx; | ||
45 | +} | ||
46 | + | ||
47 | +.pos-icon { | ||
48 | + position: absolute; | ||
49 | + left: 28rpx; | ||
50 | + top: 6rpx; | ||
51 | + width: 30rpx; | ||
52 | + height: 36rpx; | ||
53 | +} | ||
54 | + | ||
55 | +.border-img { | ||
56 | + width: 100%; | ||
57 | + height: 16rpx; | ||
58 | +} | ||
59 | + | ||
60 | +.update-logistics { | ||
61 | + position: absolute; | ||
62 | + right: 0; | ||
63 | + top: 0; | ||
64 | + width: 80rpx; | ||
65 | + height: 100%; | ||
66 | + display: flex; | ||
67 | + align-items: center; | ||
68 | + justify-content: center; | ||
69 | +} | ||
70 | + | ||
71 | +.arrow-rigth { | ||
72 | + width: 32rpx; | ||
73 | + height: 32rpx; | ||
74 | +} | ||
75 | + | ||
76 | +.order-meg { | ||
77 | + margin-bottom: 20rpx; | ||
78 | + font-size: 28rpx; | ||
79 | + | ||
80 | +} | ||
81 | + | ||
82 | +.order-detail { | ||
83 | + padding: 30rpx 0; | ||
84 | + border-bottom: 1px solid #ddd; | ||
85 | + color: #777; | ||
86 | + min-height: 100rpx; | ||
87 | + background-color: #fff; | ||
88 | + | ||
89 | +} | ||
90 | + | ||
91 | +.top { | ||
92 | + background-color: white; | ||
93 | + height: 40px; | ||
94 | + display: flex; | ||
95 | + padding: 0 26rpx; | ||
96 | + /* border-bottom: 2rpx solid rgb(238, 238, 238); */ | ||
97 | + margin-top: 20rpx; | ||
98 | + align-items: center; | ||
99 | +} | ||
100 | + | ||
101 | +.t_img { | ||
102 | + display: block; | ||
103 | + width: 50rpx; | ||
104 | + height: 50rpx; | ||
105 | + margin-left:-6rpx; | ||
106 | +} | ||
107 | + | ||
108 | +.t_wz { | ||
109 | + font-size: 30rpx; | ||
110 | + /* font-weight: bold; */ | ||
111 | + color: rgb(0, 0, 0); | ||
112 | + line-height: 65rpx; | ||
113 | + /* margin-left: 18rpx; */ | ||
114 | +} | ||
115 | + | ||
116 | +.center { | ||
117 | + box-sizing: border-box; | ||
118 | + background-color: white; | ||
119 | + width: 100%; | ||
120 | + min-height: 80rpx; | ||
121 | + display: flex; | ||
122 | + padding: 24rpx 26rpx; | ||
123 | + border-bottom: 2rpx solid #eee; | ||
124 | +} | ||
125 | + | ||
126 | +.center .cen_img { | ||
127 | + width: 200rpx; | ||
128 | + height: 200rpx; | ||
129 | + border-radius: 14rpx; | ||
130 | + overflow: hidden; | ||
131 | + flex-shrink: 0; | ||
132 | +} | ||
133 | + | ||
134 | +.center .cen_img image { | ||
135 | + display: block; | ||
136 | + width: 100%; | ||
137 | + height: 100%; | ||
138 | +} | ||
139 | + | ||
140 | +.details-container { | ||
141 | + display: flex; | ||
142 | + padding-left:20rpx; | ||
143 | + flex:1; | ||
144 | + flex-direction: column; | ||
145 | + justify-content: space-between; | ||
146 | +} | ||
147 | + | ||
148 | +.center .cen_name { | ||
149 | + height: 120rpx; | ||
150 | + font-size: 30rpx; | ||
151 | +} | ||
152 | + | ||
153 | +.center .cen_jg { | ||
154 | + color: #c4182e; | ||
155 | + font-size: 32rpx; | ||
156 | + width: 200rpx; | ||
157 | + height: 40rpx; | ||
158 | +} | ||
159 | + | ||
160 | +.center .cen_jg .cen_sl { | ||
161 | + color: black; | ||
162 | + font-size: 26rpx; | ||
163 | + width: 200rpx; | ||
164 | + height: 38rpx; | ||
165 | +} | ||
166 | + | ||
167 | +.quhou { | ||
168 | + box-sizing: border-box; | ||
169 | + background-color: white; | ||
170 | + border-bottom: 2rpx solid #eee; | ||
171 | + font-size: 28rpx; | ||
172 | + height: 92rpx; | ||
173 | + display: flex; | ||
174 | + align-items: center; | ||
175 | + padding: 0 26rpx; | ||
176 | +} | ||
177 | + | ||
178 | +.quhou .qu_fs { | ||
179 | + font-size: 30rpx; | ||
180 | + display: flex; | ||
181 | + height: 60rpx; | ||
182 | + /* margin-left: 25rpx; */ | ||
183 | + line-height: 62rpx; | ||
184 | + margin-right: 20rpx; | ||
185 | +} | ||
186 | + | ||
187 | +.quhou .qu_fs image { | ||
188 | + width: 34rpx; | ||
189 | + height: 34rpx; | ||
190 | + margin-right: 18rpx; | ||
191 | + vertical-align: center; | ||
192 | + position: relative; | ||
193 | + top:14rpx | ||
194 | +} | ||
195 | + | ||
196 | +.quhou .qu_fs .qu_wz {} | ||
197 | + | ||
198 | +.chentuan { | ||
199 | + box-sizing: border-box; | ||
200 | + width: 100%; | ||
201 | + min-height: 90rpx; | ||
202 | + background-color: white; | ||
203 | + padding: 20rpx 26rpx; | ||
204 | + margin-top: 20rpx; | ||
205 | + font-size: 28rpx; | ||
206 | +} | ||
207 | + | ||
208 | +.chentuan .ct_one { | ||
209 | + /* height: 40rpx; */ | ||
210 | + /* margin-bottom: 10rpx; */ | ||
211 | + display: flex; | ||
212 | + line-height: 60rpx; | ||
213 | + font-size: 30rpx; | ||
214 | + /* width: 708rpx; */ | ||
215 | +} | ||
216 | + | ||
217 | +.chentuan .ct_one .ct_one_left { | ||
218 | + /* margin-left: 10rpx; */ | ||
219 | +} | ||
220 | + | ||
221 | +.chentuan .ct_one .ct_one_right { | ||
222 | + text-align: right; | ||
223 | + width: 200rpx; | ||
224 | +} | ||
225 | + | ||
226 | +.redwz { | ||
227 | + color: #c4182e; | ||
228 | +} | ||
229 | + | ||
230 | +.zf { | ||
231 | + /* background-color: white; | ||
232 | + width: 100%; | ||
233 | + min-height: 80rpx; | ||
234 | + line-height: 80rpx; | ||
235 | + font-size: 30rpx; | ||
236 | + position: fixed; | ||
237 | + bottom: 0; | ||
238 | + text-align: right; */ | ||
239 | + | ||
240 | + height: 94rpx; | ||
241 | + box-sizing: border-box; | ||
242 | + display: flex; | ||
243 | + justify-content: space-between; | ||
244 | + background-color: white; | ||
245 | + align-items: center; | ||
246 | + position: fixed; | ||
247 | + bottom: 0; | ||
248 | + left: 0; | ||
249 | + width: 100%; | ||
250 | + padding: 0 30rpx; | ||
251 | +} | ||
252 | + | ||
253 | +.zf view{ | ||
254 | + display: inline-block; | ||
255 | +} | ||
256 | + | ||
257 | +.zf .zf_left { | ||
258 | + text-align: right; | ||
259 | + margin-right: 20rpx; | ||
260 | +} | ||
261 | + | ||
262 | +.zf_btn { | ||
263 | + /* color: white; | ||
264 | + background-color: #c4182e; | ||
265 | + font-size: 28rpx; | ||
266 | + width: 170rpx; | ||
267 | + text-align: center; | ||
268 | + line-height: 80rpx; */ | ||
269 | + /* float: right; | ||
270 | + width: 200rpx; | ||
271 | + height: 100rpx; | ||
272 | + line-height: 100rpx; | ||
273 | + text-align: center; | ||
274 | + font-size: 30rpx; | ||
275 | + color: #fff; | ||
276 | + background-color: #f23030; */ | ||
277 | + color: white; | ||
278 | + background-color: #FE4445; | ||
279 | + height: 72rpx; | ||
280 | + line-height: 72rpx; | ||
281 | + padding: 0 42rpx; | ||
282 | + border-radius: 36rpx; | ||
283 | + margin-left: 0; | ||
284 | + margin-right: 0; | ||
285 | +} | ||
286 | + | ||
287 | +.zf .zf_left .zf_left_red { | ||
288 | + color: #c4182e; | ||
289 | +} | ||
290 | + | ||
291 | +.zf_btn.gray{ | ||
292 | + background-color:darkgrey; | ||
293 | +} | ||
294 | + | ||
295 | + /*----------nyf新增,地址---------*/ | ||
296 | +.add_new{ | ||
297 | + box-sizing: border-box; | ||
298 | + height: 92rpx; | ||
299 | + padding: 0 26rpx; | ||
300 | + display: flex; | ||
301 | + align-items: center; | ||
302 | + /* line-height: 60rpx; */ | ||
303 | +} | ||
304 | +.addr_jia{ | ||
305 | + width: 45rpx; | ||
306 | + height: 45rpx; | ||
307 | + border: 1rpx solid #ddd; | ||
308 | + margin-right: 15rpx; | ||
309 | + /* margin-left: 20rpx; */ | ||
310 | + vertical-align: middle; | ||
311 | +} | ||
312 | +.yu_er{margin-left: 15rpx;} .wuliu{margin-left: 20rpx;} | ||
313 | + | ||
314 | + | ||
315 | +.use-item{ | ||
316 | + display: flex; | ||
317 | + align-items: center; | ||
318 | + height: 92rpx; | ||
319 | + /* border-bottom: 1px solid #ddd; */ | ||
320 | + font-size: 30rpx; | ||
321 | + padding:0 26rpx; | ||
322 | + background: #fff; | ||
323 | +} | ||
324 | +.use-item>view{ | ||
325 | + display: flex;margin-right: 20rpx; | ||
326 | +} | ||
327 | +.use-item.bfff{ background-color: #fff;} | ||
328 | +.use-item .dp{width: 56rpx; height: 56rpx;} | ||
329 | + | ||
330 | +.pay_type_view{width: 500rpx;height: 220rpx; position: fixed; background: #fff;z-index: 12; | ||
331 | + left: 50%; margin-left: -250rpx; top: 50%; margin-top: -110rpx; text-align: center; border-radius: 12rpx;} | ||
332 | + .pay_type_view .title{ height:100rpx; line-height: 100rpx; border-bottom: 1rpx solid #ededed;} | ||
333 | +.anniu_view{display: flex;height: 120rpx; line-height: 120rpx;} | ||
334 | +.anniu_view>view{width: 50%; border-right:1rpx solid #ededed;} | ||
335 | + | ||
336 | + | ||
337 | +.tab-container { | ||
338 | + font-size: 28rpx; | ||
339 | + margin-top: 20rpx; | ||
340 | + display: flex; | ||
341 | +} | ||
342 | + | ||
343 | +.tab-wrapper { | ||
344 | + background-color: #ccc; | ||
345 | + display: flex; | ||
346 | + border-radius: 40rpx; | ||
347 | + overflow: hidden; | ||
348 | +} | ||
349 | + | ||
350 | +.tab { | ||
351 | + padding: 20rpx 30rpx; | ||
352 | + | ||
353 | +} | ||
354 | + | ||
355 | + | ||
356 | +.tab.active { | ||
357 | + background-color: white; | ||
358 | + border-radius: 40rpx; | ||
359 | +} | ||
360 | + | ||
361 | +.xc-right{ | ||
362 | + width:20rpx; | ||
363 | + height:20rpx; | ||
364 | + border-top:2rpx solid #666; | ||
365 | + border-right:2rpx solid #666; | ||
366 | + transform:rotate(45deg); | ||
367 | + display:inline-block; | ||
368 | +} | ||
369 | + | ||
370 | + | ||
371 | +/* 自定义弹出窗口 */ | ||
372 | +.cx-popup{ | ||
373 | + width:100%; | ||
374 | + height:880rpx; | ||
375 | + background: #fff; | ||
376 | + z-index: 35; | ||
377 | + border-top-left-radius: 20rpx; | ||
378 | + border-top-right-radius: 20rpx; | ||
379 | + position:fixed; | ||
380 | + bottom:0; | ||
381 | + left: 0; | ||
382 | + /* padding-bottom: 25rpx; */ | ||
383 | +} | ||
384 | + | ||
385 | +.cx-popup .top{ | ||
386 | + width:95%; | ||
387 | + height:100rpx; | ||
388 | + border-bottom:3rpx solid #ddd; | ||
389 | + margin: auto; | ||
390 | + margin-top: 30rpx; | ||
391 | + | ||
392 | +} | ||
393 | +.xc-top-content{ | ||
394 | + width: 93%; | ||
395 | + height:85rpx; | ||
396 | + padding-top: 30rpx; | ||
397 | + font-size: 34rpx; | ||
398 | + font-weight: 600; | ||
399 | + | ||
400 | +} | ||
401 | + | ||
402 | +.xc-close{ | ||
403 | + width: 37rpx; | ||
404 | +height: 37rpx; | ||
405 | +border-radius: 50%; | ||
406 | +border: 3rpx solid #333; | ||
407 | +text-align: center; | ||
408 | +line-height: 34rpx; | ||
409 | +font-size: 29rpx; | ||
410 | +color: #333; | ||
411 | + | ||
412 | +} | ||
413 | + | ||
414 | +.xc-confirm { | ||
415 | + width: 50%; | ||
416 | + border-radius: 50rpx; | ||
417 | + height: 80rpx; | ||
418 | + margin:0 auto; | ||
419 | + background:#d60021; | ||
420 | + color:#fff; | ||
421 | + font-size:28rpx; | ||
422 | + margin-top: 28rpx; | ||
423 | +} | ||
424 | + | ||
425 | +.up{ animation: up .7s; } | ||
426 | +.down{ animation: down 1s; } | ||
427 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | ||
428 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | ||
429 | + | ||
430 | + | ||
431 | +.xc-close-express{ | ||
432 | + width: 40rpx; | ||
433 | +height: 40rpx; | ||
434 | +border-radius: 50%; | ||
435 | +border: 3rpx solid #333; | ||
436 | +text-align: center; | ||
437 | +font-size:32rpx; | ||
438 | +line-height: 38rpx; | ||
439 | +color: #333; | ||
440 | +margin-top: 5rpx; | ||
441 | +} | ||
442 | +.cx-popup .tops{ | ||
443 | + width: 100%; | ||
444 | +height: 145rpx; | ||
445 | +border-bottom: 3rpx solid #eee; | ||
446 | + | ||
447 | +} | ||
448 | +.top-content { | ||
449 | + width: 82%; | ||
450 | +padding-top: 33px; | ||
451 | +height: 100%; | ||
452 | +padding-left: 40rpx; | ||
453 | +} | ||
454 | +.close-frame{ | ||
455 | + margin-top: 30rpx; | ||
456 | + | ||
457 | +} | ||
458 | + | ||
459 | +.xc-hook { | ||
460 | +width: 33rpx; | ||
461 | +height: 33rpx; | ||
462 | +transform: rotate(-135deg); | ||
463 | +line-height: 35rpx; | ||
464 | +text-align: center; | ||
465 | +margin-right: 20rpx | ||
466 | + | ||
467 | + | ||
468 | +} | ||
469 | +.xc-hooks { | ||
470 | +width: 30rpx; | ||
471 | +height: 30rpx; | ||
472 | +border: 1rpx solid #999; | ||
473 | +margin-right: 20rpx; | ||
474 | +} | ||
475 | +.express_list_frame{ | ||
476 | + display: flex; | ||
477 | +height: 80rpx; | ||
478 | +align-items: center; | ||
479 | +padding-left: 40rpx; | ||
480 | +border-bottom: 1rpx solid #eee; | ||
481 | + | ||
482 | +} | ||
483 | +.express_list{ | ||
484 | + width: 100%; | ||
485 | + height: 65%; | ||
486 | + overflow-y: auto; | ||
487 | + margin-bottom: 40rpx; | ||
488 | + | ||
489 | +} | ||
490 | +.xc-confirms { | ||
491 | + box-sizing: border-box; | ||
492 | + width: 40%; | ||
493 | + border-radius: 50rpx; | ||
494 | + height: 80rpx; | ||
495 | + margin:0 auto; | ||
496 | + font-size:28rpx; | ||
497 | + background: #fff; | ||
498 | + color: #333; | ||
499 | + border: 2rpx solid #333; | ||
500 | +} | ||
501 | + | ||
502 | +.determine-frame{ | ||
503 | + width: 100%; | ||
504 | + height: 130rpx; | ||
505 | + | ||
506 | +} | ||
507 | +.xc-determine{ | ||
508 | + height: 80rpx; | ||
509 | + width: 40%; | ||
510 | + border-radius: 50rpx; | ||
511 | +background: #d60021; | ||
512 | +color: #fff; | ||
513 | +font-size: 28rpx; | ||
514 | +margin: 0 auto; | ||
515 | + | ||
516 | +} | ||
517 | + |