zs 9 hónapja
szülő
commit
ab32c0b9c7

+ 1 - 1
src/components/custom/custom-layout.vue

@@ -146,7 +146,7 @@ const toHelp = () => {
 }
 // 个人中心
 const toCenter = () => {
-  router.push({ path: `/center` })
+  router.push({ path: `/center/basic` })
 }
 // 消息
 const toChat = () => {

+ 10 - 0
src/views/center/attestation.vue

@@ -49,6 +49,8 @@ import investment from './parts/investment.vue'
 // 接口
 import { RoleStore } from '@/store/api/system/role'
 const roleStore = RoleStore()
+import { UsersStore } from '@/store/api/user/user'
+const store = UsersStore()
 import { DictDataStore } from '@/store/api/system/dictData'
 import { RegionStore } from '@/store/api/system/region'
 const dictDataStore = DictDataStore()
@@ -73,6 +75,7 @@ const contributionList = ref([])
 // 请求
 onMounted(async () => {
   loading.value = true
+  await search()
   await searchOther()
   loading.value = false
 })
@@ -125,6 +128,13 @@ const searchOther = async () => {
   result = await regionStore.area({ level: 'province', code: 22 })
   if ($checkRes(result)) cityList.value = result.data
 }
+const search = async () => {
+  if (user.value.id) {
+    let res = await store.detail(user.value.id)
+    if (res.errcode == '0') userStore.setUser(res.data)
+  }
+}
+
 // provide
 provide('cloneDeep', cloneDeep)
 // 字典