...
|
...
|
@@ -666,4 +666,32 @@ class Add extends Api |
|
|
Db::name('hdxxsj')->insert($data);
|
|
|
$this->success('发放成功', 1);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (蓝牙)
|
|
|
* @ApiSummary (蓝牙)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/Add/Blue)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="BatteryCode", 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':'返回成功',
|
|
|
'data':{
|
|
|
'IsYong':0=未拥有过,1=拥有过,
|
|
|
'IsXie':0=没有正在签的协议,1=有
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function Blue()
|
|
|
{
|
|
|
$UserId = $this->IsToken($this->request->header());
|
|
|
$Params = $this->request->param();
|
|
|
$yong = Db::name('hdxxsj')->where('user_id', $UserId)->where('BatteryCode', $Params['BatteryCode'])->find();
|
|
|
$xie = Db::name('agreement')->where('user_id', $UserId)->where('status', 1)->find();
|
|
|
$this->success('成功', ['IsYong' => (empty($yong) ? 0 : 1), 'IsXie' => (empty($xie) ? 0 : 1)]);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|