更新记录
1.0.0(2023-04-20)
下载此版本
第一版初级
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
app-vue |
× |
× |
× |
× |
× |
× |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
× |
× |
× |
× |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
× |
× |
× |
× |
× |
× |
× |
× |
× |
<!-- 自己使用的,请勿下载 -->
<!-- html -->
<template>
<uni-popup ref="popupHi" type="center" :mask-click="!androidForceUpgradeFlag">
<verson-pop :versonData="versonData" @hiddenPop="closePopup('popupHi')"></verson-pop>
</uni-popup>
</template>
<!-- js -->
import versonMix from '@/utils/mixins/verson.js'
import versonPop from '@/components/shaoll-upgradation.vue'
export default {
mixins: [versonMix],
components: {versonPop},
methods: {},
};
<!-- verson.js -->
const app = getApp()
export default {
data() {
return {
}
},
methods: {
//版本更新
toUpdateVerson(isAutoCheck) {
// console.log('isAutoCheck',plus.runtime.version)
let platform = uni.getSystemInfoSync().platform
let that = this;
let params = {
appPackageName: platform === 'android'? 'com.repair.app':'com.juxiang.repair.app',
verNo: plus.runtime.version,
};
// console.log(params)
that.API.service.postToken(that.URL.appCommonVersionGetUpdateInfo, params).then(res => {
if (res.code == 200) {
that.closeDrawer();
if (res.data) {
this.versonData = res.data;
this.androidForceUpgradeFlag = res.data.androidForceUpgradeFlag==='1'?true:false;
if(isAutoCheck){
if(uni.getStorageSync('zanbushengji') && uni.getStorageSync('zanbushengji').verNo===res.data.verNo){
console.log('此更新版本暂不升级')
}else{
that.openPopup('popupHi', 'center')
}
}else{
that.openPopup('popupHi', 'center')
}
} else {
if (!isAutoCheck) {
app.globalData.showToast('当前版本已是最新,不用更新!', 2000)
}
}
}
})
},
openPopup(popupRef, pos) {
this.$refs[popupRef].open(pos)
},
closePopup(popupRef) {
this.$refs[popupRef].close()
},
<!-- versonpop组件组件中修改此方法 -->
hiddenPopUp() {
uni.setStorageSync('zanbushengji',this.versonData)
this.$emit('hiddenPop')
},
},
}