在
manifest.json
APP原生插件配置
插件引入无反应
<view class="souji_yijian" @tap="souji_yijian()">
手机一键登录
</view>
methods: {
souji_yijian(){
console.log("tset==一键登录测试")
const jv = uni.requireNativePlugin('JG-JVerification');
jv.init({
timeout:7000,
isProduction:false,
},result=>{
let code = result.code
let desc = result.content
});
jv.isInitSuccess(result=>{
let isSucc = result.enable;
})
jv.checkVerifyEnable(result=>{
let isSupport = result.enable;
})
jv.preLogin(7000,result=>{
let code = result.code;
let token = result.content;
});
jv.loginAuth({
autoFinish:true,
timeout:5000
},result=>{
// 结果监听
let code = result.code;
let loginToken = result.content;
let operator = result.operator;
},event=>{
// 事件监听
let code = result.code;
let eventDesc = result.content;
})
jv.clearPreLoginCache();
console.log("1111122==一键登录测试")
},
jtshushu (作者)
感谢你的回复! 能读出 const jv = uni.requireNativePlugin('JG-JVerification');
这个的方法 却不执行 奇怪
2020-11-27 14:41
DCloud_uniCloud_JSON
回复 jtshushu: 下一个版本的hbuilderx,uni-app将集成一键登录功能,敬请期待!
2020-11-27 14:50
jtshushu (作者)
回复 DCloud_uniCloud_JSON: 太好了! 具体什么时候呢 项目急上线
2020-11-27 15:35