

'use strict';
exports.main = async (event, context) => {
let params = JSON.parse(event.body)
console.log(params);
const {
access_token,
openid,
appid
} = params
const res = await uniCloud.getPhoneNumber({
provider: 'univerify',
appid: appid ||
'__UNI__1F2****', // DCloud appid,不同于callFunction方式调用,使用云函数Url化需要传递DCloud appid参数
// apiKey: '', // 在开发者中心开通服务并获取apiKey
// apiSecret: '', // 在开发者中心开通服务并获取apiSecret
access_token: access_token,
openid: openid
})
// 返回手机号给自己服务器
return {...res,...params}
};
