Authored by Rock Zhang

在元宵抽签页临时添加type参数以便查看不同抽签结果

Code Review By Rock Zhang
... ... @@ -65,6 +65,8 @@ class YuanxiaoController extends HuodongAction
// 调用接口
$result = YuanxiaoModel::getChouqianInfo($uid, $nickName, $birthday, $gender);
$result['code'] = 200;
$result['data'] = array('name' => '王五', 'type' => 'M2');
if ($result['code'] === 200) { // 处理成功就跳转到等待页
// 将返回的结果存入cookeie中15分钟
$this->setCookie('yuanxiaochouqian', json_encode($result['data']), time() + 15*60);
... ... @@ -131,14 +133,11 @@ class YuanxiaoController extends HuodongAction
'name' => $this->encrypt($result['name']),
'hash' => $this->encrypt($this->getUid())
));
$result['type'] = $this->get('type', 'M2');
$this->_view->display('result', array(
'staticTitle' => '元宵抽签',
'staticFile' => self::STATIC_FILE,
'result' => array(
'name' => '张大龙',
'type' => 'M1'
),
'result' => $result,
'shareUrl' => $shareUrl,
'staticJS' => array(
... ...