Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-master
Project
Project
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
lanbaoming
jiedao-app-customer-new-master
Commits
9694100b
Commit
9694100b
authored
Aug 05, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复打开首页未登录不跳转到登录页面
parent
96cb56c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
request.js
src/utils/request.js
+11
-19
No files found.
src/utils/request.js
View file @
9694100b
...
...
@@ -69,18 +69,10 @@ function callback(resolve, reject, response) {
})
}
if
(
data
.
code
==
401
)
{
let
pages
=
getCurrentPages
()
// 获取栈实例
if
(
pages
.
length
>
1
){
let
prevPage
=
pages
[
pages
.
length
-
2
]
if
(
!
prevPage
||
prevPage
.
route
!=
'
pages/login/login
'
){
store
.
commit
(
'
logout
'
)
uni
.
reLaunch
({
url
:
'
/pages/login/login
'
})
}
}
store
.
commit
(
'
logout
'
)
uni
.
reLaunch
({
url
:
'
/pages/login/login
'
})
}
resolve
(
data
)
}
else
{
...
...
@@ -157,7 +149,7 @@ const deleted = (url, param) => {
})
}
const
goPage
=
(
url
,
type
=
1
)
=>
{
const
goPage
=
(
url
,
type
=
1
)
=>
{
if
(
type
==
1
){
uni
.
navigateTo
({
url
:
url
,
...
...
@@ -179,7 +171,7 @@ const backGo = () => {
uni
.
navigateBack
()
}
const
getLocalTime
=
(
nS
)
=>
{
const
getLocalTime
=
(
nS
)
=>
{
if
(
!
nS
){
return
''
}
...
...
@@ -195,18 +187,18 @@ const getLocalTime = (nS) => {
day
=
day
>
9
?
day
:
'
0
'
+
day
;
min
=
min
>
9
?
min
:
'
0
'
+
min
;
sec
=
sec
>
9
?
sec
:
'
0
'
+
sec
;
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hour
}
:
${
min
}
:
${
sec
}
`
;
}
const
getDate
=
(
nS
)
=>
{
}
const
getDate
=
(
nS
)
=>
{
const
date
=
new
Date
(
nS
);
let
year
=
date
.
getFullYear
();
let
month
=
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
();
month
=
month
>
9
?
month
:
'
0
'
+
month
;
return
`
${
year
}
-
${
month
}
-
${
day
}
`
;
}
}
const
checkFormData
=
(
params
,
rules
)
=>
{
for
(
let
i
in
params
){
if
(
params
[
i
]
==
''
||
params
[
i
]
==
0
){
...
...
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