Your Name 3 meses atrás
pai
commit
1db005d05a
45 arquivos alterados com 755 adições e 57 exclusões
  1. 31
    2
      apps/admin/controller/content/LinkController.php
  2. 8
    2
      apps/admin/controller/system/CityController.php
  3. 44
    2
      apps/admin/model/content/LinkModel.php
  4. 77
    4
      apps/admin/view/default/content/link.html
  5. 26
    0
      apps/admin/view/default/system/city.html
  6. 26
    0
      apps/common/HomeController.php
  7. 42
    10
      apps/home/controller/IndexController.php
  8. 109
    3
      apps/home/controller/ParserController.php
  9. 12
    0
      apps/home/model/ParserModel.php
  10. 7
    0
      core/function/helper.php
  11. BIN
      static/upload/image/20240826/1724603617908669.png
  12. BIN
      static/upload/image/20240826/1724603904511317.png
  13. BIN
      static/upload/image/20240826/1724604698835047.png
  14. 1
    0
      template/dafeult/about.html
  15. 1
    0
      template/dafeult/case.html
  16. 1
    0
      template/dafeult/caselist.html
  17. 20
    5
      template/dafeult/city.html
  18. 2
    2
      template/dafeult/foot.html
  19. 62
    0
      template/dafeult/foot_city.html
  20. 16
    2
      template/dafeult/head.html
  21. 55
    0
      template/dafeult/head_city.html
  22. 13
    0
      template/dafeult/hot.html
  23. 10
    5
      template/dafeult/index.html
  24. 9
    2
      template/dafeult/message.html
  25. 1
    0
      template/dafeult/news.html
  26. 3
    0
      template/dafeult/newslist.html
  27. 3
    0
      template/dafeult/team.html
  28. 5
    0
      template/dafeult/teamlist.html
  29. 2
    0
      template/dafeult/wap/about.html
  30. 2
    1
      template/dafeult/wap/case.html
  31. 2
    0
      template/dafeult/wap/caselist.html
  32. 18
    5
      template/dafeult/wap/city.html
  33. 1
    1
      template/dafeult/wap/foot.html
  34. 41
    0
      template/dafeult/wap/foot_city.html
  35. 11
    2
      template/dafeult/wap/head.html
  36. 34
    0
      template/dafeult/wap/head_city.html
  37. 13
    0
      template/dafeult/wap/hot.html
  38. 8
    4
      template/dafeult/wap/index.html
  39. 12
    3
      template/dafeult/wap/message.html
  40. 2
    1
      template/dafeult/wap/news.html
  41. 1
    0
      template/dafeult/wap/newslist.html
  42. 2
    1
      template/dafeult/wap/team.html
  43. 1
    0
      template/dafeult/wap/teamlist.html
  44. 9
    0
      友情链接增加cid.txt
  45. 12
    0
      新增自定义foreach标签.txt

+ 31
- 2
apps/admin/controller/content/LinkController.php Ver arquivo

@@ -24,6 +24,11 @@ class LinkController extends Controller
24 24
     // 友情链接列表
25 25
     public function index()
26 26
     {
27
+        //调用城市
28
+        $city_list = $this->model->getCity();
29
+        //var_dump($city_list);
30
+        $this->assign('city_list', $city_list);
31
+
27 32
         if ((! ! $id = get('id', 'int')) && $result = $this->model->getLink($id)) {
28 33
             $this->assign('more', true);
29 34
             $this->assign('link', $result);
@@ -50,7 +55,13 @@ class LinkController extends Controller
50 55
             $link = post('link');
51 56
             $logo = post('logo');
52 57
             $sorting = post('sorting');
53
-            
58
+            $city = post('city');
59
+
60
+
61
+            //查询城市名称
62
+            $cityName = $this->model->getCityName($city);
63
+
64
+
54 65
             if (! $gid) {
55 66
                 $gid = $this->model->getMaxGid() + 1;
56 67
             }
@@ -79,6 +90,8 @@ class LinkController extends Controller
79 90
                 'name' => $name,
80 91
                 'link' => $link,
81 92
                 'logo' => $logo,
93
+                'city' => $city,
94
+                'csm' => $cityName,
82 95
                 'sorting' => $sorting,
83 96
                 'create_user' => session('username'),
84 97
                 'update_user' => session('username')
@@ -160,7 +173,11 @@ class LinkController extends Controller
160 173
             $link = post('link');
161 174
             $logo = post('logo');
162 175
             $sorting = post('sorting');
163
-            
176
+            $city = post('city');
177
+
178
+            //查询城市名称
179
+            $cityName = $this->model->getCityName($city);
180
+
164 181
             if (! $gid) {
165 182
                 $gid = $this->model->getMaxGid() + 1;
166 183
             }
@@ -184,6 +201,8 @@ class LinkController extends Controller
184 201
                 'name' => $name,
185 202
                 'link' => $link,
186 203
                 'logo' => $logo,
204
+                'city' => $city,
205
+                'csm' => $cityName,
187 206
                 'sorting' => $sorting,
188 207
                 'update_user' => session('username')
189 208
             );
@@ -200,11 +219,21 @@ class LinkController extends Controller
200 219
                 location(- 1);
201 220
             }
202 221
         } else {
222
+
223
+
224
+
203 225
             // 调取修改内容
204 226
             $this->assign('mod', true);
205 227
             if (! $result = $this->model->getLink($id)) {
206 228
                 error('编辑的内容已经不存在!', - 1);
207 229
             }
230
+
231
+            //var_dump($result);
232
+            //调用城市
233
+            $city_list = $this->model->getCity($result->city);
234
+            //var_dump($city_list);
235
+            $this->assign('city_list', $city_list);
236
+
208 237
             $this->assign('gids', $this->model->getGid());
209 238
             $this->assign('link', $result);
210 239
             $this->display('content/link.html');

+ 8
- 2
apps/admin/controller/system/CityController.php Ver arquivo

@@ -78,6 +78,7 @@ class CityController extends Controller
78 78
                 $mutietitle = post('mutietitle');
79 79
                 $mutietitle = str_replace(',', ',', $mutietitle);
80 80
                 $pid = post('pid', 'int');
81
+                $logo = post('logo');
81 82
                 if (! $mutititle) {
82 83
                     alert_back('城市名称不能为空!');
83 84
                 }
@@ -109,6 +110,7 @@ class CityController extends Controller
109 110
                         'email' => '',
110 111
                         'qq' => '',
111 112
                         'address' => '',
113
+                        'logo' => $logo
112 114
                     );
113 115
                 }
114 116
             }else{
@@ -122,6 +124,7 @@ class CityController extends Controller
122 124
                 $seo_title = post('seo_title');
123 125
                 $seo_keywords = post('seo_keywords');
124 126
                 $seo_description = post('seo_description');
127
+                $logo = post('logo');
125 128
 
126 129
                 $contact = post('contact');
127 130
                 $mobile = post('mobile');
@@ -159,7 +162,8 @@ class CityController extends Controller
159 162
                     'fax' => $fax,
160 163
                     'email' => $email,
161 164
                     'qq' => $qq,
162
-                    'address' => $address
165
+                    'address' => $address,
166
+                    'logo' => $logo
163 167
                 );
164 168
             }
165 169
             // 执行添加
@@ -229,6 +233,7 @@ class CityController extends Controller
229 233
             $email = post('email');
230 234
             $qq = post('qq');
231 235
             $address = post('address');
236
+            $logo = post('logo');
232 237
 
233 238
             if($id==$pid){
234 239
                 alert_back('区域混乱啦!');
@@ -256,7 +261,8 @@ class CityController extends Controller
256 261
                 'fax' => $fax,
257 262
                 'email' => $email,
258 263
                 'qq' => $qq,
259
-                'address' => $address
264
+                'address' => $address,
265
+                'logo' => $logo
260 266
             );
