在元宵抽签页临时添加type参数以便查看不同抽签结果
Code Review By Rock Zhang
Showing
1 changed file
with
3 additions
and
4 deletions
@@ -65,6 +65,8 @@ class YuanxiaoController extends HuodongAction | @@ -65,6 +65,8 @@ class YuanxiaoController extends HuodongAction | ||
65 | 65 | ||
66 | // 调用接口 | 66 | // 调用接口 |
67 | $result = YuanxiaoModel::getChouqianInfo($uid, $nickName, $birthday, $gender); | 67 | $result = YuanxiaoModel::getChouqianInfo($uid, $nickName, $birthday, $gender); |
68 | + $result['code'] = 200; | ||
69 | + $result['data'] = array('name' => '王五', 'type' => 'M2'); | ||
68 | if ($result['code'] === 200) { // 处理成功就跳转到等待页 | 70 | if ($result['code'] === 200) { // 处理成功就跳转到等待页 |
69 | // 将返回的结果存入cookeie中15分钟 | 71 | // 将返回的结果存入cookeie中15分钟 |
70 | $this->setCookie('yuanxiaochouqian', json_encode($result['data']), time() + 15*60); | 72 | $this->setCookie('yuanxiaochouqian', json_encode($result['data']), time() + 15*60); |
@@ -131,14 +133,11 @@ class YuanxiaoController extends HuodongAction | @@ -131,14 +133,11 @@ class YuanxiaoController extends HuodongAction | ||
131 | 'name' => $this->encrypt($result['name']), | 133 | 'name' => $this->encrypt($result['name']), |
132 | 'hash' => $this->encrypt($this->getUid()) | 134 | 'hash' => $this->encrypt($this->getUid()) |
133 | )); | 135 | )); |
136 | + $result['type'] = $this->get('type', 'M2'); | ||
134 | 137 | ||
135 | $this->_view->display('result', array( | 138 | $this->_view->display('result', array( |
136 | 'staticTitle' => '元宵抽签', | 139 | 'staticTitle' => '元宵抽签', |
137 | 'staticFile' => self::STATIC_FILE, | 140 | 'staticFile' => self::STATIC_FILE, |
138 | - 'result' => array( | ||
139 | - 'name' => '张大龙', | ||
140 | - 'type' => 'M1' | ||
141 | - ), | ||
142 | 'result' => $result, | 141 | 'result' => $result, |
143 | 'shareUrl' => $shareUrl, | 142 | 'shareUrl' => $shareUrl, |
144 | 'staticJS' => array( | 143 | 'staticJS' => array( |
-
Please register or login to post a comment