fixes bug to ajax render template
Showing
4 changed files
with
6 additions
and
5 deletions
framework @ 75bbc3b0
@@ -92,8 +92,9 @@ class Helpers | @@ -92,8 +92,9 @@ class Helpers | ||
92 | $result['like'] = array(); | 92 | $result['like'] = array(); |
93 | $result['like']['count'] = $articleData['praise_num']; | 93 | $result['like']['count'] = $articleData['praise_num']; |
94 | $result['like']['isLiked'] = isset($articleData['isPraise']) && $articleData['isPraise'] === 'Y'; | 94 | $result['like']['isLiked'] = isset($articleData['isPraise']) && $articleData['isPraise'] === 'Y'; |
95 | - $result['collect'] = array(); | ||
96 | - $result['collect']['isCollected'] = isset($articleData['isFavor']) && $articleData['isFavor'] === 'Y'; | 95 | + // 收藏 |
96 | + // $result['collect'] = array(); | ||
97 | + // $result['collect']['isCollected'] = isset($articleData['isFavor']) && $articleData['isFavor'] === 'Y'; | ||
97 | $result['share'] = $share; | 98 | $result['share'] = $share; |
98 | 99 | ||
99 | // 判断是否显示作者信息 | 100 | // 判断是否显示作者信息 |
static/img/guang/clothes-s7f658d7d2c.png
0 → 100644
12.6 KB
@@ -80,11 +80,11 @@ class Bootstrap extends Bootstrap_Abstract | @@ -80,11 +80,11 @@ class Bootstrap extends Bootstrap_Abstract | ||
80 | $dispatcher->autoRender(false); | 80 | $dispatcher->autoRender(false); |
81 | 81 | ||
82 | // 判断到不是AJAX请求时, 使用自定义的模板渲染 (Mustache or Handlebars) | 82 | // 判断到不是AJAX请求时, 使用自定义的模板渲染 (Mustache or Handlebars) |
83 | - if (!$dispatcher->getRequest()->isXmlHttpRequest()) { | 83 | + //if (!$dispatcher->getRequest()->isXmlHttpRequest()) { |
84 | $layout = new TemplateLayout(); | 84 | $layout = new TemplateLayout(); |
85 | $layout->setScriptPath($this->_config->application->template->path); | 85 | $layout->setScriptPath($this->_config->application->template->path); |
86 | $dispatcher->setView($layout); | 86 | $dispatcher->setView($layout); |
87 | - } | 87 | + //} |
88 | } | 88 | } |
89 | 89 | ||
90 | // /** | 90 | // /** |
-
Please register or login to post a comment