本地开发环境:
uni-upgrade-center - Admin 版本:0.6.2
uni-upgrade-center - App 版本:0.9.4
HbuilderX 版本:4.36
uniCloud:支付宝云
vue: 3.0
根据官方指引,在管理后台上传App安装包和wgt资源包,云数据库已经有了 opendb-app-versions,且有数据了。但是我在本地调用 checkUpdate() 方法时,提示 widgetInfo.version is EMPTY。
查看源码,发现call-check-version.ts 文件plus.runtime.getProperty() 拿到的结果是:
widgetInfo结果:
{
"appid": "UNIEA53806",
"version": "",
"versionCode": "",
"features": []
}
systemInfo结果:
{
"SDKVersion": "",
"appId": "UNIEA53806",
"appLanguage": "en",
"appName": "PCIM",
"appVersion": "14.36",
"appVersionCode": 1436,
"appWgtVersion": "1.2.2",
"brand": "google",
"browserName": "chrome",
....
}
我在本地测试:
uniCloud.callFunction({
name: 'uni-upgrade-center',
data: {
action: 'checkVersion',
appid: appId,
appVersion: appVersion,
wgtVersion: "1.2.2"
},
success: (e) => {
resolve(e.result as UniUpgradeCenterResult)
},
fail: (error) => {
reject(error)
}
})
提示:Error: 未匹配到云函数[uni-upgrade-center]
不知道哪里出了问题?
Johnny_new
你好你解决了吗
2025-01-09 10:35