Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
EcomWeb
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zhanbo.xu
2025-04-18 14:29:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0f15eea0b0af9cc00835069baa533b2dac8f070
b0f15eea
1 parent
f8acfc62
feat:优化非账号密码登录
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
src/permission.js
src/store/modules/user.js
src/views/arrival-list/index.vue
src/permission.js
View file @
b0f15ee
import
router
from
"./router"
;
import
store
from
"./store"
;
import
{
Message
,
MessageBox
}
from
"element-ui"
;
import
{
getToken
,
getLoginType
}
from
"@/utils/auth"
;
import
{
alertWarningMsg
,
alertSuccessMsg
,
alertErrorMsg
}
from
"@/utils/index"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
getParamsObj
}
from
"@/utils/parseUrlParams"
;
const
whiteList
=
[
"/login"
,
...
...
@@ -12,7 +10,12 @@ const whiteList = [
"/relogin"
,
];
const
userToken
=
getParamsObj
(
location
.
href
).
token
;
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
if
(
userToken
)
{
store
.
dispatch
(
"LoginWithoutPassword"
,
userToken
).
then
(()
=>
{});
}
if
(
to
.
path
==
"/relogin"
)
{
next
();
}
else
{
...
...
@@ -67,7 +70,6 @@ router.beforeEach((to, from, next) => {
next
();
}
else
{
if
(
to
.
path
===
"/reportingData"
)
{
const
userToken
=
getParamsObj
(
location
.
href
).
token
;
store
.
dispatch
(
"LoginWithoutPassword"
,
userToken
).
then
(()
=>
{
next
(
`/reportingData`
);
});
...
...
src/store/modules/user.js
View file @
b0f15ee
...
...
@@ -94,13 +94,16 @@ const user = {
//非账号密码登录
LoginWithoutPassword
({
commit
},
token
)
{
return
new
Promise
((
resolve
)
=>
{
if
(
!
getToken
())
{
setToken
(
token
);
commit
(
"SET_TOKEN"
,
token
);
resolve
(
token
);
}
else
{
resolve
(
token
);
}
// if (!getToken()) {
// setToken(token);
// commit("SET_TOKEN", token);
// resolve(token);
// } else {
// resolve(token);
// }
});
},
...
...
src/views/arrival-list/index.vue
View file @
b0f15ee
...
...
@@ -187,17 +187,17 @@ export default {
slot: true,
},
{
name: "
物流运单编
号",
value: "
logistics
No",
name: "
提运单
号",
value: "
bill
No",
width: "",
align: "left",
slot: true,
},
{
name: "
提运单
号",
value: "
bill
No",
name: "
物流运单编
号",
value: "
logistics
No",
width: "",
align: "left",
slot: true,
},
{
name: "电商企业代码",
...
...
@@ -315,7 +315,7 @@ export default {
preNo: "",
};
this.originalLogisticsNo = "";
this.search(0);
//
this.search(0);
},
//查询
search(val) {
...
...
Please
register
or
login
to post a comment