添加代码

This commit is contained in:
何江明
2025-05-30 18:44:14 +08:00
parent a2c87e47bf
commit 0515e9d48c
250 changed files with 7739 additions and 1102 deletions
+12 -2
View File
@@ -70,7 +70,8 @@
</template>
<script>
import { getStorageFun,USER_DATA,clear } from '@/utils/auth.js'
import { getStorageFun,USER_DATA,clear } from '@/utils/auth.js';
import { getUserInfo } from '@/api/auth.js';
import Header from '@/components/header.vue';
export default {
@@ -81,9 +82,18 @@
};
},
onShow() {
this.userData = getStorageFun(USER_DATA);
// this.userData = getStorageFun(USER_DATA);
this.getUserInfo();
},
methods:{
// 查询用户等级
async getUserInfo(){
const result = await getUserInfo();
if(result && result.bizcode === 100){
const data = result.data;
this.userData = result.data || {};
}
},
// 退出登录
loginOutFun(){
clear();