Authored by Rock Zhang

更新新势力领券活动有关逻辑

... ... @@ -12,21 +12,20 @@ class XinshiliController extends HuodongAction
// const STATIC_FILE = 'http://localhost:2222/1.0.3';
const STATIC_FILE = 'http://cdn.yoho.cn/huodong/2016xinshili/1.0.3';
private $_uid;
/**
* 检测登录状态
*
* @return int
*/
private function getLoggedUid()
{
if ($this->_isApp) {
$uid = $this->get('uid');
$this->_uid = $this->get('uid');
} else {
$uid = $this->getUid();
$this->_uid = $this->getUid();
}
return $uid;
}
/**
... ... @@ -36,8 +35,8 @@ class XinshiliController extends HuodongAction
{
$playUrl = Helpers::url('/cuxiao/xinshili/index');
$uid = $this->getLoggedUid();
if (!$uid) {
$this->getLoggedUid();
if (!$this->_uid) {
if (!$this->_isApp) {
$this->go(Helpers::url('/signin.html', array('refer' => $playUrl), 'default'));
} else {
... ... @@ -90,8 +89,7 @@ class XinshiliController extends HuodongAction
}
$activityId = $this->getActivityId();
$uid = $this->getLoggedUid();
$result = XinshiliModel::getXinshiliCoupon($uid, $activityId);
$result = XinshiliModel::getXinshiliCoupon($this->_uid, $activityId);
} while (false);
$this->echoJson($result);
... ...