...
|
...
|
@@ -164,6 +164,15 @@ class Update extends Api |
|
|
* @ApiReturn ({
|
|
|
'code':'1',
|
|
|
'msg':'返回成功',
|
|
|
"data": [
|
|
|
{
|
|
|
"id": 1, //优惠券ID
|
|
|
"title": "好友邀请优惠券",
|
|
|
"door": 100, //门槛金额
|
|
|
"del_price": "30.00", //优惠金额
|
|
|
"exp_time": "2021-03-24 13:35:22"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
})
|
|
|
*/
|
...
|
...
|
@@ -173,7 +182,7 @@ class Update extends Api |
|
|
$Status = input('status');
|
|
|
$Total = input('total');
|
|
|
$TickInfo = Db::name('tick')->find();
|
|
|
if (($Status == 0 && $Total < $TickInfo['door']) || ($Status == 2 && $Total > $TickInfo['door']-0.01)) {
|
|
|
if (($Status == 0 && $Total < $TickInfo['door']) || ($Status == 2 && $Total > $TickInfo['door'] - 0.01)) {
|
|
|
$this->success('成功', []);
|
|
|
} else {
|
|
|
$TickArray = Db::name('user_tick')->where('user_id', $UserId)->where('status', 0)->select();
|
...
|
...
|
@@ -185,7 +194,7 @@ class Update extends Api |
|
|
$List[$k]['title'] = $TickInfo['title'];
|
|
|
$List[$k]['door'] = $TickInfo['door'];
|
|
|
$List[$k]['del_price'] = $TickInfo['del_price'];
|
|
|
$List[$k]['exp_time'] = date('Y-m-d H:i:s', $v['exp_time']);
|
|
|
$List[$k]['exp_time'] = date('Y-m-d H:i:s', $v['createtime']) . '——' . date('Y-m-d H:i:s', $v['exp_time']);
|
|
|
}
|
|
|
}
|
|
|
$this->success('成功', $List);
|
...
|
...
|
|