...
|
...
|
@@ -683,4 +683,82 @@ class User extends Api |
|
|
$list['user_level'] = $user_type;
|
|
|
$this->success('成功', $list);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 用户接口
|
|
|
* @ApiTitle (用户接口-找车操作)
|
|
|
* @ApiSummary (找车操作)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/User/WhereCarPeople)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="order_id", type="int", required=true, description="订单ID")
|
|
|
* @ApiParams (name="type", type="int", required=true, description="找车工状态:1=已找到,0=未找到")
|
|
|
* @ApiParams (name="address", type="int", required=true, description="车辆地址")
|
|
|
* @ApiParams (name="lng", type="int", required=true, description="经度")
|
|
|
* @ApiParams (name="lat", type="int", required=true, description="纬度")
|
|
|
* @ApiParams (name="images", type="string", required=true, description="图片,多张图,拼接")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
|
|
* @ApiReturn ({
|
|
|
'code':'1',
|
|
|
'msg':'返回成功',
|
|
|
})
|
|
|
*/
|
|
|
public function WhereCarPeople()
|
|
|
{
|
|
|
$user_id = $this->is_token($this->request->header());
|
|
|
$param = $this->request->param();
|
|
|
$type = Db::name('user')->where('id', $user_id)->value('type');
|
|
|
if ($type != 2) {
|
|
|
$this->error('身份错误!', 0);
|
|
|
die;
|
|
|
}
|
|
|
$data = [
|
|
|
'zhao_type' => $param['type'],
|
|
|
'car_address' => $param['address'],
|
|
|
'lat' => $param['lat'],
|
|
|
'lng' => $param['lng'],
|
|
|
'zhao_images' => $param['images'],
|
|
|
'updatetime' => time()
|
|
|
];
|
|
|
$res = Db::name('renwu')->where('id', $param['order_id'])->where('zhao_id', $user_id)->update($data);
|
|
|
$this->res($res);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 用户接口
|
|
|
* @ApiTitle (用户接口-洗车操作)
|
|
|
* @ApiSummary (洗车操作)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/User/CleanCarPeople)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="order_id", type="int", required=true, description="订单ID")
|
|
|
* @ApiParams (name="type", type="int", required=true, description="洗车工状态:1=已清洗,0=未清洗")
|
|
|
* @ApiParams (name="images", type="string", required=true, description="图片,多张图,拼接")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
|
|
* @ApiReturn ({
|
|
|
'code':'1',
|
|
|
'msg':'返回成功',
|
|
|
})
|
|
|
*/
|
|
|
public function CleanCarPeople()
|
|
|
{
|
|
|
$user_id = $this->is_token($this->request->header());
|
|
|
$param = $this->request->param();
|
|
|
$type = Db::name('user')->where('id', $user_id)->value('type');
|
|
|
if ($type != 3) {
|
|
|
$this->error('身份错误!', 0);
|
|
|
die;
|
|
|
}
|
|
|
$data = [
|
|
|
'xi_type' => $param['type'],
|
|
|
'xi_images' => $param['images'],
|
|
|
'updatetime' => time()
|
|
|
];
|
|
|
$res = Db::name('renwu')->where('id', $param['order_id'])->where('xi_id', $user_id)->update($data);
|
|
|
$this->res($res);
|
|
|
}
|
|
|
} |
...
|
...
|
|