Compare commits
11 Commits
88a91f3136
...
2c85df4a98
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c85df4a98 | |||
| 8311181967 | |||
| 99d49ee8a2 | |||
| 4035fe4751 | |||
| 634a758aff | |||
| 8ea03656d9 | |||
| 37023c6949 | |||
| 4fa32b56fe | |||
| 06078cf312 | |||
| 578ad475b7 | |||
| 8ced45364b |
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,12 +1,10 @@
|
||||
*.eot filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.woff filter=lfs diff=lfs merge=lfs -text
|
||||
*.woff2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.svg filter=lfs diff=lfs merge=lfs -text
|
||||
*.tff filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gzip filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.otf filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
@@ -12,43 +12,6 @@ use think\Request;
|
||||
*/
|
||||
class TopicPowerProdline extends Common
|
||||
{
|
||||
/**
|
||||
* 重写控制器初始化
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// 获取国家/语言列表
|
||||
$languages = $this->getLanguages();
|
||||
// 输出国家/语言列表
|
||||
if (get_platform() == 'mobile') {
|
||||
View::assign('header_languages', $languages);
|
||||
}
|
||||
|
||||
// 获取当前语言
|
||||
$current_language = $this->getCurrentLanguage($languages);
|
||||
if (!empty($current_language)) {
|
||||
$this->lang_id = $current_language['id'];
|
||||
}
|
||||
|
||||
// 获取产品分类
|
||||
$categorys = $this->getProductCategory($this->lang_id);
|
||||
// 输出产品分类
|
||||
View::assign('header_categorys', $categorys);
|
||||
|
||||
// 获取系统配置
|
||||
$configs = $this->getSysConfig($this->lang_id, ['basic', 'contact', 'media']);
|
||||
$this->basic_config = $configs['basic'];
|
||||
// 输出系统配置
|
||||
View::assign('basic_config', $configs['basic']);
|
||||
View::assign('contact_config', $configs['contact']);
|
||||
View::assign('media_config', $configs['media']);
|
||||
|
||||
// 获取底部导航
|
||||
$footer_navigation = $this->getNavigation('NAV_67f60be43df8d', $this->lang_id);
|
||||
// 输出底部导航
|
||||
View::assign('footer_navigation', $footer_navigation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 专题 - 电力品线首页
|
||||
*/
|
||||
|
||||
@@ -125,6 +125,43 @@
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.header-PC #header .navItem>a').each(function(idx, item) {
|
||||
var _item = $(item);
|
||||
_item.removeClass('active');
|
||||
if (_item.attr('href') && compareUrls(location.href, _item.get(0).href)) {
|
||||
_item.addClass('active').siblings();
|
||||
}
|
||||
});
|
||||
|
||||
// 比较两个URL是否相等(支持只有path的情况,并处理有无.html后缀的情况)
|
||||
function compareUrls(url1, url2) {
|
||||
// 如果输入的是相对路径,添加当前域名
|
||||
if (!url1.startsWith('http')) {
|
||||
url1 = window.location.origin + (url1.startsWith('/') ? '' : '/') + url1;
|
||||
}
|
||||
if (!url2.startsWith('http')) {
|
||||
url2 = window.location.origin + (url2.startsWith('/') ? '' : '/') + url2;
|
||||
}
|
||||
|
||||
// 将两个URL转换为URL对象
|
||||
const urlObj1 = new URL(url1);
|
||||
const urlObj2 = new URL(url2);
|
||||
|
||||
// 获取路径名并移除末尾的斜杠
|
||||
let path1 = urlObj1.pathname.replace(/\/$/, '');
|
||||
let path2 = urlObj2.pathname.replace(/\/$/, '');
|
||||
|
||||
// 移除.html后缀
|
||||
path1 = path1.replace(/\.html$/, '');
|
||||
path2 = path2.replace(/\.html$/, '');
|
||||
|
||||
// 比较处理后的路径
|
||||
return path1 === path2;
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 搜索历史记录处理
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{extend name="public/nas_base" /}
|
||||
{extend name="public/base" /}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="__CSS__/topic_power_prodline/index.css">
|
||||
<link rel="stylesheet" href="__CSS__/topic_power_prodline/swiper.css">
|
||||
@@ -10,15 +10,7 @@
|
||||
<link rel="stylesheet" href="__CSS__/topic_power_prodline/product_card.css">
|
||||
<link rel="stylesheet" href="__CSS__/topic_power_prodline/footer.css">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<!-- 重置header头为空 -->
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<a class="header" href="/">
|
||||
<div class="header-img">
|
||||
<img src="__IMAGES__/logo.png" alt="">
|
||||
</div>
|
||||
</a>
|
||||
<!-- 轮播核心容器 -->
|
||||
<div class="swiper-container auto-swiper-container" >
|
||||
{notempty name="data.focus_image"}
|
||||
|
||||
BIN
public/static/index/mobile/fonts/icomoon/colleciton/icomoon.svg
(Stored with Git LFS)
BIN
public/static/index/mobile/fonts/icomoon/colleciton/icomoon.svg
(Stored with Git LFS)
Binary file not shown.
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.3 KiB |
BIN
public/static/index/mobile/fonts/icomoon/icomoon.svg
(Stored with Git LFS)
BIN
public/static/index/mobile/fonts/icomoon/icomoon.svg
(Stored with Git LFS)
Binary file not shown.
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 7.9 KiB |
@@ -177,6 +177,7 @@
|
||||
padding-left: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.header-PC #header .nav2 .navItem > a.active,
|
||||
.header-PC #header .nav2 .navItem .navItemConten1 li a:hover {
|
||||
color: #004bfa;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user