...
|
...
|
@@ -197,7 +197,6 @@ class Index extends Api |
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/index/history)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="city_name", type="inter", required=true, description="城市名称")
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
...
|
...
|
@@ -218,11 +217,11 @@ class Index extends Api |
|
|
*/
|
|
|
public function history()
|
|
|
{
|
|
|
$city_name = $this->request->param('city_name');
|
|
|
if(empty($city_name)){
|
|
|
$this->error('城市名称不能为空');
|
|
|
}
|
|
|
$city_id = Db::name('area')->where('name',$city_name)->value('id');
|
|
|
// $city_name = $this->request->param('city_name');
|
|
|
// if(empty($city_name)){
|
|
|
// $this->error('城市名称不能为空');
|
|
|
// }
|
|
|
// $city_id = Db::name('area')->where('name',$city_name)->value('id');
|
|
|
$token = $this->request->header('token');
|
|
|
if(!empty($token)){
|
|
|
$user_id = $this->getUserId();
|
...
|
...
|
@@ -235,7 +234,7 @@ class Index extends Api |
|
|
}
|
|
|
$data['hotlist'] = Db::name('hot')
|
|
|
->field('id,name')
|
|
|
->where('area_id',$city_id)
|
|
|
// ->where('area_id',$city_id)
|
|
|
->order('id desc')
|
|
|
->limit(10)
|
|
|
->select();
|
...
|
...
|
|