云函数:屏蔽词
This commit is contained in:
@@ -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
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user