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

验证码组件/uni-id-co更新

上级 88c7e97a
## 0.6.2(2023-01-10) ## 0.6.4(2023-01-16)
- 修复 部分情况下APP端无法获取验证码的问题
## 0.6.3(2023-01-11)
- 修复 抖音小程序无法显示的Bug - 修复 抖音小程序无法显示的Bug
- 修复 刷新时兼容 device_uuid - 修复 刷新时兼容 device_uuid
## 0.6.1(2022-06-23) ## 0.6.1(2022-06-23)
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
this.$refs.popup.close() this.$refs.popup.close()
}, },
confirm() { confirm() {
if(!this.val||this.val.length < 4){ if(!this.val){
return uni.showToast({ return uni.showToast({
title: '请填写验证码', title: '请填写验证码',
icon: 'none' icon: 'none'
......
{ {
"id": "uni-captcha", "id": "uni-captcha",
"displayName": "uni-captcha", "displayName": "uni-captcha",
"version": "0.6.2", "version": "0.6.4",
"description": "云端一体图形验证码组件", "description": "云端一体图形验证码组件",
"keywords": [ "keywords": [
"captcha", "captcha",
......
{ {
"name": "uni-captcha", "name": "uni-captcha",
"version": "0.2.2", "version": "0.6.4",
"description": "uni-captcha", "description": "uni-captcha",
"main": "index.js", "main": "index.js",
"homepage": "https://ext.dcloud.net.cn/plugin?id=4048", "homepage": "https://ext.dcloud.net.cn/plugin?id=4048",
......
...@@ -6,16 +6,13 @@ const db = uniCloud.database(); ...@@ -6,16 +6,13 @@ const db = uniCloud.database();
//获取数据表opendb-verify-codes对象 //获取数据表opendb-verify-codes对象
const verifyCodes = db.collection('opendb-verify-codes') const verifyCodes = db.collection('opendb-verify-codes')
const createConfig = require('uni-config-center') const createConfig = require('uni-config-center')
const captchaConfig = createConfig({ // 获取配置实例 const captchaConfig = createConfig({ // 获取配置实例
pluginId: 'captcha-config' // common/uni-config-center下的插件配置目录名 pluginId: 'captcha-config' // common/uni-config-center下的插件配置目录名
}) })
const Config = captchaConfig.config() // 获取common/uni-config-center/share-config/config.json的内容 const Config = captchaConfig.config() // 获取common/uni-config-center/share-config/config.json的内容
// console.log(Config,"15----------");
console.log(Config,"15----------");
module.exports = { module.exports = {
async getImageCaptcha({ async getImageCaptcha({
scene scene
}) { }) {
......
...@@ -28,8 +28,8 @@ export default { ...@@ -28,8 +28,8 @@ export default {
], ],
//政策协议 //政策协议
"agreements": { "agreements": {
"serviceUrl": "https://xxx", //用户服务协议链接 "serviceUrl": "https://ask.dcloud.net.cn/protocol.html", //用户服务协议链接
"privacyUrl": "https://xxx", //隐私政策条款链接 "privacyUrl": "https://ask.dcloud.net.cn/protocol.html", //隐私政策条款链接
// 哪些场景下显示,1.注册(包括登录并注册,如:微信登录、苹果登录、短信验证码登录)、2.登录(如:用户名密码登录) // 哪些场景下显示,1.注册(包括登录并注册,如:微信登录、苹果登录、短信验证码登录)、2.登录(如:用户名密码登录)
"scope": [ "scope": [
'register', 'login' 'register', 'login'
......
...@@ -366,7 +366,7 @@ class Validator { ...@@ -366,7 +366,7 @@ class Validator {
schemaKey schemaKey
} }
} else { } else {
delete value[schemaKey] //delete value[schemaKey]
continue continue
} }
} }
......
...@@ -92,7 +92,7 @@ module.exports = async function (params = {}) { ...@@ -92,7 +92,7 @@ module.exports = async function (params = {}) {
const realData = Object.keys(data).reduce((res, key) => { const realData = Object.keys(data).reduce((res, key) => {
const item = data[key] const item = data[key]
if (item) { if (item !== undefined) {
res[key] = item res[key] = item
} }
return res return res
...@@ -114,7 +114,6 @@ module.exports = async function (params = {}) { ...@@ -114,7 +114,6 @@ module.exports = async function (params = {}) {
} }
} }
} }
if (password) { if (password) {
const passwordUtils = new PasswordUtils({ const passwordUtils = new PasswordUtils({
clientInfo: this.getUniversalClientInfo(), clientInfo: this.getUniversalClientInfo(),
...@@ -127,12 +126,13 @@ module.exports = async function (params = {}) { ...@@ -127,12 +126,13 @@ module.exports = async function (params = {}) {
password password
}) })
data.password = passwordHash realData.password = passwordHash
data.password_secret_version = version realData.password_secret_version = version
} }
await userCollection.doc(uid).update(realData) await userCollection.doc(uid).update(realData)
return { return {
errCode: 0 errCode: 0
} }
......
...@@ -95,7 +95,7 @@ module.exports = async function (params = {}) { ...@@ -95,7 +95,7 @@ module.exports = async function (params = {}) {
const getDeviceRes = await deviceCollection.where({ const getDeviceRes = await deviceCollection.where({
device_id: deviceId device_id: deviceId
}).get() }).get()
console.log(getDeviceRes) // console.log(getDeviceRes)
if (getDeviceRes.data.length > 1) { if (getDeviceRes.data.length > 1) {
return { return {
errCode: ERROR.SYSTEM_ERROR errCode: ERROR.SYSTEM_ERROR
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"author": "DCloud", "author": "DCloud",
"dependencies": { "dependencies": {
"jsonwebtoken": "8.5.1", "jsonwebtoken": "8.5.1",
"lodash.merge": "^4.6.2", "lodash.merge": "4.6.2",
"uni-captcha": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha", "uni-captcha": "file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha",
"uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center",
"uni-id-common": "file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common", "uni-id-common": "file:../../../../uni-id-common/uniCloud/cloudfunctions/common/uni-id-common",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册