From 84c1a51b86eeaa1fcb6e80560b104c978bb747a1 Mon Sep 17 00:00:00 2001 From: augushong Date: Sat, 18 Apr 2020 16:01:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=86=85=E5=AE=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/BaseController.php | 10 +- app/admin/controller/Category.php | 99 +++++++ app/admin/controller/Post.php | 99 ++++++- app/admin/controller/Tag.php | 178 ++++++----- app/common.php | 230 ++++++++------- app/model/Category.php | 13 +- app/model/Post.php | 34 +++ app/model/PostCategory.php | 14 + app/model/PostTag.php | 14 + app/model/Tag.php | 6 +- view/admin/category/create.html | 83 ++++++ view/admin/category/edit.html | 89 ++++++ view/admin/category/index.html | 120 +++++--- view/admin/common/_require.html | 8 +- view/admin/post/create.html | 194 +++++++++--- view/admin/post/edit.html | 475 ++++++++++++++++++++++++++++++ view/admin/post/index.html | 4 +- view/admin/tag/index.html | 131 ++++++++ 18 files changed, 1548 insertions(+), 253 deletions(-) create mode 100644 app/model/PostCategory.php create mode 100644 app/model/PostTag.php create mode 100644 view/admin/category/create.html create mode 100644 view/admin/category/edit.html create mode 100644 view/admin/post/edit.html create mode 100644 view/admin/tag/index.html diff --git a/app/BaseController.php b/app/BaseController.php index f0036b1..476cc89 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -125,7 +125,10 @@ abstract class BaseController if(\request()->isAjax()){ $data['jump_to_url'] = (string)$jump_to_url; - throw new HttpResponseException(json_message($data,0,$msg)); + if($code == 200){ + $code = 0; + } + throw new HttpResponseException(json_message($data,$code,$msg)); } View::assign($data); @@ -154,7 +157,10 @@ abstract class BaseController if(\request()->isAjax()){ $data['jump_to_url'] = (string)$jump_to_url; - throw new HttpResponseException(json_message($data,0,$msg)); + if($code == 200){ + $code = 0; + } + throw new HttpResponseException(json_message($data,$code,$msg)); } View::assign($data); diff --git a/app/admin/controller/Category.php b/app/admin/controller/Category.php index 6ee421d..872cc49 100644 --- a/app/admin/controller/Category.php +++ b/app/admin/controller/Category.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace app\admin\controller; +use app\model\Category as ModelCategory; use think\facade\View; use think\Request; @@ -18,6 +19,14 @@ class Category extends Common { // + $list = ModelCategory::getListLevel(); + + if($this->request->isAjax()){ + return json_message($list); + } + + View::assign('list',$list); + return View::fetch(); } @@ -30,6 +39,10 @@ class Category extends Common { // + $list = ModelCategory::getListLevel(); + + View::assign('list_category',$list); + return View::fetch(); } @@ -42,6 +55,33 @@ class Category extends Common public function save(Request $request) { // + + $post_data = $request->post(); + + if(empty($post_data['title'])){ + return $this->error('标题不能为空',null,500); + } + + $model_category = ModelCategory::where('title',$post_data['title']) + ->where('pid',$post_data['pid']) + ->find(); + + if(!empty($model_category)){ + $this->error('相同名称相同级别不能出现两次',null,500); + } + + if($post_data['pid'] != 0){ + + $model_parent_category = ModelCategory::where('id',$post_data['pid'])->find(); + + $post_data['level'] = $model_parent_category->level + 1; + + } + + ModelCategory::create($post_data); + + return $this->success('添加成功','index'); + } /** @@ -64,6 +104,15 @@ class Category extends Common public function edit($id) { // + + $model_category = ModelCategory::find($id); + + $list = ModelCategory::getListLevel(); + + View::assign('list_category',$list); + View::assign('category',$model_category); + + return View::fetch(); } /** @@ -76,6 +125,36 @@ class Category extends Common public function update(Request $request, $id) { // + + + $post_data = $request->post(); + + $model_category = ModelCategory::where('title',$post_data['title']) + ->where('pid',$post_data['pid']) + ->where('id','<>',$id) + ->find(); + + if(!empty($model_category)){ + $this->error('相同名称相同级别不能出现两次'); + } + + if($post_data['pid'] != 0){ + + $model_parent_category = ModelCategory::where('id',$post_data['pid'])->find(); + + $post_data['level'] = $model_parent_category->level + 1; + + }else{ + $post_data['level'] = 1; + } + + $model_category = ModelCategory::find($id); + + $model_category->save($post_data); + + return $this->success('保存成功','index'); + + } /** @@ -87,5 +166,25 @@ class Category extends Common public function delete($id) { // + + if($id == 0){ + return json_message('错误'); + } + + $model_category = ModelCategory::find($id); + + $pid = 0; + + if($model_category->pid != 0){ + + $pid = $model_category->pid; + } + + ModelCategory::where('pid',$id)->update(['pid'=>$pid]); + + $model_category->delete(); + + return json_message(); + } } diff --git a/app/admin/controller/Post.php b/app/admin/controller/Post.php index 7161f68..bee4c40 100644 --- a/app/admin/controller/Post.php +++ b/app/admin/controller/Post.php @@ -4,7 +4,11 @@ declare(strict_types=1); namespace app\admin\controller; +use app\model\Category; use app\model\Post as ModelPost; +use app\model\PostCategory; +use app\model\PostTag; +use app\model\Tag; use think\facade\View; use think\Request; @@ -21,7 +25,7 @@ class Post extends Common $list = ModelPost::paginate(); - View::assign('list',$list); + View::assign('list', $list); return View::fetch(); } @@ -47,6 +51,35 @@ class Post extends Common public function save(Request $request) { // + $post_data = $request->post(); + + $categorys = []; + $tags = []; + if (isset($post_data['categorys'])) { + $categorys = $post_data['categorys']; + unset($post_data['categorys']); + } + if (isset($post_data['tags'])) { + $tags = $post_data['tags']; + unset($post_data['tags']); + } + + $model_post = ModelPost::create($post_data); + + foreach ($categorys as $category) { + PostCategory::create([ + 'post_id' => $model_post->id, + 'category_id' => $category + ]); + } + foreach ($tags as $tag) { + PostTag::create([ + 'post_id' => $model_post->id, + 'tag_id' => $tag + ]); + } + + return $this->success('添加成功', 'index'); } /** @@ -69,6 +102,13 @@ class Post extends Common public function edit($id) { // + + $model_post = ModelPost::find($id); + + + View::assign('post', $model_post); + + return View::fetch(); } /** @@ -81,6 +121,63 @@ class Post extends Common public function update(Request $request, $id) { // + $post_data = $request->post(); + + $model_post = ModelPost::find($id); + + $categorys = []; + $tags = []; + if (isset($post_data['categorys'])) { + $categorys = $post_data['categorys']; + unset($post_data['categorys']); + } + if (isset($post_data['tags'])) { + $tags = $post_data['tags']; + unset($post_data['tags']); + } + + $model_post->save($post_data); + + $old_category_list = PostCategory::where('post_id', $id)->select(); + $old_category_id_list = array_column((array)$old_category_list, 'id'); + $old_tag_list = PostTag::where('post_id', $id)->select(); + $old_tag_id_list = array_column((array)$old_tag_list, 'id'); + + // 旧的有新的没有 + foreach ($old_category_list as $model_category) { + if (!in_array($model_category->id, $categorys)) { + $model_category->delete(); + } + } + foreach ($old_tag_list as $model_tag) { + if (!in_array($model_tag->id, $tags)) { + $model_tag->delete(); + } + } + + + // 旧的没有新的有 + foreach ($categorys as $category) { + if (!in_array($category, $old_category_id_list)) { + + PostCategory::create([ + 'post_id' => $model_post->id, + 'category_id' => $category + ]); + } + } + + foreach ($tags as $tag) { + if (!in_array($tag, $old_tag_id_list)) { + + PostTag::create([ + 'post_id' => $model_post->id, + 'tag_id' => $tag + ]); + } + } + + return $this->success('保存成功', 'index'); } /** diff --git a/app/admin/controller/Tag.php b/app/admin/controller/Tag.php index e0f180a..dd4647b 100644 --- a/app/admin/controller/Tag.php +++ b/app/admin/controller/Tag.php @@ -1,85 +1,125 @@ paginate(); + + if($this->request->isAjax()){ + return json_message($list_tag); } - /** - * 显示创建资源表单页. - * - * @return \think\Response - */ - public function create() - { - // + View::assign('list',$list_tag); + + return View::fetch(); + } + + /** + * 显示创建资源表单页. + * + * @return \think\Response + */ + public function create() + { + // + } + + /** + * 保存新建的资源 + * + * @param \think\Request $request + * @return \think\Response + */ + public function save(Request $request) + { + // + + $post_data = $request->post(); + + $arr = explode(' ',$post_data['tags']); + + $arr = array_unique(array_filter($arr)); + + foreach ($arr as $tag) { + $model_tag = ModelTag::where('title',$tag)->find(); + + if(empty($model_tag)){ + ModelTag::create(['title'=>$tag]); + } } - /** - * 保存新建的资源 - * - * @param \think\Request $request - * @return \think\Response - */ - public function save(Request $request) - { - // - } + return json_message(); + } - /** - * 显示指定的资源 - * - * @param int $id - * @return \think\Response - */ - public function read($id) - { - // - } + /** + * 显示指定的资源 + * + * @param int $id + * @return \think\Response + */ + public function read($id) + { + // + } - /** - * 显示编辑资源表单页. - * - * @param int $id - * @return \think\Response - */ - public function edit($id) - { - // - } + /** + * 显示编辑资源表单页. + * + * @param int $id + * @return \think\Response + */ + public function edit($id) + { + // - /** - * 保存更新的资源 - * - * @param \think\Request $request - * @param int $id - * @return \think\Response - */ - public function update(Request $request, $id) - { - // - } + } - /** - * 删除指定资源 - * - * @param int $id - * @return \think\Response - */ - public function delete($id) - { - // - } + /** + * 保存更新的资源 + * + * @param \think\Request $request + * @param int $id + * @return \think\Response + */ + public function update(Request $request, $id) + { + // + + $post_data = $request->post(); + + $post_data['title'] = str_replace(' ','',$post_data['title']); + + $model_tag = ModelTag::find($id); + + $model_tag->save($post_data); + + return json_message(); + } + + /** + * 删除指定资源 + * + * @param int $id + * @return \think\Response + */ + public function delete($id) + { + // + } } diff --git a/app/common.php b/app/common.php index 52a940c..71ccf39 100644 --- a/app/common.php +++ b/app/common.php @@ -17,147 +17,175 @@ use think\File; use think\facade\Filesystem; use app\model\UploadFiles; -function json_message($data = [],$code = 0,$msg = '') +function json_message($data = [], $code = 0, $msg = '') { - if(is_string($data)){ - - $code = $code === 0 ? 500 : $code; - $msg = $data; - $data = []; - } + if (is_string($data)) { - return json([ - 'code'=>$code, - 'msg'=>$msg, - 'data'=>$data - ]); + $code = $code === 0 ? 500 : $code; + $msg = $data; + $data = []; + } + + return json([ + 'code' => $code, + 'msg' => $msg, + 'data' => $data + ]); } -function get_system_config($name = '',$default = '') +function get_system_config($name = '', $default = '') { - $list = Cache::get('system_config'); + $list = Cache::get('system_config'); - if(empty($list)){ - $list = SystemConfig::column('value','name'); - } + if (empty($list)) { + $list = SystemConfig::column('value', 'name'); + } - if($name === ''){ - return $list; - } + if ($name === '') { + return $list; + } - if(isset($list[$name])){ - return $list[$name]; - } + if (isset($list[$name])) { + return $list[$name]; + } - return $default; + return $default; } function get_source_link($url) { - if(strpos($url,'/') === 0){ - return $url; - }if(strpos($url,'http') === 0){ - return $url; - }else{ - $resource_domain = get_system_config('resource_domain'); + if (strpos($url, '/') === 0) { + return $url; + } + if (strpos($url, 'http') === 0) { + return $url; + } else { + $resource_domain = get_system_config('resource_domain'); - if(empty($resource_domain)){ - $resource_domain = request()->host(); - } - return 'http://'.$resource_domain.'/'.$url; + if (empty($resource_domain)) { + $resource_domain = request()->host(); } + return 'http://' . $resource_domain . '/' . $url; + } } function de_source_link($url) { - $domain = 'http://'.get_system_config('resource_domain').'/'; - if(strpos($url,$domain) === 0){ - return str_replace($domain,'',$url); - } - return false; + $domain = 'http://' . get_system_config('resource_domain') . '/'; + if (strpos($url, $domain) === 0) { + return str_replace($domain, '', $url); + } + return false; } -function save_url_file($url,$type) +function save_url_file($url, $type) { - - $file_data = geturl($url); - - $mime_type = MimeType::detectByContent($file_data); - - $ext_name = array_search($mime_type,MimeType::getExtensionToMimeTypeMap()); - $temp_file = tempnam(app()->getRuntimePath(),'url_save_').'.'.$ext_name; - file_put_contents($temp_file,$file_data); - $file = new File($temp_file); - $save_name = Filesystem::putFile('wx_public_account/qrcode_url',$file,'unique'); - - $model_file = new UploadFiles(); - $model_file->file_name = $file->getFilename(); - $model_file->mime_type = $mime_type; - $model_file->ext_name = $file->extension(); - $model_file->file_size = $file->getSize(); - $model_file->file_md5 = $file->md5(); - $model_file->file_sha1 = $file->sha1(); - $model_file->create_time = time(); - $model_file->type = $type; - - $model_file->save_name = $save_name; - $model_file->save(); + $file_data = geturl($url); - return $save_name; + $mime_type = MimeType::detectByContent($file_data); + + $ext_name = array_search($mime_type, MimeType::getExtensionToMimeTypeMap()); + $temp_file = tempnam(app()->getRuntimePath(), 'url_save_') . '.' . $ext_name; + file_put_contents($temp_file, $file_data); + $file = new File($temp_file); + + $save_name = Filesystem::putFile('wx_public_account/qrcode_url', $file, 'unique'); + + $model_file = new UploadFiles(); + $model_file->file_name = $file->getFilename(); + $model_file->mime_type = $mime_type; + $model_file->ext_name = $file->extension(); + $model_file->file_size = $file->getSize(); + $model_file->file_md5 = $file->md5(); + $model_file->file_sha1 = $file->sha1(); + $model_file->create_time = time(); + $model_file->type = $type; + + $model_file->save_name = $save_name; + $model_file->save(); + + return $save_name; } -function geturl($url){ - $headerArray =array(); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch,CURLOPT_HTTPHEADER,$headerArray); - $output = curl_exec($ch); - curl_close($ch); - - return $output; +function geturl($url) +{ + $headerArray = array(); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headerArray); + $output = curl_exec($ch); + curl_close($ch); + + return $output; } -function posturl($url,$data){ - $data = json_encode($data); - $headerArray =array(); - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE); - curl_setopt($curl, CURLOPT_POST, 1); - curl_setopt($curl, CURLOPT_POSTFIELDS, $data); - curl_setopt($curl,CURLOPT_HTTPHEADER,$headerArray); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - $output = curl_exec($curl); - curl_close($curl); - return $output; +function posturl($url, $data) +{ + $data = json_encode($data); + $headerArray = array(); + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); + curl_setopt($curl, CURLOPT_POST, 1); + curl_setopt($curl, CURLOPT_POSTFIELDS, $data); + curl_setopt($curl, CURLOPT_HTTPHEADER, $headerArray); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + $output = curl_exec($curl); + curl_close($curl); + return $output; } -function format_size($filesize) { +function format_size($filesize) +{ - if($filesize >= 1073741824) { + if ($filesize >= 1073741824) { - $filesize = round($filesize / 1073741824 * 100) / 100 . ' GB'; + $filesize = round($filesize / 1073741824 * 100) / 100 . ' GB'; + } elseif ($filesize >= 1048576) { - } elseif($filesize >= 1048576) { + $filesize = round($filesize / 1048576 * 100) / 100 . ' MB'; + } elseif ($filesize >= 1024) { - $filesize = round($filesize / 1048576 * 100) / 100 . ' MB'; + $filesize = round($filesize / 1024 * 100) / 100 . ' KB'; + } else { - } elseif($filesize >= 1024) { + $filesize = $filesize . ' 字节'; + } - $filesize = round($filesize / 1024 * 100) / 100 . ' KB'; + return $filesize; +} - } else { - $filesize = $filesize . ' 字节'; +/** + * 数组层级缩进转换 + * @param array $array 源数组 + * @param int $pid + * @param int $level + * @return array + */ +function array2level($array, $pid = 0, $level = 1) +{ + + static $list = []; + if ($level == 0) { + $list = []; + $level = 1; + } + foreach ($array as $v) { + if ($v['pid'] == $pid) { + $v['level'] = $level; + $list[] = $v; + array2level($array, $v['id'], $level + 1); } + } + // halt($list); - return $filesize; - + return $list; } diff --git a/app/model/Category.php b/app/model/Category.php index bb166b0..0719cf0 100644 --- a/app/model/Category.php +++ b/app/model/Category.php @@ -1,5 +1,6 @@ hasMany(PostCategory::class,'post_id'); + } + + public function tags() + { + return $this->hasMany(PostTag::class,'post_id'); + } + + public function setPubishTimeAttr($value) + { + return strtotime($value); + } + + public function setContentAttr($value) + { + return json_encode($value); + } + + public function getContentAttr($value) + { + return json_decode($value,true); + } + + public function getPosterAttr($value) + { + if(empty($value)){ + $value = '/static/images/avatar.jpeg'; + } + + return get_source_link($value); + } } diff --git a/app/model/PostCategory.php b/app/model/PostCategory.php new file mode 100644 index 0000000..f71020a --- /dev/null +++ b/app/model/PostCategory.php @@ -0,0 +1,14 @@ + + + + + + + + 分类管理 + {include file="common/_require"} + + + + + + +
+ {include file="common/_header"} + + {include file="common/left_post"} + +
+ +
+
+ + 首页 + 系统信息 + +
+
+
+
+ 新增分类 +
+
+
+
分类名称
+
+ +
+
+
+
上级分类
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + {include file="common/_footer"} +
+ + + + + \ No newline at end of file diff --git a/view/admin/category/edit.html b/view/admin/category/edit.html new file mode 100644 index 0000000..598e3b3 --- /dev/null +++ b/view/admin/category/edit.html @@ -0,0 +1,89 @@ + + + + + + + + 分类管理 + {include file="common/_require"} + + + + + + +
+ {include file="common/_header"} + + {include file="common/left_post"} + +
+ +
+
+ + 首页 + 系统信息 + +
+
+
+
+ 编辑分类 +
+
+ +
+
分类名称
+
+ +
+
+
+
上级分类
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + {include file="common/_footer"} +
+ + + + + \ No newline at end of file diff --git a/view/admin/category/index.html b/view/admin/category/index.html index 30f7708..986cb9e 100644 --- a/view/admin/category/index.html +++ b/view/admin/category/index.html @@ -1,43 +1,95 @@ - - - - - 应用管理 - {include file="common/_require"} - + + + + + 分类管理 + {include file="common/_require"} + + + - -
- {include file="common/_header"} - - {include file="common/left_post"} - -
- -
-
- - 首页 - 系统信息 - -
-
-
- 新增 -
-
-
+ +
+ {include file="common/_header"} + + {include file="common/left_post"} + +
+ +
+ - - - {include file="common/_footer"} +
+
+ 新增 +
+
+ + + + + + + + + + + + {volist name="list" id="vo"} + + + + + + + {/volist} + + +
ID名称操作
{$vo.id} {:str_repeat('|--',$vo.level)} {$vo.title} +
+ 编辑 +
删除
+
+
+ +
+
+
+ + + {include file="common/_footer"} +
+ + + \ No newline at end of file diff --git a/view/admin/common/_require.html b/view/admin/common/_require.html index 4db6db4..ddb5208 100644 --- a/view/admin/common/_require.html +++ b/view/admin/common/_require.html @@ -1,7 +1,7 @@ - + @@ -24,13 +24,13 @@ , click: function (type) { console.log(type); if (type === 'bar1') { - var skinName = $.cookie('skin-name') + var skinName = $.cookie('skin_name') $('body').removeClass() if (skinName == 'skin-1') { - $.cookie('skin-name', 'skin-0', defaultCookieSetting) + $.cookie('skin_name', 'skin-0', defaultCookieSetting) $('body').addClass('skin-0') } else { - $.cookie('skin-name', 'skin-1', defaultCookieSetting) + $.cookie('skin_name', 'skin-1', defaultCookieSetting) $('body').addClass('skin-1') } diff --git a/view/admin/post/create.html b/view/admin/post/create.html index 64c316c..8f93bd4 100644 --- a/view/admin/post/create.html +++ b/view/admin/post/create.html @@ -14,7 +14,13 @@ var currentLeftNavItem = 'post'; + @@ -73,7 +79,7 @@
- @@ -99,9 +105,9 @@ - - - + + + @@ -141,45 +147,40 @@
-
标签
-
- -
- -
- -
-
-
- -
-
+
分类
+
+
- -
新增
+ +
+
+ +
+
+ + +
新增
- +
标签
-
- - - -
+
+
+ +
+
- -
新增
+ +
新增
- +
@@ -204,7 +205,7 @@
- +
排序
@@ -224,13 +225,29 @@ {include file="common/_footer"} + +
+ + + + + + + +
+ {include file="common/_header"} + + {include file="common/left_post"} + +
+ +
+
+ + 首页 + 文章编辑 + +
+
+
+
+ +
+
+ 编辑 +
+ + +
+
标题
+
+ +
+
+ +
+
封面
+
+ +
+
上传
+
+
+ +
+
+
+
+
描述
+
+ +
+
+ +
+
内容
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+
+
+ 信息 +
+
+
状态
+
+ + +
+
+
+
发表时间
+
+ +
+
+
+
分类
+
+
+ + +
+
+ +
+
+ + +
新增
+
+
+ +
+
+
+
标签
+
+
+ +
+
+
+ +
新增
+
+
+ +
+
+
+
是否置顶
+
+ + +
+
+
+
跳转链接
+
+ +
+
+ +
+
跳转链接状态
+
+ + + +
+
+ +
+
排序
+
+ +
越大越靠前
+
+
+ +
+
+
+
+
+
+
+
+ + + {include file="common/_footer"} + + +
+ + + + + \ No newline at end of file diff --git a/view/admin/post/index.html b/view/admin/post/index.html index c57ea66..c1b12ae 100644 --- a/view/admin/post/index.html +++ b/view/admin/post/index.html @@ -43,6 +43,7 @@ 名称 封面 简介 + 排序 操作 @@ -53,7 +54,8 @@ {$vo.id} {$vo.title} - {$vo.value} + + {$vo.desc} {$vo.sort}
diff --git a/view/admin/tag/index.html b/view/admin/tag/index.html new file mode 100644 index 0000000..1a8887b --- /dev/null +++ b/view/admin/tag/index.html @@ -0,0 +1,131 @@ + + + + + + + + 标签管理 + {include file="common/_require"} + + + + + + +
+ {include file="common/_header"} + + {include file="common/left_post"} + +
+ +
+
+ + 首页 + 系统信息 + +
+
+
+
新增
+
+
+ + + + + + + + + + + + {volist name="list" id="vo"} + + + + + + + {/volist} + + +
ID名称操作
{$vo.id} {:str_repeat('|--',$vo.level)} {$vo.title} +
+
编辑
+
删除
+
+
+
+ {$list|raw} +
+
+
+
+
+ + + {include file="common/_footer"} +
+ + + + + \ No newline at end of file