Your Name 2 months ago
parent
commit
7062e04034

+ 5
- 0
apps/admin/controller/content/ContentController.php View File

@@ -347,6 +347,11 @@ class ContentController extends Controller
347 347
                     $api = "http://data.zz.baidu.com/urls?site=$domain&token=$token";
348 348
                     foreach ($list as $key => $value) {
349 349
                         $url = $domain . $urls[$value];
350
+
351
+                        //替换 .html 后缀
352
+                        $url = str_replace(".html","",$url);
353
+
354
+                        
350 355
                         $this->log('百度普通收录推送:' . $url);
351 356
                         $post_urls[] = $url;
352 357
                     }

+ 6
- 2
apps/admin/controller/content/ContentSortController.php View File

@@ -100,6 +100,7 @@ class ContentSortController extends Controller
100 100
                 $listtpl = basename(post('listtpl'));
101 101
                 $contenttpl = basename(post('contenttpl'));
102 102
                 $status = post('status');
103
+                $is_show = post('is_show');
103 104
                 
104 105
                 if (! $pcode) { // 父编码默认为0
105 106
                     $pcode = 0;
@@ -138,7 +139,8 @@ class ContentSortController extends Controller
138 139
                         'description' => '',
139 140
                         'sorting' => 255,
140 141
                         'create_user' => session('username'),
141
-                        'update_user' => session('username')
142
+                        'update_user' => session('username'),
143
+                        'is_show' => $is_show
142 144
                     );
143 145
                     $scode = get_auto_code($scode);
144 146
                 }
@@ -368,6 +370,7 @@ class ContentSortController extends Controller
368 370
             $listtpl = basename(post('listtpl'));
369 371
             $contenttpl = basename(post('contenttpl'));
370 372
             $status = post('status');
373
+            $is_show = post('is_show');
371 374
             $subname = post('subname');
372 375
             $filename = trim(post('filename'), '/');
373 376
             $outlink = post('outlink');
@@ -443,7 +446,8 @@ class ContentSortController extends Controller
443 446
                 'title' => $title,
444 447
                 'keywords' => $keywords,
445 448
                 'description' => $description,
446
-                'update_user' => session('username')
449
+                'update_user' => session('username'),
450
+                'is_show' => $is_show
447 451
             );
448 452
             
449 453
             // 执行添加

+ 7
- 2
apps/admin/controller/content/SingleController.php View File

@@ -129,9 +129,14 @@ class SingleController extends Controller
129 129
                 alert_back('链接类型不允许推送!');
130 130
             }
131 131
             if ($data->filename) {
132
-                $urls[] = $domain . homeurl('/home/Index/' . $data->filename, $url_rule_sort_suffix);
132
+                $url = $domain . homeurl('/home/Index/' . $data->filename, $url_rule_sort_suffix);
133
+                $url = str_replace(".html","",$url);
134
+                $urls[] = $url;
135
+
133 136
             } else {
134
-                $urls[] = $domain . homeurl('/home/Index/' . $data->urlname . $url_break_char . $data->scode, $url_rule_sort_suffix);
137
+                $url = $domain . homeurl('/home/Index/' . $data->urlname . $url_break_char . $data->scode, $url_rule_sort_suffix);
138
+                $url = str_replace(".html","",$url);
139
+                $urls[] = $url;
135 140
             }
136 141
             $result = post_baidu($api, $urls);
