作者 芦瑞泽

1

... ... @@ -19,12 +19,13 @@
"type" : "uniCloud"
},
{
"openVueDevtools" : true,
"playground" : "standard",
"openVueDevtools" : false,
"playground" : "custom",
"type" : "uni-app:app-android"
},
{
"openVueDevtools" : true,
"openVueDevtools" : false,
"playground" : "custom",
"type" : "uni-app:app-ios"
}
]
... ...
... ... @@ -2,8 +2,8 @@
"name" : "宠研兽医",
"appid" : "__UNI__AB7B27B",
"description" : "",
"versionName" : "1.0.5",
"versionCode" : 1050,
"versionName" : "1.0.7",
"versionCode" : 1070,
"transformPx" : false,
"extensions" : {
"uni-cloud-verify" : {} // 启用一键登录扩展,值为空对象即可
... ...
... ... @@ -128,6 +128,7 @@ const oneClickLoginHandler = () => {
async success(res) {
uni.getCheckBoxState({
async success(re) {
console.log(re, '成功re')
if (re.state) {
// 登录成功
console.log(res, '成功')
... ... @@ -152,6 +153,7 @@ const oneClickLoginHandler = () => {
uni.reLaunch({ url: '/pages/index/index' })
// }, 800)
} catch (error) {
console.log('re==error',error);
uni.$u.toast(error)
setTimeout(() => {
uni.closeAuthView()
... ... @@ -160,16 +162,15 @@ const oneClickLoginHandler = () => {
} else {
uni.$u.toast('请先同意阅读隐私协议')
}
console.log(res) // Boolean 用户是否勾选了选框
console.log('Boolean',res) // Boolean 用户是否勾选了选框
},
fail(res) {
console.log(res)
console.log('getCheckBoxState==fail',res)
}
})
},
fail(res) {
console.log(res, '失败')
console.log(res.errMsg)
}
})
}
... ...
... ... @@ -8,8 +8,8 @@ exports.main = async (event, context) => {
const res = await uniCloud.getPhoneNumber({
appid: '__UNI__AB7B27B', // 客户端callFunction时携带的AppId信息
provider: 'univerify',
apiKey: '3fbbf2f0cc452b857ee45dde9c3b1f5e', // 在uniCloud控制台开通一键登录服务并获取apiKey
apiSecret: '2bc476e13e6545a9c9389a7631a1a6c0', // 在uniCloud控制台开通一键登录服务并获取apiSecret
apiKey: '9d7a545c1c13c45c8d59fd5f8148a98a', // 在uniCloud控制台开通一键登录服务并获取apiKey
apiSecret: '453613995b84b3969bee4eec8fa0833d', // 在uniCloud控制台开通一键登录服务并获取apiSecret
access_token: params.access_token,
openid: params.openid
})
... ...