Authored by 周少峰

go login

... ... @@ -234,12 +234,20 @@ class SearchController extends AbstractAction
if (isset($condition['students'])) {
// 获取用户信息判断是否为学生
$data['students'] = Helpers::url('/activity/student/register');
if ($uid) {
$userInfo = UserData::userData($uid);
if ($userInfo['code'] === 200 && isset($userInfo['data']['vip_info']['is_student']) && $userInfo['data']['vip_info']['is_student'] === 1) {
$data['students'] = '';
} else {
$data['students'] = Helpers::url('/activity/student/register');
}
} else {
if ($isApp) {
$data['students'] = Helpers::url('/').'?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + '//m.yohobuy.com/activity/student/register","antarget":"1"}}}';
} else {
$data['students'] = Helpers::url('/signin.html?refer=//m.yohobuy.com/activity/student/register');
}
}
$data['showDownloadApp'] = false;
... ...