Merge branch 'develop' of http://git.dev.yoho.cn/web/yohood into develop
Showing
3 changed files
with
28 additions
and
2 deletions
@@ -68,6 +68,17 @@ class Controller_Activity extends Controller_Abstract | @@ -68,6 +68,17 @@ class Controller_Activity extends Controller_Abstract | ||
68 | } | 68 | } |
69 | krsort($list); | 69 | krsort($list); |
70 | krsort($navList); | 70 | krsort($navList); |
71 | + if(empty($topics)) | ||
72 | + { | ||
73 | + if($this->_platform == 'web') | ||
74 | + { | ||
75 | + $this->_viewname = '../default/other'; | ||
76 | + } | ||
77 | + else | ||
78 | + { | ||
79 | + $this->_viewname = '../default/othermobile'; | ||
80 | + } | ||
81 | + } | ||
71 | $this->_view['plans'] = $planList; | 82 | $this->_view['plans'] = $planList; |
72 | $this->_view['topics'] = $list[$currentday]; | 83 | $this->_view['topics'] = $list[$currentday]; |
73 | $this->_view['navs'] = $navList; | 84 | $this->_view['navs'] = $navList; |
@@ -17,15 +17,27 @@ class Controller_MobileApi extends Controller_Abstract | @@ -17,15 +17,27 @@ class Controller_MobileApi extends Controller_Abstract | ||
17 | foreach($modules as $module) | 17 | foreach($modules as $module) |
18 | { | 18 | { |
19 | $headCover = ''; | 19 | $headCover = ''; |
20 | + $url = ''; | ||
20 | if($module['id'] == 1) | 21 | if($module['id'] == 1) |
21 | { | 22 | { |
22 | $headCover = SITE_IMG.'/yohood/yohood-logo-mobile_v3.png'; | 23 | $headCover = SITE_IMG.'/yohood/yohood-logo-mobile_v3.png'; |
23 | } | 24 | } |
25 | + if(!empty($module['url'])) | ||
26 | + { | ||
27 | + if(preg_match('@^http://@', $module['url'])) | ||
28 | + { | ||
29 | + $url = $module['url']; | ||
30 | + } | ||
31 | + else | ||
32 | + { | ||
33 | + $url = SITE_MAIN.$module['url']; | ||
34 | + } | ||
35 | + } | ||
24 | $data [] = array('id'=> $module['id'], | 36 | $data [] = array('id'=> $module['id'], |
25 | 'status'=> $module['status'], | 37 | 'status'=> $module['status'], |
26 | 'moduleName' => $module['module_name'], | 38 | 'moduleName' => $module['module_name'], |
27 | 'headCover' => $headCover, | 39 | 'headCover' => $headCover, |
28 | - 'url' => !empty($module['url']) ? SITE_MAIN.$module['url'] :'', | 40 | + 'url' => $url, |
29 | ); | 41 | ); |
30 | } | 42 | } |
31 | return $this->returnJson(self::SUCCESS_STATUS_CODE, Config_Code_Mobile::$success_opt['code'], $data, Config_Code_Mobile::$success_opt['message']); | 43 | return $this->returnJson(self::SUCCESS_STATUS_CODE, Config_Code_Mobile::$success_opt['code'], $data, Config_Code_Mobile::$success_opt['message']); |
1 | <?php $this->_extends('layout/default_layout');?> | 1 | <?php $this->_extends('layout/default_layout');?> |
2 | <?php $this->_block('main');?> | 2 | <?php $this->_block('main');?> |
3 | <div class="site-activity-content"> | 3 | <div class="site-activity-content"> |
4 | - <h2 class="site-activity-date"><?php echo date('Y-m-d', $this->view->currentday);?></h2> | 4 | + <?php if(!empty($this->view->currentday)):?> |
5 | + <h2 class="site-activity-date"><?php echo date('Y-m-d', $this->view->currentday);?></h2> | ||
6 | + <?php endif;?> | ||
7 | + | ||
5 | <?php foreach($this->view->topics as $topic):?> | 8 | <?php foreach($this->view->topics as $topic):?> |
6 | <div class="main-layout clearfix"> | 9 | <div class="main-layout clearfix"> |
7 | <div class="layout-section"> | 10 | <div class="layout-section"> |
-
Please register or login to post a comment