Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
陈智峰
jinfa-platform
Commits
4e747ed1
Commit
4e747ed1
authored
Sep 02, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:登录过期带上之前过期的页面路径
parent
1cb08ee0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+1
-1
request.ts
src/utils/request.ts
+2
-1
No files found.
src/pages/lxMall/commodityDetail/index.tsx
View file @
4e747ed1
...
@@ -66,7 +66,7 @@ const CommodityDetail = (props) => {
...
@@ -66,7 +66,7 @@ const CommodityDetail = (props) => {
PublicApi
.
getSearchShopStoreGetCommodityDetail
({
commodityId
:
id
}).
then
(
res
=>
{
PublicApi
.
getSearchShopStoreGetCommodityDetail
({
commodityId
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
setCommodityDetail
(
res
.
data
)
setCommodityDetail
(
res
.
data
)
initAttributeAndValueList
(
res
.
data
.
unitPriceAndPicList
)
initAttributeAndValueList
(
res
.
data
?
.
unitPriceAndPicList
)
}
}
})
})
}
}
...
...
src/utils/request.ts
View file @
4e747ed1
...
@@ -109,7 +109,8 @@ class ApiRequest {
...
@@ -109,7 +109,8 @@ class ApiRequest {
// 登录验证
// 登录验证
if
(
res
.
code
===
1101
)
{
if
(
res
.
code
===
1101
)
{
removeAuth
()
removeAuth
()
history
.
replace
(
'/user/login'
)
// history.replace('/user/login')
window
.
location
.
href
=
`/user/login?redirect=
${
window
.
location
}
`
message
.
error
(
res
.
message
)
message
.
error
(
res
.
message
)
return
false
return
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