guhongwei 4 سال پیش
والد
کامیت
16e1eece75
3فایلهای تغییر یافته به همراه13 افزوده شده و 12 حذف شده
  1. 2 6
      app/controller/.dock.js
  2. 8 3
      app/model/dock.js
  3. 3 3
      app/service/login.js

+ 2 - 6
app/controller/.dock.js

@@ -12,9 +12,7 @@ module.exports = {
       "user_id",
       "apply",
       "province",
-      "file_path",
-      "videointro",
-      "videointroinfo",
+      "videodata",
       "place",
       "user_id",
       "adminuser",
@@ -45,9 +43,7 @@ module.exports = {
       "join_end",
       "province",
       "place",
-      "file_path",
-      "videointro",
-      "videointroinfo",
+      "videodata",
       "adminuser",
       "phone",
       "passwd",

+ 8 - 3
app/model/dock.js

@@ -6,6 +6,12 @@ const { Secret } = require('naf-framework-mongoose/lib/model/schema');
 const images = new Schema({
   url: { type: String, required: true, maxLength: 500 }, // 图片路径
 });
+// 展会视频表
+const videos = new Schema({
+  file_path: { type: String, required: true }, // 视频路径
+  videointro: { type: String, required: false, maxLength: 200 }, // 视频文件标题
+  videointroinfo: { type: String, required: false, maxLength: 200 }, // 视频文件简介
+});
 // const image = new Schema({
 // });
 // image.index({ id: 1 });
@@ -87,6 +93,7 @@ const vipuser = new Schema({
   email: { type: String, required: false, maxLength: 20 }, // 郵箱
   content: { type: String, required: false }, // 内容
 });
+
 vipuser.index({ id: 1 });
 const Dock = {
   room_id: { type: String, required: true, maxLength: 10 }, // 房间号
@@ -101,9 +108,7 @@ const Dock = {
   user_id: { type: String, required: false, maxLength: 200 }, // 创建人id
   province: { type: String, required: false }, // 省
   place: { type: String, required: false }, // 市
-  file_path: { type: String, required: false }, // 视频路径
-  videointro: { type: String, required: false, maxLength: 200 }, // 视频文件标题
-  videointroinfo: { type: String, required: false, maxLength: 200 }, // 视频文件简介
+  videodata: { type: [ videos ], select: true }, // 视频路径
   adminuser: { type: String, required: false, maxLength: 200 }, // 用户姓名
   phone: { type: String, required: false, maxLength: 200 }, // 电话
   vipuser: { type: [ vipuser ], default: [] }, // vip用户

+ 3 - 3
app/service/login.js

@@ -41,8 +41,8 @@ class LoginService extends CrudService {
     if (_user === '') {
       throw new BusinessError(ErrorCode.USER_NOT_EXIST);
       // throw new BusinessError(ErrorCode.BAD_PASSWORD);
-    }else{
-      if(role === '3'){
+    } else {
+      if (role === '3') {
         const operationlogdata = { login_id: user.id, login_name: user.name, login_role: user.role, type: '0', operation_edit: '登录' };
         const url = 'http://127.0.0.1:9004/api/market/operationlog/';
         const operationlog = await this.ctx.curl(url, {
@@ -55,7 +55,7 @@ class LoginService extends CrudService {
         });
       }
     }
-    
+
     // 取出用户的类型,根据用户类型返回相应信息
     const state = uuid();
     const key = `free:auth:state:${state}`;