提交 125cc859 编写于 作者: 雪洛's avatar 雪洛

fix: 一键登录自动获取客户端appId

上级 71c12f39
'use strict'; 'use strict';
exports.main = async function(event) { exports.main = async function(event, context) {
const res = await uniCloud.getPhoneNumber({ const res = await uniCloud.getPhoneNumber({
appid: '__UNI__3584C99', // 替换成自己开通一键登录的应用的DCloud appid appid: context.appId, // 替换成自己开通一键登录的应用的DCloud appid
provider: 'univerify', provider: 'univerify',
access_token: event.access_token, access_token: event.access_token,
openid: event.openid openid: event.openid
}) })
// 执行入库等操作,正常情况下不要把完整手机号返回给前端 // 执行入库等操作,正常情况下不要把完整手机号返回给前端
return { return {
code: 0, errCode: 0,
message: '获取手机号成功', errMsg: '获取手机号成功',
res: res res: res
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册