作者 王智

222

... ... @@ -155,9 +155,11 @@ class Order extends Api
$user_id = $this->is_token($this->request->header());
$param = $this->request->param();
$quota = Db::name('user')->where('id', $user_id)->value('sy_quota');
if ($param['total'] > $quota) {
$this->error('下单金额大于总额度');
die;
if($quota!=null){
if ($param['total'] > $quota) {
$this->error('下单金额大于总额度');
die;
}
}
$arr = json_decode(htmlspecialchars_decode($param['data']), true);
foreach ($arr as $k => $v) {
... ...