261 267
             // 执行添加
262 268
             if ($this->model->modCity($id, $data)) {

+ 44
- 2
apps/admin/model/content/LinkModel.php Ver arquivo

@@ -17,7 +17,7 @@ class LinkModel extends Model
17 17
     public function getList()
18 18
     {
19 19
         return parent::table('ay_link')->where("acode='" . session('acode') . "'")
20
-            ->order('gid asc,sorting asc,id asc')
20
+            ->order('city asc,gid asc,sorting asc,id asc')
21 21
             ->page()
22 22
             ->select();
23 23
     }
@@ -27,7 +27,7 @@ class LinkModel extends Model
27 27
     {
28 28
         return parent::table('ay_link')->where("acode='" . session('acode') . "'")
29 29
             ->like($field, $keyword)
30
-            ->order('gid asc,sorting asc,id asc')
30
+            ->order('city asc,gid asc,sorting asc,id asc')
31 31
             ->page()
32 32
             ->select();
33 33
     }
@@ -82,4 +82,46 @@ class LinkModel extends Model
82 82
     {
83 83
         return parent::table('ay_link')->column('logo');
84 84
     }
85
+
86
+    /*
87
+     * 调用所有城市列表
88
+     */
89
+    public function getCity($cid=0){
90
+        $ids = parent::table('ay_city')->where("pid=0")->column('id');
91
+        $is = '-1';
92
+        foreach ($ids as $k=>$v){
93
+            $is = $is.','.$v;
94
+        }
95
+        $list = parent::table('ay_city')->where("id IN(1,2,9,22) OR pid IN($is)")->order("etitle ASC")->select();;
96
+        //return $list;
97
+
98
+        // 将结果转换为数组
99
+        $dataArray = [];
100
+        foreach ($list as $row) {
101
+            $dataArray[] = (array)$row;
102
+        }
103
+
104
+        $data = [];
105
+        foreach($dataArray as $k=>$v){
106
+            $str = $v['etitle'];
107
+            $zm = $str[0];
108
+            if((int)$cid === (int)$v['id']){
109
+                $v['selected'] = 1;
110
+            }else{
111
+                $v['selected'] = 0;
112
+            }
113
+            $data[$zm][] = $v;
114
+        }
115
+        return $data;
116
+
117
+    }
118
+
119
+    public function getCityName($id){
120
+        if($id > 0){
121
+            return parent::table('ay_city')->where("id=$id")->value('title');
122
+        }else{
123
+            return "全国";
124
+        }
125
+    }
126
+
85 127
 }

+ 77
- 4
apps/admin/view/default/content/link.html Ver arquivo

@@ -15,6 +15,7 @@
15 15
 	  			<thead>
16 16
                     <tr>
17 17
                     	<th>分组(gid)</th>
18
+                        <th>城市</th>
18 19
                         <th>名称</th>
19 20
                         <th>链接</th>
20 21
                         <th>Logo</th>
@@ -26,6 +27,7 @@
26 27
                     {foreach $links(key,value)}
27 28
                     <tr>
28 29
                     	<td>[value->gid]</td>
30
+                        <td>[value->csm]</td>
29 31
                         <td>[value->name]</td>
30 32
                         <td>[value->link]</td>
31 33
                         <td><img src="{SITE_DIR}[value->logo]" style="height:20px;"></td>
@@ -51,15 +53,48 @@
51 53
 	  		 	<div class="layui-form-item">
52 54
                      <label class="layui-form-label">分组</label>
53 55
                      <div class="layui-input-block">
54
-                     	<select name="gid">	
56
+                     	<select name="gid">
57
+
58
+
55 59
                      		{foreach $gids(key,value)}
56 60
 	                			<option value="[value]" >分组[value]</option>
57 61
 	                		{/foreach}
62
+
63
+
58 64
 	                		<option value="" >自动新增分组</option>
59 65
 	                	</select>
60 66
                      </div>
61 67
                 </div>
62
-                
68
+
69
+
70
+
71
+
72
+
73
+                 <div class="layui-form-item">
74
+                     <label class="layui-form-label">城市</label>
75
+                     <div class="layui-input-block">
76
+                         <select name="city" id="city">
77
+                             <option value="0">全国</option>
78
+                             {foreach $city_list(key,value)}
79
+                             <optgroup label="[key]">
80
+                             {php}
81
+                             foreach($value as $k2=>$v2){
82
+                             echo '<option value="'.$v2['id'].'" >'.$v2['title'].'</option>';
83
+                             }
84
+                             {/php}
85
+                             {/foreach}
86
+                             </optgroup>
87
+                         </select>
88
+                     </div>
89
+                 </div>
90
+
91
+                 <style>
92
+                     .layui-form-select dl{
93
+                         z-index: 9999;
94
+                         max-height: 450px;
95
+                     }
96
+                </style>
97
+
63 98
                  <div class="layui-form-item">
64 99
                      <label class="layui-form-label">名称</label>
65 100
                      <div class="layui-input-block">
@@ -120,8 +155,46 @@
120 155
                      	<input type="text" name="gid" required  lay-verify="required" value="{$link->gid}" placeholder="请输入分组"  class="layui-input">
121 156
                      </div>
122 157
                 </div>
123
-                
124
-                <div class="layui-form-item">
158
+
159
+                 {php}
160
+                    //var_dump($link->city);
161
+                    //var_dump($link);
162
+                    //$link->city
163
+                 {/php}
164
+
165
+                 <div class="layui-form-item">
166
+                     <label class="layui-form-label">城市</label>
167
+                     <div class="layui-input-block">
168
+                         <select name="city" id="city">
169
+                             <option value="0">全国</option>
170
+                             {foreach $city_list(key,value)}
171
+                             <optgroup label="[key]">
172
+                                 {php}
173
+                                 foreach($value as $k2=>$v2){
174
+                                 if($v2['selected'] === 1){
175
+                                    $cur = 'selected';
176
+                                 }else{
177
+                                    $cur = '';
178
+                                 }
179
+                                 echo '<option value="'.$v2['id'].'" '.$cur.'>'.$v2['title'].'</option>';
180
+                                 }
181
+                                 {/php}
182
+                                 {/foreach}
183
+                             </optgroup>
184
+                         </select>
185
+                     </div>
186
+                 </div>
187
+
188
+                 <style>
189
+                     .layui-form-select dl{
190
+                         z-index: 9999;
191
+                         max-height: 450px;
192
+                     }
193
+                 </style>
194
+
195
+
196
+
197
+                 <div class="layui-form-item">
125 198
                      <label class="layui-form-label">名称</label>
126 199
                      <div class="layui-input-block">
127 200
                      	<input type="text" name="name" required  lay-verify="required" value="{$link->name}" placeholder="请输入名称"  class="layui-input">

+ 26
- 0
apps/admin/view/default/system/city.html Ver arquivo

@@ -108,6 +108,19 @@
108 108
                             <input type="text" name="etitle" placeholder="请输入城市拼音" class="layui-input">
109 109
                         </div>
110 110
                     </div>
111
+
112
+                            <div class="layui-form-item">
113
+                                <label class="layui-form-label">城市LOGO</label>
114
+                                <div class="layui-input-inline">
115
+                                    <input type="text" name="logo" id="logo" value="{$sites->logo}" placeholder="请上传城市LOGO图"  class="layui-input">
116
+                                </div>
117
+                                <button type="button" class="layui-btn upload" data-des="logo">
118
+                                    <i class="layui-icon">&#xe67c;</i>上传图片
119
+                                </button>
120
+                                <div id="logo_box" class="pic"><dl><dt>{if(@[$sites->logo])}<img src="{SITE_DIR}{$sites->logo}" data-url="{$sites->logo}"></dt><dd>删除</dd></dl>{/if}</div>
121
+                            </div>
122
+
123
+
111 124
                     <div class="layui-form-item">
