|
|
@@ -12,15 +12,15 @@ export default {
|
|
|
try {
|
|
|
const systemInfo = uni.getSystemInfoSync()
|
|
|
|
|
|
- console.log(systemInfo,'systemInfosystemInfosystemInfo')
|
|
|
+ console.log(systemInfo,'systemInfosystemInfo')
|
|
|
// #ifdef APP-PLUS
|
|
|
// App 端优先使用 plus API
|
|
|
return plus.runtime.version
|
|
|
// #endif
|
|
|
|
|
|
- // 小程序和 H5 端使用 uni.getSystemInfoSync 的 appVersion 字段
|
|
|
- if (systemInfo.appVersion) {
|
|
|
- return systemInfo.appVersion
|
|
|
+ // 小程序和 H5 端使用 uni.getSystemInfoSync
|
|
|
+ if (systemInfo.version) {
|
|
|
+ return systemInfo.version
|
|
|
}
|
|
|
|
|
|
// 如果获取不到,返回配置文件的版本号
|
|
|
@@ -46,8 +46,8 @@ export default {
|
|
|
// #endif
|
|
|
|
|
|
// #ifndef APP-PLUS
|
|
|
- if (res.appVersion) {
|
|
|
- resolve(res.appVersion)
|
|
|
+ if (res.version) {
|
|
|
+ resolve(res.version)
|
|
|
} else {
|
|
|
resolve(versionConfig.getVersionName())
|
|
|
}
|