动态版本号
parent
7389eb88b2
commit
f6e60696d2
|
@ -3,7 +3,7 @@
|
|||
"appid" : "__UNI__BDCAFA5",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionCode" : 100,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
@ -62,13 +62,13 @@
|
|||
return {
|
||||
windowHeight: uni.getSystemInfoSync().windowHeight,
|
||||
ifPhone:false,
|
||||
login_phone:'17366921088',//登录手机号
|
||||
login_phone:'',//登录手机号
|
||||
ifCode:false,
|
||||
login_code:'',//登录验证码
|
||||
ifunitName:false,
|
||||
login_unitName:'1',//登录单位名称
|
||||
login_unitName:'',//登录单位名称
|
||||
ifPassword:false,
|
||||
login_password:'123456',//登录密码
|
||||
login_password:'',//登录密码
|
||||
codeText:'获取验证码' ,// 获取验证码按钮文字
|
||||
flagCode:true ,// 允许点击获取验证码
|
||||
countDown:null,
|
||||
|
|
|
@ -457,7 +457,6 @@
|
|||
// #ifdef APP-PLUS
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
if(res.platform == 'ios'){
|
||||
if(uni.getStorageSync('ifVoice') || uni.getStorageSync('ifMessage')){
|
||||
uni.createPushMessage({
|
||||
content:msg,
|
||||
|
@ -466,20 +465,6 @@
|
|||
complete: () => {}
|
||||
})
|
||||
}
|
||||
} else if (res.platform == 'android'){
|
||||
if(uni.getStorageSync('ifVoice') || uni.getStorageSync('ifMessage')){
|
||||
uni.createPushMessage({
|
||||
// title:'飞猴云服务',//标题
|
||||
content:msg,//内容描述
|
||||
// icon:'/static/public/icon-plan-fire.png',//显示的图片
|
||||
cover:true ,// 是否覆盖上一次提示的消息
|
||||
when:that.timeago(new Date().getTime()), // 显示的时间
|
||||
sound:uni.getStorageSync('ifVoice')?'system':'none',// 默认没有声音none,系统声音system
|
||||
success: () => {},
|
||||
complete: () => {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<!-- #ifdef APP-PLUS -->
|
||||
<view @tap="checkEdition" class="bacf pad30 disjbac">
|
||||
<view>版本更新</view>
|
||||
<view class="col9">当前版本 5.1.4</view>
|
||||
<view class="col9">当前版本 {{versionText}}</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
|
@ -76,6 +76,7 @@
|
|||
newsStatus:false,//是否开启接受新消息通知
|
||||
cacheSize:'754.72 KB',//缓存数据大小
|
||||
agreementArr:[],//协议对象
|
||||
versionText:'1.0.0'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -83,6 +84,10 @@
|
|||
this.getStorageDataNum();
|
||||
// 调用获取设置信息
|
||||
this.getSettings();
|
||||
// #ifdef APP-PLUS
|
||||
// 检测版本
|
||||
this.checkEdition();
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
// 获取缓存数据的大小
|
||||
|
@ -171,6 +176,7 @@
|
|||
// 检测升级
|
||||
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
|
||||
var platform = uni.getSystemInfoSync().platform;
|
||||
this.versionText = widgetInfo.version;
|
||||
this.$requst.get('/universal/api.other/update_version',{version:widgetInfo.version}).then(res=>{
|
||||
if(res.code) {
|
||||
// 判断是否需要更新
|
||||
|
|
Loading…
Reference in New Issue