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

+ 2 - 2
app/controller/shop/config/.goodsSet.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['name', 'set', 'shop', 'goods', 'spec', 'is_use', 'sell_money', 'single_stock', 'stock'],
+    requestBody: ['freight', 'name', 'set', 'shop', 'goods', 'spec', 'is_use', 'sell_money', 'single_stock', 'stock'],
   },
   destroy: {
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ['!id'],
-    requestBody: ['name', 'set', 'shop', 'goods', 'spec', 'is_use', 'sell_money', 'single_stock', 'stock'],
+    requestBody: ['freight', 'name', 'set', 'shop', 'goods', 'spec', 'is_use', 'sell_money', 'single_stock', 'stock'],
   },
   show: {
     parameters: {

+ 1 - 0
app/model/shop/goodsSet.js

@@ -11,6 +11,7 @@ const goodsSet = {
   spec: { type: Array, required: false, zh: '参与组合的规格id集合' }, // 由set来
   is_use: { type: String, required: false, default: '0', zh: '是否使用' }, // 字典:is_use
   sell_money: { type: Number, required: false, zh: '套装销售金额' }, // 由set中的set_money之后而来
+  freight: { type: Number, required: false, zh: '套装销售运费', default: 0 },
   single_stock: { type: String, required: false, default: '1', zh: '单独设置库存' }, // 字典:is_use
   stock: { type: Number, required: false, default: '0', zh: '库存数量' }, //
 };