代码优化

This commit is contained in:
GaoHao
2024-12-28 17:34:13 +08:00
parent f3615bfbb8
commit 820fb9aea6
7 changed files with 53 additions and 27 deletions

16
App.vue
View File

@@ -376,8 +376,18 @@
//请求后台接口 解析数据 对比版本
that.$Request.getT('/app/user/selectNewApp').then(res => {
res = res.data[0];
if (widgetInfo.version < res.version && uni.getSystemInfoSync().platform == 'android') {
console.log(widgetInfo)
console.log(res)
let version;
if (uni.getSystemInfoSync().platform == 'android') {
version = res.version
}
if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion
}
version = res.version
// && uni.getSystemInfoSync().platform == 'android'
if (widgetInfo.version < version) {
let downloadLink = '';
let androidLink = res.androidWgtUrl;
let iosLink = res.iosWgtUrl;
@@ -635,7 +645,7 @@
onShow: function() {
// #ifdef H5
isH5Android()
// isH5Android()
// #endif
console.log('App Show')