Authored by Rock Zhang

将用户测试的元宵抽签结果类型type也存入url,用于解决微信分享标题与内容不同步的bug

Code Review By Rock Zhang
... ... @@ -132,7 +132,8 @@ class YuanxiaoController extends HuodongAction
// cookie中存的结果
$result = json_decode($result, true);
$shareUrl = Helpers::url('/cuxiao/yuanxiao/share', array(
'hash' => $this->encrypt($this->getUid())
'hash' => $this->encrypt($this->getUid()),
'type' => $this->encrypt($result['type'])
));
$this->_view->display('result', array(
... ... @@ -160,6 +161,8 @@ class YuanxiaoController extends HuodongAction
if (empty($uid)) {
$this->go(Helpers::url('/cuxiao/yuanxiao/index'));
}
// 抽签结果
$type = $this->decrypt($this->get('type', ''));
// 调用接口获取type和count
$result = YuanxiaoModel::getChoujiangShareInfo($uid);
... ... @@ -169,7 +172,7 @@ class YuanxiaoController extends HuodongAction
'staticFile' => self::STATIC_FILE,
'result' => array(
'name' => $result['name'],
'type' => $result['type']
'type' => $type ?: $result['type']
),
'count' => $result['total'],
'staticJS' => array(
... ...