一键登录

This commit is contained in:
唐明明
2021-10-20 10:41:49 +08:00
parent 0fb9a41178
commit 9052c3001b
46 changed files with 1474 additions and 660 deletions

View File

@@ -13,33 +13,34 @@ import store from '../store'
class userAuth {
constructor() {
this.univerfyConfig = {
fullScreen : true,
fullScreen : false,
authButton: {
'title': '一键登录',
'normalColor': '#c82626',
'highlightColor': '#a61010',
'disabledColor': '#d86767',
'normalColor': '#8b64fd',
'highlightColor': '#824f9a',
'disabledColor': '#8b64fd',
'borderRadius': '0'
},
otherLoginButton: {
'visible': false,
'title': '其他手机号码',
'borderColor': '#c82626',
'borderColor': '#8b64fd',
'borderRadius': '0',
'textColor': '#c82626'
'textColor': '#8b64fd'
},
privacyTerms: {
'checkedImage': '/static/icons/checked-icon.png',
'uncheckedImage': '/static/icons/unchecked-icon.png',
'textColor': '#555555',
'termsColor': '#c82626',
'suffix': '并使用本机号码登录/注册',
'privacyItems': [{
'url': 'https://www.baidu.com',
'title': '用户隐私规格'
},{
'url': 'https://www.baidu.com',
'title': '用户服务协议'
}]
'termsColor': '#8b64fd',
// 'suffix': '并使用本机号码登录/注册'
// 'privacyItems': [{
// 'url': 'https://www.baidu.com',
// 'title': '用户隐私规格'
// },{
// 'url': 'https://www.baidu.com',
// 'title': '用户服务协议'
// }]
}
}
}
@@ -79,16 +80,14 @@ class userAuth {
success: authResult => {
keyAuth({
access_token: authResult.authResult.access_token,
openid : authResult.authResult.openid
openid : authResult.authResult.openid,
parent_id : getApp().globalData.parentId
}).then(res => {
uni.closeAuthView()
store.commit('setToken', res.token_type + ' ' + res.access_token)
resolve()
if(!res.is_company){
router.push({name: "Registered"})
return
}
}).catch(err => {
uni.closeAuthView()
reject(err)
})
},