浏览代码

商品详情的bug

lizhen_gitee 4 月之前
父节点
当前提交
9e145eb7e5
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      addons/shopro/controller/goods/Goods.php

+ 6 - 2
addons/shopro/controller/goods/Goods.php

@@ -111,9 +111,13 @@ class Goods extends Common
             return $goods;
         });
 
-        $goods = $service->field('*,price as pricemin')->show()->activity($activity_id)->with(['max_sku_price' => function ($query) {      // 计算价格区间用(不知道为啥 with 必须再 show 后面)
+        $goods = $service->field('*,price as pricemin')->show()->activity($activity_id)
+            ->with(
+                [
+                   /* 'max_sku_price' => function ($query) {      // 计算价格区间用(不知道为啥 with 必须再 show 后面)
             $query->where('status', 'up');
-        }, 'favorite'])->where('id', $id)->find();
+        }, */'favorite'])
+            ->where('id', $id)->find();
         if (!$goods) {
             $this->error(__('No Results were found'));
         }