Authored by hf

code review by fei.hong : do format yuanxiao huodong codes check call app login

... ... @@ -5,9 +5,9 @@
<div class="flower flower-l"></div>
<div class="flower flower-r"></div>
</div>
<a class="start" href="/cuxiao/yuanxiao/info"></a>
<a class="start" href="{{playUrl}}"></a>
<div class="footer">
<a class="arrow animated infinite pulse" href="/cuxiao/yuanxiao/info"></a>
<a class="arrow animated infinite pulse" href="{{playUrl}}"></a>
<div class="yohobuy"></div>
</div>
</div>
... ...
... ... @@ -30,12 +30,16 @@ class YuanxiaoController extends HuodongAction
*/
public function indexAction()
{
$playUrl = Helpers::url('/cuxiao/yuanxiao/info');
$playUrlEncode = strtr($playUrl, array('/' => '\\/'));
$this->_view->display('index', array(
'staticTitle' => '元宵抽签',
'staticFile' => self::STATIC_FILE,
'staticJS' => array(
'home.js'
)
),
'playUrl' => $this->isApp() ? $playUrl . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $playUrlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}': $playUrl,
));
}
... ... @@ -44,10 +48,11 @@ class YuanxiaoController extends HuodongAction
*/
public function infoAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$uid = $this->getUid();
$uid = $this->getLoggedUid();
if (!$uid) {
$this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/yuanxiao/info')), 'default'));
}
// POST提交请求
$posts = $this->post();
if (!empty($posts)) {
... ... @@ -221,6 +226,16 @@ class YuanxiaoController extends HuodongAction
return $uid;
}
/**
* 判断是否是APP访问
*
* @return bool
*/
private function isApp()
{
return (null !== $this->get('app_version'));
}
/**
* 判断是否需要微信分享
... ...