wesmiler 5 lat temu
rodzic
commit
139d09afeb

+ 3 - 3
app/index/controller/IndexController.php

@@ -86,7 +86,7 @@ class IndexController extends HomeBaseController
             foreach($newsCates1 as $k=>$v){
                 $catid = isset($v['id'])? intval($v['id']): 0;
                 if($catid){
-                    $dataList = NewsService::getListByCate($catid, 5);
+                    $dataList = NewsService::getListByCate($catid, 6);
                     $cateNews1[] = $dataList? $dataList->toArray() : [];
                 }
             }
@@ -96,7 +96,7 @@ class IndexController extends HomeBaseController
             foreach($newsCates2 as $k=>$v){
                 $catid = isset($v['id'])? intval($v['id']): 0;
                 if($catid){
-                    $dataList = NewsService::getListByCate($catid, 5);
+                    $dataList = NewsService::getListByCate($catid, 6);
                     $cateNews2[] = $dataList? $dataList->toArray() : [];
                 }
             }
@@ -107,7 +107,7 @@ class IndexController extends HomeBaseController
         $newsHot = NewsService::getHotList();
 
         // 加盟问答
-        $answerList = NewsService::getListByLevel(1, 12);
+        $answerList = NewsService::getListByLevel(1, 13);
 
         // 课堂列表
         $courseList = NewsService::getListByLevel(2, 7);

+ 19 - 0
app/index/exception/Http.php

@@ -0,0 +1,19 @@
+<?php
+namespace app\index\exception;
+
+use Exception;
+use think\exception\Handle;
+class Http extends Handle
+{
+
+    public function render(\Exception $e){
+        if(config('app_debug')){
+            //如果开启debug则正常报错
+            return parent::render($e);
+        }else{
+            //404页面  自行定义
+            header("Location:".url('/404'));
+        }
+    }
+
+}

+ 2 - 1
data/config/app.php

@@ -2,7 +2,8 @@
 return [
     // 默认模块名
     'default_module'         => 'index',
-   
+    'exception_handle'         => '\\app\\index\\exception\\Http',
+
     
 ];
 

+ 0 - 1
data/config/app1.php

@@ -3,7 +3,6 @@ return [
     // 默认模块名
     'default_module'         => 'index',
     'exception_tmpl'         => WEB_ROOT. '/404.html'
-    
 ];
 
 ?>

+ 15 - 9
public/404.html

@@ -1,11 +1,17 @@
-<!DOCTYPE html>
 <html>
-	<head>
-		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-		<title>404</title>
-		
-	</head>
-	<body>
-		404了!
-	</body>
+<head>
+	<title>页面错误</title>
+	<meta charset="UTF-8">
+	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+	<link rel="stylesheet" href="/static/css/404.css" />
+</head>
+<body>
+<p class="main_404">
+	<img src="/static/images/404.png" />
+	<br>
+	<span class="main_404_desc">很抱歉,您要访问的页面不存在!</span>
+	<br>
+	<span class="main_404_back"><a href="/"><&nbsp;返回首页</a></span>
+</p>
+</body>
 </html>

+ 4 - 0
public/static/css/404.css

