添加元宵抽签活动微信分享有关内容
Code Review By Rock Zhang
Showing
1 changed file
with
33 additions
and
3 deletions
@@ -123,9 +123,9 @@ class YuanxiaoController extends HuodongAction | @@ -123,9 +123,9 @@ class YuanxiaoController extends HuodongAction | ||
123 | $this->auditJumpLogin(); | 123 | $this->auditJumpLogin(); |
124 | 124 | ||
125 | $result = $this->getCookie('yuanxiaochouqian', null); | 125 | $result = $this->getCookie('yuanxiaochouqian', null); |
126 | - // if (empty($result)) { // 未取到信息就重新测试 | ||
127 | - // $this->go(Helpers::url('/cuxiao/yuanxiao/info')); | ||
128 | - // } | 126 | + if (empty($result)) { // 未取到信息就重新测试 |
127 | + $this->go(Helpers::url('/cuxiao/yuanxiao/info')); } | ||
128 | + | ||
129 | // cookie中存的结果 | 129 | // cookie中存的结果 |
130 | $result = json_decode($result, true); | 130 | $result = json_decode($result, true); |
131 | $shareUrl = Helpers::url('/cuxiao/yuanxiao/share', array( | 131 | $shareUrl = Helpers::url('/cuxiao/yuanxiao/share', array( |
@@ -137,6 +137,9 @@ class YuanxiaoController extends HuodongAction | @@ -137,6 +137,9 @@ class YuanxiaoController extends HuodongAction | ||
137 | 'needShare' => $this->checkNeedShare(), // 是否需要微信分享 | 137 | 'needShare' => $this->checkNeedShare(), // 是否需要微信分享 |
138 | 'staticFile' => self::STATIC_FILE, | 138 | 'staticFile' => self::STATIC_FILE, |
139 | 'result' => $result, | 139 | 'result' => $result, |
140 | + 'shareTitle' => $result['name'] . '的2016年潮流运势是' . $this->getChouqianTitle($result['type']), | ||
141 | + 'shareDesc' => '元宵快乐!一起来YOHO!BUY有货玩2016年潮流开运测试!', | ||
142 | + 'shareImg' => 'http://img02.yohoboys.com/staticimg/2016/02/19/16/02dbd38c84eccf1097b7e240452f0de856.png', | ||
140 | 'shareUrl' => $shareUrl, | 143 | 'shareUrl' => $shareUrl, |
141 | 'staticJS' => array( | 144 | 'staticJS' => array( |
142 | 'result.js' | 145 | 'result.js' |
@@ -172,6 +175,33 @@ class YuanxiaoController extends HuodongAction | @@ -172,6 +175,33 @@ class YuanxiaoController extends HuodongAction | ||
172 | )); | 175 | )); |
173 | } | 176 | } |
174 | 177 | ||
178 | + | ||
179 | + /** | ||
180 | + * 根据结果类型获取抽签结果标题 | ||
181 | + * @param $type | ||
182 | + */ | ||
183 | + private function getChouqianTitle($type) | ||
184 | + { | ||
185 | + $data = array( | ||
186 | + 'P1' => '成为一个大写加粗的潮人!', | ||
187 | + 'P2' => '逼格满载盐值爆表!', | ||
188 | + 'P3' => '运气爆棚,拥有Yeezy不是梦!', | ||
189 | + 'P4' => '街拍不断,成为网红不是梦!', | ||
190 | + 'M1' => '穿着MA-1飞行夹克一飞冲天!', | ||
191 | + 'M2' => '把妹不花钱!买鞋不排队!', | ||
192 | + 'M3' => '穿着跑鞋到达人生巅峰!', | ||
193 | + 'M4' => '帅气多金颜值高!', | ||
194 | + 'F1' => '拥有拆不完的快递和礼物! | ||
195 | +', | ||
196 | + 'F2' => '被男神强势壁咚!', | ||
197 | + 'F3' => '腿细胸大屁股翘!', | ||
198 | + 'F4' => '任何style都轻松驾驭! | ||
199 | +' | ||
200 | + ); | ||
201 | + | ||
202 | + return $data[$type]; | ||
203 | + } | ||
204 | + | ||
175 | /** | 205 | /** |
176 | * 检测登录状态 | 206 | * 检测登录状态 |
177 | * | 207 | * |
-
Please register or login to post a comment