提交 1b29381c 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复,仅配置一种快捷登录时的错误

上级 0db87f78
## 1.0.32(2021-07-06)
修复,仅配置一种快捷登录时的错误
## 1.0.31(2021-07-02) ## 1.0.31(2021-07-02)
优化项目文档 优化项目文档
## 1.0.30(2021-07-01) ## 1.0.30(2021-07-01)
......
...@@ -9,7 +9,7 @@ import interceptorChooseImage from '@/uni_modules/json-interceptor-chooseImage/j ...@@ -9,7 +9,7 @@ import interceptorChooseImage from '@/uni_modules/json-interceptor-chooseImage/j
const db = uniCloud.database() const db = uniCloud.database()
export default async function() { export default async function() {
let loginConfig = uniStarterConfig.router.login let loginConfig = uniStarterConfig.router.login
//清除有配置但设备环境不支持的登陆项 //清除有配置但设备环境不支持的登陆项
// #ifdef APP-PLUS // #ifdef APP-PLUS
await new Promise((callBack)=>{ await new Promise((callBack)=>{
plus.oauth.getServices(oauthServices => { plus.oauth.getServices(oauthServices => {
...@@ -25,7 +25,6 @@ export default async function() { ...@@ -25,7 +25,6 @@ export default async function() {
return true return true
} }
}) })
if(loginConfig.includes('univerify')){ //一键登录 功能预登录 if(loginConfig.includes('univerify')){ //一键登录 功能预登录
uni.preLogin({ uni.preLogin({
provider:'univerify', provider:'univerify',
...@@ -41,6 +40,7 @@ export default async function() { ...@@ -41,6 +40,7 @@ export default async function() {
}) })
// #endif // #endif
//非app移除:一键登录、苹果登陆;h5移除微信登陆,如果你做微信公众号登陆需要将此行移除
// #ifndef APP-PLUS // #ifndef APP-PLUS
loginConfig = loginConfig.filter(item=>{ loginConfig = loginConfig.filter(item=>{
return ![ return ![
...@@ -52,19 +52,15 @@ export default async function() { ...@@ -52,19 +52,15 @@ export default async function() {
].includes(item) ].includes(item)
}) })
// #endif // #endif
uniStarterConfig.router.login = loginConfig uniStarterConfig.router.login = loginConfig
// uniStarterConfig挂载到getApp().globalData.config // uniStarterConfig挂载到getApp().globalData.config
// #ifdef MP-WEIXIN
setTimeout(()=>{ setTimeout(()=>{
// #endif
getApp({allowDefault: true}).globalData.config = uniStarterConfig; getApp({allowDefault: true}).globalData.config = uniStarterConfig;
// #ifdef MP-WEIXIN },1)
},100)
// #endif
// 初始化appVersion(仅app生效) // 初始化appVersion(仅app生效)
initAppVersion(); initAppVersion();
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
computed: { computed: {
loginConfig() { loginConfig() {
return getApp().globalData.config.router.login return getApp().globalData.config.router.login
}, },
agreements() { agreements() {
return getApp().globalData.config.about.agreements || [] return getApp().globalData.config.about.agreements || []
} }
}, },
data() { data() {
...@@ -36,58 +36,63 @@ ...@@ -36,58 +36,63 @@
"text": "短信验证码", "text": "短信验证码",
"logo": "/static/uni-quick-login/sms.png", "logo": "/static/uni-quick-login/sms.png",
"path": "/pages/ucenter/login-page/index/index" "path": "/pages/ucenter/login-page/index/index"
},
{
"id": "weixin",
"text": "微信登录",
"logo": "/static/uni-quick-login/wechat.png",
},
{
"id": "apple",
"text": "苹果登录",
"logo": "/static/uni-quick-login/apple.png",
},
{
"id": "univerify",
"text": "一键登录",
"logo": "/static/uni-quick-login/univerify.png",
},
{
"id": "qq",
"text": "QQ登录", //暂未提供该登录方式的接口示例
"logo": "/static/uni-quick-login/univerify.png",
},
{
"id": "xiaomi",
"text": "小米登录", //暂未提供该登录方式的接口示例
"logo": "/static/uni-quick-login/univerify.png",
},
{
"id": "sinaweibo",
"text": "微博登录", //暂未提供该登录方式的接口示例
"logo": "/static/uni-quick-login/univerify.png",
} }
], ],
oauthServices: [], oauthServices: [],
config: { config: {},
"weixin": { univerifyStyle: { //一键登录弹出窗的样式配置参数
"text": "微信登录", "fullScreen": true, // 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
"logo": "/static/uni-quick-login/wechat.png", "backgroundColor": "#ffffff", // 授权页面背景颜色,默认值:#ffffff
}, "buttons": { // 自定义登陆按钮
"apple": { "iconWidth": "45px", // 图标宽度(高度等比例缩放) 默认值:45px
"text": "苹果登录", "list": []
"logo": "/static/uni-quick-login/apple.png", },
}, "privacyTerms": {
"univerify": { "defaultCheckBoxState": false, // 条款勾选框初始状态 默认值: true
"text": "一键登录", "textColor": "#BBBBBB", // 文字颜色 默认值:#BBBBBB
"logo": "/static/uni-quick-login/univerify.png", "termsColor": "#5496E3", // 协议文字颜色 默认值: #5496E3
}, "prefix": "我已阅读并同意", // 条款前的文案 默认值:“我已阅读并同意”
"qq": { "suffix": "并使用本机号码登录", // 条款后的文案 默认值:“并使用本机号码登录”
"text": "QQ登录",//暂未提供该登录方式的接口示例 "privacyItems": []
"logo": "/static/uni-quick-login/univerify.png", }
},
"xiaomi": {
"text": "小米登录",//暂未提供该登录方式的接口示例
"logo": "/static/uni-quick-login/univerify.png",
},
"sinaweibo": {
"text": "微博登录",//暂未提供该登录方式的接口示例
"logo": "/static/uni-quick-login/univerify.png",
}
},
univerifyStyle:{ //一键登录弹出窗的样式配置参数
"fullScreen": true, // 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
"backgroundColor": "#ffffff", // 授权页面背景颜色,默认值:#ffffff
"buttons": { // 自定义登陆按钮
"iconWidth": "45px", // 图标宽度(高度等比例缩放) 默认值:45px
"list": []
},
"privacyTerms": {
"defaultCheckBoxState": false, // 条款勾选框初始状态 默认值: true
"textColor": "#BBBBBB", // 文字颜色 默认值:#BBBBBB
"termsColor": "#5496E3", // 协议文字颜色 默认值: #5496E3
"prefix": "我已阅读并同意", // 条款前的文案 默认值:“我已阅读并同意”
"suffix": "并使用本机号码登录", // 条款后的文案 默认值:“并使用本机号码登录”
"privacyItems": []
}
} }
} }
}, },
watch: { watch: {
agree(agree) { agree(agree) {
this.univerifyStyle.privacyTerms.defaultCheckBoxState = agree this.univerifyStyle.privacyTerms.defaultCheckBoxState = agree
} }
}, },
props: { props: {
agree: { agree: {
type: Boolean, type: Boolean,
...@@ -96,60 +101,49 @@ ...@@ -96,60 +101,49 @@
} }
} }
}, },
async created() { async created() {
let servicesList = this.servicesList let servicesList = this.servicesList
//获取当前环境能用的快捷登录方式 //去掉配置中不存在的
// #ifdef MP-WEIXIN servicesList = servicesList.filter(item => this.loginConfig.includes(item.id))
let id = 'weixin' //处理一键登录
servicesList.push({ if(this.loginConfig.includes('univerify')){
...this.config[id], this.univerifyStyle.privacyTerms.privacyItems = this.agreements
id //设置一键登录功能底下的快捷登陆按钮
}) servicesList.forEach(({id,logo}) => {
// #endif if (id != 'univerify') {
// #ifdef APP-PLUS this.univerifyStyle.buttons.list.push({
this.oauthServices = await new Promise((callBack)=>{ "iconPath": logo,
plus.oauth.getServices(oauthServices => { "provider": id
callBack(oauthServices.filter(({nativeClient,id})=>nativeClient)) })
//只返回1.应用支持 && 2.手机已安装对应客户端 && 3.uni-starter.config.js配置项中存在的快捷登录方式 }
}, err => {
callBack([])
uni.hideLoading()
uni.showModal({
title: '获取服务供应商失败:' + JSON.stringify(err),
showCancel: false,
confirmText: '知道了'
});
console.error('获取服务供应商失败:' + JSON.stringify(err));
}) })
})
// #endif
//添加可用的第三方快捷登陆项
servicesList = servicesList.concat(this.oauthServices.map( ({id})=>{
return {...this.config[id],id}
}))
//去掉配置中不存在的
servicesList = servicesList.filter(item=>this.loginConfig.includes(item.id))
this.univerifyStyle.privacyTerms.privacyItems = this.agreements
//设置一键登录功能底下的快捷登陆按钮
servicesList.forEach(({id,logo})=>{
if(id != 'univerify'){
this.univerifyStyle.buttons.list.push({"iconPath":logo,"provider":id})
}
})
//如果当前页面为默认登陆界面。当前第一优先级的“第三方快捷按钮”要隐藏,因为他已经被渲染在默认登陆界面顶部
if(
this.getRoute(1)=='/pages/ucenter/login-page/index/index' &&
this.config[this.loginConfig[0]]
){
servicesList = servicesList.filter(item=>item.id!=this.loginConfig[0])
} }
//去掉当前页面对应的登录选项 //如果当前页面为默认登陆界面。当前第一优先级的“微信和苹果登陆”要隐藏,因为他已经被渲染在默认登陆界面顶部
this.servicesList = servicesList.filter(item=>{ if (
return item.path != this.getRoute(1) this.getRoute(1) == '/pages/ucenter/login-page/index/index' &&
}) ['weixin','apple'].includes(this.loginConfig[0])
console.log('servicesList',servicesList,this.servicesList); ) {
servicesList = servicesList.filter(item => item.id != this.loginConfig[0])
}
//去掉当前页面对应的登录选项
this.servicesList = servicesList.filter(item => {
return item.path != this.getRoute(1)
})
console.log('servicesList', servicesList, this.servicesList);
},
mounted() {
// #ifdef APP-PLUS
plus.oauth.getServices(oauthServices => {
this.oauthServices = oauthServices
}, err => {
uni.showModal({
title: '获取服务供应商失败:' + JSON.stringify(err),
showCancel: false,
confirmText: '知道了'
});
console.error('获取服务供应商失败:' + JSON.stringify(err));
})
// #endif
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
...@@ -169,13 +163,13 @@ ...@@ -169,13 +163,13 @@
uni.navigateBack(); uni.navigateBack();
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: path, url: path,
animationType:'slide-in-left' animationType: 'slide-in-left'
}) })
} }
}, },
login_before(type, navigateBack = true) { login_before(type, navigateBack = true) {
if (!this.agree&&type!='univerify') { if (!this.agree && type != 'univerify') {
return uni.showToast({ return uni.showToast({
title: '你未同意隐私政策协议', title: '你未同意隐私政策协议',
icon: 'none' icon: 'none'
...@@ -201,7 +195,7 @@ ...@@ -201,7 +195,7 @@
}, },
err => { err => {
uni.hideLoading() uni.hideLoading()
console.log(err); console.error(err);
uni.showModal({ uni.showModal({
content: JSON.stringify(err), content: JSON.stringify(err),
showCancel: false showCancel: false
...@@ -236,7 +230,7 @@ ...@@ -236,7 +230,7 @@
}, },
fail: (err) => { fail: (err) => {
uni.hideLoading() uni.hideLoading()
console.log(err); console.error(err);
if (type == 'univerify') { if (type == 'univerify') {
if (err.metadata && err.metadata.error_data) { if (err.metadata && err.metadata.error_data) {
...@@ -274,13 +268,15 @@ ...@@ -274,13 +268,15 @@
title: '点击了第三方登陆', title: '点击了第三方登陆',
icon: 'none' icon: 'none'
}); });
console.log('点击了第三方登陆,provider:',err.provider); console.log('点击了第三方登陆,provider:', err.provider);
let {path} = this.servicesList.find(item=>item.id==err.provider)||{} let {
console.log('path',path); path
if(path&&path!=this.getRoute(1)){ //存在路径,且并不是当前已经打开的路径 } = this.servicesList.find(item => item.id == err.provider) || {}
this.to(path) console.log('path', path);
}else{ if (path && path != this.getRoute(1)) { //存在路径,且并不是当前已经打开的路径
this.login_before(err.provider) this.to(path)
} else {
this.login_before(err.provider)
} }
break; break;
default: default:
...@@ -292,10 +288,7 @@ ...@@ -292,10 +288,7 @@
}) })
}, },
login(params, type) { //联网验证登录 login(params, type) { //联网验证登录
console.log({ console.log({params,type});
params,
type
});
let action = 'loginBy' + type.trim().toLowerCase().replace(type[0], type[0].toUpperCase()) let action = 'loginBy' + type.trim().toLowerCase().replace(type[0], type[0].toUpperCase())
uniCloud.callFunction({ uniCloud.callFunction({
name: 'uni-id-cf', name: 'uni-id-cf',
...@@ -306,7 +299,7 @@ ...@@ -306,7 +299,7 @@
success: ({ success: ({
result result
}) => { }) => {
console.log(result); console.log("login-result",result);
if (result.code === 0) { if (result.code === 0) {
if (type == 'univerify') { if (type == 'univerify') {
uni.closeAuthView() uni.closeAuthView()
......
{ {
"name" : "uni-starter", "name": "uni-starter",
"appid" : "__UNI__03B096E", "appid": "请点击重新获取",
"description" : "云端一体应用快速开发模版", "description": "云端一体应用快速开发模版",
"versionName" : "1.0.0", "versionName": "1.0.0",
"versionCode" : "100", "versionCode": "100",
"transformPx" : false, "transformPx": false,
"app-plus" : { "app-plus": {
"privacy" : { "privacy": {
"prompt" : "template", "prompt": "template",
"template" : { "template": {
"title" : "服务协议和隐私政策", "title": "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://ask.dcloud.net.cn/protocol.html\">《服务协议》</a>和<a href=\"https://ask.dcloud.net.cn/protocol.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "message": "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://ask.dcloud.net.cn/protocol.html\">《服务协议》</a>和<a href=\"https://ask.dcloud.net.cn/protocol.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意", "buttonAccept": "同意",
"buttonRefuse" : "暂不同意" "buttonRefuse": "暂不同意"
} }
}, },
"compatible" : { "compatible": {
"ignoreVersion" : true "ignoreVersion": true
},
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"modules": {
"Fingerprint": {
},
"Share": {
},
"OAuth": {
},
"FaceID": {
},
"Push": {
}
},
"distribute": {
"android": {
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": [
"armeabi-v7a",
"arm64-v8a",
"x86"
]
},
"ios": {
"capabilities": {
"entitlements": {
"com.apple.developer.associated-domains": [
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs": {
"oauth": {
"apple": {
},
"weixin": {
"appid": "wxffdd8fa6ec4ef2a0",
"appsecret": "",
"UniversalLinks": "https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
},
"univerify": {
}
}, },
"usingComponents" : true, "ad": {
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
}, },
"modules" : { "share": {
"Fingerprint" : {}, "weixin": {
"Share" : {}, "appid": "wxffdd8fa6ec4ef2a0",
"OAuth" : {}, "UniversalLinks": "https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
"FaceID" : {}, }
"Push" : {}
}, },
"distribute" : { "geolocation": {
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
},
"ios" : {
"capabilities" : {
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com" ]
}
}
},
"sdkConfigs" : {
"oauth" : {
"apple" : {},
"weixin" : {
"appid" : "wxffdd8fa6ec4ef2a0",
"appsecret" : "",
"UniversalLinks" : "https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
},
"univerify" : {}
},
"ad" : {},
"share" : {
"weixin" : {
"appid" : "wxffdd8fa6ec4ef2a0",
"UniversalLinks" : "https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
}
},
"geolocation" : {},
"push" : {
"unipush" : {}
},
"payment" : {}
}
}, },
"nvueLaunchMode" : "" "push": {
}, "unipush": {
"quickapp" : {}, }
"mp-weixin" : {
"appid" : "wx81dbb061d2258234",
"setting" : {
"urlCheck" : false,
"es6" : false
}, },
"usingComponents" : true, "payment": {
"betterScopedSlots" : true }
}, }
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
}, },
"h5" : { "nvueLaunchMode": ""
"template" : "" },
"quickapp": {
},
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false,
"es6": false
}, },
"_spaceID" : "76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e" "usingComponents": true,
} "betterScopedSlots": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"h5": {
"template": ""
},
"_spaceID": "76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e"
}
\ No newline at end of file
{ {
"id": "uni-starter", "id": "uni-starter",
"displayName": "uni-starter", "displayName": "uni-starter",
"version": "1.0.31", "version": "1.0.32",
"description": "云端一体应用快速开发基本项目模版", "description": "云端一体应用快速开发基本项目模版",
"keywords": [ "keywords": [
"uni-starter", "uni-starter",
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<text class="tip">扫描二维码,您的朋友也可以下载{{about.appName}}客户端</text> <text class="tip">扫描二维码,您的朋友也可以下载{{about.appName}}客户端</text>
</view> </view>
<view class="copyright"> <view class="copyright">
<template v-for="(agreement,index) in about.agreements"> <view class="agreement-box" v-for="(agreement,index) in about.agreements" :key="index">
<text class="agreement" @click="navigateTo(agreement)">{{agreement.title}}</text> <text class="agreement" @click="navigateTo(agreement)">{{agreement.title}}</text>
<text class="hint" v-if="about.agreements.length-1>index"></text> <text class="hint" v-if="about.agreements.length-1>index"></text>
</template> </view>
<text class="hint">Copyright © {{year}}</text> <text class="hint">Copyright © {{year}}</text>
<text class="hint">{{about.company}}</text> <text class="hint">{{about.company}}</text>
</view> </view>
...@@ -154,11 +154,15 @@ import uniShare from 'uni_modules/uni-share/js_sdk/uni-share.js'; ...@@ -154,11 +154,15 @@ import uniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
left: 0; left: 0;
position: fixed; position: fixed;
} }
.agreement-box{
justify-content: center;
}
.agreement { .agreement {
color:#2285ff; color:#2285ff;
font-size:26rpx; font-size:26rpx;
} }
.hint { .hint {
text-align: center;
color:#999999; color:#999999;
font-size:26rpx; font-size:26rpx;
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
justify-content: center; justify-content: center;
} }
.quickLoginBtn{ .quickLoginBtn{
margin-bottom:20px; margin:20px 0;
width: 450rpx; width: 450rpx;
} }
</style> </style>
\ No newline at end of file
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
"event": 'getScore', "event": 'getScore',
"icon": "paperplane" "icon": "paperplane"
} }
// #ifndef H5 // #ifdef APP-PLUS
,{ ,{
"title": '分销推荐', "title": '分销推荐',
"event": 'share', "event": 'share',
......
...@@ -31,7 +31,7 @@ module.exports = { ...@@ -31,7 +31,7 @@ module.exports = {
根据数组的第0项,决定登录方式的第一优先级。 根据数组的第0项,决定登录方式的第一优先级。
*/ */
// "login": ["username","smsCode","univerify", "weixin", "apple"], // "login": ["username","smsCode","univerify", "weixin", "apple"],
"login": ["username","weixin","apple","smsCode"], "login": ["weixin","smsCode","univerify", "username", "apple"],
}, },
//关于应用 //关于应用
"about": { "about": {
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
"mp-weixin": { "mp-weixin": {
"oauth": { "oauth": {
"weixin": { "weixin": {
"appid": "wx81dbb061d2258234", "appid": "微信小程序登录所用的appid、appsecret需要在对应的小程序管理控制台获取",
"appsecret": "51977820eb14cd71377d4048a1b4754e" "appsecret": "微信小程序后台获取的appsecret"
} }
} }
}, },
......
...@@ -57,14 +57,20 @@ ...@@ -57,14 +57,20 @@
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
}, },
"ios" : {}, "ios" : {
"capabilities" : {
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com" ]
}
}
},
"sdkConfigs" : { "sdkConfigs" : {
"oauth" : { "oauth" : {
"apple" : {}, "apple" : {},
"weixin" : { "weixin" : {
"appid" : "wxffdd8fa6ec4ef2a0", "appid" : "wxffdd8fa6ec4ef2a0",
"appsecret" : "", "appsecret" : "",
"UniversalLinks" : "" "UniversalLinks" : "https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
}, },
"univerify" : {} "univerify" : {}
}, },
...@@ -72,7 +78,7 @@ ...@@ -72,7 +78,7 @@
"share" : { "share" : {
"weixin" : { "weixin" : {
"appid" : "wxffdd8fa6ec4ef2a0", "appid" : "wxffdd8fa6ec4ef2a0",
"UniversalLinks" : "" "UniversalLinks" : "https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
} }
}, },
"geolocation" : {}, "geolocation" : {},
...@@ -108,5 +114,6 @@ ...@@ -108,5 +114,6 @@
}, },
"h5" : { "h5" : {
"template" : "" "template" : ""
} },
"_spaceID" : "76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e"
} }
{ {
"passwordSecret": "passwordSecret-demo", "passwordSecret": "passwordSecret-demo",
"tokenSecret": "tokenSecret-demo", "tokenSecret": "tokenSecret-demo",
"tokenExpiresIn": 7200, "tokenExpiresIn": 7200,
"tokenExpiresThreshold": 600, "tokenExpiresThreshold": 600,
"passwordErrorLimit": 6, "passwordErrorLimit": 6,
"bindTokenToDevice": false, "bindTokenToDevice": false,
"passwordErrorRetryTime": 3600, "passwordErrorRetryTime": 3600,
"autoSetInviteCode": false, "autoSetInviteCode": false,
"forceInviteCode": false, "forceInviteCode": false,
"app-plus": { "app-plus": {
"tokenExpiresIn": 2592000, "tokenExpiresIn": 2592000,
"oauth": { "oauth": {
"weixin": { "weixin": {
"appid": "填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appid", "appid": "wxffdd8fa6ec4ef2a0",
"appsecret": "填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appsecret" "appsecret": "6c9119430d7be0a147bcbbb73ef33acf"
}, },
"apple": { "apple": {
"bundleId": "苹果开发者后台获取的bundleId" "bundleId": "苹果开发者后台获取的bundleId"
} }
} }
}, },
"mp-weixin": { "mp-weixin": {
"oauth": { "oauth": {
"weixin": { "weixin": {
"appid": "微信小程序登录所用的appid、appsecret需要在对应的小程序管理控制台获取", "appid": "wx81dbb061d2258234",
"appsecret": "微信小程序后台获取的appsecret" "appsecret": "51977820eb14cd71377d4048a1b4754e"
} }
} }
}, },
"mp-alipay": { "mp-alipay": {
"oauth": { "oauth": {
"alipay": { "alipay": {
"appid": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr", "appid": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr",
"privateKey": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr" "privateKey": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr"
} }
} }
}, },
"service": { "service": {
"sms": { "sms": {
"name": "应用名称,对应短信模版的name", "name": "应用名称,对应短信模版的name",
"codeExpiresIn": 300, "codeExpiresIn": 300,
"smsKey": "短信密钥key,开通短信服务处可以看到", "smsKey": "短信密钥key,开通短信服务处可以看到",
"smsSecret": "短信密钥secret,开通短信服务处可以看到" "smsSecret": "短信密钥secret,开通短信服务处可以看到"
}, },
"univerify": { "univerify": {
"appid": "当前应用的appid,使用云函数URL化,此项必须配置", "appid": "当前应用的appid,使用云函数URL化,此项必须配置",
"apiKey": "apiKey 和 apiSecret 在开发者中心获取,开发者中心:https://dev.dcloud.net.cn/uniLogin/index?type=0,文档:https://ask.dcloud.net.cn/article/37965", "apiKey": "apiKey 和 apiSecret 在开发者中心获取,开发者中心:https://dev.dcloud.net.cn/uniLogin/index?type=0,文档:https://ask.dcloud.net.cn/article/37965",
"apiSecret": "" "apiSecret": ""
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册