提交 60baaa85 编写于 作者: 雪洛's avatar 雪洛

update(uniCloud): 优化错误信息

update: mp-alipay getOpenUserInfo
上级 a25001c3
......@@ -333,8 +333,16 @@ const protocols = { // 需要做转换的 API 列表
}
},
getUserInfo: {
name: 'getAuthUserInfo',
returnValue (result) {
name: my.canIUse('getOpenUserInfo') ? 'getOpenUserInfo' : 'getAuthUserInfo',
returnValue (result) {
if (my.canIUse('getOpenUserInfo')) {
let response = {}
try {
response = JSON.parse(result.response).response
} catch (e) {}
result.nickName = response.nickName
result.avatar = response.avatar
}
result.userInfo = {
nickName: result.nickName,
avatarUrl: result.avatar
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册