|
@@ -30,12 +30,16 @@ class YuanxiaoController extends HuodongAction |
|
@@ -30,12 +30,16 @@ class YuanxiaoController extends HuodongAction |
30
|
*/
|
30
|
*/
|
31
|
public function indexAction()
|
31
|
public function indexAction()
|
32
|
{
|
32
|
{
|
|
|
33
|
+ $playUrl = Helpers::url('/cuxiao/yuanxiao/info');
|
|
|
34
|
+ $playUrlEncode = strtr($playUrl, array('/' => '\\/'));
|
|
|
35
|
+
|
33
|
$this->_view->display('index', array(
|
36
|
$this->_view->display('index', array(
|
34
|
'staticTitle' => '元宵抽签',
|
37
|
'staticTitle' => '元宵抽签',
|
35
|
'staticFile' => self::STATIC_FILE,
|
38
|
'staticFile' => self::STATIC_FILE,
|
36
|
'staticJS' => array(
|
39
|
'staticJS' => array(
|
37
|
'home.js'
|
40
|
'home.js'
|
38
|
- )
|
41
|
+ ),
|
|
|
42
|
+ 'playUrl' => $this->isApp() ? $playUrl . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $playUrlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}': $playUrl,
|
39
|
));
|
43
|
));
|
40
|
}
|
44
|
}
|
41
|
|
45
|
|
|
@@ -44,10 +48,11 @@ class YuanxiaoController extends HuodongAction |
|
@@ -44,10 +48,11 @@ class YuanxiaoController extends HuodongAction |
44
|
*/
|
48
|
*/
|
45
|
public function infoAction()
|
49
|
public function infoAction()
|
46
|
{
|
50
|
{
|
47
|
- // 审判跳转登录页
|
|
|
48
|
- $this->auditJumpLogin();
|
51
|
+ $uid = $this->getLoggedUid();
|
|
|
52
|
+ if (!$uid) {
|
|
|
53
|
+ $this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/yuanxiao/info')), 'default'));
|
|
|
54
|
+ }
|
49
|
|
55
|
|
50
|
- $uid = $this->getUid();
|
|
|
51
|
// POST提交请求
|
56
|
// POST提交请求
|
52
|
$posts = $this->post();
|
57
|
$posts = $this->post();
|
53
|
if (!empty($posts)) {
|
58
|
if (!empty($posts)) {
|
|
@@ -223,6 +228,16 @@ class YuanxiaoController extends HuodongAction |
|
@@ -223,6 +228,16 @@ class YuanxiaoController extends HuodongAction |
223
|
}
|
228
|
}
|
224
|
|
229
|
|
225
|
/**
|
230
|
/**
|
|
|
231
|
+ * 判断是否是APP访问
|
|
|
232
|
+ *
|
|
|
233
|
+ * @return bool
|
|
|
234
|
+ */
|
|
|
235
|
+ private function isApp()
|
|
|
236
|
+ {
|
|
|
237
|
+ return (null !== $this->get('app_version'));
|
|
|
238
|
+ }
|
|
|
239
|
+
|
|
|
240
|
+ /**
|
226
|
* 判断是否需要微信分享
|
241
|
* 判断是否需要微信分享
|
227
|
* @return bool
|
242
|
* @return bool
|
228
|
*/
|
243
|
*/
|