提交 802879ac 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修改HBuilderx版本不匹配提示

上级 915d8287
......@@ -2,23 +2,13 @@
export default {
onLaunch: function() {
console.log('App Launch')
let version = uni.getSystemInfoSync().uniRuntimeVersion
function toNum(a){
const c = a.toString().split('.');
const num_place = ["", "0", "00", "000", "0000"],
r = num_place.reverse();
for (let i = 0; i < c.length; i++){
const len=c[i].length;
c[i]=r[len]+c[i];
}
return c.join('');
}
if(toNum(version) < toNum("3.8.0")){
if(typeof(uniCloud.SSEChannel) == 'undefined' ){
uni.showModal({
content: '示例的HBuilderX版本不得低于3.8.0,请升级',
content: '项目,仅支持HBuilderX 正式版 v3.7.10 或 alpha v3.8.0及以上版本请升级',
showCancel: false
});
}
}
},
onShow: function() {
console.log('App Show')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册