...
|
...
|
@@ -56,20 +56,18 @@ class YuanxiaoController extends HuodongAction |
|
|
// 审判跳转登录页
|
|
|
$this->auditJumpLogin();
|
|
|
|
|
|
$uid = $this->getUid();
|
|
|
// POST提交请求
|
|
|
if (!empty($this->post())) {
|
|
|
$posts = $this->post();
|
|
|
if (!empty($posts)) {
|
|
|
$nickName = $this->post('nick', '');
|
|
|
$birthday = $this->post('birthday', '');
|
|
|
$gender = $this->post('gender', 0);
|
|
|
|
|
|
// 调用接口
|
|
|
$result = array(
|
|
|
'code' => 200,
|
|
|
'data' => array(
|
|
|
'name' => '李四',
|
|
|
'type' => 'P1',
|
|
|
'count' => 8888
|
|
|
)
|
|
|
);
|
|
|
$result = YuanxiaoModel::getChouqianInfo($uid, $nickName, $birthday, $gender);
|
|
|
$result['code'] = 200;
|
|
|
$result['data'] = array('name' => $nickName, 'type' => 'M2');
|
|
|
if ($result['code'] === 200) { // 处理成功就跳转到等待页
|
|
|
// 将返回的结果存入cookeie中15分钟
|
|
|
$this->setCookie('yuanxiaochouqian', json_encode($result['data']), time() + 15*60);
|
...
|
...
|
@@ -87,7 +85,6 @@ class YuanxiaoController extends HuodongAction |
|
|
));
|
|
|
}
|
|
|
} else {
|
|
|
$uid = $this->getUid();
|
|
|
$userData = YuanxiaoModel::getUserProfileData($uid);
|
|
|
|
|
|
$this->_view->display('info', array(
|
...
|
...
|
@@ -137,15 +134,12 @@ 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' => $result,
|
|
|
'result' => array(
|
|
|
'name' => '张大龙',
|
|
|
'type' => 'M1'
|
|
|
),
|
|
|
'shareUrl' => $shareUrl,
|
|
|
'staticJS' => array(
|
|
|
'result.js'
|
...
|
...
|
|