Commit 4e747ed1 authored by GuanHua's avatar GuanHua

feat:登录过期带上之前过期的页面路径

parent 1cb08ee0
...@@ -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)
} }
}) })
} }
......
...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment