济宁君天建设公司网站,做百度推广的网站,免费网站建设平台,如何做好宣传推广官方文档 uni-app官网
文档写的不全#xff0c;没有写离线打包流程
加lib 签名里带 sign in with apple hbuilder开关
代码
测试代码#xff0c;获取app里所有的provider
uni.getProvider({service: oauth,success: function (res) {console.log(res.provider)uni.showT…官方文档 uni-app官网
文档写的不全没有写离线打包流程
加lib 签名里带 sign in with apple hbuilder开关
代码
测试代码获取app里所有的provider
uni.getProvider({service: oauth,success: function (res) {console.log(res.provider)uni.showToast({title:JSON.stringify(res),icon:none})}
});正式代码
uni.login({ provider: apple, success: function (loginRes) { // 登录成功 uni.getUserInfo({ provider: apple, success(res) { // 获取用户信息成功 console.log(res)/*返回的数据{errMsg: getUserInfo:ok,rawData: json字符串,userInfo: {openId: xxx.xxxxx.xxx, // 苹果用户唯一标识符该值在同一个开发者账号下的所有 App 下是一样的开发者可以用该唯一标识符与自己后台系统的账号体系绑定起来。fullName: {}, // 当且仅当第一次授权才会返回authorizationCode: 12345678xxx, // 服务器验证需要使用的参数identityToken: header.payload.signature, // 服务器验证需要使用的参数realUserStatus: 1 // 用于判断当前登录的苹果账号是否是一个真实用户},signature: }*/if(res.userInfo.openId ! undefined){uni.showToast({title:登录成功})}} }) }, fail: function (err) { console.log(login fail2, err)uni.showToast({title:JSON.stringify(err),icon:none})} });