Merged
Merge Request #36 · created by 后端研发-苏明海


Qa


From qa into master

Merged by 后端研发-苏明海

1 participants













app.wxss
... ... @@ -12,13 +12,17 @@
12 12 box-sizing: border-box;
13 13 }
14 14 page {
15   - /*background-color: #f2f2f2;*/
  15 + overflow-x: hidden;
16 16 }
17 17 button {
18 18 border-radius: 0; padding-left: 0;
19 19 padding-right: 0; background-color: transparent;
20 20 font-size: 28rpx;
21 21 }
  22 +.xc-wc{
  23 + color: #d60021;
  24 +
  25 +}
22 26 .wh100 {
23 27 width: 100%;
24 28 height: 100%;
... ... @@ -42,14 +46,13 @@ button {
42 46 -webkit-box-orient: vertical;
43 47 -webkit-line-clamp: 3;
44 48 }
  49 +
45 50 .pd-bg-fff {
46 51 padding: 0 30rpx;
47 52 background-color: #fff;
48 53 font-size: 32rpx;
49 54 }
50   -.co-red {
51   - color: #f23030;
52   -}
  55 +
53 56 .hide {
54 57 display: none;
55 58 }
... ... @@ -129,6 +132,7 @@ justify-content:center;
129 132 .flex-vertical{
130 133 display:flex;
131 134 align-items:center;
  135 +
132 136 }
133 137 /* 水平左垂直对齐 */
134 138 .flex-left-center{
... ... @@ -136,6 +140,7 @@ align-items:center;
136 140 justify-content:flex-start;
137 141 align-items:center;
138 142 }
  143 +.flex{display: flex}
139 144 /* 水平左对齐 */
140 145 .flex-level-left{
141 146 display:flex;
... ... @@ -158,6 +163,8 @@ align-items:center;
158 163 display:flex;
159 164 justify-content:space-around;
160 165 }
  166 +.jc_sb{ justify-content: space-between}
  167 +
161 168 /* 相对定位 */
162 169 .rel{
163 170 position: relative;
... ... @@ -185,6 +192,10 @@ position:fixed;
185 192 display: flex;
186 193 justify-content:space-between;
187 194 }
  195 +/* 使文字处于水平线上 */
  196 +.ai-bas{
  197 +align-items: baseline;
  198 +}
188 199  
189 200  
190 201 /* 垂直居中 中间等距两边贴边 7.13*/
... ... @@ -249,28 +260,19 @@ justify-content:space-around;
249 260 font-style: normal;
250 261 }
251 262  
252   -.fs20{
253   - font-size: 20rpx;
254   -}
255 263 .fs22{
256 264 font-size: 22rpx;
257 265 }
258   -.fs24{
259   - font-size: 24rpx;
260   -}
  266 +
261 267 .fs26{
262 268 font-size: 26rpx;
263 269 }
264   -.fs28{
265   - font-size: 28rpx;
266   -}
  270 +
267 271  
268 272 .fs30{
269 273 font-size:30rpx;
270 274 }
271   -.fs32{
272   - font-size:32rpx;
273   -}
  275 +
274 276 .fs35{
275 277 font-size:35rpx;
276 278 }
... ... @@ -280,11 +282,19 @@ justify-content:space-around;
280 282 .fs50{
281 283 font-size: 50rpx;
282 284 }
283   -.fs60{ font-size:60rpx;}
  285 +
284 286  
285 287 /* 7.26 */
286   -.xc-wc{
287   - color: #e4374d;
  288 +
  289 +.red-b{
  290 + background: #d60021;
  291 +}
  292 +.red-co{
  293 + color: #d60021;
  294 +
  295 +}
  296 +.co-red {
  297 + color: #f23030;
288 298 }
289 299 .oh{
290 300 overflow: hidden;
... ... @@ -298,4 +308,42 @@ color: #b9b9b9;
298 308 }
299 309  
300 310  
  311 +.xc-fixed{
  312 +position: fixed;
301 313  
  314 +}
  315 +.yellow{
  316 + background-color: #ffb03f;
  317 +}
  318 +.green{
  319 + background-color: #16ba63;
  320 +}
  321 +.blue_b{
  322 + background-color:#059de5;
  323 +}
  324 +.blue_c{
  325 + color: #059de5;
  326 +}
  327 +.powder{
  328 +background: #ffe3e2;
  329 +
  330 +}
  331 +.fs32{
  332 + font-size:32rpx;
  333 +}
  334 +.fs60{ font-size:60rpx;}
  335 +.fs28{
  336 + font-size: 28rpx;
  337 +}
  338 +.fs20{
  339 + font-size: 20rpx;
  340 +}
  341 +.fs24{
  342 + font-size: 24rpx;
  343 +}
  344 +.fs36 {
  345 + font-size: 36rpx;
  346 +}
  347 +.fs40 {
  348 + font-size: 40rpx;
  349 +}
302 350 \ No newline at end of file
... ...
components/nav_box/nav_box.wxss
1 1 .box_main{
2   - width:100rpx;
3   - height:100rpx;
  2 + width:80rpx;
  3 + height:80rpx;
4 4 background:#272636;
5 5 transition:width 0.8s;
6 6 -moz-transition:width 0.8s; /* Firefox 4 */
... ... @@ -18,16 +18,19 @@
18 18 }
19 19  
20 20 .box_main .dian{
21   - text-align: center;
22   - width:100rpx;
23   - height:100rpx;
24   - color: #ffff;
25   - font-size: 70rpx;
26   - background: none;
  21 + text-align: center;
  22 +width: 50rpx;
  23 +height: 50rpx;
  24 +color: #ffff;
  25 +font-size: 50rpx;
  26 +background: none;
  27 +
27 28 }
28 29  
29 30 .box_main .dian image{
30   - width:75rpx; height:30rpx;margin-top:36rpx;
  31 + width: 60rpx;
  32 +height: 20rpx;
  33 +margin: 30rpx 0 0 10rpx;
31 34 }
32 35  
33 36 .box_main.box_isopen .dian{
... ... @@ -46,14 +49,18 @@
46 49 .box_main .cl_list .item{
47 50 display: inline-block;
48 51 width:100rpx;
49   - height:100rpx;
  52 + height:80rpx;
50 53 text-align: center;
51   - line-height: 100rpx;
  54 + line-height: 80rpx;
52 55 color: #fff;
53 56 vertical-align: top;
  57 + font-size: 32rpx;
  58 +
54 59 }
55 60  
56 61 .box_main .cl_list .item.big{
57   - font-size: 70rpx;line-height: 90rpx;
  62 + font-size: 70rpx;
  63 +line-height: 70rpx;
  64 +
58 65 }
59 66  
... ...
images/dpr.png 0 → 100644

21.7 KB

images/medal.png 0 → 100644

16.8 KB

images/nothingaddress.png 0 → 100644

17.8 KB

images/share/miao_share.png 0 → 100644

14 KB

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