|
@@ -222,14 +222,15 @@ const selectUser2 = (uid) => {
|
|
const requestUser = () => {
|
|
const requestUser = () => {
|
|
axios.get(`https://pbl.cocorobo.cn/api/pbl/selectUser?userid=${uid}`)
|
|
axios.get(`https://pbl.cocorobo.cn/api/pbl/selectUser?userid=${uid}`)
|
|
.then(res => {
|
|
.then(res => {
|
|
- if (res && res.value && res.value.length && res.value[0].length && res.value[0][0].userid) {
|
|
|
|
- // 拉取成功,存储用户信息
|
|
|
|
- isShow.value = false;
|
|
|
|
- topUserInfo.value = res.value[0][0];
|
|
|
|
- store.setUserInfo(res.value[0][0]);
|
|
|
|
- } else {
|
|
|
|
- requestUser();
|
|
|
|
- }
|
|
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res && res.data && res.data.length && res.data[0].length && res.data[0][0].userid) {
|
|
|
|
+ // 拉取成功,存储用户信息
|
|
|
|
+ isShow.value = false;
|
|
|
|
+ topUserInfo.value = res.data[0][0];
|
|
|
|
+ store.setUserInfo(res.data[0][0]);
|
|
|
|
+ } else {
|
|
|
|
+ requestUser();
|
|
|
|
+ }
|
|
})
|
|
})
|
|
};
|
|
};
|
|
|
|
|