提交 2ea33f18 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复因为uniVerify驼峰法与plus.oauth.getServices获取到的名称不保持一致导致的登陆项配置无效

上级 349ccbc1
...@@ -46,8 +46,8 @@ export default function() { ...@@ -46,8 +46,8 @@ export default function() {
} }
//控制登陆优先级 //控制登陆优先级
if (url == '/pages/ucenter/login-page/index/index') { if (url == '/pages/ucenter/login-page/index/index') {
//一键登录(uniVerify)、账号(username)、验证码登陆(短信smsCode) //一键登录(univerify)、账号(username)、验证码登陆(短信smsCode)
if (login[0] == 'uniVerify') { if (login[0] == 'univerify') {
// console.log(e.url,url); // console.log(e.url,url);
if (e.url == url) { if (e.url == url) {
e.url += '?' e.url += '?'
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
//去掉配置项中不存在的项 //去掉配置项中不存在的项
for (var i = 0; i < servicesList.length; i++) { for (var i = 0; i < servicesList.length; i++) {
if (!this.loginConfig.includes(servicesList[i].id)) { if (!this.loginConfig.includes(servicesList[i].id)) {
console.log(servicesList[i].id); console.log('去掉配置项中不存在的项',servicesList[i].id);
servicesList.splice(i, 1) servicesList.splice(i, 1)
} }
} }
...@@ -119,7 +119,8 @@ ...@@ -119,7 +119,8 @@
oauthServices.forEach(({ oauthServices.forEach(({
id id
}) => { }) => {
if (this.config[id].isChecked) { console.log(9527,id);
if (this.config[id].isChecked&&this.loginConfig.includes(id)) {
this.servicesList.push({ this.servicesList.push({
...this.config[id], ...this.config[id],
id id
......
{ {
"name" : "uni-starter", "name" : "uni-starter",
"appid" : "__UNI__E5373F7", "appid" : "__UNI__03B096E",
"description" : "集成了商用项目开发常见功能的项目模板", "description" : "集成了商用项目开发常见功能的项目模板",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
"modules" : { "modules" : {
"Fingerprint" : {}, "Fingerprint" : {},
"Share" : {}, "Share" : {},
"Push" : {} "Push" : {},
"OAuth" : {}
}, },
/* 应用发布信息 */ /* 应用发布信息 */
"distribute" : { "distribute" : {
......
...@@ -25,7 +25,7 @@ module.exports = { ...@@ -25,7 +25,7 @@ module.exports = {
"/uni_modules/uni-news-favorite/pages/uni-news-favorite/list", "/uni_modules/uni-news-favorite/pages/uni-news-favorite/list",
"/pages/ucenter/userinfo/uploadCutImageToUnicloud" "/pages/ucenter/userinfo/uploadCutImageToUnicloud"
], ],
"login": ["smsCode","uniVerify", "username", "weixin", "apple"], "login": ["smsCode","univerify", "username", "weixin", "apple"],
/* /*
根据数组的第0项,决定登陆方式的第一优先级。 根据数组的第0项,决定登陆方式的第一优先级。
未列举到的,或设备环境不支持的选项,将被隐藏。 未列举到的,或设备环境不支持的选项,将被隐藏。
......
...@@ -186,7 +186,7 @@ exports.main = async (event, context) => { ...@@ -186,7 +186,7 @@ exports.main = async (event, context) => {
await loginLog(res) await loginLog(res)
break; break;
case 'login_by_univerify': case 'login_by_univerify':
res = await uniID.loginByUniverify(params) res = await uniID.loginByuniverify(params)
await loginLog(res) await loginLog(res)
break; break;
case 'login_by_apple': case 'login_by_apple':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册