{eyou:assign name='page' value='zccat-detail-list' /} {eyou:php} /**处理参数*/ $route_param = request()->route(); //$route_param['tid'] = //var_dump($route_param);die; $route_domain = request()->domain(); $route_domain2 = explode('//',$route_domain); $domain = explode('.',$route_domain2[1]); $site = $domain[0]; //var_dump($site); $route_url = request()->url(); //var_dump($route_domain); //var_dump($route_url); //技术员、助理、中级、高级、正高级 if(!empty($route_param['pa'])){ /*if((int)$route_param['pa'] === 1){ $level = '助理'; }elseif((int)$route_param['pa'] === 2){ $level = '中级'; }elseif((int)$route_param['pa'] === 3){ $level = '高级'; }elseif((int)$route_param['pa'] === 4){ $level = '正高级'; }else{ $level = '技术员'; }*/ $level = (int)$route_param['pa']; //级别对应排序即可 }else{ /*$level = '技术员';*/ $level = 0; } //查找文档id {/eyou:php} {eyou:php} if($site == 'www'){ $areaid = 10000; }else{ $sql = "SELECT id FROM ey_citysite WHERE domain = '$site'"; //echo $sql; } {/eyou:php} {eyou:if condition='($site != "www")'} {eyou:sql sql='$sql' cachetime='3600' id='city'} {eyou:php} $areaid = $city['id']; {/eyou:php} {/eyou:sql} {/eyou:if} {eyou:php} $num = (int)$route_param['catids']; $cid = $route_param['cid']?(int)$route_param['cid']:0; //var_dump($cid); if($cid > 0){ $sql = "SELECT aid FROM ey_seo_number WHERE number=$cid and type=1 and tid=38 and topid=38 and parentid=38 and area_id=$areaid"; }else{ $sql = "SELECT aid FROM ey_seo_number WHERE number=$num and type=1 and tid=38 and topid=38 and parentid=38 and area_id=$areaid"; } //echo $sql; {/eyou:php} {eyou:sql sql='$sql' cachetime='3600' id='seo'} {eyou:php} if($cid > 0){ //再查询一次 $so_parent_id = $seo['aid']; $sql2 = "SELECT aid FROM ey_seo_number WHERE number=$num and type=1 and tid=$so_parent_id and topid=38 and parentid=$so_parent_id and area_id=0"; }else{ $route_param['catids'] = $seo['aid']; //var_dump($route_param); } {/eyou:php} {/eyou:sql} {eyou:if condition='($cid > 0)'} {eyou:sql sql='$sql2' cachetime='3600' id='seo2'} {eyou:php} $route_param['catids'] = $seo2['aid']; //var_dump($route_param); {/eyou:php} {/eyou:sql} {/eyou:if} {eyou:assign name='catid' value="$route_param.catids"} {eyou:type typeid='$route_param.catids' empty='' id="catinfo"} {eyou:assign name='parentid' value="$catinfo.parent_id"} {eyou:assign name='catname' value="$catinfo.typename"} {/eyou:type} {eyou:empty name='$parentid' /} {eyou:sql sql="SELECT id,parent_id,typename FROM ey_arctype_cat WHERE id = $catid" cachetime='3600' id='field2'} {eyou:assign name='parentid' value="$field2.parent_id"} {eyou:assign name='catname' value="$field2.typename"} {/eyou:sql} {/eyou:empty} {eyou:sql sql="$sql" cachetime='3600' empty='' id='detail'} {eyou:assign name='aid' value="$detail.aid"} {eyou:arcview aid="$detail.aid" id="field"} {eyou:php} //获取到文档详情 $eyou['field'] = $field; {/eyou:php} {/eyou:arcview} {/eyou:sql} {eyou:sql sql="$sql" cachetime='3600' empty='' id='detail2'} {eyou:sql sql="$sql2" cachetime='3600' empty='' id='detail'} {eyou:assign name='aid' value="$detail.aid"} {eyou:arcview aid="$detail.aid" id="field"} {eyou:php} //获取到文档详情 $eyou['field'] = $field; {/eyou:php} {/eyou:arcview} {/eyou:sql} {/eyou:sql} {eyou:php} /*打印信息*/ //var_dump($detail); //var_dump($eyou['field']['area_id']); //var_dump($parentid);die; {/eyou:php}