diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index e6a34e8ae0e464ce59cf8f67d5ef4d0519546716..065a5ee18368278a27f2c30c9237202de980381f 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -121,9 +121,9 @@ export const useUserStore = defineStore({ async tmallabSimulationLogin(params: { loginName: string; password: string }): Promise { try { const data = await tmallabLoginApi(params); - this.setTmallabToken(data.token); - this.setToken(data.token); - return this.afterLoginAction(true, data); + this.setTmallabToken(data.data.token); + this.setToken(data.data.token); + return this.afterLoginAction(true, data.data); } catch (error) { return Promise.reject(error); } diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 9f7d396a89c84a57d585e141dc9abd647868d8f1..6e90ca951e2c56d9095d34d5c480ef4942cb9252 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -224,7 +224,7 @@ function createAxios(opt?: Partial) { // 是否返回原生响应头 比如:需要获取响应头时使用该属性 isReturnNativeResponse: false, // 需要对返回数据进行处理 - isTransformResponse: true, + isTransformResponse: false, // post请求的时候添加参数到url joinParamsToUrl: false, // 格式化提交参数时间 @@ -271,7 +271,7 @@ function createTmallabAxios(opt?: Partial) { // 是否返回原生响应头 比如:需要获取响应头时使用该属性 isReturnNativeResponse: false, // 需要对返回数据进行处理 - isTransformResponse: true, + isTransformResponse: false, // post请求的时候添加参数到url joinParamsToUrl: false, // 格式化提交参数时间