Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
ops_2024_vue
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
ops_2024_vue
Commits
2c4f22ab
Commit
2c4f22ab
authored
Apr 01, 2024
by
cxr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cxr): 不对响应数据做处理
parent
5f7bcaa1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/store/modules/user.ts
src/store/modules/user.ts
+3
-3
src/utils/http/axios/index.ts
src/utils/http/axios/index.ts
+2
-2
No files found.
src/store/modules/user.ts
View file @
2c4f22ab
...
@@ -121,9 +121,9 @@ export const useUserStore = defineStore({
...
@@ -121,9 +121,9 @@ export const useUserStore = defineStore({
async
tmallabSimulationLogin
(
params
:
{
loginName
:
string
;
password
:
string
}):
Promise
<
any
>
{
async
tmallabSimulationLogin
(
params
:
{
loginName
:
string
;
password
:
string
}):
Promise
<
any
>
{
try
{
try
{
const
data
=
await
tmallabLoginApi
(
params
);
const
data
=
await
tmallabLoginApi
(
params
);
this
.
setTmallabToken
(
data
.
token
);
this
.
setTmallabToken
(
data
.
data
.
token
);
this
.
setToken
(
data
.
token
);
this
.
setToken
(
data
.
data
.
token
);
return
this
.
afterLoginAction
(
true
,
data
);
return
this
.
afterLoginAction
(
true
,
data
.
data
);
}
catch
(
error
)
{
}
catch
(
error
)
{
return
Promise
.
reject
(
error
);
return
Promise
.
reject
(
error
);
}
}
...
...
src/utils/http/axios/index.ts
View file @
2c4f22ab
...
@@ -224,7 +224,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
...
@@ -224,7 +224,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
// 是否返回原生响应头 比如:需要获取响应头时使用该属性
// 是否返回原生响应头 比如:需要获取响应头时使用该属性
isReturnNativeResponse
:
false
,
isReturnNativeResponse
:
false
,
// 需要对返回数据进行处理
// 需要对返回数据进行处理
isTransformResponse
:
tru
e
,
isTransformResponse
:
fals
e
,
// post请求的时候添加参数到url
// post请求的时候添加参数到url
joinParamsToUrl
:
false
,
joinParamsToUrl
:
false
,
// 格式化提交参数时间
// 格式化提交参数时间
...
@@ -271,7 +271,7 @@ function createTmallabAxios(opt?: Partial<CreateAxiosOptions>) {
...
@@ -271,7 +271,7 @@ function createTmallabAxios(opt?: Partial<CreateAxiosOptions>) {
// 是否返回原生响应头 比如:需要获取响应头时使用该属性
// 是否返回原生响应头 比如:需要获取响应头时使用该属性
isReturnNativeResponse
:
false
,
isReturnNativeResponse
:
false
,
// 需要对返回数据进行处理
// 需要对返回数据进行处理
isTransformResponse
:
tru
e
,
isTransformResponse
:
fals
e
,
// post请求的时候添加参数到url
// post请求的时候添加参数到url
joinParamsToUrl
:
false
,
joinParamsToUrl
:
false
,
// 格式化提交参数时间
// 格式化提交参数时间
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment