dxz1228 лет назад: 2
Родитель
Сommit
7ab8b24334
2 измененных файлов с 47 добавлено и 25 удалено
  1. 15 2
      src/pages/my-rules/index.vue
  2. 32 23
      src/pages/user/index.vue

+ 15 - 2
src/pages/my-rules/index.vue

@@ -19,6 +19,7 @@ const ruleDetail = ref<{
19
 const currentType = ref<any>([])
19
 const currentType = ref<any>([])
20
 
20
 
21
 const showUpgradeInfo = ref(false)
21
 const showUpgradeInfo = ref(false)
22
+
22
 // const userType = computed(() => {
23
 // const userType = computed(() => {
23
 //   const userRichType = userStore.userInfo?.user_rich_type
24
 //   const userRichType = userStore.userInfo?.user_rich_type
24
 //   // console.log(userStore.userInfo)
25
 //   // console.log(userStore.userInfo)
@@ -127,7 +128,7 @@ const showUpgradeInfo = ref(false)
127
 //0:普通用户 1:会员  3:创始人 4:高级会员  8合伙人 9联合创始人
128
 //0:普通用户 1:会员  3:创始人 4:高级会员  8合伙人 9联合创始人
128
 const userType = computed(() => {
129
 const userType = computed(() => {
129
   const userRichType = userStore.userInfo?.user_rich_type
130
   const userRichType = userStore.userInfo?.user_rich_type
130
-  console.log('我是大哥',userStore.userInfo)
131
+  // console.log('我是大哥',userStore.userInfo)
131
   const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
132
   const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
132
   // console.log('我是帮扶',bangfu);
133
   // console.log('我是帮扶',bangfu);
133
   
134
   
@@ -293,9 +294,21 @@ onShow(() => {
293
 })
294
 })
294
 
295
 
295
 function handleUserUpgrade() {
296
 function handleUserUpgrade() {
296
-  if (ruleId.value < 21) {
297
+  console.log('ruleid',ruleId.value);
298
+  
299
+  if (ruleId.value < 20) {
297
     const id = ruleId.value + 1
300
     const id = ruleId.value + 1
298
     getRules(id).then(res => {
301
     getRules(id).then(res => {
302
+      console.log(res);
303
+      
304
+      ruleDetail.value = res
305
+      showUpgradeInfo.value = true
306
+    })
307
+  }else if(ruleId.value = 20){
308
+    const id = ruleId.value + 4
309
+    getRules(id).then(res => {
310
+      console.log(res);
311
+      
299
       ruleDetail.value = res
312
       ruleDetail.value = res
300
       showUpgradeInfo.value = true
313
       showUpgradeInfo.value = true
301
     })
314
     })

+ 32 - 23
src/pages/user/index.vue

@@ -291,18 +291,21 @@ const AlholderType = computed(() => {
291
 })
291
 })
292
 // '':普通用户 district-区/县代 city-市代',
292
 // '':普通用户 district-区/县代 city-市代',
293
 const areaType = computed(() => {
293
 const areaType = computed(() => {
294
-  const areamanage = userStore.userInfo?.area_manage_type
295
-  // 县/区代理
296
-  if (areamanage == 'district') {
297
-    return ['../../static/img-hy/district.png']
298
-  }
299
-  // 市代理
300
-  if (areamanage == 'city') {
301
-    return ['../../static/img-hy/city.png']
302
-  }
303
-  //普通用户
304
-  if (!areamanage) {
305
-    return ['']
294
+  if (userStore.userInfo?.area_manage_type) {
295
+    const areamanage = userStore.userInfo?.area_manage_type
296
+    // 县/区代理
297
+    if (areamanage == 'district') {
298
+      return ['../../static/img-hy/district.png']
299
+    }
300
+    // 市代理
301
+    if (areamanage == 'city') {
302
+      return ['../../static/img-hy/city.png']
303
+    }
304
+    //普通用户
305
+    if (!areamanage) {
306
+      return ['']
307
+    }
308
+
306
   }
309
   }
307
 
310
 
308
 })
311
 })
@@ -319,20 +322,26 @@ const onCancel = () => {
319
 
322
 
320
 //计算市区县展示图片
323
 //计算市区县展示图片
321
 const backImg = computed(() => {
324
 const backImg = computed(() => {
322
-  const areamanage = userStore.userInfo?.area_manage.type
323
-  // 县/区代理
324
-  if (areamanage == 'district') {
325
-    return ['../../static/dl/xqdl.png']
326
-  }
327
-  // 市代理
328
-  if (areamanage == 'city') {
329
-    return ['../../static/dl/city.png']
325
+  if (userStore.userInfo?.area_manage_type) {
326
+    const areamanage = userStore.userInfo?.area_manage_type
327
+    // 县/区代理
328
+    if (areamanage == 'district') {
329
+      return ['../../static/dl/xqdl.png']
330
+    }
331
+    // 市代理
332
+    if (areamanage == 'city') {
333
+      return ['../../static/dl/city.png']
334
+    }
330
   }
335
   }
336
+
331
 })
337
 })
332
 const textType = computed(() => {
338
 const textType = computed(() => {
333
-  const areamanage = userStore.userInfo?.area_manage.area_name
334
-  let res = areamanage.join("");
335
-  return res
339
+  if (userStore.userInfo?.area_manage?.area_name) {
340
+    const areamanage = userStore.userInfo?.area_manage.area_name
341
+    let res = areamanage.join("");
342
+    return res
343
+  }
344
+
336
 })
345
 })
337
 
346
 
338
 
347