Browse Source

Merge branch 'develop' of zhengxifeng/tyqngp into master

zhengxifeng 2 months ago
parent
commit
e5a39f5ccd

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

10
     <option name="highlightLevel" value="WARNING" />
10
     <option name="highlightLevel" value="WARNING" />
11
     <option name="transferred" value="true" />
11
     <option name="transferred" value="true" />
12
   </component>
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
   <component name="PhpProjectSharedConfiguration" php_language_level="7.0">
20
   <component name="PhpProjectSharedConfiguration" php_language_level="7.0">
14
     <option name="suggestChangeDefaultLanguageLevel" value="false" />
21
     <option name="suggestChangeDefaultLanguageLevel" value="false" />
15
   </component>
22
   </component>

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

3
   <component name="NewModuleRootManager">
3
   <component name="NewModuleRootManager">
4
     <content url="file://$MODULE_DIR$">
4
     <content url="file://$MODULE_DIR$">
5
       <sourceFolder url="file://$MODULE_DIR$/apps" isTestSource="false" packagePrefix="app" />
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
     </content>
9
     </content>
7
     <orderEntry type="inheritedJdk" />
10
     <orderEntry type="inheritedJdk" />
8
     <orderEntry type="sourceFolder" forTests="false" />
11
     <orderEntry type="sourceFolder" forTests="false" />

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

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

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

73
     {/pboot:if}
73
     {/pboot:if}
74
     {/pboot:sql}
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
   <p style="display:none;"></p>
82
   <p style="display:none;"></p>
78
 </div>
83
 </div>
79
 <!--/页脚--> 
84
 <!--/页脚--> 

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

31
 
31
 
32
     <a href="{label:city_url}">心理咨询预约</a> Copyright © 2019-2024 “<a href="{label:city_url}">心理咨询预约</a> ”就上“<a href="{pboot:sitedomain}">乐达心理</a>”全国高端连锁
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
   <p style="display:none;"></p>
36
   <p style="display:none;"></p>
36
 </div>
37
 </div>
37
 <!--/页脚--> 
38
 <!--/页脚--> 

Loading…
Cancel
Save