| appId | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | 4.61 |
| manifest.json 中应用appid,即DCloud appid。
|
| appName | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | 4.61 |
| manifest.json 中应用名称。
|
| appVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | 4.61 |
| manifest.json 中应用版本名称,如果离线打包注意修改修改index.kt中UniAppConfig类型中的版本名称文档。
|
| appVersionCode | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | x |
| manifest.json 中应用版本号,如果离线打包注意修改修改index.kt中UniAppConfig类型中的版本号文档。
|
| appLanguage | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | x |
| 应用设置的语言en、zh-Hans、zh-Hant、fr、es
|
| language | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | x |
| 应用设置的语言
|
| appWgtVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | x | x | x | 4.61 |
| 应用资源(wgt)的版本名称。
|
| hostLanguage | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | 4.41 | x | x | x | 4.61 |
| 小程序宿主语言
|
| hostVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | 4.41 | x | x | x | x |
| App、小程序宿主版本。
|
| hostName | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | 4.41 | x | x | x | x |
| 小程序宿主名称
|
| hostPackageName | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | x | x | x | x |
| 小程序宿主包名
|
| hostSDKVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | 4.41 | x | x | x | x |
| uni小程序SDK版本、小程序客户端基础库版本
|
| hostTheme | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | x | x | x | x |
| 系统当前主题,取值为light或dark。微信小程序全局配置"darkmode":true时才能获取,否则为 null (不支持小游戏)
|
| isUniAppX | boolean | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.18 | 4.41 | 3.91 | 4.11 | 4.11 | x |
| 是否uni-app x
|
| uniCompilerVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.18 | 4.41 | 4.0 | 4.11 | 4.11 | 4.61 |
| uni 编译器版本
|
| uniPlatform | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | 4.61 |
| uni-app 运行平台。
|
| 合法值 | 兼容性 | 描述 | | app | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | web | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-weixin | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-alipay | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-baidu | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-toutiao | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-lark | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-qq | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-kuaishou | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-jd | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | mp-360 | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | quickapp-webview | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | quickapp-webview-union | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | quickapp-webview-huawei | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - |
|
| uniRuntimeVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.18 | 4.41 | 3.91 | 4.11 | 4.11 | x |
| uni 运行时版本
|
| uniCompilerVersionCode | number | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.18 | 4.41 | 4.0 | 4.11 | 4.11 | 4.61 |
| uni 编译器版本号
|
| uniRuntimeVersionCode | number | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | 4.0 | 4.41 | 3.91 | 4.11 | 4.11 | 4.61 |
| uni 运行时版本号
|
| packageName | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | 3.97 | x | x | 4.61 |
| Android的包名
|
| bundleName | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | x | x | x | 4.61 |
| 鸿蒙的包名
|
| bundleId | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | x | 4.11 | 4.11 | x |
| iOS的bundleId
|
| signature | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | 3.97 | 4.11 | 4.11 | x |
| Android: 应用签名证书的SHA1值(全部为小写,中间不包含“:”)。 iOS: 应用签名证书中绑定的Bundle ID(AppleID)的md5值(全部为小写)。
|
| appTheme | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | 4.18 | 4.18 | 4.18 | 4.61 |
| 当前App的主题
|
| 合法值 | 兼容性 | 描述 | | light | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | dark | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | auto | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - |
|
| channel | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | x | 4.28 | 4.31 | 4.31 | x |
| 当前应用分发的渠道
|
| SDKVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | 4.41 | - | - | - |
| 客户端基础库版本
|
| enableDebug | boolean | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | 4.41 | - | - | - |
| |
| fontSizeScaleFactor | number | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | 4.41 | - | - | - |
| 微信字体大小缩放比例
|
| fontSizeSetting | number | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | 4.41 | - | - | - |
| 需要基础库: 2.23.4
微信字体大小,单位px
|
| host | GetAppBaseInfoResultHost | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | 4.41 | - | - | - |
| 当前小程序运行的宿主环境
|
| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 | | appId | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | 4.41 | - | - | - |
| 宿主 app(第三方App) 对应的 appId (当小程序运行在第三方App环境时才返回)
|
|
| theme | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | 4.41 | - | - | - |
| 系统当前主题,取值为light或dark,全局配置"darkmode":true时才能获取,否则为 undefined (不支持小游戏)
可选值: - 'dark': 深色主题; - 'light': 浅色主题;
|
| 合法值 | 兼容性 | 描述 | | dark | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - | | light | |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| | - | - | - | - | - |
| - |
|
uniCompileVersionCode | number | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | 4.41 | 3.91 | 4.11 | 4.11 | 4.61 |
| uni 编译器版本号 已废弃,仅为了向下兼容保留 |
uniCompileVersion | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | 4.41 | 3.91 | 4.11 | 4.11 | x |
| uni 编译器版本 已废弃,仅为了向下兼容保留 |
version | string | 否 | - | |
Web
|
微信小程序
|
Android
|
iOS
|
iOS uni-app x UTS 插件
|
HarmonyOS
| | x | 4.41 | 3.91 | 4.11 | 4.11 | 4.61 |
| 引擎版本号。已废弃,仅为了向下兼容保留 已废弃,仅为了向下兼容保留 |