加一个参数:lang:"zh_CN" 就可以了
1. 加在js里面
wx.getUserInfo({
lang:"zh_CN",
success: function(res) {
var userInfo = res.userInfo
var nickName = userInfo.nickName
var avatarUrl = userInfo.avatarUrl
var gender = userInfo.gender //性别 0:未知、1:男、2:女
var province = userInfo.province
var city = userInfo.city
var country = userInfo.country
}
2.加在 行内
<button open-type='getUserInfo' lang="zh_CN" bindgetuserinfo="onGotUserInfo"></button>