123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <!--拼接查询条件-->
- <?php
-
- //关联 其他栏目 用的 查询
- $catid = 0;
-
- if(empty($provid)){
- $provid = 0;
- }
- if(empty($cityid)){
- $cityid = 0;
- }
-
- //只调用省级 城市为空
- if((int)$provid === 0 && (int)$catid === 0){
- //所有省份的数据
- //and province_id='0' and city_id='0'
- $where = "typeid=".$tid." and is_del=0";
- }else if((int)$provid > 0 && (int)$catid === 0 && (int)$cityid === 0){
- //只选择省 不选择职称
- //and city_id='0'
- $where = "typeid=".$tid." and province_id='$provid' and is_del=0";
- }else{
- //存在城市
- // and stypeid='$catid'
- $where = "typeid=".$tid." and province_id='$provid' and city_id='$cityid' and is_del=0";
- }
-
- if($tagid > 0){
- //加入筛选
- $where = $where.' and product_tag_id='.$tagid;
- }
-
- //var_dump($tid);die;
-
- ?>
-
-
- <?php
- //var_dump($route_param['page']);
- //计算limit属性
- $pagesize = 12;
- if(!empty($route_param['page'])){
- $curpage = $route_param['page'];
- $start_li = $pagesize*($curpage-1); //开始位置
- $end_li = $pagesize*$curpage;
- $limit_cat_value = $start_li.','.$pagesize;
- }else{
- $curpage = 1;
- $limit_cat_value = '0,'.$pagesize;
- }
- ?>
-
- {eyou:assign name='limit_cat' value="$limit_cat_value" /}
- <?php
- //$sql = "select GROUP_CONCAT(aid SEPARATOR ',') AS ids from ey_archives where $where order by update_time desc limit $limit_cat";
- $sql = "select aid from ey_archives where $where order by update_time desc limit $limit_cat";
- //echo $sql;die;
- $ids = '';
- ?>
- {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id="res"}
- <?php
- //var_dump($provid);
- //var_dump($res);
- $ids = $res['aid'].','.$ids;
- ?>
- {/eyou:sql}
- <?php
- $ids = preg_replace("/.$/", "", $ids);
- //var_dump($ids);
- ?>
- <!--开始查询-->
- {eyou:empty name='$ids' /}
- ----------------------(暂无相关文档)-----------------------
- {eyou:else /}
-
-
-
- {eyou:artlist idlist="$ids" titlelen='30' limit='0,12' infolen='160' orderby='update_time desc' addfields='handle_time,province_id'}
- <?php
- //var_dump($field['aid']);
- $ar_url = get_tid_url_2($field['arcurl'],$field['typeid'],$field['stypeid'],'0','',0,$field['province_id'],$field['city_id']);
- ?>
-
- <div class="col-xs-6 col-sm-4 col-md-3 font-563-active-{$i}">
- <div class="item art-item transition">
- <a class="art-a" href="{$ar_url}" title="{$field.title}">
- <img class="img-cover" src="{$field.litpic}" alt="{$field.title}" />
- </a>
- <h3 class="art-title">
- <a class="" href="{$ar_url}" title="{$field.title}" >
- {$field.title}
- </a>
- </h3>
- <p>{$field.seo_description|msubstr=###,0,35,true}</p>
- </div>
- </div>
- <!--{$field.add_time|MyDate='Y-m-d H:i',###}---->
-
- {/eyou:artlist}
-
-
-
- {/eyou:empty}
-
-
-
-
|