You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/**
* 参考文档: http://ask.dcloud.net.cn/article/431
* 升级文件为JSON格式数据, 如下:
*
* 需升级
{
"status":1,
"version": "2.6.0",
"title": "Hello MUI版本更新",
"note": "修复“选项卡+下拉刷新”示例中, 某个选项卡滚动到底时, 会触发所有选项卡上拉加载事件的bug; \n修复Android4.4.4版本部分手机上, 软键盘弹出时影响图片轮播组件, 导致自动轮播停止的bug; ",
"url": "http://www.dcloud.io/hellomui/HelloMUI.apk"
}
*
* 无需升级
{"status":0}
*/
var server = "http://www.dcloud.io/check/update" ; //获取升级描述文件服务器地址
function update ( ) {
mui . getJSON ( server , {
"appid" : plus . runtime . appid ,
"version" : plus . runtime . version ,
"imei" : plus . device . imei
} , function ( data ) {
if ( data . status ) {
plus . nativeUI . confirm ( data . note , function ( event ) {
if ( 0 == event . index ) {
plus . runtime . openURL ( data . url ) ;
}
} , data . title , [ "立即更新" , "取 消" ] ) ;
}
} ) ;
}
mui . os . plus && ! mui . os . stream && mui . plusReady ( update ) ;