Server : nginx/1.20.1
System : Linux iZ2ze9ojcl78uluczwag69Z 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Apr 8 19:01:30 UTC 2021 x86_64
User : www ( 1000)
PHP Version : 7.3.28
Disable Function : passthru,exec,system,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/0531yanglao.com/templates/index/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/0531yanglao.com/templates/index/nursing_home_index.html
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!--<title>找养老院/{$a}{$t}{$c}{$n}{$s}</title>-->
		<title>济南{$a_name}{$c_name}{$n_name}{$s_name}养老机构查询-济南{$a_name}{$c_name}{$n_name}{$s_name}养老院价格收费排名一览表_第{$page.currentPage}页-济南养老网</title>
		<meta name="Description"
			content="济南养老网为您介绍关于济南养老院,护理院,老年公寓的价格,地理位置,收费标准,房间设施,特色服务,护理项目,图文介绍,联系方式,排名,哪家好?等养老服务机构信息;让您在众多济南养老院中方便快捷地找到合适的养老院。" />
		<meta name="Keywords" content="济南{$a_name}{$c_name}{$n_name}{$s_name}养老院,济南{$a_name}{$n_name}老年公寓,济南{$a_name}{$s_name}养老机构,济南养老网。当前第{$page.currentPage}页"/>
		<base href="{:server_url()}" />
		<link rel="stylesheet" href="./css/style.css" />
		<link rel="stylesheet" href="./css/swiper.min.css" />
	</head>
	<style>
		.mySwiper {
			display: none;
		}

		main {
			background: #f5f5f5;
		}

		.rmtj_left {
			border: 0 !important;
		}

