|
@@ -136,11 +136,7 @@ const getMusic = async () => {
|
|
|
|
|
|
//获取个人信息
|
|
|
const getUserInfo = () => {
|
|
|
- //用户信息
|
|
|
- const myInfo: any = localStorage.getItem('userInfo');
|
|
|
- if (myInfo && props.type != 'home') {
|
|
|
- userInfo.value = JSON.parse(myInfo);
|
|
|
- } else {
|
|
|
+ if (props.type == 'home') {
|
|
|
let params = {};
|
|
|
proxy?.$http.common.getUserInfo(params).then((res: any) => {
|
|
|
//保存信息
|
|
@@ -151,6 +147,9 @@ const getUserInfo = () => {
|
|
|
localStorage.setItem("userInfo", info);
|
|
|
}
|
|
|
});
|
|
|
+ } else {
|
|
|
+ const myInfo: any = localStorage.getItem('userInfo');
|
|
|
+ userInfo.value = JSON.parse(myInfo);
|
|
|
}
|
|
|
};
|
|
|
|