Explorar el Código

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

xupuyuan hace 11 meses
padre
commit
c604bf4f20

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

@@ -4485,6 +4485,12 @@ class UserRepository extends BaseRepository
4485 4485
      */
4486 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 4494
         Db::name('user_operating_record')->insert([
4489 4495
             'uid' => $uid,
4490 4496
             'operation_model' => $model,

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

@@ -1421,9 +1421,6 @@ class Auth extends BaseController
1421 1421
             if ($num > 9) {
1422 1422
                 if (!$data['code'])
1423 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 1436
             if ($num > 9) {
1440 1437
                 if (!$data['code'])
1441 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 1441
         $sms_key = 'api.auth.sms.' . $data['phone'];