提交 9fa0bbe3 编写于 作者: H hxr

fix: 🐛 登录响应数据字段调整

上级 26dfbb32
......@@ -27,9 +27,9 @@ export const useUserStore = defineStore("user", () => {
function login(loginData: LoginData) {
return new Promise<void>((resolve, reject) => {
loginApi(loginData)
.then((response) => {
const { tokenType, accessToken } = response.data;
token.value = tokenType + " " + accessToken; // Bearer eyJhbGciOiJIUzI1NiJ9.xxx.xxx
.then(({ data }) => {
const { token_type, access_token } = data;
token.value = token_type + " " + access_token; // Bearer eyJhbGciOiJIUzI1NiJ9.xxx.xxx
resolve();
})
.catch((error) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册