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