浏览代码

参与次数

allen 3 年之前
父节点
当前提交
c05d425dfa
共有 1 个文件被更改,包括 0 次插入13 次删除
  1. 0 13
      app/index/controller/Index.php

+ 0 - 13
app/index/controller/Index.php

@@ -81,7 +81,6 @@ class Index extends Controller
         $token = md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['HTTP_ACCEPT_ENCODING'] . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . $_SERVER['HTTP_REFERER'] . get_client_ip(0) . $userInfoRes['data']['uid']);
         $user = $userInfoRes['data'];
 
-        $first = 0;
         $userInfo = Db::table('awards_user_info')->where('uid', $user['uid'])->find();
         $count = 0;
         $isShare = 0;
@@ -99,10 +98,6 @@ class Index extends Controller
             }
         } else {
             $count = Db::table('awards_user_task_log')->where('uid', $user['uid'])->count('id');
-            if ($count < $userInfo['count']) {
-                $first = 1;
-            }
-
             $isShare = $userInfo['is_share'];
         }
 
@@ -126,7 +121,6 @@ class Index extends Controller
         return $this->successResponse([
             'user' => $user,
             'token' => $token,
-            'first' => $first,
             'isShare' => $isShare,
             'count' => $count
         ]);
@@ -140,16 +134,9 @@ class Index extends Controller
      */
     public function checkRole()
     {
-        $first = 0;
-
         $userInfo = Db::table('awards_user_info')->where('uid', Safe::$user['uid'])->find();
         $count = Db::table('awards_user_task_log')->where('uid', Safe::$user['uid'])->count('id');
-        if ($count < $userInfo['count']) {
-            $first = 1;
-        }
-
         return $this->successResponse([
-            'first' => $first,
             'isShare' => $userInfo['is_share'],
             'count' => $count
         ]);