添加代码

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
@@ -1,6 +1,7 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_auth = require("../../utils/auth.js");
const api_auth = require("../../api/auth.js");
const Header = () => "../../components/header.js";
const _sfc_main = {
components: { Header },
@@ -11,9 +12,17 @@ const _sfc_main = {
};
},
onShow() {
this.userData = utils_auth.getStorageFun(utils_auth.USER_DATA);
this.getUserInfo();
},
methods: {
// 查询用户等级
async getUserInfo() {
const result = await api_auth.getUserInfo();
if (result && result.bizcode === 100) {
result.data;
this.userData = result.data || {};
}
},
// 退出登录
loginOutFun() {
utils_auth.clear();