|
|
@@ -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
|
|
|
]);
|