lrf il y a 2 ans
Parent
commit
4f2eac798b

+ 3 - 2
app/controller/system/config/.actTags.js

@@ -1,6 +1,6 @@
 module.exports = {
 module.exports = {
   create: {
   create: {
-    requestBody: ['file', 'show_index', 'label', 'value', 'sort', 'status'],
+    requestBody: ['show_goods', 'file', 'show_index', 'label', 'value', 'sort', 'status'],
   },
   },
   destroy: {
   destroy: {
     params: ['!id'],
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   },
   update: {
   update: {
     params: ['!id'],
     params: ['!id'],
-    requestBody: ['file', 'show_index', 'label', 'value', 'sort', 'status'],
+    requestBody: ['show_goods', 'file', 'show_index', 'label', 'value', 'sort', 'status'],
   },
   },
   show: {
   show: {
     parameters: {
     parameters: {
@@ -24,6 +24,7 @@ module.exports = {
         status: 'status',
         status: 'status',
         show_index: 'show_index',
         show_index: 'show_index',
         value: 'value',
         value: 'value',
+        show_goods: 'show_goods',
       },
       },
       // options: {
       // options: {
       //   "meta.state": 0 // 默认条件
       //   "meta.state": 0 // 默认条件

+ 2 - 0
app/controller/util.js

@@ -15,9 +15,11 @@ class UtilController extends Controller {
 
 
   }
   }
   async util() {
   async util() {
+    console.log('line 18 in function:');
     this.ctx.ok();
     this.ctx.ok();
   }
   }
 
 
+
   async crk() {
   async crk() {
     const key = await this.ctx.service.util.rk.crk();
     const key = await this.ctx.service.util.rk.crk();
     this.ctx.ok({ data: key });
     this.ctx.ok({ data: key });

+ 1 - 1
app/model/shop/goodsJoinAct.js

@@ -26,7 +26,7 @@ const config = {
   // 3.加价购: 标注这个商品是 基础商品 还是 加价购置的商品
   // 3.加价购: 标注这个商品是 基础商品 还是 加价购置的商品
   goods_type: { type: [ 'basic', 'plus' ] },
   goods_type: { type: [ 'basic', 'plus' ] },
   plus_money: { type: Number, zh: '加价金额' },
   plus_money: { type: Number, zh: '加价金额' },
-  // 4.套装: 关联商品 以及 每个商品设置的价格; 外边的goods为主商品, 只有主商品才能看到套装; 进入购物车与下单,订单时,也是套装出现
+  // 4.套装(另加表,不这样做了): 关联商品 以及 每个商品设置的价格; 外边的goods为主商品, 只有主商品才能看到套装; 进入购物车与下单,订单时,也是套装出现
   set: { type: [ set ] },
   set: { type: [ set ] },
 };
 };
 
 

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

@@ -10,6 +10,7 @@ const actTags = {
   status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:use
   status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:use
   file: { type: Array, required: false, zh: '图片' }, //
   file: { type: Array, required: false, zh: '图片' }, //
   show_index: { type: String, required: false, default: '0', zh: '是否在首页展示' }, // 字典:use
   show_index: { type: String, required: false, default: '0', zh: '是否在首页展示' }, // 字典:use
+  show_goods: { type: String, default: '1', zh: '是否显示商品标签' }, // 字典:use
 };
 };
 const schema = new Schema(actTags, { toJSON: { getters: true, virtuals: true } });
 const schema = new Schema(actTags, { toJSON: { getters: true, virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ id: 1 });

+ 1 - 1
app/model/trade/cart.js

@@ -2,7 +2,7 @@
 const Schema = require('mongoose').Schema;
 const Schema = require('mongoose').Schema;
 const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
 const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
 const act = {
 const act = {
-  // 套装: 需要找到套装的商品,统一归为一个商品
+  // 套装: 下单时组合,购物车中不需要额外处理
   platform_act: { type: String, zh: '活动id' },
   platform_act: { type: String, zh: '活动id' },
   set_id: { type: String, zh: '参加套装活动的商品组合数据id' },
   set_id: { type: String, zh: '参加套装活动的商品组合数据id' },
 
 

+ 1 - 1
app/service/trade/cart.js

@@ -17,7 +17,7 @@ class CartService extends CrudService {
    ** 添加促销部分:
    ** 添加促销部分:
    ** 买赠,特价,加价购: 需要查询每个商品是否参与了这三项活动,需要给出对应数据
    ** 买赠,特价,加价购: 需要查询每个商品是否参与了这三项活动,需要给出对应数据
    ** 满减/折:不需要在购物车出现
    ** 满减/折:不需要在购物车出现
-   ** 套装:将套装数据拿出来,归为主商品的商品下
+   ** 套装:最后下单时组合,购物车中不需要额外修改
    * @param {Object} query 查询条件
    * @param {Object} query 查询条件
    * @param query.customer 顾客id
    * @param query.customer 顾客id
    * @return {Array}
    * @return {Array}