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