/*	ul a:nth-child(2) {*/
/*    background-color: #ffffff;*/
/*    color: #1ac1b0 !important;*/
/*}*/
/*分页*/
    .pagination {
        display: flex;
        list-style: none;
        justify-content: center;
        align-items: center;
    }

    .pagination li {
        margin: 0 5px;
    }

    .pagination li.active a {
        font-weight: bold;
    }
      @media all and (max-width: 768px) {
          .rmtj_left .wrap .yyy h4 {
    font-size: 15px;
}
          .price {
    font-size: 16px!important;
}
.app_uuu .xinjia span {
    font-size: 12px!important;
}
.app_yyy .xinjia img {
    height: 17px;
}
.buttons p img {
    height: 17px!important;
}
.app_yyy h5:first-child {
   padding: 0;
}

.search_yl {
    display: block;
    width: 100%;
    margin: 24px auto 10px auto;
}
#filter dl dt {
    height: 40px;
    width: 107px;
    line-height: 45px;
    position: absolute;
    left: 0;
    z-index: 1;
    /* background-color: #d5d5d5; */
    /* top: 0; */
}
#filter dl dt {
    background: #fff;
}
#filter dl   a {
    margin: 0 10px;
    font-size: 14px;
    color: #7d7d7d;
}
#filter dl dt {
    color: #000000;
    width: 90px;
}
#filter dl {
    width: 100%;
    display: flex;
    height: 40px;
    white-space: nowrap;
    overflow-y: hidden;
    align-items: center;
    border-top: none;
    /* border-left: 1px solid #cccccc; */
    border-right: none;
    /* position: relative; */
    padding-left: 80px;
    box-sizing: border-box;
}
#filter {
    border: 0;
    width: 96%;
    margin: 0 auto;
}
/* 设置滚动条样式 */
#filter dl::-webkit-scrollbar {
  width: 0px; /* 滚动条宽度 */
  opacity: 0;
}

      }
    
	</style>
	<body>
		<!-- 头部 -->
		{include file='header'}
		<!-- 主体 -->
		<main>

			<div class="f_home">
				<!--<h4>首页/找养老院/{$a}{$t}{$c}{$n}{$s}</h4>-->
				<h4>首页/找养老院/{$a_name}{$t_name}{$c_name}{$n_name}{$s_name}</h4>
				<div class="search_yl">

					<div id="filter">
						<dl class="quyu">
							<dt>所在区域</dt>
							<a class="" href="{:url('/zyly', ['location'=>'0'])}" 
							>全部</a>
							{foreach name='dict[7]' item='item' key='key'}
							<a href="{:url('/zyly/', ['location'=>$key])}" title="济南市{$item}">{$item}</a>
							{/foreach}
						</dl>
						<dl class="leixing"> 
							<dt>机构类型</dt>
							<a class="" href="{:url('/zyly', ['type'=>0])}" >全部</a>
							{foreach name='dict[2]' item='item' key='key'}
							<a id="jigou" href="{:url('/zyly', ['type'=>$key])}" title="{$item}">{$item}</a>

							{/foreach}
						</dl>
						<dl class="shoufei">
							<dt>收费标准</dt>
							<a class="" href="{:url('/zyly', ['price'=>0])}" >全部</a>
							{foreach name='dict[9]' item='item' key='key'}
							<a id="shoufei" href="{:url('/zyly', ['price'=>$key])}" title="{$item}">{$item}</a>
							{/foreach}
						</dl>
						<dl class="xingzhi">
							<dt>机构性质</dt>
							<a class="" href="{:url('/zyly', ['nature'=>0])}">全部</a>
							{foreach name='dict[3]' item='item' key='key'}
							<a id="xingzhi" href="{:url('/zyly', ['nature'=>$key])}" title="{$item}">{$item}</a>
							{/foreach}
						</dl>
						<dl class="fuwu">
							<dt>服务内容</dt>
							<a class="" href="{:url('/zyly', ['service'=>0])}">全部</a>
							{foreach name='dict[8]' item='item' key='key'}
							<a id="fuwu" href="{:url('/zyly', ['service'=>$key])}" title="{$item}">{$item}</a>
							{/foreach}
						</dl>
					</div>
					<div class="resa" style="display:none"></div>
				</div>
				<div class="kuaishu">
					<li><img src="image/kuaisu01.png" /><i id="diliweizhi">{$a_name}</i>养老机构<span id="total">{$statistics.total}</span>家
					</li>
					<li><img src="image/kuaisu02.png" />平均收费{$statistics.min_price}-{$statistics.max_price}元/月</li>
					<!--<li><a href="{:url('/zyly', ['location'=>$key])}"><button>快速查找</button> </a></li>-->
					<!--<li><a href="/zyly/{$a}"><button>快速查找</button> </a></li>-->
						<li><button id="btn6">快速查找</button></li>
				</div>

			</div>
			<!-- 找养老院 -->
			<div class="route">
				<div class="rmtj">
					<!-- 左边 -->
					<div class="rmtj_left">
						{foreach name='list' item='item' key='key'}
						<a href="{:url('/nursingHome/detail',['id'=>$item.nid])}" target="_blank"  title="{$item.title}">
							<div class="wrap yanglao" title="">
								<img src="{$item.filename}" class="zyleyl" alt="{$item.title}" title="{$item.title}"/>
								<div class="yyy">
									<h4>
										{$item.title}
										<p class="price">¥{$item.min_price}-{$item.max_price} <span>元/月</span></p>
									</h4>
									<div class="app_yyy app_uuu">
										<h5><img src="./image/index04.svg" alt="" />{$item.address}</h5>
										<!--<h5>床位:{$item.beds}张  |  评分:{$item.comprehensive_score}分  |  机构类型:{$item.type_name}</h5>-->
										<li class="xinjia">
											<span><img src="./image/index01.svg" alt="" />{$item.type_name}</span> |
											<span><img src="./image/index02.svg" alt="" />{$item.beds}张</span> |
											<span><img src="./image/index05.svg" alt="" />{:implode('/',
												$item.retract_objects_name)}</span>
										</li>
										<li class="buttons">
											{foreach name='$item.tags_name' item='item' key='key'}
											<p class="btn0{$key + 1}"><img src="./image/duihao0{$key + 1}.svg"
													alt="" />{$item}</p>
											{/foreach}
										</li>
									</div>
								</div>
							</div>
						</a>
						{/foreach}
						<!-- 分页 -->
					
							<!-- 分页 -->
							<!--<div class="pages">-->
								<!-- 隐藏的数据总数 -->
							<!--	<span class="data-total"> {$page.currentPage}</span>-->
							<!--	<div class="v-pagination">-->
							<!--		<span class="total">总数为{$page.total}</span>-->
							<!--		<ul class="pagination-page"></ul>-->
							<!--	</div>-->
							<!--</div>-->
							<!--{$page.total}-->
							<!--{$page.listRows}-->
							<!--{$page.currentPage}-->
							<!--{$page.lastPage}-->
							
<?php
// 获取当前页数
$current_page = $page['currentPage'];

// 总记录数
$total_records = $page['total'];

// 每页显示的记录数
$records_per_page = $page['listRows'];

// 构建基础 URL
$base_url = 'http://yl.jnbinzang.com/zyly/';

// 计算总页数
$total_pages = ceil($total_records / $records_per_page);

// 显示省略号的起始页
$start_page = ($current_page - 2 > 2) ? $current_page - 2 : 1;

