🎈 perf(优化):
This commit is contained in:
@@ -7,6 +7,7 @@ import { GetShortCodeApi } from '@/api/share'
|
||||
import { alert } from '@/common/common'
|
||||
import { LoginApi } from '@/api/login'
|
||||
import { IMG_CND_Prefix } from '@/common/constant'
|
||||
import { formatImgUrl } from '@/common/fotmat'
|
||||
|
||||
export default () => {
|
||||
const { setUserInfo, setAdminUserInfo, setSortCode, userInfo } = useUserInfo()
|
||||
@@ -31,6 +32,7 @@ export default () => {
|
||||
const { fetchData: useFetchData } = GetAdminUserInfoApi()
|
||||
const getAdminUserInfo = async () => {
|
||||
let res = await useFetchData()
|
||||
res.data.avatar_url = res.data.avatar_url ? res.data.avatar_url : formatImgUrl('/user/avatar.png')
|
||||
setAdminUserInfo({ ...res.data })
|
||||
getShortCode(res.data.user_id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user