diff --git a/application/index/controller/Common.php b/application/index/controller/Common.php index 5f19053d80633c02f94e8c3ca28e9e5c58ae9d88..246fdab5e8fbafa390fc277e08bf2e5b5115fd25 100755 --- a/application/index/controller/Common.php +++ b/application/index/controller/Common.php @@ -208,7 +208,7 @@ class Common extends Controller $this->assign('common_shop_notice', MyC('common_shop_notice')); // 友情链接 - $link = LinkService::LinkShowList(); + $link = LinkService::LinkList(['where'=>['is_enable'=>1]]); $this->assign('link_list', $link['data']); } diff --git a/application/service/LinkService.php b/application/service/LinkService.php index 7b54395654d88e786c8cfeaf00f55c24ae99ab79..504815712de151dacb18cdc7342e6db27a955717 100755 --- a/application/service/LinkService.php +++ b/application/service/LinkService.php @@ -22,21 +22,6 @@ use app\service\GoodsService; */ class LinkService { - /** - * 前端展示 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-09-29 - * @desc description - * @param [array] $params [输入参数] - */ - public static function LinkShowList($params = []) - { - $data = Db::name('Link')->where(['is_enable'=>1])->order('sort asc')->select(); - return DataReturn('处理成功', 0, $data); - } - /** * 列表 * @author Devil @@ -48,7 +33,8 @@ class LinkService */ public static function LinkList($params = []) { - $data = Db::name('Link')->order('sort asc')->select(); + $where = empty($params['where']) ? [] : $params['where']; + $data = Db::name('Link')->where($where)->order('sort asc')->select(); return DataReturn('处理成功', 0, $data); } diff --git a/thinkphp/tpl/think_exception.tpl b/thinkphp/tpl/think_exception.tpl index 19ecbdc1bf4cc76baab846badc7bfe65399dd6da..c3fa0d4c97f7f69afc4b10fefeb785a034fd13ce 100755 --- a/thinkphp/tpl/think_exception.tpl +++ b/thinkphp/tpl/think_exception.tpl @@ -410,9 +410,9 @@