@@ -0,0 +1,4 @@
+p.main_404{width:400px;margin:140px auto;text-align:center;}
+p span.main_404_desc{float:left;margin-top:50px;font-size:26px;font-weight:bold;color:#666;}
+p span.main_404_back{float:left;margin:50px 0 70px 135px;font-size:18px;font-weight:bold;border-radius:3px;width: 130px;height: 36px;line-height: 36px;background-color:#00b350;}
+p span.main_404_back a{color:#fff;}

+ 2 - 0
public/static/css/sitemap.css

@@ -0,0 +1,2 @@
+a {   text-decoration: none;   cursor: pointer;   color: #333;}
+a {    float: left;    width: 93px;   height: 32px;   line-height: 32px;   background: #fff;   border: 1px solid #ddd;   text-align: center;   color: #565656;   font-size: 14px;   margin: 12px 13px 0 0;   cursor: pointer;}

BIN
public/static/images/404.png


+ 7 - 16
public/themes/mjmls/index/know/index.html

@@ -1,4 +1,5 @@
 <include file="block/header_xm" />
+
 <link rel="stylesheet" type="text/css" href="__TMPL__/static/css/know-content.css"/>
 <link rel="stylesheet" type="text/css" href="__TMPL__/static/css/know.css"/>
 <style>
@@ -10,6 +11,9 @@
         border:none;
     }
 </style>
+
+<!-- nav -->
+<include file="block/nav" />
 <!-- 面包屑 -->
 <div class="container crumbs">当前位置:
     <a href="/" target="">网站首页</a> >
@@ -23,7 +27,9 @@
         <div class="know-list"><table cellpadding="0" cellspacing="0" width="100%">
             <foreach name="lists" id="vo">
                 <tr>
-                    <td class="kl-avatar"><a href="/know/detail/{$vo.id}/"><img src="__TMPL__/static/images/show.php" width="20" height="20" title="rcgl" alt=""/></a></td>
+                    <td class="kl-avatar"><a href="/know/detail/{$vo.id}/">
+                        <!--<img src="__TMPL__/static/images/show.php" width="20" height="20" title="rcgl" alt=""/>-->
+                    </a></td>
                     <td class="kl-title"><div><a href="/know/detail/{$vo.id}/" title="{$vo.title}">{$vo.title}</a></div></td>
                     <td class="kl-answer">0回答</td>
                     <td class="kl-process" width="50" align="center"><img src="__TMPL__/static/images/know_1.gif" title="待解决"/></td>
@@ -37,18 +43,3 @@
 </div>
 </div>
 <include file="block/footer" />
-<script type="text/javascript">
-    //foo("tab","span","tabUl","li","tab_on","tab_active");
-    foo("youDiv","span","youUl","li","right_active","you_active");
-    foo("title","span","titleUl","li","title_active","title_box");
-    foo('tabTop','span','tabUl0','li','red_active','red_li_active');
-    foo('tabTop1','span','tabUl1','li','red_active','red_li_active');
-    foo('brandT','span','brandB','li','brand_t_active','brand_b_active');
-    plays("#lunbo_0");
-</script>
-<script type="text/javascript">
-    jQuery(".txtMarquee-left").slide({mainCell:".bd ul",autoPlay:true,effect:"leftMarquee",vis:2,interTime:50}); //文字滚动
-    jQuery(".picFocus").slide({ mainCell:".bd ul",effect:"left",autoPlay:true }); //头部banner轮播
-    jQuery(".slideBox").slide({mainCell:".bd ul",autoPlay:true}); //加盟动态轮播
-    jQuery(".slideBox").slide({ mainCell:"ul.caini",vis:5,prevCell:".sPrev",nextCell:".sNext",effect:"leftLoop"});  //底部滚动
-</script>

+ 6 - 35
public/themes/mjmls/index/know/show.html

@@ -7,6 +7,8 @@
     }
 
 </style>
+<!-- nav -->
+<include file="block/nav" />
 <!-- 面包屑 -->
 <div class="container crumbs">当前位置:
     <a href="/" target="">网站首页</a> >
@@ -24,10 +26,8 @@
                             <li>
                                 <a href="#" class="b"><strong>{$info.username}</strong></a>
                             </li>
-                            <li><img src="__TMPL__/style/picture/show.php" alt="" class="know_avatar"/></li>
-                            <li><a href="#" target="_blank" rel="nofollow"><img
-                                    src="__TMPL__/style/picture/online.png.php" title="点击交谈/留言" alt="" align="absmiddle"
-                                    onerror="this.src=DTPath+'file/image/web-off.gif';"/></a></li>
+                            <li></li>
+                            <li><a href="#" target="_blank" rel="nofollow"></a></li>
                             <li></li>
                         </ul>
                     </td>
@@ -55,10 +55,8 @@
                                 <li>
                                     <a href="#" class="b"><strong>{$info.author}</strong></a>
                                 </li>
-                                <li><img src="__TMPL__/style/picture/show.php" alt="" class="know_avatar"/></li>
-                                <li><a href="#" target="_blank" rel="nofollow"><img
-                                        src="__TMPL__/style/picture/online.png.php" title="点击交谈/留言" alt=""
-                                        align="absmiddle" onerror="this.src=DTPath+'file/image/web-off.gif';"/></a></li>
+                                <li></li>
+                                <li><a href="#" target="_blank" rel="nofollow"></a></li>
                                 <li></li>
                             </ul>
                         </td>
@@ -82,30 +80,3 @@
     </div>
 </div>
 <include file="block/footer"/>
-<script type="text/javascript">
-    //foo("tab","span","tabUl","li","tab_on","tab_active");
-    foo("youDiv", "span", "youUl", "li", "right_active", "you_active");
-    foo("title", "span", "titleUl", "li", "title_active", "title_box");
-    foo('tabTop', 'span', 'tabUl0', 'li', 'red_active', 'red_li_active');
-    foo('tabTop1', 'span', 'tabUl1', 'li', 'red_active', 'red_li_active');
-    foo('brandT', 'span', 'brandB', 'li', 'brand_t_active', 'brand_b_active');
-    plays("#lunbo_0");
-</script>
-<script type="text/javascript">
-    jQuery(".txtMarquee-left").slide({
-        mainCell: ".bd ul",
-        autoPlay: true,
-        effect: "leftMarquee",
-        vis: 2,
-        interTime: 50
-    }); //文字滚动
-    jQuery(".picFocus").slide({mainCell: ".bd ul", effect: "left", autoPlay: true}); //头部banner轮播
-    jQuery(".slideBox").slide({mainCell: ".bd ul", autoPlay: true}); //加盟动态轮播
-    jQuery(".slideBox").slide({
-        mainCell: "ul.caini",
-        vis: 5,
-        prevCell: ".sPrev",
-        nextCell: ".sNext",
-        effect: "leftLoop"
-    });  //底部滚动
-</script>

+ 6 - 3
public/themes/mjmls/static/js/index.js

@@ -11,9 +11,9 @@ $(function () {
 
     var swiper = new Swiper('#slide1', {
         speed: 600,
-        // autoplay: {
-        //     delay: 4000
-        // },
+        autoplay: {
+            delay: 4000
+        },
         loop: true,
         pagination: {
             el: '.swiper-pagination',
@@ -36,6 +36,9 @@ $(function () {
     var reco = new Swiper('#slide2', {
         speed: 900,
         loop: true,
+        autoplay: {
+            delay: 4000
+        },
         lazy: {
             loadPrevNext: true,
         },

+ 4 - 0
vendor/thinkcmf/cmf/src/controller/HomeBaseController.php

@@ -260,4 +260,8 @@ hello;
         }
     }
 
+    public function _empty(){
+        echo "您访问的页面有误111111111111";
+    }
+
 }

+ 1 - 5
vendor/thinkphp/tpl/think_exception.tpl

@@ -409,11 +409,7 @@
     </div>
     <?php } ?>
 
-    <div class="copyright">
-        <a title="官方网站" href="http://www.thinkphp.cn">ThinkPHP</a> 
-        <span>V<?php echo \think\facade\App::version(); ?></span> 
-        <span>{ 十年磨一剑-为API开发设计的高性能框架 }</span>
-    </div>
+
     <?php if(\think\facade\App::isDebug()) { ?>
     <script>
         var LINE = <?php echo $line; ?>;