...
|
...
|
@@ -42,7 +42,7 @@ class YuanxiaoController extends HuodongAction |
|
|
'shareDesc' => '元宵节快乐!一起来YOHO!BUY有货玩2016年潮流开运测试!',
|
|
|
'shareImg' => 'http://img02.yohoboys.com/staticimg/2016/02/19/16/02dbd38c84eccf1097b7e240452f0de856.png',
|
|
|
'shareUrl' => Helpers::url('/cuxiao/yuanxiao/index'),
|
|
|
'playUrl' => $this->_isApp ? $playUrl . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $playUrlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}': $playUrl,
|
|
|
'playUrl' => $this->isApp() ? $playUrl . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $playUrlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}': $playUrl,
|
|
|
));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -56,7 +56,9 @@ class YuanxiaoController extends HuodongAction |
|
|
if (!$this->_isApp) {
|
|
|
$this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/yuanxiao/info')), 'default'));
|
|
|
} else {
|
|
|
exit();
|
|
|
$playUrl = Helpers::url('/cuxiao/yuanxiao/index');
|
|
|
$playUrlEncode = strtr($playUrl, array('/' => '\\/'));
|
|
|
$this->$playUrl . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $playUrlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}';
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -82,7 +84,7 @@ class YuanxiaoController extends HuodongAction |
|
|
$this->setCookie('yuanxiaochouqian', json_encode($cookieData), time() + 15 * 60);
|
|
|
|
|
|
$waitUrl = Helpers::url('/cuxiao/yuanxiao/wait');
|
|
|
$this->go($this->isWeixin() ? $waitUrl : $waitUrl . '?openby:yohobuy={"action":"go.h5","params":{"islogin":"N","param":{"from":"app"}}}');
|
|
|
$this->go($this->_isApp ? $waitUrl . '?openby:yohobuy={"action":"go.h5","params":{"islogin":"N","param":{"from":"app"}}}' : $waitUrl);
|
|
|
|
|
|
} else { // 不成功就显示返回的错误信息
|
|
|
|
...
|
...
|
@@ -134,7 +136,7 @@ class YuanxiaoController extends HuodongAction |
|
|
$this->_view->display('wait', array(
|
|
|
'staticTitle' => '2016潮流运势测试',
|
|
|
'staticFile' => self::STATIC_FILE,
|
|
|
'activityUrl' => $this->isWeixin() ? $activityUrl : $activityUrl . '?app_version=' . $this->get('app_version') . '&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","param":{"from":"app"},"share":"'.$activityUrl.'", shareparam:":{"share_id":"1"}}}',
|
|
|
'activityUrl' => $this->_isApp ? $activityUrl . '?app_version=' . $this->get('app_version') . '&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","param":{"from":"app"},"share":"'.$activityUrl.'", shareparam:":{"share_id":"1"}}}' : $activityUrl,
|
|
|
'staticJS' => array(
|
|
|
'wait.js'
|
|
|
),
|
...
|
...
|
@@ -254,13 +256,13 @@ class YuanxiaoController extends HuodongAction |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 判断是否是微信访问
|
|
|
* 判断是否是APP访问
|
|
|
*
|
|
|
* @return bool
|
|
|
*/
|
|
|
private function isWeixin()
|
|
|
private function isApp()
|
|
|
{
|
|
|
return (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false);
|
|
|
return (null !== $this->get('app_version'));
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|