@@ -18,6 +18,11 @@ class Index extends Common
protected $noNeedLogin = ['init', 'pageSync', 'page', 'feedback', 'send', 'test'];
protected $noNeedRight = ['*'];
+ //首页:搜索,购物车数量,轮播,分类列表,3个秒杀,2个团购,2个砍价,6个精品推荐商品。
+ public function index(){
+
+ }
public function init()
{
$platform = $this->request->header('platform');
@@ -30,9 +30,10 @@ class Goods extends Common
return $goods;
});
- $service->up()->with(['max_sku_price' => function ($query) { // 计算价格区间用(不知道为啥 with 必须再 show 后面)
+ /*$service->up()->with(['max_sku_price' => function ($query) { // 计算价格区间用(不知道为啥 with 必须再 show 后面)
$query->where('status', 'up');
- }]);
+ }]);*/
+ $service->up();
if ($keyword) {
$service->search($keyword);
@@ -119,6 +119,11 @@ class Goods extends Common
return isset($list[$value]) ? $list[$value] : '';
}
+ public function getImageAttr($value, $data)
+ {
+ return localpath_to_netpath($value);
//最低价格,金钱格式,而不是数组格式
public function getPriceminAttr($value, $data)