动态版本号

master
chen 2022-08-19 16:30:35 +08:00
parent 7389eb88b2
commit f6e60696d2
4 changed files with 18 additions and 27 deletions

View File

@ -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" : {

View File

@ -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,

View File

@ -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',// nonesystem
sound:uni.getStorageSync('ifVoice')?'system':'none',// nonesystem 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',// nonesystem
success: () => {},
complete: () => {}
})
}
} }
} }
}); });

View File

@ -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) {
// //