|
|
@@ -3323,19 +3323,6 @@ class User extends BaseController
|
|
3323
|
3323
|
public function new_sign_info()
|
|
3324
|
3324
|
{
|
|
3325
|
3325
|
$uid = $this->request->uid();
|
|
3326
|
|
- $key = 'user_sign_score_' . $uid;
|
|
3327
|
|
- if (Cache::get($key)) {
|
|
3328
|
|
- $data = [
|
|
3329
|
|
- 'today' => 1,
|
|
3330
|
|
- 'day' => 0
|
|
3331
|
|
- ];
|
|
3332
|
|
- return app('json')->success($data);
|
|
3333
|
|
- }
|
|
3334
|
|
-
|
|
3335
|
|
- $now = time();
|
|
3336
|
|
- $todayEnd = strtotime('today 23:59:59');
|
|
3337
|
|
- $remainingSeconds = $todayEnd - $now;
|
|
3338
|
|
- Cache::set($key, 1, $remainingSeconds);
|
|
3339
|
3326
|
|
|
3340
|
3327
|
// 查询今天是否已经签到
|
|
3341
|
3328
|
$today_signin_info = Db::name('user_sign_score')->where(array('uid' => $uid))->whereDay('signin_time')->find();
|
|
|
@@ -3345,7 +3332,8 @@ class User extends BaseController
|
|
3345
|
3332
|
|
|
3346
|
3333
|
$data = [
|
|
3347
|
3334
|
'today' => 0,
|
|
3348
|
|
- 'day' => 0
|
|
|
3335
|
+ 'day' => 0,
|
|
|
3336
|
+ 'show' => 1
|
|
3349
|
3337
|
];
|
|
3350
|
3338
|
|
|
3351
|
3339
|
if ($yes_signin_info) $data['day'] = (int)$yes_signin_info['continuity_day'];
|
|
|
@@ -3354,6 +3342,17 @@ class User extends BaseController
|
|
3354
|
3342
|
$data['today'] = 1;
|
|
3355
|
3343
|
$data['day'] = $data['day'] + 1;
|
|
3356
|
3344
|
}
|
|
|
3345
|
+
|
|
|
3346
|
+ $key = 'user_sign_score_' . $uid;
|
|
|
3347
|
+ if (Cache::get($key)) {
|
|
|
3348
|
+ $data['show'] = 0;
|
|
|
3349
|
+ }
|
|
|
3350
|
+
|
|
|
3351
|
+ $now = time();
|
|
|
3352
|
+ $todayEnd = strtotime('today 23:59:59');
|
|
|
3353
|
+ $remainingSeconds = $todayEnd - $now;
|
|
|
3354
|
+ Cache::set($key, 1, $remainingSeconds);
|
|
|
3355
|
+
|
|
3357
|
3356
|
return app('json')->success($data);
|
|
3358
|
3357
|
}
|
|
3359
|
3358
|
|