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