// 显示省略号的结束页
$end_page = ($current_page + 2 < $total_pages - 1) ? $current_page + 2 : $total_pages;

// 构建分页链接
$page_links = '';
if ($total_pages > 1) {
    $page_links .= '<ul class="pagination">';
    if ($current_page != 1) {
        $page_links .= '<li><a href="' . $base_url . '?page=' . ($current_page - 1) . '">上一页</a></li>';
        $page_links .= '<li><a href="' . $base_url . '">首页</a></li>';
    }

    if ($start_page > 1) {
        $page_links .= '<li><a href="' . $base_url . '">1</a></li>';
        if ($start_page > 2) {
            $page_links .= '<li>...</li>';
        }
    }

    for ($i = $start_page; $i <= $end_page; $i++) {
        if ($i == $current_page) {
            $page_links .= '<li class="active"><a href="' . $base_url . '?page=' . $i . '">' . $i . '</a></li>';
        } else {
            $page_links .= '<li><a href="' . $base_url . '?page=' . $i . '">' . $i . '</a></li>';
        }
    }

    if ($end_page < $total_pages) {
        if ($end_page < $total_pages - 1) {
            $page_links .= '<li>...</li>';
        }
        $page_links .= '<li><a href="' . $base_url . '?page=' . $total_pages . '">' . $total_pages . '</a></li>';
    }

    if ($current_page != $total_pages) {
        $page_links .= '<li><a href="' . $base_url . '?page=' . ($current_page + 1) . '">下一页</a></li>';
        $page_links .= '<li><a href="' . $base_url . '?page=' . $total_pages . '">尾页</a></li>';
    }

    $page_links .= '</ul>';
}

// 输出分页链接
echo $page_links;
?>
					
							<!--{$list | raw}-->
						
					</div>

					<!-- 右边 -->
					<div class="rmtj_right">
						<div class="pc_yanglaoa">
							<h4 title="为老服务">为老服务<span class="gengduo"><a href="http://yl.jnbinzang.com/wlfw/">更多</a></span></h4>
							{foreach name='article_3' item='item' key='key'}
							<a href="{:url('/article/detail',['id'=>$item.article_id])}" target="_blank"> <img
									src="{$item.filename}" class="weilaoimg" alt="{$item.title}" title="{$item.title}"/>
								<h6>{$item.title}</h6>
							</a>

							{/foreach}
						</div>
						<div class="pc_yanglaob">
							<h4>机构推荐</h4>
							{foreach name='recommend_1' item='item' key='key'}
							<a href="{:url('/nursingHome/detail',['id'=>$item.nid])}" title="{$item.title}"><img
									src="{$item.filename}" target="_blank" />
								<h6>{$item.title}</h6>
							</a>
							{/foreach}
						</div>

						<div class="pc_yanglaoa">

							<h4 title="养老资讯">养老资讯<a href="http://yl.jnbinzang.com/ylzx/">更多<img src="./image/gengduo.png" alt=""></a>
							</h4>
							{foreach name='article_1' item='item' key='key'} 
							<a href="{:url('/article/detail',['id'=>$item.article_id])}" target="_blank" title="{$item.title}">
								<h6 class="xinwena"><img src="./image/gengduo.png" alt="{$item.title}">{$item.title}</h6>
							</a>
							{/foreach}

						</div>
					</div>
				</div>
			</div>


		</main>

		<!-- 底部 -->
		{include file='footer'}
		<!-- 底部悬浮 -->
		<!--<div class="footer_b">-->
		<!--    <div class="footer_b_banxin">-->
		<!--        <h4>找养老院,上养老网</h4>-->
		<!--        <ul>-->
		<!--            <li><img src="image/bz_b3.png" />信息全面</li>-->
		<!--            <li><img src="image/bz_b3.png" />信息全面</li>-->
		<!--            <li><img src="image/bz_b3.png" />信息全面</li>-->
		<!--        </ul>-->
		<!--        <p><img src="image/bz_b3.png" />0411-84179979</p>-->
		<!--        <button type="button">咨询热线</button>-->
		<!--    </div>-->
		<!--</div>-->
		<!-- 侧边悬浮/ -->
		<div class="pc_footer_b">
			<div class="btn" data-clipboard-action="copy" data-clipboard-target="#target" id="copy_btn">
				<img src="image/footer_erweima.png" id="weixinerweima" /><img src="image/weixin.png" />微信
			</div>
			<div><img src="image/xiaochengxu.png" />小程序</div>
			<div><img src="image/kefu.png" />客服</div>
			<div><img src="image/fankui.png" />反馈</div>
			<div class="top"><img src="image/huidingbu.png" />顶部</div>
		</div>
	</body>
	<script src="./js/jquery-3.6.0.js"></script>
	<script src="./js/swiper.min.js"></script>
	<script src="./js/style.js"></script>
	<script src="./js/page.js"></script>
	<script>

