Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xgdlapp
Project
Project
Details
Activity
Releases
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
李苏
xgdlapp
Commits
8653614a
Commit
8653614a
authored
Jul 24, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ces
parent
1fa576b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
service.js
common/service/service.js
+1
-1
appUpdate.js
common/util/appUpdate.js
+16
-0
No files found.
common/service/service.js
View file @
8653614a
...
...
@@ -68,7 +68,7 @@ http.interceptor.response(async (response) => { /* 请求之后拦截器 */
let
data
=
response
.
data
const
token
=
uni
.
getStorageSync
(
ACCESS_TOKEN
)
console
.
log
(
"------异常响应------"
,
token
)
console
.
log
(
"------异常响应------"
,
data
.
status
)
console
.
log
(
"------异常响应------"
,
data
)
switch
(
data
.
status
)
{
case
403
:
tip
.
error
(
'拒绝访问'
);
...
...
common/util/appUpdate.js
View file @
8653614a
...
...
@@ -32,6 +32,20 @@ function versionStringCompare(preVersion, lastVersion) {
return
result
;
}
export
default
function
appUpdate
(
loginApp
)
{
/* 5S请求超时跳转回登录 */
let
isTimerOut
=
true
setTimeout
(()
=>
{
if
(
isTimerOut
){
uni
.
hideLoading
()
if
(
!
hasLogin
){
loginApp
.
$Router
.
replaceAll
({
name
:
'login'
})
}
}
},
5000
)
loginApp
.
showProcess
(
'正在检测版本更新'
,
10
)
/* 0-安卓 1-ios*/
let
appType
=
null
;
...
...
@@ -45,6 +59,8 @@ export default function appUpdate(loginApp) {
apptype
:
appType
,
appid
:
'__UNI__79C58F0'
,
}).
then
((
res
)
=>
{
/* 请求成功改变标志 */
isTimerOut
=
false
console
.
log
(
res
,
'res'
)
if
(
res
)
{
plus
.
runtime
.
getProperty
(
plus
.
runtime
.
appid
,
function
(
wgtinfo
)
{
...
...
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