云函数:屏蔽词

This commit is contained in:
luying
2021-08-05 20:47:13 +08:00
parent f34b7a7b42
commit 2769901ca2
6 changed files with 52 additions and 8 deletions
+1
View File
@@ -9,6 +9,7 @@ export const STATUS = {
REDLOCK_ERR: { code: 6, simStr: 'redlock错误' },
SERVER_MAINTENANCE: { code: 7, simStr: '服务器维护中' },
VERSION_ERR: { code: 8, simStr: '版本号太低,请更新' },
BLOCK_WORDS: { code: 9, simStr: '内容有不合法词汇' },
GLOBAL_ERR: { code: 1003, simStr: '服务器内部错误' },
// 账号相关状态 10000 - 19999
+9 -5
View File
@@ -6,6 +6,13 @@ import { genCode, aesEncryptcfb, aesDecryptcfb } from '../pubUtils/util';
const bcrypt = require('bcrypt');
const SALT_WORK_FACTOR = 5
class PlatForm {
@prop({ required: true })
platform: string; // 平台:ios, android, web, pc
@prop({ required: true })
unionId: string; // 用户标识
}
/**
* 用户字段接口
*/
@@ -77,11 +84,8 @@ export default class User extends BaseModel {
@prop({ required: true })
platform: string;
@prop({ required: true, default: [] })
platforms: [{
platform: string; // 平台:ios, android, web, pc
unionId: string; // 用户标识
}];
@prop({ required: true, default: [], type: PlatForm })
platforms: PlatForm[];
@prop({ required: true, type: String, default: [], _id: false })
device: string[];