提交 4959f652 编写于 作者: C chenruilong

1.1.12

上级 f20c8863
{ {
"name" : "uni-id-pages", "name" : "uni-id-pages",
"appid" : "__UNI__HelloUniApp", "appid" : "__UNI__ECAF623",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
}, },
/* 模块配置 */ /* 模块配置 */
"modules" : { "modules" : {
"OAuth" : {} "OAuth" : {},
"FacialRecognitionVerify": {}
}, },
/* 应用发布信息 */ /* 应用发布信息 */
"distribute" : { "distribute" : {
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
"oauth" : { "oauth" : {
"univerify" : {}, "univerify" : {},
"weixin" : { "weixin" : {
"appid" : "", "appid" : "wxffdd8fa6ec4ef2a0",
"UniversalLinks" : "https://static-9f641af8-e860-44e5-b18f-f68dd8fe3fe4.bspapp.com/uni-universallinks/__UNI__0B1B311/" "UniversalLinks" : "https://static-9f641af8-e860-44e5-b18f-f68dd8fe3fe4.bspapp.com/uni-universallinks/__UNI__0B1B311/"
}, },
"apple" : {} "apple" : {}
...@@ -107,7 +108,7 @@ ...@@ -107,7 +108,7 @@
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx999bf02c8e05dfc9", "appid" : "",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },
......
## 1.1.12(2023-03-29) ## 1.1.12(2023-05-05)
- uni-id-co 修复 更新push_clientid时因device_id没有变化导致无法更新 - uni-id-co 新增 调用 add-user 接口创建用户时允许触发 beforeRegister 钩子方法,beforeRegister 钩子[详见](https://uniapp.dcloud.net.cn/uniCloud/uni-id-summary.html#before-register)
- uni-id-co 新增 自无unionid到有unionid状态进行登录时为用户补充unionid字段 - uni-id-co 新增 自无 unionid 到有 unionid 状态进行登录时为用户补充 unionid 字段
- uni-id-co 修复 i18n 在特定场景下报错的 bug
- uni-id-co 修复 跨平台解绑微信/QQ时无法解绑的 bug
- uni-id-co 修复 微信小程序等平台创建验证码时无法展示的 bug
- uni-id-co 修复 更新 push_clientid 时因 device_id 没有变化导致无法更新
## 1.1.11(2023-03-24) ## 1.1.11(2023-03-24)
- 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题 - 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题
## 1.1.10(2023-03-24) ## 1.1.10(2023-03-24)
......
{ {
"id": "uni-id-pages", "id": "uni-id-pages",
"displayName": "uni-id-pages", "displayName": "uni-id-pages",
"version": "1.1.11", "version": "1.1.12",
"description": "云端一体简单、统一、可扩展的用户中心页面模版", "description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [ "keywords": [
"用户管理", "用户管理",
......
...@@ -173,8 +173,8 @@ async function thirdPartyLogin (params = {}) { ...@@ -173,8 +173,8 @@ async function thirdPartyLogin (params = {}) {
user user
} = params } = params
return { return {
mobileComfirmd: user.mobile_comfirmd, mobileConfirmed: !!user.mobile_confirmed,
emailComfirmd: user.email_comfirmd emailConfirmed: !!user.email_confirmed
} }
} }
...@@ -194,7 +194,7 @@ async function postLogin (params = {}) { ...@@ -194,7 +194,7 @@ async function postLogin (params = {}) {
last_login_ip: clientIP, last_login_ip: clientIP,
...extraData ...extraData
} }
const createTokenRes = await this.uniIdCommon.createToken({ const createTokenRes = await this.uniIdCommon.createToken({
uid uid
}) })
......
...@@ -113,7 +113,17 @@ module.exports = async function (params = {}) { ...@@ -113,7 +113,17 @@ module.exports = async function (params = {}) {
data.mobile_confirmed = 1 data.mobile_confirmed = 1
} }
await userCollection.add(data) // 触发 beforeRegister 钩子
const beforeRegister = this.hooks.beforeRegister
let userRecord = data
if (beforeRegister) {
userRecord = await beforeRegister({
userRecord,
clientInfo: this.getUniversalClientInfo()
})
}
await userCollection.add(userRecord)
return { return {
errCode: 0, errCode: 0,
errMsg: '' errMsg: ''
......
...@@ -70,6 +70,7 @@ module.exports = async function (params) { ...@@ -70,6 +70,7 @@ module.exports = async function (params) {
status: REAL_NAME_STATUS.CERTIFY_FAILED status: REAL_NAME_STATUS.CERTIFY_FAILED
}) })
console.log(ERROR.FRV_FAIL, 'error: ', res)
throw { throw {
errCode: ERROR.FRV_FAIL errCode: ERROR.FRV_FAIL
} }
......
...@@ -5,10 +5,6 @@ const { ...@@ -5,10 +5,6 @@ const {
const { const {
LOG_TYPE, dbCmd LOG_TYPE, dbCmd
} = require('../../common/constants') } = require('../../common/constants')
const {
getQQPlatform
} = require('../../lib/utils/qq')
/** /**
* 解绑QQ * 解绑QQ
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-qq * @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-qq
...@@ -16,20 +12,11 @@ const { ...@@ -16,20 +12,11 @@ const {
*/ */
module.exports = async function () { module.exports = async function () {
const { uid } = this.authInfo const { uid } = this.authInfo
const { appId } = this.getUniversalClientInfo()
const qqPlatform = getQQPlatform.call(this)
await preUnBind.call(this, { await preUnBind.call(this, {
uid, uid,
unBindAccount: { unBindAccount: {
qq_openid: dbCmd.or([ qq_openid: dbCmd.exists(true),
{
[qqPlatform]: dbCmd.exists(true)
},
{
[`${qqPlatform}_${appId}`]: dbCmd.exists(true)
}
]),
qq_unionid: dbCmd.exists(true) qq_unionid: dbCmd.exists(true)
}, },
logType: LOG_TYPE.UNBIND_QQ logType: LOG_TYPE.UNBIND_QQ
......
...@@ -16,14 +16,12 @@ const { ...@@ -16,14 +16,12 @@ const {
*/ */
module.exports = async function () { module.exports = async function () {
const { uid } = this.authInfo const { uid } = this.authInfo
const weixinPlatform = getWeixinPlatform.call(this) // const weixinPlatform = getWeixinPlatform.call(this)
await preUnBind.call(this, { await preUnBind.call(this, {
uid, uid,
unBindAccount: { unBindAccount: {
wx_openid: { wx_openid: dbCmd.exists(true),
[weixinPlatform]: dbCmd.exists(true)
},
wx_unionid: dbCmd.exists(true) wx_unionid: dbCmd.exists(true)
}, },
logType: LOG_TYPE.UNBIND_WEIXIN logType: LOG_TYPE.UNBIND_WEIXIN
......
...@@ -18,7 +18,7 @@ module.exports = async function (params = {}) { ...@@ -18,7 +18,7 @@ module.exports = async function (params = {}) {
} }
this.middleware.validate(params, schema) this.middleware.validate(params, schema)
const deviceId = this.getUniversalClientInfo().deviceId const { deviceId, platform } = this.getUniversalClientInfo()
const { const {
scene scene
} = params } = params
...@@ -29,6 +29,7 @@ module.exports = async function (params = {}) { ...@@ -29,6 +29,7 @@ module.exports = async function (params = {}) {
} }
return this.uniCaptcha.create({ return this.uniCaptcha.create({
deviceId, deviceId,
scene scene,
uniPlatform: platform
}) })
} }
...@@ -18,7 +18,8 @@ module.exports = async function (params = {}) { ...@@ -18,7 +18,8 @@ module.exports = async function (params = {}) {
} }
this.middleware.validate(params, schema) this.middleware.validate(params, schema)
const deviceId = this.getUniversalClientInfo().deviceId const { deviceId, platform } = this.getUniversalClientInfo()
const { const {
scene scene
} = params } = params
...@@ -29,6 +30,7 @@ module.exports = async function (params = {}) { ...@@ -29,6 +30,7 @@ module.exports = async function (params = {}) {
} }
return this.uniCaptcha.refresh({ return this.uniCaptcha.refresh({
deviceId, deviceId,
scene scene,
uniPlatform: platform
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册