lrf 2 년 전
부모
커밋
6d07148b1b
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/controller/system/config/.banner.js
  2. 1 0
      app/model/system/banner.js

+ 2 - 2
app/controller/system/config/.banner.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['name', 'url', 'type', 'to', 'status'],
+    requestBody: ['content', 'name', 'url', 'type', 'to', 'status'],
   },
   destroy: {
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ['!id'],
-    requestBody: ['name', 'url', 'type', 'to', 'status'],
+    requestBody: ['content', 'name', 'url', 'type', 'to', 'status'],
   },
   show: {
     parameters: {

+ 1 - 0
app/model/system/banner.js

@@ -9,6 +9,7 @@ const banner = {
   type: { type: String, required: false, zh: '类型' }, // 字典表:banner_type
   to: { type: String, required: false, zh: '跳转至' }, // 填写路径
   status: { type: String, required: false, default: '0', zh: '是否正在使用' }, // 字典status
+  content: { type: String, required: false, zh: '自定义内容' }, //
 };
 const schema = new Schema(banner, { toJSON: { getters: true, virtuals: true } });
 schema.index({ id: 1 });