- 
Status changed to merged 
- 
mentioned in commit 3ec3b63fa54a1f5b97e2c7726dfbbd330f2569e4 
Showing
39 changed files
app.wxss
| ... | ... | @@ -19,6 +19,10 @@ button { | 
| 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; | 
| ... | ... | @@ -187,6 +192,10 @@ position:fixed; | 
| 187 | 192 | display: flex; | 
| 188 | 193 | justify-content:space-between; | 
| 189 | 194 | } | 
| 195 | +/* 使文字处于水平线上 */ | |
| 196 | +.ai-bas{ | |
| 197 | +align-items: baseline; | |
| 198 | +} | |
| 190 | 199 | |
| 191 | 200 | |
| 192 | 201 | /* 垂直居中 中间等距两边贴边 7.13*/ | 
| ... | ... | @@ -251,28 +260,19 @@ justify-content:space-around; | 
| 251 | 260 | font-style: normal; | 
| 252 | 261 | } | 
| 253 | 262 | |
| 254 | -.fs20{ | |
| 255 | - font-size: 20rpx; | |
| 256 | -} | |
| 257 | 263 | .fs22{ | 
| 258 | 264 | font-size: 22rpx; | 
| 259 | 265 | } | 
| 260 | -.fs24{ | |
| 261 | - font-size: 24rpx; | |
| 262 | -} | |
| 266 | + | |
| 263 | 267 | .fs26{ | 
| 264 | 268 | font-size: 26rpx; | 
| 265 | 269 | } | 
| 266 | -.fs28{ | |
| 267 | - font-size: 28rpx; | |
| 268 | -} | |
| 270 | + | |
| 269 | 271 | |
| 270 | 272 | .fs30{ | 
| 271 | 273 | font-size:30rpx; | 
| 272 | 274 | } | 
| 273 | -.fs32{ | |
| 274 | - font-size:32rpx; | |
| 275 | -} | |
| 275 | + | |
| 276 | 276 | .fs35{ | 
| 277 | 277 | font-size:35rpx; | 
| 278 | 278 | } | 
| ... | ... | @@ -282,11 +282,19 @@ justify-content:space-around; | 
| 282 | 282 | .fs50{ | 
| 283 | 283 | font-size: 50rpx; | 
| 284 | 284 | } | 
| 285 | -.fs60{ font-size:60rpx;} | |
| 285 | + | |
| 286 | 286 | |
| 287 | 287 | /* 7.26 */ | 
| 288 | -.xc-wc{ | |
| 289 | - color: #e4374d; | |
| 288 | + | |
| 289 | +.red-b{ | |
| 290 | + background: #d60021; | |
| 291 | +} | |
| 292 | +.red-co{ | |
| 293 | + color: #d60021; | |
| 294 | + | |
| 295 | +} | |
| 296 | +.co-red { | |
| 297 | + color: #f23030; | |
| 290 | 298 | } | 
| 291 | 299 | .oh{ | 
| 292 | 300 | overflow: hidden; | 
| ... | ... | @@ -300,4 +308,42 @@ color: #b9b9b9; | 
| 300 | 308 | } | 
| 301 | 309 | |
| 302 | 310 | |
| 311 | +.xc-fixed{ | |
| 312 | +position: fixed; | |
| 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; | |
| 303 | 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 | +} | |
| 304 | 350 | \ No newline at end of file | ... | ... | 
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,11 +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 | - | |
| 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 | + }) | |
| 85 | 99 | }, | 
| 86 | 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 | + | |
| 87 | 143 | //-------------------获取物流--------------- | 
| 88 | 144 | get_wuliu(func) { | 
| 89 | 145 | var th = this; | 
| ... | ... | @@ -101,8 +157,7 @@ Page({ | 
| 101 | 157 | }, | 
| 102 | 158 | |
| 103 | 159 | //------获取会员收货地址----- | 
| 104 | - getuser_addr:function(func){ | |
| 105 | - | |
| 160 | + getuser_addr:function(func){ | |
| 106 | 161 | a.get("/api/weshop/useraddress/page", { | 
| 107 | 162 | data: { user_id: to.globalData.user_id, store_id: oo.stoid, pageSize: 600 }, | 
| 108 | 163 | success: function (su) { | 
| ... | ... | @@ -113,10 +168,15 @@ Page({ | 
| 113 | 168 | ];---*/ | 
| 114 | 169 | var user_addr = su.data.data.pageData; | 
| 115 | 170 | var item = null; | 
| 171 | + var def_item=null; | |
| 116 | 172 | for (var i = 0; i < user_addr.length; i++) { | 
| 117 | - 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]; } | |
| 118 | 175 | } | 
| 176 | + | |
| 177 | + if (item == null) item = def_item; | |
| 119 | 178 | if (item == null) item = user_addr[0]; | 
| 179 | + | |
| 120 | 180 | if(item==undefined) item=null; | 
| 121 | 181 | func(item); | 
| 122 | 182 | } | 
| ... | ... | @@ -261,14 +321,30 @@ Page({ | 
| 261 | 321 | arr[ind].check_quan_ware_list=check_quan_ware_list; | 
| 262 | 322 | arr[ind].check_quan_price_list=check_quan_price_list; | 
| 263 | 323 | |
| 264 | - //调用接口,获取优惠券的列表 | |
| 265 | - var url="/api/weshop/couponList/getUseCouponList"; | |
| 266 | - await app.request.promiseGet(url,{ | |
| 267 | - data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:ckeck_quan_price,WareIds:check_quan_ware_list,pageSize:100} | |
| 268 | - }).then(res=>{ | |
| 269 | - if(res.data.code==0) | |
| 270 | - arr[ind].quan_list=res.data.data.pageData; | |
| 271 | - }) | |
| 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 | + } | |
| 272 | 348 | } | 
| 273 | 349 | |
| 274 | 350 | th.setData({ | 
| ... | ... | @@ -315,14 +391,32 @@ Page({ | 
| 315 | 391 | th.data.check_quan_ware_list=t.data.data.erpwareid+""; | 
| 316 | 392 | |
| 317 | 393 | var quanlist=null; | 
| 318 | - var url="/api/weshop/couponList/getUseCouponList"; | |
| 319 | - await app.request.promiseGet(url,{ | |
| 320 | - data:{storeId:oo.stoid,userId:app.globalData.user_id,BuySum:th.data.ckeck_quan_price,WareIds:th.data.check_quan_ware_list,pageSize:100} | |
| 321 | - }).then(res=>{ | |
| 322 | - if(res.data.code==0) | |
| 323 | - 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 | + } | |
| 324 | 411 | }) | 
| 325 | 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 | + | |
| 326 | 420 | th.setData({ | 
| 327 | 421 | bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et, | 
| 328 | 422 | bn_pick: gg.pick_id, bn_t_exp_t: distr_t,selected_quan_list:quanlist | 
| ... | ... | @@ -332,17 +426,45 @@ Page({ | 
| 332 | 426 | |
| 333 | 427 | break; | 
| 334 | 428 | case 1: //---秒杀----- | 
| 429 | + var quanlist=null; | |
| 335 | 430 | getApp().request.get("/api/weshop/activitylist/getSJGoodsPrice/"+gd.store_id | 
| 336 | 431 | + "/" + gd.goods_id + "/1/" + gd.prom_id,{ | 
| 337 | - success: function (tt) { | |
| 432 | + success: async function (tt) { | |
| 338 | 433 | if(tt.data.code==0){ | 
| 339 | - t.data.data.shop_price=tt.data.data.prom_price; | |
| 434 | + t.data.data.shop_price=tt.data.data.prom_price; | |
| 340 | 435 | }else{ | 
| 341 | - 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 | + } | |
| 342 | 464 | } | 
| 343 | 465 | th.setData({ | 
| 344 | 466 | bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et, | 
| 345 | - 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 | |
| 346 | 468 | }); | 
| 347 | 469 | //计算价格 | 
| 348 | 470 | th.calculatePrice2(); | 
| ... | ... | @@ -356,36 +478,6 @@ Page({ | 
| 356 | 478 | } | 
| 357 | 479 | }, | 
| 358 | 480 | |
| 359 | - //----------子页返回父页触发---------- | |
| 360 | - onShow: function() { | |
| 361 | - console.log('onshow'); | |
| 362 | - var th=this; | |
| 363 | - console.log(th.data.isclose); | |
| 364 | - if (th.data.isclose==0){ | |
| 365 | - /*--- | |
| 366 | - wx.navigateTo({ | |
| 367 | - url: "/pages/user/index/index" | |
| 368 | - //url: "/pages/index/index/index" | |
| 369 | - })---*/ | |
| 370 | - wx.switchTab({ | |
| 371 | - url: "/pages/index/index/index" | |
| 372 | - }) | |
| 373 | - | |
| 374 | - }else{ | |
| 375 | - this.getuser_addr(function(ie){ | |
| 376 | - | |
| 377 | - console.log("getuser_addr") | |
| 378 | - console.log(ie) | |
| 379 | - | |
| 380 | - th.setData({user_addr: ie }); | |
| 381 | - if (th.data.is_b_now == 1) { | |
| 382 | - th.calculatePrice2(); | |
| 383 | - } else { | |
| 384 | - th.calculatePrice(); | |
| 385 | - } | |
| 386 | - }); | |
| 387 | - } | |
| 388 | - }, | |
| 389 | 481 | //---------------检查是否有收货地址------------------- | 
| 390 | 482 | checkAddressList: function() { | 
| 391 | 483 | var t = this; | 
| ... | ... | @@ -710,7 +802,8 @@ Page({ | 
| 710 | 802 | 'twon': addr == null ? 0 : addr.twon, | 
| 711 | 803 | 'address': addr == null ? "": addr.address, | 
| 712 | 804 | 'more_address': addr == null ? "" : addr.more_address, | 
| 713 | - 'mobile': th.data.userinfo.mobile, | |
| 805 | + //'mobile': th.data.userinfo.mobile, | |
| 806 | + 'mobile': addr == null ? th.data.userinfo.mobile : addr.mobile, | |
| 714 | 807 | 'email':'', | 
| 715 | 808 | 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code, | 
| 716 | 809 | 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name, | 
| ... | ... | @@ -894,15 +987,19 @@ Page({ | 
| 894 | 987 | a.post("/api/weshop/order/pay/createOrder", { | 
| 895 | 988 | data: dd, | 
| 896 | 989 | success: function (t) { | 
| 897 | - console.log(t); | |
| 898 | - //app.showWarning("支付成功"); | |
| 899 | - app.my_warnning("支付成功",1,th); | |
| 900 | - setTimeout(function () { | |
| 901 | - th.setData({ isclose: 0 }); | |
| 902 | - wx.navigateTo({ | |
| 903 | - url: "/pages/user/order_list/order_list" | |
| 904 | - }) | |
| 905 | - }, 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 | + | |
| 906 | 1003 | } | 
| 907 | 1004 | }); | 
| 908 | 1005 | } | 
| ... | ... | @@ -945,7 +1042,7 @@ Page({ | 
| 945 | 1042 | }, | 
| 946 | 1043 | enterAddressPage: function() { | 
| 947 | 1044 | this.data.enterAddressPage = !0, wx.navigateTo({ | 
| 948 | - url: "/pages/user/address_list/address_list?operate=select" | |
| 1045 | + url: "/pages/user/address_list/address_list?is_back=1" | |
| 949 | 1046 | }); | 
| 950 | 1047 | }, | 
| 951 | 1048 | |
| ... | ... | @@ -1068,13 +1165,9 @@ Page({ | 
| 1068 | 1165 | var bn=e.currentTarget.dataset.bn; | 
| 1069 | 1166 | var cindx=e.currentTarget.dataset.cind; | 
| 1070 | 1167 | |
| 1071 | - console.log("open_coupon_list--quan"); | |
| 1072 | - console.log("门店:"+pickid); | |
| 1073 | - console.log(bn); | |
| 1074 | - | |
| 1075 | 1168 | |
| 1076 | 1169 | if(bn==1){ | 
| 1077 | - th.setData({open_quan:1,selected_quan_pick:pickid}); | |
| 1170 | + th.setData({open_quan:1,selected_quan_pick:pickid, disabled:1}); | |
| 1078 | 1171 | }else{ | 
| 1079 | 1172 | //---多单打开券的时候,就要判断券在其他门店是否有使用--- | 
| 1080 | 1173 | var quanlist=th.data.cartlist[cindx].quan_list; | 
| ... | ... | @@ -1083,12 +1176,12 @@ Page({ | 
| 1083 | 1176 | var is_using= th.check_in_sele(quanlist[i].CashRepNo,pickid); | 
| 1084 | 1177 | if(is_using) quanlist[i].is_using=1; | 
| 1085 | 1178 | } | 
| 1086 | - 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}); | |
| 1087 | 1180 | } | 
| 1088 | 1181 | }, | 
| 1089 | 1182 | close_coupon:function (e) { | 
| 1090 | 1183 | var th=this; | 
| 1091 | - th.setData({open_quan:0}); | |
| 1184 | + th.setData({open_quan:0,disabled:0}); | |
| 1092 | 1185 | }, | 
| 1093 | 1186 | |
| 1094 | 1187 | //---判断券时候在已经选择的列表中--- | 
| ... | ... | @@ -1201,6 +1294,26 @@ Page({ | 
| 1201 | 1294 | var ob={}; | 
| 1202 | 1295 | ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif"; | 
| 1203 | 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; | |
| 1204 | 1316 | } | 
| 1205 | 1317 | |
| 1318 | + | |
| 1206 | 1319 | }); | ... | ... | 
pages/cart/cart2/cart2.wxml
| ... | ... | @@ -54,7 +54,7 @@ | 
| 54 | 54 | |
| 55 | 55 | <!-----使用优惠券------> | 
| 56 | 56 | <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" | 
| 57 | - 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}}"> | |
| 58 | 58 | <view class="work-frame flex-space-between"> | 
| 59 | 59 | <view class="work">使用优惠券</view> | 
| 60 | 60 | <view class="xc-right-frame"> | 
| ... | ... | @@ -89,7 +89,7 @@ | 
| 89 | 89 | <view class="coupon-mes"> | 
| 90 | 90 | <view>用户备注(50字)</view> | 
| 91 | 91 | <view class="leave-word"> | 
| 92 | - <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> | |
| 93 | 93 | <view class="max-word">{{maxWord}}/50</view> | 
| 94 | 94 | </view> | 
| 95 | 95 | </view> | 
| ... | ... | @@ -127,7 +127,7 @@ | 
| 127 | 127 | </view> | 
| 128 | 128 | |
| 129 | 129 | <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}" | 
| 130 | - wx:if="{{selected_quan_list}}"> | |
| 130 | + wx:if="{{selected_quan_list && selected_quan_list.length>0}}"> | |
| 131 | 131 | <view class="work-frame flex-space-between"> | 
| 132 | 132 | <view class="work"> | 
| 133 | 133 | 使用优惠券 | 
| ... | ... | @@ -183,19 +183,9 @@ | 
| 183 | 183 | </view> | 
| 184 | 184 | </view> | 
| 185 | 185 | <view class="coupon-mes"> | 
| 186 | - <!-- <view bindtap="useCoupon" class="coupon-title"> | |
| 187 | - <view class="classname"> | |
| 188 | - <view class="">优惠券</view> | |
| 189 | - <view class="coupon-num">{{order.couponNum}}张可用</view> | |
| 190 | - </view> | |
| 191 | - <view class="set-btn"> | |
| 192 | - <view>{{coupon?coupon.coupon.name:'未使用'}}</view> | |
| 193 | - <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/icon-arrowdown.png"></image> | |
| 194 | - </view> | |
| 195 | - </view> --> | |
| 196 | 186 | <view>用户备注(50字)</view> | 
| 197 | 187 | <view class="leave-word"> | 
| 198 | - <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> | |
| 199 | 189 | <view class="max-word">{{maxWord}}/50</view> | 
| 200 | 190 | </view> | 
| 201 | 191 | </view> | 
| ... | ... | @@ -258,29 +248,30 @@ | 
| 258 | 248 | |
| 259 | 249 | <view class="xc-frame flex-level"> | 
| 260 | 250 | <view class="list-frame"> | 
| 261 | - <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"> | |
| 262 | 252 | <view class="xc-goods-coupon "> | 
| 263 | - <view class="xc-coupon-money">不使用优惠券</view> | |
| 264 | - <view class="flex xc-coupon-time"></view> | |
| 253 | + <view class="xc-coupon-money0">不使用优惠券</view> | |
| 254 | + <view class="flex"></view> | |
| 265 | 255 | </view> | 
| 266 | - <view class="xc-coupon-selection flex-right-vertical" bindtap="sele_quan_item" data-no="1"> | |
| 267 | - <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> | |
| 268 | 258 | <view class="circle xc-not-Selection" wx:if="{{!using_quan[selected_quan_pick].is_nouse_red }}"></view> | 
| 269 | 259 | </view> | 
| 270 | 260 | </view> | 
| 271 | 261 | |
| 272 | 262 | <!-- 循环那些还没有被其他门店选择的券 --> | 
| 273 | - <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}}"> | |
| 274 | 264 | <view class="xc-goods-coupon "> | 
| 275 | 265 | <view class="xc-coupon-money">{{item.Sum}}元</view> | 
| 266 | + <view class="xc-coupon-money1">订单满{{item.BuySum}}元使用</view> | |
| 276 | 267 | <view class="flex xc-coupon-time">使用期限 | 
| 277 | 268 | <view class="time" wx:if="{{item.BeginDate && item.ValidDate}}" > | 
| 278 | 269 | {{filters.replace_time(item.BeginDate)}}至{{filters.replace_time(item.ValidDate)}} | 
| 279 | 270 | </view> | 
| 280 | 271 | </view> | 
| 281 | 272 | </view> | 
| 282 | - <view class="xc-coupon-selection flex-right-vertical" bindtap="sele_quan_item" data-ind="{{index}}"> | |
| 283 | - <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> | |
| 284 | 275 | <view class="circle xc-not-Selection" wx:if="{{!item.show_red }}"></view> | 
| 285 | 276 | </view> | 
| 286 | 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,9 +107,12 @@ 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]; | 
| 113 | 117 | if (item == undefined) item = null; | 
| 114 | 118 | func(item); | 
| ... | ... | @@ -160,7 +164,7 @@ Page({ | 
| 160 | 164 | t.data.data.is_normal=1; | 
| 161 | 165 | th.setData({ | 
| 162 | 166 | bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et, | 
| 163 | - 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 | |
| 164 | 168 | }); | 
| 165 | 169 | th.calculatePrice2(); | 
| 166 | 170 | }else{ | 
| ... | ... | @@ -386,11 +390,15 @@ Page({ | 
| 386 | 390 | 'pickup_id': th.data.bn_pick, //门店 | 
| 387 | 391 | 'exp_type': th.data.bn_exp_type, //配送方式 | 
| 388 | 392 | 'is_normal':th.data.bn_goods.is_normal, //是否是普通购买 | 
| 389 | - 'pt_prom_id':th.data.bn_goods.prom_id, //拼单ID | |
| 390 | - 'is_zsorder':th.data.kt_type+1, //开团类型 | |
| 391 | - 'is_pt_tz':th.data.is_pt_tz, //开团类型 | |
| 392 | - '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(), | |
| 393 | 396 | }; | 
| 397 | + | |
| 398 | + if(!th.data.bn_goods.is_normal){ | |
| 399 | + item.is_zsorder=th.data.kt_type+1; //开团类型 | |
| 400 | + } | |
| 401 | + | |
| 394 | 402 | if(th.data.qh!='') | 
| 395 | 403 | { | 
| 396 | 404 | item.team_qh=th.data.qh; | 
| ... | ... | @@ -468,9 +476,18 @@ Page({ | 
| 468 | 476 | app.my_warnning("支付成功",1,th); | 
| 469 | 477 | setTimeout(function () { | 
| 470 | 478 | th.setData({ isclose: 0 }); | 
| 471 | - wx.navigateTo({ | |
| 472 | - url: "/pages/team/team_success/team_success?ordersn=" + data.data, | |
| 473 | - }) | |
| 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 | + | |
| 474 | 491 | }, 1000) | 
| 475 | 492 | } | 
| 476 | 493 | }); | ... | ... | 
pages/cart/cart2_pt/cart2_pt.wxml
| ... | ... | @@ -50,7 +50,7 @@ | 
| 50 | 50 | </view> | 
| 51 | 51 | |
| 52 | 52 | <!--阶梯团是不显示的--> | 
| 53 | - <view class="use-item" wx:if="{{kt_type!=3}}"> | |
| 53 | + <view class="use-item" wx:if="{{kt_type!=3 || is_normal==1}}"> | |
| 54 | 54 | <view bindtap='setexptype' data-t='1' style="display:{{bn_t_exp_t==2?'none':'flex'}};"> | 
| 55 | 55 | <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> | 
| 56 | 56 | <view class="yu_er">自提</view> | 
| ... | ... | @@ -62,7 +62,7 @@ | 
| 62 | 62 | </view> | 
| 63 | 63 | |
| 64 | 64 | <!--阶梯团是不显示的--> | 
| 65 | - <block wx:if="{{kt_type!=3}}"> | |
| 65 | + <block wx:if="{{kt_type!=3 || is_normal==1 }}"> | |
| 66 | 66 | <view class="use-item" hidden='{{bn_exp_type==1}}'> | 
| 67 | 67 | <view>使用物流:</view> | 
| 68 | 68 | <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name"> | 
| ... | ... | @@ -91,15 +91,20 @@ | 
| 91 | 91 | </block> | 
| 92 | 92 | |
| 93 | 93 | <view class="information"> | 
| 94 | - <view class="item"> | |
| 94 | + <view class="item" wx:if="{{kt_type<3 || is_normal==1}}"> | |
| 95 | 95 | <view>商品金额</view> | 
| 96 | 96 | <view class="co-red">¥ {{formData.all_price}}元</view> | 
| 97 | 97 | </view> | 
| 98 | + | |
| 99 | + <view class="item" wx:else> | |
| 100 | + <view>定金金额</view> | |
| 101 | + <view class="co-red">¥ {{formData.all_price}}元</view> | |
| 102 | + </view> | |
| 103 | + | |
| 98 | 104 | <view class="item"> | 
| 99 | 105 | <view>配送费用</view> | 
| 100 | 106 | <view class="co-red">¥ {{formData.shipping_price}}元</view> | 
| 101 | 107 | </view> | 
| 102 | - | |
| 103 | 108 | <view class="item"> | 
| 104 | 109 | <view>使用余额</view> | 
| 105 | 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 | //--初始化-- | 
| ... | ... | @@ -108,12 +118,13 @@ 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]; | 
| 118 | 129 | if (item == undefined) item = null; | 
| 119 | 130 | func(item); | 
| ... | ... | @@ -216,7 +227,9 @@ Page({ | 
| 216 | 227 | jsarr.forEach(function(value,index){ | 
| 217 | 228 | if(count>=value['rynum']) price=value['price']; | 
| 218 | 229 | }) | 
| 219 | - 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); | |
| 220 | 233 | order.tail_money=tail_money; | 
| 221 | 234 | |
| 222 | 235 | //--判断物流-- | 
| ... | ... | @@ -243,14 +256,15 @@ Page({ | 
| 243 | 256 | distr_type: distr_type, | 
| 244 | 257 | pickup: pickup, | 
| 245 | 258 | exp_type: exp_type, | 
| 246 | - goods:goods | |
| 259 | + goods:goods, | |
| 260 | + teamgroup:teamgroup | |
| 247 | 261 | }); | 
| 248 | 262 | |
| 249 | 263 | //--计算物流-- | 
| 250 | 264 | if(exp_type==0){ | 
| 251 | 265 | th.calculate_wuliu(); | 
| 252 | 266 | }else{ | 
| 253 | - 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; | |
| 254 | 268 | allpice = allpice.toFixed(2); | 
| 255 | 269 | th.setData({ exp_price: 0, allpice: allpice }) | 
| 256 | 270 | } | 
| ... | ... | @@ -281,16 +295,19 @@ Page({ | 
| 281 | 295 | this.setData({ | 
| 282 | 296 | exp_type: type | 
| 283 | 297 | }); | 
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 284 | 301 | //--计算物流的值-- | 
| 285 | 302 | if (type == 0) { | 
| 286 | 303 | th.calculate_wuliu(); | 
| 287 | 304 | }else{ | 
| 288 | 305 | var allpice= parseFloat(th.data.order.order_amount) | 
| 289 | 306 | + parseFloat(th.data.order.user_money) | 
| 290 | - +parseFloat(th.data.order.pt_tail_money); | |
| 307 | + +parseFloat(th.data.order.tail_money); | |
| 291 | 308 | allpice=allpice.toFixed(2); | 
| 292 | 309 | this.setData({ | 
| 293 | - allpice: allpice | |
| 310 | + allpice: allpice, exp_price: 0, | |
| 294 | 311 | }); | 
| 295 | 312 | } | 
| 296 | 313 | }, | 
| ... | ... | @@ -361,7 +378,7 @@ Page({ | 
| 361 | 378 | var n=t.data.data; | 
| 362 | 379 | th.weixinPay(n, | 
| 363 | 380 | function () { | 
| 364 | - var allmoney=th.data.order.user_money+th.data.order.order_amount+th.data.order.pt_tail_money; | |
| 381 | + var allmoney=th.data.allpice; | |
| 365 | 382 | th.jumpPaymentPage(th.data.order.order_sn,allmoney); | 
| 366 | 383 | },function () { | 
| 367 | 384 | getApp().my_warnning("支付失败",0,th); | 
| ... | ... | @@ -399,7 +416,7 @@ Page({ | 
| 399 | 416 | case 2: | 
| 400 | 417 | if (goods_weight < 0) goods_weight = 0; | 
| 401 | 418 | //累积商品重量 每种商品的重量 * 数量 | 
| 402 | - goods_weight += good['weight'] * good['buynum']; | |
| 419 | + goods_weight += good['weight'] * th.data.order.order_goods['goods_num']; | |
| 403 | 420 | break; | 
| 404 | 421 | case 3: | 
| 405 | 422 | if (goods_piece < 0) goods_piece = 0; | 
| ... | ... | @@ -417,9 +434,11 @@ Page({ | 
| 417 | 434 | var exp_price = parseFloat(shipping_price).toFixed(2); | 
| 418 | 435 | allpice=parseFloat(exp_price)+parseFloat(allpice); | 
| 419 | 436 | allpice=allpice.toFixed(2); | 
| 437 | + | |
| 438 | + exp_price = parseFloat(exp_price); | |
| 420 | 439 | th.setData({ exp_price: exp_price,allpice:allpice }) | 
| 421 | 440 | }else { | 
| 422 | - 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; | |
| 423 | 442 | allpice=allpice.toFixed(2); | 
| 424 | 443 | th.setData({ exp_price: 0,allpice:allpice }) | 
| 425 | 444 | } | 
| ... | ... | @@ -492,7 +511,7 @@ Page({ | 
| 492 | 511 | //--进入收货地址的编辑页面-- | 
| 493 | 512 | enterAddressPage: function() { | 
| 494 | 513 | this.data.enterAddressPage =1, wx.navigateTo({ | 
| 495 | - url: "/pages/user/address_list/address_list?operate=select" | |
| 514 | + url: "/pages/user/address_list/address_list?is_back=1" | |
| 496 | 515 | }); | 
| 497 | 516 | }, | 
| 498 | 517 | ... | ... | 
pages/cart/cart_wk/cart_wk.wxml
| ... | ... | @@ -75,15 +75,15 @@ | 
| 75 | 75 | <view class='chentuan'> | 
| 76 | 76 | <view class='ct_one jc_sb'> | 
| 77 | 77 | <view class='ct_one_left'>成团人数</view> | 
| 78 | - <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> | |
| 79 | 79 | </view> | 
| 80 | 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.pt_tail_money,2)}}</text></view> | |
| 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> | |
| 83 | 83 | </view> | 
| 84 | 84 | <view class='ct_one jc_sb'> | 
| 85 | 85 | <view class='ct_one_left'>支付定金</view> | 
| 86 | - <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> | |
| 87 | 87 | </view> | 
| 88 | 88 | </view> | 
| 89 | 89 | </view> | 
| ... | ... | @@ -92,7 +92,7 @@ | 
| 92 | 92 | <view class='chentuan'> | 
| 93 | 93 | <view class='ct_one jc_sb'> | 
| 94 | 94 | <view class='ct_one_left'>尾款金额</view> | 
| 95 | - <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> | |
| 96 | 96 | </view> | 
| 97 | 97 | </view> | 
| 98 | 98 | |
| ... | ... | @@ -107,7 +107,7 @@ | 
| 107 | 107 | <view class='zf'> | 
| 108 | 108 | <view class='zf_left'> | 
| 109 | 109 | <text class='zf_left_wz'>支付合计:</text> | 
| 110 | - <text class='zf_left_red'>¥{{allpice}}</text> | |
| 110 | + <text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text> | |
| 111 | 111 | </view> | 
| 112 | 112 | <view class='zf_btn' bindtap="to_pay"> | 
| 113 | 113 | <text>支付尾款</text> | 
| ... | ... | @@ -126,5 +126,4 @@ | 
| 126 | 126 | </view> | 
| 127 | 127 | </block> | 
| 128 | 128 | |
| 129 | - | |
| 130 | 129 | <warn id="warn"></warn> | 
| 131 | 130 | \ No newline at end of file | ... | ... | 
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 | //商品的购买次数 | 
| ... | ... | @@ -201,12 +200,16 @@ Page({ | 
| 201 | 200 | is_show_pl:0, //是否品类 | 
| 202 | 201 | is_show_pp:0, //是否品牌 | 
| 203 | 202 | is_show_gb:0, //是否国别 | 
| 203 | + is_closecoupon:0, | |
| 204 | + | |
| 205 | + //是否点赞中 | |
| 206 | + iszaning: 0, | |
| 204 | 207 | }, | 
| 205 | 208 | |
| 206 | 209 | //------初始化加载---------- | 
| 207 | 210 | onLoad: function(t) { | 
| 208 | 211 | wx.setNavigationBarTitle({ title: "商品详情",}) | 
| 209 | - var ee = this, that=ee, | |
| 212 | + var ee = this, that=ee,th=ee, | |
| 210 | 213 | gid = t.goods_id; | 
| 211 | 214 | |
| 212 | 215 | //如果tg_id是空的话,分享回来 | 
| ... | ... | @@ -218,33 +221,35 @@ Page({ | 
| 218 | 221 | gid: gid | 
| 219 | 222 | }); | 
| 220 | 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 | + | |
| 221 | 242 | //获取用户设备信息,屏幕宽度 | 
| 222 | 243 | wx.getSystemInfo({ | 
| 223 | 244 | success: res => { | 
| 224 | 245 | that.setData({ screenWidth: res.screenWidth }) | 
| 225 | 246 | } | 
| 226 | 247 | }) | 
| 227 | - | |
| 228 | - ee.init(gid); | |
| 229 | - //------几人评价------- | |
| 230 | - n.init(this, "", "comments"); | |
| 231 | - this.requestCardNum(), wx.pageScrollTo && this.setData({ | |
| 232 | - supportPageScroll: !0 | |
| 233 | - }); | |
| 234 | - | |
| 235 | - getApp().getConfig2(function (e) { | |
| 236 | - | |
| 237 | - if(e.categoryset.indexOf(","+1+",")!=-1){ ee.setData({is_show_pl:1}); } | |
| 238 | - if(e.categoryset.indexOf(","+3+",")!=-1){ ee.setData({is_show_pp:1}); } | |
| 239 | - if(e.categoryset.indexOf(","+2+",")!=-1){ ee.setData({is_show_gb:1}); } | |
| 240 | - ee.setData({store_config:e}); | |
| 241 | - }) | |
| 242 | - | |
| 243 | 248 | }, | 
| 244 | 249 | |
| 245 | 250 | //------------程序初始化入口------------- | 
| 246 | 251 | async init(gid) { | 
| 247 | - var ee = this, | |
| 252 | + var ee = this,th=ee, | |
| 248 | 253 | gallery = null, | 
| 249 | 254 | is_collect = 0, | 
| 250 | 255 | collect_id = 0, | 
| ... | ... | @@ -344,17 +349,19 @@ Page({ | 
| 344 | 349 | } | 
| 345 | 350 | } | 
| 346 | 351 | |
| 347 | - //----获取详情页的券的数量---- | |
| 348 | - await getApp().request.promiseGet("/api/weshop/prom/coupon/page", { | |
| 349 | - data: { | |
| 350 | - store_id: os.stoid, | |
| 351 | - type:1, | |
| 352 | - pageSize: 3, | |
| 353 | - page:1, | |
| 354 | - }, | |
| 355 | - }).then(res1 => { | |
| 356 | - fir_quan=res1.data.data.pageData; | |
| 357 | - }) | |
| 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 | + } | |
| 358 | 365 | |
| 359 | 366 | |
| 360 | 367 | //--------获取视频图片--------- | 
| ... | ... | @@ -685,6 +692,7 @@ Page({ | 
| 685 | 692 | user_id: oo.user_id, | 
| 686 | 693 | store_id: th.data.stoid, | 
| 687 | 694 | goods_price: o.shop_price, | 
| 695 | + member_goods_price: o.shop_price, | |
| 688 | 696 | goods_name: o.goods_name, | 
| 689 | 697 | goods_sn: o.goods_sn, | 
| 690 | 698 | sku: o.sku, | 
| ... | ... | @@ -693,6 +701,7 @@ Page({ | 
| 693 | 701 | //-----如果是秒杀,团购,积分购,拼团----- | 
| 694 | 702 | if (th.data.prom_type == 1) { | 
| 695 | 703 | newd.goods_price = th.data.prom_price; | 
| 704 | + newd.member_goods_price= th.data.prom_price, | |
| 696 | 705 | newd.prom_type = th.data.prom_type; | 
| 697 | 706 | newd.prom_id = th.data.prom_id; | 
| 698 | 707 | } else if (th.data.prom_type == 3) { | 
| ... | ... | @@ -1424,7 +1433,7 @@ Page({ | 
| 1424 | 1433 | //----已经结束----- | 
| 1425 | 1434 | if (t.data.data.is_end == 1) { | 
| 1426 | 1435 | ee.setData({ | 
| 1427 | - prom_type: 0,isshow:1, | |
| 1436 | + prom_type: 0,isshow:1, | |
| 1428 | 1437 | }); | 
| 1429 | 1438 | ee.get_sku(os.stoid, ee.data.data.sku, gid); | 
| 1430 | 1439 | return false; | 
| ... | ... | @@ -1463,13 +1472,31 @@ Page({ | 
| 1463 | 1472 | th.data.buy_order = odr; | 
| 1464 | 1473 | if (odr.pt_status == 0 && odr.order_status == 1) { | 
| 1465 | 1474 | th.setData({ | 
| 1466 | - user_order_pt_state: 1 | |
| 1475 | + user_order_pt_state: 1 | |
| 1467 | 1476 | }); | 
| 1468 | 1477 | } | 
| 1469 | 1478 | if (odr.pt_status == 1 && odr.order_status == 1) { | 
| 1470 | - th.setData({ | |
| 1471 | - user_order_pt_state: 2 | |
| 1472 | - }); | |
| 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 | + } | |
| 1473 | 1500 | } | 
| 1474 | 1501 | |
| 1475 | 1502 | if (odr.pt_status == 2 && odr.is_zsorder == 4) { | 
| ... | ... | @@ -1893,7 +1920,7 @@ Page({ | 
| 1893 | 1920 | if (newd.kt_type > 1) { | 
| 1894 | 1921 | newd.is_pt_tz = 1; //开团类型 | 
| 1895 | 1922 | } | 
| 1896 | - if (newd.kt_type == 3){ | |
| 1923 | + if (newd.kt_type == 3 && th.data.is_normal!=1){ | |
| 1897 | 1924 | th.data.sto_sele_distr=1; | 
| 1898 | 1925 | } | 
| 1899 | 1926 | |
| ... | ... | @@ -2046,6 +2073,9 @@ Page({ | 
| 2046 | 2073 | } | 
| 2047 | 2074 | |
| 2048 | 2075 | var iszan=th.data.comments[item_id].userZanNum; | 
| 2076 | + if(this.data.iszaning) return false; | |
| 2077 | + this.data.iszaning=1; | |
| 2078 | + | |
| 2049 | 2079 | |
| 2050 | 2080 | app.request.post("/api/weshop/commentZan/save",{ | 
| 2051 | 2081 | data:{store_id:o.stoid,user_id:app.globalData.user_id,goods_id:th.data.gid,comment_id:com_id}, | 
| ... | ... | @@ -2053,11 +2083,11 @@ Page({ | 
| 2053 | 2083 | |
| 2054 | 2084 | if (ee.data.code == "-1") { | 
| 2055 | 2085 | app.my_warnning("不能给自己点赞", 0, th); | 
| 2086 | + th.data.iszaning=0; | |
| 2056 | 2087 | return; | 
| 2057 | 2088 | } | 
| 2058 | 2089 | |
| 2059 | 2090 | if(ee.data.code==0 && iszan!=1){ | 
| 2060 | - | |
| 2061 | 2091 | var num=th.data.comments[item_id].zan_num; num++; | 
| 2062 | 2092 | var text="comments["+item_id+"].zan_num"; | 
| 2063 | 2093 | var text1="comments["+item_id+"].userZanNum"; | 
| ... | ... | @@ -2065,6 +2095,7 @@ Page({ | 
| 2065 | 2095 | _errObj[text]=num; | 
| 2066 | 2096 | _errObj[text1]=1; | 
| 2067 | 2097 | th.setData(_errObj); | 
| 2098 | + | |
| 2068 | 2099 | }else{ | 
| 2069 | 2100 | var num=th.data.comments[item_id].zan_num; num--; | 
| 2070 | 2101 | var text="comments["+item_id+"].zan_num"; | 
| ... | ... | @@ -2074,6 +2105,11 @@ Page({ | 
| 2074 | 2105 | _errObj[text1]=0; | 
| 2075 | 2106 | th.setData(_errObj); | 
| 2076 | 2107 | } | 
| 2108 | + | |
| 2109 | + setTimeout(function(){ | |
| 2110 | + th.data.iszaning = 0; | |
| 2111 | + },500) | |
| 2112 | + | |
| 2077 | 2113 | } | 
| 2078 | 2114 | }) | 
| 2079 | 2115 | }, | 
| ... | ... | @@ -2246,7 +2282,6 @@ Page({ | 
| 2246 | 2282 | //-------大图后面就不一样了----------- | 
| 2247 | 2283 | switch (type) { | 
| 2248 | 2284 | case 0: //普通商品的展示 | 
| 2249 | - case 1: //秒杀商品的展示 | |
| 2250 | 2285 | //中间的几个字 | 
| 2251 | 2286 | var g_path = "../../../images/share/s_gou.png"; | 
| 2252 | 2287 | context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | 
| ... | ... | @@ -2276,6 +2311,26 @@ Page({ | 
| 2276 | 2311 | //---二维吗图--- | 
| 2277 | 2312 | context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit); | 
| 2278 | 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 | + | |
| 2279 | 2334 | case 2://会员团和商家团的展示 | 
| 2280 | 2335 | //---画线--- | 
| 2281 | 2336 | context.setLineWidth(1 * unit) | 
| ... | ... | @@ -2567,6 +2622,26 @@ Page({ | 
| 2567 | 2622 | var ob={}; | 
| 2568 | 2623 | ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | 
| 2569 | 2624 | this.setData(ob); | 
| 2625 | + }, | |
| 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 | + }) | |
| 2570 | 2645 | } | 
| 2571 | 2646 | |
| 2572 | 2647 | }); | 
| 2573 | 2648 | \ No newline at end of file | ... | ... | 
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -267,7 +267,7 @@ | 
| 267 | 267 | <view class="word-line fs24 xc-unit-price">零售价¥{{data.market_price}}</view> | 
| 268 | 268 | </view> | 
| 269 | 269 | <view class="xc-val-price"> | 
| 270 | - <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> | |
| 271 | 271 | <view class="fs30 save t-c">秒杀立省¥{{filters.toFix(data.market_price-prom_price,2)}}</view> | 
| 272 | 272 | </view> | 
| 273 | 273 | </view> | 
| ... | ... | @@ -281,16 +281,26 @@ | 
| 281 | 281 | <!-- 许程 7.24 暂时注释 --> | 
| 282 | 282 | <view wx:if="{{prom_type==1}}"> | 
| 283 | 283 | <view class="goods-num" wx:if="{{prom_type==1}}"> | 
| 284 | - <view class="stock">总数量:{{prom_act.goods_num}}件</view> | |
| 285 | - <view class="stock">限购:{{prom_act.buy_limit}}件</view> | |
| 286 | - <view class="sales">已购:{{prom_act.buy_num}}件</view> | |
| 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 | + | |
| 287 | 297 | </view> | 
| 288 | 298 | </view> | 
| 289 | 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}}"> | 
| ... | ... | @@ -714,7 +724,7 @@ | 
| 714 | 724 | <view class="spec-goods"> | 
| 715 | 725 | <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 
| 716 | 726 | <view class="spec-goods-info"> | 
| 717 | - <view class="spec-goods-name">{{data.goods_name}}</view> | |
| 727 | + <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> | |
| 718 | 728 | <view class="spec-goods-price" wx:if="{{prom_price==null}}">¥ {{sele_g.shop_price}}</view> | 
| 719 | 729 | <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | 
| 720 | 730 | <block wx:if="{{prom_type==0}}"> | 
| ... | ... | @@ -723,7 +733,8 @@ | 
| 723 | 733 | <view class="spec-goods-stock">已选:{{sku_g[0].gg}}</view> | 
| 724 | 734 | </block> | 
| 725 | 735 | <block wx:if="{{prom_type==1}}"> | 
| 726 | - <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> | |
| 727 | 738 | <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | 
| 728 | 739 | <view class="spec-goods-stock">已选:{{sku_g[0].gg}}</view> | 
| 729 | 740 | </block> | 
| ... | ... | @@ -799,9 +810,8 @@ | 
| 799 | 810 | <view class="spec-goods"> | 
| 800 | 811 | <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 
| 801 | 812 | <view class="spec-goods-info"> | 
| 802 | - <view class="spec-goods-name">{{data.goods_name}}</view> | |
| 803 | - <view class="spec-goods-price" wx:if="{{is_normal==1}}">¥ {{sele_g.shop_price}} | |
| 804 | - </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> | |
| 805 | 815 | <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | 
| 806 | 816 | |
| 807 | 817 | <block wx:if="{{is_normal==0}}"> | 
| ... | ... | @@ -811,7 +821,7 @@ | 
| 811 | 821 | </block> | 
| 812 | 822 | <block wx:else> | 
| 813 | 823 | <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | 
| 814 | - <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> | |
| 815 | 825 | <view class="spec-goods-stock">已选:{{sku_g_pt[0].gg}}</view> | 
| 816 | 826 | </block> | 
| 817 | 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; | ... | ... | 
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.wxml
| ... | ... | @@ -64,8 +64,8 @@ | 
| 64 | 64 | <view class='foot-left'> | 
| 65 | 65 | 共{{item.order_goods[0].goods_num}}件, | 
| 66 | 66 | <block wx:if="{{item.is_zsorder==4}}"> | 
| 67 | - <block wx:if="{{item.pt_status==4 || item.pt_status==5}}"> | |
| 68 | - 定金:<text class="xc-wc">¥</text> | |
| 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 | 69 | <view class='foot-l-wz fs35'>{{filters.toFix(item.user_money+item.order_amount+item.pt_tail_money,2)}}</view> | 
| 70 | 70 | </block> | 
| 71 | 71 | <block wx:else> | ... | ... | 
pages/team/team_ping/team_ping.wxss
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,67 +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 | - | |
| 54 | - var ob = ut.check_mobile(a.mobile); | |
| 55 | - if(ob.code!=1){ | |
| 56 | - return getApp().my_warnning(ob.title,0,th); | |
| 57 | - } | |
| 58 | - | |
| 59 | - if (a.more_address == null || a.more_address == undefined || a.more_address=="" ){ | |
| 60 | - getApp().my_warnning("请选择地区",0,th); | |
| 61 | - return false; | |
| 62 | - } | |
| 63 | - | |
| 64 | - | |
| 65 | - //判断是不是空对象 | |
| 66 | - //--------如果是修改地址---------- | |
| 67 | - if (!th.data.isnew){ | |
| 68 | - if (a.is_default==1){ | |
| 69 | - t.put("/api/weshop/useraddress/update", { | |
| 70 | - data: { user_id: oo.user_id, is_default:0}, | |
| 71 | - success: function (s) { | |
| 72 | - t.put("/api/weshop/useraddress/updateById", { | |
| 73 | - data: a, | |
| 74 | - success: function (s) { | |
| 75 | - e.showSuccess(s.data.msg, function () { | |
| 76 | - wx.navigateBack(); | |
| 77 | - }); | |
| 78 | - } | |
| 79 | - }); | |
| 80 | - } | |
| 81 | - }); | |
| 82 | - | |
| 83 | - }else{ | |
| 84 | - t.put("/api/weshop/useraddress/updateById", { | |
| 85 | - data: a, | |
| 86 | - success: function (s) { | |
| 87 | - e.showSuccess(s.data.msg, function () { | |
| 88 | - wx.navigateBack(); | |
| 89 | - }); | |
| 90 | - } | |
| 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(); | |
| 91 | 115 | }); | 
| 92 | - } | |
| 93 | - | |
| 94 | - }else{ | |
| 95 | - a['user_id'] = oo.user_id; | |
| 96 | - a['store_id'] = os.stoid; | |
| 97 | - //-----新增地址------- | |
| 98 | - t.post("/api/weshop/useraddress/save", { | |
| 99 | - data: a, | |
| 100 | - success: function (s) { | |
| 101 | - e.showSuccess(s.data.msg, function () { | |
| 102 | - wx.navigateBack(); | |
| 103 | - }); | |
| 104 | - } | |
| 105 | - }); | |
| 106 | - } | |
| 107 | - }, | |
| 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 | + }, | |
| 108 | 171 | |
| 109 | 172 | //---------删除收货地址------------ | 
| 110 | 173 | deleteAddress: function() { | 
| ... | ... | @@ -121,5 +184,20 @@ Page({ | 
| 121 | 184 | }); | 
| 122 | 185 | } | 
| 123 | 186 | }); | 
| 124 | - } | |
| 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 | +} | |
| 125 | 203 | }); | 
| 126 | 204 | \ No newline at end of file | ... | ... | 
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 type="number" 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> | 
| 33 | -<template is="regions" data="{{regions:regions}}"></template> | |
| 34 | 39 | |
| 40 | +<template is="regions" data="{{regions:regions}}"></template> | |
| 35 | 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/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/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 | }, | ... | ... | 
pages/user/order_detail/order_detail.wxml
| ... | ... | @@ -71,13 +71,13 @@ | 
| 71 | 71 | <view>¥ {{order.goods_price}}元</view> | 
| 72 | 72 | </view> | 
| 73 | 73 | |
| 74 | - <view class="item pnew"> | |
| 74 | + <view class="item pnew" wx:if="{{order.is_zsorder==4}}"> | |
| 75 | 75 | <view>定金金额</view> | 
| 76 | 76 | <view>¥ {{filters.toFix(order.order_amount+order.user_money,2)}}元</view> | 
| 77 | 77 | </view> | 
| 78 | 78 | <view class="item pnew" wx:if="{{order.pt_tail_money>0}}"> | 
| 79 | 79 | <view>尾款金额</view> | 
| 80 | - <view>¥ {{order.pt_tail_money}}元</view> | |
| 80 | + <view>¥ {{filters.toFix(order.pt_tail_money-order.shipping_price,2)}}元</view> | |
| 81 | 81 | </view> | 
| 82 | 82 | |
| 83 | 83 | <view class="item pnew" wx:if="{{order.shipping_price>0}}"> | 
| ... | ... | @@ -101,13 +101,14 @@ | 
| 101 | 101 | |
| 102 | 102 | <view class="item"> | 
| 103 | 103 | <view>订单总价</view> | 
| 104 | - <view>¥ {{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money)}}元</view> | |
| 104 | + <view>¥ {{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view> | |
| 105 | 105 | </view> | 
| 106 | 106 | |
| 107 | 107 | <view class="item-line"></view> | 
| 108 | 108 | <view class="item" wx:if="{{order.user_money>0}}"> | 
| 109 | 109 | <view>使用余额</view> | 
| 110 | - <view>¥ {{order.user_money}}元</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> | |
| 111 | 112 | </view> | 
| 112 | 113 | </view> | 
| 113 | 114 | ... | ... | 
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 | }); | 
| ... | ... | @@ -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
| ... | ... | @@ -24,8 +24,8 @@ | 
| 24 | 24 | data-errorimg="orderList[{{index}}].order_goods[{{pinx}}].original_img"></image> | 
| 25 | 25 | </navigator> | 
| 26 | 26 | <navigator class="goods-mes" url="/pages/user/order_detail/order_detail?order_id={{goods.order_id}}"> | 
| 27 | - <view class="goods-name">{{goods.goods_name}}</view> | |
| 28 | - <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> | |
| 29 | 29 | <view class="goods-price">¥ {{goods.member_goods_price}}</view> | 
| 30 | 30 | <view class="goods-num">数量 {{goods.goods_num}}</view> | 
| 31 | 31 | </navigator> | 
| ... | ... | @@ -55,7 +55,7 @@ | 
| 55 | 55 | <block wx:else> | 
| 56 | 56 | <view wx:if="{{item.is_zsorder==4}}">定金:¥{{filters.toFix(item.order_amount+item.user_money,2)}}</view> | 
| 57 | 57 | <view wx:else>金额:¥{{filters.toFix(item.order_amount+item.user_money,2)}}</view> | 
| 58 | - <view wx:if="{{item.pt_tail_money>0}}">尾款:¥{{item.pt_tail_money}}</view> | |
| 58 | + <view wx:if="{{item.pt_tail_money>0}}">尾款:¥{{filters.toFix(item.pt_tail_money-item.shipping_price,2)}}</view> | |
| 59 | 59 | </block> | 
| 60 | 60 | |
| 61 | 61 | </view> | ... | ... | 
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 | } | 
| ... | ... | @@ -336,4 +337,5 @@ module.exports = { | 
| 336 | 337 | sub_last: sub_last,//去掉末尾一个字符 | 
| 337 | 338 | measureText: measureText,//画布需要的函数 | 
| 338 | 339 | check_mobile: check_mobile,//验证手机 | 
| 340 | + | |
| 339 | 341 | }; | ... | ... | 
