提交 a27daf0a 编写于 作者: DCloud_JSON's avatar DCloud_JSON 提交者: study夏羽

使用2.0版。当显示分享窗口时,监听返回操作(如:物理返回,全面屏手机侧滑)关闭分享窗口,而不是关闭当前页面。

上级 48ade9e8
......@@ -13,10 +13,7 @@
</view>
</template>
<script>
import {
mapGetters,
mapMutations
} from 'vuex';
import {mapGetters,mapMutations} from 'vuex';
//前一个窗口的页面地址。控制点击切换快捷登录方式是创建还是返回
import loginSuccess from '@/pages/ucenter/login-page/common/loginSuccess.js';
const db = uniCloud.database();
......@@ -177,6 +174,41 @@
uni.showLoading({
mask: true
})
//univerifyManager
if(type == 'univerify' && uni.getUniverifyManager){
// 调用一键登录弹框
const univerifyManager = uni.getUniverifyManager()
univerifyManager.login({
"univerifyStyle": this.univerifyStyle,
success (res) {
console.log('login success', res)
}
})
const callback = (res) => {
// 获取一键登录弹框协议勾选状态
univerifyManager.getCheckBoxState({
success(res) {
console.log("getCheckBoxState res: ", res);
if (res.state) {
// 关闭一键登录弹框
univerifyManager.close()
}
}
})
}
// 订阅自定义按钮点击事件
univerifyManager.onButtonsClick(callback)
// 取消订阅自定义按钮点击事件
univerifyManager.offButtonsClick(callback)
}else{
console.log(type);
console.log('uni.getUniverifyManager:'+uni.getUniverifyManager);
}
uni.login({
"provider": type,
"onlyAuthorize":true, //请勿直接使用前端获取的unionid或openid直接用于登录,前端的数据都是不可靠的
......
......@@ -65,6 +65,8 @@
"Geolocation": {
},
"Push": {
},
"Bluetooth": {
}
},
"distribute": {
......
## 1.0.7(2021-10-20)
新增bindMobileByMpWeixin,一键获取微信绑定的手机号
## 1.0.6(2021-09-23)
修复微信登陆成功后没有添加日志的问题
## 1.0.5(2021-08-10)
......
{
"id": "uni-id-cf",
"displayName": "uni-id-cf",
"version": "1.0.6",
"version": "1.0.7",
"description": "uni-id-cf",
"keywords": [
"uni-id-cf",
......
......@@ -59,7 +59,8 @@
"OAuth" : {},
"FaceID" : {},
"Geolocation" : {},
"Push" : {}
"Push" : {},
"Bluetooth" : {}
},
"distribute" : {
"android" : {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册