feat:测试

This commit is contained in:
Xwen
2023-12-15 00:56:23 +08:00
parent 3d4368544f
commit 2cca25450e
2 changed files with 3 additions and 3 deletions

View File

@@ -50,14 +50,14 @@ const userInfo = reactive({
role: [],
id: "",
});
const iconUrl = ref("/logo.ico");
const iconUrl = ref("/favicon.ico");
const iconUrlHandler = () => {
if (
userInfo.icon == null ||
userInfo.icon == undefined ||
userInfo.icon == ""
) {
return "/logo.ico";
return "/favicon.ico";
}
return `${import.meta.env.VITE_APP_BASEAPI}/file/${userInfo.icon}`;
};

View File

@@ -45,7 +45,7 @@ const useUserStore = defineStore("user", {
const user = res.user;
const avatar =
user.icon == "" || user.icon == null
? "/logo.ico"
? "/favicon.ico"
: import.meta.env.VITE_APP_BASEAPI + "/file/" + user.icon;
if (res.roleCodes && res.roleCodes.length > 0) {
// 验证返回的roles是否是一个非空数组