From ebab3f93e1720155e11a40d9902a48d17939665d Mon Sep 17 00:00:00 2001
From: 王晓刚 <wxg@bronet.cn>
Date: Fri, 6 Nov 2020 16:01:01 +0800
Subject: [PATCH] 商品搜索

---
 application/index/controller/Goods.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/application/index/controller/Goods.php b/application/index/controller/Goods.php
index bd07ca7..bedeb45 100644
--- a/application/index/controller/Goods.php
+++ b/application/index/controller/Goods.php
@@ -202,7 +202,7 @@ class Goods extends Frontend
         if(!empty($param['store_id'])){
             $where['g.store_id'] = ['eq',$param['store_id']];
         }
-        $order = 'distance asc';//'g.weigh desc';
+        $order = 'g.weigh desc';
         if(!empty($param['sort'])){
             if($param['sort'] == 1){
                 //销量降序
@@ -236,6 +236,7 @@ class Goods extends Frontend
         $goodsModel = new \app\index\model\Goods();
         $ids = [];
         if(!empty($param['lng']) && !empty($param['lat'])){
+            $order = 'g.weigh desc';
             $data = $goodsModel
                 ->alias('g')
                 ->field([
--
libgit2 0.24.0