diff --git a/.gitignore b/.gitignore
index 9d94873c63ffba7b1a13807b762e9b7082d9dea2..545b3c19b57795835c622580d6c8bd1634a263e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ package-lock.json
/manifest.json
/env.js
/vue.config.js
+/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/captcha-config/
diff --git a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
index 7b2ba31f995fcdeef0ec90185ba0894cd8547a1c..664dc370bfa3d192570df854b490b1f80b4aa01a 100644
--- a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
+++ b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
@@ -191,13 +191,12 @@
/* #ifndef APP-NVUE */
display: flex;
overflow: hidden;
- box-sizing: border-box;
- min-width: 20px;
- font-feature-settings: "tnum";
+ box-sizing: border-box;
/* #endif */
justify-content: center;
flex-direction: row;
height: 20px;
+ min-width: 20px;
padding: 0 4px;
line-height: 18px;
color: #fff;
@@ -207,6 +206,7 @@
border: 1px solid #fff;
text-align: center;
font-family: 'Helvetica Neue', Helvetica, sans-serif;
+ font-feature-settings: "tnum";
font-size: $bage-size;
/* #ifdef H5 */
z-index: 999;
diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md
index ad444eb77fd69f7e7a298f365f90516e83306d82..48e1de084938ce266e24830bca5d5ca22bf74e09 100644
--- a/uni_modules/uni-id-pages/changelog.md
+++ b/uni_modules/uni-id-pages/changelog.md
@@ -1,3 +1,7 @@
+## 1.0.40(2023-01-16)
+- 更新依赖的 验证码插件`uni-captcha`版本的版本为 0.6.4 修复 部分情况下APP端无法获取验证码的问题 [详情参考](https://ext.dcloud.net.cn/plugin?id=4048)
+- 修复 客户端token过期后,点击退出登录按钮报错的问题
+- uni-id-co 修复 updateUser 接口`手机号`和`邮箱`参数值为空字符串时,修改无效的问题
## 1.0.39(2022-12-28)
- uni-id-co 修复 URL化时第三方登录无法获取 uniPlatform 参数
- uni-id-co 修复 validator error
diff --git a/uni_modules/uni-id-pages/common/store.js b/uni_modules/uni-id-pages/common/store.js
index c6329348c7a73a93e2c23b149198c2f259f05070..fb6ab6bfa9af5c997dc469975c12fcb6b0cc7316 100644
--- a/uni_modules/uni-id-pages/common/store.js
+++ b/uni_modules/uni-id-pages/common/store.js
@@ -62,7 +62,14 @@ export const mutations = {
return data
},
async logout() {
- await uniIdCo.logout()
+ // 1. 已经过期就不需要调用服务端的注销接口 2.即使调用注销接口失败,不能阻塞客户端
+ if(uniCloud.getCurrentUserInfo().tokenExpired > Date.now()){
+ try{
+ await uniIdCo.logout()
+ }catch(e){
+ console.error(e);
+ }
+ }
uni.removeStorageSync('uni_id_token');
uni.setStorageSync('uni_id_token_expired', 0)
uni.redirectTo({
diff --git a/uni_modules/uni-id-pages/package.json b/uni_modules/uni-id-pages/package.json
index b82045a05034ce9d1c52315cc5d6b908961dcaab..e8cd187f1bcf5dc128f8719cbfc3a094f84b4485 100644
--- a/uni_modules/uni-id-pages/package.json
+++ b/uni_modules/uni-id-pages/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-id-pages",
"displayName": "uni-id-pages",
- "version": "1.0.39",
+ "version": "1.0.40",
"description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [
"用户管理",
diff --git a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue
index 14865c494f95ce6927be18f5a4b03e149440b949..82ef6602ce63ad8aea5d132a18cc88db5865d7a8 100644
--- a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue
+++ b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue
@@ -96,7 +96,6 @@
duration: 3000
});
}
- console.log("this.needCaptcha: ",this.needCaptcha);
if (this.needCaptcha && this.captcha.length != 4) {
this.$refs.captcha.getImageCaptcha()
return uni.showToast({
diff --git a/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue b/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
index ab888ca44618b9f69589e1c60355100c38309a7c..f4f1ad5a53f37f0730f6c46b1e7ca881ce8dd89d 100644
--- a/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
+++ b/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
@@ -1,137 +1,136 @@
-
-
-
-
-
-
-
-
- 绑定手机号
-
-
-
-
-
-
-
-
-
-
-
-
-
+ return e
+ })
+ }
+ }
+ }
+
+
+
diff --git a/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue b/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
index 0164c9d864bffc6c0d15bba10379be977cb911b9..beeabc752b2bdfc5e3951c50ea4e2da4a915b668 100644
--- a/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
+++ b/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
@@ -94,7 +94,7 @@
oldPassword,
newPassword
}).then(e => {
- // console.log(e);
+ console.log("e:------------- ",e);
uni.removeStorageSync('uni_id_token');
uni.setStorageSync('uni_id_token_expired', 0)
uni.redirectTo({
@@ -102,16 +102,14 @@
})
return e
}).catch(e => {
- console.log("e:------------ ",e);
- // uni.showModal({
- // content: e.message,
- // showCancel: false
- // });
+ uni.showModal({
+ content: e.message,
+ showCancel: false
+ });
return e
})
-
}).catch(errors => {
- console.log("errors: ------------",errors);
+ console.log("errors: ",errors);
let key = errors[0].key
key = key.replace(key[0], key[0].toUpperCase())
// console.log(key, 'focus' + key);
diff --git a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
index b751accf132f939628d0e7bb05919b303d68d28d..09701c69b7687668bb64abe5deec51b6f676f64f 100644
--- a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
+++ b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
@@ -33,16 +33,16 @@
const db = uniCloud.database();
const usersTable = db.collection('uni-id-users')
const uniIdCo = uniCloud.importObject("uni-id-co")
- import {
- store,
- mutations
- } from '@/uni_modules/uni-id-pages/common/store.js'
+ import {
+ store,
+ mutations
+ } from '@/uni_modules/uni-id-pages/common/store.js'
export default {
- computed: {
- userInfo() {
- return store.userInfo
- }
- },
+ computed: {
+ userInfo() {
+ return store.userInfo
+ }
+ },
data() {
return {
univerifyStyle: {
@@ -57,8 +57,8 @@
// mobile:'',
// nickname:''
// },
- hasPwd: false,
- showLoginManage: false //通过页面传参隐藏登录&退出登录按钮
+ hasPwd:false,
+ showLoginManage:false//通过页面传参隐藏登录&退出登录按钮
}
},
async onShow() {
@@ -66,9 +66,8 @@
this.univerifyStyle.otherLoginButton.title = "其他号码绑定"
},
async onLoad(e) {
- console.log("store.userInfo:---- ",store.userInfo);
- if (e.showLoginManage) {
- this.showLoginManage = true //通过页面传参隐藏登录&退出登录按钮
+ if(e.showLoginManage){
+ this.showLoginManage = true//通过页面传参隐藏登录&退出登录按钮
}
//判断当前用户是否有密码,否则就不显示密码修改功能
let res = await uniIdCo.getAccountInfo()
@@ -83,13 +82,13 @@
}
})
},
- logout() {
- mutations.logout()
- },
- bindMobileSuccess() {
- mutations.updateUserInfo()
- },
- changePassword() {
+ logout(){
+ mutations.logout()
+ },
+ bindMobileSuccess(){
+ mutations.updateUserInfo()
+ },
+ changePassword(){
uni.navigateTo({
url: '/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd',
complete: (e) => {
@@ -157,9 +156,9 @@
this.$refs.dialog.open()
}
},
- deactivate() {
+ deactivate(){
uni.navigateTo({
- url: "/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate"
+ url:"/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate"
})
},
async bindThirdAccount(provider) {
@@ -199,6 +198,7 @@
}
diff --git a/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json b/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
index 2dba58e018b1ffbf14bb572c0c6e56d1a1c5bb8a..af73fe3b2307d01b003a8684770ff4b2de77398a 100644
--- a/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
+++ b/uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
@@ -1,465 +1,456 @@
-{
- "bsonType": "object",
- "permission": {
- "read": true,
- "create": "'CREATE_UNI_ID_USERS' in auth.permission",
- "update": "doc._id == auth.uid || 'UPDATE_UNI_ID_USERS' in auth.permission",
- "delete": "'DELETE_UNI_ID_USERS' in auth.permission"
- },
- "properties": {
- "_id": {
- "description": "存储文档 ID(用户 ID),系统自动生成"
- },
- "ali_openid": {
- "bsonType": "string",
- "description": "支付宝平台openid",
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "apple_openid": {
- "bsonType": "string",
- "description": "苹果登录openid",
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "avatar": {
- "bsonType": "string",
- "description": "头像地址",
- "title": "头像地址",
- "trim": "both",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "avatar_file": {
- "bsonType": "file",
- "description": "用file类型方便使用uni-file-picker组件",
- "title": "头像文件",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "comment": {
- "bsonType": "string",
- "description": "备注",
- "title": "备注",
- "trim": "both",
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "dcloud_appid": {
- "bsonType": "array",
- "description": "允许登录的客户端的appid列表",
- "foreignKey": "opendb-app-list.appid",
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "department_id": {
- "bsonType": "array",
- "description": "部门ID",
- "enum": {
- "collection": "opendb-department",
- "field": "_id as value, name as text",
- "orderby": "name asc"
- },
- "enumType": "tree",
- "title": "部门",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "email": {
- "bsonType": "string",
- "description": "邮箱地址",
- "format": "email",
- "title": "邮箱",
- "trim": "both",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "email_confirmed": {
- "bsonType": "int",
- "defaultValue": 0,
- "description": "邮箱验证状态:0 未验证 1 已验证",
- "enum": [{
- "text": "未验证",
- "value": 0
- },
- {
- "text": "已验证",
- "value": 1
- }
- ],
- "title": "邮箱验证状态",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "gender": {
- "bsonType": "int",
- "defaultValue": 0,
- "description": "用户性别:0 未知 1 男性 2 女性",
- "enum": [{
- "text": "未知",
- "value": 0
- },
- {
- "text": "男",
- "value": 1
- },
- {
- "text": "女",
- "value": 2
- }
- ],
- "title": "性别",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "invite_time": {
- "bsonType": "timestamp",
- "description": "受邀时间",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "inviter_uid": {
- "bsonType": "array",
- "description": "用户全部上级邀请者",
- "trim": "both",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "last_login_date": {
- "bsonType": "timestamp",
- "description": "最后登录时间",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "last_login_ip": {
- "bsonType": "string",
- "description": "最后登录时 IP 地址",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "mobile": {
- "bsonType": "string",
- "description": "手机号码",
- "pattern": "^\\+?[0-9-]{3,20}$",
- "title": "手机号码",
- "trim": "both",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "mobile_confirmed": {
- "bsonType": "int",
- "defaultValue": 0,
- "description": "手机号验证状态:0 未验证 1 已验证",
- "enum": [{
- "text": "未验证",
- "value": 0
- },
- {
- "text": "已验证",
- "value": 1
- }
- ],
- "title": "手机号验证状态",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "my_invite_code": {
- "bsonType": "string",
- "description": "用户自身邀请码",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "nickname": {
- "bsonType": "string",
- "description": "用户昵称",
- "title": "昵称",
- "trim": "both",
- "permission": {
- "read": true,
- "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "password": {
- "bsonType": "password",
- "description": "密码,加密存储",
- "title": "密码",
- "trim": "both"
- },
- "password_secret_version": {
- "bsonType": "int",
- "description": "密码使用的passwordSecret版本",
- "title": "passwordSecret",
- "permission": {
- "read": false,
- "write": false
- }
- },
- "realname_auth": {
- "bsonType": "object",
- "description": "实名认证信息",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- },
- "properties": {
- "auth_date": {
- "bsonType": "timestamp",
- "description": "认证通过时间"
- },
- "auth_status": {
- "bsonType": "int",
- "description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败",
- "maximum": 3,
- "minimum": 0
- },
- "contact_email": {
- "bsonType": "string",
- "description": "联系人邮箱"
- },
- "contact_mobile": {
- "bsonType": "string",
- "description": "联系人手机号码"
- },
- "contact_person": {
- "bsonType": "string",
- "description": "联系人姓名"
- },
- "id_card_back": {
- "bsonType": "string",
- "description": "身份证反面照 URL"
- },
- "id_card_front": {
- "bsonType": "string",
- "description": "身份证正面照 URL"
- },
- "identity": {
- "bsonType": "string",
- "description": "身份证号码/营业执照号码"
- },
- "in_hand": {
- "bsonType": "string",
- "description": "手持身份证照片 URL"
- },
- "license": {
- "bsonType": "string",
- "description": "营业执照 URL"
- },
- "real_name": {
- "bsonType": "string",
- "description": "真实姓名/企业名称"
- },
- "type": {
- "bsonType": "int",
- "description": "用户类型:0 个人用户 1 企业用户",
- "maximum": 1,
- "minimum": 0
- }
- },
- "required": [
- "type",
- "auth_status"
- ]
- },
- "register_date": {
- "bsonType": "timestamp",
- "description": "注册时间",
- "forceDefaultValue": {
- "$env": "now"
- },
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "register_ip": {
- "bsonType": "string",
- "description": "注册时 IP 地址",
- "forceDefaultValue": {
- "$env": "clientIP"
- },
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "role": {
- "bsonType": "array",
- "description": "用户角色",
- "enum": {
- "collection": "uni-id-roles",
- "field": "role_id as value, role_name as text"
- },
- "foreignKey": "uni-id-roles.role_id",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- },
- "title": "角色"
- },
- "tags":{
- "bsonType": "array",
- "description": "用户标签",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- },
- "title": "标签"
- },
- "score": {
- "bsonType": "int",
- "description": "用户积分,积分变更记录可参考:uni-id-scores表定义",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "status": {
- "bsonType": "int",
- "defaultValue": 0,
- "description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- },
- "enum": [{
- "text": "正常",
- "value": 0
- },
- {
- "text": "禁用",
- "value": 1
- },
- {
- "text": "审核中",
- "value": 2
- },
- {
- "text": "审核拒绝",
- "value": 3
- }
- ],
- "title": "用户状态"
- },
- "token": {
- "bsonType": "array",
- "description": "用户token",
- "permission": {
- "read": false,
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "username": {
- "bsonType": "string",
- "description": "用户名,不允许重复",
- "title": "用户名",
- "trim": "both",
- "permission": {
- "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "wx_openid": {
- "bsonType": "object",
- "description": "微信各个平台openid",
- "properties": {
- "app": {
- "bsonType": "string",
- "description": "app平台微信openid"
- },
- "mp": {
- "bsonType": "string",
- "description": "微信小程序平台openid"
- },
- "h5": {
- "bsonType": "string",
- "description": "微信公众号登录openid"
- },
- "web": {
- "bsonType": "string",
- "description": "PC页面扫码登录openid"
- }
- },
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "wx_unionid": {
- "bsonType": "string",
- "description": "微信unionid",
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "qq_openid": {
- "bsonType": "object",
- "description": "QQ各个平台openid",
- "properties": {
- "app": {
- "bsonType": "string",
- "description": "app平台QQ openid"
- },
- "mp": {
- "bsonType": "string",
- "description": "QQ小程序平台openid"
- }
- },
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "qq_unionid": {
- "bsonType": "string",
- "description": "QQ unionid",
- "permission": {
- "read": "'READ_UNI_ID_USERS' in auth.permission",
- "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
- }
- },
- "third_party": {
- "bsonType": "object",
- "description": "三方平台凭证",
- "permission": {
- "read": false,
- "write": false
- }
- }
- },
- "required": []
+{
+ "bsonType": "object",
+ "permission": {
+ "read": true,
+ "create": "'CREATE_UNI_ID_USERS' in auth.permission",
+ "update": "doc._id == auth.uid || 'UPDATE_UNI_ID_USERS' in auth.permission",
+ "delete": "'DELETE_UNI_ID_USERS' in auth.permission"
+ },
+ "properties": {
+ "_id": {
+ "description": "存储文档 ID(用户 ID),系统自动生成"
+ },
+ "ali_openid": {
+ "bsonType": "string",
+ "description": "支付宝平台openid",
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "apple_openid": {
+ "bsonType": "string",
+ "description": "苹果登录openid",
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "avatar": {
+ "bsonType": "string",
+ "description": "头像地址",
+ "title": "头像地址",
+ "trim": "both",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "avatar_file": {
+ "bsonType": "file",
+ "description": "用file类型方便使用uni-file-picker组件",
+ "title": "头像文件",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "comment": {
+ "bsonType": "string",
+ "description": "备注",
+ "title": "备注",
+ "trim": "both",
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "dcloud_appid": {
+ "bsonType": "array",
+ "description": "允许登录的客户端的appid列表",
+ "foreignKey": "opendb-app-list.appid",
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "department_id": {
+ "bsonType": "array",
+ "description": "部门ID",
+ "enum": {
+ "collection": "opendb-department",
+ "field": "_id as value, name as text",
+ "orderby": "name asc"
+ },
+ "enumType": "tree",
+ "title": "部门",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "email": {
+ "bsonType": "string",
+ "description": "邮箱地址",
+ "format": "email",
+ "title": "邮箱",
+ "trim": "both",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "email_confirmed": {
+ "bsonType": "int",
+ "defaultValue": 0,
+ "description": "邮箱验证状态:0 未验证 1 已验证",
+ "enum": [{
+ "text": "未验证",
+ "value": 0
+ },
+ {
+ "text": "已验证",
+ "value": 1
+ }
+ ],
+ "title": "邮箱验证状态",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "gender": {
+ "bsonType": "int",
+ "defaultValue": 0,
+ "description": "用户性别:0 未知 1 男性 2 女性",
+ "enum": [{
+ "text": "未知",
+ "value": 0
+ },
+ {
+ "text": "男",
+ "value": 1
+ },
+ {
+ "text": "女",
+ "value": 2
+ }
+ ],
+ "title": "性别",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "invite_time": {
+ "bsonType": "timestamp",
+ "description": "受邀时间",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "inviter_uid": {
+ "bsonType": "array",
+ "description": "用户全部上级邀请者",
+ "trim": "both",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "last_login_date": {
+ "bsonType": "timestamp",
+ "description": "最后登录时间",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "last_login_ip": {
+ "bsonType": "string",
+ "description": "最后登录时 IP 地址",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "mobile": {
+ "bsonType": "string",
+ "description": "手机号码",
+ "pattern": "^\\+?[0-9-]{3,20}$",
+ "title": "手机号码",
+ "trim": "both",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "mobile_confirmed": {
+ "bsonType": "int",
+ "defaultValue": 0,
+ "description": "手机号验证状态:0 未验证 1 已验证",
+ "enum": [{
+ "text": "未验证",
+ "value": 0
+ },
+ {
+ "text": "已验证",
+ "value": 1
+ }
+ ],
+ "title": "手机号验证状态",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "my_invite_code": {
+ "bsonType": "string",
+ "description": "用户自身邀请码",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "nickname": {
+ "bsonType": "string",
+ "description": "用户昵称",
+ "title": "昵称",
+ "trim": "both",
+ "permission": {
+ "read": true,
+ "write": "doc._id == auth.uid || 'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "password": {
+ "bsonType": "password",
+ "description": "密码,加密存储",
+ "title": "密码",
+ "trim": "both"
+ },
+ "password_secret_version": {
+ "bsonType": "int",
+ "description": "密码使用的passwordSecret版本",
+ "title": "passwordSecret",
+ "permission": {
+ "read": false,
+ "write": false
+ }
+ },
+ "realname_auth": {
+ "bsonType": "object",
+ "description": "实名认证信息",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ },
+ "properties": {
+ "auth_date": {
+ "bsonType": "timestamp",
+ "description": "认证通过时间"
+ },
+ "auth_status": {
+ "bsonType": "int",
+ "description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败",
+ "maximum": 3,
+ "minimum": 0
+ },
+ "contact_email": {
+ "bsonType": "string",
+ "description": "联系人邮箱"
+ },
+ "contact_mobile": {
+ "bsonType": "string",
+ "description": "联系人手机号码"
+ },
+ "contact_person": {
+ "bsonType": "string",
+ "description": "联系人姓名"
+ },
+ "id_card_back": {
+ "bsonType": "string",
+ "description": "身份证反面照 URL"
+ },
+ "id_card_front": {
+ "bsonType": "string",
+ "description": "身份证正面照 URL"
+ },
+ "identity": {
+ "bsonType": "string",
+ "description": "身份证号码/营业执照号码"
+ },
+ "in_hand": {
+ "bsonType": "string",
+ "description": "手持身份证照片 URL"
+ },
+ "license": {
+ "bsonType": "string",
+ "description": "营业执照 URL"
+ },
+ "real_name": {
+ "bsonType": "string",
+ "description": "真实姓名/企业名称"
+ },
+ "type": {
+ "bsonType": "int",
+ "description": "用户类型:0 个人用户 1 企业用户",
+ "maximum": 1,
+ "minimum": 0
+ }
+ },
+ "required": [
+ "type",
+ "auth_status"
+ ]
+ },
+ "register_date": {
+ "bsonType": "timestamp",
+ "description": "注册时间",
+ "forceDefaultValue": {
+ "$env": "now"
+ },
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "register_ip": {
+ "bsonType": "string",
+ "description": "注册时 IP 地址",
+ "forceDefaultValue": {
+ "$env": "clientIP"
+ },
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "role": {
+ "bsonType": "array",
+ "description": "用户角色",
+ "enum": {
+ "collection": "uni-id-roles",
+ "field": "role_id as value, role_name as text"
+ },
+ "foreignKey": "uni-id-roles.role_id",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ },
+ "title": "角色"
+ },
+ "score": {
+ "bsonType": "int",
+ "description": "用户积分,积分变更记录可参考:uni-id-scores表定义",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "status": {
+ "bsonType": "int",
+ "defaultValue": 0,
+ "description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ },
+ "enum": [{
+ "text": "正常",
+ "value": 0
+ },
+ {
+ "text": "禁用",
+ "value": 1
+ },
+ {
+ "text": "审核中",
+ "value": 2
+ },
+ {
+ "text": "审核拒绝",
+ "value": 3
+ }
+ ],
+ "title": "用户状态"
+ },
+ "token": {
+ "bsonType": "array",
+ "description": "用户token",
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "username": {
+ "bsonType": "string",
+ "description": "用户名,不允许重复",
+ "title": "用户名",
+ "trim": "both",
+ "permission": {
+ "read": "doc._id == auth.uid || 'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "wx_openid": {
+ "bsonType": "object",
+ "description": "微信各个平台openid",
+ "properties": {
+ "app": {
+ "bsonType": "string",
+ "description": "app平台微信openid"
+ },
+ "mp": {
+ "bsonType": "string",
+ "description": "微信小程序平台openid"
+ },
+ "h5": {
+ "bsonType": "string",
+ "description": "微信公众号登录openid"
+ },
+ "web": {
+ "bsonType": "string",
+ "description": "PC页面扫码登录openid"
+ }
+ },
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "wx_unionid": {
+ "bsonType": "string",
+ "description": "微信unionid",
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "qq_openid": {
+ "bsonType": "object",
+ "description": "QQ各个平台openid",
+ "properties": {
+ "app": {
+ "bsonType": "string",
+ "description": "app平台QQ openid"
+ },
+ "mp": {
+ "bsonType": "string",
+ "description": "QQ小程序平台openid"
+ }
+ },
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "qq_unionid": {
+ "bsonType": "string",
+ "description": "QQ unionid",
+ "permission": {
+ "read": "'READ_UNI_ID_USERS' in auth.permission",
+ "write": "'CREATE_UNI_ID_USERS' in auth.permission || 'UPDATE_UNI_ID_USERS' in auth.permission"
+ }
+ },
+ "third_party": {
+ "bsonType": "object",
+ "description": "三方平台凭证",
+ "permission": {
+ "read": false,
+ "write": false
+ }
+ }
+ },
+ "required": []
}
\ No newline at end of file
diff --git a/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue
index 5a733fc148c2c7a522368c9e248546862dece88f..a883d71ceeab3511eab7836f4610d3fa6ad4d953 100644
--- a/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue
+++ b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue
@@ -23,10 +23,10 @@
- {{ title }}
-
- [草稿]
- {{isDraft?note.slice(14):note}}
+ {{ title }}
+
+ [草稿]
+ {{isDraft?note.slice(14):note}}