Commit ee6482db9e6626c75fe6aa49ffec9a52e5199930
1 parent
346430ac
1、 注册推荐人的优化
2、 购物车失效的优化 3、评价删除的优化
Showing
6 changed files
with
50 additions
and
12 deletions
packageA/pages/profile/profile.js
| ... | ... | @@ -1144,7 +1144,13 @@ Page({ |
| 1144 | 1144 | |
| 1145 | 1145 | //-- 需要推荐人 -- |
| 1146 | 1146 | if(this.data.reg_info.introducer_state){ |
| 1147 | - let tjrname = this.data.referee || this.data.fir_user.mobile; | |
| 1147 | + | |
| 1148 | + var tj= this.data.fir_user?this.data.fir_user.mobile:''; | |
| 1149 | + if(!tj){ | |
| 1150 | + tj=this.data.user['fromuser_id']?this.data.user['fromuser_id']:''; | |
| 1151 | + } | |
| 1152 | + | |
| 1153 | + let tjrname = this.data.referee || tj; | |
| 1148 | 1154 | if (tjrname == "" || tjrname == null) { |
| 1149 | 1155 | //app.my_warnning("请输入推荐人", 0, this); |
| 1150 | 1156 | //return false; | ... | ... |
packageA/pages/profile/profile.wxml
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | class="user-txt-right f1 pdl20 t-r" /> |
| 35 | 35 | </block> |
| 36 | 36 | |
| 37 | - <block v-else> | |
| 37 | + <block wx:else> | |
| 38 | 38 | <input bindinput="getReferee" bindblur="" disabled="{{user['fromuser_id']}}" |
| 39 | 39 | value="{{user['fromuser_id']?user['fromuser_id']:''}}" data-name="推荐人" class="user-txt-right f1 pdl20 t-r" placeholder="请输入推荐人手机号码或卡号"/> |
| 40 | 40 | </block> | ... | ... |
pages/cart/cart/cart.js
pages/cart/cart2/cart2.js
| ... | ... | @@ -669,7 +669,8 @@ Page({ |
| 669 | 669 | } |
| 670 | 670 | } |
| 671 | 671 | //-- 判断一下,获取搭配购的消息 -- |
| 672 | - if(item1.prom_type==0 || item1.prom_type==5){ | |
| 672 | + if((item1.prom_type==0 || item1.prom_type==5) && (!carr[i].collocationList || !carr[i].collocationList.length)) { | |
| 673 | + | |
| 673 | 674 | await th.set_collection(item1,carr,i); |
| 674 | 675 | } |
| 675 | 676 | } |
| ... | ... | @@ -1088,7 +1089,7 @@ Page({ |
| 1088 | 1089 | } |
| 1089 | 1090 | |
| 1090 | 1091 | //-- 判断是不是可以收藏 -- |
| 1091 | - if(gd.prom_type ==5){ | |
| 1092 | + if(gd.prom_type ==5 && !th.data.all_collocation_list.length){ | |
| 1092 | 1093 | await th.set_collection(gd); |
| 1093 | 1094 | } |
| 1094 | 1095 | |
| ... | ... | @@ -5632,6 +5633,8 @@ Page({ |
| 5632 | 5633 | item.goods_num=1; |
| 5633 | 5634 | item.goods_price=item.price; |
| 5634 | 5635 | item.is_collocation=1; |
| 5636 | + item.prom_type=5; | |
| 5637 | + | |
| 5635 | 5638 | |
| 5636 | 5639 | var coll_arr=[]; |
| 5637 | 5640 | if(this.data.collocation_goods && this.data.collocation_goods.length){ | ... | ... |
pages/user/order_list/order_list.js
| ... | ... | @@ -481,6 +481,35 @@ Page({ |
| 481 | 481 | } |
| 482 | 482 | }); |
| 483 | 483 | }, |
| 484 | + | |
| 485 | + //-----删除订单(完成和带评价的)----- | |
| 486 | + deleteOrderData_: function(t) { | |
| 487 | + var th = this; | |
| 488 | + var order_id = t.currentTarget.dataset.order_id; | |
| 489 | + var index = t.currentTarget.dataset.index; | |
| 490 | + var up_data={order_id: order_id,isdel:1}; | |
| 491 | + | |
| 492 | + | |
| 493 | + wx.showModal({ | |
| 494 | + title: "是否删除订单?", | |
| 495 | + success: function(tt) { | |
| 496 | + tt.confirm && rq.put("/api/weshop/order/updatebyId", { | |
| 497 | + data: up_data, | |
| 498 | + success: function(t) { | |
| 499 | + for (var e = 0; e < th.data.orderList.length; e++) | |
| 500 | + if (th.data.orderList[e].order_id == order_id) { | |
| 501 | + th.data.orderList.splice(e, 1), th.setData({ | |
| 502 | + orderList: th.data.orderList | |
| 503 | + }); | |
| 504 | + break; | |
| 505 | + } | |
| 506 | + } | |
| 507 | + }) | |
| 508 | + } | |
| 509 | + }); | |
| 510 | + }, | |
| 511 | + | |
| 512 | + | |
| 484 | 513 | //-----删除订单----- |
| 485 | 514 | deleteSerOrderData: function(t) { |
| 486 | 515 | var th = this; | ... | ... |
pages/user/order_list/order_list.wxml
| ... | ... | @@ -74,10 +74,10 @@ |
| 74 | 74 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view> |
| 75 | 75 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view> |
| 76 | 76 | <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view> |
| 77 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 77 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 78 | 78 | </view> |
| 79 | 79 | <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view> |
| 80 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 80 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 81 | 81 | </view> |
| 82 | 82 | <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> |
| 83 | 83 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> |
| ... | ... | @@ -95,10 +95,10 @@ |
| 95 | 95 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0 && item.team_status == 2)}}">待发货</view> |
| 96 | 96 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1 && item.team_status == 2)}}">待收货</view> |
| 97 | 97 | <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view> |
| 98 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 98 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 99 | 99 | </view> |
| 100 | 100 | <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view> |
| 101 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 101 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 102 | 102 | </view> |
| 103 | 103 | <view wx:if="{{item.pay_status == 0 && item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> |
| 104 | 104 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> |
| ... | ... | @@ -112,10 +112,10 @@ |
| 112 | 112 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view> |
| 113 | 113 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view> |
| 114 | 114 | <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view> |
| 115 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 115 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 116 | 116 | </view> |
| 117 | 117 | <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view> |
| 118 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 118 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 119 | 119 | </view> |
| 120 | 120 | <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> |
| 121 | 121 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> |
| ... | ... | @@ -310,7 +310,7 @@ |
| 310 | 310 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> |
| 311 | 311 | </view> |
| 312 | 312 | <view wx:if="{{item.order_status == 2}}" class="flex-center">已评价<view class="lin"></view> |
| 313 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> | |
| 313 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> | |
| 314 | 314 | </view> |
| 315 | 315 | <view wx:if="{{item.order_status == 3}}" class="c-a9" class="flex-center">已取消<view class="lin"></view> |
| 316 | 316 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> | ... | ... |