From 2c4f22abf4ff20490facf6e9604fffcfc2d02439 Mon Sep 17 00:00:00 2001 From: cxr <2059387846@qq.com> Date: Mon, 1 Apr 2024 10:06:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(cxr):=20=E4=B8=8D=E5=AF=B9=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E6=95=B0=E6=8D=AE=E5=81=9A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 6 +++--- src/utils/http/axios/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index e6a34e8..065a5ee 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 9f7d396..6e90ca9 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, // 格式化提交参数时间 -- 2.24.1