瀏覽代碼

修改查看商品

zs 1 年之前
父節點
當前提交
f0485691c1
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 0
      app/controller/view/config/.goods.js
  2. 2 2
      app/service/view/goods.js

+ 1 - 0
app/controller/view/config/.goods.js

@@ -23,5 +23,6 @@ module.exports = {
   },
   iatg: {
     service: 'indexActTagsGoods',
+    shop: 'shop',
   },
 };

+ 2 - 2
app/service/view/goods.js

@@ -384,9 +384,9 @@ class GoodsService extends CrudService {
     }
   }
 
-  async indexActTagsGoods() {
+  async indexActTagsGoods({ shop }) {
     // 将使用中且展示在首页的查出来排序
-    const list = await this.ctx.model.System.ActTags.find({ status: '0', show_index: '0' }).sort({ sort: 1 });
+    const list = await this.ctx.model.System.ActTags.find({ shop, status: '0', show_index: '0' }).sort({ sort: 1 });
     const result = [];
     for (const t of list) {
       const { label, value } = t;