May 18, 2021 WeChat Mini Program Development Document
Base library 1.4.0 starts to support, and low versions need to be compatible.
Used to display WeChat's open data.
Property | Type | The default | Required | Description | The lowest version |
---|---|---|---|---|---|
type | string | Whether | Open data type | 1.4.0 | |
open-gid | string | Whether | The group id takes effect when type is "groupName" | 1.4.0 | |
Lang | string | En | Whether | Effective when type is "user", in which language userInfo is presented | 1.4.0 |
default-text | string | Whether | The default case when the data is empty | 2.8.1 | |
default-avatar | string | Whether | The default picture when the user profile picture is empty, supporting relative and network picture paths | 2.8.1 | |
binderror | eventhandle | Whether | Triggered when the group name or user information is empty | 2.8.1 |
The legal value of type
Value | Description | The lowest version |
---|---|---|
groupName | Pull the group name | 1.4.0 |
userNickName | The user's nickname | 1.9.90 |
userAvatarUrl | The user profile picture | 1.9.90 |
userGender | The user's gender | 1.9.90 |
userCity | The user's city | 1.9.90 |
userProvince | The province in which the user is located | 1.9.90 |
userCountry | The user's country | 1.9.90 |
userLanguage | The user's language | 1.9.90 |
The legal value of the lang
Value | Description | The lowest version |
---|---|---|
En | English | |
zh_CN | Chinese Simplified | |
zh_TW | Chinese Traditional |
<open-data type="groupName" open-gid="xxxxxx"></open-data>
<open-data type="userAvatarUrl"></open-data>
<open-data type="userGender" lang="zh_CN"></open-data>