{eyou:php} $route_param = request()->route(); //处理域名获取当前域名名称 $route_domain = request()->domain(); $domain = explode('//',$route_domain); $domain = explode('.',$domain[1]); $site = $domain[0]; //var_dump($site); if(!empty($site) || $site != 'zc' || $site != 'www'){ //判定为二级域名 }else{ $site = 'www'; } //处理城市参数 if(!empty($route_param['site'])){ $city_domain = $route_param['site']; }else{ $city_domain = 'none'; } {/eyou:php} {eyou:sql sql='$sql' cachetime='3600' id='seo_cat'} {eyou:notempty name='$seo_cat' /} {eyou:assign name='cityid' value="$seo_cat.id" /} {eyou:php} $seo_title = $seo_cat['seo_title']; $seo_keywords = $seo_cat['seo_keywords']; $seo_description = $seo_cat['seo_description']; {/eyou:php} {/eyou:notempty} {/eyou:sql} {eyou:if condition='(empty($seo_title) && isset($seo_title))'} {eyou:sql sql='$sql2' cachetime='3600' id='area'} {eyou:php} $area_name = ''.$area['name'].''; $area_id = ''.$area['id'].''; {/eyou:php} {/eyou:sql} {eyou:sql sql='$sql1' cachetime='3600' id='seo_cat2'} {eyou:notempty name='$seo_cat2' /} {eyou:php} $seo_title = $seo_cat2['seo_title']; $seo_keywords = $seo_cat2['seo_keywords']; $seo_description = $seo_cat2['seo_description']; {/eyou:php} {/eyou:notempty} {/eyou:sql} {eyou:else /} {/eyou:if}