...
|
...
|
@@ -118,4 +118,51 @@ class Update extends Api |
|
|
$Info = Db::name('warter_content')->find();
|
|
|
$this->success('成功', $Info);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 改版接口
|
|
|
* @ApiTitle (用户获取一张优惠券)
|
|
|
* @ApiSummary (用户获取一张优惠券)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/Update/InserUserTick)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
|
|
* @ApiReturn ({
|
|
|
'code':'1',
|
|
|
'msg':'返回成功',
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function InserUserTick()
|
|
|
{
|
|
|
$UserId = $this->is_token($this->request->header());
|
|
|
$TickInfo = Db::name('tick')->find();
|
|
|
$data = [
|
|
|
'user_id' => $UserId,
|
|
|
'exp_time' => time() + $TickInfo['you_time'] * 86400,
|
|
|
'createtime' => time(),
|
|
|
'status' => 0
|
|
|
];
|
|
|
$Res = Db::name('user_tick')->insert($data);
|
|
|
$this->Res($Res);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 改版接口
|
|
|
* @ApiTitle (下单选择优惠券页面)
|
|
|
* @ApiSummary (下单选择优惠券页面)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/Update/ThinkUserTick)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
|
|
* @ApiReturn ({
|
|
|
'code':'1',
|
|
|
'msg':'返回成功',
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|