提示词保存
This commit is contained in:
@@ -106,8 +106,6 @@ export function useUserInfo(options = {}) {
|
||||
// code 为 0 或 200 表示成功
|
||||
if (response.data.code === 0 || response.data.code === 200) {
|
||||
data = response.data.data || response.data
|
||||
} else {
|
||||
throw new Error(response.data.msg || response.data.message || '获取用户信息失败')
|
||||
}
|
||||
} else {
|
||||
// 没有 code 字段,直接使用 data
|
||||
@@ -118,8 +116,6 @@ export function useUserInfo(options = {}) {
|
||||
if (data) {
|
||||
userInfo.value = data
|
||||
return data
|
||||
} else {
|
||||
throw new Error('获取用户信息失败:响应数据为空')
|
||||
}
|
||||
} catch (err) {
|
||||
error.value = err
|
||||
|
||||
Reference in New Issue
Block a user