Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mui
Project overview
Project overview
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
Administrator
mui
Commits
1d948e1e
Commit
1d948e1e
authored
Mar 16, 2015
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级间隔周期缩短为1小时
parent
e91f3f2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
examples/hello-mui/js/update.js
examples/hello-mui/js/update.js
+2
-1
No files found.
examples/hello-mui/js/update.js
View file @
1d948e1e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
localDir
=
"
update
"
,
localFile
=
"
update.json
"
,
//本地保存升级描述目录和文件名
localDir
=
"
update
"
,
localFile
=
"
update.json
"
,
//本地保存升级描述目录和文件名
keyUpdate
=
"
updateCheck
"
,
//取消升级键名
keyUpdate
=
"
updateCheck
"
,
//取消升级键名
keyAbort
=
"
updateAbort
"
,
//忽略版本键名
keyAbort
=
"
updateAbort
"
,
//忽略版本键名
checkInterval
=
60480000
,
//升级检查间隔,单位为ms,7天为7*24*60*60*1000=6048
0000, 如果每次启动需要检查设置值为0
checkInterval
=
3600000
,
//升级检查间隔,单位为ms,1小时为60*60*1000=360
0000, 如果每次启动需要检查设置值为0
dir
=
null
;
dir
=
null
;
/**
/**
...
@@ -103,6 +103,7 @@
...
@@ -103,6 +103,7 @@
*/
*/
function
getUpdateData
(){
function
getUpdateData
(){
mui
.
getJSON
(
server
,{},
function
(
data
)
{
mui
.
getJSON
(
server
,{},
function
(
data
)
{
//appid一致,才将服务器上的版本数据保存到本地
if
(
data
.
appid
==
plus
.
runtime
.
appid
){
if
(
data
.
appid
==
plus
.
runtime
.
appid
){
// 保存到本地文件中
// 保存到本地文件中
dir
.
getFile
(
localFile
,
{
create
:
true
},
function
(
fentry
){
dir
.
getFile
(
localFile
,
{
create
:
true
},
function
(
fentry
){
...
...
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