正在显示
12 个修改的文件
包含
88 行增加
和
31 行删除
@@ -58,6 +58,7 @@ App({ | @@ -58,6 +58,7 @@ App({ | ||
58 | resolve(res.data) | 58 | resolve(res.data) |
59 | } else if (res.data.code == '5000') { | 59 | } else if (res.data.code == '5000') { |
60 | wx.hideLoading(); | 60 | wx.hideLoading(); |
61 | + reject(res.data) | ||
61 | wx.removeStorageSync('token'); | 62 | wx.removeStorageSync('token'); |
62 | wx.removeStorageSync('login'); | 63 | wx.removeStorageSync('login'); |
63 | // wx.navigateTo({ | 64 | // wx.navigateTo({ |
@@ -59,7 +59,8 @@ Page({ | @@ -59,7 +59,8 @@ Page({ | ||
59 | if (r.code == 200) { | 59 | if (r.code == 200) { |
60 | 60 | ||
61 | app.globalData.login_new=r.msg.login_new; | 61 | app.globalData.login_new=r.msg.login_new; |
62 | - console.log( app.globalData.login_new) | 62 | + app.globalData.status = r.msg.status; |
63 | + console.log(app.globalData.status) | ||
63 | // t.setData({ | 64 | // t.setData({ |
64 | // obj: r.msg | 65 | // obj: r.msg |
65 | // }) | 66 | // }) |
@@ -602,12 +603,13 @@ Page({ | @@ -602,12 +603,13 @@ Page({ | ||
602 | * 生命周期函数--监听页面加载 | 603 | * 生命周期函数--监听页面加载 |
603 | */ | 604 | */ |
604 | onLoad: function(options) { | 605 | onLoad: function(options) { |
606 | + | ||
605 | let that = this; | 607 | let that = this; |
606 | let token=wx.getStorageSync('token'); | 608 | let token=wx.getStorageSync('token'); |
607 | console.log('woshitoe',token) | 609 | console.log('woshitoe',token) |
608 | - if(token!=""){ | ||
609 | - this.getInfoFun() | ||
610 | - } | 610 | + // if(token!=""){ |
611 | + // this.getInfoFun() | ||
612 | + // } | ||
611 | this.get_banner() | 613 | this.get_banner() |
612 | 614 | ||
613 | // 获取活动专区 | 615 | // 获取活动专区 |
@@ -686,21 +688,7 @@ Page({ | @@ -686,21 +688,7 @@ Page({ | ||
686 | }).catch((err) => {}) | 688 | }).catch((err) => {}) |
687 | }, | 689 | }, |
688 | // 获取个人信息 | 690 | // 获取个人信息 |
689 | - getInfoFun() { | ||
690 | - let that= this; | ||
691 | - let u = app.interface.readteacher; | ||
692 | - app.post(u, {}).then((r) => { | ||
693 | - console.log('3489523498',r) | ||
694 | - if (r.code == 200) { | ||
695 | 691 | ||
696 | - app.globalData.login_new=r.msg.login_new; | ||
697 | - console.log( app.globalData.login_new) | ||
698 | - // t.setData({ | ||
699 | - // obj: r.msg | ||
700 | - // }) | ||
701 | - } | ||
702 | - }) | ||
703 | - }, | ||
704 | /** | 692 | /** |
705 | * 生命周期函数--监听页面初次渲染完成 | 693 | * 生命周期函数--监听页面初次渲染完成 |
706 | */ | 694 | */ |
@@ -5,7 +5,9 @@ Page({ | @@ -5,7 +5,9 @@ Page({ | ||
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
6 | */ | 6 | */ |
7 | data: { | 7 | data: { |
8 | - info:[] | 8 | + info:[], |
9 | + item:'', | ||
10 | + sel:0 | ||
9 | }, | 11 | }, |
10 | // 获取页面信息 | 12 | // 获取页面信息 |
11 | get_info(order) { | 13 | get_info(order) { |
@@ -19,10 +21,28 @@ Page({ | @@ -19,10 +21,28 @@ Page({ | ||
19 | this.setData({ | 21 | this.setData({ |
20 | info: res.msg.kuaidi | 22 | info: res.msg.kuaidi |
21 | }) | 23 | }) |
24 | + this.setData({ | ||
25 | + item: res.msg.kuaidi[0] | ||
26 | + }) | ||
22 | 27 | ||
23 | console.log(that.data.info) | 28 | console.log(that.data.info) |
24 | }) | 29 | }) |
25 | }, | 30 | }, |
31 | + | ||
32 | + selectinfo(e){ | ||
33 | + let that=this | ||
34 | + let index=e.currentTarget.dataset.index; | ||
35 | + that.setData({ | ||
36 | + sel:index | ||
37 | + }) | ||
38 | + this.data.info.forEach(function(value,indexk,array){ | ||
39 | + if(index==indexk){ | ||
40 | + that.setData({ | ||
41 | + item:value | ||
42 | + }) | ||
43 | + } | ||
44 | + }) | ||
45 | + }, | ||
26 | /** | 46 | /** |
27 | * 生命周期函数--监听页面加载 | 47 | * 生命周期函数--监听页面加载 |
28 | */ | 48 | */ |
1 | <!-- 商品 --> | 1 | <!-- 商品 --> |
2 | <view class="block"> | 2 | <view class="block"> |
3 | -<view wx:for="{{info}}" wx:key=''> | ||
4 | - <view class="show_good"> | 3 | +<view> |
4 | + <!-- <view class="show_good"> | ||
5 | <image src="{{item.kuaidi.product_image}}" mode="aspectFill"/> | 5 | <image src="{{item.kuaidi.product_image}}" mode="aspectFill"/> |
6 | <view class="dai" wx:if="{{item.kuaidi.State==0}}">待取件</view> | 6 | <view class="dai" wx:if="{{item.kuaidi.State==0}}">待取件</view> |
7 | <view class="dai" wx:if="{{item.kuaidi.State==1}}">已揽收</view> | 7 | <view class="dai" wx:if="{{item.kuaidi.State==1}}">已揽收</view> |
8 | <view class="dai" wx:if="{{item.kuaidi.State==2}}">在途中</view> | 8 | <view class="dai" wx:if="{{item.kuaidi.State==2}}">在途中</view> |
9 | <view class="dai" wx:if="{{item.kuaidi.State==3}}">已签收</view> | 9 | <view class="dai" wx:if="{{item.kuaidi.State==3}}">已签收</view> |
10 | <view class="dai" wx:if="{{item.kuaidi.State==4}}">问题件</view> | 10 | <view class="dai" wx:if="{{item.kuaidi.State==4}}">问题件</view> |
11 | - </view> | 11 | + </view> --> |
12 | 12 | ||
13 | <!-- 物流 --> | 13 | <!-- 物流 --> |
14 | <view class="logistics"> | 14 | <view class="logistics"> |
15 | - <view class="info"> | ||
16 | - <view class="right"> | ||
17 | - <view class="name">{{item.kuaidi.name}}</view> | ||
18 | - <view class="order_num">快递单号:{{item.kuaidi.LogisticCode}}</view> | 15 | + <view class="info" > |
16 | + <view class="right" wx:for="{{info}}" wx:key='' bindtap="selectinfo" data-index="{{index}}"> | ||
17 | + <view class="name {{sel==index?'selactive':''}}">{{item.kuaidi.name}}</view> | ||
18 | + <view class="order_num {{sel==index?'selactive':''}}">快递单号:{{item.kuaidi.LogisticCode}}</view> | ||
19 | </view> | 19 | </view> |
20 | + | ||
20 | </view> | 21 | </view> |
21 | 22 | ||
22 | <view class="order_box"> | 23 | <view class="order_box"> |
@@ -41,16 +41,28 @@ page { | @@ -41,16 +41,28 @@ page { | ||
41 | display: flex; | 41 | display: flex; |
42 | align-items: center; | 42 | align-items: center; |
43 | border-bottom: 1px solid #ccc; | 43 | border-bottom: 1px solid #ccc; |
44 | + overflow-x: scroll | ||
44 | } | 45 | } |
45 | 46 | ||
47 | + | ||
46 | .info image { | 48 | .info image { |
47 | width: 96rpx; | 49 | width: 96rpx; |
48 | height: 96rpx; | 50 | height: 96rpx; |
49 | margin-right: 20rpx; | 51 | margin-right: 20rpx; |
50 | } | 52 | } |
53 | +.right{ | ||
54 | + width:400rpx; | ||
55 | + margin-right: 30rpx; | ||
56 | +} | ||
57 | +.name{ | ||
58 | + font-size: 30rpx; | ||
59 | + font-family: PingFang SC; | ||
60 | + font-weight: 400; | ||
61 | + color: rgba(19, 26, 46, 1); | ||
62 | +} | ||
51 | 63 | ||
52 | -.info .right { | ||
53 | - width: 360rpx; | 64 | +/* .info .right { |
65 | + width: 460rpx; | ||
54 | } | 66 | } |
55 | 67 | ||
56 | .info .right .name { | 68 | .info .right .name { |
@@ -66,8 +78,19 @@ page { | @@ -66,8 +78,19 @@ page { | ||
66 | font-weight: 400; | 78 | font-weight: 400; |
67 | color: rgba(156, 156, 156, 1); | 79 | color: rgba(156, 156, 156, 1); |
68 | margin-top: 10rpx; | 80 | margin-top: 10rpx; |
81 | +} */ | ||
82 | + | ||
83 | +.order_num{ | ||
84 | + width:400rpx; | ||
85 | + font-size: 26rpx; | ||
86 | + font-family: PingFang SC; | ||
87 | + font-weight: 400; | ||
88 | + color: rgba(156, 156, 156, 1); | ||
69 | } | 89 | } |
90 | +.selactive{ | ||
91 | + color: rgba(61, 154, 248, 1); | ||
70 | 92 | ||
93 | +} | ||
71 | .order_box { | 94 | .order_box { |
72 | width: 100%; | 95 | width: 100%; |
73 | padding: 0 32rpx; | 96 | padding: 0 32rpx; |
@@ -121,8 +144,8 @@ page { | @@ -121,8 +144,8 @@ page { | ||
121 | height: 136rpx; | 144 | height: 136rpx; |
122 | background: rgba(238, 238, 238, 1); | 145 | background: rgba(238, 238, 238, 1); |
123 | position: absolute; | 146 | position: absolute; |
124 | - left: 17rpx; | ||
125 | - top: 36rpx; | 147 | + left: 15rpx; |
148 | + top: 48rpx; | ||
126 | 149 | ||
127 | } | 150 | } |
128 | .order_item:last-child .status_img .line{ | 151 | .order_item:last-child .status_img .line{ |
@@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
16 | <view class="messtopright">{{item.createtime}}</view> | 16 | <view class="messtopright">{{item.createtime}}</view> |
17 | </view> | 17 | </view> |
18 | <view class="messagename">{{item.content}}</view> | 18 | <view class="messagename">{{item.content}}</view> |
19 | + | ||
19 | </view> | 20 | </view> |
20 | 21 | ||
21 | </view> | 22 | </view> |
@@ -55,14 +55,22 @@ Page({ | @@ -55,14 +55,22 @@ Page({ | ||
55 | // 获取个人信息 | 55 | // 获取个人信息 |
56 | getInfoFun() { | 56 | getInfoFun() { |
57 | let t = this; | 57 | let t = this; |
58 | + console.log(4848394893) | ||
58 | let u = a.interface.readteacher; | 59 | let u = a.interface.readteacher; |
59 | a.post(u, {}).then((r) => { | 60 | a.post(u, {}).then((r) => { |
60 | - console.log(r) | 61 | + console.log('用户信息',r) |
61 | if (r.code == 200) { | 62 | if (r.code == 200) { |
62 | t.setData({ | 63 | t.setData({ |
63 | obj: r.msg | 64 | obj: r.msg |
64 | }) | 65 | }) |
65 | } | 66 | } |
67 | + }).catch((err) => { | ||
68 | + if (err.msg =='请重新登录|授权'){ | ||
69 | + t.setData({ | ||
70 | + obj: {} | ||
71 | + }) | ||
72 | + } | ||
73 | + console.log(err) | ||
66 | }) | 74 | }) |
67 | }, | 75 | }, |
68 | 76 |
@@ -67,6 +67,13 @@ Page({ | @@ -67,6 +67,13 @@ Page({ | ||
67 | // 立即购买 | 67 | // 立即购买 |
68 | purchaseNow() { | 68 | purchaseNow() { |
69 | let that = this; | 69 | let that = this; |
70 | + if (app.globalData.status==0){ | ||
71 | + wx.showToast({ | ||
72 | + title: '您已被拉黑', | ||
73 | + icon:'none' | ||
74 | + }) | ||
75 | + return false | ||
76 | + } | ||
70 | if (that.data.info.sold==0){ | 77 | if (that.data.info.sold==0){ |
71 | wx.showToast({ | 78 | wx.showToast({ |
72 | title: '库存不足,不能下单', | 79 | title: '库存不足,不能下单', |
-
请 注册 或 登录 后发表评论