Your Name 2 months ago
parent
commit
6b890a06c9

+ 7
- 0
.idea/php.xml View File

@@ -10,6 +10,13 @@
10 10
     <option name="highlightLevel" value="WARNING" />
11 11
     <option name="transferred" value="true" />
12 12
   </component>
13
+  <component name="PhpIncludePathManager">
14
+    <include_path>
15
+      <path value="$PROJECT_DIR$/vendor/baidu-smartapp/openapi" />
16
+      <path value="$PROJECT_DIR$/vendor/overtrue/pinyin" />
17
+      <path value="$PROJECT_DIR$/vendor/composer" />
18
+    </include_path>
19
+  </component>
13 20
   <component name="PhpProjectSharedConfiguration" php_language_level="7.0">
14 21
     <option name="suggestChangeDefaultLanguageLevel" value="false" />
15 22
   </component>

+ 3
- 0
.idea/www.tyqngp.cn.iml View File

@@ -3,6 +3,9 @@
3 3
   <component name="NewModuleRootManager">
4 4
     <content url="file://$MODULE_DIR$">
5 5
       <sourceFolder url="file://$MODULE_DIR$/apps" isTestSource="false" packagePrefix="app" />
6
+      <excludeFolder url="file://$MODULE_DIR$/vendor/baidu-smartapp/openapi" />
7
+      <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
8
+      <excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/pinyin" />
6 9
     </content>
7 10
     <orderEntry type="inheritedJdk" />
8 11
     <orderEntry type="sourceFolder" forTests="false" />

+ 33
- 0
apps/admin/controller/system/CityController.php View File

@@ -427,4 +427,37 @@ class CityController extends Controller
427 427
             }
428 428
         }
429 429
     }
430
+
431
+    /*
432
+     * https://www.ledaxinli.com/admin.php?p=/City/updateData
433
+     */
434
+    public function updateData(){
435
+
436
+        //384 市 383 区
437
+        //$this->model->getList($pid);
438
+        //$this->model->editRow($insert_data);
439
+
440
+        /*
441
+         * 替换字符串
442
+         * UPDATE ay_city SET title = REPLACE(BINARY title, '区', '') where pid=383;
443
+         * UPDATE ay_city SET stitle = REPLACE(BINARY stitle, '区', '') where pid=383;
444
+         * UPDATE ay_city SET title = REPLACE(BINARY title, '市', '') where pid=384;
445
+         * UPDATE ay_city SET stitle = REPLACE(BINARY stitle, '市', '') where pid=384;
446
+         */
447
+
448
+        /*
449
+         * 判断数据库字段是否含有重复数据
450
+         * select etitle from ay_city group by etitle having count(*)>1
451
+         * select title from ay_city where pid=386 group by title having count(*)>1
452
+         *
453
+         * SELECT etitle, COUNT(*) as count FROM ay_city GROUP BY etitle HAVING COUNT(*) > 1;
454
+         * SELECT title, COUNT(*) as count FROM ay_city GROUP BY title HAVING COUNT(*) > 1;
455
+         * SELECT stitle, COUNT(*) as count FROM ay_city GROUP BY stitle HAVING COUNT(*) > 1;
456
+         *
457
+         *
458
+
459
+         */
460
+
461
+    }
462
+
430 463
 }

+ 20
- 0
apps/home/controller/SitemapController.php View File

