diff --git a/application/wechat/controller/News.php b/application/wechat/controller/News.php index fe2c97b29..ed0d6f275 100644 --- a/application/wechat/controller/News.php +++ b/application/wechat/controller/News.php @@ -14,15 +14,14 @@ namespace app\wechat\controller; -use Exception; -use think\Db; -use think\Log; -use think\response\View; use controller\BasicAdmin; use service\DataService; use service\FileService; use service\LogService; use service\WechatService; +use think\Db; +use think\Log; +use think\response\View; /** * 微信图文管理 @@ -45,14 +44,14 @@ class News extends BasicAdmin { public function index() { $this->assign('title', '图文列表'); $db = Db::name($this->table)->where('is_deleted', '0')->order('id desc'); - parent::_list($db); + return parent::_list($db); } /** * 图文列表数据处理 * @param $data */ - protected function _index_data_filter(&$data) { + protected function _data_filter(&$data) { foreach ($data as &$vo) { $vo = WechatService::getNewsById($vo['id']); } @@ -138,7 +137,7 @@ class News extends BasicAdmin { * @return string */ public function select() { - return '开发中'; + $this->index(); } /** diff --git a/application/wechat/view/news.select.html b/application/wechat/view/news.select.html new file mode 100644 index 000000000..1a805f67e --- /dev/null +++ b/application/wechat/view/news.select.html @@ -0,0 +1,64 @@ +{extend name='extra@admin/main'} + +{block name="body"} +
+ {foreach $list as $key=>$vo} +
+ {foreach $vo.articles as $key=>$value} +
+
+ image +
+ {$value.title} +
+ {/foreach} +
+ {/foreach} +
+ +{if isset($page)}

{$page}

{/if} + +{/block} + +{block name='style'} + +{/block} + +{block name="script"} + +{/block} \ No newline at end of file