作者 王智

xiugai

... ... @@ -43,6 +43,16 @@ class Order extends Api
public function InsertOrder()
{
$UserId = $this->is_token($this->request->header());
//是否首次下单
$FirstPay = Db::name('order')->where('user_id', $UserId)->where('status', 'IN', '1,2,3,4,5')->find();
if (empty($FirstPay)) {
Db::name('user')->where('id', $UserId)->update(
[
'is_new' => 1,
'updatetime' => time()
]
);
}
$params = $this->request->param();
//Json 转 Array
$JsonArray = json_decode(htmlspecialchars_decode($params['json']), true);
... ...