allen 3 жил өмнө
parent
commit
50fef750c2

+ 1 - 1
app/index/controller/Index.php

@@ -244,7 +244,7 @@ class Index extends Controller
         // 更新任务状态
         $nums = Db::table('awards_user_info')->where('uid', Safe::$user['uid'])->update([
             'is_share' => 1,
-            'count' => 2,
+            'count' => 4,
             'share_at' => time()
         ]);
 

+ 3 - 0
app/index/controller/Video.php

@@ -55,6 +55,7 @@ class Video extends Controller
 
         $userInfo = Db::table('awards_user_info')->where('uid', $user['uid'])->find();
         $count = 0;
+        $realCount = 3;
         $isShare = 0;
         if (empty($userInfo)) {
             $userAttr = [
@@ -69,6 +70,7 @@ class Video extends Controller
         } else {
             $count = Db::table('awards_user_task_log')->where('uid', $user['uid'])->count('id');
             $isShare = $userInfo['is_share'];
+            $realCount = $userInfo['count'];
         }
 
         // 生成加密用的密钥和向量
@@ -114,6 +116,7 @@ class Video extends Controller
         $this->assign('isBeginActivity', $isBeginActivity);
         $this->assign('task', json_encode($userInfo));
         $this->assign('isLogin', $isLogin);
+        $this->assign('realCount', $realCount);
 
         $this->fetch();
     }