...
|
...
|
@@ -137,12 +137,10 @@ class IndexController extends HomeBaseController |
|
|
if ($request->isAjax()) {
|
|
|
$user_id = session('user.id');
|
|
|
$tel = $request->param('tel');
|
|
|
if (Db::name('user')->where(['id' => $user_id])->value('is_first') == 1) {
|
|
|
$is_first = Db::name('user')->where(['id' => session('user.id')])->value('is_first');
|
|
|
if ($is_first == 1) {
|
|
|
give_as_a_present($user_id, '首次下单赠送');
|
|
|
Db::name('user')->update(['id' => $user_id, 'tel' => $tel, 'is_first' => 0]);
|
|
|
$is_first = Db::name('user')->where(['id' => session('user.id')])->value('is_first');
|
|
|
if ($is_first == 1) {
|
|
|
give_as_a_present($user_id, '首次下单赠送');
|
|
|
}
|
|
|
echo json_encode(['msg' => '绑定成功']);
|
|
|
//领取优惠券
|
|
|
exit();
|
...
|
...
|
|