斗战胜佛
斗战胜佛
  • 发布:2023-12-09 16:23
  • 更新:2023-12-09 16:38
  • 阅读:359

uni.getSystemInfoSync().uniPlatform 取值为 undefined,这个参数没用了吗?

分类:uni-app

uni.getSystemInfoSync().uniPlatform 取值为 undefined,这个参数没用了吗?

之前在开发者工具里还能够取到值,今天再运行就么有了

2023-12-09 16:23 负责人:无 分享
已邀请:
爱豆豆

爱豆豆 - 办法总比困难多

可以正常取值啊 你运行的那个端呢?

  • 斗战胜佛 (作者)

    是微信开发者工具里运行的

    2023-12-09 16:34

  • 斗战胜佛 (作者)

    screenHeight: 568

    screenTop: 48

    screenWidth: 320

    statusBarHeight: 20

    system: "iOS 10.0.1"

    ua: undefined

    uniCompileVersion: undefined

    uniPlatform: undefined

    uniRuntimeVersion: undefined

    version: "8.0.5"

    wifiEnabled: true

    windowBottom: 0

    windowHeight: 520

    windowTop: 0

    windowWidth: 320

    2023-12-09 16:41

  • 爱豆豆

    回复 斗战胜佛: 会不会是hbx版本的问题 你回退到上个版本试试?

    2023-12-09 16:46

  • 斗战胜佛 (作者)

    回复 爱豆豆: 我上面的项目是命令行运行的,vue3的项目


    下面是我hbx里 vue2版本的项目,可以获取到:

    system: "iOS 10.0.1"

    ua: undefined

    uniCompileVersion: "3.98"

    uniPlatform: "mp-weixin"

    uniRuntimeVersion: "3.98"

    version: "8.0.5"

    2023-12-09 16:56

  • 斗战胜佛 (作者)

    回复 爱豆豆: vue3项目包版本:


    "@dcloudio/uni-app": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-app-plus": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-components": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-h5": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-i18n": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-mp-alipay": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-mp-baidu": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-mp-lark": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-mp-qq": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3081120230719001",

    "@dcloudio/uni-ui": "^1.4.28",

    2023-12-09 16:57

  • 爱豆豆

    回复 斗战胜佛: 我刚用cli创建的uni v3 项目也是可以获取到uniPlatform的

    2023-12-09 17:15

要回复问题请先登录注册