diff --git a/app/admin/controller/Slider.php b/app/admin/controller/Slider.php index 6270156..671ad26 100644 --- a/app/admin/controller/Slider.php +++ b/app/admin/controller/Slider.php @@ -19,7 +19,7 @@ class Slider extends AdminController public function index() { //幻灯列表 - $sliders = Db::name('slider')->select(); + $sliders = SliderModel::select(); View::assign('slider',$sliders); return View::fetch(); } diff --git a/app/admin/model/Slider.php b/app/admin/model/Slider.php index 5ce4ad6..1cee35a 100644 --- a/app/admin/model/Slider.php +++ b/app/admin/model/Slider.php @@ -11,7 +11,11 @@ class Slider extends Model protected $deleteTime = 'delete_time'; protected $defaultSoftDelete = 0; - + public function getSlidTypeAttr($value) + { + $slid_type = [1=>'首页幻灯',2=>'通用右底',3=>'首页赞助',4=>'文章赞助',5=>'分类赞助',6=>'友情链接']; + return $slid_type[$value]; + } } \ No newline at end of file diff --git a/route/index/route.php b/route/index/route.php index 2411da2..77f8752 100644 --- a/route/index/route.php +++ b/route/index/route.php @@ -15,7 +15,7 @@ Route::group(function () { Route::get('column///','article/cate'); Route::rule('add','article/add'); Route::rule('del/:id','article/delete'); - //Route::rule('edit/:id','article/edit'); + Route::rule('edit/[:id]','article/edit'); }); Route::group(function () { Route::rule('u/:id', 'user/home'); diff --git a/view/index/index/index.html b/view/index/index/index.html index d46869f..ea28174 100644 --- a/view/index/index/index.html +++ b/view/index/index/index.html @@ -53,16 +53,12 @@ - {$top.comments_count} -
- {if ($top.is_top == 1)} 置顶 {/if} {//if ($top.is_hot == 1) 精帖 {/if} -
{/volist} @@ -125,7 +121,7 @@
应用说明
Git 仓库
@@ -195,19 +191,18 @@
- 这里可作为广告区域 + 官方产品
- -
- {volist name="ad_comm" id="vo"} - - {/volist} -
-
+
+ {volist name="ad_comm" id="vo"} + + {/volist} +
+ {include file="public/flink" /}
@@ -339,8 +334,6 @@ return false; }); - -