瀏覽代碼

个人用户新注册账号用户名展示注册手机号

Xiao_123 9 月之前
父節點
當前提交
618fcb141d

+ 1 - 1
src/hooks/web/useIM.js

@@ -161,7 +161,7 @@ async function getKey () {
   const userStore = useUserStore()
   const loginType = useLoginType()
   const keyQuery = {
-    userId: userStore.userInfo.id
+    userId: userStore.accountInfo.userId
   }
   if (loginType.loginType === 'enterprise') {
     Object.assign(keyQuery, { enterpriseId: userStore.baseInfo.enterpriseId })

+ 2 - 1
src/layout/personal/navBar.vue

@@ -46,7 +46,7 @@
                   <v-avatar>
                     <v-img alt="John" :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)"></v-img>
                   </v-avatar>
-                  <div class="ml-3">{{ baseInfo?.name || $t('sys.tourist') }}</div>
+                  <div class="ml-3">{{ baseInfo?.name || userInfo.phone }}</div>
                 </div>
               </template>
 
@@ -227,6 +227,7 @@ const items = ref([
 ])
 
 let baseInfo = ref(JSON.parse(localStorage.getItem('baseInfo')) || {}) // 人才信息
+let userInfo = ref(JSON.parse(localStorage.getItem('userInfo')) || {})
 let userAccount = ref(JSON.parse(localStorage.getItem('userAccount')) || {}) // 账户信息
 
 userStore.$subscribe((mutation, state) => {

+ 3 - 1
src/views/recruit/personal/PersonalCenter/dynamic/left.vue

@@ -11,7 +11,7 @@
       </v-badge>
       <div class="ml-5 content">
         <div class="username">
-          <span class="mr-2">{{ baseInfo?.name || $t('sys.tourist') }}</span>
+          <span class="mr-2">{{ baseInfo?.name || userInfo.phone }}</span>
           <!-- <v-icon class="cursor-pointer" style="width: 80px; height: 22px;">
             <v-img width="80" height="22" src="https://minio.citupro.com/dev/menduner/upgrade.png"></v-img>
           </v-icon> -->
@@ -110,8 +110,10 @@ getDict('menduner_job_status').then(({ data }) => {
 })
 
 let baseInfo = ref({})
+let userInfo = ref({})
 const getBasicInfo = () => {
   baseInfo.value = JSON.parse(localStorage.getItem('baseInfo')) // 人才信息
+  userInfo.value = JSON.parse(localStorage.getItem('userInfo')) // 人才信息
   selectVal.value = baseInfo?.value?.jobStatus || '0'
 }
 getBasicInfo()

+ 3 - 1
src/views/recruit/personal/remuse/components/basicInfo.vue

@@ -42,7 +42,7 @@
         </div>
         <!-- 展示 -->
         <div v-else>
-          <span style="font-size: 20px; font-weight: 600;color: var(--color-666);">{{ baseInfo?.name }}</span>
+          <span style="font-size: 20px; font-weight: 600;color: var(--color-666);">{{ baseInfo?.name || userInfo.phone }}</span>
           <div class="mt-3 d-flex">
             <div class="listBox" :style="{ height: isExpand ? 'auto' : '68px' }">
               <div>
@@ -128,10 +128,12 @@ const isExpand = ref(false)
 const overlay = ref(false) // 加载中
 const welfareList = ref(['响应', '改变', '诚信', '进取精神', '信任', '卓越'])
 let baseInfo = ref({})
+let userInfo = ref({})
 const getBasicInfo = () => { // 获取基础信息
   const key = localStorage.getItem('baseInfo')
   if (!key || !Object.keys(key).length) return
   baseInfo.value = JSON.parse(key) // 人才信息
+  userInfo.value = JSON.parse(localStorage.getItem('userInfo'))
 }
 getBasicInfo()