feat:系统更新

This commit is contained in:
houjunxiang
2025-12-24 15:46:30 +08:00
parent 164e305442
commit 7caeffbf1d
8 changed files with 63 additions and 33 deletions

View File

@@ -10,21 +10,27 @@ export default function () {
uni.request({
url:
getUpgradeBaseUrl() +
'/api/sys/app-client-version/latestVersionUniapp?clientId=' +
appId +
'&platform=' +
osName +
'&tenantId=' +
getTenantId(),
'/qms/version-management/checkUpdate?' +
'applicationCode=ytgg_lims' +
'&updatePlatform=android',
method: 'GET',
success: res => {
if (res.data && res.data.result) {
res.data.result.localVersion = plus.runtime.version
res.data.result.localWgtVersion = widgetInfo.version
res.data.result.url = getUpgradeBaseUrl() + res.data.result.url
console.log(res)
const data = res.data.data
if (data) {
data.localVersion = plus.runtime.version
data.localWgtVersion = widgetInfo.version
data.version = data.currentVersion
data.url = data.downloadUrl
data.type = data.updateType
data.platform = data.updatePlatform
data.is_silently = data.silenceFlag == '1'
data.is_mandatory = data.mustFlag == '1'
data.contents = data.updateContent
}
console.log('更新信息:', res.data)
resolve(res.data)
console.log('更新信息:', data)
resolve(data)
},
fail: err => {
reject(error)