个人信息接口替换

This commit is contained in:
落日晚风
2023-11-03 18:04:17 +08:00
parent f4c1b30f2e
commit cfa35b2c6f
3 changed files with 15 additions and 4 deletions

View File

@@ -44,8 +44,8 @@ const user = defineStore({
actions: {
// 获取个人信息
async getInfo() {
const { error, data } = await userApi.profile();
if (error !== 0) return;
const { code, data } = await userApi.profile();
if (code !== 0) return;
this.userInfo = data;
return Promise.resolve(data);