Commit 5e7e8c265839083b2cbacb125004eb36b9d05240
Merge branch 'test' into 'qa'
Test See merge request !21
Showing
59 changed files
with
1718 additions
and
711 deletions
app.wxss
... | ... | @@ -12,13 +12,17 @@ |
12 | 12 | box-sizing: border-box; |
13 | 13 | } |
14 | 14 | page { |
15 | - /*background-color: #f2f2f2;*/ | |
15 | + overflow-x: hidden; | |
16 | 16 | } |
17 | 17 | button { |
18 | 18 | border-radius: 0; padding-left: 0; |
19 | 19 | padding-right: 0; background-color: transparent; |
20 | 20 | font-size: 28rpx; |
21 | 21 | } |
22 | +.xc-wc{ | |
23 | + color: #d60021; | |
24 | + | |
25 | +} | |
22 | 26 | .wh100 { |
23 | 27 | width: 100%; |
24 | 28 | height: 100%; |
... | ... | @@ -42,14 +46,13 @@ button { |
42 | 46 | -webkit-box-orient: vertical; |
43 | 47 | -webkit-line-clamp: 3; |
44 | 48 | } |
49 | + | |
45 | 50 | .pd-bg-fff { |
46 | 51 | padding: 0 30rpx; |
47 | 52 | background-color: #fff; |
48 | 53 | font-size: 32rpx; |
49 | 54 | } |
50 | -.co-red { | |
51 | - color: #f23030; | |
52 | -} | |
55 | + | |
53 | 56 | .hide { |
54 | 57 | display: none; |
55 | 58 | } |
... | ... | @@ -129,6 +132,7 @@ justify-content:center; |
129 | 132 | .flex-vertical{ |
130 | 133 | display:flex; |
131 | 134 | align-items:center; |
135 | + | |
132 | 136 | } |
133 | 137 | /* 水平左垂直对齐 */ |
134 | 138 | .flex-left-center{ |
... | ... | @@ -136,6 +140,7 @@ align-items:center; |
136 | 140 | justify-content:flex-start; |
137 | 141 | align-items:center; |
138 | 142 | } |
143 | +.flex{display: flex} | |
139 | 144 | /* 水平左对齐 */ |
140 | 145 | .flex-level-left{ |
141 | 146 | display:flex; |
... | ... | @@ -158,6 +163,8 @@ align-items:center; |
158 | 163 | display:flex; |
159 | 164 | justify-content:space-around; |
160 | 165 | } |
166 | +.jc_sb{ justify-content: space-between} | |
167 | + | |
161 | 168 | /* 相对定位 */ |
162 | 169 | .rel{ |
163 | 170 | position: relative; |
... | ... | @@ -185,6 +192,10 @@ position:fixed; |
185 | 192 | display: flex; |
186 | 193 | justify-content:space-between; |
187 | 194 | } |
195 | +/* 使文字处于水平线上 */ | |
196 | +.ai-bas{ | |
197 | +align-items: baseline; | |
198 | +} | |
188 | 199 | |
189 | 200 | |
190 | 201 | /* 垂直居中 中间等距两边贴边 7.13*/ |
... | ... | @@ -249,28 +260,19 @@ justify-content:space-around; |
249 | 260 | font-style: normal; |
250 | 261 | } |
251 | 262 | |
252 | -.fs20{ | |
253 | - font-size: 20rpx; | |
254 | -} | |
255 | 263 | .fs22{ |
256 | 264 | font-size: 22rpx; |
257 | 265 | } |
258 | -.fs24{ | |
259 | - font-size: 24rpx; | |
260 | -} | |
266 | + | |
261 | 267 | .fs26{ |
262 | 268 | font-size: 26rpx; |
263 | 269 | } |
264 | -.fs28{ | |
265 | - font-size: 28rpx; | |
266 | -} | |
270 | + | |
267 | 271 | |
268 | 272 | .fs30{ |
269 | 273 | font-size:30rpx; |
270 | 274 | } |
271 | -.fs32{ | |
272 | - font-size:32rpx; | |
273 | -} | |
275 | + | |
274 | 276 | .fs35{ |
275 | 277 | font-size:35rpx; |
276 | 278 | } |
... | ... | @@ -280,11 +282,19 @@ justify-content:space-around; |
280 | 282 | .fs50{ |
281 | 283 | font-size: 50rpx; |
282 | 284 | } |
283 | -.fs60{ font-size:60rpx;} | |
285 | + | |
284 | 286 | |
285 | 287 | /* 7.26 */ |
286 | -.xc-wc{ | |
287 | - color: #e4374d; | |
288 | + | |
289 | +.red-b{ | |
290 | + background: #d60021; | |
291 | +} | |
292 | +.red-co{ | |
293 | + color: #d60021; | |
294 | + | |
295 | +} | |
296 | +.co-red { | |
297 | + color: #f23030; | |
288 | 298 | } |
289 | 299 | .oh{ |
290 | 300 | overflow: hidden; |
... | ... | @@ -298,4 +308,42 @@ color: #b9b9b9; |
298 | 308 | } |
299 | 309 | |
300 | 310 | |
311 | +.xc-fixed{ | |
312 | +position: fixed; | |
301 | 313 | |
314 | +} | |
315 | +.yellow{ | |
316 | + background-color: #ffb03f; | |
317 | +} | |
318 | +.green{ | |
319 | + background-color: #16ba63; | |
320 | +} | |
321 | +.blue_b{ | |
322 | + background-color:#059de5; | |
323 | +} | |
324 | +.blue_c{ | |
325 | + color: #059de5; | |
326 | +} | |
327 | +.powder{ | |
328 | +background: #ffe3e2; | |
329 | + | |
330 | +} | |
331 | +.fs32{ | |
332 | + font-size:32rpx; | |
333 | +} | |
334 | +.fs60{ font-size:60rpx;} | |
335 | +.fs28{ | |
336 | + font-size: 28rpx; | |
337 | +} | |
338 | +.fs20{ | |
339 | + font-size: 20rpx; | |
340 | +} | |
341 | +.fs24{ | |
342 | + font-size: 24rpx; | |
343 | +} | |
344 | +.fs36 { | |
345 | + font-size: 36rpx; | |
346 | +} | |
347 | +.fs40 { | |
348 | + font-size: 40rpx; | |
349 | +} | |
302 | 350 | \ No newline at end of file | ... | ... |
components/nav_box/nav_box.wxss
1 | 1 | .box_main{ |
2 | - width:100rpx; | |
3 | - height:100rpx; | |
2 | + width:80rpx; | |
3 | + height:80rpx; | |
4 | 4 | background:#272636; |
5 | 5 | transition:width 0.8s; |
6 | 6 | -moz-transition:width 0.8s; /* Firefox 4 */ |
... | ... | @@ -18,16 +18,19 @@ |
18 | 18 | } |
19 | 19 | |
20 | 20 | .box_main .dian{ |
21 | - text-align: center; | |
22 | - width:100rpx; | |
23 | - height:100rpx; | |
24 | - color: #ffff; | |
25 | - font-size: 70rpx; | |
26 | - background: none; | |
21 | + text-align: center; | |
22 | +width: 50rpx; | |
23 | +height: 50rpx; | |
24 | +color: #ffff; | |
25 | +font-size: 50rpx; | |
26 | +background: none; | |
27 | + | |
27 | 28 | } |
28 | 29 | |
29 | 30 | .box_main .dian image{ |
30 | - width:75rpx; height:30rpx;margin-top:36rpx; | |
31 | + width: 60rpx; | |
32 | +height: 20rpx; | |
33 | +margin: 30rpx 0 0 10rpx; | |
31 | 34 | } |
32 | 35 | |
33 | 36 | .box_main.box_isopen .dian{ |
... | ... | @@ -46,14 +49,18 @@ |
46 | 49 | .box_main .cl_list .item{ |
47 | 50 | display: inline-block; |
48 | 51 | width:100rpx; |
49 | - height:100rpx; | |
52 | + height:80rpx; | |
50 | 53 | text-align: center; |
51 | - line-height: 100rpx; | |
54 | + line-height: 80rpx; | |
52 | 55 | color: #fff; |
53 | 56 | vertical-align: top; |
57 | + font-size: 32rpx; | |
58 | + | |
54 | 59 | } |
55 | 60 | |
56 | 61 | .box_main .cl_list .item.big{ |
57 | - font-size: 70rpx;line-height: 90rpx; | |
62 | + font-size: 70rpx; | |
63 | +line-height: 70rpx; | |
64 | + | |
58 | 65 | } |
59 | 66 | ... | ... |
images/dpr.png
0 → 100644
21.7 KB
images/medal.png
0 → 100644
16.8 KB
images/nothingaddress.png
0 → 100644
17.8 KB
images/share/miao_share.png
0 → 100644
14 KB
pages/cart/cart/cart.js
pages/cart/cart2/cart2.js
... | ... | @@ -72,6 +72,8 @@ Page({ |
72 | 72 | selected_quan_list:null, |
73 | 73 | //选择的券的门店 |
74 | 74 | selected_quan_pick:null, |
75 | + is_close_quan:0, | |
76 | + disabled:0, | |
75 | 77 | |
76 | 78 | }, |
77 | 79 | onLoad: function(t) { |
... | ... | @@ -79,10 +81,65 @@ Page({ |
79 | 81 | wx.setNavigationBarTitle({ title: "填写订单",}) |
80 | 82 | var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,}); |
81 | 83 | th.data.param=t; |
82 | - //-----先获取物流,再获取用户信息,再展示页面----- | |
83 | - th.get_wuliu(th.get_info(th.show_page)); | |
84 | + | |
85 | + //清空is_pick_up | |
86 | + getApp().request.put("/api/weshop/useraddress/updatePickUp", { | |
87 | + data: {user_id: getApp().globalData.user_id, is_pickup: 0}, | |
88 | + success: function (s) { | |
89 | + } | |
90 | + }); | |
91 | + | |
92 | + //先获取是否有关闭使用优惠券 | |
93 | + getApp().getConfig2(function (ee) { | |
94 | + var json_d = JSON.parse(ee.switch_list); | |
95 | + th.setData({ is_close_quan: json_d.is_close_quan }); | |
96 | + //-----先获取物流,再获取用户信息,再展示页面----- | |
97 | + th.get_wuliu(th.get_info(th.show_page)); | |
98 | + }) | |
84 | 99 | }, |
85 | 100 | onUnload: function () { this.setData({ isclose: 1 })}, |
101 | + | |
102 | + //----------子页返回父页触发---------- | |
103 | + onShow: function() { | |
104 | + console.log('onshow'); | |
105 | + var th=this; | |
106 | + console.log(th.data.isclose); | |
107 | + if (th.data.isclose==0){ | |
108 | + /*--- | |
109 | + wx.navigateTo({ | |
110 | + url: "/pages/user/index/index" | |
111 | + //url: "/pages/index/index/index" | |
112 | + })---*/ | |
113 | + wx.switchTab({ | |
114 | + url: "/pages/index/index/index" | |
115 | + }) | |
116 | + | |
117 | + }else{ | |
118 | + this.getuser_addr(function(ie){ | |
119 | + | |
120 | + console.log("getuser_addr") | |
121 | + console.log(ie) | |
122 | + | |
123 | + th.setData({user_addr: ie }); | |
124 | + var going=0; | |
125 | + | |
126 | + //使用计算器,避免空现象 | |
127 | + var jishi= setInterval(function () { | |
128 | + if (th.data.is_b_now == 1 && going==0) { | |
129 | + if(th.data.bn_goods) { | |
130 | + th.calculatePrice2();going=1;clearInterval(jishi); | |
131 | + } | |
132 | + }else if(going==0) { | |
133 | + if (th.data.cartlist){ | |
134 | + th.calculatePrice();going = 1; clearInterval(jishi); | |
135 | + } | |
136 | + } | |
137 | + },500) | |
138 | + | |
139 | + }); | |
140 | + } | |
141 | + }, | |
142 | + | |
86 | 143 | //-------------------获取物流--------------- |
87 | 144 | get_wuliu(func) { |
88 | 145 | var th = this; |
... | ... | @@ -100,13 +157,7 @@ Page({ |
100 | 157 | }, |
101 | 158 | |
102 | 159 | //------获取会员收货地址----- |
103 | - getuser_addr:function(func){ | |
104 | - console.log(to.globalData.baddr); | |
105 | - if (to.globalData.baddr!=null){ | |
106 | - var user_addr = to.globalData.baddr; | |
107 | - to.globalData.baddr=null; | |
108 | - func(user_addr); | |
109 | - }else{ | |
160 | + getuser_addr:function(func){ | |
110 | 161 | a.get("/api/weshop/useraddress/page", { |
111 | 162 | data: { user_id: to.globalData.user_id, store_id: oo.stoid, pageSize: 600 }, |
112 | 163 | success: function (su) { |
... | ... | @@ -117,15 +168,21 @@ Page({ |
117 | 168 | ];---*/ |
118 | 169 | var user_addr = su.data.data.pageData; |
119 | 170 | var item = null; |
171 | + var def_item=null; | |
120 | 172 | for (var i = 0; i < user_addr.length; i++) { |
121 | - if (user_addr[i]['is_default'] == 1) { item = user_addr[i]; break; } | |
173 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i];} | |
174 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | |
122 | 175 | } |
176 | + | |
177 | + if (item == null) item = def_item; | |
123 | 178 | if (item == null) item = user_addr[0]; |
179 | + | |
180 | + if(item==undefined) item=null; | |
124 | 181 | func(item); |
125 | 182 | } |
126 | 183 | }); |
127 | - } | |
128 | 184 | }, |
185 | + | |
129 | 186 | //----------------展示页面,是再获取用户信息之后-------------- |
130 | 187 | show_page:function(){ |
131 | 188 | var th=this,ta = this.data.param; |
... | ... | @@ -264,14 +321,30 @@ Page({ |
264 | 321 | arr[ind].check_quan_ware_list=check_quan_ware_list; |
265 | 322 | arr[ind].check_quan_price_list=check_quan_price_list; |
266 | 323 | |
267 | - //调用接口,获取优惠券的列表 | |
268 | - var url="/api/weshop/couponList/getUseCouponList"; | |
269 | - await app.request.promiseGet(url,{ | |
270 | - data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100} | |
271 | - }).then(res=>{ | |
272 | - if(res.data.code==0) | |
273 | - arr[ind].quan_list=res.data.data.pageData; | |
274 | - }) | |
324 | + //是否关闭使用优惠券 | |
325 | + if (th.data.is_close_quan != 1) { | |
326 | + //调用接口,获取优惠券的列表 | |
327 | + var url="/api/weshop/couponList/getUseCouponList"; | |
328 | + await app.request.promiseGet(url,{ | |
329 | + data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100} | |
330 | + }).then(res=>{ | |
331 | + if(res.data.code==0) | |
332 | + arr[ind].quan_list=res.data.data.pageData; | |
333 | + }) | |
334 | + | |
335 | + var frozenQuan=null; | |
336 | + var url0="/api/weshop/users/frozenQuan/listFrozenQuan/"+app.globalData.user_id; | |
337 | + await app.request.promiseGet(url0,{1:1}).then(res=>{ | |
338 | + if(res.data.code==0){ | |
339 | + frozenQuan=res.data.data; | |
340 | + } | |
341 | + }) | |
342 | + | |
343 | + if(frozenQuan){ | |
344 | + arr[ind].quan_list=th.check_is_frozenQuan(arr[ind].quan_list,frozenQuan); | |
345 | + } | |
346 | + | |
347 | + } | |
275 | 348 | } |
276 | 349 | |
277 | 350 | th.setData({ |
... | ... | @@ -309,6 +382,7 @@ Page({ |
309 | 382 | |
310 | 383 | switch (gd.prom_type){ |
311 | 384 | case 0: |
385 | + case 6: | |
312 | 386 | //--此时开始计算商品的使用券相关,如果有等级价还要计算和等级价相关的, |
313 | 387 | // 如果有优惠促销,还要把促销的部分计算在内,因为促销还有不能使用优惠券-- |
314 | 388 | |
... | ... | @@ -317,14 +391,32 @@ Page({ |
317 | 391 | th.data.check_quan_ware_list=t.data.data.erpwareid+""; |
318 | 392 | |
319 | 393 | var quanlist=null; |
320 | - var url="/api/weshop/couponList/getUseCouponList"; | |
321 | - await app.request.promiseGet(url,{ | |
322 | - data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:th.data.ckeck_quan_price,WareIds:th.data.check_quan_ware_list,pageSize:100} | |
323 | - }).then(res=>{ | |
324 | - if(res.data.code==0) | |
325 | - quanlist=res.data.data.pageData; | |
394 | + | |
395 | + if (th.data.is_close_quan != 1) { | |
396 | + var url="/api/weshop/couponList/getUseCouponList"; | |
397 | + await app.request.promiseGet(url,{ | |
398 | + data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:th.data.ckeck_quan_price,WareIds:th.data.check_quan_ware_list,pageSize:100} | |
399 | + }).then(res=>{ | |
400 | + if(res.data.code==0) | |
401 | + quanlist=res.data.data.pageData; | |
402 | + }) | |
403 | + } | |
404 | + | |
405 | + var frozenQuan=null; | |
406 | + var url0="/api/weshop/users/frozenQuan/listFrozenQuan/"+app.globalData.user_id; | |
407 | + await app.request.promiseGet(url0,{1:1}).then(res=>{ | |
408 | + if(res.data.code==0){ | |
409 | + frozenQuan=res.data.data; | |
410 | + } | |
326 | 411 | }) |
327 | 412 | |
413 | + if(frozenQuan){ | |
414 | + quanlist=th.check_is_frozenQuan(quanlist,frozenQuan); | |
415 | + } | |
416 | + | |
417 | + t.data.data.prom_id = 0; | |
418 | + t.data.data.prom_type = 0; | |
419 | + | |
328 | 420 | th.setData({ |
329 | 421 | bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et, |
330 | 422 | bn_pick: gg.pick_id, bn_t_exp_t: distr_t,selected_quan_list:quanlist |
... | ... | @@ -334,17 +426,45 @@ Page({ |
334 | 426 | |
335 | 427 | break; |
336 | 428 | case 1: //---秒杀----- |
337 | - getApp().request.get("/api/weshop/activitylist/getGoodsPrice/"+gd.store_id | |
429 | + var quanlist=null; | |
430 | + getApp().request.get("/api/weshop/activitylist/getSJGoodsPrice/"+gd.store_id | |
338 | 431 | + "/" + gd.goods_id + "/1/" + gd.prom_id,{ |
339 | - success: function (tt) { | |
340 | - if(t.data.code==0){ | |
341 | - t.data.data.shop_price=tt.data.data.prom_price; | |
432 | + success: async function (tt) { | |
433 | + if(tt.data.code==0){ | |
434 | + t.data.data.shop_price=tt.data.data.prom_price; | |
342 | 435 | }else{ |
343 | - t.data.data.prom_id = 0; t.data.data.prom_type = 0; | |
436 | + t.data.data.prom_id = 0; t.data.data.prom_type = 0; | |
437 | + | |
438 | + th.data.ckeck_quan_price=t.data.data.shop_price*gg.goods_num; | |
439 | + th.data.check_quan_price_list=t.data.data.shop_price*gg.goods_num+""; | |
440 | + th.data.check_quan_ware_list=t.data.data.erpwareid+""; | |
441 | + | |
442 | + if (th.data.is_close_quan != 1) { | |
443 | + | |
444 | + var url="/api/weshop/couponList/getUseCouponList"; | |
445 | + await app.request.promiseGet(url,{ | |
446 | + data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:th.data.ckeck_quan_price,WareIds:th.data.check_quan_ware_list,pageSize:100} | |
447 | + }).then(res=>{ | |
448 | + if(res.data.code==0) | |
449 | + quanlist=res.data.data.pageData; | |
450 | + }) | |
451 | + | |
452 | + var frozenQuan=null; | |
453 | + var url0="/api/weshop/users/frozenQuan/listFrozenQuan/"+app.globalData.user_id; | |
454 | + await app.request.promiseGet(url0,{1:1}).then(res=>{ | |
455 | + if(res.data.code==0){ | |
456 | + frozenQuan=res.data.data; | |
457 | + } | |
458 | + }) | |
459 | + | |
460 | + if(frozenQuan){ | |
461 | + quanlist=th.check_is_frozenQuan(quanlist,frozenQuan); | |
462 | + } | |
463 | + } | |
344 | 464 | } |
345 | 465 | th.setData({ |
346 | 466 | bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et, |
347 | - bn_pick: gg.pick_id, bn_t_exp_t: distr_t | |
467 | + bn_pick: gg.pick_id, bn_t_exp_t: distr_t,selected_quan_list:quanlist | |
348 | 468 | }); |
349 | 469 | //计算价格 |
350 | 470 | th.calculatePrice2(); |
... | ... | @@ -358,28 +478,6 @@ Page({ |
358 | 478 | } |
359 | 479 | }, |
360 | 480 | |
361 | - //----------子页返回父页触发---------- | |
362 | - onShow: function() { | |
363 | - console.log('onshow'); | |
364 | - var th=this; | |
365 | - console.log(th.data.isclose); | |
366 | - if (th.data.isclose==0){ | |
367 | - /*--- | |
368 | - wx.navigateTo({ | |
369 | - url: "/pages/user/index/index" | |
370 | - //url: "/pages/index/index/index" | |
371 | - })---*/ | |
372 | - wx.switchTab({ | |
373 | - url: "/pages/index/index/index" | |
374 | - }) | |
375 | - | |
376 | - }else{ | |
377 | - this.getuser_addr(function(ie){ | |
378 | - th.setData({user_addr: ie }); | |
379 | - }); | |
380 | - | |
381 | - } | |
382 | - }, | |
383 | 481 | //---------------检查是否有收货地址------------------- |
384 | 482 | checkAddressList: function() { |
385 | 483 | var t = this; |
... | ... | @@ -676,7 +774,10 @@ Page({ |
676 | 774 | if (th.data.is_b_now==1){ |
677 | 775 | console.log("buy_new"); |
678 | 776 | |
679 | - if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){ ff = false; confirmBox("请新建收货地址"); } | |
777 | + if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){ | |
778 | + ff = false; getApp().my_warnning("请选择收货地址",0,th); | |
779 | + this.data.is_summit_ing = 0; | |
780 | + } | |
680 | 781 | if (!ff) return false; |
681 | 782 | var addr = th.data.user_addr; |
682 | 783 | if (th.data.bn_exp_type == 1) addr=null; |
... | ... | @@ -687,7 +788,7 @@ Page({ |
687 | 788 | |
688 | 789 | if(th.data.bn_exp_type==0) |
689 | 790 | if(th.data.wu_arr==null || th.data.wu_arr.length<=0){ |
690 | - confirmBox("读取物流失败"); | |
791 | + getApp().my_warnning("读取物流失败",0,th); | |
691 | 792 | return false; |
692 | 793 | } |
693 | 794 | |
... | ... | @@ -701,7 +802,8 @@ Page({ |
701 | 802 | 'twon': addr == null ? 0 : addr.twon, |
702 | 803 | 'address': addr == null ? "": addr.address, |
703 | 804 | 'more_address': addr == null ? "" : addr.more_address, |
704 | - 'mobile': th.data.userinfo.mobile, | |
805 | + //'mobile': th.data.userinfo.mobile, | |
806 | + 'mobile': addr == null ? th.data.userinfo.mobile : addr.mobile, | |
705 | 807 | 'email':'', |
706 | 808 | 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code, |
707 | 809 | 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name, |
... | ... | @@ -752,7 +854,7 @@ Page({ |
752 | 854 | console.log(pdata); |
753 | 855 | }else{ |
754 | 856 | //---------购物车的结算--------- |
755 | - if (th.data.is_all_zt == 0 && th.data.user_addr == null) { ff = false;confirmBox("请新建收货地址");} | |
857 | + if (th.data.is_all_zt == 0 && th.data.user_addr == null) { ff = false; getApp().confirmBox("请新建收货地址");} | |
756 | 858 | if (!ff) return false; |
757 | 859 | |
758 | 860 | var addr = th.data.user_addr; |
... | ... | @@ -763,7 +865,7 @@ Page({ |
763 | 865 | |
764 | 866 | if(th.data.is_all_zt !=1) |
765 | 867 | if(th.data.wu_arr==null || th.data.wu_arr.length<=0 ){ |
766 | - confirmBox("读取物流失败"); | |
868 | + getApp().confirmBox("读取物流失败"); | |
767 | 869 | return false; |
768 | 870 | } |
769 | 871 | |
... | ... | @@ -885,15 +987,19 @@ Page({ |
885 | 987 | a.post("/api/weshop/order/pay/createOrder", { |
886 | 988 | data: dd, |
887 | 989 | success: function (t) { |
888 | - console.log(t); | |
889 | - //app.showWarning("支付成功"); | |
890 | - app.my_warnning("支付成功",1,th); | |
891 | - setTimeout(function () { | |
892 | - th.setData({ isclose: 0 }); | |
893 | - wx.navigateTo({ | |
894 | - url: "/pages/user/order_list/order_list" | |
895 | - }) | |
896 | - }, 1000) | |
990 | + //console.log(t); | |
991 | + if(t.data.code==0){ | |
992 | + app.my_warnning("支付成功",1,th); | |
993 | + setTimeout(function () { | |
994 | + th.setData({ isclose: 0 }); | |
995 | + wx.navigateTo({ | |
996 | + url: "/pages/user/order_list/order_list" | |
997 | + }) | |
998 | + }, 1000) | |
999 | + } | |
1000 | + }, | |
1001 | + fail:function () { | |
1002 | + | |
897 | 1003 | } |
898 | 1004 | }); |
899 | 1005 | } |
... | ... | @@ -936,7 +1042,7 @@ Page({ |
936 | 1042 | }, |
937 | 1043 | enterAddressPage: function() { |
938 | 1044 | this.data.enterAddressPage = !0, wx.navigateTo({ |
939 | - url: "/pages/user/address_list/address_list?operate=select" | |
1045 | + url: "/pages/user/address_list/address_list?is_back=1" | |
940 | 1046 | }); |
941 | 1047 | }, |
942 | 1048 | |
... | ... | @@ -1059,13 +1165,9 @@ Page({ |
1059 | 1165 | var bn=e.currentTarget.dataset.bn; |
1060 | 1166 | var cindx=e.currentTarget.dataset.cind; |
1061 | 1167 | |
1062 | - console.log("open_coupon_list--quan"); | |
1063 | - console.log("门店:"+pickid); | |
1064 | - console.log(bn); | |
1065 | - | |
1066 | 1168 | |
1067 | 1169 | if(bn==1){ |
1068 | - th.setData({open_quan:1,selected_quan_pick:pickid}); | |
1170 | + th.setData({open_quan:1,selected_quan_pick:pickid, disabled:1}); | |
1069 | 1171 | }else{ |
1070 | 1172 | //---多单打开券的时候,就要判断券在其他门店是否有使用--- |
1071 | 1173 | var quanlist=th.data.cartlist[cindx].quan_list; |
... | ... | @@ -1074,12 +1176,12 @@ Page({ |
1074 | 1176 | var is_using= th.check_in_sele(quanlist[i].CashRepNo,pickid); |
1075 | 1177 | if(is_using) quanlist[i].is_using=1; |
1076 | 1178 | } |
1077 | - th.setData({open_quan:1,selected_quan_pick:pickid,selected_quan_list:quanlist}); | |
1179 | + th.setData({open_quan:1,selected_quan_pick:pickid,selected_quan_list:quanlist,disabled:1}); | |
1078 | 1180 | } |
1079 | 1181 | }, |
1080 | 1182 | close_coupon:function (e) { |
1081 | 1183 | var th=this; |
1082 | - th.setData({open_quan:0}); | |
1184 | + th.setData({open_quan:0,disabled:0}); | |
1083 | 1185 | }, |
1084 | 1186 | |
1085 | 1187 | //---判断券时候在已经选择的列表中--- |
... | ... | @@ -1185,6 +1287,33 @@ Page({ |
1185 | 1287 | th.calculatePrice(); |
1186 | 1288 | } |
1187 | 1289 | th.setData({open_quan:0}); |
1290 | + }, | |
1291 | + | |
1292 | + cart_set_err:function(e){ | |
1293 | + var txt = e.currentTarget.dataset.err; | |
1294 | + var ob={}; | |
1295 | + ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif"; | |
1296 | + this.setData(ob); | |
1297 | + }, | |
1298 | + | |
1299 | + //--验证是否已经冻结-- | |
1300 | + check_is_frozenQuan:function(quanlist,frozenQuan){ | |
1301 | + var arr=[]; | |
1302 | + for(var i=0;i<quanlist.length;i++){ | |
1303 | + var item=quanlist[i]; | |
1304 | + var is_find=0; | |
1305 | + var Q_no=quanlist[i].CashRepNo; | |
1306 | + for(var j=0;j<frozenQuan.length;j++){ | |
1307 | + var q_no=frozenQuan[j].cashRepNo; | |
1308 | + if(Q_no==q_no){ | |
1309 | + is_find=1; break; | |
1310 | + } | |
1311 | + } | |
1312 | + if(!is_find) arr.push(item); | |
1313 | + | |
1314 | + } | |
1315 | + return arr; | |
1188 | 1316 | } |
1189 | 1317 | |
1318 | + | |
1190 | 1319 | }); | ... | ... |
pages/cart/cart2/cart2.wxml
... | ... | @@ -34,7 +34,8 @@ |
34 | 34 | <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items"> |
35 | 35 | <!----商品图片-----> |
36 | 36 | <view class="goods-img"> |
37 | - <image class="wh100" src="{{items.original_img}}"></image> | |
37 | + <image class="wh100" src="{{items.original_img}}" binderror='cart_set_err' | |
38 | + data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img' ></image> | |
38 | 39 | </view> |
39 | 40 | <!----商品名称规格----> |
40 | 41 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}"> |
... | ... | @@ -53,7 +54,7 @@ |
53 | 54 | |
54 | 55 | <!-----使用优惠券------> |
55 | 56 | <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" |
56 | - wx:if="{{item.quan_list}}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}"> | |
57 | + wx:if="{{item.quan_list && item.quan_list.length>0 }}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}"> | |
57 | 58 | <view class="work-frame flex-space-between"> |
58 | 59 | <view class="work">使用优惠券</view> |
59 | 60 | <view class="xc-right-frame"> |
... | ... | @@ -88,7 +89,7 @@ |
88 | 89 | <view class="coupon-mes"> |
89 | 90 | <view>用户备注(50字)</view> |
90 | 91 | <view class="leave-word"> |
91 | - <textarea bindinput="keyUpChangeNum" class="word-box" maxlength="50" name="user_note_{{item.pickup_id}}"></textarea> | |
92 | + <textarea bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="50" name="user_note_{{item.pickup_id}}"></textarea> | |
92 | 93 | <view class="max-word">{{maxWord}}/50</view> |
93 | 94 | </view> |
94 | 95 | </view> |
... | ... | @@ -108,7 +109,7 @@ |
108 | 109 | <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{bn_pickname}}</view></view> |
109 | 110 | <view class="order-detail"> |
110 | 111 | <view class="goods-img"> |
111 | - <image class="wh100" src="{{bn_goods.original_img}}"></image> | |
112 | + <image class="wh100" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image> | |
112 | 113 | </view> |
113 | 114 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> |
114 | 115 | <view class="goods-name">{{bn_goods.goods_name}}</view> |
... | ... | @@ -126,7 +127,7 @@ |
126 | 127 | </view> |
127 | 128 | |
128 | 129 | <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}" |
129 | - wx:if="{{selected_quan_list}}"> | |
130 | + wx:if="{{selected_quan_list && selected_quan_list.length>0}}"> | |
130 | 131 | <view class="work-frame flex-space-between"> |
131 | 132 | <view class="work"> |
132 | 133 | 使用优惠券 |
... | ... | @@ -182,19 +183,9 @@ |
182 | 183 | </view> |
183 | 184 | </view> |
184 | 185 | <view class="coupon-mes"> |
185 | - <!-- <view bindtap="useCoupon" class="coupon-title"> | |
186 | - <view class="classname"> | |
187 | - <view class="">优惠券</view> | |
188 | - <view class="coupon-num">{{order.couponNum}}张可用</view> | |
189 | - </view> | |
190 | - <view class="set-btn"> | |
191 | - <view>{{coupon?coupon.coupon.name:'未使用'}}</view> | |
192 | - <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/icon-arrowdown.png"></image> | |
193 | - </view> | |
194 | - </view> --> | |
195 | 186 | <view>用户备注(50字)</view> |
196 | 187 | <view class="leave-word"> |
197 | - <textarea bindinput="keyUpChangeNum" class="word-box" maxlength="50" name="user_note"></textarea> | |
188 | + <textarea bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="50" name="user_note"></textarea> | |
198 | 189 | <view class="max-word">{{maxWord}}/50</view> |
199 | 190 | </view> |
200 | 191 | </view> |
... | ... | @@ -257,29 +248,30 @@ |
257 | 248 | |
258 | 249 | <view class="xc-frame flex-level"> |
259 | 250 | <view class="list-frame"> |
260 | - <view class="xc-coupon-effect flex-vertical flex-space-between" > | |
251 | + <view class="xc-coupon-effect flex-vertical flex-space-between" bindtap="sele_quan_item" data-no="1"> | |
261 | 252 | <view class="xc-goods-coupon "> |
262 | - <view class="xc-coupon-money">不使用优惠券</view> | |
263 | - <view class="flex xc-coupon-time"></view> | |
253 | + <view class="xc-coupon-money0">不使用优惠券</view> | |
254 | + <view class="flex"></view> | |
264 | 255 | </view> |
265 | - <view class="xc-coupon-selection flex-right-vertical" bindtap="sele_quan_item" data-no="1"> | |
266 | - <icon color='red' size='25' type='success' wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"></icon> | |
256 | + <view class="xc-coupon-selection flex-right-vertical" > | |
257 | + <icon color='red' size='20' type='success' wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"></icon> | |
267 | 258 | <view class="circle xc-not-Selection" wx:if="{{!using_quan[selected_quan_pick].is_nouse_red }}"></view> |
268 | 259 | </view> |
269 | 260 | </view> |
270 | 261 | |
271 | 262 | <!-- 循环那些还没有被其他门店选择的券 --> |
272 | - <view class="xc-coupon-effect flex-vertical flex-space-between" wx:for="{{selected_quan_list}}" wx:if="{{!item.is_using}}"> | |
263 | + <view class="xc-coupon-effect flex-vertical flex-space-between" wx:for="{{selected_quan_list}}" wx:if="{{!item.is_using}}" bindtap="sele_quan_item" data-ind="{{index}}"> | |
273 | 264 | <view class="xc-goods-coupon "> |
274 | 265 | <view class="xc-coupon-money">{{item.Sum}}元</view> |
266 | + <view class="xc-coupon-money1">订单满{{item.BuySum}}元使用</view> | |
275 | 267 | <view class="flex xc-coupon-time">使用期限 |
276 | 268 | <view class="time" wx:if="{{item.BeginDate && item.ValidDate}}" > |
277 | 269 | {{filters.replace_time(item.BeginDate)}}至{{filters.replace_time(item.ValidDate)}} |
278 | 270 | </view> |
279 | 271 | </view> |
280 | 272 | </view> |
281 | - <view class="xc-coupon-selection flex-right-vertical" bindtap="sele_quan_item" data-ind="{{index}}"> | |
282 | - <icon color='red' size='25' type='success' wx:if="{{item.show_red}}"></icon> | |
273 | + <view class="xc-coupon-selection flex-right-vertical" > | |
274 | + <icon color='red' size='20' type='success' wx:if="{{item.show_red}}"></icon> | |
283 | 275 | <view class="circle xc-not-Selection" wx:if="{{!item.show_red }}"></view> |
284 | 276 | </view> |
285 | 277 | </view> | ... | ... |
pages/cart/cart2/cart2.wxss
... | ... | @@ -279,7 +279,7 @@ |
279 | 279 | border-bottom:1px solid #ddd; |
280 | 280 | } |
281 | 281 | .xc-coupon-frame .work-frame{ |
282 | - width: 92%; | |
282 | + width: 94%; | |
283 | 283 | height: 100%; |
284 | 284 | |
285 | 285 | } |
... | ... | @@ -294,7 +294,7 @@ |
294 | 294 | } |
295 | 295 | |
296 | 296 | .xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; color: #d81e06;} |
297 | -.xc-right-frame{font-size: 30rpx;line-height: 92rpx; } | |
297 | +.xc-right-frame{font-size: 30rpx;line-height: 92rpx; margin-right: 10rpx } | |
298 | 298 | |
299 | 299 | /* 自定义弹出窗口 */ |
300 | 300 | .cx-popup{ |
... | ... | @@ -310,7 +310,7 @@ |
310 | 310 | |
311 | 311 | .cx-popup .top{ |
312 | 312 | width:100%; |
313 | - height:133rpx; | |
313 | + height:100rpx; | |
314 | 314 | border-bottom:3rpx solid #ddd; |
315 | 315 | |
316 | 316 | |
... | ... | @@ -318,7 +318,7 @@ |
318 | 318 | .xc-top-content{ |
319 | 319 | width: 88%; |
320 | 320 | height:85rpx; |
321 | - padding-top: 50rpx; | |
321 | + padding-top: 20rpx; | |
322 | 322 | font-size: 36rpx; |
323 | 323 | } |
324 | 324 | |
... | ... | @@ -341,26 +341,25 @@ |
341 | 341 | height: 100%; |
342 | 342 | overflow-y:scroll; |
343 | 343 | |
344 | - margin-top:20rpx; | |
345 | - | |
346 | 344 | } |
347 | 345 | .xc-close-frame{ |
348 | - margin-top:30rpx; | |
349 | - width:15%; | |
350 | - display:flex; | |
346 | + margin-top:10rpx; | |
347 | + width:1%; | |
351 | 348 | } |
352 | 349 | |
353 | 350 | .xc-close{ |
354 | - width:70rpx; | |
355 | - height:70rpx; | |
356 | - border-radius:50%; | |
357 | - border:5rpx solid #a5a5a7; | |
358 | - text-align:center; | |
359 | - line-height: 55rpx; | |
360 | - font-size:80rpx; | |
361 | - color:#a5a5a7; | |
362 | - font-family:"微软正黑体"; | |
363 | - margin-top:8rpx; | |
351 | + width: 46rpx; | |
352 | +height: 46rpx; | |
353 | +border-radius: 50%; | |
354 | +border: 5rpx solid #a5a5a7; | |
355 | +text-align: center; | |
356 | +line-height: 46rpx; | |
357 | +font-size: 34rpx; | |
358 | +font-weight: bolder; | |
359 | +color: #a5a5a7; | |
360 | +margin-top: 5rpx; | |
361 | + | |
362 | + | |
364 | 363 | |
365 | 364 | } |
366 | 365 | .xc-money{ |
... | ... | @@ -374,7 +373,7 @@ |
374 | 373 | } |
375 | 374 | .xc-coupon-effect{ |
376 | 375 | width: 99%; |
377 | - height: 128rpx; | |
376 | + min-height: 100rpx; | |
378 | 377 | border-bottom:3rpx solid #ddd; |
379 | 378 | |
380 | 379 | |
... | ... | @@ -389,10 +388,24 @@ |
389 | 388 | margin-left:222rpx; |
390 | 389 | |
391 | 390 | } |
391 | +.xc-coupon-money0{ | |
392 | + color: #c91e31; | |
393 | + font-size: 35rpx; | |
394 | + line-height: 40rpx; | |
395 | + | |
396 | +} | |
392 | 397 | .xc-coupon-money{ |
393 | 398 | color: #c91e31; |
394 | 399 | font-size: 35rpx; |
395 | - margin-top:20rpx; | |
400 | + line-height: 40rpx; | |
401 | + padding-top: 10px; | |
402 | + | |
403 | +} | |
404 | +.xc-coupon-money1{ | |
405 | + color: #444; | |
406 | + font-size: 28rpx; | |
407 | + line-height: 60rpx; | |
408 | + | |
396 | 409 | |
397 | 410 | } |
398 | 411 | .xc-coupon-time{ |
... | ... | @@ -427,8 +440,8 @@ |
427 | 440 | @keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } |
428 | 441 | |
429 | 442 | .xc-not-Selection{ |
430 | - width: 60rpx; | |
431 | - height: 60rpx; | |
443 | + width: 40rpx; | |
444 | +height: 40rpx; | |
432 | 445 | background: #eeeeee; |
433 | 446 | } |
434 | 447 | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
... | ... | @@ -54,6 +54,7 @@ Page({ |
54 | 54 | is_pt_tz:0,//是否开团团长 |
55 | 55 | qh:'', //期号 |
56 | 56 | pt_listno:'',//期号 |
57 | + is_normal:0 | |
57 | 58 | }, |
58 | 59 | onLoad: function(t) { |
59 | 60 | console.log("onLoad_pt_cart"); |
... | ... | @@ -106,10 +107,14 @@ Page({ |
106 | 107 | |
107 | 108 | var user_addr = su.data.data.pageData; |
108 | 109 | var item = null; |
110 | + var def_item=null; | |
109 | 111 | for (var i = 0; i < user_addr.length; i++) { |
110 | - if (user_addr[i]['is_default'] == 1) { item = user_addr[i]; break; } | |
112 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; } | |
113 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | |
111 | 114 | } |
115 | + if (item == null) item = def_item; | |
112 | 116 | if (item == null) item = user_addr[0]; |
117 | + if (item == undefined) item = null; | |
113 | 118 | func(item); |
114 | 119 | } |
115 | 120 | }); |
... | ... | @@ -159,7 +164,7 @@ Page({ |
159 | 164 | t.data.data.is_normal=1; |
160 | 165 | th.setData({ |
161 | 166 | bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et, |
162 | - bn_pick: gg.pick_id, bn_t_exp_t: distr_t | |
167 | + bn_pick: gg.pick_id, bn_t_exp_t: distr_t, is_normal:1 | |
163 | 168 | }); |
164 | 169 | th.calculatePrice2(); |
165 | 170 | }else{ |
... | ... | @@ -340,7 +345,11 @@ Page({ |
340 | 345 | //------------立即购买------------- |
341 | 346 | console.log("buy_new"); |
342 | 347 | |
343 | - if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){ ff = false; confirmBox("请新建收货地址"); } | |
348 | + if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){ | |
349 | + ff = false; | |
350 | + getApp().my_warnning("请选择收货地址",0,this); | |
351 | + this.data.is_summit_ing = 0; | |
352 | + } | |
344 | 353 | if (!ff) return false; |
345 | 354 | var addr = th.data.user_addr; |
346 | 355 | if (th.data.bn_exp_type == 1) addr=null; |
... | ... | @@ -351,7 +360,8 @@ Page({ |
351 | 360 | |
352 | 361 | if(th.data.bn_exp_type==0) { |
353 | 362 | if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) { |
354 | - confirmBox("读取物流失败"); | |
363 | + getApp().my_warnning("读取物流失败",0,this); | |
364 | + this.data.is_summit_ing = 0; | |
355 | 365 | return false; |
356 | 366 | } |
357 | 367 | } |
... | ... | @@ -380,11 +390,15 @@ Page({ |
380 | 390 | 'pickup_id': th.data.bn_pick, //门店 |
381 | 391 | 'exp_type': th.data.bn_exp_type, //配送方式 |
382 | 392 | 'is_normal':th.data.bn_goods.is_normal, //是否是普通购买 |
383 | - 'pt_prom_id':th.data.bn_goods.prom_id, //拼单ID | |
384 | - 'is_zsorder':th.data.kt_type+1, //开团类型 | |
385 | - 'is_pt_tz':th.data.is_pt_tz, //开团类型 | |
386 | - 'order_goods':new Array(), | |
393 | + 'pt_prom_id':th.data.bn_goods.prom_id, //拼单ID | |
394 | + 'is_pt_tz':th.data.is_pt_tz, //开团类型 | |
395 | + 'order_goods':new Array(), | |
387 | 396 | }; |
397 | + | |
398 | + if(!th.data.bn_goods.is_normal){ | |
399 | + item.is_zsorder=th.data.kt_type+1; //开团类型 | |
400 | + } | |
401 | + | |
388 | 402 | if(th.data.qh!='') |
389 | 403 | { |
390 | 404 | item.team_qh=th.data.qh; |
... | ... | @@ -462,9 +476,18 @@ Page({ |
462 | 476 | app.my_warnning("支付成功",1,th); |
463 | 477 | setTimeout(function () { |
464 | 478 | th.setData({ isclose: 0 }); |
465 | - wx.navigateTo({ | |
466 | - url: "/pages/team/team_success/team_success?ordersn=" + data.data, | |
467 | - }) | |
479 | + | |
480 | + if(th.data.is_normal==1){ | |
481 | + wx.navigateTo({ | |
482 | + url: "/pages/user/order_list/order_list", | |
483 | + }) | |
484 | + }else{ | |
485 | + wx.navigateTo({ | |
486 | + url: "/pages/team/team_success/team_success?ordersn=" + data.data, | |
487 | + }) | |
488 | + } | |
489 | + | |
490 | + | |
468 | 491 | }, 1000) |
469 | 492 | } |
470 | 493 | }); |
... | ... | @@ -616,5 +639,13 @@ Page({ |
616 | 639 | var ind=e.detail.value, txt = e.currentTarget.dataset.txt; |
617 | 640 | this.setData({ [txt]: ind }); |
618 | 641 | this.calculatePrice(); |
619 | - } | |
642 | + }, | |
643 | + | |
644 | + cart_set_err: function (e) { | |
645 | + var txt = e.currentTarget.dataset.err; | |
646 | + var ob = {}; | |
647 | + ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif"; | |
648 | + this.setData(ob); | |
649 | + } | |
650 | + | |
620 | 651 | }); | ... | ... |
pages/cart/cart2_pt/cart2_pt.wxml
... | ... | @@ -31,7 +31,8 @@ |
31 | 31 | <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{bn_pickname}}</view></view> |
32 | 32 | <view class="order-detail"> |
33 | 33 | <view class="goods-img"> |
34 | - <image class="wh100" src="{{bn_goods.original_img}}"></image> | |
34 | + <image class="wh100" src="{{bn_goods.original_img}}" | |
35 | + binderror='cart_set_err' data-err="bn_goods.original_img"></image> | |
35 | 36 | </view> |
36 | 37 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> |
37 | 38 | <view class="goods-name">{{bn_goods.goods_name}}</view> |
... | ... | @@ -49,7 +50,7 @@ |
49 | 50 | </view> |
50 | 51 | |
51 | 52 | <!--阶梯团是不显示的--> |
52 | - <view class="use-item" wx:if="{{kt_type!=3}}"> | |
53 | + <view class="use-item" wx:if="{{kt_type!=3 || is_normal==1}}"> | |
53 | 54 | <view bindtap='setexptype' data-t='1' style="display:{{bn_t_exp_t==2?'none':'flex'}};"> |
54 | 55 | <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> |
55 | 56 | <view class="yu_er">自提</view> |
... | ... | @@ -61,7 +62,7 @@ |
61 | 62 | </view> |
62 | 63 | |
63 | 64 | <!--阶梯团是不显示的--> |
64 | - <block wx:if="{{kt_type!=3}}"> | |
65 | + <block wx:if="{{kt_type!=3 || is_normal==1 }}"> | |
65 | 66 | <view class="use-item" hidden='{{bn_exp_type==1}}'> |
66 | 67 | <view>使用物流:</view> |
67 | 68 | <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name"> |
... | ... | @@ -90,15 +91,20 @@ |
90 | 91 | </block> |
91 | 92 | |
92 | 93 | <view class="information"> |
93 | - <view class="item"> | |
94 | + <view class="item" wx:if="{{kt_type<3 || is_normal==1}}"> | |
94 | 95 | <view>商品金额</view> |
95 | 96 | <view class="co-red">¥ {{formData.all_price}}元</view> |
96 | 97 | </view> |
98 | + | |
99 | + <view class="item" wx:else> | |
100 | + <view>定金金额</view> | |
101 | + <view class="co-red">¥ {{formData.all_price}}元</view> | |
102 | + </view> | |
103 | + | |
97 | 104 | <view class="item"> |
98 | 105 | <view>配送费用</view> |
99 | 106 | <view class="co-red">¥ {{formData.shipping_price}}元</view> |
100 | 107 | </view> |
101 | - | |
102 | 108 | <view class="item"> |
103 | 109 | <view>使用余额</view> |
104 | 110 | <view class="co-red">- ¥ {{formData.user_money}}元</view> | ... | ... |
pages/cart/cart_wk/cart_wk.js
... | ... | @@ -34,13 +34,23 @@ Page({ |
34 | 34 | enterAddressPage: 0, //进入地址页面 |
35 | 35 | |
36 | 36 | allpice:0, |
37 | - show_pay_type:0, | |
37 | + show_pay_type:0, | |
38 | + | |
39 | + teamgroup: null, | |
38 | 40 | }, |
39 | 41 | |
40 | 42 | /** |
41 | 43 | * 生命周期函数--监听页面加载 |
42 | 44 | */ |
43 | 45 | onLoad: function(options) { |
46 | + | |
47 | + //清空is_pick_up | |
48 | + getApp().request.put("/api/weshop/useraddress/updatePickUp", { | |
49 | + data: {user_id: getApp().globalData.user_id, is_pickup: 0}, | |
50 | + success: function (s) { | |
51 | + } | |
52 | + }); | |
53 | + | |
44 | 54 | var th = this; |
45 | 55 | this.data.order_id = options.order_id; |
46 | 56 | //--初始化-- |
... | ... | @@ -59,12 +69,16 @@ Page({ |
59 | 69 | |
60 | 70 | th.getuser_addr(function(addr) { |
61 | 71 | if(addr==null || addr==undefined || addr.length==0) { |
62 | - th.setData({ enterAddressPage: 1,}); | |
72 | + th.setData({ user_addr: null, enterAddressPage: 1,}); | |
63 | 73 | }else { |
64 | 74 | th.setData({ |
65 | 75 | user_addr: addr, enterAddressPage: 0, |
66 | 76 | }); |
67 | 77 | } |
78 | + | |
79 | + if (th.data.exp_type == 0){ | |
80 | + th.calculate_wuliu(); | |
81 | + } | |
68 | 82 | }) |
69 | 83 | |
70 | 84 | }, |
... | ... | @@ -92,13 +106,9 @@ Page({ |
92 | 106 | |
93 | 107 | //------获取会员收货地址----- |
94 | 108 | getuser_addr: function(func) { |
95 | - var to = getApp(), | |
109 | + var to = getApp(), | |
96 | 110 | a = to.request; |
97 | - if (to.globalData.baddr != null) { | |
98 | - var user_addr = to.globalData.baddr; | |
99 | - to.globalData.baddr = null; | |
100 | - func(user_addr); | |
101 | - } else { | |
111 | + | |
102 | 112 | a.get("/api/weshop/useraddress/page", { |
103 | 113 | data: { |
104 | 114 | user_id: to.globalData.user_id, |
... | ... | @@ -108,17 +118,19 @@ Page({ |
108 | 118 | success: function(su) { |
109 | 119 | var user_addr = su.data.data.pageData; |
110 | 120 | var item = null; |
121 | + var def_item = null; | |
111 | 122 | for (var i = 0; i < user_addr.length; i++) { |
112 | - if (user_addr[i]['is_default'] == 1) { | |
113 | - item = user_addr[i]; | |
114 | - break; | |
115 | - } | |
123 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; } | |
124 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | |
116 | 125 | } |
126 | + | |
127 | + if (item == null) item = def_item; | |
117 | 128 | if (item == null) item = user_addr[0]; |
129 | + if (item == undefined) item = null; | |
118 | 130 | func(item); |
119 | 131 | } |
120 | 132 | }); |
121 | - } | |
133 | + | |
122 | 134 | }, |
123 | 135 | |
124 | 136 | //----------------展示页面,是再获取用户信息之后-------------- |
... | ... | @@ -215,7 +227,9 @@ Page({ |
215 | 227 | jsarr.forEach(function(value,index){ |
216 | 228 | if(count>=value['rynum']) price=value['price']; |
217 | 229 | }) |
218 | - var tail_money=price*order_goods.goods_num-order['order_amount']-order['user_money']; | |
230 | + var tail_money =(price*order_goods.goods_num-order['order_amount']-order['user_money']).toFixed(2); | |
231 | + | |
232 | + tail_money = parseFloat(tail_money); | |
219 | 233 | order.tail_money=tail_money; |
220 | 234 | |
221 | 235 | //--判断物流-- |
... | ... | @@ -242,14 +256,15 @@ Page({ |
242 | 256 | distr_type: distr_type, |
243 | 257 | pickup: pickup, |
244 | 258 | exp_type: exp_type, |
245 | - goods:goods | |
259 | + goods:goods, | |
260 | + teamgroup:teamgroup | |
246 | 261 | }); |
247 | 262 | |
248 | 263 | //--计算物流-- |
249 | 264 | if(exp_type==0){ |
250 | 265 | th.calculate_wuliu(); |
251 | 266 | }else{ |
252 | - var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.pt_tail_money; | |
267 | + var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.tail_money; | |
253 | 268 | allpice = allpice.toFixed(2); |
254 | 269 | th.setData({ exp_price: 0, allpice: allpice }) |
255 | 270 | } |
... | ... | @@ -280,16 +295,19 @@ Page({ |
280 | 295 | this.setData({ |
281 | 296 | exp_type: type |
282 | 297 | }); |
298 | + | |
299 | + | |
300 | + | |
283 | 301 | //--计算物流的值-- |
284 | 302 | if (type == 0) { |
285 | 303 | th.calculate_wuliu(); |
286 | 304 | }else{ |
287 | 305 | var allpice= parseFloat(th.data.order.order_amount) |
288 | 306 | + parseFloat(th.data.order.user_money) |
289 | - +parseFloat(th.data.order.pt_tail_money); | |
307 | + +parseFloat(th.data.order.tail_money); | |
290 | 308 | allpice=allpice.toFixed(2); |
291 | 309 | this.setData({ |
292 | - allpice: allpice | |
310 | + allpice: allpice, exp_price: 0, | |
293 | 311 | }); |
294 | 312 | } |
295 | 313 | }, |
... | ... | @@ -300,6 +318,11 @@ Page({ |
300 | 318 | }, |
301 | 319 | //--弹起支付框-- |
302 | 320 | to_pay(){ |
321 | + //--物流支付时要有地址-- | |
322 | + if (this.data.exp_type == 0 && this.data.user_addr == null) { | |
323 | + return getApp().my_warnning("请选择收货地址", 0, this); | |
324 | + } | |
325 | + | |
303 | 326 | this.setData({show_pay_type:1}); |
304 | 327 | }, |
305 | 328 | |
... | ... | @@ -312,6 +335,12 @@ Page({ |
312 | 335 | //--立即支付-- |
313 | 336 | to_pay_type: function(ind) { |
314 | 337 | var th=this; |
338 | + | |
339 | + //--物流支付时要有地址-- | |
340 | + if (th.data.exp_type == 0 && th.data.user_addr==null){ | |
341 | + return getApp().my_warnning("请选择收货地址",0,th); | |
342 | + } | |
343 | + | |
315 | 344 | //---支付参数-- |
316 | 345 | var dd = { |
317 | 346 | order_sn: th.data.order.order_sn, |
... | ... | @@ -323,6 +352,7 @@ Page({ |
323 | 352 | prom_id:th.data.order.pt_prom_id, |
324 | 353 | tail_pay_type:ind,//0微信支付 1余额支付 |
325 | 354 | }; |
355 | + | |
326 | 356 | if(th.data.exp_type==0){ |
327 | 357 | var index=th.data.index; |
328 | 358 | dd.shipping_code=th.data.wu_arr[index].code; |
... | ... | @@ -348,7 +378,7 @@ Page({ |
348 | 378 | var n=t.data.data; |
349 | 379 | th.weixinPay(n, |
350 | 380 | function () { |
351 | - var allmoney=th.data.order.user_money+th.data.order.order_amount+th.data.order.pt_tail_money; | |
381 | + var allmoney=th.data.allpice; | |
352 | 382 | th.jumpPaymentPage(th.data.order.order_sn,allmoney); |
353 | 383 | },function () { |
354 | 384 | getApp().my_warnning("支付失败",0,th); |
... | ... | @@ -386,12 +416,12 @@ Page({ |
386 | 416 | case 2: |
387 | 417 | if (goods_weight < 0) goods_weight = 0; |
388 | 418 | //累积商品重量 每种商品的重量 * 数量 |
389 | - goods_weight += good['weight'] * good['buynum']; | |
419 | + goods_weight += good['weight'] * th.data.order.order_goods['goods_num']; | |
390 | 420 | break; |
391 | 421 | case 3: |
392 | 422 | if (goods_piece < 0) goods_piece = 0; |
393 | 423 | //累积商品数量 |
394 | - goods_piece += good['buynum']; | |
424 | + goods_piece += th.data.order.order_goods['goods_num']; | |
395 | 425 | break; |
396 | 426 | } |
397 | 427 | var code = th.data.wu_arr[th.data.index].code; |
... | ... | @@ -404,9 +434,11 @@ Page({ |
404 | 434 | var exp_price = parseFloat(shipping_price).toFixed(2); |
405 | 435 | allpice=parseFloat(exp_price)+parseFloat(allpice); |
406 | 436 | allpice=allpice.toFixed(2); |
437 | + | |
438 | + exp_price = parseFloat(exp_price); | |
407 | 439 | th.setData({ exp_price: exp_price,allpice:allpice }) |
408 | 440 | }else { |
409 | - var allpice=th.data.order.order_amount+th.data.order.user_money+th.data.order.pt_tail_money; | |
441 | + var allpice=th.data.order.order_amount+th.data.order.user_money+th.data.order.tail_money; | |
410 | 442 | allpice=allpice.toFixed(2); |
411 | 443 | th.setData({ exp_price: 0,allpice:allpice }) |
412 | 444 | } |
... | ... | @@ -479,7 +511,7 @@ Page({ |
479 | 511 | //--进入收货地址的编辑页面-- |
480 | 512 | enterAddressPage: function() { |
481 | 513 | this.data.enterAddressPage =1, wx.navigateTo({ |
482 | - url: "/pages/user/address_list/address_list?operate=select" | |
514 | + url: "/pages/user/address_list/address_list?is_back=1" | |
483 | 515 | }); |
484 | 516 | }, |
485 | 517 | ... | ... |
pages/cart/cart_wk/cart_wk.json
pages/cart/cart_wk/cart_wk.wxml
1 | -<!--pages/cart/cart_wk/cart_wk.wxml--> | |
2 | - | |
1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
3 | 2 | <!----要进行判断地址是否显示----> |
4 | 3 | <view bindtap="enterAddressPage" class="user-mes" |
5 | 4 | hidden='{{exp_type==1 }}'> |
... | ... | @@ -74,30 +73,30 @@ |
74 | 73 | |
75 | 74 | <!--成团人数--> |
76 | 75 | <view class='chentuan'> |
77 | - <view class='ct_one'> | |
76 | + <view class='ct_one jc_sb'> | |
78 | 77 | <view class='ct_one_left'>成团人数</view> |
79 | - <view class='ct_one_right'><text class='redwz'>1</text>人</view> | |
78 | + <view class='ct_one_right'><text class='redwz'>{{teamgroup.jt_ct_num}}</text>人</view> | |
80 | 79 | </view> |
81 | - <view class='ct_one'> | |
82 | - <view class='ct_one_left'>成团单价</view> | |
83 | - <view class='ct_one_right'>¥<text class='redwz'>{{order.order_amount+order.user_money+order.pt_tail_money}}</text></view> | |
80 | + <view class='ct_one jc_sb'> | |
81 | + <view class='ct_one_left'>成团金额</view> | |
82 | + <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money+order.tail_money,2)}}</text></view> | |
84 | 83 | </view> |
85 | - <view class='ct_one'> | |
84 | + <view class='ct_one jc_sb'> | |
86 | 85 | <view class='ct_one_left'>支付定金</view> |
87 | - <view class='ct_one_right'>¥<text class='redwz'>{{order.order_amount+order.user_money}}</text> | |
86 | + <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money,2)}}</text> | |
88 | 87 | </view> |
89 | 88 | </view> |
90 | 89 | </view> |
91 | 90 | |
92 | 91 | <!--尾款--> |
93 | 92 | <view class='chentuan'> |
94 | - <view class='ct_one'> | |
93 | + <view class='ct_one jc_sb'> | |
95 | 94 | <view class='ct_one_left'>尾款金额</view> |
96 | - <view class='ct_one_right'>¥<text class='redwz'>{{order.pt_tail_money}}</text> | |
95 | + <view class='ct_one_right'>¥<text class='redwz'>{{order.tail_money}}</text> | |
97 | 96 | </view> |
98 | 97 | </view> |
99 | 98 | |
100 | - <view class='ct_one'> | |
99 | + <view class='ct_one jc_sb'> | |
101 | 100 | <view class='ct_one_left'>配送费用</view> |
102 | 101 | <view class='ct_one_right'>¥<text class='redwz'>{{exp_price}}</text> |
103 | 102 | </view> |
... | ... | @@ -108,7 +107,7 @@ |
108 | 107 | <view class='zf'> |
109 | 108 | <view class='zf_left'> |
110 | 109 | <text class='zf_left_wz'>支付合计:</text> |
111 | - <text class='zf_left_red'>¥{{allpice}}</text> | |
110 | + <text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text> | |
112 | 111 | </view> |
113 | 112 | <view class='zf_btn' bindtap="to_pay"> |
114 | 113 | <text>支付尾款</text> |
... | ... | @@ -127,5 +126,4 @@ |
127 | 126 | </view> |
128 | 127 | </block> |
129 | 128 | |
130 | - | |
131 | 129 | <warn id="warn"></warn> |
132 | 130 | \ No newline at end of file | ... | ... |
pages/cart/cart_wk/cart_wk.wxss
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | .user-mes { |
4 | 4 | position: relative; |
5 | 5 | background-color: #fff; |
6 | - font-size: 32rpx; | |
6 | + font-size: 30rpx; | |
7 | 7 | color: #444; |
8 | 8 | } |
9 | 9 | .user-contact { |
... | ... | @@ -60,13 +60,14 @@ |
60 | 60 | } |
61 | 61 | |
62 | 62 | .top { |
63 | - widows: 100%; | |
64 | - background-color: white; | |
65 | - min-height: 70rpx; | |
66 | - display: flex; | |
67 | - padding: 10rpx; | |
68 | - border-bottom: 2rpx solid rgb(238, 238, 238); | |
69 | - margin-top: 20rpx; | |
63 | + | |
64 | + background-color: white; | |
65 | +height: 40px; | |
66 | +display: flex; | |
67 | +padding: 10rpx 0 0 0; | |
68 | +border-bottom: 2rpx solid rgb(238, 238, 238); | |
69 | +margin-top: 10rpx; | |
70 | + | |
70 | 71 | } |
71 | 72 | |
72 | 73 | .t_img image { |
... | ... | @@ -75,7 +76,7 @@ |
75 | 76 | } |
76 | 77 | |
77 | 78 | .t_wz { |
78 | - font-size: 36rpx; | |
79 | + font-size: 30rpx; | |
79 | 80 | font-weight: bold; |
80 | 81 | color: rgb(0, 0, 0); |
81 | 82 | line-height: 65rpx; |
... | ... | @@ -104,7 +105,7 @@ |
104 | 105 | .center .cen_name { |
105 | 106 | height: 120rpx; |
106 | 107 | width: 370rpx; |
107 | - font-size: 36rpx; | |
108 | + font-size: 30rpx; | |
108 | 109 | padding-left: 10rpx; |
109 | 110 | overflow:hidden; |
110 | 111 | text-overflow:ellipsis; |
... | ... | @@ -113,7 +114,7 @@ |
113 | 114 | |
114 | 115 | .center .cen_jg { |
115 | 116 | color: #c4182e; |
116 | - font-size: 40rpx; | |
117 | + font-size: 32rpx; | |
117 | 118 | width: 200rpx; |
118 | 119 | height: 40rpx; |
119 | 120 | text-align: right; |
... | ... | @@ -121,8 +122,7 @@ |
121 | 122 | |
122 | 123 | .center .cen_jg .cen_sl { |
123 | 124 | color: black; |
124 | - font-size: 32rpx; | |
125 | - font-weight: bold; | |
125 | + font-size: 26rpx; | |
126 | 126 | width: 200rpx; |
127 | 127 | height: 38rpx; |
128 | 128 | } |
... | ... | @@ -137,20 +137,20 @@ |
137 | 137 | } |
138 | 138 | |
139 | 139 | .quhou .qu_fs { |
140 | - font-size: 38rpx; | |
140 | + font-size: 30rpx; | |
141 | 141 | display: flex; |
142 | - height: 80rpx; | |
142 | + height: 60rpx; | |
143 | 143 | margin-left: 25rpx; |
144 | 144 | line-height: 62rpx; |
145 | 145 | } |
146 | 146 | |
147 | 147 | .quhou .qu_fs image { |
148 | - width: 46rpx; | |
149 | - height: 46rpx; | |
148 | + width: 34rpx; | |
149 | + height: 34rpx; | |
150 | 150 | margin-right: 18rpx; |
151 | 151 | vertical-align: center; |
152 | 152 | position: relative; |
153 | - top:8rpx | |
153 | + top:14rpx | |
154 | 154 | } |
155 | 155 | |
156 | 156 | .quhou .qu_fs .qu_wz {} |
... | ... | @@ -161,14 +161,14 @@ |
161 | 161 | background-color: white; |
162 | 162 | padding: 20rpx 10rpx; |
163 | 163 | margin-top: 20rpx; |
164 | - font-size: 36rpx; | |
164 | + font-size: 28rpx; | |
165 | 165 | } |
166 | 166 | |
167 | 167 | .chentuan .ct_one { |
168 | 168 | height: 40rpx; |
169 | 169 | margin-bottom: 10rpx; |
170 | 170 | display: flex; |
171 | - width: 100%; | |
171 | + width: 708rpx; | |
172 | 172 | } |
173 | 173 | |
174 | 174 | .chentuan .ct_one .ct_one_left { |
... | ... | @@ -177,7 +177,6 @@ |
177 | 177 | |
178 | 178 | .chentuan .ct_one .ct_one_right { |
179 | 179 | text-align: right; |
180 | - margin-left: 358rpx; | |
181 | 180 | width: 200rpx; |
182 | 181 | } |
183 | 182 | |
... | ... | @@ -190,7 +189,7 @@ |
190 | 189 | width: 100%; |
191 | 190 | min-height: 80rpx; |
192 | 191 | line-height: 80rpx; |
193 | - font-size: 38rpx; | |
192 | + font-size: 30rpx; | |
194 | 193 | position: fixed; |
195 | 194 | bottom: 0; |
196 | 195 | text-align: right; |
... | ... | @@ -208,7 +207,7 @@ |
208 | 207 | .zf .zf_btn { |
209 | 208 | color: white; |
210 | 209 | background-color: #c4182e; |
211 | - font-size: 30rpx; | |
210 | + font-size: 28rpx; | |
212 | 211 | width: 170rpx; |
213 | 212 | text-align: center; |
214 | 213 | line-height: 80rpx; | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -50,8 +50,7 @@ Page({ |
50 | 50 | activeCategoryId: 0, |
51 | 51 | supportPageScroll: !1, |
52 | 52 | address: { |
53 | - address: "", | |
54 | - district: 0 | |
53 | + address: "", district: 0 | |
55 | 54 | }, |
56 | 55 | shipping: "", |
57 | 56 | shippingCost: 0, |
... | ... | @@ -145,7 +144,7 @@ Page({ |
145 | 144 | pd_xx: 0, |
146 | 145 | is_normal: 0, //揚銋 |
147 | 146 | teamgroup:null, //犖撘 |
148 | - grounp_tatal:0, //葵鈭箏 | |
147 | + grounp_tatal:0, //葵鈭箏 | |
149 | 148 | timer:[], |
150 | 149 | |
151 | 150 | //揚銋唳活 |
... | ... | @@ -174,12 +173,10 @@ Page({ |
174 | 173 | quan_list:null, //” |
175 | 174 | |
176 | 175 | coupon:0, |
177 | - | |
178 | 176 | //隡澈仍 |
179 | 177 | share_head:"", |
180 | 178 | share_goods_img:"", |
181 | 179 | |
182 | - | |
183 | 180 | //----------閫ata--------- |
184 | 181 | current: 0,//恣 |
185 | 182 | swiperCurrent:0,//頧格 |
... | ... | @@ -203,15 +200,18 @@ Page({ |
203 | 200 | is_show_pl:0, //掩 |
204 | 201 | is_show_pp:0, // |
205 | 202 | is_show_gb:0, // |
203 | + is_closecoupon:0, | |
204 | + | |
205 | + //韏葉 | |
206 | + iszaning: 0, | |
206 | 207 | }, |
207 | 208 | |
208 | 209 | //------蝸---------- |
209 | 210 | onLoad: function(t) { |
210 | 211 | wx.setNavigationBarTitle({ title: "祕",}) |
211 | - var ee = this, that=ee, | |
212 | + var ee = this, that=ee,th=ee, | |
212 | 213 | gid = t.goods_id; |
213 | 214 | |
214 | - | |
215 | 215 | //憒g_id蝛箇澈 |
216 | 216 | if (gid == undefined || gid == null || gid == "") { |
217 | 217 | gid = decodeURIComponent(postdata.scene); |
... | ... | @@ -221,33 +221,35 @@ Page({ |
221 | 221 | gid: gid |
222 | 222 | }); |
223 | 223 | |
224 | + | |
225 | + getApp().getConfig2(function (e) { | |
226 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { ee.setData({ is_show_pl: 1 }); } | |
227 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { ee.setData({ is_show_pp: 1 }); } | |
228 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { ee.setData({ is_show_gb: 1 }); } | |
229 | + | |
230 | + var json_d = JSON.parse(e.switch_list); | |
231 | + ee.setData({ store_config: e, is_closecoupon: json_d.is_closecoupon }); | |
232 | + ee.init(gid); | |
233 | + //------犖霂遠------- | |
234 | + n.init(th, "", "comments"); | |
235 | + th.requestCardNum(), wx.pageScrollTo && th.setData({ | |
236 | + supportPageScroll: !0 | |
237 | + }); | |
238 | + | |
239 | + }) | |
240 | + | |
241 | + | |
224 | 242 | //霈曉縑嚗捐摨 |
225 | 243 | wx.getSystemInfo({ |
226 | 244 | success: res => { |
227 | 245 | that.setData({ screenWidth: res.screenWidth }) |
228 | 246 | } |
229 | 247 | }) |
230 | - | |
231 | - ee.init(gid); | |
232 | - //------犖霂遠------- | |
233 | - n.init(this, "", "comments"); | |
234 | - this.requestCardNum(), wx.pageScrollTo && this.setData({ | |
235 | - supportPageScroll: !0 | |
236 | - }); | |
237 | - | |
238 | - getApp().getConfig2(function (e) { | |
239 | - | |
240 | - if(e.categoryset.indexOf(","+1+",")!=-1){ ee.setData({is_show_pl:1}); } | |
241 | - if(e.categoryset.indexOf(","+3+",")!=-1){ ee.setData({is_show_pp:1}); } | |
242 | - if(e.categoryset.indexOf(","+2+",")!=-1){ ee.setData({is_show_gb:1}); } | |
243 | - ee.setData({store_config:e}); | |
244 | - }) | |
245 | - | |
246 | 248 | }, |
247 | 249 | |
248 | 250 | //------------蝔------------- |
249 | 251 | async init(gid) { |
250 | - var ee = this, | |
252 | + var ee = this,th=ee, | |
251 | 253 | gallery = null, |
252 | 254 | is_collect = 0, |
253 | 255 | collect_id = 0, |
... | ... | @@ -347,17 +349,19 @@ Page({ |
347 | 349 | } |
348 | 350 | } |
349 | 351 | |
350 | - //----祕△---- | |
351 | - await getApp().request.promiseGet("/api/weshop/prom/coupon/page", { | |
352 | - data: { | |
353 | - store_id: os.stoid, | |
354 | - type:1, | |
355 | - pageSize: 3, | |
356 | - page:1, | |
357 | - }, | |
358 | - }).then(res1 => { | |
359 | - fir_quan=res1.data.data.pageData; | |
360 | - }) | |
352 | + if (th.data.is_closecoupon!=1){ | |
353 | + //----祕△---- | |
354 | + await getApp().request.promiseGet("/api/weshop/prom/coupon/page", { | |
355 | + data: { | |
356 | + store_id: os.stoid, | |
357 | + type:1, | |
358 | + pageSize: 3, | |
359 | + page:1, | |
360 | + }, | |
361 | + }).then(res1 => { | |
362 | + fir_quan=res1.data.data.pageData; | |
363 | + }) | |
364 | + } | |
361 | 365 | |
362 | 366 | |
363 | 367 | //----------------- |
... | ... | @@ -395,8 +399,6 @@ Page({ |
395 | 399 | //---撅內--- |
396 | 400 | onShow: function() { |
397 | 401 | |
398 | - | |
399 | - | |
400 | 402 | this.data.is_timer=1; |
401 | 403 | var ee = this,gid = this.data.gid,i=getApp().request; |
402 | 404 | i.get("/api/weshop/goods/get/" + o.stoid + "/" + ee.data.gid, { |
... | ... | @@ -690,6 +692,7 @@ Page({ |
690 | 692 | user_id: oo.user_id, |
691 | 693 | store_id: th.data.stoid, |
692 | 694 | goods_price: o.shop_price, |
695 | + member_goods_price: o.shop_price, | |
693 | 696 | goods_name: o.goods_name, |
694 | 697 | goods_sn: o.goods_sn, |
695 | 698 | sku: o.sku, |
... | ... | @@ -698,6 +701,7 @@ Page({ |
698 | 701 | //-----憒蝘嚗韐哨妖揚,----- |
699 | 702 | if (th.data.prom_type == 1) { |
700 | 703 | newd.goods_price = th.data.prom_price; |
704 | + newd.member_goods_price= th.data.prom_price, | |
701 | 705 | newd.prom_type = th.data.prom_type; |
702 | 706 | newd.prom_id = th.data.prom_id; |
703 | 707 | } else if (th.data.prom_type == 3) { |
... | ... | @@ -1341,7 +1345,7 @@ Page({ |
1341 | 1345 | } |
1342 | 1346 | //----撌脩----- |
1343 | 1347 | var now = ut.gettimestamp(); |
1344 | - if (t.data.data.end_time < now) { | |
1348 | + if (t.data.data.end_time < now ) { | |
1345 | 1349 | ee.setData({ |
1346 | 1350 | prom_type: 0,isshow:1, |
1347 | 1351 | }); |
... | ... | @@ -1429,7 +1433,7 @@ Page({ |
1429 | 1433 | //----撌脩----- |
1430 | 1434 | if (t.data.data.is_end == 1) { |
1431 | 1435 | ee.setData({ |
1432 | - prom_type: 0,isshow:1, | |
1436 | + prom_type: 0,isshow:1, | |
1433 | 1437 | }); |
1434 | 1438 | ee.get_sku(os.stoid, ee.data.data.sku, gid); |
1435 | 1439 | return false; |
... | ... | @@ -1468,15 +1472,39 @@ Page({ |
1468 | 1472 | th.data.buy_order = odr; |
1469 | 1473 | if (odr.pt_status == 0 && odr.order_status == 1) { |
1470 | 1474 | th.setData({ |
1471 | - user_order_pt_state: 1 | |
1475 | + user_order_pt_state: 1 | |
1472 | 1476 | }); |
1473 | 1477 | } |
1474 | 1478 | if (odr.pt_status == 1 && odr.order_status == 1) { |
1475 | - th.setData({ | |
1476 | - user_order_pt_state: 2 | |
1477 | - }); | |
1479 | + if (odr.is_zsorder == 4){ | |
1480 | + getApp().request.promiseGet("/api/weshop/teamgroup/page/", { | |
1481 | + data: { store_id: os.stoid, team_id: odr.pt_prom_id, listno: odr.pt_listno } | |
1482 | + }).then(res => { | |
1483 | + var now=ut.gettimestamp(); | |
1484 | + var tgr = res.data.data.pageData[0]; | |
1485 | + //憒撌脩鈭 | |
1486 | + if (now >= tgr.kt_end_time){ | |
1487 | + th.update_jiti(tgr.id); | |
1488 | + }else{ | |
1489 | + th.setData({ | |
1490 | + user_order_pt_state: 2 | |
1491 | + }); | |
1492 | + } | |
1493 | + }) | |
1494 | + | |
1495 | + }else{ | |
1496 | + th.setData({ | |
1497 | + user_order_pt_state: 2 | |
1498 | + }); | |
1499 | + } | |
1500 | + } | |
1501 | + | |
1502 | + if (odr.pt_status == 2 && odr.is_zsorder == 4) { | |
1503 | + th.setData({ | |
1504 | + user_order_pt_state: 3, | |
1505 | + }); | |
1506 | + th.data.wk_order_id=odr.order_id; | |
1478 | 1507 | } |
1479 | - | |
1480 | 1508 | } |
1481 | 1509 | }, |
1482 | 1510 | }); |
... | ... | @@ -1892,7 +1920,7 @@ Page({ |
1892 | 1920 | if (newd.kt_type > 1) { |
1893 | 1921 | newd.is_pt_tz = 1; //撘蝐餃 |
1894 | 1922 | } |
1895 | - if (newd.kt_type == 3){ | |
1923 | + if (newd.kt_type == 3 && th.data.is_normal!=1){ | |
1896 | 1924 | th.data.sto_sele_distr=1; |
1897 | 1925 | } |
1898 | 1926 | |
... | ... | @@ -2045,6 +2073,9 @@ Page({ |
2045 | 2073 | } |
2046 | 2074 | |
2047 | 2075 | var iszan=th.data.comments[item_id].userZanNum; |
2076 | + if(this.data.iszaning) return false; | |
2077 | + this.data.iszaning=1; | |
2078 | + | |
2048 | 2079 | |
2049 | 2080 | app.request.post("/api/weshop/commentZan/save",{ |
2050 | 2081 | data:{store_id:o.stoid,user_id:app.globalData.user_id,goods_id:th.data.gid,comment_id:com_id}, |
... | ... | @@ -2052,11 +2083,11 @@ Page({ |
2052 | 2083 | |
2053 | 2084 | if (ee.data.code == "-1") { |
2054 | 2085 | app.my_warnning("銝蝏撌梁韏", 0, th); |
2086 | + th.data.iszaning=0; | |
2055 | 2087 | return; |
2056 | 2088 | } |
2057 | 2089 | |
2058 | 2090 | if(ee.data.code==0 && iszan!=1){ |
2059 | - | |
2060 | 2091 | var num=th.data.comments[item_id].zan_num; num++; |
2061 | 2092 | var text="comments["+item_id+"].zan_num"; |
2062 | 2093 | var text1="comments["+item_id+"].userZanNum"; |
... | ... | @@ -2064,6 +2095,7 @@ Page({ |
2064 | 2095 | _errObj[text]=num; |
2065 | 2096 | _errObj[text1]=1; |
2066 | 2097 | th.setData(_errObj); |
2098 | + | |
2067 | 2099 | }else{ |
2068 | 2100 | var num=th.data.comments[item_id].zan_num; num--; |
2069 | 2101 | var text="comments["+item_id+"].zan_num"; |
... | ... | @@ -2073,6 +2105,11 @@ Page({ |
2073 | 2105 | _errObj[text1]=0; |
2074 | 2106 | th.setData(_errObj); |
2075 | 2107 | } |
2108 | + | |
2109 | + setTimeout(function(){ | |
2110 | + th.data.iszaning = 0; | |
2111 | + },500) | |
2112 | + | |
2076 | 2113 | } |
2077 | 2114 | }) |
2078 | 2115 | }, |
... | ... | @@ -2215,10 +2252,7 @@ Page({ |
2215 | 2252 | //---鈭批妍--- |
2216 | 2253 | //銵 嚗1anvas撖寡情嚗2 3氖撌虫儒氖 4氖憿園氖 56捐摨 |
2217 | 2254 | console.log("ssssssss", th.data.data.goods_name); |
2218 | - | |
2219 | -f //銵 嚗1anvas撖寡情嚗2 3氖撌虫儒氖 4氖憿園氖 56捐摨 | |
2220 | - console.log("ssssssss", th.data.data.goods_name); | |
2221 | - | |
2255 | + | |
2222 | 2256 | context.setFillStyle("black"); |
2223 | 2257 | context.setFontSize(21.3 * unit) |
2224 | 2258 | th.draw_Text(context, th.data.data.goods_name, |
... | ... | @@ -2248,7 +2282,6 @@ f //銵 嚗1anvas撖寡情嚗2 3氖撌虫 |
2248 | 2282 | //-------憭批撠曹鈭----------- |
2249 | 2283 | switch (type) { |
2250 | 2284 | case 0: //內 |
2251 | - case 1: //蝘內 | |
2252 | 2285 | //銝剝葵摮 |
2253 | 2286 | var g_path = "../../../images/share/s_gou.png"; |
2254 | 2287 | context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); |
... | ... | @@ -2278,6 +2311,26 @@ f //銵 嚗1anvas撖寡情嚗2 3氖撌虫 |
2278 | 2311 | //---鈭輕--- |
2279 | 2312 | context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit); |
2280 | 2313 | break; |
2314 | + case 1: //蝘內 | |
2315 | + //---蝥--- | |
2316 | + context.setLineWidth(1 * unit) | |
2317 | + context.moveTo(32 * unit, 670 * unit) | |
2318 | + context.lineTo(520 * unit, 670 * unit) | |
2319 | + context.stroke(); | |
2320 | + | |
2321 | + //蝘 | |
2322 | + var miaos_path='../../../images/share/miao_share.png'; | |
2323 | + context.drawImage(miaos_path, 43 * unit, 700 * unit, 222 * unit, 40 * unit); | |
2324 | + | |
2325 | + //------ | |
2326 | + context.setFontSize(22 * unit) | |
2327 | + context.setFillStyle("black") | |
2328 | + context.fillText("末嚗蝘", 40 * unit, 806 * unit); | |
2329 | + context.fillText("鈭輕撘憪韐", 40 * unit, 846 * unit); | |
2330 | + //---鈭輕--- | |
2331 | + context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit); | |
2332 | + break; | |
2333 | + | |
2281 | 2334 | case 2://隡振內 |
2282 | 2335 | //---蝥--- |
2283 | 2336 | context.setLineWidth(1 * unit) |
... | ... | @@ -2558,6 +2611,37 @@ f //銵 嚗1anvas撖寡情嚗2 3氖撌虫 |
2558 | 2611 | getApp().goto(url); |
2559 | 2612 | }, |
2560 | 2613 | |
2614 | + //--頝唾蓮隞偏甈曄-- | |
2615 | + go_pay_wk:function () { | |
2616 | + var url = "/pages/cart/cart_wk/cart_wk?order_id="+ this.data.wk_order_id; | |
2617 | + getApp().goto(url); | |
2618 | + }, | |
2619 | + | |
2620 | + pop_err_img:function(e){ | |
2621 | + var txt = e.currentTarget.dataset.errorimg; | |
2622 | + var ob={}; | |
2623 | + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
2624 | + this.setData(ob); | |
2625 | + }, | |
2561 | 2626 | |
2627 | + //--靚璇臬-- | |
2628 | + update_jiti:function(id){ | |
2629 | + var th=this; | |
2630 | + //--璇臬-- | |
2631 | + getApp().request.put("/api/weshop/teamgroup/updateTeamOrder/"+os.stoid+"/"+id, { | |
2632 | + success: function (ee) { | |
2633 | + //--蝑0閬隞偏甈橘靚憭梯揖嚗停閬霂行-- | |
2634 | + if (ee.data.code==0) { | |
2635 | + th.setData({ | |
2636 | + user_order_pt_state: 3, | |
2637 | + }); | |
2638 | + }else if(ee.data.code==-1){ | |
2639 | + th.setData({ | |
2640 | + user_order_pt_state: 2, | |
2641 | + }); | |
2642 | + } | |
2643 | + } | |
2644 | + }) | |
2645 | + } | |
2562 | 2646 | |
2563 | 2647 | }); |
2564 | 2648 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -2,9 +2,7 @@ |
2 | 2 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> |
3 | 3 | |
4 | 4 | <wxs module="" src="filter.wxs"></wxs> |
5 | - | |
6 | 5 | <block wx:if="{{isshow}}"> |
7 | - | |
8 | 6 | <view class="container"> |
9 | 7 | <view class="type-navbar"> |
10 | 8 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
... | ... | @@ -126,9 +124,10 @@ |
126 | 124 | <view class="pt_fir_title "> |
127 | 125 | <!-- 许程 商家团主页 --> |
128 | 126 | <view class="xc-goods-explain flex-vertical-between"> |
129 | - <view class="xc-explain fs32 ellipsis-2" wx:if="{{data.prom_type!=0}}"> | |
127 | + <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> | |
130 | 128 | {{data.goods_name}} |
131 | 129 | </view> |
130 | + | |
132 | 131 | <view class="xc-share-frame-jieti flex" bindtap="saveImageToPhotosAlbum" style="top:0"> |
133 | 132 | <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> |
134 | 133 | <view class="share-font">分享</view> |
... | ... | @@ -253,7 +252,7 @@ |
253 | 252 | </view> |
254 | 253 | </view> |
255 | 254 | |
256 | - <view class="goods-num" wx:if="{{data.prom_type!=1}}"> | |
255 | + <view class="goods-num" wx:if="{{prom_type!=1}}"> | |
257 | 256 | <view class="sales">销量:{{data.sales_sum}}件</view> |
258 | 257 | <view class="stock">折扣:{{data.disc}}折</view> |
259 | 258 | <view class="stock">{{categories3[0].num}}人评价</view> |
... | ... | @@ -268,29 +267,40 @@ |
268 | 267 | <view class="word-line fs24 xc-unit-price">零售价¥{{data.market_price}}</view> |
269 | 268 | </view> |
270 | 269 | <view class="xc-val-price"> |
271 | - <view class="fs30" style='padding-left:13rpx;'>已抢:{{prom_act.buy_num}}件</view> | |
270 | + <view class="fs30" style='padding-left:13rpx;'>已抢:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
272 | 271 | <view class="fs30 save t-c">秒杀立省¥{{filters.toFix(data.market_price-prom_price,2)}}</view> |
273 | 272 | </view> |
274 | 273 | </view> |
275 | 274 | </view> |
276 | 275 | <view style='height:42rpx'></view> |
277 | - <view class="xc-explain fs32 ellipsis-2" wx:if="{{data.prom_type!=0}}"> | |
276 | + <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0}}"> | |
278 | 277 | {{data.goods_name}} |
279 | 278 | </view> |
280 | 279 | |
281 | 280 | <view wx:if="{{prom_type==1}}" style='height:58rpx'></view> |
282 | 281 | <!-- 许程 7.24 暂时注释 --> |
283 | - <view wx:if="{{prom_type!=1}}"> | |
284 | - <view class="goods-num" wx:if="{{data.prom_type==1}}"> | |
285 | - <view class="stock">总数量:{{prom_act.goods_num}}件</view> | |
286 | - <view class="stock">限购:{{prom_act.buy_limit}}件</view> | |
287 | - <view class="sales">已购:{{prom_act.buy_num}}件</view> | |
282 | + <view wx:if="{{prom_type==1}}"> | |
283 | + <view class="goods-num" wx:if="{{prom_type==1}}"> | |
284 | + | |
285 | + <block wx:if="prom_st>0" > | |
286 | + <view class="stock">总数量:{{prom_act.goods_num+prom_act.virtual}}件</view> | |
287 | + <view class="stock">限购:{{prom_act.buy_limit}}件</view> | |
288 | + <view class="sales">已购:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
289 | + </block> | |
290 | + | |
291 | + <block wx:else> | |
292 | + <view class="stock">总数量:{{prom_act.goods_num}}件</view> | |
293 | + <view class="stock">限购:{{prom_act.buy_limit}}件</view> | |
294 | + <view class="sales">已购:{{prom_act.buy_num}}件</view> | |
295 | + </block> | |
296 | + | |
288 | 297 | </view> |
289 | 298 | </view> |
299 | + | |
290 | 300 | </view> |
291 | 301 | </block> |
292 | 302 | <!--许程 7.24暂时注释 --> |
293 | - <view wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1}}"> | |
303 | + <view wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}"> | |
294 | 304 | <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> |
295 | 305 | <view class="cx-sizs wsize">领券</view> |
296 | 306 | <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="{{index}}"> |
... | ... | @@ -682,11 +692,11 @@ |
682 | 692 | |
683 | 693 | </view> |
684 | 694 | <!---阶梯团----> |
685 | - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3}}" class="buy-btn cart-btn line-h"> | |
695 | + <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h"> | |
686 | 696 | <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> |
687 | 697 | <view>支付定金</view> |
688 | 698 | </view> |
689 | - | |
699 | + | |
690 | 700 | <view wx:if="{{prom_st==0}}" class="buy-btn cart-btn lanse">即将开始</view> |
691 | 701 | <view wx:if="{{prom_r_null}}" class="buy-btn cart-btn huise">已抢光</view> |
692 | 702 | <view wx:if="{{prom_st==3 && !prom_r_null}}" class="buy-btn cart-btn lanse">活动已经结束</view> |
... | ... | @@ -694,6 +704,7 @@ |
694 | 704 | <block wx:else> |
695 | 705 | <view bindtap="go_to_nopay" wx:if="{{user_order_pt_state==1}}" class="buy-btn cart-btn huise">您还未支付</view> |
696 | 706 | <view bindtap="go_to_team_show" wx:if="{{user_order_pt_state==2}}" class="buy-btn cart-btn">查看支付详情</view> |
707 | + <view wx:if="{{user_order_pt_state==3}}" bindtap="go_pay_wk" class="buy-btn cart-btn">支付尾款</view> | |
697 | 708 | </block> |
698 | 709 | </block> |
699 | 710 | <!---<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:else>立即兑换</view>--> |
... | ... | @@ -711,9 +722,9 @@ |
711 | 722 | <view class="pding"> |
712 | 723 | <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> |
713 | 724 | <view class="spec-goods"> |
714 | - <image class="wh100 spec-img" src="{{data.original_img}}" binderror="" data-errorimg="data.original_img"></image> | |
725 | + <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
715 | 726 | <view class="spec-goods-info"> |
716 | - <view class="spec-goods-name">{{data.goods_name}}</view> | |
727 | + <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> | |
717 | 728 | <view class="spec-goods-price" wx:if="{{prom_price==null}}">¥ {{sele_g.shop_price}}</view> |
718 | 729 | <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> |
719 | 730 | <block wx:if="{{prom_type==0}}"> |
... | ... | @@ -722,7 +733,8 @@ |
722 | 733 | <view class="spec-goods-stock">已选:{{sku_g[0].gg}}</view> |
723 | 734 | </block> |
724 | 735 | <block wx:if="{{prom_type==1}}"> |
725 | - <view class="spec-goods-stock">已售:{{prom_act.buy_num+prom_act.virtual}}</view> | |
736 | + <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num+prom_act.virtual}}</view> | |
737 | + <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> | |
726 | 738 | <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> |
727 | 739 | <view class="spec-goods-stock">已选:{{sku_g[0].gg}}</view> |
728 | 740 | </block> |
... | ... | @@ -796,11 +808,10 @@ |
796 | 808 | <view class="pding"> |
797 | 809 | <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> |
798 | 810 | <view class="spec-goods"> |
799 | - <image class="wh100 spec-img" src="{{data.original_img}}" binderror="" data-errorimg="data.original_img"></image> | |
811 | + <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
800 | 812 | <view class="spec-goods-info"> |
801 | - <view class="spec-goods-name">{{data.goods_name}}</view> | |
802 | - <view class="spec-goods-price" wx:if="{{is_normal==1}}">¥ {{sele_g.shop_price}} | |
803 | - </view> | |
813 | + <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> | |
814 | + <view class="spec-goods-price" wx:if="{{is_normal==1}}">¥ {{sele_g.shop_price}}</view> | |
804 | 815 | <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> |
805 | 816 | |
806 | 817 | <block wx:if="{{is_normal==0}}"> |
... | ... | @@ -810,7 +821,7 @@ |
810 | 821 | </block> |
811 | 822 | <block wx:else> |
812 | 823 | <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> |
813 | - <view class="spec-goods-stock">可售:{{sele_g.store_count-sele_g.sales_sum}}</view> | |
824 | + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | |
814 | 825 | <view class="spec-goods-stock">已选:{{sku_g_pt[0].gg}}</view> |
815 | 826 | </block> |
816 | 827 | </view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
... | ... | @@ -505,13 +505,13 @@ view.cart-btn-lg { |
505 | 505 | /* padding: 0 30rpx; */ |
506 | 506 | font-size: 32rpx; |
507 | 507 | box-sizing: border-box; |
508 | - overflow-x: hidden; | |
508 | + | |
509 | 509 | } |
510 | 510 | |
511 | 511 | .spec-model .pding{padding: 0 30rpx;} |
512 | 512 | |
513 | 513 | .spec-goods { |
514 | - padding: 15rpx 0 30rpx; | |
514 | + padding: 15rpx 0 10rpx; | |
515 | 515 | float: left; |
516 | 516 | width: 100%; |
517 | 517 | border-bottom: 1px solid #f8f8f8; |
... | ... | @@ -519,15 +519,17 @@ view.cart-btn-lg { |
519 | 519 | |
520 | 520 | .spec-img { |
521 | 521 | float: left; |
522 | - height: 150rpx; | |
523 | - width: 150rpx; | |
524 | - margin-top: 16rpx; | |
522 | + height: 186rpx; | |
523 | + width: 186rpx; | |
524 | + position: relative; | |
525 | + top:-40rpx; | |
526 | + border: 4rpx solid #eee | |
525 | 527 | } |
526 | 528 | |
527 | 529 | .spec-goods-info { |
528 | 530 | float: left; |
529 | 531 | padding: 0 25rpx; |
530 | - width: 490rpx; | |
532 | + width: 400rpx; | |
531 | 533 | } |
532 | 534 | |
533 | 535 | .spec-goods-name { |
... | ... | @@ -541,13 +543,13 @@ view.cart-btn-lg { |
541 | 543 | |
542 | 544 | .spec-goods-price { |
543 | 545 | color: #ec5151; |
544 | - font-size: 30rpx; | |
546 | + font-size: 33rpx; | |
545 | 547 | font-weight: bold; |
546 | 548 | } |
547 | 549 | |
548 | 550 | .spec-goods-stock { |
549 | - margin-top: 10rpx; | |
550 | - font-size: 26rpx; | |
551 | + margin-top: 3rpx; | |
552 | + font-size: 24rpx; | |
551 | 553 | color: #999999; |
552 | 554 | } |
553 | 555 | |
... | ... | @@ -926,7 +928,7 @@ left:31rpx;} |
926 | 928 | |
927 | 929 | .bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 0 34rpx; color: #333; |
928 | 930 | font-size: 32rpx; height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:31rpx } |
929 | -.red_bb{ color: #d70026; width:158rpx} | |
931 | +.red_bb{ color: #d70026; min-width:158rpx;width: auto;} | |
930 | 932 | .bg_jj{ width: 18rpx; height:18rpx; |
931 | 933 | border-top: 2rpx solid #d70026; |
932 | 934 | border-right: 2rpx solid #d70026; |
... | ... | @@ -2207,8 +2209,10 @@ padding:0 20rpx; |
2207 | 2209 | height:56rpx; |
2208 | 2210 | } |
2209 | 2211 | .xc-person-number{ |
2210 | - width:122rpx; | |
2212 | + width:120rpx; | |
2211 | 2213 | color: #999999; |
2214 | + padding-left:8rpx; | |
2215 | + text-align: left | |
2212 | 2216 | } |
2213 | 2217 | |
2214 | 2218 | .xc-miaosha-time{ | ... | ... |
pages/index/index/index.js
... | ... | @@ -194,7 +194,7 @@ Page({ |
194 | 194 | //------新品------- |
195 | 195 | await getApp().request.promiseGet("/api/weshop/goods/page?page=1", { |
196 | 196 | data: { |
197 | - is_mainshow: 1, isonsale: 1, is_on_sale: 1, store_id: o.stoid, pageSize: 9,is_new:1 | |
197 | + is_mainshow: 1, isonsale: 1, is_on_sale: 1, store_id: o.stoid, pageSize: 9,is_new:1,orderField:"sort" | |
198 | 198 | } |
199 | 199 | }).then(res => { |
200 | 200 | var e = res; |
... | ... | @@ -214,7 +214,7 @@ Page({ |
214 | 214 | //------热卖------- |
215 | 215 | await getApp().request.promiseGet("/api/weshop/goods/page?page=1", { |
216 | 216 | data: { |
217 | - is_mainshow: 1, isonsale: 1, is_on_sale: 1, store_id: o.stoid, pageSize: 9,is_hot:1 | |
217 | + is_mainshow: 1, isonsale: 1, is_on_sale: 1, store_id: o.stoid, pageSize: 9,is_hot:1,orderField:"sort" | |
218 | 218 | } |
219 | 219 | }).then(res => { |
220 | 220 | var e = res; | ... | ... |
pages/team/team_ping/team_ping.js
... | ... | @@ -90,34 +90,34 @@ Page({ |
90 | 90 | order_goods=null;//订单商品表 |
91 | 91 | |
92 | 92 | //获取订单表的信息根据活动user_id,pt_prom_id>0 AND pay_time>0 |
93 | + /*--- | |
93 | 94 | await getApp().request.promiseGet("/api/weshop/order/page?"+where, { |
94 | 95 | data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,} |
95 | 96 | }).then(res => { |
96 | 97 | order = res.data.data.pageData; |
97 | 98 | this.data.currentPage++; |
99 | + })--*/ | |
100 | + | |
101 | + await getApp().request.promiseGet("/api/weshop/order/pageTuan?"+where, { | |
102 | + data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,} | |
103 | + }).then(res => { | |
104 | + order = res.data.data.pageData; | |
105 | + this.data.currentPage++; | |
98 | 106 | }) |
99 | 107 | |
108 | + | |
100 | 109 | wx.showLoading({ title: "加载中"}); |
101 | 110 | for (i = 0; i < order.length; i++) { |
102 | 111 | //获取订单从表信息 |
103 | - await getApp().request.promiseGet("/api/weshop/ordergoods/page", { | |
112 | + await getApp().request.promiseGet("/api/weshop/ordergoods/pageGoods", { | |
104 | 113 | data: { store_id: os.stoid, order_id: order[i].order_id } |
105 | 114 | }).then(res => { |
106 | 115 | order_goods = res.data.data.pageData; |
107 | 116 | order[i].order_goods = order_goods; |
117 | + order[i].gimage = ee.data.imageurl + order_goods[0].original_img; | |
108 | 118 | }) |
109 | 119 | |
110 | - for (var j = 0; j < order_goods.length;j++){ | |
111 | - //获取商品表信息 | |
112 | - await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + order_goods[j].goods_id, { | |
113 | - data: {} | |
114 | - }).then(res => { | |
115 | - goods = res.data.data; | |
116 | - order[i].goods = goods; | |
117 | - order[i].original_img = this.data.imageurl + goods.original_img; | |
118 | - }) | |
119 | - } | |
120 | - | |
120 | + | |
121 | 121 | //获取订单表信息根据上面查询的订单号order[i].pt_listno |
122 | 122 | await getApp().request.promiseGet("/api/weshop/order/pagePtList", { |
123 | 123 | data: { store_id: os.stoid, pt_listno: order[i].pt_listno,pageSize:60,page:1} |
... | ... | @@ -128,43 +128,19 @@ Page({ |
128 | 128 | order[i].tx=ordertx; |
129 | 129 | }) |
130 | 130 | |
131 | - var teamlist=null; | |
132 | - //获取团的信息 | |
133 | - await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + order[i].pt_prom_id,{ | |
134 | - 1:1 | |
135 | - }).then(res=>{ | |
136 | - teamlist=res.data.data; | |
137 | - order[i].ct_num=teamlist.ct_num; | |
138 | - }) | |
131 | + | |
139 | 132 | |
140 | - if (teamlist.kttype == 3) { | |
133 | + if (order[i].is_zsorder== 4) { | |
141 | 134 | var num = 0; |
142 | - var jt_data = JSON.parse(teamlist.ct_rylist); | |
135 | + var jt_data = JSON.parse(order[i].ct_rylist); | |
143 | 136 | for (var m in jt_data) { |
144 | 137 | if (jt_data[m].rynum > num) num = jt_data[m].rynum; |
145 | 138 | } |
146 | 139 | order[i].max_ct_num = num; |
147 | 140 | } |
148 | 141 | |
149 | - | |
150 | - var teamgroup=null; | |
151 | - //获取活动从表信息team_id:305暂时 | |
152 | - await getApp().request.promiseGet("/api/weshop/teamgroup/page" , { | |
153 | - data: { store_id: os.stoid, listno: order[i].pt_listno, team_id: order[i].pt_prom_id } | |
154 | - }).then(res => { | |
155 | - teamgroup = res.data.data.pageData[0]; | |
156 | - }) | |
157 | - | |
158 | - //--正在进行中的团,才有时间倒计时-- | |
159 | - if(teamgroup && teamgroup.state==2) { | |
160 | - order[i].kt_end_time = teamgroup.kt_end_time; | |
161 | - //---如果参团的人数没有3个人,则要体现沙发--- | |
162 | - order[i].tg_state = teamgroup.state; | |
163 | - | |
164 | - } | |
165 | - | |
166 | - var sf_num=teamlist.ct_num; | |
167 | - if(teamlist.ct_num>=3){ sf_num=3;} | |
142 | + var sf_num = order[i].ct_num; | |
143 | + if (order[i].ct_num>=3){ sf_num=3;} | |
168 | 144 | sf_num=sf_num-ordertx.length; |
169 | 145 | if(sf_num>0) { |
170 | 146 | var arr = []; |
... | ... | @@ -181,7 +157,7 @@ Page({ |
181 | 157 | } |
182 | 158 | |
183 | 159 | wx.hideLoading(); |
184 | - ee.setData({ order: this.data.requestData, ordertx:ordertx}); | |
160 | + ee.setData({ order: this.data.requestData, ordertx: ordertx, isgo:1}); | |
185 | 161 | }, |
186 | 162 | |
187 | 163 | //---滚动到底部加载更多--- |
... | ... | @@ -245,6 +221,13 @@ Page({ |
245 | 221 | return param < 10 ? '0' + param : param; |
246 | 222 | }, |
247 | 223 | |
224 | + images_err:function(e){ | |
225 | + var txt = e.currentTarget.dataset.err; | |
226 | + var ob={}; | |
227 | + ob[txt] = this.data.imageurl + "/miniapp/images/default_g_img.gif"; | |
228 | + this.setData(ob); | |
229 | + } | |
230 | + | |
248 | 231 | |
249 | 232 | }) |
250 | 233 | ... | ... |
pages/team/team_ping/team_ping.wxml
1 | -<!--pages/team_ping/team_ping.wxml--> | |
1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
2 | 2 | |
3 | 3 | <!--选择款--> |
4 | 4 | <view class='top'> |
... | ... | @@ -15,26 +15,25 @@ |
15 | 15 | <!--top--> |
16 | 16 | <view class='pd-list-top'> |
17 | 17 | <!-- <image src='{{iurl}}/miniapp/images/dianpu.png'></image> --> |
18 | - <text class='pd-wz'>订单编号:{{item.order_sn}}</text> | |
18 | + <text class='pd-wz'>订单编号:{{item.order_sn}}</text> | |
19 | 19 | <image class='jt' src='{{iurl}}/miniapp/images/icojiantou1.png'></image> |
20 | 20 | </view> |
21 | 21 | <!--image--> |
22 | 22 | <view class='pd-list-image'> |
23 | 23 | <view class="xc-list flex"> |
24 | 24 | <view class="frame"> |
25 | - <image src='{{item.original_img}}'></image> | |
25 | + <image src='{{item.gimage}}' binderror='images_err' data-err="order[{{index}}].gimage"></image> | |
26 | 26 | </view> |
27 | 27 | <view> |
28 | - <view class='pd-img-wz1 ellipsis-2'>{{item.goods.goods_name}} | |
28 | + <view class='pd-img-wz1 ellipsis-2'>{{item.order_goods[0].goods_name}} | |
29 | 29 | </view> |
30 | 30 | |
31 | - | |
32 | 31 | |
33 | 32 | <view class="flex-space-between {{item.pt_status==1? 'xc-price-sn':'xc-price-no'}}"> |
34 | 33 | <view class="flex"> |
35 | 34 | <text class='fs24 xc-wc {{item.pt_status==1?"xc-rmbs":"xc-rmb"}}'>¥</text> |
36 | 35 | <view class='pd-jg xc-wc'>{{item.order_goods[0].goods_price}}</view> |
37 | - <view class="flex word-line xc-ash {{item.pt_status==1?'xc-rmbs':'xc-rmb'}}"><text class="fs24 xc-black">零售价:</text><text class="fs24 xc-wc">¥</text><text class="fs26 xc-wc">{{item.order_goods[0].market_price}}</text> </view> | |
36 | + <view class="flex word-line xc-ash {{item.pt_status==1?'xc-rmbs':'xc-rmb'}}"><text class="fs24 xc-black">零售价:</text><text class="fs24 xc-wc">¥</text><text class="fs26 xc-wc">{{item.order_goods[0].market_price}}</text> </view> | |
38 | 37 | </view> |
39 | 38 | <view class="xc-still-bad flex fs24" wx:if="{{item.pt_status==1}}"> |
40 | 39 | <block wx:if="{{item.ct_num-item.tx.length>0}}"> |
... | ... | @@ -63,9 +62,24 @@ |
63 | 62 | <view style='width:100%;border-bottom:10rpx solid #eee; '> |
64 | 63 | <view class='pd-list-foot'> |
65 | 64 | <view class='foot-left'> |
66 | - 共{{item.order_goods[0].goods_num}}件, 金额: | |
67 | - <text class="xc-wc">¥</text> | |
68 | - <view class='foot-l-wz fs35'>{{item.user_money+item.order_amount}}</view> | |
65 | + 共{{item.order_goods[0].goods_num}}件, | |
66 | + <block wx:if="{{item.is_zsorder==4}}"> | |
67 | + <block wx:if="{{item.pt_status==3 || item.pt_status==4 || item.pt_status==5 || item.pt_status==6}}"> | |
68 | + 金额:<text class="xc-wc">¥</text> | |
69 | + <view class='foot-l-wz fs35'>{{filters.toFix(item.user_money+item.order_amount+item.pt_tail_money,2)}}</view> | |
70 | + </block> | |
71 | + <block wx:else> | |
72 | + <view class='foot-l-wz fs35' wx:if="item.is_zsorder==4"> | |
73 | + 定金:¥{{filters.toFix(item.order_amount+item.user_money,2)}}</view> | |
74 | + <view class='foot-l-wz fs35' wx:else>金额:¥{{filters.toFix(item.order_amount+item.user_money,2)}}</view> | |
75 | + <view class='foot-l-wz2 fs35' wx:if="{{item.pt_tail_money>0}}">尾款:¥{{item.pt_tail_money}}</view> | |
76 | + </block> | |
77 | + | |
78 | + </block> | |
79 | + <block wx:else> | |
80 | + 金额:<text class="xc-wc">¥</text> | |
81 | + <view class='foot-l-wz fs35'>{{filters.toFix(item.user_money+item.order_amount,2)}}</view> | |
82 | + </block> | |
69 | 83 | </view> |
70 | 84 | |
71 | 85 | <view class='foot-right'> |
... | ... | @@ -92,7 +106,7 @@ |
92 | 106 | |
93 | 107 | </view> |
94 | 108 | <view class='bodytimecen flex' wx:if="{{item.pt_status==1}}"> |
95 | - 剩余: | |
109 | + 剩余: | |
96 | 110 | <span>{{item.djs.day}}</span>天 |
97 | 111 | <span>{{item.djs.hou}}</span>时 |
98 | 112 | <span>{{item.djs.min}}</span>分 |
... | ... | @@ -104,6 +118,6 @@ |
104 | 118 | |
105 | 119 | |
106 | 120 | </view> |
107 | -<view wx:else> | |
108 | -<view class='kon'>暂无更多</view> | |
121 | +<view wx:elif="{{isgo}}"> | |
122 | + <view class='kon'>暂无更多</view> | |
109 | 123 | </view> |
110 | 124 | \ No newline at end of file | ... | ... |
pages/team/team_ping/team_ping.wxss
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | .pd-wz{ |
92 | 92 | |
93 | 93 | display: inline-block; |
94 | - font-size: 25rpx; | |
94 | + font-size: 28rpx; | |
95 | 95 | line-height: 76rpx; |
96 | 96 | color: #000; |
97 | 97 | font-weight: normal; |
... | ... | @@ -123,10 +123,7 @@ height:222rpx; |
123 | 123 | .pd-list-image .xc-list .frame image{ |
124 | 124 | width: 182rpx; |
125 | 125 | height: 182rpx; |
126 | - | |
127 | - background-color: red; | |
128 | 126 | margin-right:20rpx; |
129 | - | |
130 | 127 | } |
131 | 128 | |
132 | 129 | .pd-img-wz1{ |
... | ... | @@ -175,34 +172,28 @@ height:222rpx; |
175 | 172 | |
176 | 173 | |
177 | 174 | .pd-list-foot{ |
178 | - | |
179 | - width: 100%; | |
175 | + width: 100%; | |
180 | 176 | margin: auto; |
181 | - overflow: hidden; | |
182 | - height: 105rpx; | |
183 | - font-size: 28rpx; | |
177 | + font-size: 28rpx; | |
184 | 178 | line-height: 105rpx; |
185 | 179 | color: #000; |
186 | 180 | display: flex; |
187 | 181 | justify-content:space-between; |
188 | - | |
189 | - | |
182 | + | |
190 | 183 | } |
191 | - | |
184 | + | |
192 | 185 | .foot-l-wz{ |
193 | - padding-right: 10rpx; | |
186 | + padding-right: 10rpx; | |
194 | 187 | display: inline-block; |
195 | - font-size: 34rpx; | |
196 | - line-height: 100rpx; | |
197 | - color: #e4374d; | |
188 | + font-size: 30rpx; | |
189 | + color: #e4374d; | |
198 | 190 | font-weight: normal; |
199 | 191 | } |
200 | 192 | |
201 | 193 | .foot-left{ |
202 | 194 | |
203 | - margin-left:19rpx; | |
204 | -min-width: 360rpx; | |
205 | - height: 100rpx; | |
195 | + margin-left:19rpx; | |
196 | + min-width: 360rpx; | |
206 | 197 | line-height: 100rpx; |
207 | 198 | font-size:26rpx; |
208 | 199 | } |
... | ... | @@ -293,7 +284,7 @@ margin-right: 20rpx; |
293 | 284 | display: inline-block; |
294 | 285 | width: 33.33%; |
295 | 286 | color: #777777; |
296 | - font-size: 36rpx; | |
287 | + font-size: 32rpx; | |
297 | 288 | } |
298 | 289 | .on{ color:#e4374d; |
299 | 290 | border-bottom: 5rpx solid #e4374d;} |
... | ... | @@ -331,6 +322,7 @@ margin-right: 20rpx; |
331 | 322 | justify-content:flex-end; |
332 | 323 | width:97%; |
333 | 324 | margin-bottom:40rpx; |
325 | + line-height: 36rpx; | |
334 | 326 | |
335 | 327 | } |
336 | 328 | |
... | ... | @@ -338,11 +330,8 @@ margin-bottom:40rpx; |
338 | 330 | color: #e4374d; |
339 | 331 | border-radius: 7rpx; |
340 | 332 | font-size: 25rpx; |
341 | - | |
342 | - letter-spacing:4; | |
343 | -margin-right:8rpx; | |
344 | - | |
345 | - | |
333 | + margin-right:8rpx; | |
334 | + line-height: 36rpx | |
346 | 335 | } |
347 | 336 | .xc-price-sn{ |
348 | 337 | height:73rpx; |
... | ... | @@ -378,4 +367,12 @@ line-height:100rpx; |
378 | 367 | line-height:121rpx; |
379 | 368 | margin-left:5rpx; |
380 | 369 | |
370 | +} | |
371 | + | |
372 | +.foot-l-wz2{ | |
373 | + font-size: 30rpx; | |
374 | + color: #e4374d; | |
375 | + font-weight: normal; | |
376 | + margin-top:-40rpx; | |
377 | + margin-left:78rpx | |
381 | 378 | } |
382 | 379 | \ No newline at end of file | ... | ... |
pages/team/team_show/team_show.js
... | ... | @@ -293,6 +293,8 @@ Page({ |
293 | 293 | teamlist = null, //活动表 |
294 | 294 | goods = null, //商品 |
295 | 295 | teamgroup = null, //活動从表 |
296 | + max_num = 0, | |
297 | + min_price = 0, | |
296 | 298 | th=this; |
297 | 299 | |
298 | 300 | //获取活动从表信息team_id,listno团编号(券号) |
... | ... | @@ -365,6 +367,21 @@ Page({ |
365 | 367 | if (res.data.code == 0) { |
366 | 368 | teamlist = res.data.data; |
367 | 369 | goods_id = res.data.data.goods_id; |
370 | + | |
371 | + //----------查看阶梯团------------ | |
372 | + if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) { | |
373 | + var ct_rylist = JSON.parse(teamlist.ct_rylist); | |
374 | + var max = 0; var pri = 0; | |
375 | + ct_rylist.forEach(function (val, ind) { | |
376 | + if (val.rynum > max) { | |
377 | + max = val.rynum; | |
378 | + pri = val.price; | |
379 | + } | |
380 | + }) | |
381 | + max_num = max; | |
382 | + min_price = pri; | |
383 | + } | |
384 | + | |
368 | 385 | } |
369 | 386 | }) |
370 | 387 | |
... | ... | @@ -403,6 +420,26 @@ Page({ |
403 | 420 | goods = res.data.data |
404 | 421 | }) |
405 | 422 | |
423 | + //只装5个 | |
424 | + var ordertx2 = [], sf_num = 0, ct_nun = teamlist.ct_num; | |
425 | + if (max_num) { | |
426 | + ct_nun = parseInt(max_num); | |
427 | + if (ct_nun < ordertx.length) ct_nun = ordertx.length; | |
428 | + } | |
429 | + | |
430 | + if (ct_nun > 5) ct_nun = 5; | |
431 | + for (var i = 0; i < ct_nun; i++) { | |
432 | + if (i >= ordertx.length) sf_num++ | |
433 | + else | |
434 | + ordertx2.push(ordertx[i]); | |
435 | + } | |
436 | + | |
437 | + var sf_arr = []; | |
438 | + for (var i = 0; i < sf_num; i++) { | |
439 | + sf_arr.push(i); | |
440 | + } | |
441 | + | |
442 | + | |
406 | 443 | |
407 | 444 | if(th.data.is_group_end==1 || th.data.is_group_end==2 ){ |
408 | 445 | getApp().confirmBox(th.data.end_text); |
... | ... | @@ -446,6 +483,7 @@ Page({ |
446 | 483 | //获取下redis长度,如果团已经弄完,或者拼单已经卖完 |
447 | 484 | //设置值 |
448 | 485 | ee.setData({ |
486 | + ordertx2: ordertx2, | |
449 | 487 | ordertx: ordertx, |
450 | 488 | teamlist: teamlist, |
451 | 489 | teamgroup: teamgroup, |
... | ... | @@ -453,6 +491,7 @@ Page({ |
453 | 491 | pageteam: pageteam, |
454 | 492 | image: original_img, |
455 | 493 | is_show:1, |
494 | + sf_arr: sf_arr | |
456 | 495 | }); |
457 | 496 | ee.countDown2(); |
458 | 497 | //---设置门店--- |
... | ... | @@ -684,6 +723,8 @@ Page({ |
684 | 723 | pick_id: th.data.pick_id, |
685 | 724 | user_id: oo.user_id, |
686 | 725 | store_id: th.data.stoid, |
726 | + goods_name: th.data.goods.goods_name, | |
727 | + goods_sn: th.data.goods.goods_sn, | |
687 | 728 | }; |
688 | 729 | //-----拼团----- |
689 | 730 | newd.goods_price = th.data.teamlist.price; | ... | ... |
pages/team/team_show/team_show.wxml
... | ... | @@ -55,22 +55,20 @@ |
55 | 55 | </view> |
56 | 56 | <!--头像--> |
57 | 57 | <view class="flex_tou"> |
58 | - <view class='bodyimg flex-level' wx:for="{{ordertx}}" wx:key> | |
58 | + <view class='bodyimg flex-level' wx:for="{{ordertx2}}" wx:key> | |
59 | 59 | <view class='d'> |
60 | - <image src='{{item.head_pic}}'></image> | |
61 | - <span wx:if="{{item.is_pt_tz==1}}">团长</span> | |
60 | + <image src='{{item.head_pic}}'></image> | |
61 | + <span wx:if="{{item.is_pt_tz==1}}">团长</span> | |
62 | + </view> | |
62 | 63 | </view> |
63 | - <view class='d'> | |
64 | - <image src='{{imageurl}}/miniapp/images/shafa.png'></image> | |
64 | + <view class='d' wx:for="{{sf_arr}}" > | |
65 | + <image src='{{iurl}}/miniapp/images/shafa.png' style='width:100%; height:100%'></image> | |
66 | + </view> | |
67 | + <view class='xc-ellipsis-img' wx:if="{{ordertx.length>5}}"> | |
68 | + <image style='width:56rpx;height:56rpx;margin-left:10rpx;' src="{{imageurl}}/miniapp/images/xc_ellipsis.png"></image> | |
65 | 69 | </view> |
66 | - | |
67 | - <view class='xc-ellipsis-img' wx:if="{{length>5}}"> | |
68 | - <image style='width:56rpx;height:56rpx;margin-left:10rpx;' src="{{imageurl}}/miniapp/images/xc_ellipsis.png"></image> | |
69 | - </view> | |
70 | - </view> | |
71 | 70 | |
72 | 71 | |
73 | - | |
74 | 72 | </view> |
75 | 73 | |
76 | 74 | <view class='bodytime'> |
... | ... | @@ -186,11 +184,19 @@ |
186 | 184 | <view class='buy-option'> |
187 | 185 | <!--头部图片--> |
188 | 186 | <view class='buy-top'> |
189 | - <view class='buy-image'> | |
187 | + <view class='buy-image mimg'> | |
190 | 188 | <image src='{{image}}'></image> |
191 | - <span class='t1'>¥</span> | |
192 | - <text class='t2'>{{teamlist.price}}</text> | |
189 | + <view style='float:left'> | |
190 | + <view> | |
191 | + <span class='t1'>¥</span><text class='t2'>{{teamlist.price}}</text> | |
192 | + </view> | |
193 | + <view class="ellipsis-1"> | |
194 | + {{goods.goods_name}} | |
195 | + </view> | |
196 | + </view> | |
197 | + | |
193 | 198 | </view> |
199 | + | |
194 | 200 | <view class='buy-cou' bindtap='cbcou'>⊗</view> |
195 | 201 | <view class='clear'></view> |
196 | 202 | </view> | ... | ... |
pages/team/team_show/team_show.wxss
... | ... | @@ -102,7 +102,7 @@ page { |
102 | 102 | /* display: flex; |
103 | 103 | justify-content: center; |
104 | 104 | align-items: center; */ |
105 | - width:590rpx; | |
105 | + | |
106 | 106 | |
107 | 107 | } |
108 | 108 | |
... | ... | @@ -589,7 +589,6 @@ flex-grow:1.7; |
589 | 589 | } |
590 | 590 | |
591 | 591 | .buy-image text { |
592 | - float: left; | |
593 | 592 | margin-left: 10rpx; |
594 | 593 | color: red; |
595 | 594 | } |
... | ... | @@ -709,7 +708,7 @@ flex-grow:1.7; |
709 | 708 | |
710 | 709 | .buy-image { |
711 | 710 | margin-right: 20rpx; |
712 | - width: 320rpx; | |
711 | + width: 630rpx; | |
713 | 712 | height: 200rpx; |
714 | 713 | float: left; |
715 | 714 | } |
... | ... | @@ -722,8 +721,8 @@ flex-grow:1.7; |
722 | 721 | margin-right: 16rpx; |
723 | 722 | } |
724 | 723 | |
724 | + | |
725 | 725 | .buy-image text { |
726 | - float: left; | |
727 | 726 | margin-left: 10rpx; |
728 | 727 | color: red; |
729 | 728 | } |
... | ... | @@ -742,7 +741,6 @@ flex-grow:1.7; |
742 | 741 | } |
743 | 742 | |
744 | 743 | .t1 { |
745 | - float: left; | |
746 | 744 | font-size: 28rpx; |
747 | 745 | padding-left: 4rpx; |
748 | 746 | color: red; | ... | ... |
pages/team/team_success/team_success.js
... | ... | @@ -185,7 +185,11 @@ Page({ |
185 | 185 | |
186 | 186 | |
187 | 187 | //只装5个 |
188 | - var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num;; | |
188 | + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num; | |
189 | + if(max_num){ | |
190 | + ct_nun=parseInt(max_num); | |
191 | + if (ct_nun < ordertx.length) ct_nun = ordertx.length; | |
192 | + } | |
189 | 193 | |
190 | 194 | if(ct_nun>5) ct_nun=5; |
191 | 195 | for(var i=0;i<ct_nun;i++){ |
... | ... | @@ -651,8 +655,18 @@ Page({ |
651 | 655 | }); |
652 | 656 | }, |
653 | 657 | |
658 | + go_pay_wk:function(){ | |
659 | + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id; | |
660 | + getApp().goto(url); | |
661 | + }, | |
654 | 662 | |
655 | - | |
656 | - | |
663 | + img_show_err:function(e){ | |
664 | + var err_img = e.currentTarget.dataset.err; | |
665 | + var ob={}; | |
666 | + ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
667 | + this.setData(ob); | |
668 | + | |
669 | + } | |
670 | + | |
657 | 671 | }) |
658 | 672 | ... | ... |
pages/team/team_success/team_success.wxml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | |
5 | 5 | <view class='center'> |
6 | 6 | <view class='cenleft'> |
7 | - <image src='{{image}}'></image> | |
7 | + <image src='{{image}}' binderror='img_show_err' data-err="image"></image> | |
8 | 8 | </view> |
9 | 9 | <view class='cenright'> |
10 | 10 | <!----//图片区域----> |
... | ... | @@ -45,9 +45,15 @@ |
45 | 45 | <!-- 阶梯团 --> |
46 | 46 | <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}"> |
47 | 47 | 当前价格 |
48 | - <text class="xc-wc">¥{{ct_price}}</text>, 还差 | |
49 | - <text class="xc-wc">{{max_num-ordertx.length}}</text>人享受最低价格 | |
50 | - <text class="xc-wc">¥{{min_price}}</text> | |
48 | + <text class="xc-wc">¥{{ct_price}}</text>, | |
49 | + <block wx:if="{{max_num-ordertx.length>0}}"> | |
50 | + <text class="xc-wc">还差{{max_num-ordertx.length}}</text>人享受最低价格<text class="xc-wc">¥{{min_price}}</text> | |
51 | + </block> | |
52 | + <block wx:else> | |
53 | + 该团已经拼购到最低价了哦~ | |
54 | + </block> | |
55 | + | |
56 | + | |
51 | 57 | </view> |
52 | 58 | <!-- 拼团成功 --> |
53 | 59 | <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}"> |
... | ... | @@ -152,16 +158,14 @@ |
152 | 158 | <!-- <block wx:if="{{pay_f!=1 && order.pt_status<2}}"> --> |
153 | 159 | <!----/ // // // //按钮----> |
154 | 160 | |
155 | - <view wx:if="{{teamlist.kttype==3}}" class='bodybutton' bindtap='cmeng'> | |
161 | + <view wx:if="{{teamlist.kttype==3}}" class='bodybutton'> | |
156 | 162 | <!-- 阶梯团 --> |
157 | - <button wx:if="{{p_status==1}}" style='background-color:#fab55a; color:#fff'> | |
163 | + <button wx:if="{{p_status==1}}" bindtap='cmeng' style='background-color:#fab55a; color:#fff'> | |
158 | 164 | 邀请好友参团 |
159 | 165 | </button> |
160 | - <button style='background-color:#42c780;' wx:if="{{p_status==2}}"> | |
166 | + <button bindtap="go_pay_wk" style='background-color:#42c780;' wx:if="{{order.pt_status==2 && order.is_zsorder==4 }}"> | |
161 | 167 | 支付尾款 |
162 | - </button> | |
163 | - | |
164 | - | |
168 | + </button> | |
165 | 169 | </view> |
166 | 170 | <!-- <view wx:elif="{{teamlist.ct_num-ordertx.length>0}}" class='' bindtap='cmeng'> --> |
167 | 171 | ... | ... |
pages/team/team_success/team_success.wxss
... | ... | @@ -234,15 +234,12 @@ width:101rpx; |
234 | 234 | } |
235 | 235 | |
236 | 236 | .bodybutton{ |
237 | - min-height: 60rpx; | |
238 | 237 | width: 90%; |
239 | 238 | margin: 0 auto; |
240 | 239 | text-align: center; |
241 | 240 | line-height: 60rpx; |
242 | 241 | border-radius:15rpx; |
243 | - height: auto; | |
244 | - | |
245 | - | |
242 | + height: auto; | |
246 | 243 | } |
247 | 244 | |
248 | 245 | .bodybutton button{ | ... | ... |
pages/user/add_address/add_address.js
... | ... | @@ -12,6 +12,8 @@ Page({ |
12 | 12 | iurl: a.imghost, |
13 | 13 | address: null, |
14 | 14 | isnew:0, |
15 | + is_op_co:false,//switch开关 | |
16 | + disabled:0 | |
15 | 17 | }, |
16 | 18 | onLoad: function(s) { |
17 | 19 | var a = this,th=a; |
... | ... | @@ -25,6 +27,32 @@ Page({ |
25 | 27 | th.initRegions(); |
26 | 28 | }) |
27 | 29 | }, |
30 | + | |
31 | + onReachBottom: function () { | |
32 | + if (this.data.total <= 6) return; | |
33 | + if (this.data.ismore) return; | |
34 | + this.requestAddressList(); | |
35 | + }, | |
36 | + | |
37 | + requestAddressList: function () { | |
38 | + var e = this; | |
39 | + t.get(e.data.url + "/api/weshop/useraddress/page", { | |
40 | + data: { store_id: os.stoid, user_id: oo.user_id, page: e.data.curpage, pageSize: 6 }, | |
41 | + success: function (t) { | |
42 | + e.data.curpage++; | |
43 | + var arr1 = e.data.addresses; | |
44 | + var arr2 = t.data.data.pageData; | |
45 | + var arr3 = [...arr1, ...arr2]; | |
46 | + | |
47 | + var ismore = 0; | |
48 | + if (arr3.length == t.data.data.total) ismore = 1 | |
49 | + | |
50 | + e.setData({ | |
51 | + addresses: arr3, total: t.data.data.total, ismore: ismore | |
52 | + }), wx.stopPullDownRefresh(); | |
53 | + } | |
54 | + }); | |
55 | + }, | |
28 | 56 | initRegions: function() { |
29 | 57 | var e = this; |
30 | 58 | new s.default(this, "regions", { |
... | ... | @@ -32,6 +60,7 @@ Page({ |
32 | 60 | console.log("initRegions"); |
33 | 61 | console.log(t); |
34 | 62 | Object.assign(e.data.address, t), e.setData({ |
63 | + "disabled": 0, | |
35 | 64 | "address.province_name": e.data.address.province_name, |
36 | 65 | "address.city_name": e.data.address.city_name, |
37 | 66 | "address.district_name": e.data.address.district_name, |
... | ... | @@ -44,58 +73,101 @@ Page({ |
44 | 73 | } |
45 | 74 | }); |
46 | 75 | }, |
76 | + //-----------添加或者编辑----------- | |
77 | + submitAddress: function (s) { | |
78 | + var a = this.data.address, b = a, th = this; | |
79 | + Object.assign(a, s.detail.value), a.is_default = Number(a.is_default); | |
80 | + a.store_id = os.stoid; | |
47 | 81 | |
48 | - //-----------添加或者编辑----------- | |
49 | - submitAddress: function(s) { | |
50 | - var a= this.data.address, b=a,th=this; | |
51 | - Object.assign(a, s.detail.value), a.is_default = Number(a.is_default); | |
52 | - a.store_id = os.stoid; | |
53 | - if (a.more_address == null || a.more_address == undefined || a.more_address=="" ){ | |
54 | - wx.showModal({title: "请选择地区"}); return false; | |
55 | - } | |
56 | - //判断是不是空对象 | |
57 | - //--------如果是修改地址---------- | |
58 | - if (!th.data.isnew){ | |
59 | - if (a.is_default==1){ | |
60 | - t.put("/api/weshop/useraddress/update", { | |
61 | - data: { user_id: oo.user_id, is_default:0}, | |
62 | - success: function (s) { | |
63 | - t.put("/api/weshop/useraddress/updateById", { | |
64 | - data: a, | |
65 | - success: function (s) { | |
66 | - e.showSuccess(s.data.msg, function () { | |
67 | - wx.navigateBack(); | |
68 | - }); | |
69 | - } | |
70 | - }); | |
71 | - } | |
72 | - }); | |
73 | - | |
74 | - }else{ | |
75 | - t.put("/api/weshop/useraddress/updateById", { | |
76 | - data: a, | |
77 | - success: function (s) { | |
78 | - e.showSuccess(s.data.msg, function () { | |
79 | - wx.navigateBack(); | |
80 | - }); | |
81 | - } | |
82 | + //判断用户名是否为空 | |
83 | + var cs = th.check(a.consignee); | |
84 | + if (cs != 1) { | |
85 | + return getApp().my_warnning("收货姓名不能为空", 0, th); | |
86 | + } | |
87 | + | |
88 | + var ob = ut.check_mobile(a.mobile); | |
89 | + if (ob.code != 1) { | |
90 | + return getApp().my_warnning(ob.title, 0, th); | |
91 | + } | |
92 | + | |
93 | + if (a.more_address == null || a.more_address == undefined || a.more_address == "") { | |
94 | + getApp().my_warnning("请选择地区", 0, th); | |
95 | + return false; | |
96 | + } | |
97 | + //判断地址是否为空 | |
98 | + var add = th.check(a.address); | |
99 | + if (add != 1) { | |
100 | + return getApp().my_warnning("详细地址不能为空", 0, th); | |
101 | + } | |
102 | + | |
103 | + //判断是不是空对象 | |
104 | + //--------如果是修改地址---------- | |
105 | + if (!th.data.isnew) { | |
106 | + if (a.is_default == 1) { | |
107 | + t.put("/api/weshop/useraddress/update", { | |
108 | + data: { user_id: oo.user_id, is_default: 0 }, | |
109 | + success: function (s) { | |
110 | + t.put("/api/weshop/useraddress/updateById", { | |
111 | + data: a, | |
112 | + success: function (s) { | |
113 | + e.showSuccess(s.data.msg, function () { | |
114 | + wx.navigateBack(); | |
82 | 115 | }); |
83 | - } | |
84 | - | |
85 | - }else{ | |
86 | - a['user_id'] = oo.user_id; | |
87 | - a['store_id'] = os.stoid; | |
88 | - //-----新增地址------- | |
89 | - t.post("/api/weshop/useraddress/save", { | |
90 | - data: a, | |
91 | - success: function (s) { | |
92 | - e.showSuccess(s.data.msg, function () { | |
93 | - wx.navigateBack(); | |
94 | - }); | |
95 | - } | |
96 | - }); | |
97 | - } | |
98 | - }, | |
116 | + } | |
117 | + }); | |
118 | + } | |
119 | + }); | |
120 | + | |
121 | + } else { | |
122 | + t.put("/api/weshop/useraddress/updateById", { | |
123 | + data: a, | |
124 | + success: function (s) { | |
125 | + e.showSuccess(s.data.msg, function () { | |
126 | + wx.navigateBack(); | |
127 | + }); | |
128 | + } | |
129 | + }); | |
130 | + } | |
131 | + | |
132 | + } else { | |
133 | + a['user_id'] = oo.user_id; | |
134 | + a['store_id'] = os.stoid; | |
135 | + | |
136 | + | |
137 | + if (a.is_default == 1) { | |
138 | + t.put("/api/weshop/useraddress/update", { | |
139 | + data: { user_id: oo.user_id, is_default: 0 }, | |
140 | + success: function (s) { | |
141 | + | |
142 | + //-----新增地址------- | |
143 | + t.post("/api/weshop/useraddress/save", { | |
144 | + data: a, | |
145 | + success: function (s) { | |
146 | + e.showSuccess(s.data.msg, function () { | |
147 | + wx.navigateBack(); | |
148 | + }); | |
149 | + } | |
150 | + }); | |
151 | + | |
152 | + } | |
153 | + }) | |
154 | + } else { | |
155 | + | |
156 | + //-----新增地址------- | |
157 | + t.post("/api/weshop/useraddress/save", { | |
158 | + data: a, | |
159 | + success: function (s) { | |
160 | + e.showSuccess(s.data.msg, function () { | |
161 | + wx.navigateBack(); | |
162 | + }); | |
163 | + } | |
164 | + }); | |
165 | + } | |
166 | + | |
167 | + | |
168 | + | |
169 | + } | |
170 | + }, | |
99 | 171 | |
100 | 172 | //---------删除收货地址------------ |
101 | 173 | deleteAddress: function() { |
... | ... | @@ -112,5 +184,20 @@ Page({ |
112 | 184 | }); |
113 | 185 | } |
114 | 186 | }); |
115 | - } | |
187 | + }, | |
188 | + //是否是默认地址 | |
189 | + bind_is_op_co:function(e){ | |
190 | + var i = e.detail; | |
191 | + this.setData({ | |
192 | + is_op_co:i | |
193 | + }) | |
194 | + console.log(i) | |
195 | + }, | |
196 | + check:function(as){ | |
197 | + var code = 1; | |
198 | + if(as===''){ | |
199 | + code = -1; | |
200 | + } | |
201 | + return code; | |
202 | +} | |
116 | 203 | }); |
117 | 204 | \ No newline at end of file | ... | ... |
pages/user/add_address/add_address.json
pages/user/add_address/add_address.wxml
1 | 1 | <import src="../../../utils/regions/regions.wxml"></import> |
2 | + | |
3 | + | |
2 | 4 | <view class="container"> |
5 | +<view class="topbcolor"></view> | |
3 | 6 | <form bindsubmit="submitAddress"> |
7 | + | |
4 | 8 | <view class="item"> |
5 | - <view class="item-name">收货人:</view> | |
6 | - <input class="item-input" name="consignee" value="{{address.consignee}}"></input> | |
9 | + <view class="item-name">收货人</view> | |
10 | + <input class="item-input" name="consignee" value="{{address.consignee}}" placeholder="请填写收货人姓名" placeholder-style="color: rgb(199, 199, 199)"></input> | |
7 | 11 | </view> |
8 | 12 | <view class="item"> |
9 | - <view class="item-name">手机号码:</view> | |
10 | - <input class="item-input" name="mobile" value="{{address.mobile}}"></input> | |
13 | + <view class="item-name">手机号码</view> | |
14 | + <input type="number" class="item-input" name="mobile" value="{{address.mobile}}" placeholder="请填写收货人手机号" placeholder-style="color: rgb(199, 199, 199)"></input> | |
11 | 15 | </view> |
12 | 16 | <view bindtap="openRegionsModal" class="item" data-id="0"> |
13 | - <view class="item-name">所在地区:</view> | |
14 | - <view class="item-input">{{address.more_address}}</view> | |
17 | + <view class="item-name">所在地区</view> | |
18 | + <view class="item-input{{address.more_address==null?'address':''}}">{{address.more_address==null?'省市区县,乡镇等':address.more_address}}</view> | |
15 | 19 | <view class="item-img"> |
16 | 20 | <image class="arrow" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> |
17 | 21 | </view> |
22 | + </view> | |
23 | + <view class="detailed"> | |
24 | + <view class="detailed_item-name">详细地址</view> | |
25 | + <textarea wx:if="{{!disabled}}" class="detailed_item-input" name="address" disabled="{{disabled}}" data-dis="{{disabled}}" | |
26 | + value="{{address.address}}" placeholder="街道 楼牌号等" placeholder-style="color: rgb(199, 199, 199)"></textarea> | |
18 | 27 | </view> |
19 | - <view class="item"> | |
20 | - <view class="item-name">详细地址:</view> | |
21 | - <input class="item-input" name="address" value="{{address.address}}"></input> | |
22 | - </view> | |
23 | - <view class="item"> | |
28 | + <view class="item item_default"> | |
24 | 29 | <view class="item-name">设为默认地址</view> |
25 | - <switch checked="{{address.is_default==1?true:false}}" class="item-switch" color="#e30000" name="is_default" type="switch"></switch> | |
30 | + <switch checked="{{address.is_default==1?true:false}}" class="item-switch" | |
31 | + color="{{address.is_default==1?'rgb(239,22,51)':is_op_co==false?'white':'rgb(239,22,51)'}}" name="is_default" type="switch" bindchange="bind_is_op_co"/> | |
26 | 32 | </view> |
27 | 33 | <view class="address-btns"> |
28 | - <button bindtap="deleteAddress" class="delete-btn">删除地址</button> | |
34 | + <button bindtap="deleteAddress" wx:if="{{address.mobile!=null}}" class="delete-btn">删除地址</button> | |
29 | 35 | <button class="submit-btn" formType="submit">提交地址</button> |
30 | 36 | </view> |
31 | 37 | </form> |
32 | 38 | </view> |
39 | + | |
33 | 40 | <template is="regions" data="{{regions:regions}}"></template> |
41 | +<warn id="warn"></warn> | ... | ... |
pages/user/add_address/add_address.wxss
1 | 1 | page { |
2 | - background: white; | |
2 | + background: rgb(255, 255, 255); | |
3 | +} | |
4 | + | |
5 | +.topbcolor { | |
6 | + width: 100%; | |
7 | + height: 7rpx; | |
8 | + background-color: rgb(245, 245, 245); | |
3 | 9 | } |
4 | 10 | |
5 | 11 | .item { |
6 | - float: left; | |
7 | - padding: 0 30rpx; | |
8 | - width: 100%; | |
9 | - box-sizing: border-box; | |
10 | - font-size: 30rpx; | |
11 | - border-bottom: 1rpx #f5f5f5 solid; | |
12 | - line-height: 100rpx; | |
13 | - height: 100rpx; | |
14 | - position: relative; | |
12 | + display: flex; | |
13 | + align-items: center; | |
14 | + padding: 0 31rpx; | |
15 | + width: 100%; | |
16 | + box-sizing: border-box; | |
17 | + border-bottom: 1rpx #f5f5f5 solid; | |
18 | + height: 98rpx; | |
19 | + position: relative; | |
20 | + font-size: 26rpx; | |
21 | + padding-top: 16rpx; | |
15 | 22 | } |
16 | 23 | |
17 | 24 | .item-name { |
18 | - float: left; | |
25 | + display: flex; | |
26 | + align-items: center; | |
27 | + height: 100%; | |
28 | + width: 104rpx; | |
29 | +} | |
30 | + | |
31 | +.item-img { | |
32 | + height: 100%; | |
33 | + align-items: center; | |
34 | +} | |
35 | + | |
36 | +.item_default { | |
37 | + display: flex; | |
38 | + justify-content: space-between; | |
39 | +} | |
40 | + | |
41 | +.item_default .item-name { | |
42 | + width: 200rpx; | |
19 | 43 | } |
20 | 44 | |
21 | 45 | .item-input { |
22 | - float: left; | |
23 | - height: 100rpx; | |
24 | - width: 450rpx; | |
25 | - margin-left: 20rpx; | |
26 | - word-break: keep-all; | |
27 | - white-space: nowrap; | |
28 | - overflow: hidden; | |
29 | - text-overflow: ellipsis; | |
46 | + display: flex; | |
47 | + height: 100%; | |
48 | + margin-left: 40rpx; | |
49 | + /* word-break: keep-all; | |
50 | + white-space: nowrap; | |
51 | + overflow: hidden; */ | |
52 | + text-overflow: ellipsis; | |
53 | + color: rgb(0, 0, 0); | |
54 | + align-items: center; | |
55 | + width: 74%; | |
56 | +} | |
57 | + | |
58 | +.item-inputaddress { | |
59 | + color: rgb(199, 199, 199); | |
60 | + margin-left: 40rpx; | |
61 | +} | |
62 | + | |
63 | +.detailed { | |
64 | + height: 193rpx; | |
65 | + padding-bottom: 95rpx; | |
66 | + display: flex; | |
67 | + padding: 0 31rpx; | |
68 | + padding-top: 41rpx; | |
69 | + font-size: 26rpx; | |
70 | + border-bottom: 1rpx #f5f5f5 solid; | |
71 | +} | |
72 | + | |
73 | +.detailed .detailed_item-name { | |
74 | + width: 137rpx; | |
75 | +} | |
76 | + | |
77 | +.detailed_item-input { | |
78 | + margin-left: 40rpx; | |
79 | + height: auto; | |
80 | + width: 100%; | |
81 | + min-height: 40rpx; | |
82 | + padding-bottom: 28rpx; | |
30 | 83 | } |
31 | 84 | |
32 | 85 | .item-switch { |
33 | - float: right; | |
86 | + zoom: 0.7; | |
87 | +} | |
88 | + | |
89 | +.item-switch::before { | |
90 | + width: 80rpx !important; | |
91 | + height: 35rpx !important; | |
92 | + zoom: 1; | |
34 | 93 | } |
35 | 94 | |
36 | 95 | .arrow { |
37 | - position: absolute; | |
38 | - right: 30rpx; | |
39 | - width: 32rpx; | |
40 | - height: 32rpx; | |
41 | - padding-top: 30rpx; | |
96 | + position: absolute; | |
97 | + right: 26rpx; | |
98 | + width: 26rpx; | |
99 | + height: 26rpx; | |
100 | + padding-top: 28rpx; | |
42 | 101 | } |
43 | 102 | |
44 | 103 | .address-btns { |
45 | - position: absolute; | |
46 | - bottom: 80rpx; | |
47 | - float: left; | |
48 | - width: 100%; | |
49 | - padding: 10rpx 0; | |
104 | + position: absolute; | |
105 | + display: flex; | |
106 | + justify-content: center; | |
107 | + align-items: center; | |
108 | + bottom: 80rpx; | |
109 | + width: 100%; | |
50 | 110 | } |
51 | 111 | |
52 | 112 | .delete-btn { |
53 | - float: left; | |
54 | - width: 40%; | |
55 | - margin: 0 10% 0 5%; | |
56 | - border-radius: 10rpx; | |
57 | - color: #999; | |
58 | - border: 1px solid #f2f2f2; | |
113 | + display: flex; | |
114 | + justify-content: center; | |
115 | + align-items: center; | |
116 | + width: 285rpx; | |
117 | + height: 60rpx; | |
118 | + border-radius: 40rpx; | |
119 | + font-size: 27rpx; | |
120 | + color: rgb(0, 0, 0); | |
121 | + border: 1rpx solid rgb(210, 210, 210); | |
59 | 122 | } |
60 | 123 | |
61 | 124 | .submit-btn { |
62 | - float: left; | |
63 | - width: 40%; | |
64 | - background-color: #e30000; | |
65 | - color: white; | |
66 | - border-radius: 10rpx; | |
125 | + display: flex; | |
126 | + justify-content: center; | |
127 | + align-items: center; | |
128 | + width: 285rpx; | |
129 | + height: 59rpx; | |
130 | + background-color: #e30000; | |
131 | + font-size: 27rpx; | |
132 | + color: rgb(255, 255, 255); | |
133 | + border-radius: 40rpx; | |
67 | 134 | } |
68 | - | |
69 | -@import "../../../utils/regions/regions.wxss"; | |
70 | 135 | \ No newline at end of file |
136 | +@import "../../../utils/regions/regions.wxss"; | ... | ... |
pages/user/address_list/address_list.js
1 | -var e = getApp(), t = require("../../../utils/request.js"),os=e.globalData.setting,oo=e.globalData; | |
2 | - | |
1 | +var e = getApp(), t = require("../../../utils/request.js"), os = e.globalData.setting, oo = e.globalData, t = e.request; | |
3 | 2 | |
4 | 3 | Page({ |
5 | - data: { | |
6 | - url: e.globalData.setting.url, | |
7 | - resourceUrl: e.globalData.setting.resourceUrl, | |
8 | - iurl: e.globalData.setting.imghost, | |
9 | - addresses: null, | |
10 | - operate: null | |
11 | - }, | |
12 | - onLoad: function(e) { | |
13 | - this.data.operate = e.operate; | |
14 | - }, | |
15 | - onShow: function() { | |
16 | - this.requestAddressList(); | |
17 | - }, | |
18 | - onPullDownRefresh: function() { | |
19 | - this.requestAddressList(); | |
20 | - }, | |
21 | - requestAddressList: function() { | |
22 | - var e = this; | |
23 | - t.get(e.data.url + "/api/weshop/useraddress/page", { | |
24 | - data: { store_id: os.stoid, user_id: oo.user_id}, | |
25 | - success: function(t) { | |
26 | - e.setData({ | |
27 | - addresses: t.data.data.pageData, | |
28 | - }), wx.stopPullDownRefresh(); | |
29 | - } | |
30 | - }); | |
31 | - }, | |
32 | - | |
33 | - /*----------编辑地址----------*/ | |
34 | - editAddress: function(e) { | |
35 | - var t = this.getAddressData(e.currentTarget.dataset.id), s = ""; | |
36 | - for (var a in t) s += (0 != s.length ? "&" : "?") + a + "=" + t[a]; | |
37 | - s && wx.navigateTo({ | |
38 | - url: "/pages/user/add_address/add_address" + s | |
39 | - }); | |
40 | - }, | |
41 | - | |
42 | - /*-----选择地址返回确认------*/ | |
43 | - selectAddress: function(e) { | |
44 | - if (null != this.data.operate) { | |
45 | - /*---- | |
46 | - if ("select" == this.data.operate) wx.setStorageSync("cart:cart2:address_id", e.currentTarget.dataset.item.address_id); else if ("teamSelect" == this.data.operate) wx.setStorageSync("team:confirm:address_id", e.currentTarget.dataset.item.address_id); else if ("selectAddress" == this.data.operate) { | |
47 | - var t = { | |
48 | - address: e.currentTarget.dataset.item.province_name + e.currentTarget.dataset.item.city_name + e.currentTarget.dataset.item.district_name, | |
49 | - district: e.currentTarget.dataset.item.district | |
50 | - }; | |
51 | - wx.setStorageSync("goodsInfo:goodsInfo:address", t); | |
52 | - }---*/ | |
53 | - oo.baddr = e.currentTarget.dataset.item; | |
54 | - wx.navigateBack(); | |
55 | - } | |
56 | - }, | |
57 | - getAddressData: function(e) { | |
58 | - var t = this.data.addresses; | |
59 | - for (var s in t) if (t[s].address_id == e) break; | |
60 | - return s ? t[s] : {}; | |
4 | + data: { | |
5 | + url: e.globalData.setting.url, | |
6 | + resourceUrl: e.globalData.setting.resourceUrl, | |
7 | + iurl: e.globalData.setting.imghost, | |
8 | + addresses: [], | |
9 | + operate: null, | |
10 | + curpage: 1, | |
11 | + total: 0, | |
12 | + ismore: 0, | |
13 | + is_back:0, //有没有跳转 | |
14 | + isloading:0, | |
15 | + is_address_read:0 | |
16 | + }, | |
17 | + onLoad: function (e) { | |
18 | + | |
19 | + //清空is_pick_up | |
20 | + getApp().request.put("/api/weshop/useraddress/updatePickUp", { | |
21 | + data: {user_id: getApp().globalData.user_id, is_pickup: 0}, | |
22 | + success: function (s) { | |
23 | + } | |
24 | + }); | |
25 | + | |
26 | + this.data.operate = e.operate; | |
27 | + var is_back=e.is_back; | |
28 | + if (is_back) this.setData({ is_back: is_back}) | |
29 | + }, | |
30 | + onShow: function () { | |
31 | + this.data.curpage = 1; | |
32 | + this.data.addresses = []; | |
33 | + this.requestAddressList(); | |
34 | + console.log(this.data.addresses) | |
35 | + }, | |
36 | + | |
37 | + onReachBottom: function () { | |
38 | + if (this.data.total <= 6) return; | |
39 | + if (this.data.ismore) return; | |
40 | + this.requestAddressList(); | |
41 | + }, | |
42 | + | |
43 | + requestAddressList: function () { | |
44 | + var tt = Math.random() * 100 | |
45 | + var e = this; | |
46 | + t.get(e.data.url + "/api/weshop/useraddress/page", { | |
47 | + data: { store_id: os.stoid, user_id: oo.user_id, page: e.data.curpage, pageSize: 6, t: tt }, | |
48 | + success: function (t) { | |
49 | + e.data.curpage++; | |
50 | + var arr1 = e.data.addresses; | |
51 | + var arr2 = t.data.data.pageData; | |
52 | + var arr3 = [...arr1, ...arr2]; | |
53 | + | |
54 | + var ismore = 0; | |
55 | + if (arr3.length == t.data.data.total) ismore = 1 | |
56 | + | |
57 | + e.setData({ | |
58 | + addresses: arr3, total: t.data.data.total, ismore: ismore, | |
59 | + is_address_read:1 | |
60 | + }), wx.stopPullDownRefresh(); | |
61 | + } | |
62 | + }); | |
63 | + }, | |
64 | + | |
65 | + /*----------编辑地址----------*/ | |
66 | + editAddress: function (e) { | |
67 | + var t = this.getAddressData(e.currentTarget.dataset.id), s = ""; | |
68 | + for (var a in t) s += (0 != s.length ? "&" : "?") + a + "=" + t[a]; | |
69 | + s && wx.navigateTo({ | |
70 | + url: "/pages/user/add_address/add_address" + s | |
71 | + }); | |
72 | + }, | |
73 | + | |
74 | + /*-----选择地址返回确认------*/ | |
75 | + selectAddress: function (e) { | |
76 | + if (null != this.data.operate) { | |
77 | + /*---- | |
78 | + if ("select" == this.data.operate) wx.setStorageSync("cart:cart2:address_id", e.currentTarget.dataset.item.address_id); else if ("teamSelect" == this.data.operate) wx.setStorageSync("team:confirm:address_id", e.currentTarget.dataset.item.address_id); else if ("selectAddress" == this.data.operate) { | |
79 | + var t = { | |
80 | + address: e.currentTarget.dataset.item.province_name + e.currentTarget.dataset.item.city_name + e.currentTarget.dataset.item.district_name, | |
81 | + district: e.currentTarget.dataset.item.district | |
82 | + }; | |
83 | + wx.setStorageSync("goodsInfo:goodsInfo:address", t); | |
84 | + }---*/ | |
85 | + | |
86 | + oo.baddr = e.currentTarget.dataset.item; | |
87 | + wx.navigateBack(); | |
61 | 88 | } |
89 | + }, | |
90 | + | |
91 | + getAddressData: function (e) { | |
92 | + var t = this.data.addresses; | |
93 | + for (var s in t) if (t[s].address_id == e) break; | |
94 | + return s ? t[s] : {}; | |
95 | + }, | |
96 | + | |
97 | + go_url: function (e) { | |
98 | + var url = e.currentTarget.dataset.url; | |
99 | + getApp().goto(url); | |
100 | + | |
101 | + }, | |
102 | + //判断是否选择 | |
103 | + add_is_pickup:function(e){ | |
104 | + | |
105 | + if(this.data.is_back==0) return false; | |
106 | + | |
107 | + var th = this; | |
108 | + var index = e.currentTarget.dataset.ind; | |
109 | + var a = this.data.addresses[index]; | |
110 | + | |
111 | + if (th.data.isloading) return; | |
112 | + th.data.isloading=1; | |
113 | + | |
114 | + t.put("/api/weshop/useraddress/updatePickUp", { | |
115 | + data: { user_id: oo.user_id, is_pickup: 0 }, | |
116 | + isShowLoading:0, | |
117 | + success: function (s) { | |
118 | + // var add_arr = th.data.addresses; | |
119 | + // for (var i in add_arr){ | |
120 | + // add_arr[i].is_pickup=0; | |
121 | + // } | |
122 | + // th.setData({addresses:add_arr}); | |
123 | + | |
124 | + a.is_pickup = 1; | |
125 | + t.put("/api/weshop/useraddress/updateById", { | |
126 | + data: a, | |
127 | + isShowLoading: 0, | |
128 | + success: function (s) { | |
129 | + // var obj={}; | |
130 | + // var txt = "addresses[" + index +"].is_pickup"; | |
131 | + // obj[txt]=1; | |
132 | + // th.setData(obj); | |
133 | + | |
134 | + th.data.isloading=0 | |
135 | + if (th.data.is_back) { | |
136 | + wx.navigateBack({}); | |
137 | + } | |
138 | + | |
139 | + },fail: function (t) { | |
140 | + th.data.isloading = 0; | |
141 | + } | |
142 | + }); | |
143 | + }, | |
144 | + fail: function (t) { | |
145 | + th.data.isloading = 0; | |
146 | + } | |
147 | + }); | |
148 | + | |
149 | + | |
150 | + | |
151 | + } | |
62 | 152 | }); |
63 | 153 | \ No newline at end of file | ... | ... |
pages/user/address_list/address_list.wxml
1 | -<view class="container"> | |
1 | +<!-- <view class="container"> | |
2 | 2 | <view class="address-box" wx:for="{{addresses}}" wx:key="{{index}}"> |
3 | 3 | <view class="address-user"> |
4 | 4 | <view class="user-name">{{item.consignee}}</view> |
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | </view> |
7 | 7 | <view bindtap="selectAddress" class="address-info" data-item="{{item}}"> |
8 | 8 | <view class="mobile">电话:{{item.mobile}}</view> |
9 | - <view class="address">{{item.province_name}} {{item.city_name}} {{item.district_name}} {{item.twon_name}} {{item.address}}</view> | |
9 | + <view class="address">{{item.more_address}} {{item.address}}</view> | |
10 | 10 | </view> |
11 | 11 | <view bindtap="editAddress" class="address-edit" data-id="{{item.address_id}}"> |
12 | 12 | <image src="{{iurl}}/miniapp/images/address_edit.png"></image> |
... | ... | @@ -15,4 +15,66 @@ |
15 | 15 | <navigator class="address-create" url="/pages/user/add_address/add_address"> |
16 | 16 | <view class="create-btn">+新建地址</view> |
17 | 17 | </navigator> |
18 | +</view> --> | |
19 | + | |
20 | +<!-- 无收货地址提醒页面 --> | |
21 | +<view class="topbcolor"></view> | |
22 | +<view class="nothing" wx:if="{{is_address_read && addresses.length<=0}}"> | |
23 | + <view class="image flex-level"> | |
24 | + <image src="../../../images/nothingaddress.png"></image> | |
25 | + </view> | |
26 | + | |
27 | + <view class="nothingaddress flex-level"> | |
28 | + <view>暂无收货地址</view> | |
29 | + </view> | |
30 | + | |
31 | + <view class="address flex-level"> | |
32 | + <navigator bindtap="go_url" data-url="/pages/user/add_address/add_address">添加收货地址</navigator> | |
33 | + </view> | |
18 | 34 | </view> |
35 | + | |
36 | +<!-- 收货地址页面集合框架 --> | |
37 | +<view class="container" wx:if="{{addresses.length>0}}"> | |
38 | + <!-- 所有的收货地址框架 --> | |
39 | + <view class="address-box"> | |
40 | + | |
41 | + <!-- 单个收货地址框架 --> | |
42 | + <view class="address-user" wx:for="{{addresses}}" wx:key="{{index}}"> | |
43 | + <!-- 选择icon | |
44 | + <view class="icon"> | |
45 | + <icon type="success" color="red" size="33rpx" wx:if="{{item.is_pickup==1}}" bindtap="add_is_pickup" data-icon="{{index}}"></icon> | |
46 | + <icon class="no_xuanze" color="white" wx:if="{{item.is_pickup==0}}" bindtap="add_is_pickup" data-icon="{{index}}"></icon> | |
47 | + </view>--> | |
48 | + | |
49 | + <!-- 收货地址全部信息 --> | |
50 | + <view class="address" bindtap="add_is_pickup" data-ind="{{index}}" > | |
51 | + <!-- 个人直接信息 --> | |
52 | + <view class="user"> | |
53 | + <!-- 名字 --> | |
54 | + <view class="userName">{{item.consignee}}</view> | |
55 | + <!-- 电话 --> | |
56 | + <view class="userPhone">{{item.mobile}}</view> | |
57 | + <view class="default" wx:if="{{item.is_default}}">默认地址</view> | |
58 | + </view> | |
59 | + | |
60 | + <!-- 收货地址 --> | |
61 | + <view class="ShippingAddress ellipsis-2 ">{{item.more_address}} {{item.address}}</view> | |
62 | + </view> | |
63 | + | |
64 | + <!-- 编辑地址图片 --> | |
65 | + <view class="edit" bindtap="editAddress" data-id="{{item.address_id}}"> | |
66 | + <image src="../../../images/dpr.png"></image> | |
67 | + </view> | |
68 | + </view> | |
69 | + | |
70 | + </view> | |
71 | + | |
72 | + <!-- 新建收货地址 --> | |
73 | + <view class="new"> | |
74 | + <navigator bindtap="go_url" data-url="/pages/user/add_address/add_address"> | |
75 | + <view class="add">+</view> | |
76 | + <view class="addAddress">新建收货地址</view> | |
77 | + </navigator> | |
78 | + </view> | |
79 | + | |
80 | +</view> | |
19 | 81 | \ No newline at end of file | ... | ... |
pages/user/address_list/address_list.wxss
1 | -page { | |
1 | +/* 没有收货地址时的样式 */ | |
2 | + | |
3 | +.nothing { | |
4 | + width: 100%; | |
5 | + font-size: 31rpx; | |
6 | +} | |
7 | + | |
8 | +.nothing image { | |
9 | + width: 299rpx; | |
10 | + height: 283rpx; | |
11 | + margin-top: 161rpx; | |
12 | +} | |
13 | + | |
14 | +.nothing .nothingaddress { | |
15 | + color: rgb(251, 65, 66); | |
16 | + margin-top: 35rpx; | |
17 | +} | |
18 | + | |
19 | +.nothing .address { | |
20 | + margin-top: 61rpx; | |
21 | +} | |
22 | + | |
23 | +.nothing .address navigator { | |
24 | + color: rgb(255, 255, 255); | |
25 | + background-color: rgb(251, 65, 66); | |
26 | + width: 256rpx; | |
27 | + height: 55rpx; | |
28 | + border-radius: 30rpx; | |
29 | + display: flex; | |
30 | + align-items: center; | |
31 | + justify-content: center; | |
32 | +} | |
33 | + | |
34 | +/* page { | |
2 | 35 | margin-bottom: 200rpx; |
3 | 36 | } |
4 | 37 | |
... | ... | @@ -15,7 +48,7 @@ page { |
15 | 48 | width: 150rpx; |
16 | 49 | } |
17 | 50 | |
18 | -.user-name { | |
51 | +.N-name { | |
19 | 52 | font-size: 30rpx; |
20 | 53 | padding-bottom: 20rpx; |
21 | 54 | word-break: keep-all; |
... | ... | @@ -77,4 +110,131 @@ page { |
77 | 110 | text-align: center; |
78 | 111 | line-height: 80rpx; |
79 | 112 | display: block; |
80 | -} | |
81 | 113 | \ No newline at end of file |
114 | +} */ | |
115 | + | |
116 | +page { | |
117 | + margin-bottom: 200rpx; | |
118 | +} | |
119 | + | |
120 | +.topbcolor { | |
121 | + width: 100%; | |
122 | + height: 7rpx; | |
123 | + background-color: rgb(245, 245, 245); | |
124 | +} | |
125 | + | |
126 | +.container { | |
127 | + margin-top: 7rpx; | |
128 | +} | |
129 | + | |
130 | +.container .address-box { | |
131 | + width: 100%; | |
132 | +} | |
133 | + | |
134 | +.container .address-box .address-user { | |
135 | + display: flex; | |
136 | + justify-content: center; | |
137 | + width: 100%; | |
138 | + border-bottom: 2rpx solid rgb(245, 245, 245); | |
139 | + height: 180rpx; | |
140 | + align-items: center; | |
141 | +} | |
142 | + | |
143 | +.container .address-box .address-user .icon { | |
144 | + padding-right: 20rpx; | |
145 | + display: flex; | |
146 | + align-items: center; | |
147 | + height: 100%; | |
148 | +} | |
149 | + | |
150 | +.container .address-box .address-user .no_xuanze { | |
151 | + width: 31rpx; | |
152 | + height: 31rpx; | |
153 | + border-radius: 50%; | |
154 | + border: 1rpx solid; | |
155 | +} | |
156 | + | |
157 | +.container .address-box .address-user .address { | |
158 | + width: 530rpx; | |
159 | +} | |
160 | + | |
161 | +.container .address-box .address-user .address .user { | |
162 | + display: flex; | |
163 | + align-items: center; | |
164 | + width: 500rpx; | |
165 | + font-weight: bold; | |
166 | + font-size: 31rpx; | |
167 | + color: rgb(40, 36, 33); | |
168 | +} | |
169 | + | |
170 | +.container .address-box .address-user .address .user .userName { | |
171 | + overflow: hidden; | |
172 | + text-overflow: ellipsis; | |
173 | + display: -webkit-box; | |
174 | + -webkit-box-orient: vertical; | |
175 | + -webkit-line-clamp: 1; | |
176 | + max-width: 149rpx; | |
177 | +} | |
178 | + | |
179 | +.container .address-box .address-user .address .user .userPhone { | |
180 | + margin-left: 41rpx; | |
181 | +} | |
182 | + | |
183 | +.container .address-box .address-user .address .user .default { | |
184 | + display: flex; | |
185 | + width: 105rpx; | |
186 | + height: 31rpx; | |
187 | + background-color: rgb(239, 22, 51); | |
188 | + justify-content: center; | |
189 | + font-size: 20rpx; | |
190 | + color: rgb(255, 255, 253); | |
191 | + border-radius: 8rpx; | |
192 | + margin-left: 21rpx; | |
193 | + line-height: 31rpx; | |
194 | +} | |
195 | + | |
196 | +.container .address-box .address-user .address .ShippingAddress { | |
197 | + font-size: 24rpx; | |
198 | + color: rgb(41, 38, 33); | |
199 | + height: 66rpx; | |
200 | +} | |
201 | + | |
202 | +.container .address-box .address-user .edit { | |
203 | + display: flex; | |
204 | + justify-content: center; | |
205 | + margin-left: 60rpx; | |
206 | + height: 100%; | |
207 | + align-items: center; | |
208 | +} | |
209 | + | |
210 | +.container .address-box .address-user .edit image { | |
211 | + width: 41rpx; | |
212 | + height: 38rpx; | |
213 | + align-items: center; | |
214 | +} | |
215 | + | |
216 | +.container .new { | |
217 | + width: 100%; | |
218 | + display: flex; | |
219 | + justify-content: center; | |
220 | + position: fixed; | |
221 | + bottom: 0rpx; | |
222 | + height: 204rpx; | |
223 | + align-items: center; | |
224 | + background-color: rgb(255, 255, 255); | |
225 | +} | |
226 | + | |
227 | +.container .new .add { | |
228 | + margin-right: 10rpx; | |
229 | +} | |
230 | + | |
231 | +.container navigator { | |
232 | + display: flex; | |
233 | + width: 430rpx; | |
234 | + height: 62rpx; | |
235 | + background-color: rgb(239, 22, 51); | |
236 | + border-radius: 40rpx; | |
237 | + justify-content: center; | |
238 | + align-items: center; | |
239 | + color: rgb(255, 255, 255); | |
240 | + font-size: 27rpx; | |
241 | +} | ... | ... |
pages/user/coupons/coupons.js
... | ... | @@ -48,6 +48,7 @@ Page({ |
48 | 48 | show: true, |
49 | 49 | udata: null, |
50 | 50 | iurl:os.imghost, |
51 | + is_show_dhwz:0, | |
51 | 52 | }, |
52 | 53 | // 点击选中二维码 |
53 | 54 | click: function(e) { |
... | ... | @@ -130,7 +131,11 @@ Page({ |
130 | 131 | * 生命周期函数--监听页面加载 |
131 | 132 | */ |
132 | 133 | onLoad: function(options) { |
133 | - | |
134 | + var th = this; | |
135 | + getApp().getConfig2(function (ee) { | |
136 | + var json_d = JSON.parse(ee.switch_list); | |
137 | + th.setData({ is_show_dhwz: json_d.dhwz_switch }); | |
138 | + }) | |
134 | 139 | }, |
135 | 140 | |
136 | 141 | |
... | ... | @@ -165,6 +170,7 @@ Page({ |
165 | 170 | |
166 | 171 | console.log("参数", user_id, store_id); |
167 | 172 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + user_id, { |
173 | + isShowLoading: 0, | |
168 | 174 | success: function (su) { |
169 | 175 | |
170 | 176 | var data = su.data.data; |
... | ... | @@ -186,9 +192,9 @@ Page({ |
186 | 192 | page: e.data.current_page |
187 | 193 | }; |
188 | 194 | var big_arr = this.data.details; |
195 | + wx.showLoading(); | |
189 | 196 | await getApp().request.promiseGet("/api/weshop/users/listQuan", { |
190 | - data: get_data, | |
191 | - isShowLoading: 1, | |
197 | + data: get_data, | |
192 | 198 | }).then(res => { |
193 | 199 | var a = res.data; |
194 | 200 | val = a.data.total; |
... | ... | @@ -211,12 +217,13 @@ Page({ |
211 | 217 | details: big_arr, |
212 | 218 | }); |
213 | 219 | setTimeout(function () { |
214 | - for (var i = 0; i < details.length; i++) { | |
215 | - var no = i + len; | |
216 | - qrcode('qrcode' + no, details[i].CashRepNo, 460, 460); | |
217 | - | |
218 | - } | |
219 | - }, 100) | |
220 | + | |
221 | + for (var i = 0; i < details.length; i++) { | |
222 | + var no = i + len; | |
223 | + qrcode('qrcode' + no, details[i].CashRepNo, 460, 460); | |
224 | + } | |
225 | + wx.hideLoading(); | |
226 | + }, 1000) | |
220 | 227 | |
221 | 228 | }) |
222 | 229 | this.setData({ |
... | ... | @@ -235,7 +242,6 @@ Page({ |
235 | 242 | await getApp().request.promiseGet("/api/weshop/users/listQuan" |
236 | 243 | , { |
237 | 244 | data: get_data, |
238 | - isShowLoading: 1 | |
239 | 245 | }).then(res => { |
240 | 246 | var a = res.data; |
241 | 247 | number= a.data.total; |
... | ... | @@ -267,10 +273,10 @@ Page({ |
267 | 273 | page: e.data.current_page |
268 | 274 | }; |
269 | 275 | var big_arr= this.data.details; |
276 | + wx.showLoading(); | |
270 | 277 | await getApp().request.promiseGet("/api/weshop/users/listQuan" |
271 | 278 | , { |
272 | 279 | data: get_data, |
273 | - isShowLoading: 1 | |
274 | 280 | }).then(res => { |
275 | 281 | var a = res.data; |
276 | 282 | number = a.data.total; |
... | ... | @@ -299,7 +305,9 @@ Page({ |
299 | 305 | qrcode('qrcode' + no, details[i].CashRepNo, 460, 460); |
300 | 306 | |
301 | 307 | } |
302 | - }, 100) | |
308 | + wx.hideLoading(); | |
309 | + | |
310 | + }, 800) | |
303 | 311 | }) |
304 | 312 | }, |
305 | 313 | //---加载更多是靠这个函数---- | ... | ... |
pages/user/coupons/coupons.wxml
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | </view> |
10 | 10 | <view class='center'> |
11 | 11 | <view class='cen-left' bindtap='query'>微券查询</view> |
12 | - <view class='cen-right' bindtap='exchange'>微券兑换</view> | |
12 | + <view wx:if="{{is_show_dhwz}}" class='cen-right' bindtap='exchange'>微券兑换</view> | |
13 | 13 | </view> |
14 | 14 | <!--选择款--> |
15 | 15 | <view class='top'> | ... | ... |
pages/user/deposit/deposit.js
... | ... | @@ -11,6 +11,7 @@ Page({ |
11 | 11 | yucun_money:0, |
12 | 12 | parameter:true, |
13 | 13 | iurl: o.imghost, |
14 | + is_show_yckcz:0, | |
14 | 15 | }, |
15 | 16 | /** |
16 | 17 | * 生命周期函数--监听页面显示 |
... | ... | @@ -25,6 +26,12 @@ Page({ |
25 | 26 | wx.setNavigationBarTitle({ |
26 | 27 | title: "预存款", |
27 | 28 | }) |
29 | + | |
30 | + var th = this; | |
31 | + getApp().getConfig2(function (ee) { | |
32 | + var json_d = JSON.parse(ee.switch_list); | |
33 | + th.setData({ is_show_yckcz: json_d.yckcz_switch }); | |
34 | + }) | |
28 | 35 | }, |
29 | 36 | |
30 | 37 | /** | ... | ... |
pages/user/deposit/deposit.wxml
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | </view> |
8 | 8 | </image> |
9 | 9 | <view class="big-rim"> |
10 | - <view class="min-rim-one" type='primary' bindtap='jumPage'> | |
10 | + <view wx:if="{{is_show_yckcz}}" class="min-rim-one" type='primary' bindtap='jumPage'> | |
11 | 11 | <image class="picture-two" src="{{iurl}}/miniapp/images/usermoney/recharge.png"></image> |
12 | 12 | <view class="ldzj-font">预存款充值</view> |
13 | 13 | <image class="picture-five" src="{{iurl}}/miniapp/images/usermoney/left.png"></image> | ... | ... |
pages/user/express/express.js
... | ... | @@ -6,6 +6,7 @@ Page({ |
6 | 6 | resourceUrl: e.globalData.setting.imghost, |
7 | 7 | delivery: null, |
8 | 8 | express: null, |
9 | + re_arr:null,//反转后的数组 | |
9 | 10 | error: "快递信息异常" |
10 | 11 | }, |
11 | 12 | onLoad: function(e) { |
... | ... | @@ -27,9 +28,9 @@ Page({ |
27 | 28 | wx.request({ |
28 | 29 | url: this.data.url + "/api/weshop/order/wuliu/" + this.data.delivery.shipping_code + "/" + this.data.delivery.invoice_no, success: function(e) { |
29 | 30 | |
30 | - console.log("success", e.data.data.data); | |
31 | + var re_arr = e.data.data.Traces.reverse(); | |
31 | 32 | s.setData({ |
32 | - express: e.data.data, | |
33 | + express: e.data.data, re_arr: re_arr, | |
33 | 34 | }); |
34 | 35 | }, |
35 | 36 | fail: function(s) { | ... | ... |
pages/user/express/express.wxml
... | ... | @@ -4,19 +4,36 @@ |
4 | 4 | <view class="logistics-cont">{{delivery.invoice_no}}</view> |
5 | 5 | </view> |
6 | 6 | <view class="logistics-num"> |
7 | - <view class="logistics-title">国内承运人 : </view> | |
7 | + <view class="logistics-title">承运公司 : </view> | |
8 | 8 | <view class="logistics-cont">{{delivery.shipping_name}}</view> |
9 | 9 | </view> |
10 | + | |
11 | + <view class="logistics-num"> | |
12 | + <view class="logistics-title">物流状态 : </view> | |
13 | + <view wx:if="{{express.State==0}}" class="logistics-cont">无轨迹</view> | |
14 | + <view wx:if="{{express.State==2}}" class="logistics-cont">已揽收</view> | |
15 | + <view wx:if="{{express.State==2}}" class="logistics-cont">在途中</view> | |
16 | + <view wx:if="{{express.State==3}}" class="logistics-cont">签收</view> | |
17 | + <view wx:if="{{express.State==4}}" class="logistics-cont">问题件</view> | |
18 | + </view> | |
19 | + | |
10 | 20 | </view> |
11 | 21 | <view class="apply-state"> |
12 | 22 | <view class="state-item"> |
13 | - <view class="item-wrap" wx:if="{{express.status!='200'}}"> | |
14 | - <view class="state-title">{{express.message}}</view> | |
23 | + <!-- <view class="item-wrap"> | |
24 | + <view wx:if="{{express.State==2}}" class="state-title">在途中</view> | |
25 | + <view wx:if="{{express.State==3}}" class="state-title">已签收</view> | |
26 | + <view wx:if="{{express.State==4}}" class="state-title">问题件</view> | |
15 | 27 | <view class="state-time">{{' '}}</view> |
16 | - </view> | |
17 | - <view class="item-wrap" wx:for="{{express.data}}" wx:key="{{index}}"> | |
18 | - <view class="state-title">{{item.context}}</view> | |
19 | - <view class="state-time">{{item.time}}</view> | |
28 | + </view> --> | |
29 | + | |
30 | + <view class="item-wrap" wx:for="{{re_arr}}" wx:key="{{index}}"> | |
31 | + <view class="state-title">{{item.AcceptStation}}</view> | |
32 | + <view class="state-time">{{item.AcceptTime}}</view> | |
20 | 33 | </view> |
21 | 34 | </view> |
22 | 35 | </view> |
36 | + | |
37 | +<view class="no_msg" wx:if="{{(!re_arr || re_arr.length==0) && express}}"> | |
38 | + {{express.Reason}} | |
39 | +</view> | ... | ... |
pages/user/express/express.wxss
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | |
28 | 28 | .state-item { |
29 | 29 | border-left: 1px solid #ccc; |
30 | - padding-left: 40rpx; | |
30 | + padding:0 40rpx; | |
31 | 31 | } |
32 | 32 | |
33 | 33 | .item-wrap { |
... | ... | @@ -57,4 +57,8 @@ |
57 | 57 | font-weight: bold; |
58 | 58 | color: #666; |
59 | 59 | padding-bottom: 20rpx; |
60 | + line-height: 40rpx | |
61 | +} | |
62 | +.no_msg{ | |
63 | + text-align: center;color: #999; font-size: 32rpx | |
60 | 64 | } |
61 | 65 | \ No newline at end of file | ... | ... |
pages/user/index/index.js
... | ... | @@ -75,7 +75,7 @@ Page({ |
75 | 75 | if (su.data.code == 0) { |
76 | 76 | var yuer = parseFloat(th.data.userInfo.user_money - |
77 | 77 | th.data.userInfo.frozen_money - su.data.data.summoney).toFixed(2); |
78 | - th.setData({ txmon: su.data.data.summoney, yuer }); | |
78 | + th.setData({ txmon: su.data.data.summoney, yuer: yuer }); | |
79 | 79 | } |
80 | 80 | } |
81 | 81 | }) | ... | ... |
pages/user/index/index.wxml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | bindtap="go_info" |
9 | 9 | src="{{userInfo.head_pic?userInfo.head_pic:defaultAvatar}}"></image> |
10 | 10 | <view class="xc-uesr-name"> |
11 | - {{userInfo.nickname}} <view class="hvip" wx:if='{{GradeName}}'><image class="vip-mem" src="{{iurl}}/miniapp/images/vip_hg0.png"></image>{{GradeName}}</view> | |
11 | + {{userInfo.nickname}} <view class="hvip" wx:if='{{GradeName && is_init}}'><image class="vip-mem" src="{{iurl}}/miniapp/images/vip_hg0.png"></image>{{GradeName}}</view> | |
12 | 12 | <view class="flex" style="font-size: 24rpx; margin-left:8rpx;margin-top:6rpx" wx:if="{{is_init && gradeId}}" bindtap='jump'> |
13 | 13 | <block wx:if="{{cz_val<full_cz_val}}"> |
14 | 14 | {{" "}}<text class="grow-up-val">成长值</text> <view style='margin-left:5rpx; margin-top:-4rpx;'>{{cz_val}} / {{need_money}}</view> |
... | ... | @@ -105,8 +105,8 @@ |
105 | 105 | <view class="xc-equity-title flex-level" bindtap="go_qy"> |
106 | 106 | <view class="xc-title-frame flex-space-between"> |
107 | 107 | <view class="flex-vertical xc-title-content"> |
108 | - <image class="xc-title-img" src="{{iurl}}/miniapp/images/equity.png"></image> | |
109 | - <view class="three-level-word xc-word" > | |
108 | + <image class="xc-title-img" src="../../../images/medal.png"></image> | |
109 | + <view class="three-level-word" > | |
110 | 110 | 我的权益 |
111 | 111 | </view> |
112 | 112 | </view> | ... | ... |
pages/user/index/index.wxss
... | ... | @@ -42,9 +42,9 @@ |
42 | 42 | } |
43 | 43 | .xc-uesr-name{ |
44 | 44 | color: #fff; |
45 | - font-size: 35rpx; | |
45 | + font-size: 32rpx; | |
46 | 46 | margin-top:17rpx; |
47 | - margin-left:20rpx; | |
47 | + margin-left:20rpx; | |
48 | 48 | |
49 | 49 | } |
50 | 50 | .xc-user-grade{ |
... | ... | @@ -525,6 +525,8 @@ border-radius:20rpx; |
525 | 525 | background:#ffbdce; |
526 | 526 | padding-left: 16rpx; |
527 | 527 | padding-right: 16rpx;padding-bottom: 3rpx; |
528 | +margin-right: 5rpx; | |
529 | + | |
528 | 530 | } |
529 | 531 | |
530 | 532 | .hvip{display: inline-block; font-size: 20rpx; height: 40rpx;line-height: 40rpx; color:#e7bf77; background: #383838; padding: 0 15rpx; border-radius:20rpx; vertical-align: middle } | ... | ... |
pages/user/integral/integral.js
... | ... | @@ -30,6 +30,8 @@ Page({ |
30 | 30 | money:1.00, |
31 | 31 | integral:50, |
32 | 32 | iurl: o.imghost, |
33 | + | |
34 | + is_show_jfcz:0, | |
33 | 35 | }, |
34 | 36 | /** |
35 | 37 | * 刷出积分劵 |
... | ... | @@ -47,9 +49,7 @@ Page({ |
47 | 49 | data:get_data |
48 | 50 | }).then(res => { |
49 | 51 | var msg = res.data; |
50 | - console.log("是什么",msg); | |
51 | - result = msg.data.pageData; | |
52 | - console.log("是什sssssss么", result); | |
52 | + result = msg.data.pageData; | |
53 | 53 | }) |
54 | 54 | e.setData({ |
55 | 55 | result: result |
... | ... | @@ -192,7 +192,11 @@ Page({ |
192 | 192 | * 生命周期函数--监听页面加载 |
193 | 193 | */ |
194 | 194 | onLoad: function (options) { |
195 | - | |
195 | + var th=this; | |
196 | + getApp().getConfig2(function(ee){ | |
197 | + var json_d = JSON.parse(ee.switch_list); | |
198 | + th.setData({ is_show_jfcz: json_d.jfcz_switch }); | |
199 | + }) | |
196 | 200 | }, |
197 | 201 | |
198 | 202 | /** | ... | ... |
pages/user/integral/integral.wxml
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" >积分明细</view></view> |
17 | 17 | <view class="jfmx-rim"bindtap="swichNav"> |
18 | 18 | <!-- class='ter' --> |
19 | - <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" >积分充值</view></view> | |
19 | + <view wx:if="{{is_show_jfcz}}" class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" >积分充值</view></view> | |
20 | 20 | </view> |
21 | 21 | <view wx:if="{{jfmx}}"> |
22 | 22 | <view class='body' bindtap="detailed"> |
... | ... | @@ -41,7 +41,8 @@ |
41 | 41 | </view> |
42 | 42 | <view class="val" style='color:{{(details.InIntegral!="0")?"green":""}}'> |
43 | 43 | {{(details.OutIntegral==0)?"+":""}}{{(details.InIntegral==0)?filter.getNum(details.OutIntegral):filter.getNum(details.InIntegral)}}积分 </view> |
44 | - </view> | |
44 | + </view> | |
45 | + <view style="clear:both"></view> | |
45 | 46 | </block> |
46 | 47 | |
47 | 48 | </view> | ... | ... |
pages/user/integral/integral.wxss
... | ... | @@ -431,7 +431,7 @@ line-height:85rpx; |
431 | 431 | } |
432 | 432 | /*左边的数据 */ |
433 | 433 | .left{ |
434 | - width:80%; | |
434 | + width:70%; | |
435 | 435 | height: 120rpx; |
436 | 436 | |
437 | 437 | } |
... | ... | @@ -459,7 +459,7 @@ line-height:85rpx; |
459 | 459 | font-size: 27rpx; |
460 | 460 | font-family: 'SimHei',Arial; |
461 | 461 | text-align:right; |
462 | - | |
462 | + float: right | |
463 | 463 | |
464 | 464 | } |
465 | 465 | /* .更多 */ | ... | ... |
pages/user/order_detail/order_detail.js
... | ... | @@ -112,14 +112,17 @@ Page({ |
112 | 112 | success: function(e) { |
113 | 113 | if(!e.confirm) return false; |
114 | 114 | //如果是秒杀和拼单的商品,取消订单要返回redis,并取消订单 |
115 | - if(is_skill==1 || is_zsorder>=2){ | |
116 | - getApp().request.delete("/api/weshop/order/cancelTeamOrder/"+os.stoid+"/"+o,{ | |
117 | - data:{}, | |
118 | - success: function(t) { | |
119 | - if(t.data.code==0) | |
120 | - th.requestOrderDetail(o), wx.setStorageSync("order:order_list:update", !0); | |
121 | - }, | |
122 | - }) | |
115 | + //if(is_skill==1 || is_zsorder>=2){ | |
116 | + | |
117 | + getApp().request.delete("/api/weshop/order/cancelTeamOrder/"+os.stoid+"/"+o,{ | |
118 | + data:{}, | |
119 | + success: function(t) { | |
120 | + if(t.data.code==0) | |
121 | + th.requestOrderDetail(o), wx.setStorageSync("order:order_list:update", !0); | |
122 | + }, | |
123 | + }) | |
124 | + | |
125 | + /*---- | |
123 | 126 | }else{ |
124 | 127 | getApp().request.put("/api/weshop/order/updatebyId", { |
125 | 128 | data: {order_id: o, order_status: 3}, |
... | ... | @@ -127,7 +130,7 @@ Page({ |
127 | 130 | th.requestOrderDetail(o), wx.setStorageSync("order:order_list:update", !0); |
128 | 131 | } |
129 | 132 | }); |
130 | - } | |
133 | + }--*/ | |
131 | 134 | } |
132 | 135 | }); |
133 | 136 | }, |
... | ... | @@ -137,7 +140,7 @@ Page({ |
137 | 140 | var t = this, o = this.data.order.order_id,order=this.data.order; |
138 | 141 | var is_zsorder=order.is_zsorder; |
139 | 142 | wx.showModal({ |
140 | - title: "是否确定收货", | |
143 | + title: "是否确认收货?", | |
141 | 144 | success: function(e) { |
142 | 145 | e.confirm && r.put("/api/weshop/order/updatebyId", { |
143 | 146 | data: { |
... | ... | @@ -178,4 +181,9 @@ Page({ |
178 | 181 | _errObj[_errImg] = "public/images/default_goods_image_240.gif"; |
179 | 182 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
180 | 183 | }, |
184 | + | |
185 | + zfwk:function(){ | |
186 | + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id; | |
187 | + getApp().goto(url); | |
188 | + } | |
181 | 189 | }); |
182 | 190 | \ No newline at end of file | ... | ... |
pages/user/order_detail/order_detail.wxml
1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
1 | 2 | <view class="container"> |
2 | 3 | <view class="user-mes" wx:if="{{order.exp_type==0}}"> |
3 | 4 | <view class="user-contact"> |
... | ... | @@ -60,45 +61,59 @@ |
60 | 61 | </view> |
61 | 62 | </view> |
62 | 63 | <view class="price-information information"> |
63 | - <view class="title">价格信息</view> | |
64 | - <view class="item"> | |
65 | - <view>商品总价</view> | |
66 | - <view>¥ {{order.goods_price}}元</view> | |
67 | - </view> | |
68 | - <view class="item" wx:if="{{order.shipping_price>0}}"> | |
69 | - <view>运费</view> | |
70 | - <view>¥ {{order.shipping_price}}元</view> | |
71 | - </view> | |
72 | - <view class="item" wx:if="{{order.coupon_price>0}}"> | |
73 | - <view>优惠券</view> | |
74 | - <view>- ¥ {{order.coupon_price}}元</view> | |
75 | - </view> | |
76 | - <view class="item" wx:if="{{order.integral_money>0}}"> | |
77 | - <view>积分</view> | |
78 | - <view>- ¥ {{order.integral_money}}元</view> | |
79 | - </view> | |
80 | - <view class="item" wx:if="{{order.user_money>0}}"> | |
81 | - <view>余额</view> | |
82 | - <view>- ¥ {{order.user_money}}元</view> | |
83 | - </view> | |
84 | - <view class="item" wx:if="{{order.order_prom_amount>0}}"> | |
85 | - <view>订单优惠</view> | |
86 | - <view>- ¥ {{order.order_prom_amount}}元</view> | |
87 | - </view> | |
88 | - <view class="item" wx:if="{{order.pt_tail_money>0}}"> | |
89 | - <view>尾款金额</view> | |
90 | - <view>- ¥ {{order.pt_tail_money}}元</view> | |
91 | - </view> | |
64 | + <view class="title" style="margin-bottom:10rpx" >价格信息</view> | |
65 | + <view class="item pnew" wx:if="{{order.is_zsorder==4}}"> | |
66 | + <view>商品总价</view> | |
67 | + <view>¥ {{filters.toFix(order.order_goods[0].member_goods_price*order.order_goods[0].goods_num,2)}}元</view> | |
68 | + </view> | |
69 | + <view class="item pnew" wx:else> | |
70 | + <view>商品总价</view> | |
71 | + <view>¥ {{order.goods_price}}元</view> | |
72 | + </view> | |
92 | 73 | |
74 | + <view class="item pnew" wx:if="{{order.is_zsorder==4}}"> | |
75 | + <view>定金金额</view> | |
76 | + <view>¥ {{filters.toFix(order.order_amount+order.user_money,2)}}元</view> | |
77 | + </view> | |
78 | + <view class="item pnew" wx:if="{{order.pt_tail_money>0}}"> | |
79 | + <view>尾款金额</view> | |
80 | + <view>¥ {{filters.toFix(order.pt_tail_money-order.shipping_price,2)}}元</view> | |
81 | + </view> | |
93 | 82 | |
94 | - <view class="item"> | |
95 | - <view>实付金额</view> | |
96 | - <view class="pay-amount">¥ {{order.order_amount}}元</view> | |
97 | - </view> | |
83 | + <view class="item pnew" wx:if="{{order.shipping_price>0}}"> | |
84 | + <view>配送费用</view> | |
85 | + <view>¥ {{order.shipping_price}}元</view> | |
86 | + </view> | |
87 | + <view class="item pnew" wx:if="{{order.coupon_price>0}}"> | |
88 | + <view>优惠券</view> | |
89 | + <view> ¥ {{order.coupon_price}}元</view> | |
90 | + </view> | |
91 | + | |
92 | + <view class="item pnew" wx:if="{{order.integral_money>0}}"> | |
93 | + <view>积分</view> | |
94 | + <view> ¥ {{order.integral_money}}元</view> | |
95 | + </view> | |
96 | + | |
97 | + <view class="item pnew" wx:if="{{order.order_prom_amount>0}}"> | |
98 | + <view>订单优惠</view> | |
99 | + <view>¥ {{order.order_prom_amount}}元</view> | |
100 | + </view> | |
101 | + | |
102 | + <view class="item"> | |
103 | + <view>订单总价</view> | |
104 | + <view>¥ {{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view> | |
105 | + </view> | |
106 | + | |
107 | + <view class="item-line"></view> | |
108 | + <view class="item" wx:if="{{order.user_money>0}}"> | |
109 | + <view>使用余额</view> | |
110 | + <view wx:if="{{order.tail_pay_type==1}}">¥ {{order.user_money+order.pt_tail_money}}元</view> | |
111 | + <view wx:else>¥ {{order.user_money}}元</view> | |
112 | + </view> | |
98 | 113 | </view> |
99 | 114 | |
100 | 115 | <view class="btn-wrap"> |
101 | - <view bindtap="zfwk" class="tips-btn" wx:if="{{order.pt_tail_money>0}}">支付尾款</view> | |
116 | + <view bindtap="zfwk" class="tips-btn" wx:if="{{order.pt_tail_money>0 && order.pt_status==2 }}">支付尾款</view> | |
102 | 117 | <view bindtap="jumpToCart4" class="tips-btn" hidden="{{!order.pay_btn}}">立即付款</view> |
103 | 118 | <navigator bindtap="confirmOrder" class="tips-btn" hidden="{{!order.receive_btn}}">收货确认</navigator> |
104 | 119 | <navigator class="tips-btn" hidden="{{!order.shipping_btn}}" url="/pages/user/express/express?order_id={{order.order_id}}">查看物流</navigator> | ... | ... |
pages/user/order_detail/order_detail.wxss
... | ... | @@ -119,7 +119,7 @@ |
119 | 119 | .information .title { |
120 | 120 | height: 70rpx; |
121 | 121 | line-height: 70rpx; |
122 | - border-bottom: 1px solid #ddd; | |
122 | + border-bottom: 1rpx solid #ddd; | |
123 | 123 | font-size: 34rpx; |
124 | 124 | color: #333; |
125 | 125 | } |
... | ... | @@ -130,8 +130,15 @@ |
130 | 130 | height: 60rpx; |
131 | 131 | line-height: 60rpx; |
132 | 132 | font-size: 30rpx; |
133 | - color: #666; | |
133 | + color: #333; | |
134 | +} | |
135 | + | |
136 | +.information .item.pnew{ | |
137 | + height: 50rpx; | |
138 | + line-height: 50rpx; | |
139 | + color: #999; | |
134 | 140 | } |
141 | +.item-line{ margin: 5rpx 0; height: 1rpx; border-bottom:1rpx solid #ddd } | |
135 | 142 | |
136 | 143 | .delivery-address,.leave-word { |
137 | 144 | width: 500rpx; | ... | ... |
pages/user/order_list/order_list.js
... | ... | @@ -194,7 +194,7 @@ Page({ |
194 | 194 | success: function(t) { |
195 | 195 | //如果是秒杀和拼单的商品,取消订单要返回redis,并取消订单 |
196 | 196 | if(t.confirm){ |
197 | - if(is_skill==1 || is_zsorder>=2){ | |
197 | + //if(is_skill==1 || is_zsorder>=2){ | |
198 | 198 | getApp().request.delete("/api/weshop/order/cancelTeamOrder/"+os.stoid+"/"+a,{ |
199 | 199 | data:{}, |
200 | 200 | success: function(t) { |
... | ... | @@ -208,18 +208,7 @@ Page({ |
208 | 208 | getApp().confirmBox(e.data.msg); |
209 | 209 | } |
210 | 210 | }, |
211 | - }) | |
212 | - }else{ | |
213 | - rq.put("/api/weshop/order/updatebyId", { | |
214 | - data: { | |
215 | - order_id: a, order_status: 3 | |
216 | - }, | |
217 | - success: function (t) { | |
218 | - 0 == e.data.activeCategoryId ? | |
219 | - (e.resetData(), e.requestOrderList(e.data.activeCategoryId)) : e.deleteOrderData(a); | |
220 | - } | |
221 | - }); | |
222 | - } | |
211 | + }) | |
223 | 212 | } |
224 | 213 | } |
225 | 214 | }); |
... | ... | @@ -234,7 +223,7 @@ Page({ |
234 | 223 | console.log(is_zsorder); |
235 | 224 | |
236 | 225 | wx.showModal({ |
237 | - title: "是否确定收货", | |
226 | + title: "是否确认收货?", | |
238 | 227 | success: function(t) { |
239 | 228 | t.confirm && rq.put("/api/weshop/order/updatebyId", { |
240 | 229 | data: { |
... | ... | @@ -289,7 +278,32 @@ Page({ |
289 | 278 | |
290 | 279 | /*----------跳转支付-----------*/ |
291 | 280 | jumpToCart4: function(t) { |
281 | + var o_index=t.currentTarget.dataset.idx; | |
292 | 282 | var e = this.data.orderList[t.currentTarget.dataset.idx]; |
283 | + var th=this; | |
284 | + | |
285 | + console.log("jumpToCart4"); | |
286 | + console.log(e); | |
287 | + | |
288 | + if(e.order_amount==0){ | |
289 | + var dd = { | |
290 | + parent_sn: e.order_sn, | |
291 | + store_id: e.store_id, | |
292 | + type: 1, | |
293 | + }; | |
294 | + getApp().request.post("/api/weshop/order/pay/createOrder", { | |
295 | + data: dd, | |
296 | + success: function (t) { | |
297 | + if(t.data.code==0){ | |
298 | + th.onload(); | |
299 | + }else{ | |
300 | + getApp().confirmBox(t.data.msg+"请您取消该订单"); | |
301 | + } | |
302 | + } | |
303 | + }) | |
304 | + return false; | |
305 | + } | |
306 | + | |
293 | 307 | a.jumpToCart4({ |
294 | 308 | order_sn: e.order_sn, |
295 | 309 | order_amount: e.order_amount, | ... | ... |
pages/user/order_list/order_list.wxml
1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
1 | 2 | <view class="container"> |
2 | 3 | <view class="type-navbar"> |
3 | 4 | <view class="type-box" wx:for="{{categories}}" wx:key="{{index}}"> |
... | ... | @@ -23,8 +24,8 @@ |
23 | 24 | data-errorimg="orderList[{{index}}].order_goods[{{pinx}}].original_img"></image> |
24 | 25 | </navigator> |
25 | 26 | <navigator class="goods-mes" url="/pages/user/order_detail/order_detail?order_id={{goods.order_id}}"> |
26 | - <view class="goods-name">{{goods.goods_name}}</view> | |
27 | - <view class="goods-name">{{goods.goods_color}} {{goods.goods_spec}}</view> | |
27 | + <view class="goods-name" >{{goods.goods_name}}</view> | |
28 | + <view class="goods-name" style="color:#999">{{goods.goods_color}} {{goods.goods_spec}}</view> | |
28 | 29 | <view class="goods-price">¥ {{goods.member_goods_price}}</view> |
29 | 30 | <view class="goods-num">数量 {{goods.goods_num}}</view> |
30 | 31 | </navigator> |
... | ... | @@ -48,8 +49,15 @@ |
48 | 49 | <view class="goods-tips"> |
49 | 50 | <view class="order-total"> |
50 | 51 | 共{{item.g_num}}件,<view class="goods-total"> |
51 | - <view>金额:¥{{item.order_amount+item.user_money}}</view> | |
52 | - <view wx:if="{{item.pt_tail_money>0}}">尾款:¥{{item.pt_tail_money}}</view> | |
52 | + <block wx:if="{{item.pt_status==4 || item.pt_status==5 }}"> | |
53 | + <view>金额:¥{{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}}</view> | |
54 | + </block> | |
55 | + <block wx:else> | |
56 | + <view wx:if="{{item.is_zsorder==4}}">定金:¥{{filters.toFix(item.order_amount+item.user_money,2)}}</view> | |
57 | + <view wx:else>金额:¥{{filters.toFix(item.order_amount+item.user_money,2)}}</view> | |
58 | + <view wx:if="{{item.pt_tail_money>0}}">尾款:¥{{filters.toFix(item.pt_tail_money-item.shipping_price,2)}}</view> | |
59 | + </block> | |
60 | + | |
53 | 61 | </view> |
54 | 62 | </view> |
55 | 63 | <view class="check-btn"> | ... | ... |
pages/user/order_list/order_list.wxss
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | .goods-box { |
37 | 37 | width: 100%; |
38 | 38 | background-color: #fff; |
39 | - padding: 0 30rpx; | |
39 | + padding: 0 25rpx; | |
40 | 40 | margin-bottom: 20rpx; |
41 | 41 | font-size: 28rpx; |
42 | 42 | border-bottom: 1rpx solid #eee; |
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | .order-total { |
118 | 118 | display: flex; |
119 | 119 | justify-content: flex-start; |
120 | - font-size: 32rpx; | |
120 | + font-size: 31rpx; | |
121 | 121 | color: #333; |
122 | 122 | } |
123 | 123 | |
... | ... | @@ -127,12 +127,12 @@ |
127 | 127 | } |
128 | 128 | |
129 | 129 | .order-btn { |
130 | - width: 150rpx; | |
130 | + width: 125rpx; | |
131 | 131 | height: 60rpx; |
132 | 132 | line-height: 60rpx; |
133 | 133 | text-align: center; |
134 | 134 | border: 1px solid #eee; |
135 | - margin-left: 20rpx; | |
135 | + margin-left: 10rpx; | |
136 | 136 | float: right; |
137 | 137 | border-radius: 5rpx; |
138 | 138 | } | ... | ... |
pages/user/userqy/userqy.wxml
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | [{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum }}可保级 |
41 | 41 | </block> |
42 | 42 | </view> |
43 | - <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}">会员将在{{filter.replace_time(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计成长值≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum}}可保级</text> | |
43 | + <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}">会员将在{{filter.replace_time2(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计成长值≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum}}可保级</text> | |
44 | 44 | </view> |
45 | 45 | <view class=" abs white discounts four-level-word" wx:if="{{gradeId!=item.Id && cz_val>item.BuyGradeSum }}"> |
46 | 46 | [{{item.GradeName}}]365天累计成长值≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}] | ... | ... |
pages/user/userqy/userqy.wxss
utils/regions/Regions.js
... | ... | @@ -38,6 +38,9 @@ var s = function() { |
38 | 38 | return s(a, [ { |
39 | 39 | key: "openRegionsModal", |
40 | 40 | value: function(t) { |
41 | + this.page.setData({ | |
42 | + disabled:1 | |
43 | + }); | |
41 | 44 | var s = this, a = t.currentTarget.dataset.id, i = t.currentTarget.dataset.name; |
42 | 45 | isNaN(parseInt(a)) || !parseInt(a) ? (a = 0, this.currentArea = 0) : (0 == this.currentArea ? (this.address.province_name = i, |
43 | 46 | this.address.province = a, this.address.city_name = "", this.address.city = 0, this.address.district_name = "", |
... | ... | @@ -55,13 +58,14 @@ var s = function() { |
55 | 58 | t.data.data.pageData && t.data.data.pageData.length > 0 ? s.page.setData(e({}, s.dataName, { |
56 | 59 | regions: t.data.data.pageData, |
57 | 60 | showRegionsModal: !0 |
58 | - })) : s.endCall(a, i); | |
61 | + })) : s.endCall(a, i); | |
59 | 62 | } |
60 | 63 | }) : this.endCall(a, i); |
61 | 64 | } |
62 | 65 | }, { |
63 | 66 | key: "closeRegionsModal", |
64 | 67 | value: function() { |
68 | + this.page.setData({disabled:0}); | |
65 | 69 | this.page.setData(e({}, this.dataName, { |
66 | 70 | showCategoryModal: !1 |
67 | 71 | })); | ... | ... |
utils/util.js
... | ... | @@ -6,6 +6,7 @@ function isArray(obj) { |
6 | 6 | return (typeof obj == 'object') && obj.constructor == Array; |
7 | 7 | } |
8 | 8 | |
9 | + | |
9 | 10 | function sub_last(str){ |
10 | 11 | return str.substring(0, str.length - 1) |
11 | 12 | } |
... | ... | @@ -230,6 +231,22 @@ function measureText(text, fontSize = 10) { |
230 | 231 | return width * fontSize / 10; |
231 | 232 | } |
232 | 233 | |
234 | +//验证手机号 | |
235 | +function check_mobile(phoneMobile){ | |
236 | + var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; | |
237 | + var ob={code:1}; | |
238 | + if (phoneMobile.length === 0) { | |
239 | + ob.title='输入的手机号为空'; | |
240 | + ob.code=-1; | |
241 | + } else if (phoneMobile.length < 11) { | |
242 | + ob.title ='手机号长度有误!'; | |
243 | + ob.code = -1; | |
244 | + } else if (!myreg.test(phoneMobile)) { | |
245 | + ob.title = '手机号格式有误!'; | |
246 | + ob.code = -1; | |
247 | + } | |
248 | + return ob; | |
249 | +} | |
233 | 250 | |
234 | 251 | module.exports = { |
235 | 252 | formatTime: function(e, r) { |
... | ... | @@ -319,4 +336,6 @@ module.exports = { |
319 | 336 | isArray: isArray, |
320 | 337 | sub_last: sub_last,//去掉末尾一个字符 |
321 | 338 | measureText: measureText,//画布需要的函数 |
339 | + check_mobile: check_mobile,//验证手机 | |
340 | + | |
322 | 341 | }; | ... | ... |