137 142
             if (isset($result->error)) {

+ 23
- 3
apps/admin/view/default/content/contentsort.html View File

@@ -180,9 +180,20 @@
180 180
 			                     	<input type="radio" name="status" value="1" title="显示" checked>
181 181
 									<input type="radio" name="status" value="0" title="隐藏">
182 182
 			                     </div>
183
-			                </div>  
184
-			                
185
-			               <div class="layui-form-item">
183
+			                </div>
184
+
185
+
186
+							<div class="layui-form-item">
187
+								<label class="layui-form-label">是否在首页显示</label>
188
+								<div class="layui-input-block">
189
+									<input type="radio" name="is_show" value="1" title="显示" checked>
190
+									<input type="radio" name="is_show" value="0" title="隐藏">
191
+								</div>
192
+							</div>
193
+
194
+
195
+
196
+							<div class="layui-form-item">
186 197
 			                     <label class="layui-form-label">浏览权限</label>
187 198
 			                     <div class="layui-input-block">
188 199
 									<select name="gid">
@@ -482,6 +493,15 @@
482 493
 								<input type="radio" name="status" value="0" title="隐藏" {if([$sort->status]==0)}checked="checked"{/if}>
483 494
 		                     </div>
484 495
 		                </div>
496
+
497
+						<div class="layui-form-item">
498
+							<label class="layui-form-label">是否在首页显示</label>
499
+							<div class="layui-input-block">
500
+								<input type="radio" name="is_show" value="1" title="显示" {if([$sort->is_show]==1)}checked="checked"{/if}>
501
+								<input type="radio" name="is_show" value="0" title="隐藏" {if([$sort->is_show]==0)}checked="checked"{/if}>
502
+							</div>
503
+						</div>
504
+
485 505
 		                
486 506
 		                 <div class="layui-form-item">
487 507
 			                     <label class="layui-form-label">浏览权限</label>

+ 23
- 11
template/dafeult/index.html View File

@@ -44,8 +44,11 @@
44 44
 <script language="javascript" type="text/javascript">
45 45
   jQuery(".slideBox").slide({mainCell:".bd ul",autoPlay:true,trigger:"click"});
46 46
 </script> 
47
-<!--/焦点图--> 
47
+<!--/焦点图-->
48 48
 
49
+
50
+
51
+{pboot:if('{label:index_server_1}' == '1')}
49 52
 <!--服务范围-->
50 53
 <div class="page-bg">
51 54
   <div class="page-box">
@@ -68,10 +71,13 @@
68 71
     </div>
69 72
   </div>
70 73
 </div>
71
-<!--/服务范围--> 
74
+<!--/服务范围-->
75
+{/pboot:if}
76
+
72 77
 
73 78
 <!--咨询效果-->
74 79
 {pboot:sort scode=11}
80
+{pboot:if('[sort:is_show]' == '1')}
75 81
 <div class="page-bg xiaoguo-bg">
76 82
   <div class="page-box">
77 83
     <div class="page-title">
@@ -94,11 +100,13 @@
94 100
     </div>
95 101
   </div>
96 102
 </div>
103
+{/pboot:if}
97 104
 {/pboot:sort}
98 105
 <!--/咨询效果--> 
99 106
 
100 107
 <!--专家团队-->
101 108
 {pboot:sort scode=6}
109
+{pboot:if('[sort:is_show]' == '1')}
102 110
 <div class="page-bg">
103 111
   <div class="page-box">
104 112
     <div class="page-title">
@@ -125,11 +133,13 @@
125 133
     </div>
126 134
   </div>
127 135
 </div>
136
+{/pboot:if}
128 137
 {/pboot:sort}
129 138
 <!--/专家团队--> 
130 139
 
131 140
 <!--首页案例-->
132 141
 {pboot:sort scode=7}
142
+{pboot:if('[sort:is_show]' == '1')}
133 143
 <div class="page-bg anli-bg">
134 144
   <div class="page-box">
135 145
     <div class="page-title">
@@ -162,26 +172,23 @@
162 172
     <div class="more-btn"> <a href="[sort:link]">查看更多<i><span class="icon iconfont icon-xiangyou1"></span></i></a> </div>
163 173
   </div>
164 174
 </div>
175
+{/pboot:if}
165 176
 {/pboot:sort}
166
-<!--/首页案例--> 
177
+<!--/首页案例-->
178
+
167 179
 
168 180
 <!--咨询流程-->
169 181
 <div class="page-bg">
170 182
   <div class="page-box">
183
+    {pboot:if('{label:index_server_2}' == '1')}
171 184
     <div class="page-title">
172
-
173 185
       {pboot:sort scode=13}
174 186
       <h2>[sort:name]</h2>
175 187
       <p>[sort:def1]</p>
176 188
       {/pboot:sort}
177
-
178
-
179 189
     </div>
180 190
     <div class="liucheng">
181 191
       <ul>
182
-
183
-
184
-
185 192
         {pboot:sort scode=14}
186 193
         <li>
187 194
           <div class="box">
@@ -216,10 +223,12 @@
216 223
 
217 224
       </ul>
218 225
     </div>
219
-    
226
+    {/pboot:if}
227
+
220 228
     <!--关于我们-->
229
+
221 230
     {pboot:content scode=10}
222
-    <div class="home-about">
231
+    <div class="home-about" {pboot:if('{label:ndex_server_3}' == '0')} style="display:none;" {/pboot:if}>
223 232
       <div class="img"> <img src="[content:ico]"> </div>
224 233
       <div class="desc">
225 234
         <h2>{pboot:companyname}</h2>
@@ -248,6 +257,7 @@
248 257
       </div>
249 258
     </div>
250 259
     {/pboot:content}
260
+
251 261
     <!--/关于我们--> 
252 262
     
253 263
   </div>
@@ -256,6 +266,7 @@
256 266
 
257 267
 <!--首页新闻-->
258 268
 {pboot:sort scode=8}
269
+{pboot:if('[sort:is_show]' == '1')}
259 270
 <div class="page-bg border-top">
260 271
   <div class="page-box">
261 272
     <div class="page-title">
@@ -304,6 +315,7 @@
304 315
     <div class="more-btn"> <a href="[sort:link]">查看更多<i><span class="icon iconfont icon-xiangyou1"></span></i></a> </div>
305 316
   </div>
306 317
 </div>
318
+{/pboot:if}
307 319
 {/pboot:sort}
308 320
 <!--/首页新闻-->
309 321
 

+ 18
- 5
template/dafeult/wap/index.html View File

@@ -44,8 +44,10 @@
44 44
 <script language="javascript" type="text/javascript">
45 45
   jQuery(".slideBox").slide({mainCell:".bd ul",effect:"leftLoop",autoPlay:true});
46 46
 </script> 
47
-<!--/焦点图--> 
47
+<!--/焦点图-->
48 48
 
49
+
50
+{pboot:if('{label:index_server_1}' == '1')}
49 51
 <!--服务范围-->
50 52
 <div class="index-nav-content">
51 53
   <div class="index-fanwei">
@@ -61,10 +63,12 @@
61 63
     </ul>
62 64
   </div>
63 65
 </div>
64
-<!--服务范围 结束--> 
66
+<!--服务范围 结束-->
67
+{/pboot:if}
65 68
 
66 69
 <!--专家团队-->
67 70
 {pboot:sort scode=6}
71
+{pboot:if('[sort:is_show]' == '1')}
68 72
 <div class="index-tuandui-page">
69 73
   <div class="index-title">
70 74
     <h2>[sort:name]</h2>
@@ -87,11 +91,13 @@
87 91
     </div>
88 92
   </div>
89 93
 </div>
94
+{/pboot:if}
90 95
 {/pboot:sort}
91 96
 <!--专家团队 结束--> 
92 97
 
93 98
 <!--个案分享-->
94 99
 {pboot:sort scode=7}
100
+{pboot:if('[sort:is_show]' == '1')}
95 101
 <div class="index-page">
96 102
   <div class="index-title">
97 103
     <h2>[sort:name]</h2>
@@ -120,11 +126,13 @@
120 126
   </div>
121 127
   <script>jQuery(".tab-anli").slide({effect:"leftLoop",trigger:"click"});</script> 
122 128
 </div>
129
+{/pboot:if}
123 130
 {/pboot:sort}
124 131
 <!--个案分享 结束--> 
125 132
 
126 133
 <!--常见问题-->
127 134
 {pboot:sort scode=11}
135
+{pboot:if('[sort:is_show]' == '1')}
128 136
 <div class="index-page">
129 137
   <div class="index-title">
130 138
     <h2>[sort:name]</h2>
@@ -145,9 +153,11 @@
145 153
   </div>
146 154
   <script>jQuery(".tab-wenti").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:false,scroll:1,vis:5,trigger:"click"});</script> 