@@ -35,11 +35,16 @@ class SitemapController extends Controller{
35 35
         $wildcard = $this->config('wildcard');  //泛域名支持状态
36 36
         $city_suffix = $this->config('city_suffix');  //城市后缀
37 37
         $city_suffix = $city_suffix ? '.html' : '/';
38
+
38 39
         $model = model('admin.system.City');
39 40
         $city = $model->getAllList();
40 41
         $domain = get_http_host();  //当前域名
41 42
         $cur_city = array_filter($city, function($t) use ($domain) { return $t['isurl'] == $domain; });    //当前城市绑定了域名
43
+
44
+
42 45
         if( $wildcard || !empty($cur_city) ){
46
+            //开启泛域名
47
+            //var_dump("fdfdf");die;
43 48
             foreach ($sorts as $value) {
44 49
                 if ($value->outlink) {
45 50
                     continue;
@@ -55,12 +60,16 @@ class SitemapController extends Controller{
55 60
                             continue;
56 61
                         } else {
57 62
                             $link = $Parser->parserLink(2, $value2->urlname, 'content', $value2->scode, $value2->sortfilename, $value2->id, $value2->filename);
63
+                            //echo $link;die;
64
+                            //去除.html
65
+                            $link = str_replace(".html", "", $link);
58 66
                         }
59 67
                         $str .= $this->makeNode($link, date('Y-m-d', strtotime($value2->date)), '0.60', 'daily');
60 68
                     }
61 69
                 }
62 70
             }
63 71
         }else{
72
+            //var_dump("fdfdf");die;
64 73
             cookie('city',''); //防止生成的链接叠加当前城市
65 74
             foreach ($city as $c) {
66 75
                 $str .= $this->makeNode( '/'.$c['etitle'] . $city_suffix, date('Y-m-d'), '1.00', 'always'); // 根目录
@@ -94,6 +103,9 @@ class SitemapController extends Controller{
94 103
                                 continue;
95 104
                             } else {
96 105
                                 $link = $Parser->parserLink(2, $value2->urlname, 'content', $value2->scode, $value2->sortfilename, $value2->id, $value2->filename);
106
+                                //echo $link;die;
107
+                                //去除.html
108
+                                $link = str_replace(".html", "", $link);
97 109
                             }
98 110
                             $str .= $this->makeNode( $url . $link, date('Y-m-d', strtotime($value2->date)), '0.60', 'daily');
99 111
                         }
@@ -133,6 +145,8 @@ class SitemapController extends Controller{
133 145
         $domain = get_http_host();  //当前域名
134 146
         $cur_city = array_filter($city, function($t) use ($domain) { return $t['isurl'] == $domain; });    //当前城市绑定了域名
135 147
         if( $wildcard || !empty($cur_city) ){
148
+            //开启二级域名
149
+            //var_dump("55dfd5");die;
136 150
             foreach ($sorts as $value) {
137 151
                 if ($value->outlink) {
138 152
                     continue;
@@ -148,6 +162,9 @@ class SitemapController extends Controller{
148 162
                             continue;
149 163
                         } else {
150 164
                             $link = $Parser->parserLink(2, $value2->urlname, 'content', $value2->scode, $value2->sortfilename, $value2->id, $value2->filename);
165
+                            //echo $link;die;
166
+                            //去除.html
167
+                            $link = str_replace(".html", "", $link);
151 168
                         }
152 169
                         $str .= get_http_url() . $link . "\n";
153 170
                     }
@@ -184,6 +201,9 @@ class SitemapController extends Controller{
184 201
                                 continue;
185 202
                             } else {
186 203
                                 $link = $Parser->parserLink(2, $value2->urlname, 'content', $value2->scode, $value2->sortfilename, $value2->id, $value2->filename);
204
+                                //echo $link;die;
205
+                                //去除.html
206
+                                $link = str_replace(".html", "", $link);
187 207
                             }
188 208
                             $str .= get_http_url() . $url . $link . "\n";
189 209
                         }

+ 6
- 1
template/dafeult/foot.html View File

@@ -73,7 +73,12 @@
73 73
     {/pboot:if}
74 74
     {/pboot:sql}
75 75
 
76
-    {pboot:sitecopyright} <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a> <a href="{pboot:sitedomain}/sitemap.xml" target="_blank">网站地图</a> {pboot:sitestatistical}</p>
76
+    {pboot:sitecopyright} <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a>
77
+
78
+
79
+    <a href="{pboot:httpurl}/sitemap.xml" target="_blank">网站地图</a>
80
+
81
+    {pboot:sitestatistical}</p>
77 82
   <p style="display:none;"></p>
78 83
 </div>
79 84
 <!--/页脚--> 

+ 2
- 1
template/dafeult/foot_city.html View File

@@ -31,7 +31,8 @@
31 31
 
32 32
     <a href="{label:city_url}">心理咨询预约</a> Copyright © 2019-2024 “<a href="{label:city_url}">心理咨询预约</a> ”就上“<a href="{pboot:sitedomain}">乐达心理</a>”全国高端连锁
33 33
 
34
-    {pboot:sitecopyright} <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a> <a href="{pboot:sitedomain}/index.php/sitemap.xml" target="_blank">网站地图</a> {pboot:sitestatistical}</p>
34
+    {pboot:sitecopyright} <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a>
35
+    <!--<a href="{pboot:sitedomain}/index.php/sitemap.xml" target="_blank">网站地图</a>--> {pboot:sitestatistical}</p>
35 36
   <p style="display:none;"></p>
36 37
 </div>
37 38
 <!--/页脚--> 

Loading…
Cancel
Save