动态版本号

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",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

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

View File

@ -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',// nonesystem
success: () => {},
complete: () => {}
})
}
}
}
});
// #endif

View File

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