147 155
 </div>
156
+{/pboot:if}
148 157
 {/pboot:sort}
149
-<!--常见问题 结束--> 
158
+<!--常见问题 结束-->
150 159
 
160
+{pboot:if('{label:index_server_2}' == '1')}
151 161
 <!--服务流程-->
152 162
 <div class="index-page">
153 163
   <div class="index-title">
@@ -170,11 +180,12 @@
170 180
     </ul>
171 181
   </div>
172 182
 </div>
173
-<!--服务流程 结束--> 
183
+<!--服务流程 结束-->
184
+{/pboot:if}
174 185
 
175 186
 <!--关于我们-->
176 187
 {pboot:sort scode=10}
177
-<div class="index-page">
188
+<div class="index-page" {pboot:if('{label:ndex_server_3}' == '0')} style="display:none;" {/pboot:if}>
178 189
   <div class="index-title">
179 190
     <h2>[sort:name]</h2>
180 191
     <a href="[sort:link]">更多<span class="icon iconfont icon-xiangyou1"></span></a> </div>
@@ -213,6 +224,7 @@
213 224
 
214 225
 <!--动态资讯-->
215 226
 {pboot:sort scode=8}
227
+{pboot:if('[sort:is_show]' == '1')}
216 228
 <div class="index-page">
217 229
   <div class="index-title">
218 230
     <h2>[sort:name]</h2>
@@ -230,6 +242,7 @@
230 242
     </ul>
231 243
   </div>
232 244
 </div>
245
+{/pboot:if}
233 246
 {/pboot:sort}
234 247
 <!--动态资讯 结束-->
235 248
 

Loading…
Cancel
Save