guhongwei 2 gadi atpakaļ
vecāks
revīzija
c66a48174a

+ 17 - 5
app/controller/config/.appbasic.js

@@ -1,7 +1,13 @@
-
 module.exports = {
   create: {
-    requestBody: ['name','logo_url','foot_menus','account_btn'],
+    requestBody: [
+      "name",
+      "logo_url",
+      "foot_menus",
+      "account_btn",
+      "pay_info",
+      "customer_mobile",
+    ],
   },
   destroy: {
     params: ["!id"],
@@ -9,7 +15,14 @@ module.exports = {
   },
   update: {
     params: ["!id"],
-    requestBody: ['name','logo_url','foot_menus','account_btn'],
+    requestBody: [
+      "name",
+      "logo_url",
+      "foot_menus",
+      "account_btn",
+      "pay_info",
+      "customer_mobile",
+    ],
   },
   show: {
     parameters: {
@@ -22,8 +35,7 @@ module.exports = {
       query: {
         "meta.createdAt@start": "meta.createdAt@start",
         "meta.createdAt@end": "meta.createdAt@end",
-        'name': 'name' ,
-
+        name: "name",
       },
       // options: {
       //   "meta.state": 0 // 默认条件

+ 5 - 0
app/controller/config/.moneylog.js

@@ -8,6 +8,8 @@ module.exports = {
       "create_time",
       "money",
       "remark",
+      "pay_url",
+      "pay_no",
     ],
   },
   destroy: {
@@ -24,6 +26,8 @@ module.exports = {
       "create_time",
       "money",
       "remark",
+      "pay_url",
+      "pay_no",
     ],
   },
   show: {
@@ -43,6 +47,7 @@ module.exports = {
         type: "type",
         create_time: "create_time",
         money: "money",
+        pay_no: "pay_no",
       },
       // options: {
       //   "meta.state": 0 // 默认条件

+ 5 - 2
app/model/appbasic.js

@@ -2,15 +2,18 @@
 const Schema = require('mongoose').Schema;
 const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
 
-
 // app基本信息
 const appbasic = {
   name: { type: String, required: false, zh: '名称' }, //
   logo_url: { type: Array, required: false, zh: 'logo' }, //
   foot_menus: { type: Array, required: false, zh: '底部菜单' }, //
   account_btn: { type: Array, required: false, zh: '账号功能按钮' }, //
+  pay_info: { type: Object, required: false, zh: '支付信息' }, //
+  customer_mobile: { type: String, required: false, zh: '客服电话' }, //
 };
-const schema = new Schema(appbasic, { toJSON: { getters: true, virtuals: true } });
+const schema = new Schema(appbasic, {
+  toJSON: { getters: true, virtuals: true },
+});
 schema.index({ id: 1 });
 schema.index({ 'meta.createdAt': 1 });
 schema.index({ name: 1 });

+ 3 - 0
app/model/moneylog.js

@@ -12,6 +12,8 @@ const moneylog = {
   create_time: { type: String, required: false, zh: '交易时间' }, //
   money: { type: String, required: false, zh: '交易金额' }, //
   remark: { type: String, required: false, zh: '备注' }, //
+  pay_url: { type: Array, required: false, zh: '支付账单明细截图' }, //
+  pay_no: { type: Number, required: false, zh: '转账单号/订单号' }, //
 };
 const schema = new Schema(moneylog, { toJSON: { getters: true, virtuals: true } });
 schema.index({ id: 1 });
@@ -22,6 +24,7 @@ schema.index({ money_no: 1 });
 schema.index({ type: 1 });
 schema.index({ create_time: 1 });
 schema.index({ money: 1 });
+schema.index({ pay_no: 1 });
 
 schema.plugin(metaPlugin);