Просмотр исходного кода

AP小程序-注册登录-(完全版)记录用户同意用户协议

xupuyuan месяцев назад: 11
Родитель
Сommit
c604bf4f20
2 измененных файлов с 6 добавлено и 6 удалено
  1. 6 0
      app/common/repositories/user/UserRepository.php
  2. 0 6
      app/controller/api/Auth.php

+ 6 - 0
app/common/repositories/user/UserRepository.php

@@ -4485,6 +4485,12 @@ class UserRepository extends BaseRepository
4485
      */
4485
      */
4486
     public function createUserOperatingRecord($uid, $model, $type, $mark)
4486
     public function createUserOperatingRecord($uid, $model, $type, $mark)
4487
     {
4487
     {
4488
+        $exists = Db::name('user_operating_record')
4489
+            ->where('uid', $uid)
4490
+            ->value('id');
4491
+        if ($exists) {
4492
+            return;
4493
+        }
4488
         Db::name('user_operating_record')->insert([
4494
         Db::name('user_operating_record')->insert([
4489
             'uid' => $uid,
4495
             'uid' => $uid,
4490
             'operation_model' => $model,
4496
             'operation_model' => $model,

+ 0 - 6
app/controller/api/Auth.php

@@ -1421,9 +1421,6 @@ class Auth extends BaseController
1421
             if ($num > 9) {
1421
             if ($num > 9) {
1422
                 if (!$data['code'])
1422
                 if (!$data['code'])
1423
                     return app('json')->make(402, '操作过于频繁,请稍后重试~');
1423
                     return app('json')->make(402, '操作过于频繁,请稍后重试~');
1424
-                if (!$this->smslogin($data['phone'], $data['code'])) {
1425
-                    return app('json')->fail('登录验证码输入有误');
1426
-                }
1427
             }
1424
             }
1428
         }
1425
         }
1429
 
1426
 
@@ -1439,9 +1436,6 @@ class Auth extends BaseController
1439
             if ($num > 9) {
1436
             if ($num > 9) {
1440
                 if (!$data['code'])
1437
                 if (!$data['code'])
1441
                     return app('json')->make(402, '操作过于频繁,请稍后重试~');
1438
                     return app('json')->make(402, '操作过于频繁,请稍后重试~');
1442
-                if (!$this->registersmscode($data['phone'], $data['code'])) {
1443
-                    return app('json')->fail('注册验证码输入有误');
1444
-                }
1445
             }
1439
             }
1446
         }
1440
         }
1447
         $sms_key = 'api.auth.sms.' . $data['phone'];
1441
         $sms_key = 'api.auth.sms.' . $data['phone'];