|
|
@@ -1,105 +1,101 @@
|
|
1
|
1
|
<script lang="ts" setup>
|
|
2
|
|
-import { useUserStore } from "~/stores/userStore";
|
|
3
|
|
-import CXBAuthorize from "~/components/CXBAuthorize/CXBAuthorize.vue";
|
|
4
|
|
-import { getAgentInfo, getUserInfo } from "~/apis/user";
|
|
5
|
|
-import { CDN_URL, CDM_URL } from "~/config/app";
|
|
6
|
|
-import Routine from "~/libs/routine";
|
|
7
|
|
-import { totalOrderNumber } from "~/apis/order.api";
|
|
8
|
|
-import type { OrderQuantityModel } from "~/apis/model/order.model";
|
|
9
|
|
-import FPopup from "~/components/FPopup/FPopup.vue";
|
|
10
|
|
-import { CANCEL_EVENT, OPEN_EVENT } from "~/constants/event";
|
|
11
|
|
-import type { Ref } from "vue";
|
|
|
2
|
+import type { Ref } from 'vue'
|
|
|
3
|
+import { useUserStore } from '~/stores/userStore'
|
|
|
4
|
+import { getAgentInfo } from '~/apis/user'
|
|
|
5
|
+import { CDM_URL, CDN_URL } from '~/config/app'
|
|
|
6
|
+import { totalOrderNumber } from '~/apis/order.api'
|
|
|
7
|
+import type { OrderQuantityModel } from '~/apis/model/order.model'
|
|
|
8
|
+import FPopup from '~/components/FPopup/FPopup.vue'
|
|
|
9
|
+
|
|
12
|
10
|
const pageStore = usePageStoreWidthOut()
|
|
13
|
|
-const userStore = useUserStore();
|
|
|
11
|
+const userStore = useUserStore()
|
|
14
|
12
|
const currentType = ref('')
|
|
15
|
13
|
const myOrderList = [{
|
|
16
|
14
|
id: 'noPay',
|
|
17
|
|
- icon: CDN_URL + '/static/assets/obligation_220620.png',
|
|
|
15
|
+ icon: `${CDN_URL}/static/assets/obligation_220620.png`,
|
|
18
|
16
|
text: '待付款',
|
|
19
|
17
|
count: '',
|
|
20
|
|
- url: ''
|
|
|
18
|
+ url: '',
|
|
21
|
19
|
}, {
|
|
22
|
|
- icon: CDN_URL + '/static/assets/daifahuo_220620.png',
|
|
|
20
|
+ icon: `${CDN_URL}/static/assets/daifahuo_220620.png`,
|
|
23
|
21
|
id: 'noPostage',
|
|
24
|
22
|
text: '待发货',
|
|
25
|
23
|
count: '',
|
|
26
|
|
- url: ''
|
|
|
24
|
+ url: '',
|
|
27
|
25
|
}, {
|
|
28
|
|
- icon: CDN_URL + '/static/assets/daishouhuo_220620.png',
|
|
|
26
|
+ icon: `${CDN_URL}/static/assets/daishouhuo_220620.png`,
|
|
29
|
27
|
id: 'noDeliver',
|
|
30
|
28
|
text: '待收货',
|
|
31
|
29
|
count: '',
|
|
32
|
|
- url: ''
|
|
|
30
|
+ url: '',
|
|
33
|
31
|
}, {
|
|
34
|
|
- icon: CDN_URL + '/static/assets/daipingjia_220620.png',
|
|
|
32
|
+ icon: `${CDN_URL}/static/assets/daipingjia_220620.png`,
|
|
35
|
33
|
id: 'noComment',
|
|
36
|
34
|
text: '待评价',
|
|
37
|
|
- url: ''
|
|
|
35
|
+ url: '',
|
|
38
|
36
|
}, {
|
|
39
|
|
- icon: CDN_URL + '/static/assets/after_sale_220620.png',
|
|
|
37
|
+ icon: `${CDN_URL}/static/assets/after_sale_220620.png`,
|
|
40
|
38
|
text: '退款/售后',
|
|
41
|
|
- url: '/pages/refund/index'
|
|
|
39
|
+ url: '/pages/refund/index',
|
|
42
|
40
|
}]
|
|
43
|
41
|
const contactUsList = [{
|
|
44
|
42
|
type: 'customer',
|
|
45
|
43
|
icon: '/static/icon/kefu_icon.png',
|
|
46
|
44
|
text: '联系客服',
|
|
47
|
|
- url: 'https://work.weixin.qq.com/kfid/kfce29f31a08fd53ee0'
|
|
|
45
|
+ url: 'https://work.weixin.qq.com/kfid/kfce29f31a08fd53ee0',
|
|
48
|
46
|
}, {
|
|
49
|
47
|
type: 'link',
|
|
50
|
|
- icon: CDN_URL + '/static/assets/bangzhuzhongxin_220620.png',
|
|
|
48
|
+ icon: `${CDN_URL}/static/assets/bangzhuzhongxin_220620.png`,
|
|
51
|
49
|
text: '帮助中心',
|
|
52
|
|
- url: '/pages/help-center/index'
|
|
|
50
|
+ url: '/pages/help-center/index',
|
|
53
|
51
|
}]
|
|
54
|
52
|
|
|
55
|
|
-
|
|
56
|
|
-//市/区代表弹框标识
|
|
|
53
|
+// 市/区代表弹框标识
|
|
57
|
54
|
const showValue = ref(false)
|
|
58
|
55
|
|
|
59
|
|
-//https://cdn.bjtdba.com/vod/image/2023-11-24/20231124154421388.png
|
|
60
|
|
-
|
|
|
56
|
+// https://cdn.bjtdba.com/vod/image/2023-11-24/20231124154421388.png
|
|
61
|
57
|
|
|
62
|
|
-//https://cdn.bjtdba.com/vod/image/2023-11-24/20231124154612477.png
|
|
|
58
|
+// https://cdn.bjtdba.com/vod/image/2023-11-24/20231124154612477.png
|
|
63
|
59
|
|
|
64
|
60
|
const myServiceList = [{
|
|
65
|
|
- icon: CDN_URL + '/static/assets/wodeyaoqing_220620.png',
|
|
|
61
|
+ icon: `${CDN_URL}/static/assets/wodeyaoqing_220620.png`,
|
|
66
|
62
|
text: '我的邀请',
|
|
67
|
|
- url: '/pages/my-invitation/index'
|
|
|
63
|
+ url: '/pages/my-invitation/index',
|
|
68
|
64
|
}, {
|
|
69
|
|
- icon: CDN_URL + '/static/assets/wodedizhi_220620.png',
|
|
|
65
|
+ icon: `${CDN_URL}/static/assets/wodedizhi_220620.png`,
|
|
70
|
66
|
text: '我的地址',
|
|
71
|
|
- url: '/pages/user/address/index'
|
|
|
67
|
+ url: '/pages/user/address/index',
|
|
72
|
68
|
}, {
|
|
73
|
|
- icon: CDN_URL + '/static/assets/wodeshoucang_220620.png',
|
|
|
69
|
+ icon: `${CDN_URL}/static/assets/wodeshoucang_220620.png`,
|
|
74
|
70
|
text: '我的收藏',
|
|
75
|
|
- url: '/pages/my-relation-product/index'
|
|
|
71
|
+ url: '/pages/my-relation-product/index',
|
|
76
|
72
|
}, {
|
|
77
|
|
- icon: CDN_URL + '/static/assets/wodeguanzhu_220620.png',
|
|
|
73
|
+ icon: `${CDN_URL}/static/assets/wodeguanzhu_220620.png`,
|
|
78
|
74
|
text: '我的关注',
|
|
79
|
|
- url: '/pages/my-relation-merchant/index'
|
|
|
75
|
+ url: '/pages/my-relation-merchant/index',
|
|
80
|
76
|
}, {
|
|
81
|
|
- icon: CDN_URL + '/static/assets/sanfangdingdan_220620.png',
|
|
|
77
|
+ icon: `${CDN_URL}/static/assets/sanfangdingdan_220620.png`,
|
|
82
|
78
|
text: '三方订单',
|
|
83
|
|
- url: '/pages/order/third-order'
|
|
|
79
|
+ url: '/pages/order/third-order',
|
|
84
|
80
|
}, {
|
|
85
|
|
- icon: CDN_URL + '/static/assets/wodepingjia_220620.png',
|
|
|
81
|
+ icon: `${CDN_URL}/static/assets/wodepingjia_220620.png`,
|
|
86
|
82
|
text: '我的评价',
|
|
87
|
|
- url: '/pages/my-reply/index'
|
|
|
83
|
+ url: '/pages/my-reply/index',
|
|
88
|
84
|
}, {
|
|
89
|
|
- icon: CDN_URL + '/static/assets/invite_friends_221023.png',
|
|
|
85
|
+ icon: `${CDN_URL}/static/assets/invite_friends_221023.png`,
|
|
90
|
86
|
text: '邀请好友',
|
|
91
|
|
- url: '/pages/invite-friends/index'
|
|
|
87
|
+ url: '/pages/invite-friends/index',
|
|
92
|
88
|
}, {
|
|
93
|
|
- icon: CDN_URL + '/static/assets/dianpuruzhu_220620.png',
|
|
94
|
|
- text: userStore.userInfo?.is_merchant=="-1"?'商铺入驻':'我的店铺',
|
|
95
|
|
- url: ''
|
|
|
89
|
+ icon: `${CDN_URL}/static/assets/dianpuruzhu_220620.png`,
|
|
|
90
|
+ text: userStore.userInfo?.is_merchant == '-1' ? '店铺入驻' : '我的店铺',
|
|
|
91
|
+ url: '',
|
|
96
|
92
|
}, {
|
|
97
|
|
- icon: CDN_URL + '/static/assets/mine_setting_220620.png',
|
|
|
93
|
+ icon: `${CDN_URL}/static/assets/mine_setting_220620.png`,
|
|
98
|
94
|
text: '设置',
|
|
99
|
|
- url: '/pages/setting/index'
|
|
|
95
|
+ url: '/pages/setting/index',
|
|
100
|
96
|
}]
|
|
101
|
97
|
const state = reactive({
|
|
102
|
|
- isLogin: false
|
|
|
98
|
+ isLogin: false,
|
|
103
|
99
|
})
|
|
104
|
100
|
|
|
105
|
101
|
const orderQuantity: Ref<OrderQuantityModel> = ref()
|
|
|
@@ -128,7 +124,7 @@ onShow(async () => {
|
|
128
|
124
|
// title: '登录中',
|
|
129
|
125
|
// })
|
|
130
|
126
|
// if (userStore.token ? )
|
|
131
|
|
-
|
|
|
127
|
+
|
|
132
|
128
|
if (uni.getStorageSync('UID')) {
|
|
133
|
129
|
state.isLogin = true
|
|
134
|
130
|
uni.hideLoading()
|
|
|
@@ -136,11 +132,10 @@ onShow(async () => {
|
|
136
|
132
|
await userStore.getUserYanglaoJin()
|
|
137
|
133
|
agentInfo.value = await getAgentInfo()
|
|
138
|
134
|
}
|
|
139
|
|
- totalOrderNumber().then(res => {
|
|
|
135
|
+ totalOrderNumber().then((res) => {
|
|
140
|
136
|
orderQuantity.value = res
|
|
141
|
137
|
})
|
|
142
|
|
-
|
|
143
|
|
-
|
|
|
138
|
+
|
|
144
|
139
|
// if (uni.getStorageSync('UID')) {
|
|
145
|
140
|
// state.isLogin = true
|
|
146
|
141
|
// uni.hideLoading()
|
|
|
@@ -153,12 +148,11 @@ onShow(async () => {
|
|
153
|
148
|
// })
|
|
154
|
149
|
// userStore.setUserInfo(null)
|
|
155
|
150
|
// }
|
|
156
|
|
-
|
|
157
|
151
|
})
|
|
158
|
152
|
|
|
159
|
153
|
function checkAuth() {
|
|
160
|
154
|
uni.navigateTo({
|
|
161
|
|
- url: '/pages/user/login/index?key=3'
|
|
|
155
|
+ url: '/pages/user/login/index?key=3',
|
|
162
|
156
|
})
|
|
163
|
157
|
}
|
|
164
|
158
|
|
|
|
@@ -179,94 +173,90 @@ function handleService(item: {
|
|
179
|
173
|
text: string
|
|
180
|
174
|
url: string
|
|
181
|
175
|
}) {
|
|
182
|
|
-
|
|
183
|
|
- if (uni.getStorageSync('UID')) {
|
|
184
|
|
- console.log('进来了1');
|
|
185
|
|
- console.log(item.text);
|
|
186
|
|
-
|
|
187
|
|
- if (item.text === '商铺入驻'||item.text === '我的店铺') {
|
|
188
|
|
-
|
|
189
|
|
- console.log('进来了2');
|
|
190
|
|
-
|
|
191
|
|
- return uni.navigateToMiniProgram({
|
|
192
|
|
- appId: 'wx9a3e4ab07f8a9ba2',
|
|
193
|
|
- path: 'pages/index/index',
|
|
194
|
|
- success(res) {
|
|
195
|
|
- // 打开成功
|
|
196
|
|
- console.log(res);
|
|
197
|
|
- },
|
|
198
|
|
- fail: (error) => {
|
|
199
|
|
- console.log('error = ', error);
|
|
200
|
|
- }
|
|
201
|
|
- })
|
|
202
|
|
- }
|
|
203
|
|
-
|
|
204
|
|
- uni.navigateTo({
|
|
205
|
|
- url: item.url
|
|
206
|
|
- })
|
|
207
|
|
- } else {
|
|
208
|
|
-
|
|
209
|
|
- if (item.text === '商铺入驻'||item.text === '我的店铺') {
|
|
210
|
|
- return uni.navigateToMiniProgram({
|
|
|
176
|
+ if (uni.getStorageSync('UID')) {
|
|
|
177
|
+ console.log('进来了1')
|
|
|
178
|
+ console.log(item.text)
|
|
|
179
|
+
|
|
|
180
|
+ if (item.text === '店铺入驻' || item.text === '我的店铺') {
|
|
|
181
|
+ console.log('进来了2')
|
|
|
182
|
+
|
|
|
183
|
+ return uni.navigateToMiniProgram({
|
|
|
184
|
+ appId: 'wx9a3e4ab07f8a9ba2',
|
|
|
185
|
+ path: 'pages/index/index',
|
|
|
186
|
+ success(res) {
|
|
|
187
|
+ // 打开成功
|
|
|
188
|
+ console.log(res)
|
|
|
189
|
+ },
|
|
|
190
|
+ fail: (error) => {
|
|
|
191
|
+ console.log('error = ', error)
|
|
|
192
|
+ },
|
|
|
193
|
+ })
|
|
|
194
|
+ }
|
|
|
195
|
+
|
|
|
196
|
+ uni.navigateTo({
|
|
|
197
|
+ url: item.url,
|
|
|
198
|
+ })
|
|
|
199
|
+ }
|
|
|
200
|
+ else {
|
|
|
201
|
+ if (item.text === '商铺入驻' || item.text === '我的店铺') {
|
|
|
202
|
+ return uni.navigateToMiniProgram({
|
|
211
|
203
|
appId: 'wx9a3e4ab07f8a9ba2',
|
|
212
|
204
|
path: 'pages/index/index',
|
|
213
|
205
|
success(res) {
|
|
214
|
206
|
// 打开成功
|
|
215
|
|
- console.log(res);
|
|
|
207
|
+ console.log(res)
|
|
216
|
208
|
},
|
|
217
|
209
|
fail: (error) => {
|
|
218
|
|
- console.log('error = ', error);
|
|
219
|
|
- }
|
|
220
|
|
- })
|
|
221
|
|
-
|
|
222
|
|
- } else if (item.text === '设置') {
|
|
223
|
|
- uni.navigateTo({
|
|
224
|
|
- url: item.url
|
|
225
|
|
- })
|
|
226
|
|
- } else {
|
|
227
|
|
- uni.navigateTo({
|
|
228
|
|
- url: '/pages/user/login/index?key=3'
|
|
229
|
|
- })
|
|
230
|
|
- userStore.setUserInfo(null)
|
|
231
|
|
- }
|
|
232
|
|
- }
|
|
|
210
|
+ console.log('error = ', error)
|
|
|
211
|
+ },
|
|
|
212
|
+ })
|
|
|
213
|
+ }
|
|
|
214
|
+ else if (item.text === '设置') {
|
|
|
215
|
+ uni.navigateTo({
|
|
|
216
|
+ url: item.url,
|
|
|
217
|
+ })
|
|
|
218
|
+ }
|
|
|
219
|
+ else {
|
|
|
220
|
+ uni.navigateTo({
|
|
|
221
|
+ url: '/pages/user/login/index?key=3',
|
|
|
222
|
+ })
|
|
|
223
|
+ userStore.setUserInfo(null)
|
|
|
224
|
+ }
|
|
|
225
|
+ }
|
|
233
|
226
|
}
|
|
234
|
227
|
|
|
235
|
|
-
|
|
236
|
|
-
|
|
237
|
228
|
function encodePhone(phone: string) {
|
|
238
|
229
|
// let tel = '13600136000';
|
|
239
|
|
- return phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")
|
|
|
230
|
+ return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
|
240
|
231
|
}
|
|
241
|
232
|
|
|
242
|
233
|
function handleShowAnnuityDetail() {
|
|
243
|
234
|
uni.navigateTo({
|
|
244
|
|
- url: '/pages/annuity/index'
|
|
|
235
|
+ url: '/pages/annuity/index',
|
|
245
|
236
|
})
|
|
246
|
237
|
}
|
|
247
|
238
|
|
|
248
|
239
|
function handleShowMyInvitation() {
|
|
249
|
240
|
uni.navigateTo({
|
|
250
|
|
- url: '/pages/my-invitation/index'
|
|
|
241
|
+ url: '/pages/my-invitation/index',
|
|
251
|
242
|
})
|
|
252
|
243
|
}
|
|
253
|
244
|
|
|
254
|
245
|
function handleShowMyIntegral() {
|
|
255
|
246
|
uni.navigateTo({
|
|
256
|
|
- url: '/pages/my-integral/index'
|
|
|
247
|
+ url: '/pages/my-integral/index',
|
|
257
|
248
|
})
|
|
258
|
249
|
}
|
|
259
|
250
|
|
|
260
|
251
|
function handleShowMyAllOrder(tab?: number) {
|
|
261
|
|
-
|
|
262
|
252
|
if (tab <= 4) {
|
|
263
|
253
|
uni.navigateTo({
|
|
264
|
|
- url: '/pages/order/index?tabIndex=' + tab
|
|
|
254
|
+ url: `/pages/order/index?tabIndex=${tab}`,
|
|
265
|
255
|
})
|
|
266
|
256
|
}
|
|
267
|
257
|
if (tab == 5) {
|
|
268
|
258
|
uni.navigateTo({
|
|
269
|
|
- url: '/pages/refund/index'
|
|
|
259
|
+ url: '/pages/refund/index',
|
|
270
|
260
|
})
|
|
271
|
261
|
}
|
|
272
|
262
|
}
|
|
|
@@ -276,142 +266,128 @@ const userType = computed(() => {
|
|
276
|
266
|
|
|
277
|
267
|
// console.log(userStore.userInfo)
|
|
278
|
268
|
// 普通用户
|
|
279
|
|
- if (userRichType == 0) {
|
|
|
269
|
+ if (userRichType == 0)
|
|
280
|
270
|
|
|
281
|
271
|
return '../../static/img-hy/用户.png'
|
|
282
|
|
- }
|
|
|
272
|
+
|
|
283
|
273
|
// 会员
|
|
284
|
|
- if (userRichType == 1) {
|
|
|
274
|
+ if (userRichType == 1)
|
|
285
|
275
|
|
|
286
|
276
|
return '../../static/img-hy/会员.png'
|
|
287
|
277
|
|
|
288
|
|
- }
|
|
289
|
|
- if (userRichType == 3) {
|
|
|
278
|
+ if (userRichType == 3)
|
|
290
|
279
|
|
|
291
|
280
|
return '../../static/img-hy/创始人.png'
|
|
292
|
|
- }
|
|
|
281
|
+
|
|
293
|
282
|
// 高级会员
|
|
294
|
|
- if (userRichType == 4) {
|
|
|
283
|
+ if (userRichType == 4)
|
|
295
|
284
|
|
|
296
|
285
|
return '../../static/img-hy/高级会员.png'
|
|
297
|
|
- }
|
|
298
|
|
- if (userRichType == 8) {
|
|
|
286
|
+
|
|
|
287
|
+ if (userRichType == 8)
|
|
299
|
288
|
|
|
300
|
289
|
return '../../static/img-hy/合伙人.png'
|
|
301
|
|
- }
|
|
302
|
|
- if (userRichType == 9) {
|
|
|
290
|
+
|
|
|
291
|
+ if (userRichType == 9)
|
|
303
|
292
|
|
|
304
|
293
|
return '../../static/img-hy/联合创始人.png'
|
|
305
|
|
- }
|
|
306
|
|
- if (!userRichType) {
|
|
|
294
|
+
|
|
|
295
|
+ if (!userRichType)
|
|
307
|
296
|
|
|
308
|
297
|
return ''
|
|
309
|
|
- }
|
|
310
|
298
|
})
|
|
311
|
299
|
|
|
312
|
|
-//0:普通用户 1:股东
|
|
|
300
|
+// 0:普通用户 1:股东
|
|
313
|
301
|
const AlholderType = computed(() => {
|
|
314
|
302
|
const stockholder = userStore.userInfo?.stockholder
|
|
315
|
303
|
// 普通用户
|
|
316
|
|
- if (stockholder == 0) {
|
|
|
304
|
+ if (stockholder == 0)
|
|
317
|
305
|
return ''
|
|
318
|
|
- }
|
|
|
306
|
+
|
|
319
|
307
|
// 股东
|
|
320
|
|
- if (stockholder == 1) {
|
|
|
308
|
+ if (stockholder == 1)
|
|
321
|
309
|
return '../../static/img-hy/股东.png'
|
|
322
|
|
- }
|
|
323
|
|
-
|
|
324
|
310
|
})
|
|
325
|
311
|
// '':普通用户 district-区/县代 city-市代',
|
|
326
|
312
|
const areaType = computed(() => {
|
|
327
|
313
|
if (userStore.userInfo?.area_manage?.area_name) {
|
|
328
|
314
|
const areamanage = userStore.userInfo?.area_manage_type
|
|
329
|
315
|
// 县/区代理
|
|
330
|
|
- if (areamanage == 'district') {
|
|
|
316
|
+ if (areamanage == 'district')
|
|
331
|
317
|
return '../../static/img-hy/district.png'
|
|
332
|
|
- }
|
|
|
318
|
+
|
|
333
|
319
|
// 市代理
|
|
334
|
|
- if (areamanage == 'city') {
|
|
|
320
|
+ if (areamanage == 'city')
|
|
335
|
321
|
return '../../static/img-hy/city.png'
|
|
336
|
|
- }
|
|
337
|
|
- //普通用户
|
|
338
|
|
- if (!areamanage) {
|
|
339
|
|
- return ''
|
|
340
|
|
- }
|
|
341
|
322
|
|
|
|
323
|
+ // 普通用户
|
|
|
324
|
+ if (!areamanage)
|
|
|
325
|
+ return ''
|
|
342
|
326
|
}
|
|
343
|
|
-
|
|
344
|
327
|
})
|
|
345
|
328
|
|
|
346
|
|
-//弹框展示
|
|
|
329
|
+// 弹框展示
|
|
347
|
330
|
function openPopup() {
|
|
348
|
331
|
showValue.value = true
|
|
349
|
332
|
}
|
|
350
|
|
-//关闭弹框
|
|
351
|
|
-const onCancel = () => {
|
|
|
333
|
+// 关闭弹框
|
|
|
334
|
+function onCancel() {
|
|
352
|
335
|
// show.value = false
|
|
353
|
336
|
showValue.value = false
|
|
354
|
337
|
}
|
|
355
|
338
|
|
|
356
|
|
-//计算市区县展示图片
|
|
|
339
|
+// 计算市区县展示图片
|
|
357
|
340
|
const backImg = computed(() => {
|
|
358
|
341
|
if (userStore.userInfo?.area_manage_type) {
|
|
359
|
342
|
const areamanage = userStore.userInfo?.area_manage_type
|
|
360
|
343
|
// 县/区代理
|
|
361
|
|
- if (areamanage == 'district') {
|
|
362
|
|
- return CDM_URL + '/image/2023-11-24/20231124154421388.png'
|
|
363
|
|
- }
|
|
|
344
|
+ if (areamanage == 'district')
|
|
|
345
|
+ return `${CDM_URL}/image/2023-11-24/20231124154421388.png`
|
|
|
346
|
+
|
|
364
|
347
|
// 市代理
|
|
365
|
|
- if (areamanage == 'city') {
|
|
366
|
|
- return CDM_URL + '/image/2023-11-24/20231124154612477.png'
|
|
367
|
|
- }
|
|
|
348
|
+ if (areamanage == 'city')
|
|
|
349
|
+ return `${CDM_URL}/image/2023-11-24/20231124154612477.png`
|
|
368
|
350
|
}
|
|
369
|
|
-
|
|
370
|
351
|
})
|
|
371
|
352
|
const textType = computed(() => {
|
|
372
|
353
|
if (userStore.userInfo?.area_manage?.area_name) {
|
|
373
|
354
|
const areamanage = userStore.userInfo?.area_manage.area_name
|
|
374
|
|
- let res = areamanage.join("");
|
|
|
355
|
+ const res = areamanage.join('')
|
|
375
|
356
|
return res
|
|
376
|
357
|
}
|
|
377
|
|
-
|
|
378
|
358
|
})
|
|
379
|
359
|
|
|
380
|
|
-
|
|
381
|
360
|
function handleToRedIntegral() {
|
|
382
|
361
|
uni.navigateTo({
|
|
383
|
|
- url: '/pages/red-integral/index'
|
|
|
362
|
+ url: '/pages/red-integral/index',
|
|
384
|
363
|
})
|
|
385
|
364
|
}
|
|
386
|
365
|
|
|
387
|
366
|
function handleToContact(item) {
|
|
388
|
|
-
|
|
389
|
|
-
|
|
390
|
|
-
|
|
391
|
367
|
if (item.type === 'link') {
|
|
392
|
368
|
return uni.navigateTo({
|
|
393
|
|
- url: item.url
|
|
|
369
|
+ url: item.url,
|
|
394
|
370
|
})
|
|
395
|
371
|
}
|
|
396
|
|
-
|
|
|
372
|
+
|
|
397
|
373
|
if (item.type === 'customer') {
|
|
398
|
|
-
|
|
399
|
374
|
if (uni.getStorageSync('UID')) {
|
|
400
|
375
|
return uni.openCustomerServiceChat({
|
|
401
|
376
|
extInfo: {
|
|
402
|
|
- url: 'https://work.weixin.qq.com/kfid/kfc8bd3f11a28aa81db'
|
|
|
377
|
+ url: 'https://work.weixin.qq.com/kfid/kfc8bd3f11a28aa81db',
|
|
403
|
378
|
},
|
|
404
|
379
|
corpId: 'wwaeb55681929a37ae',
|
|
405
|
|
- success: (res => {
|
|
|
380
|
+ success: (res) => {
|
|
406
|
381
|
console.log(res)
|
|
407
|
|
- }),
|
|
408
|
|
- fail: (res => {
|
|
|
382
|
+ },
|
|
|
383
|
+ fail: (res) => {
|
|
409
|
384
|
console.log(res)
|
|
410
|
|
- })
|
|
|
385
|
+ },
|
|
411
|
386
|
})
|
|
412
|
|
- } else {
|
|
|
387
|
+ }
|
|
|
388
|
+ else {
|
|
413
|
389
|
uni.navigateTo({
|
|
414
|
|
- url: '/pages/user/login/index?key=3'
|
|
|
390
|
+ url: '/pages/user/login/index?key=3',
|
|
415
|
391
|
})
|
|
416
|
392
|
userStore.setUserInfo(null)
|
|
417
|
393
|
}
|
|
|
@@ -420,57 +396,64 @@ function handleToContact(item) {
|
|
420
|
396
|
|
|
421
|
397
|
function handleShowMyProfile() {
|
|
422
|
398
|
uni.navigateTo({
|
|
423
|
|
- url: '/pages/my-profile/index'
|
|
|
399
|
+ url: '/pages/my-profile/index',
|
|
424
|
400
|
})
|
|
425
|
401
|
}
|
|
426
|
402
|
|
|
427
|
403
|
function handleShowMyRulePage() {
|
|
428
|
404
|
uni.navigateTo({
|
|
429
|
|
- url: `/pages/my-rules/index`
|
|
|
405
|
+ url: '/pages/my-rules/index',
|
|
430
|
406
|
})
|
|
431
|
407
|
}
|
|
432
|
408
|
</script>
|
|
|
409
|
+
|
|
433
|
410
|
<template>
|
|
434
|
|
- <div class="pb-safe">
|
|
435
|
|
- <div class="bg-[#FD1642] h-40 w-full absolute top-0 left-0"></div>
|
|
|
411
|
+ <div class="pb-safe">
|
|
|
412
|
+ <div class="bg-[#FD1642] h-40 w-full absolute top-0 left-0" />
|
|
436
|
413
|
<div class="flex flex-col gap-4 relative px-3 pb-safe">
|
|
437
|
414
|
<div class="pt-15 ">
|
|
438
|
415
|
<div class="flex gap-2 mb-2 text-white mb-6">
|
|
439
|
|
- <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
|
|
440
|
|
- @click="handleShowMyProfile" style="width:74rpx; height:74rpx;" class="rounded-full"></image>
|
|
441
|
|
- <image v-else @click="checkAuth" src="https://app.bjtdba.com/uploads/logo.jpg"
|
|
442
|
|
- class="rounded-full" style="width:74rpx; height:74rpx;" />
|
|
|
416
|
+ <image
|
|
|
417
|
+ v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar"
|
|
|
418
|
+ style="width:74rpx; height:74rpx;" class="rounded-full" @click="handleShowMyProfile"
|
|
|
419
|
+ />
|
|
|
420
|
+ <image
|
|
|
421
|
+ v-else src="https://app.bjtdba.com/uploads/logo.jpg" class="rounded-full"
|
|
|
422
|
+ style="width:74rpx; height:74rpx;" @click="checkAuth"
|
|
|
423
|
+ />
|
|
443
|
424
|
<div class="flex flex-col">
|
|
444
|
425
|
<div class="flex">
|
|
445
|
426
|
<div class="text-sm">
|
|
446
|
|
- <div class="text-sm" v-if="userStore.userInfo">
|
|
|
427
|
+ <div v-if="userStore.userInfo" class="text-sm">
|
|
447
|
428
|
{{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
|
|
448
|
429
|
</div>
|
|
449
|
430
|
</div>
|
|
450
|
|
- <div class="text-sm flex-height " v-if="userStore.userInfo && userStore.userInfo.phone">
|
|
|
431
|
+ <div v-if="userStore.userInfo && userStore.userInfo.phone" class="text-sm flex-height ">
|
|
451
|
432
|
{{ encodePhone(userStore.userInfo.phone) }}
|
|
452
|
433
|
</div>
|
|
453
|
434
|
</div>
|
|
454
|
435
|
<div class="btm flex gap-1 ">
|
|
455
|
436
|
<!-- 用户 -->
|
|
456
|
|
- <div v-if="userType" @click="handleShowMyRulePage()"
|
|
457
|
|
- class="flex rounded-full text-[12px] text-white w-12 h-5 w-fit ">
|
|
458
|
|
- <image mode="heightFix" lazy-load class="vip_img" :src="userType"></image>
|
|
|
437
|
+ <div
|
|
|
438
|
+ v-if="userType" class="flex rounded-full text-[12px] text-white w-12 h-5 w-fit "
|
|
|
439
|
+ @click="handleShowMyRulePage()"
|
|
|
440
|
+ >
|
|
|
441
|
+ <image mode="heightFix" lazy-load class="vip_img" :src="userType" />
|
|
459
|
442
|
</div>
|
|
460
|
443
|
<!-- 市区县代理 -->
|
|
461
|
|
- <div @click="openPopup" v-if="areaType" class="flex rounded-full text-[12px] text-white w-12 h-5 w-fit ">
|
|
462
|
|
- <image mode="heightFix" lazy-load class="vip_img" :src="areaType"></image>
|
|
|
444
|
+ <div v-if="areaType" class="flex rounded-full text-[12px] text-white w-12 h-5 w-fit " @click="openPopup">
|
|
|
445
|
+ <image mode="heightFix" lazy-load class="vip_img" :src="areaType" />
|
|
463
|
446
|
</div>
|
|
464
|
447
|
<!-- 股东 -->
|
|
465
|
448
|
<div v-if="AlholderType" class="flex rounded-full text-[12px] text-white w-12 h-5 w-fit">
|
|
466
|
|
- <image mode="heightFix" lazy-load class="vip_img" :src="AlholderType"></image>
|
|
|
449
|
+ <image mode="heightFix" lazy-load class="vip_img" :src="AlholderType" />
|
|
467
|
450
|
</div>
|
|
468
|
451
|
</div>
|
|
469
|
452
|
</div>
|
|
470
|
|
- <FPopup v-model:show="showValue" position="center" exClass="box_2 ">
|
|
|
453
|
+ <FPopup v-model:show="showValue" position="center" ex-class="box_2 ">
|
|
471
|
454
|
<div class="box_2 flex-row">
|
|
472
|
|
- <div class="box_2" v-if="backImg">
|
|
473
|
|
- <image lazy-load class="img_1" :src="backImg"></image>
|
|
|
455
|
+ <div v-if="backImg" class="box_2">
|
|
|
456
|
+ <image lazy-load class="img_1" :src="backImg" />
|
|
474
|
457
|
</div>
|
|
475
|
458
|
<div class="group_2 flex-col lolr ">
|
|
476
|
459
|
<div class="div_box pong1 ">
|
|
|
@@ -489,111 +472,132 @@ function handleShowMyRulePage() {
|
|
489
|
472
|
</div>
|
|
490
|
473
|
<div class="block_1 flex-col blue_2 height2 ">
|
|
491
|
474
|
<div class="text-group_4 flex-col justify-between">
|
|
492
|
|
- <div class=" pend">所辖区域的区域管理分红</div>
|
|
493
|
|
- <div class="text_5 pand ">(参照会员系统佣金逻辑)</div>
|
|
|
475
|
+ <div class=" pend">
|
|
|
476
|
+ 所辖区域的区域管理分红
|
|
|
477
|
+ </div>
|
|
|
478
|
+ <div class="text_5 pand ">
|
|
|
479
|
+ (参照会员系统佣金逻辑)
|
|
|
480
|
+ </div>
|
|
494
|
481
|
</div>
|
|
495
|
482
|
</div>
|
|
496
|
483
|
</div>
|
|
497
|
484
|
</div>
|
|
498
|
485
|
</div>
|
|
499
|
|
- <div @click="onCancel" class="off_1">
|
|
|
486
|
+ <div class="off_1" @click="onCancel">
|
|
500
|
487
|
<image lazy-load class="off_2" src="../../static/img-hy/关闭.png" />
|
|
501
|
488
|
</div>
|
|
502
|
489
|
</FPopup>
|
|
503
|
|
-
|
|
504
|
490
|
</div>
|
|
505
|
491
|
<div v-if="state.isLogin" style="border-radius: 16rpx;" class="bg-white flex flex-col gap-6 py-4 text-xl">
|
|
506
|
492
|
<div v-if="userStore.userInfo" class="flex ">
|
|
507
|
|
- <div @tap="handleShowAnnuityDetail" class="w-1/2 flex flex-col justify-center" style="padding-left: 48rpx;">
|
|
508
|
|
- <div class="text-xs">养老金</div>
|
|
|
493
|
+ <div class="w-1/2 flex flex-col justify-center" style="padding-left: 48rpx;" @tap="handleShowAnnuityDetail">
|
|
|
494
|
+ <div class="text-xs">
|
|
|
495
|
+ 养老金
|
|
|
496
|
+ </div>
|
|
509
|
497
|
<div>{{ userStore.yanglao.all_yanglao }}</div>
|
|
510
|
498
|
</div>
|
|
511
|
|
- <div @tap="handleShowMyInvitation" class="w-1/2 flex flex-col justify-center " style="padding-left: 48rpx;">
|
|
512
|
|
- <div class="text-xs">我的佣金</div>
|
|
|
499
|
+ <div class="w-1/2 flex flex-col justify-center " style="padding-left: 48rpx;" @tap="handleShowMyInvitation">
|
|
|
500
|
+ <div class="text-xs">
|
|
|
501
|
+ 我的佣金
|
|
|
502
|
+ </div>
|
|
513
|
503
|
<div>{{ agentInfo.brokerage_price }}</div>
|
|
514
|
504
|
</div>
|
|
515
|
505
|
</div>
|
|
516
|
506
|
<div v-if="userStore.userInfo" class="flex">
|
|
517
|
|
- <div @tap="handleShowMyIntegral" class="w-1/3 flex flex-col justify-center " style="padding-left: 48rpx;">
|
|
518
|
|
- <div class="text-xs">我的积分</div>
|
|
|
507
|
+ <div class="w-1/3 flex flex-col justify-center " style="padding-left: 48rpx;" @tap="handleShowMyIntegral">
|
|
|
508
|
+ <div class="text-xs">
|
|
|
509
|
+ 我的积分
|
|
|
510
|
+ </div>
|
|
519
|
511
|
<div>{{ userStore.userInfo.score }}</div>
|
|
520
|
512
|
</div>
|
|
521
|
|
- <div class="icon_d"></div>
|
|
522
|
|
- <div @click="handleToRedIntegral" class="w-1/3 flex flex-col justify-center " style="padding-left: 48rpx;">
|
|
523
|
|
- <div class="text-xs">红积分提现</div>
|
|
|
513
|
+ <div class="icon_d" />
|
|
|
514
|
+ <div class="w-1/3 flex flex-col justify-center " style="padding-left: 48rpx;" @click="handleToRedIntegral">
|
|
|
515
|
+ <div class="text-xs">
|
|
|
516
|
+ 红积分提现
|
|
|
517
|
+ </div>
|
|
524
|
518
|
<div>{{ userStore.userInfo.member_brokerage_price }}</div>
|
|
525
|
519
|
</div>
|
|
526
|
|
- <div class="icon_d"></div>
|
|
|
520
|
+ <div class="icon_d" />
|
|
527
|
521
|
<div class="w-1/3 flex flex-col justify-center" style="padding-left: 48rpx;">
|
|
528
|
|
- <div class="text-xs">团队人数</div>
|
|
|
522
|
+ <div class="text-xs">
|
|
|
523
|
+ 团队人数
|
|
|
524
|
+ </div>
|
|
529
|
525
|
<div>{{ userStore.userInfo.team_number }}</div>
|
|
530
|
526
|
</div>
|
|
531
|
527
|
</div>
|
|
532
|
|
-
|
|
533
|
528
|
</div>
|
|
534
|
|
-
|
|
535
|
529
|
</div>
|
|
536
|
530
|
|
|
537
|
531
|
<div class="bg-white rounded px-3 text-sm">
|
|
538
|
532
|
<div class="flex justify-between pt-4 mb-4">
|
|
539
|
533
|
<div>我的订单</div>
|
|
540
|
534
|
<div class="flex items-center">
|
|
541
|
|
- <div @click="handleShowMyAllOrder(0)" class="text-sm text-gray">查看全部
|
|
|
535
|
+ <div class="text-sm text-gray" @click="handleShowMyAllOrder(0)">
|
|
|
536
|
+ 查看全部
|
|
542
|
537
|
</div>
|
|
543
|
|
- <div class="f-text-color-2 i-tabler-chevron-right"></div>
|
|
|
538
|
+ <div class="f-text-color-2 i-tabler-chevron-right" />
|
|
544
|
539
|
</div>
|
|
545
|
|
-
|
|
546
|
|
-
|
|
547
|
540
|
</div>
|
|
548
|
541
|
<div class="flex pb-4">
|
|
549
|
|
- <div @click="handleShowMyAllOrder(index + 1)" v-for="(item, index) in myOrderList" :key="index"
|
|
550
|
|
- class="flex flex-col justify-center items-center w-1/5 gap-3">
|
|
|
542
|
+ <div
|
|
|
543
|
+ v-for="(item, index) in myOrderList" :key="index" class="flex flex-col justify-center items-center w-1/5 gap-3"
|
|
|
544
|
+ @click="handleShowMyAllOrder(index + 1)"
|
|
|
545
|
+ >
|
|
551
|
546
|
<div class="relative">
|
|
552
|
547
|
<div
|
|
|
548
|
+ v-if="item.id == 'noPay' && orderQuantity && orderQuantity.noPay != '0'"
|
|
553
|
549
|
class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
|
|
554
|
|
- v-if="item.id == 'noPay' && orderQuantity && orderQuantity.noPay != '0'">
|
|
|
550
|
+ >
|
|
555
|
551
|
{{ orderQuantity.noPay }}
|
|
556
|
552
|
</div>
|
|
557
|
553
|
<div
|
|
|
554
|
+ v-if="item.id == 'refund' && orderQuantity && orderQuantity.refund != '0'"
|
|
558
|
555
|
class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
|
|
559
|
|
- v-if="item.id == 'refund' && orderQuantity && orderQuantity.refund != '0'">
|
|
|
556
|
+ >
|
|
560
|
557
|
{{ orderQuantity.refund }}
|
|
561
|
558
|
</div>
|
|
562
|
559
|
<div
|
|
|
560
|
+ v-if="item.id == 'noDeliver' && orderQuantity && orderQuantity.noDeliver != '0'"
|
|
563
|
561
|
class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
|
|
564
|
|
- v-if="item.id == 'noDeliver' && orderQuantity && orderQuantity.noDeliver != '0'">
|
|
|
562
|
+ >
|
|
565
|
563
|
{{ orderQuantity.noDeliver }}
|
|
566
|
564
|
</div>
|
|
567
|
565
|
<div
|
|
|
566
|
+ v-if="item.id == 'noPostage' && orderQuantity && orderQuantity.noPostage != '0'"
|
|
568
|
567
|
class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
|
|
569
|
|
- v-if="item.id == 'noPostage' && orderQuantity && orderQuantity.noPostage != '0'">
|
|
|
568
|
+ >
|
|
570
|
569
|
{{ orderQuantity.noPostage }}
|
|
571
|
570
|
</div>
|
|
572
|
571
|
<div
|
|
|
572
|
+ v-if="item.id == 'noComment' && orderQuantity && orderQuantity.noComment != '0'"
|
|
573
|
573
|
class="bg-primary rounded-full w-3 h-3 text-[9px] text-white flex justify-center items-center absolute top--1 right--2 text-center"
|
|
574
|
|
- v-if="item.id == 'noComment' && orderQuantity && orderQuantity.noComment != '0'">
|
|
|
574
|
+ >
|
|
575
|
575
|
{{ orderQuantity.noComment }}
|
|
576
|
576
|
</div>
|
|
577
|
577
|
<image :src="item.icon" mode="widthFix" class="w-7 h-7 " />
|
|
578
|
578
|
</div>
|
|
579
|
579
|
|
|
580
|
|
- <div class="text-xs">{{ item.text }}</div>
|
|
|
580
|
+ <div class="text-xs">
|
|
|
581
|
+ {{ item.text }}
|
|
|
582
|
+ </div>
|
|
581
|
583
|
</div>
|
|
582
|
584
|
</div>
|
|
583
|
|
-
|
|
584
|
585
|
</div>
|
|
585
|
586
|
<div class="bg-white rounded px-3">
|
|
586
|
587
|
<div class="flex justify-between pt-4 mb-4">
|
|
587
|
588
|
<div>我的服务</div>
|
|
588
|
589
|
</div>
|
|
589
|
590
|
<div class="flex flex-wrap ">
|
|
590
|
|
- <div v-for="(item, index) in myServiceList" :key="index" @tap="handleService(item)"
|
|
591
|
|
- class="flex flex-col justify-center items-center w-1/4 gap-2 mb-4">
|
|
|
591
|
+ <div
|
|
|
592
|
+ v-for="(item, index) in myServiceList" :key="index" class="flex flex-col justify-center items-center w-1/4 gap-2 mb-4"
|
|
|
593
|
+ @tap="handleService(item)"
|
|
|
594
|
+ >
|
|
592
|
595
|
<image :src="item.icon" mode="widthFix" class="w-6 h-6 " />
|
|
593
|
|
- <div class="text-xs">{{ item.text }}</div>
|
|
|
596
|
+ <div class="text-xs">
|
|
|
597
|
+ {{ item.text }}
|
|
|
598
|
+ </div>
|
|
594
|
599
|
</div>
|
|
595
|
600
|
</div>
|
|
596
|
|
-
|
|
597
|
601
|
</div>
|
|
598
|
602
|
|
|
599
|
603
|
<div class="bg-white rounded px-3">
|
|
|
@@ -601,20 +605,23 @@ function handleShowMyRulePage() {
|
|
601
|
605
|
<div>联系我们</div>
|
|
602
|
606
|
</div>
|
|
603
|
607
|
<div class="flex flex-wrap ">
|
|
604
|
|
- <div v-for="(item, index) in contactUsList" :key="index" @tap="handleToContact(item)"
|
|
605
|
|
- class="flex flex-col justify-center items-center w-1/4 gap-2 mb-4">
|
|
|
608
|
+ <div
|
|
|
609
|
+ v-for="(item, index) in contactUsList" :key="index" class="flex flex-col justify-center items-center w-1/4 gap-2 mb-4"
|
|
|
610
|
+ @tap="handleToContact(item)"
|
|
|
611
|
+ >
|
|
606
|
612
|
<image :src="item.icon" mode="widthFix" class="w-6 h-6 " />
|
|
607
|
|
- <div class="text-xs">{{ item.text }}</div>
|
|
|
613
|
+ <div class="text-xs">
|
|
|
614
|
+ {{ item.text }}
|
|
|
615
|
+ </div>
|
|
608
|
616
|
</div>
|
|
609
|
617
|
</div>
|
|
610
|
|
-
|
|
611
|
618
|
</div>
|
|
612
|
|
-
|
|
613
|
619
|
</div>
|
|
614
|
620
|
</div>
|
|
615
|
621
|
|
|
616
|
|
- <!-- <CXBAuthorize v-else/>-->
|
|
|
622
|
+ <!-- <CXBAuthorize v-else/> -->
|
|
617
|
623
|
</template>
|
|
|
624
|
+
|
|
618
|
625
|
<style>
|
|
619
|
626
|
page {
|
|
620
|
627
|
background-color: #f8f8f8;
|
|
|
@@ -727,13 +734,13 @@ page {
|
|
727
|
734
|
top: 447rpx
|
|
728
|
735
|
}
|
|
729
|
736
|
|
|
730
|
|
-
|
|
731
|
737
|
.icon_d {
|
|
732
|
738
|
width: 1rpx;
|
|
733
|
739
|
height: 40rpx;
|
|
734
|
740
|
background: #D8D8D8;
|
|
735
|
741
|
}
|
|
736
|
742
|
</style>
|
|
|
743
|
+
|
|
737
|
744
|
<route lang="yaml">
|
|
738
|
745
|
style:
|
|
739
|
746
|
navigationStyle: custom
|