const currentUrl = window.location.pathname
const currentUrlList = currentUrl.split('/zyly/')
const strUrlValue = currentUrlList[1] || ''
const strListValue = strUrlValue.split('/')

const pattern = /\d/g
let quyuUrl = ''
let strValue = ''

if (strListValue.length === 1) {
  if (pattern.test(strUrlValue)) {
    strValue = strUrlValue
  } else {
    quyuUrl = strUrlValue
  }
}

if (strListValue.length === 2) {
  const s1 = strListValue[0]
  const s2 = strListValue[1]

  if (pattern.test(s1)) {
    quyuUrl = ''
    strValue = s1
  } else {
    quyuUrl = s1

    if (pattern.test(s2)) {
      console.log('s2', s2)
      strValue = s2
    } else {
      strValue = ''
    }
  }
}

const classNameList = ['.quyu', '.leixing', '.shoufei', '.xingzhi', '.fuwu']
const urlList = ['a', 't', 'c', 'n', 's']

function getNumber(str) {
  const regex = /(\d+)/
  const match = str.match(regex)

  if (match) {
    const number = match[1]
    return number
  } else {
    console.log('没有找到数字')
  }
  return 1
}

function handleColor(element) {
  element.classList.add('current')
}

function handleSortStr(str) {
  let result = ''
  urlList.forEach((item) => {
    const pos = str.indexOf(item)
    if (pos !== -1) {
      const key = str.slice(pos, pos + 1)
      const value = getNumber(str.slice(pos + 1))
      const res = key + value
      result += res
    }
  })
  return result
}

function handleNewHref(url, i, pos, element) {
  let newHref

  if (i === 0) {
    if (pos === -1) {
      newHref = strValue

      handleColor(element)
    } else {
      const str = url + getNumber(strValue.slice(pos + 1))
      newHref = strValue.replace(str, '')
    }
  } else {
    if (pos === -1) {
      newHref = strValue + url + i
    } else {
      const str = url + getNumber(strValue.slice(pos + 1))
      newHref = strValue.replace(str, url + i)
      if (Number(getNumber(strValue.slice(pos + 1))) === i) {
        handleColor(element)
      }
    }
  }

  return handleSortStr(newHref)
}

function handleStart(url, i, element) {
  const str = element.search || ''

  const quyuATag = str.split('?location=')[1] || ''

  if (quyuUrl) {
    if (quyuUrl === quyuATag) {
      handleColor(element)
    }
  } else {
    if (i === 0) {
      handleColor(element)
    }
  }
  if (i === 0) {
    return ''
  }

  return quyuATag
}

function getEndHref(startUrl, endUrl) {
  if (startUrl) {
    if (endUrl) {
      return startUrl + '/' + endUrl
    } else {
      return startUrl
    }
  } else {
    return endUrl
  }
}

function handlerUrlFunc(className, url) {
  let dlElement = document.querySelector(className)
  let aElements = dlElement.querySelectorAll('a')
  const pos = strValue.indexOf(url)

  for (let i = 0; i < aElements.length; i++) {
    const element = aElements[i]

    let startUrl = ''
    let endUrl = ''

    if (url === 'a') {
      startUrl = handleStart(url, i, element)
      endUrl = strValue
    } else {
      startUrl = quyuUrl
      endUrl = handleNewHref(url, i, pos, element)
    }

    const newHref = getEndHref(startUrl, endUrl)

    const value = '/zyly/' + newHref

    aElements[i].setAttribute('href', value)
  }
}
const zylyList = [
  {
    className: '.quyu',
    url: 'a'
  },
  {
    className: '.leixing',
    url: 't'
  },
  {
    className: '.shoufei',
    url: 'c'
  },
  {
    className: '.xingzhi',
    url: 'n'
  },
  {
    className: '.fuwu',
    url: 's'
  }
]

zylyList.forEach((item) => {
  handlerUrlFunc(item.className, item.url)
})




// 判断显示每个区域的total
$.ajax({
  url: 'http://yl.jnbinzang.com/api/mapRegion',
  method: 'POST',
  success: function(responseData) {
    var res = responseData.data;

    for (var i = 0; i < res.length; i++) {
      var name = res[i].name;
      var total = res[i].total;
      var innerText = $("#diliweizhi").text();

      if (innerText === name) {
        $("#total").text(total);
        break;
      }
    }
  }
});




	</script>

</html>