feat: 用户头像路径固定
This commit is contained in:
@@ -7,7 +7,6 @@ import { useUserStore } from '@/stores';
|
|||||||
import { getUserProfilePicture, WECHAT_QRCODE_TYPE } from '@/utils/user.ts';
|
import { getUserProfilePicture, WECHAT_QRCODE_TYPE } from '@/utils/user.ts';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
||||||
const user = computed(() => userStore.userInfo.user || {});
|
const user = computed(() => userStore.userInfo.user || {});
|
||||||
const wechatDialogVisible = ref(false);
|
const wechatDialogVisible = ref(false);
|
||||||
|
|
||||||
@@ -167,9 +166,8 @@ function bindWechat() {
|
|||||||
</span>
|
</span>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!isWechatBound"
|
v-if="!isWechatBound"
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
class="bind-btn"
|
class="bind-btn"
|
||||||
|
type="primary"
|
||||||
@click="handleWechatBind"
|
@click="handleWechatBind"
|
||||||
>
|
>
|
||||||
绑定
|
绑定
|
||||||
|
|||||||
@@ -12,10 +12,9 @@ export function isUserVip(): boolean {
|
|||||||
export function getUserProfilePicture(): string {
|
export function getUserProfilePicture(): string {
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
return userStore.userInfo?.user?.icon
|
return userStore.userInfo?.user?.icon
|
||||||
? `${import.meta.env.VITE_WEB_BASE_API}/file/${userStore.userInfo.user.icon}`
|
? `https://ccnetcore.com/${import.meta.env.VITE_WEB_BASE_API}/file/${userStore.userInfo.user.icon}`
|
||||||
: `/images/user.png`;
|
: `/images/user.png`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 系统头像(可以常量)
|
// 系统头像(可以常量)
|
||||||
export const systemProfilePicture = `/images/logo.png`;
|
export const systemProfilePicture = `/images/logo.png`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user