|
@@ -19,6 +19,7 @@ class Video extends Controller
|
|
|
{
|
|
{
|
|
|
FacadeLog::info("index cookies: ". json_encode($_COOKIE));
|
|
FacadeLog::info("index cookies: ". json_encode($_COOKIE));
|
|
|
$sub = "";
|
|
$sub = "";
|
|
|
|
|
+ $isLogin = 1;
|
|
|
if (!empty($_COOKIE['SUB']) && strpos($_SERVER["HTTP_USER_AGENT"],"Weibo")) {
|
|
if (!empty($_COOKIE['SUB']) && strpos($_SERVER["HTTP_USER_AGENT"],"Weibo")) {
|
|
|
$sub = $_COOKIE['SUB'];
|
|
$sub = $_COOKIE['SUB'];
|
|
|
$isWebo = 1;
|
|
$isWebo = 1;
|
|
@@ -30,10 +31,22 @@ class Video extends Controller
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $this->assign('sub', '');
|
|
|
|
|
+ $this->assign('isWeibo', $isWebo);
|
|
|
|
|
+ $this->assign('mock', env('weibo.mock', '0'));
|
|
|
|
|
+
|
|
|
$uid = 0;
|
|
$uid = 0;
|
|
|
$userInfoRes = (new WeiboService($uid))->userinfo($sub);
|
|
$userInfoRes = (new WeiboService($uid))->userinfo($sub);
|
|
|
if (empty($userInfoRes) || $userInfoRes['ok'] != 1) {
|
|
if (empty($userInfoRes) || $userInfoRes['ok'] != 1) {
|
|
|
- $this->fetch('404');
|
|
|
|
|
|
|
+ $isLogin = 0;
|
|
|
|
|
+ $this->assign('isLogin', $isLogin);
|
|
|
|
|
+ $this->assign('user', '');
|
|
|
|
|
+ $this->assign('token', '');
|
|
|
|
|
+ $this->assign('isShare', '');
|
|
|
|
|
+ $this->assign('count', '');
|
|
|
|
|
+ $this->assign('isBeginActivity', '');
|
|
|
|
|
+ $this->assign('task', '');
|
|
|
|
|
+ $this->fetch();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 使用客户端信息生成token
|
|
// 使用客户端信息生成token
|
|
@@ -52,9 +65,7 @@ class Video extends Controller
|
|
|
'count' => 1,
|
|
'count' => 1,
|
|
|
'create_at' => time()
|
|
'create_at' => time()
|
|
|
];
|
|
];
|
|
|
- if (0 == Db::table('awards_user_info')->insert($userAttr)) {
|
|
|
|
|
- $this->fetch('404');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Db::table('awards_user_info')->insert($userAttr);
|
|
|
} else {
|
|
} else {
|
|
|
$count = Db::table('awards_user_task_log')->where('uid', $user['uid'])->count('id');
|
|
$count = Db::table('awards_user_task_log')->where('uid', $user['uid'])->count('id');
|
|
|
$isShare = $userInfo['is_share'];
|
|
$isShare = $userInfo['is_share'];
|
|
@@ -102,9 +113,7 @@ class Video extends Controller
|
|
|
$this->assign('count', $count);
|
|
$this->assign('count', $count);
|
|
|
$this->assign('isBeginActivity', $isBeginActivity);
|
|
$this->assign('isBeginActivity', $isBeginActivity);
|
|
|
$this->assign('task', json_encode($userInfo));
|
|
$this->assign('task', json_encode($userInfo));
|
|
|
- $this->assign('sub', $sub);
|
|
|
|
|
- $this->assign('isWeibo', $isWebo);
|
|
|
|
|
- $this->assign('mock', env('weibo.mock', '0'));
|
|
|
|
|
|
|
+ $this->assign('isLogin', $isLogin);
|
|
|
|
|
|
|
|
$this->fetch();
|
|
$this->fetch();
|
|
|
}
|
|
}
|