me.vue
4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<template>
<view class="content">
<view class="topBj">
<view class="noToken" @click="goUserCenter">
<view class="headInfo" v-if="!token">
<image src="../../static/ic_50@2x.png" mode="" class="noTokenImg"></image>
<view class="loginText">登录</view>
</view>
<view class="headInfo" v-if="token">
<image :src="userInfo.image" mode="" class="noTokenImg"></image>
<view class="loginText">{{userInfo.nickname}}</view>
</view>
<view class="changeToShop" style="font-size: 40rpx;font-weight: 600;color: #fff;" @click="goAdmin" v-if="userInfo.is_admin==1">
<image src="../../static/qiehuan.png" mode="" style="width: 48rpx;height: 48rpx;"></image>
<view class="changeInfo">切换商家</view>
</view>
</view>
</view>
<view class="orderBox">
<view class="topBox">
<view class="allText">
全部订单
</view>
<view class="lookALL" @click="allOrder(0)">
查看全部订单
<image src="../../static/ic_21_1@2x.png" mode=""></image>
</view>
</view>
<view class="orderListBpox">
<view class="orderItem" @click="allOrder(1)">
<image src="../../static/ic_oder02@2x.png" mode=""></image>
<view class="">
待付款
</view>
<view class="orderNum" v-if="orderNum.nopay!=0">
{{orderNum.nopay}}
</view>
</view>
<view class="orderItem" @click="allOrder(2)">
<image src="../../static/ic_30@2x.png" mode=""></image>
<view class="">
待发货
</view>
<view class="orderNum" v-if="orderNum.nosend!=0">
{{orderNum.nosend}}
</view>
</view>
<view class="orderItem" @click="allOrder(3)">
<image src="../../static/ic_oder03@2x.png" mode=""></image>
<view class="">
待收货
</view>
<view class="orderNum" v-if="orderNum.noget!=0">
{{orderNum.noget}}
</view>
</view>
<view class="orderItem" @click="allOrder(4)">
<image src="../../static/ic_oder04@2x.png" mode=""></image>
<view class="">
待评价
</view>
<view class="orderNum" v-if="orderNum.nocomment!=0">
{{orderNum.nocomment}}
</view>
</view>
<view class="orderItem" @click="allOrder(5)">
<image src="../../static/ic_oder02@2x.png" mode=""></image>
<view class="">
已完成
</view>
<view class="orderNum" v-if="orderNum.aftersale!=0">
{{orderNum.aftersale}}
</view>
</view>
</view>
<view class="myFuwu">
<view class="fuwutext">
我的服务
</view>
<view class="fuwuItem" @click="myAddress">
<image src="../../static/ic_31@2x.png" mode=""></image><text>我的地址</text>
</view>
<view class="fuwuItem" @click="myEvaluate">
<image src="../../static/ic_32@2x.png" mode=""></image><text>我的评价</text>
</view>
<view class="fuwuItem" @click="collect">
<image src="../../static/ic_23@2x.png" mode=""></image><text>我的收藏</text>
</view>
<view class="fuwuItem">
<image src="../../static/ic_34@2x.png" mode=""></image><text>我的客服</text>
</view>
<view class="fuwuItem" @click="agreeInfo">
<image src="../../static/ic_35@2x.png" mode=""></image><text>商家信息</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
token: false,
userInfo:'', //用户信息
userData: '',
show: false,
sum: 966,
fensi: 0,
jf: 0,
guanzhu: 0,
shoucang: 0,
phoneNumber: '',
messageNum: 0, //留言个数
isIphoneX: false,
orderNum:'', //订单数量
}
},
onShow() {
if(uni.getStorageSync('token')){
this.token=true
this.userInfo=uni.getStorageSync('userInfo')
}
this.getOrderNum()
},
created() {
},
methods: {
goUserCenter() {
uni.navigateTo({
url: '/pages/me/user-center'
})
},
//切换商家身份
goAdmin() {
uni.redirectTo({
url: '/pages/admin-order/all-order'
})
},
//全部订单
allOrder(index) {
uni.navigateTo({
url: '/pages/order/order-list?index='+index
})
},
//获取订单数量
getOrderNum(){
request.get('/api/order/statusNum',{}).then(res=>{
this.orderNum=res.data
}).catch(err=>{
})
},
//我的地址
myAddress() {
uni.navigateTo({
url: '/pages/me/my-address'
})
},
//我的评价
myEvaluate() {
uni.navigateTo({
url: '/pages/me/my-evaluate'
})
},
//我的收藏
collect() {
uni.navigateTo({
url: '/pages/me/my-collect'
})
},
//商家信息
agreeInfo() {
uni.navigateTo({
url: '/pages/me/agree-info'
})
}
}
}
</script>
<style>
/* @import url("/common/uni.css"); */
@import url("/common/me.css");
</style>