|
@@ -289,14 +289,25 @@ class PublicController
|
|
|
*/
|
|
|
public function store_list(Request $request)
|
|
|
{
|
|
|
- list($latitude, $longitude, $page, $limit) = UtilService::getMore([
|
|
|
+ list($latitude, $longitude, $page, $limit, $cate_id, $name, $sales,$address) = UtilService::getMore([
|
|
|
['latitude', ''],
|
|
|
['longitude', ''],
|
|
|
['page', 1],
|
|
|
- ['limit', 10]
|
|
|
+ ['limit', 10],
|
|
|
+ ['cate_id'],
|
|
|
+ ['name', ''],
|
|
|
+ ['sales', ''],
|
|
|
+ ['address']
|
|
|
], $request, true);
|
|
|
- $list = SystemStore::lst($latitude, $longitude, $page, $limit);
|
|
|
- if (!$list) $list = [];
|
|
|
+// if (!empty($address)){
|
|
|
+// // 地址获取经纬度
|
|
|
+// $res = json_decode(do_request('https://apis.map.qq.com/ws/geocoder/v1/?address='.$address.'&key=4A5BZ-GV7K4-G2PUH-DIIQJ-CIG6T-CKFT2', [], null,false));
|
|
|
+// $location = $res->result->location;
|
|
|
+// $latitude = $location->lat;
|
|
|
+// $longitude = $location->lng;
|
|
|
+// }
|
|
|
+ if ($address) $address = urldecode($address);
|
|
|
+ $list = SystemStore::lst($latitude, $longitude, $page, $limit,$name, $sales,$address);
|
|
|
$data['list'] = $list;
|
|
|
$data['tengxun_map_key'] = sys_config('tengxun_map_key');
|
|
|
return app('json')->successful($data);
|