112 125
                         <label class="layui-form-label">参数</label>
113 126
                         <div class="layui-input-block">
@@ -236,6 +249,19 @@
236 249
                                         <input type="text" name="etitle" required lay-verify="required" value="{$city->etitle}" placeholder="请输入城市英文城市名称" class="layui-input">
237 250
                                     </div>
238 251
                                 </div>
252
+
253
+                            <div class="layui-form-item">
254
+                                <label class="layui-form-label">城市LOGO</label>
255
+                                <div class="layui-input-inline">
256
+                                    <input type="text" name="logo" id="logo" value="{$city->logo}" placeholder="请上传城市LOGO图"  class="layui-input">
257
+                                </div>
258
+                                <button type="button" class="layui-btn upload" data-des="logo">
259
+                                    <i class="layui-icon">&#xe67c;</i>上传图片
260
+                                </button>
261
+                                <div id="logo_box" class="pic"><dl><dt>{if(@[$city->logo])}<img src="{SITE_DIR}{$city->logo}" data-url="{$city->logo}"></dt><dd>删除</dd></dl>{/if}</div>
262
+                            </div>
263
+
264
+
239 265
                                 <div class="layui-form-item">
240 266
                                     <label class="layui-form-label">参数</label>
241 267
                                     <div class="layui-input-block">

+ 26
- 0
apps/common/HomeController.php Ver arquivo

@@ -10,12 +10,15 @@ namespace app\common;
10 10
 
11 11
 use core\basic\Controller;
12 12
 use core\basic\Config;
13
+use app\home\model\ParserModel;
13 14
 
14 15
 class HomeController extends Controller
15 16
 {
16 17
 
17 18
     public function __construct()
18 19
     {
20
+        $this->model = new ParserModel();
21
+
19 22
         // 自动缓存基础信息
20 23
         cache_config();
21 24
         
@@ -100,6 +103,29 @@ class HomeController extends Controller
100 103
                 cookie('city',$this->config('firstcity'));
101 104
             }else{
102 105
                 cookie('city',$domain_first);
106
+                //var_dump($domain_first);
107
+                //设置新的cookie 城市id
108
+                //$cityid = 1;
109
+                $cityid = $this->model->getCityId($domain_first);
110
+                if(empty($cityid)){
111
+                    $cityid = 0;
112
+                }
113
+                //var_dump($cityid);
114
+                cookie('city_id',$cityid);
115
+                //模板赋值变量 用于sql 同样查询数组可循环
116
+                $this->assign('cityId',$cityid);
117
+                //测试数据
118
+                /*$testArray = [
119
+                    1,2,3,4
120
+                ];
121
+                $this->assign('testArray',$testArray);*/
122
+
123
+                //输出logo
124
+                $citylogo = $this->model->getCityLogo($domain_first);
125
+                if(empty($citylogo)){
126
+                    $citylogo = $this->model->getSiteLogo();
127
+                }
128
+                $this->assign('citylogo',$citylogo);
103 129
             }
104 130
         }else{
105 131
             $cur_city = array_filter($citys, function($t) use ($domain) { return $t['isurl'] == $domain; });

+ 42
- 10
apps/home/controller/IndexController.php Ver arquivo

@@ -40,7 +40,8 @@ class IndexController extends Controller
40 40
         
41 41
         if (PATH) { // 采用pathinfo模式及p参数伪静态模式
42 42
             if ($url_rule_type == 2 && stripos(URL, $_SERVER['SCRIPT_NAME']) !== false) { // 禁止伪静态时带index.php访问
43
-                _404('您访问的内容不存在,请核对后重试!');
43
+                //_404('您访问的内容不存在,请核对后重试!');
44
+                _301();
44 45
             }
45 46
             $path = PATH;
46 47
         } elseif ($url_rule_type == 3 && isset($_SERVER["QUERY_STRING"]) && $qs = $_SERVER["QUERY_STRING"]) { // 采用简短传参模式
@@ -216,7 +217,8 @@ class IndexController extends Controller
216 217
                             $this->getContentPage($data);
217 218
                         } else {
218 219
                             //var_dump(strtolower($path_arr[0]));
219
-                            _404('您访问的内容不存在,请核对后重试!');
220
+                            //_404('您访问的内容不存在,请核对后重试!');
221
+                            _301();
220 222
                         }
221 223
                     } else {
222 224
                         define('CMS_PAGE', true); // 使用cms分页处理模型
@@ -227,7 +229,8 @@ class IndexController extends Controller
227 229
                                 $this->getListPage($sort);
228 230
                             }
229 231
                         } else {
230
-                            _404('您访问的页面不存在,请核对后重试!');
232
+                            //_404('您访问的页面不存在,请核对后重试!');
233
+                            _301();
231 234
                         }
232 235
                     }
233 236
             }
@@ -249,10 +252,34 @@ class IndexController extends Controller
249 252
     // 首页
250 253
     private function getIndexPage()
251 254
     {
252
-        $content = parent::parser($this->htmldir . 'index.html'); // 框架标签解析
253
-        $content = $this->parser->parserBefore($content); // CMS公共标签前置解析
254 255
 
255 256
         $cur_city = cookie('city');
257
+
258
+        //tyqngp
259
+        //var_dump($cur_city);
260
+        //var_dump(get_http_url());
261
+
262
+        $domain_url = get_http_url();
263
+        $ap = explode('.',$domain_url);
264
+        if($ap[1] == 'cn' || $ap[1] == 'com'){
265
+            $aps = $ap[0];
266
+            $aps = str_replace('https://', '', $aps);
267
+            $aps = str_replace('http://', '', $aps);
268
+        }else{
269
+            $aps = $ap[1];
270
+        }
271
+        //var_dump($aps);
272
+
273
+        if($cur_city == $aps){
274
+            //城市页面
275
+            $content = parent::parser($this->htmldir . 'city.html'); // 框架标签解析
276
+        }else{
277
+            //主页
278
+            $content = parent::parser($this->htmldir . 'index.html'); // 框架标签解析
279
+        }
280
+
281
+        $content = $this->parser->parserBefore($content); // CMS公共标签前置解析
282
+        
256 283
         if( !! $cur_city ){ //如果是分站
257 284
             $citys = Config::get('citys');
258 285
             $city = $citys[$cur_city];
@@ -262,7 +289,8 @@ class IndexController extends Controller
262 289
         }else{
263 290
             $content = str_replace('{pboot:pagetitle}', $this->config('index_title') ?: '{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
264 291
         }
265
-        
292
+
293
+
266 294
         $content = $this->parser->parserPositionLabel($content, - 1, '首页', SITE_INDEX_DIR . '/'); // CMS当前位置标签解析
267 295
         $content = $this->parser->parserSpecialPageSortLabel($content, 0, '', SITE_INDEX_DIR . '/'); // 解析分类标签
268 296
         $content = $this->parser->parserAfter($content); // CMS公共标签后置解析
@@ -322,7 +350,8 @@ class IndexController extends Controller
322 350
                 error('请到后台设置分类栏目内容页模板!');
323 351
             }
324 352
         } else {
325
-            _404('您访问内容的分类已经不存在,请核对后再试!');
353
+            //_404('您访问内容的分类已经不存在,请核对后再试!');
354
+            _301();
326 355
         }
327 356
         $this->cache($content, true);
328 357
     }
@@ -337,7 +366,8 @@ class IndexController extends Controller
337 366
         
338 367
         // 读取数据
339 368
         if (! $data = $this->model->getAbout($sort->scode)) {
340
-            _404('您访问的内容不存在,请核对后重试!');
369
+            //_404('您访问的内容不存在,请核对后重试!');
370
+            _301();
341 371
         }
