Commit 164c5e7becaa07d6e083629ea84260b0c95ea358
1 parent
2ecd04ca
下单立即购买, 拼团购买下单确认的页面的修改,订单列表的修改
Showing
9 changed files
with
81 additions
and
70 deletions
pages/cart/cart2/cart2.js
... | ... | @@ -52,6 +52,7 @@ Page({ |
52 | 52 | /*----------物流选择--------*/ |
53 | 53 | wu_arr:null, |
54 | 54 | index:0, |
55 | + w_sele_index:0, | |
55 | 56 | |
56 | 57 | //判断页面是返回回来的还是 首次进入的 |
57 | 58 | isclose:1, |
... | ... | @@ -979,6 +980,7 @@ Page({ |
979 | 980 | } |
980 | 981 | console.log(pdata); |
981 | 982 | } |
983 | + | |
982 | 984 | if (pdata.length==0) return; |
983 | 985 | var str = JSON.stringify(pdata); |
984 | 986 | wx.showLoading({title: "加载中"}); |
... | ... | @@ -1096,7 +1098,7 @@ Page({ |
1096 | 1098 | enterAddressPage: function() { |
1097 | 1099 | getApp().globalData.is_cart_old=1; |
1098 | 1100 | this.data.enterAddressPage = !0, wx.navigateTo({ |
1099 | - url: "/pages/user/address_list/address_list?is_back=1" | |
1101 | + url: "/pages/user/address_list/address_list" | |
1100 | 1102 | }); |
1101 | 1103 | }, |
1102 | 1104 | |
... | ... | @@ -1409,17 +1411,26 @@ Page({ |
1409 | 1411 | //// 开启物流的弹窗 |
1410 | 1412 | show_wu_arr:function(e){ |
1411 | 1413 | var wu_arr_txt=e.currentTarget.dataset.txt; |
1412 | - this.setData({ open_express: 1,wu_arr_txt:wu_arr_txt}); | |
1414 | + var w_sele_index=e.currentTarget.dataset.w_sele_index; | |
1415 | + var is_express=null; | |
1416 | + var ob={open_express: 1,wu_arr_txt:wu_arr_txt,disabled:1}; | |
1417 | + | |
1418 | + //--如果是多个门店的时候-- | |
1419 | + if(w_sele_index!=undefined){ | |
1420 | + is_express=this.data.cartlist[w_sele_index].wind; | |
1421 | + ob['is_express']=is_express; | |
1422 | + } | |
1423 | + this.setData(ob); | |
1413 | 1424 | }, |
1414 | 1425 | // 关闭物流的弹窗 |
1415 | 1426 | close_express:function(){ |
1416 | - this.setData({ open_express:0 }); | |
1427 | + this.setData({ open_express:0,disabled:0 }); | |
1417 | 1428 | }, |
1418 | 1429 | // 选择物流 |
1419 | 1430 | click_express_name:function(e){ |
1420 | 1431 | var express_name = e.currentTarget.dataset.name, shippingcode = e.currentTarget.dataset.shippingcode; |
1421 | 1432 | var index=e.currentTarget.dataset.idxe; |
1422 | - var ob={ is_express: index, is_shipping_code: shippingcode}; | |
1433 | + var ob={ is_express: index, is_shipping_code: shippingcode,disabled:0}; | |
1423 | 1434 | ob[this.data.wu_arr_txt]=index; |
1424 | 1435 | this.setData(ob); |
1425 | 1436 | }, |
... | ... | @@ -1435,7 +1446,6 @@ Page({ |
1435 | 1446 | |
1436 | 1447 | //点击打开优惠券使用说明 |
1437 | 1448 | clik_coupons:function(e){ |
1438 | - | |
1439 | 1449 | var ind = e.currentTarget.dataset.idx; |
1440 | 1450 | var is_open = this.data.selected_quan_list[ind].is_open; |
1441 | 1451 | console.log(is_open,"是什么东西"); |
... | ... | @@ -1445,6 +1455,7 @@ Page({ |
1445 | 1455 | var txt = "selected_quan_list[" + ind + "].is_open" |
1446 | 1456 | var obj = {}; obj[txt] = is_open; |
1447 | 1457 | this.setData(obj); |
1458 | + this.setData({disabled:1}) | |
1448 | 1459 | }, |
1449 | 1460 | //选择券 |
1450 | 1461 | sele_coupon:function(e){ |
... | ... | @@ -1484,8 +1495,8 @@ Page({ |
1484 | 1495 | if (def_exp_code == item.code) { m_wind = k; } |
1485 | 1496 | } |
1486 | 1497 | //--如果是立即购买-- |
1487 | - if (this.data.is_b_now == 1) { | |
1488 | - th.setData({index: m_wind}); | |
1498 | + if (th.data.is_b_now == 1) { | |
1499 | + th.setData({index: m_wind,is_express:m_wind}); | |
1489 | 1500 | } else { |
1490 | 1501 | var ui = setInterval(function () { |
1491 | 1502 | if (th.data.cartlist) { |
... | ... | @@ -1493,8 +1504,7 @@ Page({ |
1493 | 1504 | for (var i in c_arr) { |
1494 | 1505 | c_arr[i].wind = m_wind; |
1495 | 1506 | } |
1496 | - th.setData({cartlist: c_arr}) | |
1497 | - | |
1507 | + th.setData({cartlist: c_arr,is_express:m_wind}) | |
1498 | 1508 | clearInterval(ui); |
1499 | 1509 | } |
1500 | 1510 | }, 500) | ... | ... |
pages/cart/cart2/cart2.wxml
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | <block wx:if="{{is_b_now==0}}"> |
37 | 37 | <view class="xc-border main-top"></view> |
38 | 38 | <view wx:for="{{cartlist}}" wx:for-index="pidx"> |
39 | - <view class="use-item bfff"> | |
39 | + <view class="use-item bfff"> | |
40 | 40 | |
41 | 41 | <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>门店:{{item.pname}}</view></view> |
42 | 42 | <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items"> |
... | ... | @@ -48,12 +48,13 @@ |
48 | 48 | <!----商品名称规格----> |
49 | 49 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}"> |
50 | 50 | <view class="goods-name">{{items.goods_name}}</view> |
51 | - | |
52 | 51 | <!-- 商品属性 --> |
53 | - <view class="flex-vertical fs28 color-gray">商品属性: <view class="goods-color"> | |
54 | - <text wx:if="{{items.goods_spec!='' && items.goods_spec!=null }}"> {{items.goods_spec}}/</text> | |
55 | - {{items.goods_color==null?"":items.goods_color}} | |
56 | - </view></view> | |
52 | + <view class="flex-vertical fs28 color-gray n_guige"> | |
53 | + <view class="goods-color"> | |
54 | + <text wx:if="{{items.goods_spec!='' && items.goods_spec!=null }}"> {{items.goods_spec}}</text> | |
55 | + {{items.goods_color==null || items.goods_color=='' ?"":"/"+items.goods_color}} | |
56 | + </view> | |
57 | + </view> | |
57 | 58 | |
58 | 59 | |
59 | 60 | <!-----商品名称规格------> |
... | ... | @@ -119,7 +120,7 @@ |
119 | 120 | </view> |
120 | 121 | <block wx:if="{{item.exp_type==0}}"> |
121 | 122 | <!-- 点击显示物流选择 --> |
122 | - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind'> | |
123 | + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}"> | |
123 | 124 | <view >{{wu_arr[item.wind].name}}</view><view class="xc-right"></view> |
124 | 125 | </view> |
125 | 126 | </block> |
... | ... | @@ -127,30 +128,31 @@ |
127 | 128 | |
128 | 129 | <!-- <view bindtap="express_name" class="use-item" hidden='{{item.exp_type==1}}'> |
129 | 130 | <view>选择物流:</view> --> |
130 | - | |
131 | 131 | <!-- <picker bindchange="bindPickerChange_w" data-txt='cartlist[{{pidx}}].wind' value="{{item.wind}}" range="{{wu_arr}}" range-key="name"> |
132 | 132 | <view >{{wu_arr[item.wind].name}}</view> |
133 | 133 | </picker> --> |
134 | 134 | <!-- </view> --> |
135 | 135 | </view> |
136 | - <!-----使用余额------> | |
137 | - <view class="set-mes" wx:if="{{yuer>0}}"> | |
138 | - <view class="use-item" bindtap='set_js_useyuer'> | |
139 | - <icon color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
140 | - <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
141 | - </view> | |
142 | - </view> | |
143 | - | |
144 | - </view> | |
145 | 136 | |
146 | - <!-- 留言 --> | |
137 | + <!-- 留言 --> | |
147 | 138 | <view class="coupon-mes flex-vertical"> |
148 | 139 | <view>留言</view> |
149 | 140 | <view class="leave-word"> |
150 | - <textarea placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></textarea> | |
151 | - | |
141 | + <input placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum" | |
142 | + disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></input> | |
143 | + | |
152 | 144 | </view> |
153 | 145 | </view> |
146 | + | |
147 | + </view> | |
148 | + | |
149 | + <!-----使用余额------> | |
150 | + <view class="set-mes" wx:if="{{yuer>0}}"> | |
151 | + <view class="use-item" bindtap='set_js_useyuer'> | |
152 | + <icon color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
153 | + <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
154 | + </view> | |
155 | + </view> | |
154 | 156 | |
155 | 157 | </block> |
156 | 158 | |
... | ... | @@ -224,7 +226,7 @@ |
224 | 226 | <view class="coupon-mes flex-vertical"> |
225 | 227 | <view>留言</view> |
226 | 228 | <view class="leave-word"> |
227 | - <textarea placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note"></textarea> | |
229 | + <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note"></input> | |
228 | 230 | |
229 | 231 | </view> |
230 | 232 | </view> |
... | ... | @@ -356,10 +358,11 @@ |
356 | 358 | <view class="frame"> |
357 | 359 | <!-- <view class="flex"> --> |
358 | 360 | <view class="coupon-wode ib flex ellipsis-2 "> |
359 | - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}} | |
361 | + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}} | |
360 | 362 | </text> |
361 | - {{item.PrivilegeName}} | |
362 | - <!-- </view> --> | |
363 | + <block wx:if="{{item.buy_sum>0}}">满{{item.buy_sum}}减{{item.Sum}}优惠券</block> | |
364 | + <block wx:else>全场通用减{{item.Sum}}优惠券</block> | |
365 | + <!-- </view> --> | |
363 | 366 | </view> |
364 | 367 | <view class="coupon-time"> |
365 | 368 | {{filters.replace_time2(item.BeginDate)}}至{{filters.replace_time2(item.BillDate)}}</view> |
... | ... | @@ -382,7 +385,7 @@ |
382 | 385 | |
383 | 386 | |
384 | 387 | |
385 | - <view class="abs flex-vertical-between bottmo-explain" bindtap='clik_coupons' data-idx="{{index}}"> | |
388 | + <view class="abs flex-vertical-between bottmo-explain" catchtap='clik_coupons' data-idx="{{index}}"> | |
386 | 389 | <view></view> |
387 | 390 | <view class="font-word flex">优惠券使用说明 |
388 | 391 | <view class="circle circle-size flex t-c"> | ... | ... |
pages/cart/cart2/cart2.wxss
... | ... | @@ -5,20 +5,18 @@ |
5 | 5 | color: #444; |
6 | 6 | } |
7 | 7 | .user-contact { |
8 | - padding: 24rpx 80rpx; | |
8 | + padding: 24rpx 70rpx; | |
9 | 9 | font-weight: 600; |
10 | - | |
11 | - | |
12 | 10 | } |
13 | 11 | |
14 | 12 | .location { |
15 | 13 | position: relative; |
16 | - padding: 0 80rpx 24rpx; | |
14 | + padding: 0 70rpx 24rpx; | |
17 | 15 | } |
18 | 16 | |
19 | 17 | .pos-icon { |
20 | 18 | position: absolute; |
21 | - left: 30rpx; | |
19 | + left: 22rpx; | |
22 | 20 | top: 9rpx; |
23 | 21 | width: 32rpx; |
24 | 22 | height: 37.5rpx; |
... | ... | @@ -84,8 +82,6 @@ |
84 | 82 | |
85 | 83 | .goods-color { |
86 | 84 | font-size: 24rpx; |
87 | - margin-left: 15rpx; | |
88 | - | |
89 | 85 | } |
90 | 86 | |
91 | 87 | .order-num { |
... | ... | @@ -106,10 +102,10 @@ margin:auto; |
106 | 102 | |
107 | 103 | } |
108 | 104 | .use-item>view{ |
109 | - display: flex;margin-right: 10rpx; | |
105 | + display: flex;margin-right: 12rpx; | |
110 | 106 | } |
111 | 107 | .use-item.bfff{ background-color: #fff;} |
112 | -.use-item .dp{width: 56rpx; height: 56rpx;} | |
108 | +.use-item .dp{width: 56rpx; height: 56rpx; margin-left: -5rpx} | |
113 | 109 | |
114 | 110 | .set-item { |
115 | 111 | justify-content: space-between; |
... | ... | @@ -822,5 +818,6 @@ margin-left: 20rpx; |
822 | 818 | } |
823 | 819 | .color-gray{ |
824 | 820 | color: #808080; |
821 | +} | |
825 | 822 | |
826 | -} | |
827 | 823 | \ No newline at end of file |
824 | +.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } | |
828 | 825 | \ No newline at end of file | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
... | ... | @@ -341,7 +341,6 @@ Page({ |
341 | 341 | |
342 | 342 | //--------------------提交订单----------------------- |
343 | 343 | submitForm:function(t){ |
344 | - | |
345 | 344 | if(this.data.is_summit_ing==1) return false; //--提交中退出-- |
346 | 345 | this.data.is_summit_ing=1; |
347 | 346 | |
... | ... | @@ -540,9 +539,9 @@ Page({ |
540 | 539 | }); |
541 | 540 | }, |
542 | 541 | enterAddressPage: function() { |
543 | - getApp().globalData.is_cart2_old=1; | |
542 | + getApp().globalData.is_cart_old=1; | |
544 | 543 | this.data.enterAddressPage = !0, wx.navigateTo({ |
545 | - url: "/pages/user/address_list/address_list?operate=select" | |
544 | + url: "/pages/user/address_list/address_list" | |
546 | 545 | }); |
547 | 546 | }, |
548 | 547 | ... | ... |
pages/cart/cart2_pt/cart2_pt.wxml
... | ... | @@ -39,10 +39,10 @@ |
39 | 39 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> |
40 | 40 | <view class="goods-name">{{bn_goods.goods_name}}</view> |
41 | 41 | <!-- 商品属性 --> |
42 | - <view class="flex-vertical fs28 color-gray">商品属性: | |
43 | - <view class="goods-color"> | |
44 | - <text wx:if="{{bn_goods.goods_spec!=''}}"> {{bn_goods.goods_spec}}/</text>{{bn_goods.goods_color}} | |
45 | - </view> </view> | |
42 | + <view class="flex-vertical fs28 color-gray n_guige"> | |
43 | + <view class="goods-color"> | |
44 | + <text wx:if="{{bn_goods.goods_spec!=''}}"> {{bn_goods.goods_spec}}/</text>{{bn_goods.goods_color}} | |
45 | + </view></view> | |
46 | 46 | |
47 | 47 | |
48 | 48 | <!-----商品名称规格------> |
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | <view class="coupon-mes flex-vertical"> |
115 | 115 | <view>留言</view> |
116 | 116 | <view class="leave-word"> |
117 | - <textarea placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></textarea> | |
117 | + <textarea placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note"></textarea> | |
118 | 118 | |
119 | 119 | </view> |
120 | 120 | </view> | ... | ... |
pages/cart/cart2_pt/cart2_pt.wxss
... | ... | @@ -5,19 +5,19 @@ |
5 | 5 | color: #444; |
6 | 6 | } |
7 | 7 | .user-contact { |
8 | - padding: 24rpx 80rpx; | |
8 | + padding: 24rpx 70rpx; | |
9 | 9 | font-weight: 600; |
10 | 10 | |
11 | 11 | } |
12 | 12 | |
13 | 13 | .location { |
14 | 14 | position: relative; |
15 | - padding: 0 80rpx 24rpx; | |
15 | + padding: 0 70rpx 24rpx; | |
16 | 16 | } |
17 | 17 | |
18 | 18 | .pos-icon { |
19 | 19 | position: absolute; |
20 | - left: 30rpx; | |
20 | + left: 22rpx; | |
21 | 21 | top: 20rpx; |
22 | 22 | width: 32rpx; |
23 | 23 | height: 40rpx; |
... | ... | @@ -108,7 +108,7 @@ |
108 | 108 | display: flex;margin-right: 10rpx; |
109 | 109 | } |
110 | 110 | .use-item.bfff{ background-color: #fff;} |
111 | -.use-item .dp{width: 56rpx; height: 56rpx;} | |
111 | +.use-item .dp{width: 56rpx; height: 56rpx; margin-left: -5rpx} | |
112 | 112 | |
113 | 113 | .set-item { |
114 | 114 | justify-content: space-between; |
... | ... | @@ -563,5 +563,6 @@ height:30rpx; |
563 | 563 | } |
564 | 564 | .color-gray{ |
565 | 565 | color: #808080; |
566 | +} | |
566 | 567 | |
567 | -} | |
568 | 568 | \ No newline at end of file |
569 | +.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } | |
569 | 570 | \ No newline at end of file | ... | ... |
pages/goods/categoryList/categoryList.js
... | ... | @@ -46,7 +46,7 @@ Page({ |
46 | 46 | letters = this.data.letters; |
47 | 47 | |
48 | 48 | var that = this; |
49 | - this.requestFirstCategoris(); | |
49 | + | |
50 | 50 | this.setData({ |
51 | 51 | abc: t.globalData.heigth-88-88-16, |
52 | 52 | windowHeight: res.windowHeight, |
... | ... | @@ -84,6 +84,7 @@ Page({ |
84 | 84 | |
85 | 85 | onShow:function(){ |
86 | 86 | var that=this; |
87 | + this.requestFirstCategoris(); | |
87 | 88 | |
88 | 89 | getApp().getConfig2(function (e) { |
89 | 90 | |
... | ... | @@ -98,17 +99,15 @@ Page({ |
98 | 99 | that.setData({ store_config: e,is_do:1 }); |
99 | 100 | if ( that.data.is_show_gb != 1 && that.data.is_show_pp != 1){ |
100 | 101 | console.log("品类数据", that.data.is_pl_time); |
101 | - var one_level_classify = that.data.one_level_classify; | |
102 | + | |
102 | 103 | that.data.pl_timer = setInterval(function () { |
103 | - console.log("品类数据", that.data.is_pl_time); | |
104 | - that.requestFirstCategoris(); | |
105 | - if (that.data.is_pl_time==1){ | |
106 | - console.log("品类数据", that.data.is_pl_time); | |
104 | + var one_level_classify = that.data.one_level_classify; | |
105 | + if (that.data.is_pl_time == 1 && one_level_classify.length>0){ | |
106 | + that.setData({ select_classify_on: 0, index: 0, goodslist: one_level_classify[0].array }); | |
107 | 107 | clearInterval(that.data.pl_timer); |
108 | 108 | } |
109 | - }, 6000); | |
110 | - console.log(one_level_classify,"999999999999999999999999999999999" ); | |
111 | - that.setData({ select_classify_on: 0, index: 0, goodslist: one_level_classify[0].array}); | |
109 | + }, 500); | |
110 | + | |
112 | 111 | } else if (that.data.is_show_gb != 1 ){ |
113 | 112 | // console.log("品类数据", that.data.is_show_pl); |
114 | 113 | ... | ... |
pages/user/address_list/address_list.js
... | ... | @@ -24,10 +24,11 @@ Page({ |
24 | 24 | }); |
25 | 25 | |
26 | 26 | this.data.operate = e.operate; |
27 | - var is_back=e.is_back; | |
28 | - if (is_back) this.setData({ is_back: is_back}) | |
29 | 27 | }, |
30 | 28 | onShow: function () { |
29 | + var is_back=getApp().globalData.is_cart_old; | |
30 | + if (is_back) this.setData({ is_back: is_back}) | |
31 | + | |
31 | 32 | this.data.curpage = 1; |
32 | 33 | this.data.addresses = []; |
33 | 34 | this.requestAddressList(); | ... | ... |
pages/user/order_list/order_list.wxml
... | ... | @@ -56,8 +56,9 @@ |
56 | 56 | <view class="flex-space-between"> |
57 | 57 | <!-- 商品规格 --> |
58 | 58 | <view class="Commodity_spec fs28 flex-center"> |
59 | - | |
60 | - <text class="ellipsis-1">{{goods.goods_color.length>1 && goods.goods_spec.length>1?goods.goods_color+"/"+goods.goods_spec:goods.goods_color.length>1 || goods.goods_spec.length>1?goods.goods_color+goods.goods_spec:'规格1'}}</text> | |
59 | + <text class="ellipsis-1" wx:if="{{goods.goods_color.length>1 && goods.goods_spec.length>1}}">{{goods.goods_color+"/"+goods.goods_spec}}</text> | |
60 | + <text class="ellipsis-1" wx:elif="{{goods.goods_color.length>1 || goods.goods_spec.length>1}}">{{goods.goods_color==undefined?"":goods.goods_color}}{{goods.goods_spec==undefined?"":goods.goods_spec}}</text> | |
61 | + <text class="ellipsis-1" wx:else>规格1</text> | |
61 | 62 | </view> |
62 | 63 | <view class="flex-level-right fs26 refund"> |
63 | 64 | <!-- 不是整单退的时候 --> | ... | ... |