|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
|
<title>关于我们</title>
|
|
|
|
<!--REM自适应布局JS-->
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../../lib/css/mui.min.css">
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../../lib/css/basic.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
|
|
|
<script src="../../../lib/js/mui.min.js"></script>
|
|
|
|
<script src="../../../lib/js/vue.js"></script>
|
|
|
|
<script src="../../../lib/js/app.js"></script>
|
|
|
|
<script src="../../js/base/rem-layout.js"></script>
|
|
|
|
<script src="../../js/language/wallet_language.js"></script>
|
|
|
|
<script type="text/javascript" src="../../js/my/my_ajax.js"></script>
|
|
|
|
</head>
|
|
|
|
<style>
|
|
|
|
.protocol-box {
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0.25rem;
|
|
|
|
font-size: 0.28rem;
|
|
|
|
text-align: center;
|
|
|
|
width: 100%;
|
|
|
|
color: #666 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
#logo-content {
|
|
|
|
width: 100%;
|
|
|
|
height: 2.5rem;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
#logo-content #logo {
|
|
|
|
position: absolute;
|
|
|
|
width: 80px;
|
|
|
|
top: .6rem;
|
|
|
|
left: calc(50% - 40px);
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.app-name {
|
|
|
|
font-size: 0.3rem;
|
|
|
|
text-align: center;
|
|
|
|
margin-bottom: .2rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.version {
|
|
|
|
font-size: 0.25rem;
|
|
|
|
text-align: center;
|
|
|
|
margin-bottom: .5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
position: fixed;
|
|
|
|
z-index: 21;
|
|
|
|
left: 0px;
|
|
|
|
top: 1.8rem;
|
|
|
|
width: 74%;
|
|
|
|
margin: 0px 13%;
|
|
|
|
overflow: hidden;
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
border-radius: .1rem;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-title {
|
|
|
|
margin: .3rem 30%;
|
|
|
|
line-height: .5rem;
|
|
|
|
background-color: #37A2EA;
|
|
|
|
color: #FFFFFF;
|
|
|
|
text-align: center;
|
|
|
|
border-radius: .05rem;
|
|
|
|
font-size: .29rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-name {
|
|
|
|
text-align: center;
|
|
|
|
font-size: .35rem;
|
|
|
|
padding-top: .15rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-percent {
|
|
|
|
text-align: center;
|
|
|
|
padding-bottom: .5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-remark {
|
|
|
|
padding: .5rem 5%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-input button {
|
|
|
|
margin: .25rem 5% 0px .25rem;
|
|
|
|
width: 90%;
|
|
|
|
border: none;
|
|
|
|
background-color: #0B8BE8;
|
|
|
|
color: #FFFFFF;
|
|
|
|
height: .7rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-input button:active {
|
|
|
|
background-color: #37A2EA;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-cancel button {
|
|
|
|
margin-bottom: .25rem;
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
color: #CCCCCC;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-cancel button:active {
|
|
|
|
background-color: #DDDDDD;
|
|
|
|
color: #CCCCCC;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mui-demo-container p {
|
|
|
|
height: .05rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mui-progressbar-success span {
|
|
|
|
background-color: #007aff;
|
|
|
|
}
|
|
|
|
|
|
|
|
.transfer-backdrop {
|
|
|
|
display: none;
|
|
|
|
z-index: 20;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mui-demo-container {
|
|
|
|
background-color: #fff;
|
|
|
|
padding: .25rem 5% .2rem 5%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.app-text-color {
|
|
|
|
color: #333333 !important;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="data-info">
|
|
|
|
<header class="mui-bar mui-bar-nav app-header app-header-darkly">
|
|
|
|
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
|
|
<h1 class="mui-title" data-text="WalletMyAboutUsTitle">{{langue.about}}</h1>
|
|
|
|
</header>
|
|
|
|
<div class="mui-content">
|
|
|
|
<div id="logo-content">
|
|
|
|
<img id="logo" src="../../img/logo.png" />
|
|
|
|
</div>
|
|
|
|
<p class="app-name">{{langue.name}}</p>
|
|
|
|
<p class="version">Version {{version}}</p>
|
|
|
|
<ul class="mui-table-view app-table-view app-table-view-darkly">
|
|
|
|
<!--<li class="mui-table-view-cell" v-for="(row,index) in list">
|
|
|
|
<a class="mui-navigate-right">
|
|
|
|
{{row.contactName}}
|
|
|
|
<label class="app-table-cell-lable-right">{{row.contactValue}}</label>
|
|
|
|
</a>
|
|
|
|
</li>-->
|
|
|
|
<!--<li class="mui-table-view-cell">
|
|
|
|
<a class="mui-navigate-right" id="notice">
|
|
|
|
功能介绍
|
|
|
|
</a>
|
|
|
|
</li>-->
|
|
|
|
<li class="mui-table-view-cell">
|
|
|
|
<a class="mui-navigate-right" id="che-version">
|
|
|
|
{{langue.update}}
|
|
|
|
<span style="color: #FF5053;float: right;font-size: .9rem;padding-right: 15px;">{{point}}</span>
|
|
|
|
<span style="float: right;color: #8f8f94;">{{localVersion}}</span>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<!--<li class="mui-table-view-cell">
|
|
|
|
<a class="mui-navigate-right">
|
|
|
|
投诉
|
|
|
|
</a>
|
|
|
|
</li>-->
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="protocol-box">
|
|
|
|
<button id="protocol" class="mui-btn-link app-text-color">{{langue.service}}</button>
|
|
|
|
<p>
|
|
|
|
{{langue.name}}</br>
|
|
|
|
Copyright © 2019 Zhixin.IO Corporation.</br>
|
|
|
|
All Rights Reserved.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div id="app-update" class="footer">
|
|
|
|
<div class="footer-title">{{localVersion}}</div>
|
|
|
|
<div class="footer-name">{{langue.name}} {{localVersion}}</div>
|
|
|
|
<div class="footer-remark">{{versionRemark}}</div>
|
|
|
|
<div id="percent-progressbar" class="mui-demo-container">
|
|
|
|
<p class="mui-progressbar mui-progressbar-success"><span></span></p>
|
|
|
|
</div>
|
|
|
|
<div class="footer-percent">{{langue.downloading}}{{percent}}%</div>
|
|
|
|
<div class="footer-input footer-cancel">
|
|
|
|
<button id="update-cancel">{{langue.cancel}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="app-check" class="footer">
|
|
|
|
<div class="footer-title">{{localVersion}}</div>
|
|
|
|
<div class="footer-name">{{langue.name}} {{localVersion}}</div>
|
|
|
|
<div class="footer-remark">{{versionRemark}}</div>
|
|
|
|
<div class="footer-input">
|
|
|
|
<button id="update-now">{{langue.updateNow}}</button>
|
|
|
|
</div>
|
|
|
|
<div class="footer-input footer-cancel">
|
|
|
|
<button id="update-later">{{langue.updateLater}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="backdrop" class="transfer-backdrop mui-backdrop mui-active"></div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
//1、每个页面写自己的国际化语言变量,例子:
|
|
|
|
var langues = {
|
|
|
|
zh_CN: {
|
|
|
|
cancel: '取消',
|
|
|
|
about: '关于我们',
|
|
|
|
update: '检查新版本',
|
|
|
|
service: '《软件许可及服务协议》',
|
|
|
|
updateNow: '立即更新',
|
|
|
|
updateLater: '稍后更新',
|
|
|
|
name: '智信链',
|
|
|
|
errorNet: '网络异常,请检查网络状态',
|
|
|
|
note1: '当前已是最新版本',
|
|
|
|
note2: '补丁下载失败',
|
|
|
|
note3: '补丁升级中...',
|
|
|
|
note4: '补丁升级成功!',
|
|
|
|
note5: '补丁升级失败',
|
|
|
|
note6: '未知设备,请手动下载!',
|
|
|
|
note7: '提示',
|
|
|
|
note8: '安卓下载',
|
|
|
|
note9: '苹果下载',
|
|
|
|
note10: '获取app下载地址失败,请使用ios设备打开!',
|
|
|
|
downloading: '正在下载'
|
|
|
|
|
|
|
|
},
|
|
|
|
zh_HK: {
|
|
|
|
cancel: '取消',
|
|
|
|
about: '關於我們',
|
|
|
|
update: '檢查新版本',
|
|
|
|
service: '《軟件許可及服務協議》',
|
|
|
|
updateNow: '立即更新',
|
|
|
|
updateLater: '稍後更新',
|
|
|
|
name: '智信鏈',
|
|
|
|
errorNet: '網絡異常,請檢查網絡狀態',
|
|
|
|
note1: '當前已是最新版本',
|
|
|
|
note2: '補丁下載失敗',
|
|
|
|
note3: '補丁升級中...',
|
|
|
|
note4: '補丁升級成功!',
|
|
|
|
note5: '補丁升級失敗',
|
|
|
|
note6: '未知設備,請手動下載!',
|
|
|
|
note7: '提示',
|
|
|
|
note8: '安卓下載',
|
|
|
|
note9: '蘋果下載',
|
|
|
|
note10: '獲取app下載地址失敗,請使用ios設備打開!',
|
|
|
|
downloading: '正在下載'
|
|
|
|
},
|
|
|
|
en_US: {
|
|
|
|
cancel: 'Cancel',
|
|
|
|
about: 'About',
|
|
|
|
update: 'Check for Updates',
|
|
|
|
service: 'Terms Of Service and Privacy Policy',
|
|
|
|
updateNow: 'Update Now',
|
|
|
|
updateLater: 'Update Later',
|
|
|
|
name: 'Zhixin',
|
|
|
|
errorNet: 'Net error',
|
|
|
|
note1: 'Currently the latest version',
|
|
|
|
note2: 'Patch download failed',
|
|
|
|
note3: 'Patch upgrade...',
|
|
|
|
note4: 'Patch was successfully upgraded.!',
|
|
|
|
note5: 'Patch upgrade failed',
|
|
|
|
note6: 'Unknown device, please download it manually!',
|
|
|
|
note7: 'Prompt',
|
|
|
|
note8: 'Android download',
|
|
|
|
note9: 'Apple download',
|
|
|
|
note10: 'Failed to get app download address, please use ios device to open!',
|
|
|
|
downloading: 'Downloading'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
//2、页面上所有需要国际化的文字,包括提示,都通过Vue去引用,例子:
|
|
|
|
var langueKey = app.getLanguageLocalStorage(); //获取国际化语种
|
|
|
|
var langue = langues[langueKey]; // 获取国际化语种数据
|
|
|
|
var dataInfo = new Vue({
|
|
|
|
el: "#data-info",
|
|
|
|
data: {
|
|
|
|
langue: langue,
|
|
|
|
version: "",
|
|
|
|
localVersion: "",
|
|
|
|
versionRemark: "",
|
|
|
|
point: "",
|
|
|
|
percent: 0,
|
|
|
|
list: []
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
var updateObj;
|
|
|
|
var downloader;
|
|
|
|
mui.plusReady(function() {
|
|
|
|
|
|
|
|
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
|
|
|
|
dataInfo.version = inf.version;
|
|
|
|
var localVersion = app.getVersionLocalStorage();
|
|
|
|
if(localVersion != "" && inf.version != localVersion) {
|
|
|
|
dataInfo.localVersion = localVersion;
|
|
|
|
dataInfo.point = '·';
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// 服务隐私条款监听
|
|
|
|
document.getElementById('protocol').addEventListener('tap', function() {
|
|
|
|
mui.openWindow({
|
|
|
|
id: "mine/html/wallet_terms_of_service.html",
|
|
|
|
url: "../wallet_terms_of_service.html"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// 功能介绍监听
|
|
|
|
// document.getElementById('notice').addEventListener('tap', function() {
|
|
|
|
// app.openWin("notice.html", "notice.html");
|
|
|
|
// });
|
|
|
|
// 检查新版本监听
|
|
|
|
document.getElementById('che-version').addEventListener('tap', function() {
|
|
|
|
checkFun();
|
|
|
|
});
|
|
|
|
|
|
|
|
document.getElementById("update-now").addEventListener("tap", function() {
|
|
|
|
if(updateObj.type == 'wgt') {
|
|
|
|
downWgt(updateObj.url); //执行补丁下载安装
|
|
|
|
} else {
|
|
|
|
plus.runtime.openURL(updateObj.url); // 大版本更新方法
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
document.getElementById("update-later").addEventListener("tap", function() {
|
|
|
|
document.getElementById("backdrop").style.display = 'none';
|
|
|
|
document.getElementById("app-check").style.display = 'none';
|
|
|
|
});
|
|
|
|
|
|
|
|
document.getElementById("update-cancel").addEventListener("tap", function() {
|
|
|
|
downloader.abort();
|
|
|
|
mui("#percent-progressbar").progressbar({
|
|
|
|
progress: 0
|
|
|
|
}).show();
|
|
|
|
dataInfo.percent = 0;
|
|
|
|
document.getElementById("backdrop").style.display = 'none';
|
|
|
|
document.getElementById("app-update").style.display = 'none';
|
|
|
|
});
|
|
|
|
|
|
|
|
var self = plus.webview.currentWebview();
|
|
|
|
if(self.data) {
|
|
|
|
updateObj = {
|
|
|
|
type: 'wgt',
|
|
|
|
url: self.data.wgtUrl
|
|
|
|
};
|
|
|
|
dataInfo.localVersion = self.data.wgtVersion;
|
|
|
|
dataInfo.point = '·';
|
|
|
|
dataInfo.versionRemark = self.data.remark;
|
|
|
|
document.getElementById("backdrop").style.display = 'block';
|
|
|
|
downWgt(updateObj.url);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 版本更新
|
|
|
|
*/
|
|
|
|
function checkFun() {
|
|
|
|
plus.nativeUI.showWaiting();
|
|
|
|
var appCheckAppUrl = app.confBaseUrl + "version/findNewVersionAll"; //检查App更新的请求地址
|
|
|
|
mui.ajax(appCheckAppUrl, {
|
|
|
|
headers: {
|
|
|
|
"locale": app.getLanguageLocalStorage() // 语种头部
|
|
|
|
},
|
|
|
|
type: "GET", //HTTP请求类型
|
|
|
|
dataType: 'json', //服务器返回json格式数据
|
|
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
|
|
success: function(data) {
|
|
|
|
plus.nativeUI.closeWaiting();
|
|
|
|
if("200" == data.code) {
|
|
|
|
checkJudge(data.data);
|
|
|
|
} else {
|
|
|
|
mui.alert(data.msg);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error: function(xhr, type, errorThrown) {
|
|
|
|
plus.nativeUI.closeWaiting();
|
|
|
|
app.toast(dataInfo.langue.errorNet);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 版本更新判断,若版本一致,则检查是否有补丁更新,若版本不一致,则进行大版本更新
|
|
|
|
*
|
|
|
|
* @param {Object} data 版本更新信息
|
|
|
|
*/
|
|
|
|
function checkJudge(data) {
|
|
|
|
var appCheckSystemType = getCurrentSystem();
|
|
|
|
if(appCheckSystemType) { // 系统类型 "安卓"或者"苹果"
|
|
|
|
var appData = data[appCheckSystemType]; //获取当前系统的数据信息
|
|
|
|
if(appData == null) {
|
|
|
|
dataInfo.localVersion = '';
|
|
|
|
dataInfo.point = '';
|
|
|
|
mui.toast(dataInfo.langue.note1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
//1、判断大版本更新
|
|
|
|
if(dataInfo.version.substr(0, 3) * 1 < appData.version.substr(0, 3) * 1) {
|
|
|
|
app.setVersionLocalStorage(appData.version);
|
|
|
|
dataInfo.localVersion = appData.version;
|
|
|
|
dataInfo.point = '·';
|
|
|
|
dataInfo.versionRemark = appData.remark;
|
|
|
|
document.getElementById("backdrop").style.display = 'block';
|
|
|
|
document.getElementById("app-check").style.display = 'block';
|
|
|
|
updateObj = {
|
|
|
|
type: 'version',
|
|
|
|
url: appData.appUrl
|
|
|
|
};
|
|
|
|
return;
|
|
|
|
} else { //2、判断补丁更新
|
|
|
|
checkWgtFun(); // 补丁更新方法
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else { //系统类型识别不了
|
|
|
|
otherFun(data); // 手动下载
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 补丁更新
|
|
|
|
* @param {Object} data 版本更新信息
|
|
|
|
*/
|
|
|
|
function checkWgtFun() {
|
|
|
|
var appCheckWgtUrl = app.confBaseUrl + "wgtVersion/findNewWgtVersion"; //检查补丁更新的请求地址
|
|
|
|
mui.ajax(appCheckWgtUrl, {
|
|
|
|
headers: {
|
|
|
|
"locale": app.getLanguageLocalStorage() // 语种头部
|
|
|
|
},
|
|
|
|
type: "GET", //HTTP请求类型
|
|
|
|
dataType: 'json', //服务器返回json格式数据
|
|
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
|
|
success: function(data) {
|
|
|
|
plus.nativeUI.closeWaiting();
|
|
|
|
console.log(JSON.stringify(data));
|
|
|
|
if("200" == data.code) {
|
|
|
|
if(data.data) {
|
|
|
|
|
|
|
|
if(dataInfo.version.substr(0, 3) * 1 > data.data.wgtVersion.substr(0, 3) * 1) {
|
|
|
|
dataInfo.localVersion = '';
|
|
|
|
dataInfo.point = '';
|
|
|
|
mui.toast(dataInfo.langue.note1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(dataInfo.version.replace(/\./g, "") * 1 >= data.data.wgtVersion.replace(/\./g, "") * 1) {
|
|
|
|
dataInfo.localVersion = '';
|
|
|
|
dataInfo.point = '';
|
|
|
|
mui.toast(dataInfo.langue.note1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
app.setVersionLocalStorage(data.data.wgtVersion);
|
|
|
|
if(dataInfo.version != data.data.wgtVersion && data.data.wgtVersion.split(".").pop() * 1 > dataInfo.version.substr(-1).split(".").pop() * 1) {
|
|
|
|
dataInfo.localVersion = data.data.wgtVersion;
|
|
|
|
dataInfo.point = '·';
|
|
|
|
dataInfo.versionRemark = data.data.remark;
|
|
|
|
document.getElementById("backdrop").style.display = 'block';
|
|
|
|
document.getElementById("app-check").style.display = 'block';
|
|
|
|
updateObj = {
|
|
|
|
type: 'wgt',
|
|
|
|
url: data.data.wgtUrl
|
|
|
|
};
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
mui.alert(data.msg);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error: function(xhr, type, errorThrown) {
|
|
|
|
// console.log("网络异常,请检查网络状态");
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 补丁下载,直接下载wgt文件
|
|
|
|
* @param {Object} wgtUrl wgt文件补丁下载地址
|
|
|
|
*/
|
|
|
|
function downWgt(wgtUrl) {
|
|
|
|
document.getElementById("app-check").style.display = 'none';
|
|
|
|
document.getElementById("app-update").style.display = 'block';
|
|
|
|
downloader = plus.downloader.createDownload(wgtUrl, {}, function(d, status) {
|
|
|
|
if(status == 200) {
|
|
|
|
installWgt(d.filename); // 安装wgt包
|
|
|
|
} else {
|
|
|
|
plus.nativeUI.alert(dataInfo.langue.note2);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
downloader.addEventListener("statechanged", function(download, status) {
|
|
|
|
if(download.state && status == 200) {
|
|
|
|
var percent = parseInt(download.downloadedSize * 100 / download.totalSize);
|
|
|
|
mui("#percent-progressbar").progressbar({
|
|
|
|
progress: percent
|
|
|
|
}).show();
|
|
|
|
dataInfo.percent = percent;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
downloader.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 补丁升级安装
|
|
|
|
* @param {Object} path wgt文件存放路径
|
|
|
|
*/
|
|
|
|
function installWgt(path) {
|
|
|
|
plus.nativeUI.showWaiting(dataInfo.langue.note3);
|
|
|
|
plus.runtime.install(path, {}, function() {
|
|
|
|
plus.nativeUI.closeWaiting();
|
|
|
|
plus.nativeUI.alert(dataInfo.langue.note4, function() {
|
|
|
|
plus.runtime.restart();
|
|
|
|
});
|
|
|
|
}, function(e) {
|
|
|
|
plus.nativeUI.closeWaiting();
|
|
|
|
plus.nativeUI.alert(dataInfo.langue.note5);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 系统类型识别不了,手动下载的方法
|
|
|
|
*
|
|
|
|
* @param {Object} data 所有系统版本更新信息
|
|
|
|
*/
|
|
|
|
function otherFun(data) {
|
|
|
|
mui.confirm(dataInfo.langue.note6, dataInfo.langue.note7, [dataInfo.langue.note8, dataInfo.langue.note9], function(e) {
|
|
|
|
if(e.index == 0) {
|
|
|
|
var appUrl = data["android"].appUrl; //获取安卓安装包的下载地址
|
|
|
|
console.log(data);
|
|
|
|
window.location.href = appUrl; //执行App下载安装
|
|
|
|
} else if(e.index == 1) {
|
|
|
|
mui.toast(dataInfo.langue.note10);
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取当前系统类型
|
|
|
|
*/
|
|
|
|
function getCurrentSystem() {
|
|
|
|
//是否为IOS
|
|
|
|
var isIos = mui.os.ios || mui.os.ipad || mui.os.iphone;
|
|
|
|
//是否为安卓
|
|
|
|
var isAndroid = mui.os.android;
|
|
|
|
if(isIos) {
|
|
|
|
return "ios";
|
|
|
|
} else if(isAndroid) {
|
|
|
|
return "android";
|
|
|
|
} else {
|
|
|
|
return null; // 识别不了
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|