342 372
         
343 373
         if ($sort->contenttpl) {
@@ -466,7 +496,8 @@ class IndexController extends Controller
466 496
             } else {
467 497
                 //读取后台首页404访问配置
468 498
                 if($this->config('url_index_404') == 1){
469
-                    _404('您访问的页面不存在,请核对后重试!');
499
+                   // _404('您访问的页面不存在,请核对后重试!');
500
+                    _301();
470 501
                 }
471 502
                 header("Location: " . $http . $_SERVER['HTTP_HOST'] . $matches1[0], true, 301);
472 503
             }
@@ -474,7 +505,8 @@ class IndexController extends Controller
474 505
             if( file_exists(ROOT_PATH . '/data/city.lock') ){
475 506
                 $this->getIndexPage();
476 507
             }else{
477
-                _404('您访问的页面不存在,请核对后重试!');
508
+                //_404('您访问的页面不存在,请核对后重试!');
509
+                _301();
478 510
             }
479 511
         }
480 512
     }

+ 109
- 3
apps/home/controller/ParserController.php Ver arquivo

@@ -80,6 +80,7 @@ class ParserController extends Controller
80 80
         $content = $this->parserReplaceKeyword($content); // 页面关键词替换
81 81
         $content = $this->parserTitleReplaceLabel($content); // 通用内容替换标签  这里是我新增的
82 82
         $content = $this->parserBLock($content); //自定义方法2
83
+        $content = $this->parserForeachLabel($content); // 指定随意内容按条件遍
83 84
 
84 85
         // 解析个人扩展标签,升级不覆盖
85 86
         if (file_exists(APP_PATH . '/home/controller/ExtLabelController.php')) {
@@ -92,6 +93,93 @@ class ParserController extends Controller
92 93
         return $content;
93 94
     }
94 95
 
96
+    // 解析指定随意内容遍历,支持设定分隔符 @pbhtml
97
+    /*
98
+     * foreach标签无法匹配成功
99
+     * 模板代码不要有php原生 因为无法与标签传值
100
+     * 复制link标签  加上city_id 的手法 就可以了
101
+     */
102
+    public function parserForeachLabel($content)
103
+    {
104
+        $pattern = '/{pboot:foreach(s+[^}]+)?}([sS]*?){/pboot:foreach}/';
105
+        $pattern2 = '/[foreach:([w]+)(s+[^]]+)?]/';
106
+
107
+        if (preg_match_all($pattern, $content, $matches)) {
108
+            $count = count($matches[0]);
109
+            for ($i = 0; $i<$count; $i ++) {
110
+                // 获取调节参数
111
+                $params = $this->parserParam($matches[1][$i]);
112
+                $str = '';
113
+                $char = ',';
114
+
115
+                if (! self::checkLabelLevel($params)) {
116
+                    $content = str_replace($matches[0][$i], '', $content);
117
+                    continue;
118
+                }
119
+
120
+                // 分离参数
121
+                foreach ($params as $key => $value) {
122
+                    switch ($key) {
123
+                        case 'num':
124
+                            $num = $value;
125
+                            break;
126
+                        case 'str':
127
+                            //var_dump($value);
128
+                            $str = $value;
129
+                            break;
130
+                        case 'char':
131
+                            if ($value) $char = $value;
132
+                            break;
133
+                    }
134
+                }
135
+
136
+                // 无数据直接替换为空并跳过
137
+                if (! $str) {
138
+                    $content = str_replace($matches[0][$i], '', $content);
139
+                    continue;
140
+                }
141
+
142
+                // 匹配到内部标签
143
+                if (preg_match_all($pattern2, $matches[2][$i], $matches2)) {
144
+                    $count2 = count($matches2[0]); // 循环内的内容标签数量
145
+                } else {
146
+                    $count2 = 0;
147
+                }
148
+
149
+                $out_html = '';
150
+                $key = 1;
151
+                //$arr是数组 可以调用自定义函数或模型方法 一般直接用sql
152
+                $arr = explode($char,$str);
153
+                foreach ($arr as $value) { // 按查询图片条数循环
154
+                    $one_html = $matches[2][$i];
155
+                    for ($j = 0; $j<$count2; $j ++) { // 循环替换数据
156
+                        $params = $this->parserParam($matches2[2][$j]);
157
+                        switch ($matches2[1][$j]) {
158
+                            case 'n':
159
+                                $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $key) - 1, $one_html);
160
+                                break;
161
+                            case 'i':
162
+                                $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $key), $one_html);
163
+                                break;
164
+                            case 'name':
165
+                                $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $value), $one_html);
166
+                                break;
167
+                        }
168
+                    }
169
+	                $key ++;
170
+	                $out_html .= $one_html;
171
+	                if (isset($num) && $key > $num) {
172
+                        unset($num);
173
+                        break;
174
+                    }
175
+	            }
176
+                $content = str_replace($matches[0][$i], $out_html, $content);
177
+            }
178
+	    }
179
+        return $content;
180
+    }
181
+
182
+
95 183
     // 通用内容替换标签 @mk-title_replace
96 184
     //$content这里用的时文章标题,直接是字符串
97 185
     public function parserTitleReplaceLabel($content)
@@ -146,7 +234,11 @@ class ParserController extends Controller
146 234
         return $content;
147 235
     }
148 236
 
237
+    /*
238
+     * {pboot:block id='{pboot:httpurl}' /}
239
+     */
149 240
     public function parserBLock($content){
241
+
150 242
         $pattern = '/\{pboot:block(\s+[^}]+)?\}/';
151 243
         if (preg_match_all($pattern, $content, $matches)) {
152 244
             $count = count($matches[0]);
@@ -156,6 +248,9 @@ class ParserController extends Controller
156 248
                 foreach ($params as $key => $value) {
157 249
                     switch ($key) {
158 250
                         case 'id':
251
+                            //var_dump($value);
252
+                            //$value里面存在{xx} 就需要特殊处理
253
+                            //解析顺序不同 与eyoucms的模板机制 区别
159 254
                             $data = $this->model->getBlockContent($value);
160 255
                             //return $data['value'];
161 256
                             //print_r($data);exit();
@@ -2833,15 +2928,15 @@ class ParserController extends Controller
2833 2928
             for ($i = 0; $i < $count; $i ++) {
2834 2929
                 // 获取调节参数
2835 2930
                 $params = $this->parserParam($matches[1][$i]);
2836
-                
2931
+
2837 2932
                 if (! self::checkLabelLevel($params)) {
2838 2933
                     $content = str_replace($matches[0][$i], '', $content);
2839 2934
                     continue;
2840 2935
                 }
2841
-                
2936
+
2842 2937
                 $num = 1000; // 最大读取1000条
2843 2938
                 $sql = '';
2844
-                
2939
+                $kp = 0;
2845 2940
                 foreach ($params as $key => $value) {
2846 2941
                     switch ($key) {
2847 2942
                         case 'num':
@@ -2850,6 +2945,9 @@ class ParserController extends Controller
2850 2945
                         case 'sql':
2851 2946
                             $sql = $value;
2852 2947
                             break;
2948
+                        case 'kp':
2949
+                            $kp = $value;
2950
+                            break;
2853 2951
                     }
2854 2952
                 }
2855 2953
                 
@@ -2881,6 +2979,7 @@ class ParserController extends Controller
2881 2979
                 
2882 2980
                 $pagenum = defined('PAGE') ? PAGE : 1;
2883 2981
                 $key = ($pagenum - 1) * $num + 1;
2982
+                $a = 1;
2884 2983
                 foreach ($data as $value) { // 按查询数据条数循环
2885 2984
                     $one_html = $matches[2][$i];
2886 2985
                     for ($j = 0; $j < $count2; $j ++) { // 循环替换数据
@@ -2897,7 +2996,14 @@ class ParserController extends Controller
2897 2996
                                     $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $value->{$matches2[1][$j]}), $one_html);
2898 2997
                                 }
2899 2998
                         }
2999
+
3000
+                        if($kp > 0){
3001
+                            if($a%$kp == 0 && $a > 0){
3002
+                                $one_html = $one_html."<br/>";
3003
+                            }
3004
+                        }
2900 3005
                     }
3006
+                    $a++;
2901 3007
                     $key ++;
2902 3008
                     $out_html .= $one_html;
2903 3009
                 }

+ 12
- 0
apps/home/model/ParserModel.php Ver arquivo

@@ -10,6 +10,7 @@ namespace app\home\model;
10 10
 
11 11
 use core\basic\Model;
12 12
 
13
+
13 14
 class ParserModel extends Model
14 15
 {
15 16
 
@@ -1044,4 +1045,15 @@ class ParserModel extends Model
1044 1045
         return '1+1';
1045 1046
     }
1046 1047
 
1048
+    public function getCityId($name){
1049
+       return parent::table('ay_city')->where(['etitle'=>$name])->value('id');
1050
+    }
1051
+    public function getCityLogo($name){
1052
+        return parent::table('ay_city')->where(['etitle'=>$name])->value('logo');
1053
+    }
1054
+    public function getSiteLogo(){
1055
+        return parent::table('ay_site')->where(['id'=>1])->value('logo');
1056
+    }
1057
+
1058
+
1047 1059
 }

