即时通讯开发
即时通讯开发
  • 发布:2022-09-02 11:47
  • 更新:2023-11-21 09:20
  • 阅读:1278

打包app getSystemInfo 获取appVersion不是应用版本号appWgtVersion才是应用版本号

分类:HBuilderX

打包app getSystemInfo 获取appVersion不是应用版本号appWgtVersion才是应用版本号
这个13.5.3 是个啥?

{  
  "SDKVersion": "",  
  "appId": "__UNI__A1B7377",  
  "appLanguage": "zh-Hans",  
  "appName": "和信",  
  "appVersion": "13.5.3",  
  "appVersionCode": 130503,  
  "appWgtVersion": "1.0.1",  
  "brand": "oneplus",  
  "browserName": "chrome",  
  "browserVersion": "68.0.3440.70",  
  "deviceBrand": "oneplus",  
  "deviceId": "351542029996218,351542029996218",  
  "deviceModel": "GM1910",  
  "deviceOrientation": "portrait",  
  "devicePixelRatio": 3,  
  "deviceType": "phone",  
  "errMsg": "getSystemInfo:ok",  
  "language": "zh-CN",  
  "model": "GM1910",  
  "osAndroidAPILevel": 25,  
  "osLanguage": "zh-CN",  
  "osName": "android",  
  "osTheme": "light",  
  "osVersion": "7.1.2",  
  "pixelRatio": 3,  
  "platform": "android",  
  "romName": "HydrogenOS",  
  "romVersion": "",  
  "safeArea": {  
    "left": 0,  
    "right": 360,  
    "top": 24,  
    "bottom": 640,  
    "width": 360,  
    "height": 616  
  },  
  "safeAreaInsets": {  
    "top": 24,  
    "right": 0,  
    "bottom": 0,  
    "left": 0  
  },  
  "screenHeight": 640,  
  "screenWidth": 360,  
  "statusBarHeight": 24,  
  "system": "Android 7.1.2",  
  "ua": "Mozilla/5.0 (Linux; Android 7.1.2; GM1910 Build/N2G48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.70 Mobile Safari/537.36 uni-app (Immersed/24.0)",  
  "uniCompileVersion": "3.5.3",  
  "uniPlatform": "app",  
  "uniRuntimeVersion": "3.5.3",  
  "version": "1.9.9.81428",  
  "windowBottom": 50,  
  "windowHeight": 590,  
  "windowTop": 0,  
  "windowWidth": 360  
}  
2022-09-02 11:47 负责人:无 分享
已邀请:
甜美苦笑

甜美苦笑

我也遇到了,在app端返回的版本号是错误的,h5上又是正确的。楼主解决了吗?

  • 即时通讯开发 (作者)

    打包以后就是正确的了

    2022-09-13 08:47

  • 甜美苦笑

    回复 3***@qq.com: 这算不算是一种bug呢,应该开发和打包一致才对呀

    2022-09-21 22:18

DCloud_UNI_LXH

DCloud_UNI_LXH

appVersion 是 manifest 中应用版本名称
appWgtVersion 是应用资源(wgt)的版本名称。是 wgt 的版本名称

  • 即时通讯开发 (作者)

    打包以后就正确了

    2022-09-13 08:47

  • 即时通讯开发 (作者)

    appVersion 是 manifest 中应用版本名称 我填的是1.0.1 但是显示的是"13.5.3",

    2022-09-13 08:48

  • 弈凌

    文档中说明下吧,调试的时候获取到的确实是错误的,得到的应该是基座版本号。而且,appVersionCode在app中获取的是数字,在h5中获取的又是字符串

    2023-03-20 22:38

h***@163.com

h***@163.com

可以使用自定义基座

要回复问题请先登录注册