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

APP小程序-注册登录-(beta)用户同意用户协议记录

xupuyuan месяцев назад: 11
Родитель
Сommit
0905cd2269
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      app/controller/api/Auth.php

+ 4 - 3
app/controller/api/Auth.php

@@ -1625,7 +1625,7 @@ class Auth extends BaseController
1625 1625
         // $repository->bindSpread($user, intval($data['spread']));
1626 1626
         $tokenInfo = $repository->createToken($user);
1627 1627
         $repository->loginAfter($user);
1628
-        $useragree = Db::name('user_operating_record')->where('uid', $user['id'])->where('operation_model', 1)->where('operation_type', 1)->find();
1628
+        $useragree = Db::name('user_operating_record')->where('uid', $user->uid)->where('operation_model', 1)->where('operation_type', 1)->find();
1629 1629
         if (!$useragree){
1630 1630
             $repository->createUserOperatingRecord($user->uid, 1, 1, '用户同意用户协议记录');
1631 1631
         }
@@ -1789,7 +1789,7 @@ class Auth extends BaseController
1789 1789
         }
1790 1790
         if(isset($result['code']) && $result['code'] == 200){
1791 1791
             $user = $repository->accountByUser($result['user']['account']);
1792
-            $useragree = Db::name('user_operating_record')->where('uid', $user['id'])->where('operation_model', 1)->where('operation_type', 1)->find();
1792
+            $useragree = Db::name('user_operating_record')->where('uid', $user->uid)->where('operation_model', 1)->where('operation_type', 1)->find();
1793 1793
             if (!$useragree){
1794 1794
                 $repository->createUserOperatingRecord($user->uid, 1, 1, '用户同意用户协议记录');
1795 1795
             }
@@ -1923,7 +1923,8 @@ class Auth extends BaseController
1923 1923
             $repository->bindSpread($user, intval($pid));
1924 1924
 
1925 1925
             $tokenInfo = $repository->createToken($user);
1926
-            $repository->loginAfter($user);        $useragree = Db::name('user_operating_record')->where('uid', $user['id'])->where('operation_type', 1)->where('module', 1)->find();
1926
+            $repository->loginAfter($user);
1927
+            $useragree = Db::name('user_operating_record')->where('uid', $user->uid)->where('operation_type', 1)->where('module', 1)->find();
1927 1928
             if (!$useragree){
1928 1929
                 $repository->createUserOperatingRecord($user->uid, 1, 1, '用户同意用户协议记录');
1929 1930
             }