+ 7
- 0
core/function/helper.php Ver arquivo

@@ -732,6 +732,13 @@ function _404($string, $jump_url = null, $time = 2)
732 732
     }
733 733
 }
734 734
 
735
+function _301(){
736
+    $target_url = get_http_url();
737
+    header("HTTP/1.1 301 Moved Permanently");
738
+    header("Location: $target_url");
739
+    exit;
740
+}
741
+
735 742
 // php对象转为数组
736 743
 function toArray($obj){
737 744
     if($obj === null){

BIN
static/upload/image/20240826/1724603617908669.png Ver arquivo


BIN
static/upload/image/20240826/1724603904511317.png Ver arquivo


BIN
static/upload/image/20240826/1724604698835047.png Ver arquivo


+ 1
- 0
template/dafeult/about.html Ver arquivo

@@ -35,6 +35,7 @@
35 35
     </div>
36 36
   </div>
37 37
 </div>
38
+{include file=hot.html}
38 39
 {include file=foot.html}
39 40
 </body>
40 41
 </html>

+ 1
- 0
template/dafeult/case.html Ver arquivo

@@ -64,6 +64,7 @@
64 64
     </div>
65 65
   </div>
66 66
 </div>
67
+{include file=hot.html}
67 68
 {include file=foot.html}
68 69
 </body>
69 70
 </html>

+ 1
- 0
template/dafeult/caselist.html Ver arquivo

@@ -60,6 +60,7 @@
60 60
   <!--/分页--> 
61 61
   
62 62
 </div>
63
+{include file=hot.html}
63 64
 {include file=foot.html}
64 65
 </body>
65 66
 </html>

+ 20
- 5
template/dafeult/city.html Ver arquivo

@@ -2,9 +2,9 @@
2 2
 <html xmlns="">
3 3
 <head>
4 4
 
5
-<title>{pboot:if('{sort:title}'=='')}{pboot:pagetitle}{else}{sort:title}{/pboot:if}</title>
6
-<meta name="keywords" content="{pboot:if('{sort:keywords}'=='')}{pboot:pagekeywords}{else}{sort:keywords}{/pboot:if}">
7
-<meta name="description" content="{pboot:if('{sort:description}'=='')}{pboot:pagedescription}{else}{sort:description}{/pboot:if}">
5
+<title>{label:city_index_title}</title>
6
+<meta name="keywords" content="{label:city_index_keywork}">
7
+<meta name="description" content="{label:city_index_desc}">
8 8
 
9 9
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10 10
 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
@@ -17,7 +17,7 @@
17 17
 <script type="text/javascript" src="{pboot:sitedomain}/skin/js/superslide.3.0.js"></script>
18 18
 </head>
19 19
 <body>
20
-{include file=head.html}
20
+{include file=head_city.html}
21 21
 <div><img src="/static/upload/image/20240528/1716887600211481.jpg" width="100%"></div>
22 22
 <div class="page-bg">
23 23
   <div class="page-box">
@@ -63,6 +63,21 @@
63 63
 	
64 64
   </div>
65 65
 </div>
66
-{include file=foot.html}
66
+
67
+{include file=hot.html}
68
+
69
+<div class="footer" style="font-size: 16px;">
70
+	<div class="footer-dh">友情链接:
71
+
72
+		{pboot:sql sql="select * from ay_link where city='{$cityId}'"}
73
+		<a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
74
+		{/pboot:sql}
75
+
76
+	</div>
77
+</div>
78
+
79
+
80
+
81
+{include file=foot_city.html}
67 82
 </body>
68 83
 </html>

+ 2
- 2
template/dafeult/foot.html Ver arquivo

@@ -7,7 +7,7 @@
7 7
     <div class="left">
8 8
       <div class="footer-dh">
9 9
         <ul>
10
-          <li><a href="{pboot:sitedomain}/" title="首页">首页</a></li>
10
+          <li><a href="{pboot:httpurl}" title="首页">首页</a></li>
11 11
           {pboot:nav}
12 12
           <li class=""> <a href="[nav:link]" class="first-level"> [nav:name] </a> </li>
13 13
           {/pboot:nav}
@@ -27,7 +27,7 @@
27 27
   </div>
28 28
 </div>
29 29
 <div class="footer-copy">
30
-  <p>{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">XML</a> {pboot:sitestatistical}</p>
30
+  <p>{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>
31 31
   <p style="display:none;"></p>
32 32
 </div>
33 33
 <!--/页脚--> 

+ 62
- 0
template/dafeult/foot_city.html Ver arquivo

@@ -0,0 +1,62 @@
1
+<!--页脚-->
2
+<div class="footer-bg">
3
+	
4
+
5
+		
6
+  <div class="footer">
7
+    <div class="left">
8
+      <div class="footer-dh">
9
+        <ul>
10
+          <li><a href="{pboot:sitedomain}" title="首页">首页</a></li>
11
+          {pboot:nav}
12
+          <li class=""> <a href="{pboot:sitedomain}[nav:link]" class="first-level"> [nav:name] </a> </li>
13
+          {/pboot:nav}
14
+        </ul>
15
+      </div>
16
+      <div class="footer-message">
17
+        <p>咨询热线:{pboot:companyphone}</p>
18
+        <p>联系邮箱:{pboot:companyemail}</p>
19
+        <p>公司地址:{pboot:companyaddress}</p>
20
+      </div>
21
+    </div>
22
+    <div class="right">
23
+      <div class="ewm"> <img src="{pboot:companyweixin}">
24
+        <p>客服微信</p>
25
+      </div>
26
+    </div>
27
+  </div>
28
+</div>
29
+<div class="footer-copy">
30
+  <p>{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>
31
+  <p style="display:none;"></p>
32
+</div>
33
+<!--/页脚--> 
34
+
35
+<!--在线客服-->
36
+<div class="kefu">
37
+  <ul>
38
+<!--    <li> <a href="" target="_black" rel="nofollow"> <i class="icon-kefu-1"></i>
39
+      <p>在线客服</p>
40
+      </a> </li>-->
41
+    <li> <a href="tel:{pboot:companyphone}"> <i class="icon-kefu-2"></i>
42
+      <p>电话咨询</p>
43
+      </a>
44
+      <div class="kefu-call">
45
+        <p>7×24小时客服</p>
46
+        <strong>{pboot:companyphone}</strong> </div>
47
+    </li>
48
+    <li> <i class="icon-kefu-3"></i>
49
+      <p>微信客服</p>
50
+      <div class="kefu-img"> <img src="{pboot:companyweixin}">
51
+        <p class="red">扫描二维码</p>
52
+        <p>添加微信客服</p>
53
+      </div>
54
+    </li>
55
+    <li> <a href="#top" rel="nofollow"> <i class="icon-kefu-4"></i>
56
+      <p>返回顶部</p>
57
+      </a> </li>
58
+  </ul>
59
+</div>
60
+<!--/在线客服--> 
61
+
62
+<script type="text/javascript" src="{pboot:sitedomain}/skin/js/common.js"></script>

+ 16
- 2
template/dafeult/head.html Ver arquivo

@@ -1,14 +1,24 @@
1 1
 <!--导航栏-->
2 2
 <div class="header">
3 3
   <div class="header-box">
4
-    <div class="logo"> <a href="{pboot:sitedomain}" title="{pboot:sitetitle}"><img src="{pboot:sitelogo}" alt="{pboot:sitetitle}"></a> 
4
+    <div class="logo">
5
+
6
+      <a href="{pboot:httpurl}" title="{pboot:sitetitle}">
7
+
8
+
9
+
10
+        {pboot:sql sql="select * from ay_site where id=1"}
11
+        <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
12
+        {/pboot:sql}
13
+
14
+      </a>
5 15
 	
6 16
 	
7 17
 	</div>
8 18
     <div class="top-desc">
9 19
 		<p style="margin-left: 350px;
10 20
     position: absolute;
11
-    margin-top: 10px;">{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="/city.html">城市分站</a></p>
21
+    margin-top: 10px;">{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}">城市分站</a></p>
12 22
       <p class="small">{label:logotxt}</span>
13 23
       <p class="big">{label:logotxt2}</p>
14 24
 	  
@@ -27,6 +37,8 @@
27 37
     </div>
28 38
   </div>
29 39
 </div>
40
+
41
+
30 42
 <div class="nav-bg" id="navbr">
31 43
   <div class="nav">
32 44
     <ul>
@@ -37,4 +49,6 @@
37 49
     </ul>
38 50
   </div>
39 51
 </div>
52
+
53
+
40 54
 <!--/导航栏-->

+ 55
- 0
template/dafeult/head_city.html Ver arquivo

@@ -0,0 +1,55 @@
1
+<!--导航栏-->
2
+<div class="header">
3
+  <div class="header-box">
4
+    <div class="logo">
5
+
6
+      <a href="{pboot:sitedomain}" title="{pboot:sitetitle}">
7
+
8
+
9
+
10
+        {pboot:sql sql="select * from ay_site where id=1"}
11
+        <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
12
+        {/pboot:sql}
13
+
14
+      </a>
15
+	
16
+	
17
+	</div>
18
+    <div class="top-desc">
19
+		<p style="margin-left: 350px;
20
+    position: absolute;
21
+    margin-top: 10px;">{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}">城市分站</a></p>
22
+      <p class="small">{label:logotxt}</span>
23
+      <p class="big">{label:logotxt2}</p>
24
+	  
25
+	  
26
+	  
27
+	  
28
+    </div>
29
+	
30
+
31
+	  
32
+
33
+	
34
+    <div class="call">
35
+      <p class="small">心理咨询电话:</p>
36
+      <p class="big">{pboot:companyphone}</p>
37
+    </div>
38
+  </div>
39
+</div>
40
+
41
+
42
+<div class="nav-bg" id="navbr">
43
+  <div class="nav">
44
+    <ul>
45
+      <li {pboot:if(0=='{sort:scode}')}class="hover"{/pboot:if}>
46
+        <a href="{pboot:sitedomain}" title="网站首页">网站首页</a></li>
47
+      {pboot:nav}
48
+      <li {pboot:if('[nav:scode]'=='{sort:tcode}')}class="hover"{/pboot:if}> <a href="{pboot:sitedomain}[nav:link]" class="first-level"> [nav:name] </a> </li>
49
+      {/pboot:nav}
50
+    </ul>
51
+  </div>
52
+</div>
53
+
54
+
55
+<!--/导航栏-->

+ 13
- 0
template/dafeult/hot.html Ver arquivo

@@ -0,0 +1,13 @@
1
+<div class="footer" style="font-size: 16px;margin-bottom:100px;">
2
+    <div class="footer-dh" style="line-height: 16px;"><font style="font-weight: bold;">热门城市</font>:<br/><br/><br/>
3
+
4
+        <!--环境变量-->
5
+        {pboot:sql sql="select * from ay_city where pid!=0 OR id IN(1,2,9,22) ORDER BY RAND() LIMIT 50" kp="15"}
6
+        <a href="https://[sql:etitle].{label:top_domain}" class="first-level" target="_blank" style="margin-right:20px;display:block;float:left;padding-right: 10px;">[sql:title] </a>
7
+        {/pboot:sql}
8
+
9
+    </div>
10
+</div>
11
+
12
+
13
+<div style="clear: both;"></div>

+ 10
- 5
template/dafeult/index.html Ver arquivo

@@ -308,16 +308,21 @@
308 308
   </div>
309 309
 </div>
310 310
 {/pboot:sort}
311
-<!--/首页新闻--> 
311
+<!--/首页新闻-->
312
+
313
+
314
+{include file=hot.html}
312 315
 
313 316
 
314 317
 	<div class="footer" style="font-size: 16px;">
315 318
 		<div class="footer-dh">友情链接:
316
-		  {pboot:link gid=1 num=50}
317
-		  <a href="[link:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [link:name] </a>
318
-		  {/pboot:link}
319
+
320
+          {pboot:sql sql="select * from ay_link where city='{$cityId}'"}
321
+          <a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
322
+          {/pboot:sql}
323
+
319 324
 		</div>	
320
-	</div>	
325
+	</div>
321 326
 
322 327
 
323 328
 {include file=foot.html}

+ 9
- 2
template/dafeult/message.html Ver arquivo

@@ -27,8 +27,8 @@
27 27
     <form action="{pboot:msgaction}"  method="post">
28 28
       <div class="list-form">
29 29
         <ul>
30
-          <li>
31
-            <div class="tip-text">孩子年龄:</div>
30
+          <li style="display: none;">
31
+            <div class="tip-text">年龄:</div>
32 32
             <div class="xuanze">
33 33
               <input  type='radio' id='attr_30_1' name='nianling' value='0-3岁'>
34 34
               <label for="attr_30_1">0-3岁</label>
@@ -38,6 +38,8 @@
38 38
               <label for="attr_30_3">6-12岁</label>
39 39
               <input  type='radio' id='attr_30_4' name='nianling' value='12-18岁'>
40 40
               <label for="attr_30_4">12-18岁</label>
41
+              <input  type='radio' id='attr_30_5' name='nianling' value='18岁以上'>
42
+              <label for="attr_30_5">18岁以上</label>
41 43
             </div>
42 44
           </li>
43 45
           <li>
@@ -53,6 +55,8 @@
53 55
               <label for="attr_31_4">人际关系</label>
54 56
               <input type='radio' id='attr_31_5' name='leixing' value='职业发展'>
55 57
               <label for="attr_31_5">职业发展</label>
58
+              <input type='radio' id='attr_31_6' name='leixing' value='其他'>
59
+              <label for="attr_31_6">其他</label>
56 60
             </div>
57 61
           </li>
58 62
           <li>
@@ -154,6 +158,9 @@
154 158
     </div>
155 159
   </div>
156 160
 </div>
161
+
162
+{include file=hot.html}
163
+
157 164
 {include file=foot.html}
158 165
 </body>
159 166
 </html>

+ 1
- 0
template/dafeult/news.html Ver arquivo

@@ -41,6 +41,7 @@
41 41
     </div>
42 42
   </div>
43 43
 </div>
44
+{include file=hot.html}
44 45
 {include file=foot.html}
45 46
 </body>
46 47
 </html>

+ 3
- 0
template/dafeult/newslist.html Ver arquivo

@@ -54,6 +54,9 @@
54 54
 <div class="tac text-secondary">本分类下无任何数据!</div>
55 55
 {/pboot:if}
56 56
 </div>
57
+
58
+{include file=hot.html}
59
+
57 60
 {include file=foot.html}
58 61
 </body>
59 62
 </html>

+ 3
- 0
template/dafeult/team.html Ver arquivo

@@ -58,6 +58,9 @@
58 58
     </div>
59 59
   </div>
60 60
 </div>
61
+
62
+{include file=hot.html}
63
+
61 64
 {include file=foot.html}
62 65
 </body>
63 66
 </html>

+ 5
- 0
template/dafeult/teamlist.html Ver arquivo

@@ -57,6 +57,11 @@
57 57
   <!--/分页--> 
58 58
   
59 59
 </div>
60
+
61
+
62
+{include file=hot.html}
63
+
64
+
60 65
 {include file=foot.html}
61 66
 </body>
62 67
 </html>

+ 2
- 0
template/dafeult/wap/about.html Ver arquivo

@@ -35,6 +35,8 @@
35 35
     </div>
36 36
   </div>
37 37
 </div>
38
+
39
+{include file=hot.html}
38 40
 {include file=foot.html}
39 41
 </body>
40 42
 </html>

+ 2
- 1
template/dafeult/wap/case.html Ver arquivo

@@ -90,7 +90,8 @@
90 90
   </div>
91 91
   <script>jQuery(".tab-anli").slide({effect:"leftLoop",trigger:"click"});</script> 
92 92
 </div>
93
-<!--个案分享 结束--> 
93
+<!--个案分享 结束-->
94
+{include file=hot.html}
94 95
 {include file=foot.html}
95 96
 </body>
96 97
 </html>

+ 2
- 0
template/dafeult/wap/caselist.html Ver arquivo

@@ -48,6 +48,8 @@
48 48
 {else}
49 49
 <div class="tac text-secondary">本分类下无任何数据!</div>
50 50
 {/pboot:if}
51
+
52
+{include file=hot.html}
51 53
 {include file=foot.html}
52 54
 </body>
53 55
 </html>

+ 18
- 5
template/dafeult/wap/city.html Ver arquivo

@@ -2,9 +2,11 @@
2 2
 <html xmlns="">
3 3
 <head>
4 4
 
5
-<title>{pboot:if('{sort:title}'=='')}{pboot:pagetitle}{else}{sort:title}{/pboot:if}</title>
6
-<meta name="keywords" content="{pboot:if('{sort:keywords}'=='')}{pboot:pagekeywords}{else}{sort:keywords}{/pboot:if}">
7
-<meta name="description" content="{pboot:if('{sort:description}'=='')}{pboot:pagedescription}{else}{sort:description}{/pboot:if}">
5
+
6
+<title>{label:city_index_title}</title>
7
+<meta name="keywords" content="{label:city_index_keywork}">
8
+<meta name="description" content="{label:city_index_desc}">
9
+
8 10
 
9 11
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10 12
 <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
@@ -17,7 +19,7 @@
17 19
 <script type="text/javascript" src="{pboot:sitedomain}/m/js/superslide.3.0.js"></script>
18 20
 </head>
19 21
 <body>
20
-{include file=head.html}
22
+{include file=head_city.html}
21 23
 <div class="main">
22 24
   
23 25
   
@@ -63,6 +65,17 @@
63 65
 </div>
64 66
 
65 67
 
66
-{include file=foot.html}
68
+{include file=hot.html}
69
+
70
+<div class="footer-copy-content" style="font-size: 12px;">
71
+
72
+	友情链接:
73
+	{pboot:sql sql="select * from ay_link where city='{$cityId}'"}
74
+	<a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
75
+	{/pboot:sql}
76
+
77
+</div>
78
+
79
+{include file=foot_city.html}
67 80
 </body>
68 81
 </html>

+ 1
- 1
template/dafeult/wap/foot.html Ver arquivo

@@ -12,7 +12,7 @@
12 12
 </div>
13 13
 <div class="footer-nav">
14 14
   <ul>
15
-    <li> <a href="{pboot:sitedomain}/"> <span class="icon iconfont icon-shouye"></span>
15
+    <li> <a href="{pboot:httpurl}/"> <span class="icon iconfont icon-shouye"></span>
16 16
       <p>首页</p>
17 17
       </a> </li>
18 18
     {pboot:sort scode=1}

+ 41
- 0
template/dafeult/wap/foot_city.html Ver arquivo

@@ -0,0 +1,41 @@
1
+<!--页脚-->
2
+
3
+<div class="footer-copy">
4
+	
5
+
6
+	
7
+  <div class="footer-copy-content">
8
+    <p>{pboot:sitecopyright}</p>
9
+    <p><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a> {pboot:sitestatistical}</p>
10
+    <p style="display:none;"></p>
11
+  </div>
12
+</div>
13
+<div class="footer-nav">
14
+  <ul>
15
+    <li> <a href="{pboot:sitedomain}"> <span class="icon iconfont icon-shouye"></span>
16
+      <p>首页</p>
17
+      </a> </li>
18
+    {pboot:sort scode=1}
19
+    <li> <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-xihuan"></span>
20
+      <p>[sort:name]</p>
21
+      </a> </li>
22
+    {/pboot:sort}
23
+    {pboot:sort scode=6}
24
+    <li > <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-wode"></span>
25
+      <p>[sort:name]</p>
26
+      </a> </li>
27
+    {/pboot:sort}
28
+    {pboot:sort scode=7}
29
+    <li > <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-dianpu"></span>
30
+      <p>[sort:name]</p>
31
+      </a> </li>
32
+    {/pboot:sort}
33
+    {pboot:sort scode=9}
34
+    <li > <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-wangwang"></span>
35
+      <p>[sort:name]</p>
36
+      </a> </li>
37
+    {/pboot:sort}
38
+  </ul>
39
+</div>
40
+<script type="text/javascript" src="{pboot:sitedomain}/m/js/common_m.js"></script> 
41
+<!--页脚 结束-->

+ 11
- 2
template/dafeult/wap/head.html Ver arquivo

@@ -1,7 +1,16 @@
1 1
 <!--导航-->
2 2
 <div class="header">
3 3
   <div class="left-btn"> <span class="icon iconfont icon-caidan" id="menu"></span> </div>
4
-  <div class="logo"> <a href="{pboot:sitedomain}/" title="{pboot:sitetitle}"><img src="{pboot:sitelogo}" alt="{pboot:sitetitle}"></a> </div>
4
+  <div class="logo">
5
+
6
+
7
+    <a href="{pboot:httpurl}" title="{pboot:sitetitle}">
8
+      {pboot:sql sql="select * from ay_site where id=1"}
9
+      <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
10
+      {/pboot:sql}
11
+    </a>
12
+
13
+  </div>
5 14
   <div class="right-btn"> <a href="tel:{pboot:companyphone}"><span class="icon iconfont icon-dianhua1"></span></a> </div>
6 15
 </div>
7 16
 <div class="fixed-nav-bg"> </div>
@@ -16,7 +25,7 @@
16 25
 	
17 26
 	
18 27
 	
19
-<li>{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="/city.html" style="display: contents;"> 城市分站</a></li>	
28
+<li>{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}" style="display: contents;"> 城市分站</a></li>
20 29
 	
21 30
 	
22 31
 	

+ 34
- 0
template/dafeult/wap/head_city.html Ver arquivo

@@ -0,0 +1,34 @@
1
+<!--导航-->
2
+<div class="header">
3
+  <div class="left-btn"> <span class="icon iconfont icon-caidan" id="menu"></span> </div>
4
+  <div class="logo">
5
+
6
+
7
+    <a href="{pboot:sitedomain}" title="{pboot:sitetitle}">
8
+      {pboot:sql sql="select * from ay_site where id=1"}
9
+      <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
10
+      {/pboot:sql}
11
+    </a>
12
+
13
+  </div>
14
+  <div class="right-btn"> <a href="tel:{pboot:companyphone}"><span class="icon iconfont icon-dianhua1"></span></a> </div>
15
+</div>
16
+<div class="fixed-nav-bg"> </div>
17
+<div class="fixed-nav">
18
+  <ul>
19
+    <li {pboot:if(0=='{sort:scode}')}class="hover"{/pboot:if}><a href="{pboot:sitedomain}" title="网站首页">网站首页<span class="icon iconfont icon-xiangyou1"></span></a></li>
20
+    {pboot:nav}
21
+    <li {pboot:if('[nav:scode]'=='{sort:tcode}')}class="hover"{/pboot:if}> <a href="{pboot:sitedomain}[nav:link]" class="first-level"> [nav:name]<span class="icon iconfont icon-xiangyou1"></span> </a> </li>
22
+	
23
+    {/pboot:nav}
24
+	
25
+	
26
+	
27
+	
28
+<li>{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}" style="display: contents;"> 城市分站</a></li>
29
+	
30
+	
31
+	
32
+  </ul>
33
+</div>
34
+<!--/导航-->

+ 13
- 0
template/dafeult/wap/hot.html Ver arquivo

@@ -0,0 +1,13 @@
1
+<div class="footer-copy-content" style="font-size: 14px;margin-bottom:20px;line-height: 25px;background: #fff;">
2
+
3
+<font style="margin-bottom:10px;display:block;font-weight: bold; ">热门城市:</font>
4
+        <!--环境变量-->
5
+        {pboot:sql sql="select * from ay_city where pid!=0 OR id IN(1,2,9,22) ORDER BY RAND() LIMIT 50" kp="0"}
6
+        <a href="https://[sql:etitle].{label:top_domain}" class="first-level" target="_blank" style="margin-right:20px;display:block;float:left;padding-right: 10px;">[sql:title] </a>
7
+        {/pboot:sql}
8
+
9
+
10
+        <div style="clear: both;"></div>
11
+</div>
12
+
13
+

+ 8
- 4
template/dafeult/wap/index.html Ver arquivo

@@ -236,15 +236,19 @@
236 236
   </div>
237 237
 </div>
238 238
 {/pboot:sort}
239
-<!--动态资讯 结束--> 
239
+<!--动态资讯 结束-->
240 240
 
241 241
 
242 242
 
243
+{include file=hot.html}
244
+
243 245
 <div class="footer-copy-content" style="font-size: 12px;">
246
+
244 247
    友情链接:
245
-     {pboot:link gid=1 num=50}
246
-     <a href="[link:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [link:name] </a>
247
-     {/pboot:link}
248
+  {pboot:sql sql="select * from ay_link where city='{$cityId}'"}
249
+  <a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
250
+  {/pboot:sql}
251
+
248 252
   </div>	
249 253
 
250 254
 

+ 12
- 3
template/dafeult/wap/message.html Ver arquivo

@@ -25,8 +25,8 @@
25 25
   <form action="{pboot:msgaction}"  method="post">
26 26
     <div class="list-form">
27 27
       <ul>
28
-        <li>
29
-          <div class="tip-text">孩子年龄:</div>
28
+        <li style="display: none;">
29
+          <div class="tip-text">年龄:</div>
30 30
           <div class="xuanze">
31 31
             <div class="box">
32 32
               <input  type='radio' id='attr_30_1' name='nianling' value='0-3岁'>
@@ -44,6 +44,10 @@
44 44
               <input  type='radio' id='attr_30_4' name='nianling' value='12-18岁'>
45 45
               <label for="attr_30_4">12-18岁</label>
46 46
             </div>
47
+            <div class="box">
48
+              <input  type='radio' id='attr_30_5' name='nianling' value='18岁以上'>
49
+              <label for="attr_30_5">18岁以上</label>
50
+            </div>
47 51
           </div>
48 52
         </li>
49 53
         <li>
@@ -69,6 +73,10 @@
69 73
               <input  type='radio' id='attr_31_5' name='leixing' value='职业发展'>
70 74
               <label for="attr_31_5">职业发展</label>
71 75
             </div>
76
+            <div class="box">
77
+              <input  type='radio' id='attr_31_6' name='leixing' value='其他'>
78
+              <label for="attr_31_6">其他</label>
79
+            </div>
72 80
           </div>
73 81
         </li>
74 82
         <li>
@@ -153,7 +161,8 @@
153 161
     </ul>
154 162
   </div>
155 163
 </div>
156
-<!--服务流程 结束--> 
164
+<!--服务流程 结束-->
165
+{include file=hot.html}
157 166
 {include file=foot.html}
158 167
 </body>
159 168
 </html>

+ 2
- 1
template/dafeult/wap/news.html Ver arquivo

@@ -51,7 +51,8 @@
51 51
     </ul>
52 52
   </div>
53 53
 </div>
54
-<!--动态资讯 结束--> 
54
+<!--动态资讯 结束-->
55
+{include file=hot.html}
55 56
 {include file=foot.html}
56 57
 </body>
57 58
 </html>

+ 1
- 0
template/dafeult/wap/newslist.html Ver arquivo

@@ -45,6 +45,7 @@
45 45
 {else}
46 46
 <div class="tac text-secondary">本分类下无任何数据!</div>
47 47
 {/pboot:if}
48
+{include file=hot.html}
48 49
 {include file=foot.html}
49 50
 </body>
50 51
 </html>

+ 2
- 1
template/dafeult/wap/team.html Ver arquivo

@@ -73,7 +73,8 @@
73 73
     </div>
74 74
   </div>
75 75
 </div>
76
-<!--专家团队 结束--> 
76
+<!--专家团队 结束-->
77
+{include file=hot.html}
77 78
 {include file=foot.html}
78 79
 </body>
79 80
 </html>

+ 1
- 0
template/dafeult/wap/teamlist.html Ver arquivo

@@ -49,6 +49,7 @@
49 49
 <div class="tac text-secondary">本分类下无任何数据!</div>
50 50
 {/pboot:if}
51 51
 </div>
52
+{include file=hot.html}
52 53
 {include file=foot.html}
53 54
 </body>
54 55
 </html>

+ 9
- 0
友情链接增加cid.txt Ver arquivo

@@ -0,0 +1,9 @@
1
+
2
+
3
+后台增加字段
4
+标签解析增加参数
5
+
6
+----------------------------------------
7
+{pboot:link gid=1 num=50 cid={$cityId}}
8
+<a href="[link:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [link:name] </a>
9
+{/pboot:link}

+ 12
- 0
新增自定义foreach标签.txt Ver arquivo

@@ -0,0 +1,12 @@
1
+{pboot:foreach str={label:hotkey} char=|}
2
+<a href="/search/?keyword=[foreach:name]" target="_blank" rel="nofollow">[foreach:name]</a>
3
+{/pboot:foreach}
4
+
5
+{pboot:foreach str={label:hotkey}}
6
+<a href="/search/?keyword=[foreach:name]" target="_blank" rel="nofollow">[foreach:name]</a>
7
+{/pboot:foreach}
8
+
9
+
10
+参数都是字符串,不能是数组或对象
11
+应该传值(参数)
12
+调用数组并循环

Carregando…
Cancelar
Salvar