李战雷 лет назад: 2
Родитель
Сommit
0df1cc6498
3 измененных файлов с 409 добавлено и 396 удалено
  1. 1 1
      src/pages/home/components/navs.vue
  2. 233 226
      src/pages/user/index.vue
  3. 175 169
      src/pages/user/login/index.vue

+ 1 - 1
src/pages/home/components/navs.vue

@@ -106,7 +106,7 @@ function handleItemClick(item: any) {
106
       // })
106
       // })
107
 	  
107
 	  
108
 	  uni.navigateToMiniProgram({
108
 	  uni.navigateToMiniProgram({
109
-	      appId: 'wx82986c4471ce7efc',
109
+	      appId: 'wx9082e5ac2fdb513f',
110
 	      path: 'pages/home/index',
110
 	      path: 'pages/home/index',
111
 	  	  envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
111
 	  	  envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
112
 	      success(res) {
112
 	      success(res) {

+ 233 - 226
src/pages/user/index.vue

@@ -1,105 +1,101 @@
1
 <script lang="ts" setup>
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
 const pageStore = usePageStoreWidthOut()
10
 const pageStore = usePageStoreWidthOut()
13
-const userStore = useUserStore();
11
+const userStore = useUserStore()
14
 const currentType = ref('')
12
 const currentType = ref('')
15
 const myOrderList = [{
13
 const myOrderList = [{
16
   id: 'noPay',
14
   id: 'noPay',
17
-  icon: CDN_URL + '/static/assets/obligation_220620.png',
15
+  icon: `${CDN_URL}/static/assets/obligation_220620.png`,
18
   text: '待付款',
16
   text: '待付款',
19
   count: '',
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
   id: 'noPostage',
21
   id: 'noPostage',
24
   text: '待发货',
22
   text: '待发货',
25
   count: '',
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
   id: 'noDeliver',
27
   id: 'noDeliver',
30
   text: '待收货',
28
   text: '待收货',
31
   count: '',
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
   id: 'noComment',
33
   id: 'noComment',
36
   text: '待评价',
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
   text: '退款/售后',
38
   text: '退款/售后',
41
-  url: '/pages/refund/index'
39
+  url: '/pages/refund/index',
42
 }]
40
 }]
43
 const contactUsList = [{
41
 const contactUsList = [{
44
   type: 'customer',
42
   type: 'customer',
45
   icon: '/static/icon/kefu_icon.png',
43
   icon: '/static/icon/kefu_icon.png',
46
   text: '联系客服',
44
   text: '联系客服',
47
-  url: 'https://work.weixin.qq.com/kfid/kfce29f31a08fd53ee0'
45
+  url: 'https://work.weixin.qq.com/kfid/kfce29f31a08fd53ee0',
48
 }, {
46
 }, {
49
   type: 'link',
47
   type: 'link',
50
-  icon: CDN_URL + '/static/assets/bangzhuzhongxin_220620.png',
48
+  icon: `${CDN_URL}/static/assets/bangzhuzhongxin_220620.png`,
51
   text: '帮助中心',
49
   text: '帮助中心',
52
-  url: '/pages/help-center/index'
50
+  url: '/pages/help-center/index',
53
 }]
51
 }]
54
 
52
 
55
-
56
-//市/区代表弹框标识
53
+// 市/区代表弹框标识
57
 const showValue = ref(false)
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
 const myServiceList = [{
60
 const myServiceList = [{
65
-  icon: CDN_URL + '/static/assets/wodeyaoqing_220620.png',
61
+  icon: `${CDN_URL}/static/assets/wodeyaoqing_220620.png`,
66
   text: '我的邀请',
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
   text: '我的地址',
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
   text: '我的收藏',
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
   text: '我的关注',
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
   text: '三方订单',
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
   text: '我的评价',
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
   text: '邀请好友',
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
   text: '设置',
94
   text: '设置',
99
-  url: '/pages/setting/index'
95
+  url: '/pages/setting/index',
100
 }]
96
 }]
101
 const state = reactive({
97
 const state = reactive({
102
-  isLogin: false
98
+  isLogin: false,
103
 })
99
 })
104
 
100
 
105
 const orderQuantity: Ref<OrderQuantityModel> = ref()
101
 const orderQuantity: Ref<OrderQuantityModel> = ref()
@@ -128,7 +124,7 @@ onShow(async () => {
128
   //   title: '登录中',
124
   //   title: '登录中',
129
   // })
125
   // })
130
   // if (userStore.token ? )
126
   // if (userStore.token ? )
131
-  
127
+
132
   if (uni.getStorageSync('UID')) {
128
   if (uni.getStorageSync('UID')) {
133
     state.isLogin = true
129
     state.isLogin = true
134
     uni.hideLoading()
130
     uni.hideLoading()
@@ -136,11 +132,10 @@ onShow(async () => {
136
     await userStore.getUserYanglaoJin()
132
     await userStore.getUserYanglaoJin()
137
     agentInfo.value = await getAgentInfo()
133
     agentInfo.value = await getAgentInfo()
138
   }
134
   }
139
-  totalOrderNumber().then(res => {
135
+  totalOrderNumber().then((res) => {
140
     orderQuantity.value = res
136
     orderQuantity.value = res
141
   })
137
   })
142
-  
143
-  
138
+
144
   // if (uni.getStorageSync('UID')) {
139
   // if (uni.getStorageSync('UID')) {
145
   //   state.isLogin = true
140
   //   state.isLogin = true
146
   //   uni.hideLoading()
141
   //   uni.hideLoading()
@@ -153,12 +148,11 @@ onShow(async () => {
153
   //   })
148
   //   })
154
   //   userStore.setUserInfo(null)
149
   //   userStore.setUserInfo(null)
155
   // }
150
   // }
156
-  
157
 })
151
 })
158
 
152
 
159
 function checkAuth() {
153
 function checkAuth() {
160
   uni.navigateTo({
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
   text: string
173
   text: string
180
   url: string
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
 			  	appId: 'wx9a3e4ab07f8a9ba2',
203
 			  	appId: 'wx9a3e4ab07f8a9ba2',
212
 			  	path: 'pages/index/index',
204
 			  	path: 'pages/index/index',
213
 			  	success(res) {
205
 			  	success(res) {
214
 			  	// 打开成功
206
 			  	// 打开成功
215
-			  	console.log(res);
207
+			  	console.log(res)
216
 			  	},
208
 			  	},
217
 			  	fail: (error) => {
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
 function encodePhone(phone: string) {
228
 function encodePhone(phone: string) {
238
   // let tel = '13600136000';
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
 function handleShowAnnuityDetail() {
233
 function handleShowAnnuityDetail() {
243
   uni.navigateTo({
234
   uni.navigateTo({
244
-    url: '/pages/annuity/index'
235
+    url: '/pages/annuity/index',
245
   })
236
   })
246
 }
237
 }
247
 
238
 
248
 function handleShowMyInvitation() {
239
 function handleShowMyInvitation() {
249
   uni.navigateTo({
240
   uni.navigateTo({
250
-    url: '/pages/my-invitation/index'
241
+    url: '/pages/my-invitation/index',
251
   })
242
   })
252
 }
243
 }
253
 
244
 
254
 function handleShowMyIntegral() {
245
 function handleShowMyIntegral() {
255
   uni.navigateTo({
246
   uni.navigateTo({
256
-    url: '/pages/my-integral/index'
247
+    url: '/pages/my-integral/index',
257
   })
248
   })
258
 }
249
 }
259
 
250
 
260
 function handleShowMyAllOrder(tab?: number) {
251
 function handleShowMyAllOrder(tab?: number) {
261
-	
262
   if (tab <= 4) {
252
   if (tab <= 4) {
263
     uni.navigateTo({
253
     uni.navigateTo({
264
-      url: '/pages/order/index?tabIndex=' + tab
254
+      url: `/pages/order/index?tabIndex=${tab}`,
265
     })
255
     })
266
   }
256
   }
267
   if (tab == 5) {
257
   if (tab == 5) {
268
     uni.navigateTo({
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
   // console.log(userStore.userInfo)
267
   // console.log(userStore.userInfo)
278
   // 普通用户
268
   // 普通用户
279
-  if (userRichType == 0) {
269
+  if (userRichType == 0)
280
 
270
 
281
     return '../../static/img-hy/用户.png'
271
     return '../../static/img-hy/用户.png'
282
-  }
272
+
283
   // 会员
273
   // 会员
284
-  if (userRichType == 1) {
274
+  if (userRichType == 1)
285
 
275
 
286
     return '../../static/img-hy/会员.png'
276
     return '../../static/img-hy/会员.png'
287
 
277
 
288
-  }
289
-  if (userRichType == 3) {
278
+  if (userRichType == 3)
290
 
279
 
291
     return '../../static/img-hy/创始人.png'
280
     return '../../static/img-hy/创始人.png'
292
-  }
281
+
293
   // 高级会员
282
   // 高级会员
294
-  if (userRichType == 4) {
283
+  if (userRichType == 4)
295
 
284
 
296
     return '../../static/img-hy/高级会员.png'
285
     return '../../static/img-hy/高级会员.png'
297
-  }
298
-  if (userRichType == 8) {
286
+
287
+  if (userRichType == 8)
299
 
288
 
300
     return '../../static/img-hy/合伙人.png'
289
     return '../../static/img-hy/合伙人.png'
301
-  }
302
-  if (userRichType == 9) {
290
+
291
+  if (userRichType == 9)
303
 
292
 
304
     return '../../static/img-hy/联合创始人.png'
293
     return '../../static/img-hy/联合创始人.png'
305
-  }
306
-  if (!userRichType) {
294
+
295
+  if (!userRichType)
307
 
296
 
308
     return ''
297
     return ''
309
-  }
310
 })
298
 })
311
 
299
 
312
-//0:普通用户 1:股东
300
+// 0:普通用户 1:股东
313
 const AlholderType = computed(() => {
301
 const AlholderType = computed(() => {
314
   const stockholder = userStore.userInfo?.stockholder
302
   const stockholder = userStore.userInfo?.stockholder
315
   // 普通用户
303
   // 普通用户
316
-  if (stockholder == 0) {
304
+  if (stockholder == 0)
317
     return ''
305
     return ''
318
-  }
306
+
319
   // 股东
307
   // 股东
320
-  if (stockholder == 1) {
308
+  if (stockholder == 1)
321
     return '../../static/img-hy/股东.png'
309
     return '../../static/img-hy/股东.png'
322
-  }
323
-
324
 })
310
 })
325
 // '':普通用户 district-区/县代 city-市代',
311
 // '':普通用户 district-区/县代 city-市代',
326
 const areaType = computed(() => {
312
 const areaType = computed(() => {
327
   if (userStore.userInfo?.area_manage?.area_name) {
313
   if (userStore.userInfo?.area_manage?.area_name) {
328
     const areamanage = userStore.userInfo?.area_manage_type
314
     const areamanage = userStore.userInfo?.area_manage_type
329
     // 县/区代理
315
     // 县/区代理
330
-    if (areamanage == 'district') {
316
+    if (areamanage == 'district')
331
       return '../../static/img-hy/district.png'
317
       return '../../static/img-hy/district.png'
332
-    }
318
+
333
     // 市代理
319
     // 市代理
334
-    if (areamanage == 'city') {
320
+    if (areamanage == 'city')
335
       return '../../static/img-hy/city.png'
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
 function openPopup() {
330
 function openPopup() {
348
   showValue.value = true
331
   showValue.value = true
349
 }
332
 }
350
-//关闭弹框
351
-const onCancel = () => {
333
+// 关闭弹框
334
+function onCancel() {
352
   // show.value = false
335
   // show.value = false
353
   showValue.value = false
336
   showValue.value = false
354
 }
337
 }
355
 
338
 
356
-//计算市区县展示图片
339
+// 计算市区县展示图片
357
 const backImg = computed(() => {
340
 const backImg = computed(() => {
358
   if (userStore.userInfo?.area_manage_type) {
341
   if (userStore.userInfo?.area_manage_type) {
359
     const areamanage = userStore.userInfo?.area_manage_type
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
 const textType = computed(() => {
352
 const textType = computed(() => {
372
   if (userStore.userInfo?.area_manage?.area_name) {
353
   if (userStore.userInfo?.area_manage?.area_name) {
373
     const areamanage = userStore.userInfo?.area_manage.area_name
354
     const areamanage = userStore.userInfo?.area_manage.area_name
374
-    let res = areamanage.join("");
355
+    const res = areamanage.join('')
375
     return res
356
     return res
376
   }
357
   }
377
-
378
 })
358
 })
379
 
359
 
380
-
381
 function handleToRedIntegral() {
360
 function handleToRedIntegral() {
382
   uni.navigateTo({
361
   uni.navigateTo({
383
-    url: '/pages/red-integral/index'
362
+    url: '/pages/red-integral/index',
384
   })
363
   })
385
 }
364
 }
386
 
365
 
387
 function handleToContact(item) {
366
 function handleToContact(item) {
388
-	
389
-	
390
-	
391
   if (item.type === 'link') {
367
   if (item.type === 'link') {
392
     return uni.navigateTo({
368
     return uni.navigateTo({
393
-      url: item.url
369
+      url: item.url,
394
     })
370
     })
395
   }
371
   }
396
-  
372
+
397
   if (item.type === 'customer') {
373
   if (item.type === 'customer') {
398
-	  
399
 	  if (uni.getStorageSync('UID')) {
374
 	  if (uni.getStorageSync('UID')) {
400
 		  return uni.openCustomerServiceChat({
375
 		  return uni.openCustomerServiceChat({
401
 		    extInfo: {
376
 		    extInfo: {
402
-		      url: 'https://work.weixin.qq.com/kfid/kfc8bd3f11a28aa81db'
377
+		      url: 'https://work.weixin.qq.com/kfid/kfc8bd3f11a28aa81db',
403
 		    },
378
 		    },
404
 		    corpId: 'wwaeb55681929a37ae',
379
 		    corpId: 'wwaeb55681929a37ae',
405
-		    success: (res => {
380
+		    success: (res) => {
406
 		      console.log(res)
381
 		      console.log(res)
407
-		    }),
408
-		    fail: (res => {
382
+		    },
383
+		    fail: (res) => {
409
 		      console.log(res)
384
 		      console.log(res)
410
-		    })
385
+		    },
411
 		  })
386
 		  })
412
-	  } else {
387
+	  }
388
+    else {
413
 		  uni.navigateTo({
389
 		  uni.navigateTo({
414
-		  	url: '/pages/user/login/index?key=3'
390
+		  	url: '/pages/user/login/index?key=3',
415
 		  })
391
 		  })
416
 		  userStore.setUserInfo(null)
392
 		  userStore.setUserInfo(null)
417
 	  }
393
 	  }
@@ -420,57 +396,64 @@ function handleToContact(item) {
420
 
396
 
421
 function handleShowMyProfile() {
397
 function handleShowMyProfile() {
422
   uni.navigateTo({
398
   uni.navigateTo({
423
-    url: '/pages/my-profile/index'
399
+    url: '/pages/my-profile/index',
424
   })
400
   })
425
 }
401
 }
426
 
402
 
427
 function handleShowMyRulePage() {
403
 function handleShowMyRulePage() {
428
   uni.navigateTo({
404
   uni.navigateTo({
429
-    url: `/pages/my-rules/index`
405
+    url: '/pages/my-rules/index',
430
   })
406
   })
431
 }
407
 }
432
 </script>
408
 </script>
409
+
433
 <template>
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
     <div class="flex flex-col gap-4 relative px-3 pb-safe">
413
     <div class="flex flex-col gap-4 relative px-3 pb-safe">
437
       <div class="pt-15 ">
414
       <div class="pt-15 ">
438
         <div class="flex gap-2 mb-2 text-white mb-6">
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
           <div class="flex flex-col">
424
           <div class="flex flex-col">
444
             <div class="flex">
425
             <div class="flex">
445
               <div class="text-sm">
426
               <div class="text-sm">
446
-                <div class="text-sm" v-if="userStore.userInfo">
427
+                <div v-if="userStore.userInfo" class="text-sm">
447
                   {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
428
                   {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
448
                 </div>
429
                 </div>
449
               </div>
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
                 {{ encodePhone(userStore.userInfo.phone) }}
432
                 {{ encodePhone(userStore.userInfo.phone) }}
452
               </div>
433
               </div>
453
             </div>
434
             </div>
454
             <div class="btm flex gap-1 ">
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
               </div>
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
               </div>
446
               </div>
464
               <!-- 股东 -->
447
               <!-- 股东 -->
465
               <div v-if="AlholderType" class="flex rounded-full  text-[12px] text-white w-12 h-5   w-fit">
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
               </div>
450
               </div>
468
             </div>
451
             </div>
469
           </div>
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
             <div class="box_2 flex-row">
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
               </div>
457
               </div>
475
               <div class="group_2 flex-col lolr ">
458
               <div class="group_2 flex-col lolr ">
476
                 <div class="div_box pong1 ">
459
                 <div class="div_box pong1 ">
@@ -489,111 +472,132 @@ function handleShowMyRulePage() {
489
                   </div>
472
                   </div>
490
                   <div class="block_1 flex-col blue_2 height2 ">
473
                   <div class="block_1 flex-col blue_2 height2 ">
491
                     <div class="text-group_4 flex-col justify-between">
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
                     </div>
481
                     </div>
495
                   </div>
482
                   </div>
496
                 </div>
483
                 </div>
497
               </div>
484
               </div>
498
             </div>
485
             </div>
499
-            <div @click="onCancel" class="off_1">
486
+            <div class="off_1" @click="onCancel">
500
               <image lazy-load class="off_2" src="../../static/img-hy/关闭.png" />
487
               <image lazy-load class="off_2" src="../../static/img-hy/关闭.png" />
501
             </div>
488
             </div>
502
           </FPopup>
489
           </FPopup>
503
-
504
         </div>
490
         </div>
505
         <div v-if="state.isLogin" style="border-radius: 16rpx;" class="bg-white flex flex-col gap-6 py-4 text-xl">
491
         <div v-if="state.isLogin" style="border-radius: 16rpx;" class="bg-white flex flex-col gap-6 py-4 text-xl">
506
           <div v-if="userStore.userInfo" class="flex ">
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
               <div>{{ userStore.yanglao.all_yanglao }}</div>
497
               <div>{{ userStore.yanglao.all_yanglao }}</div>
510
             </div>
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
               <div>{{ agentInfo.brokerage_price }}</div>
503
               <div>{{ agentInfo.brokerage_price }}</div>
514
             </div>
504
             </div>
515
           </div>
505
           </div>
516
           <div v-if="userStore.userInfo" class="flex">
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
               <div>{{ userStore.userInfo.score }}</div>
511
               <div>{{ userStore.userInfo.score }}</div>
520
             </div>
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
               <div>{{ userStore.userInfo.member_brokerage_price }}</div>
518
               <div>{{ userStore.userInfo.member_brokerage_price }}</div>
525
             </div>
519
             </div>
526
-            <div class="icon_d"></div>
520
+            <div class="icon_d" />
527
             <div class="w-1/3 flex flex-col  justify-center" style="padding-left: 48rpx;">
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
               <div>{{ userStore.userInfo.team_number }}</div>
525
               <div>{{ userStore.userInfo.team_number }}</div>
530
             </div>
526
             </div>
531
           </div>
527
           </div>
532
-
533
         </div>
528
         </div>
534
-
535
       </div>
529
       </div>
536
 
530
 
537
       <div class="bg-white rounded px-3 text-sm">
531
       <div class="bg-white rounded px-3 text-sm">
538
         <div class="flex justify-between pt-4 mb-4">
532
         <div class="flex justify-between pt-4 mb-4">
539
           <div>我的订单</div>
533
           <div>我的订单</div>
540
           <div class="flex items-center">
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
             </div>
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
           </div>
539
           </div>
545
-
546
-
547
         </div>
540
         </div>
548
         <div class="flex pb-4">
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
             <div class="relative">
546
             <div class="relative">
552
               <div
547
               <div
548
+                v-if="item.id == 'noPay' && orderQuantity && orderQuantity.noPay != '0'"
553
                 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"
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
                 {{ orderQuantity.noPay }}
551
                 {{ orderQuantity.noPay }}
556
               </div>
552
               </div>
557
               <div
553
               <div
554
+                v-if="item.id == 'refund' && orderQuantity && orderQuantity.refund != '0'"
558
                 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"
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
                 {{ orderQuantity.refund }}
557
                 {{ orderQuantity.refund }}
561
               </div>
558
               </div>
562
               <div
559
               <div
560
+                v-if="item.id == 'noDeliver' && orderQuantity && orderQuantity.noDeliver != '0'"
563
                 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"
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
                 {{ orderQuantity.noDeliver }}
563
                 {{ orderQuantity.noDeliver }}
566
               </div>
564
               </div>
567
               <div
565
               <div
566
+                v-if="item.id == 'noPostage' && orderQuantity && orderQuantity.noPostage != '0'"
568
                 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"
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
                 {{ orderQuantity.noPostage }}
569
                 {{ orderQuantity.noPostage }}
571
               </div>
570
               </div>
572
               <div
571
               <div
572
+                v-if="item.id == 'noComment' && orderQuantity && orderQuantity.noComment != '0'"
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"
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
                 {{ orderQuantity.noComment }}
575
                 {{ orderQuantity.noComment }}
576
               </div>
576
               </div>
577
               <image :src="item.icon" mode="widthFix" class="w-7 h-7 " />
577
               <image :src="item.icon" mode="widthFix" class="w-7 h-7 " />
578
             </div>
578
             </div>
579
 
579
 
580
-            <div class="text-xs">{{ item.text }}</div>
580
+            <div class="text-xs">
581
+              {{ item.text }}
582
+            </div>
581
           </div>
583
           </div>
582
         </div>
584
         </div>
583
-
584
       </div>
585
       </div>
585
       <div class="bg-white rounded px-3">
586
       <div class="bg-white rounded px-3">
586
         <div class="flex justify-between pt-4 mb-4">
587
         <div class="flex justify-between pt-4 mb-4">
587
           <div>我的服务</div>
588
           <div>我的服务</div>
588
         </div>
589
         </div>
589
         <div class="flex flex-wrap ">
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
             <image :src="item.icon" mode="widthFix" class="w-6 h-6 " />
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
           </div>
599
           </div>
595
         </div>
600
         </div>
596
-
597
       </div>
601
       </div>
598
 
602
 
599
       <div class="bg-white rounded px-3">
603
       <div class="bg-white rounded px-3">
@@ -601,20 +605,23 @@ function handleShowMyRulePage() {
601
           <div>联系我们</div>
605
           <div>联系我们</div>
602
         </div>
606
         </div>
603
         <div class="flex flex-wrap ">
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
             <image :src="item.icon" mode="widthFix" class="w-6 h-6 " />
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
           </div>
616
           </div>
609
         </div>
617
         </div>
610
-
611
       </div>
618
       </div>
612
-
613
     </div>
619
     </div>
614
   </div>
620
   </div>
615
 
621
 
616
-  <!--  <CXBAuthorize v-else/>-->
622
+  <!--  <CXBAuthorize v-else/> -->
617
 </template>
623
 </template>
624
+
618
 <style>
625
 <style>
619
 page {
626
 page {
620
   background-color: #f8f8f8;
627
   background-color: #f8f8f8;
@@ -727,13 +734,13 @@ page {
727
   top: 447rpx
734
   top: 447rpx
728
 }
735
 }
729
 
736
 
730
-
731
 .icon_d {
737
 .icon_d {
732
   width: 1rpx;
738
   width: 1rpx;
733
   height: 40rpx;
739
   height: 40rpx;
734
   background: #D8D8D8;
740
   background: #D8D8D8;
735
 }
741
 }
736
 </style>
742
 </style>
743
+
737
 <route lang="yaml">
744
 <route lang="yaml">
738
 style:
745
 style:
739
   navigationStyle: custom
746
   navigationStyle: custom

+ 175 - 169
src/pages/user/login/index.vue

@@ -1,11 +1,12 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import {getUserUnionId, wechatCheck} from "~/apis/user";
3
-import CXBBanner from "~/components/CXBBanner/CXBBanner.vue";
4
-import CXBPhoneLoginButton from "~/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue";
5
-import CXBNotLoginButton from "~/components/CXBNotLoginButton/CXBNotLoginButton.vue";
6
-import {useUserStore} from "~/stores/userStore";
7
-import FNavBar from "~/components/FNavBar/FNavBar.vue";
8
-import Cache from "~/utils/cache";
2
+import { getUserUnionId, wechatCheck } from '~/apis/user'
3
+import CXBBanner from '~/components/CXBBanner/CXBBanner.vue'
4
+import CXBPhoneLoginButton from '~/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue'
5
+import CXBNotLoginButton from '~/components/CXBNotLoginButton/CXBNotLoginButton.vue'
6
+import { useUserStore } from '~/stores/userStore'
7
+import FNavBar from '~/components/FNavBar/FNavBar.vue'
8
+import Cache from '~/utils/cache'
9
+
9
 // usePageStore.setPageConfig({
10
 // usePageStore.setPageConfig({
10
 //   currentPage: {
11
 //   currentPage: {
11
 //     type: 'tab',
12
 //     type: 'tab',
@@ -18,13 +19,12 @@ const state = reactive({
18
   qrcode: '',
19
   qrcode: '',
19
   uid: '',
20
   uid: '',
20
   key: '',
21
   key: '',
21
-  isShow: false
22
+  isShow: false,
22
 })
23
 })
23
 onLoad((option: any) => {
24
 onLoad((option: any) => {
24
   state.qrcode = option.type
25
   state.qrcode = option.type
25
   state.uid = option.uid
26
   state.uid = option.uid
26
   state.key = option.key
27
   state.key = option.key
27
-
28
 })
28
 })
29
 
29
 
30
 function getPhoneNumber(e) {
30
 function getPhoneNumber(e) {
@@ -33,10 +33,10 @@ function getPhoneNumber(e) {
33
   if (!state.isShow) {
33
   if (!state.isShow) {
34
   	return 	uni.showToast({
34
   	return 	uni.showToast({
35
   				title: '请阅读并勾选隐私协议',
35
   				title: '请阅读并勾选隐私协议',
36
-  				icon: 'none'
36
+  				icon: 'none',
37
   			})
37
   			})
38
   }
38
   }
39
-  
39
+
40
   if (e.detail.errMsg === 'getPhoneNumber:ok') {
40
   if (e.detail.errMsg === 'getPhoneNumber:ok') {
41
 
41
 
42
   }
42
   }
@@ -44,136 +44,132 @@ function getPhoneNumber(e) {
44
 
44
 
45
 function handleViewXieyi(type: number) {
45
 function handleViewXieyi(type: number) {
46
   uni.navigateTo({
46
   uni.navigateTo({
47
-    url: `/pages/user/login/user-agreement?type=${type}`
47
+    url: `/pages/user/login/user-agreement?type=${type}`,
48
   })
48
   })
49
 }
49
 }
50
 
50
 
51
 async function handleWexinLogin() {
51
 async function handleWexinLogin() {
52
-	
53
-	if (!state.isShow) {
54
-		return 	uni.showToast({
55
-					title: '请阅读并勾选隐私协议',
56
-					icon: 'none'
57
-				})
58
-	}
59
-	
52
+  if (!state.isShow) {
53
+    return 	uni.showToast({
54
+      title: '请阅读并勾选隐私协议',
55
+      icon: 'none',
56
+    })
57
+  }
58
+
60
   await uni.showLoading({
59
   await uni.showLoading({
61
-    title: '登录中'
62
-  });
60
+    title: '登录中',
61
+  })
63
   uni.login({
62
   uni.login({
64
     provider: 'weixin',
63
     provider: 'weixin',
65
     univerifyStyle: {
64
     univerifyStyle: {
66
-      fullScreen: true
65
+      fullScreen: true,
67
     },
66
     },
68
-    success: result => {
67
+    success: (result) => {
69
       // console.log(result)
68
       // console.log(result)
70
       getUserUnionId({
69
       getUserUnionId({
71
         code: result.code,
70
         code: result.code,
72
-        source: 'cxb'
73
-      }).then(unionRes => {
74
-        console.log(111111,unionRes)
71
+        source: 'cxb',
72
+      }).then((unionRes) => {
73
+        console.log(111111, unionRes)
75
         // const shareId = Cache.get('SHARE_ID')
74
         // const shareId = Cache.get('SHARE_ID')
76
-        //存储openid
75
+        // 存储openid
77
         // userStore.setOpenid(unionRes.openid)
76
         // userStore.setOpenid(unionRes.openid)
78
-        let redirectPageObj: {page: string, type: 'page' | 'tab'}
79
-        if (Cache.get('SHARE_REDIRECT_PAGE')) {
77
+        let redirectPageObj: { page: string; type: 'page' | 'tab' }
78
+        if (Cache.get('SHARE_REDIRECT_PAGE'))
80
           redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
79
           redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
81
-        }
82
 
80
 
83
         // if (shareId) {
81
         // if (shareId) {
84
-          // params.share_id = shareId
85
-          // params = Object.assign({}, params, { shareId })
82
+        // params.share_id = shareId
83
+        // params = Object.assign({}, params, { shareId })
86
         // }
84
         // }
87
-        wechatCheck(unionRes.unionid).then(checkRes => {
88
-          
85
+        wechatCheck(unionRes.unionid).then((checkRes) => {
89
           userStore.login(checkRes.token, checkRes.exp)
86
           userStore.login(checkRes.token, checkRes.exp)
90
           userStore.setUID(checkRes.user.uid)
87
           userStore.setUID(checkRes.user.uid)
91
           userStore.setUserInfo(checkRes.user)
88
           userStore.setUserInfo(checkRes.user)
92
           // console.log(checkRes)
89
           // console.log(checkRes)
93
-          uni.hideLoading();
94
-          console.log('我存在吗111',redirectPageObj);
95
-            uni.showToast({
96
-              title: '登录成功'
97
-            }).then(() => {
98
-              setTimeout(() => {
99
-                console.log('我存在吗222',redirectPageObj);
100
-                
101
-                if (redirectPageObj) {
102
-                  console.log('我存在吗333',redirectPageObj);
103
-                  if (redirectPageObj.type === 'page') {
104
-                    return uni.reLaunch({
105
-                      url: redirectPageObj.page
90
+          uni.hideLoading()
91
+          console.log('我存在吗111', redirectPageObj)
92
+          uni.showToast({
93
+            title: '登录成功',
94
+          }).then(() => {
95
+            setTimeout(() => {
96
+              console.log('我存在吗222', redirectPageObj)
97
+
98
+              if (redirectPageObj) {
99
+                console.log('我存在吗333', redirectPageObj)
100
+                if (redirectPageObj.type === 'page') {
101
+                  return uni.reLaunch({
102
+                    url: redirectPageObj.page,
103
+                  })
104
+                }
105
+                if (redirectPageObj.type === 'tab') {
106
+                  return uni.switchTab({
107
+                    url: redirectPageObj.page,
108
+                  })
109
+                }
110
+              }
111
+              else {
112
+                console.log('我是key>>>aaa', state.key)
113
+
114
+                switch (state.key) {
115
+                  case '10': {
116
+                    uni.switchTab({
117
+                      url: '/pages/user/index',
118
+                    })
119
+                    break
120
+                  }
121
+                  case '4': {
122
+                    uni.navigateBack({
123
+                      delta: 1,
124
+                    })
125
+                    break
126
+                  }
127
+                  case '1': {
128
+                    uni.switchTab({
129
+                      url: '/pages/order_addcart/index',
130
+                    })
131
+                    break
132
+                  }
133
+                  case undefined: {
134
+                    uni.switchTab({
135
+                      url: '/pages/user/index',
106
                     })
136
                     })
137
+                    break
107
                   }
138
                   }
108
-                   if (redirectPageObj.type === 'tab') {
109
-                    return uni.switchTab({
110
-                      url: redirectPageObj.page
139
+                  case '30': {
140
+                    uni.switchTab({
141
+                      url: '/pages/home/index',
111
                     })
142
                     })
143
+                    break
112
                   }
144
                   }
113
-                } else {
114
-                  console.log('我是key>>>aaa',state.key);
115
-                  
116
-                  switch (state.key) {
117
-                    case '10': {
118
-                      uni.switchTab({
119
-                        url: '/pages/user/index'
120
-                      })
121
-                      break;
122
-                    }
123
-                    case '4': {
124
-                      uni.navigateBack({
125
-                        delta: 1
126
-                      })
127
-                      break;
128
-                    }
129
-                    case '1': {
130
-                      uni.switchTab({
131
-                        url: '/pages/order_addcart/index'
132
-                      })
133
-                      break;
134
-                    }
135
-                    case undefined: {
136
-                      uni.switchTab({
137
-                        url: '/pages/user/index'
138
-                      })
139
-                      break;
140
-                    }
141
-                    case '30': {
142
-                      uni.switchTab({
143
-                        url: '/pages/home/index'
144
-                      })
145
-                      break;
146
-                    }
147
-                    default: {
148
-                      uni.switchTab({
149
-                        url: '/pages/home/index'
150
-                      })
151
-                    }
145
+                  default: {
146
+                    uni.switchTab({
147
+                      url: '/pages/home/index',
148
+                    })
152
                   }
149
                   }
153
                 }
150
                 }
154
-              }, 100);
155
-
156
-
157
-            })
158
-        }).catch(err => {
159
-          uni.hideLoading();
151
+              }
152
+            }, 100)
153
+          })
154
+        }).catch((err) => {
155
+          uni.hideLoading()
160
 
156
 
161
           console.log(err)
157
           console.log(err)
162
           if (err === '请绑定手机号') {
158
           if (err === '请绑定手机号') {
163
             uni.showToast({
159
             uni.showToast({
164
               title: err,
160
               title: err,
165
-              icon: 'none'
161
+              icon: 'none',
166
             })
162
             })
167
 
163
 
168
             setTimeout(() => {
164
             setTimeout(() => {
169
               uni.navigateTo({
165
               uni.navigateTo({
170
-                url: `/pages/user/login/bind-phone?type=1&third_user_id=${unionRes.unionid}&key=0`
166
+                url: `/pages/user/login/bind-phone?type=1&third_user_id=${unionRes.unionid}&key=0`,
171
               })
167
               })
172
             }, 1000)
168
             }, 1000)
173
           }
169
           }
174
         })
170
         })
175
       })
171
       })
176
-    }
172
+    },
177
   })
173
   })
178
   // 换取Code
174
   // 换取Code
179
 }
175
 }
@@ -184,14 +180,16 @@ function onClickLeft() {
184
   if (pageStore && pageStore.currentPage) {
180
   if (pageStore && pageStore.currentPage) {
185
     if (pageStore.currentPage.type === 'tab') {
181
     if (pageStore.currentPage.type === 'tab') {
186
       uni.switchTab({
182
       uni.switchTab({
187
-        url: pageStore.currentPage.url
183
+        url: pageStore.currentPage.url,
188
       })
184
       })
189
-    } else {
185
+    }
186
+    else {
190
       uni.navigateTo({
187
       uni.navigateTo({
191
-        url: pageStore.currentPage.url
188
+        url: pageStore.currentPage.url,
192
       })
189
       })
193
     }
190
     }
194
-  } else {
191
+  }
192
+  else {
195
     uni.navigateBack()
193
     uni.navigateBack()
196
   }
194
   }
197
   // uni.showModal({
195
   // uni.showModal({
@@ -203,96 +201,97 @@ function onClickLeft() {
203
   //     }
201
   //     }
204
   //   },
202
   //   },
205
   // })
203
   // })
206
-
207
 }
204
 }
208
 
205
 
209
 function gou() {
206
 function gou() {
210
-	state.isShow = !state.isShow
207
+  state.isShow = !state.isShow
211
 }
208
 }
212
 
209
 
213
 function otherPhoneLogin() {
210
 function otherPhoneLogin() {
214
-	
215
-	if (!state.isShow) {
216
-		return 	uni.showToast({
217
-					title: '请阅读并勾选隐私协议',
218
-					icon: 'none'
219
-				})
220
-	}
221
-	
222
-	uni.navigateTo({
223
-		url: '/pages/user/login/other-phone'
224
-	})
211
+  if (!state.isShow) {
212
+    return 	uni.showToast({
213
+      title: '请阅读并勾选隐私协议',
214
+      icon: 'none',
215
+    })
216
+  }
217
+
218
+  uni.navigateTo({
219
+    url: '/pages/user/login/other-phone',
220
+  })
225
 }
221
 }
226
 
222
 
227
 function phoneQuicklyLogin() {
223
 function phoneQuicklyLogin() {
228
-	if (!state.isShow) {
229
-		return 	uni.showToast({
230
-					title: '请阅读并勾选隐私协议',
231
-					icon: 'none'
232
-				})
233
-	}
224
+  if (!state.isShow) {
225
+    return 	uni.showToast({
226
+      title: '请阅读并勾选隐私协议',
227
+      icon: 'none',
228
+    })
229
+  }
234
 }
230
 }
235
-
236
 </script>
231
 </script>
232
+
237
 <template>
233
 <template>
238
   <div>
234
   <div>
239
     <FNavBar
235
     <FNavBar
240
-        title="" :left-arrow="true" fixed placeholder z-index="999"
241
-        ex-class="bg-white w-screen"
242
-        @click-left="onClickLeft"
236
+      title="" :left-arrow="true" fixed placeholder z-index="999"
237
+      ex-class="bg-white w-screen"
238
+      @click-left="onClickLeft"
243
     />
239
     />
244
 
240
 
245
-
246
-    <CXBBanner/>
241
+    <CXBBanner />
247
 
242
 
248
     <div class="px-3 flex flex-col gap-3">
243
     <div class="px-3 flex flex-col gap-3">
249
-      <div class="bg-primary text-white rounded-md py-3 gap-2 flex justify-center items-center"
250
-           @tap="handleWexinLogin"
244
+      <div
245
+        class="bg-primary text-white rounded-md py-3 gap-2 flex justify-center items-center"
246
+        @tap="handleWexinLogin"
251
       >
247
       >
252
-<!--        <image-->
253
-<!--            src="https://test.bjtdba.com/applet/static/home/22fbc30945610a32c3b048fb1704b1e.png" mode="widthFix"-->
254
-<!--            class="w-8 h-8"-->
255
-<!--        ></image>-->
248
+        <!--        <image -->
249
+        <!--            src="https://test.bjtdba.com/applet/static/home/22fbc30945610a32c3b048fb1704b1e.png" mode="widthFix" -->
250
+        <!--            class="w-8 h-8" -->
251
+        <!--        ></image> -->
256
         <div>一键登录</div>
252
         <div>一键登录</div>
257
       </div>
253
       </div>
258
 
254
 
259
-      
260
-	  <div v-if="state.isShow">
261
-		<CXBPhoneLoginButton :text="'手机号快捷登录'"/>
262
-	  </div>
263
-	  <div v-else>
264
-	  	<div
265
-	  	  class="bg-white border border-solid border-1 border-gray-300 rounded-md py-3 gap-2 flex justify-center items-center" @click="phoneQuicklyLogin">
266
-	  	  <image src="https://test.bjtdba.com/applet/static/home/4879edf0b6e2b0ad29fa7d4053d676b.png" mode="widthFix"
267
-	  	    class="w-4 h-4"></image>
268
-	  	  <button>手机号快捷登录</button>
269
-	  	</div>
270
-	  </div> 
271
-    
272
-	<div class="bg-white rounded-md py-3 gap-2 flex justify-center items-center text-sm" @click="otherPhoneLogin" >其他手机号登录</div>
273
-      
255
+      <div v-if="state.isShow">
256
+        <CXBPhoneLoginButton text="手机号快捷登录" />
257
+      </div>
258
+      <div v-else>
259
+        <div
260
+          class="bg-white border border-solid border-1 border-gray-300 rounded-md py-3 gap-2 flex justify-center items-center" @click="phoneQuicklyLogin"
261
+        >
262
+          <image
263
+            src="https://test.bjtdba.com/applet/static/home/4879edf0b6e2b0ad29fa7d4053d676b.png" mode="widthFix"
264
+            class="w-4 h-4"
265
+          />
266
+          <button>手机号快捷登录</button>
267
+        </div>
268
+      </div>
269
+
270
+      <div class="bg-white rounded-md py-3 gap-2 flex justify-center items-center text-sm" @click="otherPhoneLogin">
271
+        其他手机号登录
272
+      </div>
274
     </div>
273
     </div>
275
-	
276
-	<div class="bg-white rounded-md py-3 gap-2 flex justify-center items-center text-sm" @click="onClickLeft">
277
-	  <div>暂不登录</div>
278
-	</div>
279
-	<CXBNotLoginButton :key="state.key"/>
280
-	<view class="bottom-index flex flex-row justify-center items-center">
281
-		<view class="bottom-index-in mr-2">
282
-			<image src="https://cdn.bjtdba.com/vod/image/2024-02-29/20240229180900986.png"  style="width: 28rpx; height: 28rpx;" v-if="state.isShow"
283
-					@click="gou" mode="widthFix"></image>
284
-			<image src="https://cdn.bjtdba.com/vod/image/2024-02-29/20240229180930865.png"  style="width: 28rpx; height: 28rpx;" v-else
285
-				@click="gou" mode="widthFix"></image>
286
-		</view>
287
-		<view class="bottom-index-ri text-xs">
288
-			<span class="text-xs">我已经阅读并同意</span>
289
-				<span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span
290
-	     class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>
291
-		</view>
292
-	
293
-	</view>
294
-  </div>
295
 
274
 
275
+    <div class="bg-white rounded-md py-3 gap-2 flex justify-center items-center text-sm" @click="onClickLeft">
276
+      <div>暂不登录</div>
277
+    </div>
278
+    <CXBNotLoginButton :key="state.key" />
279
+    <view class="bottom-index flex flex-row justify-center items-center">
280
+      <view class="bottom-index-in mr-2" @click="gou">
281
+        <image
282
+          v-if="state.isShow" src="https://cdn.bjtdba.com/vod/image/2024-02-29/20240229180900986.png" style="width: 28rpx; height: 28rpx;"
283
+          mode="widthFix"
284
+        />
285
+        <image v-else src="https://cdn.bjtdba.com/vod/image/2024-02-29/20240229180930865.png" style="width: 28rpx; height: 28rpx;" mode="widthFix" />
286
+      </view>
287
+      <view class="bottom-index-ri text-xs">
288
+        <span class="text-xs" @click="gou">我已经阅读并同意</span>
289
+        <span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span
290
+          class="text-red text-xs" @click="handleViewXieyi(1)"
291
+        >《隐私协议》</span>
292
+      </view>
293
+    </view>
294
+  </div>
296
 </template>
295
 </template>
297
 
296
 
298
 <route lang="yaml">
297
 <route lang="yaml">
@@ -300,6 +299,7 @@ style:
300
   enablePullDownRefresh: false
299
   enablePullDownRefresh: false
301
   navigationStyle: custom
300
   navigationStyle: custom
302
 </route>
301
 </route>
302
+
303
 <style>
303
 <style>
304
 button {
304
 button {
305
   margin: 0;
305
   margin: 0;
@@ -312,6 +312,12 @@ button {
312
 
312
 
313
 .bottom-index-in {
313
 .bottom-index-in {
314
 	margin-top: 2rpx;
314
 	margin-top: 2rpx;
315
+	width: 100rpx;
316
+	height: 100rpx;
317
+
318
+	display: flex;
319
+	justify-content: flex-end;
320
+	align-items: center;
315
 }
321
 }
316
 
322
 
317
 button::after {
323
 button::after {