调整新窗口打开

This commit is contained in:
2021-11-26 15:37:59 +08:00
parent f9f840b56b
commit a84417c167
13 changed files with 90 additions and 83 deletions

View File

@@ -3,7 +3,8 @@ $('[data-href]').on('click', function(event) {
if ($(this).hasClass('ajax-get') || $(this).hasClass('ajax-post')) {
return;
}
location.href = $(this).data('href');
window.open($(this).data('href'));
// location.href = $(this).data('href');
});
// ajax GET 请求
@@ -11,7 +12,8 @@ $('body').on('click', '.ajax-get', function(event) {
event.preventDefault();
if ($(this).hasClass('disabled') || $(this).attr('disabled')) {
return false;
};
}
;
var $this = $(this);
var $tips = $this.attr('tip') || '确认要执行该操作吗?';
var $target = $this.data('href') || $this.attr('href') || $this.attr('url') || $this.data('url');
@@ -54,7 +56,8 @@ $('body').on('click', '.ajax-get', function(event) {
$('body').on('click', '.ajax-post', function (event) {
if ($(this).hasClass('disabled') || $(this).attr('disabled')) {
return false;
};
}
;
event.preventDefault();
var $this = $(this);
@@ -111,7 +114,8 @@ $('body').on('click', '.ajax-post', function(event) {
$('body').on('click', '.ajax-post-confirm', function (event) {
if ($(this).hasClass('disabled') || $(this).attr('disabled')) {
return false;
};
}
;
event.preventDefault();
var $this = $(this);

View File

@@ -14,7 +14,7 @@
<ul class="indexExtend-ul studyExtend">
@foreach ($articles as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-nowrap indexExtend-ul-name">
{{ $article->title }}
</div>

View File

@@ -20,7 +20,7 @@
@if (getArticlesBYCate(12,2)->isNotEmpty())
@foreach (getArticlesBYCate(12,2) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-img mediaList-img">
<span style="background-image: url({{ $article->cover_path }});"></span>
</div>
@@ -37,7 +37,7 @@
</ul>
<div class="secondMore">
<a href=" {{ getOneCategory(12,'link') }}">查看更多&gt;</a>
<a href=" {{ getOneCategory(12,'link') }}" target="_blank">查看更多&gt;</a>
</div>
</div>
@@ -48,7 +48,7 @@
<img src="/assets/index/images/studyIcon_01.png"/>
{{ getOneCategory(30,'title') }}
</div>
<a href="{{ getOneCategory(30,'link') }}" class="secondTop-more">
<a href="{{ getOneCategory(30,'link') }}" target="_blank" class="secondTop-more">
查看更多&gt;&gt;
</a>
</div>
@@ -56,7 +56,7 @@
@if (getArticlesBYCate(30,4)->isNotEmpty())
@foreach (getArticlesBYCate(30,4) as $article)
<li>
<a href=" {{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-nowrap indexExtend-ul-name">
{{ $article->title }}
</div>

View File

@@ -29,7 +29,8 @@
<div class="surveyBrief-tips">
{{ getOneArticleBYCate(15,'description') }}
</div>
<a class="surveyBrief-more" href="{{ getOneArticleBYCate(15,'link') }}">查看更多></a>
<a class="surveyBrief-more" href="{{ getOneArticleBYCate(15,'link') }}"
target="_blank">查看更多></a>
</div>
</div>
</div>
@@ -42,7 +43,7 @@
<img src="/assets/index/images/surveyIcon_01.png"/>
{{ getOneCategory(14,'title') }}
</div>
<a href="{{ getOneCategory(14,'link') }}" class="secondTop-more">
<a href="{{ getOneCategory(14,'link') }}" target="_blank" class="secondTop-more">
查看更多&gt;&gt;
</a>
</div>
@@ -98,7 +99,9 @@
@if(in_array($cate->parent->id,config('setting.no_href')))
<a><span>{{ $child->title }}</span></a>
@else
<a href="{{ $child->link }}"><span>{{ $child->title }}</span></a>
<a href="{{ $child->link }}" target="_blank">
<span>{{ $child->title }}</span>
</a>
@endif
</li>
@endforeach

View File

@@ -20,7 +20,7 @@
@if (getArticlesBYCate(8,3)->isNotEmpty())
@foreach (getArticlesBYCate(8,3) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-img indexTeam-img">
<span style="background-image: url({{ $article->cover_path }});"></span>
</div>
@@ -44,7 +44,7 @@
@endif
</ul>
<div class="secondMore">
<a href="{{ getOneCategory(8,'link') }}">查看更多&gt;</a>
<a href="{{ getOneCategory(8,'link') }}" target="_blank">查看更多&gt;</a>
</div>
</div>
@@ -55,7 +55,7 @@
<img src="/assets/index/images/studyIcon_01.png"/>
{{ getOneCategory(16,'title') }}
</div>
<a href="{{ getOneCategory(16,'link') }}" class="secondTop-more">
<a href="{{ getOneCategory(16,'link') }}" target="_blank" class="secondTop-more">
查看更多&gt;&gt;
</a>
</div>
@@ -63,7 +63,7 @@
@if (getArticlesBYCate(16,4)->isNotEmpty())
@foreach (getArticlesBYCate(16,4) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-nowrap indexExtend-ul-name">
{{ $article->title }}
</div>
@@ -84,7 +84,7 @@
<img src="/assets/index/images/studyIcon_01.png"/>
{{ getOneCategory(18,'title') }}
</div>
<a href="{{ getOneCategory(18,'link') }}" class="secondTop-more">
<a href="{{ getOneCategory(18,'link') }}" target="_blank" class="secondTop-more">
查看更多&gt;&gt;
</a>
</div>
@@ -93,7 +93,7 @@
@if (getArticlesBYCate(18,4)->isNotEmpty())
@foreach (getArticlesBYCate(18,4) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-nowrap indexExtend-ul-name">
{{ $article->title }}
</div>
@@ -119,7 +119,7 @@
@if (getArticlesBYCate(24,6)->isNotEmpty())
@foreach (getArticlesBYCate(24,6) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="studyTerrace-name">
<div class="studyTerrace-tips">
{{ $article->title }}

View File

@@ -16,7 +16,7 @@
<img src="/assets/index/images/surveyIcon_01.png"/>
{{ getOneCategory(14,'title') }}
</div>
<a href="{{ getOneCategory(14,'link') }}" class="secondTop-more">
<a href="{{ getOneCategory(14,'link') }}" target="_blank" class="secondTop-more">
查看更多&gt;&gt;
</a>
</div>
@@ -24,7 +24,7 @@
@if (getArticlesBYCate(14,3)->isNotEmpty())
@foreach (getArticlesBYCate(14,3) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-img surveyLeader-img">
<span style="background-image: url({{ $article->cover_path }});"></span>
</div>

View File

@@ -11,7 +11,7 @@
@if(in_array($parent->id,config('setting.no_href')) || in_array($child->id,config('setting.no_href')))
<a><span>{{ $child->title }}</span></a>
@else
<a href="{{ $child->link }}"><span>{{ $child->title }}</span></a>
<a href="{{ $child->link }}" target="_blank"><span>{{ $child->title }}</span></a>
@endif
</li>
@endforeach

View File

@@ -21,7 +21,7 @@
@if ($articles->isNotEmpty())
@foreach ($articles as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="dateExtend-left">
<span>{{ $article->created_at->format('m/d') }}</span>
{{ $article->created_at->format('Y') }}

View File

@@ -21,7 +21,7 @@
@if (getArticlesBYCate(27,6)->isNotEmpty())
@foreach (getArticlesBYCate(27,6) as $article)
<div class="swiper-slide innovate-ul">
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-img indexTeam-img">
<span style="background-image: url({{ $article->cover_path }});"></span>
</div>
@@ -51,7 +51,7 @@
<img src="/assets/index/images/armyIcon_01.png"/>
{{ getOneCategory(28,'title') }}
</div>
<a href="{{ getOneCategory(28,'link') }}" class="secondTop-more">
<a href="{{ getOneCategory(28,'link') }}" target="_blank" class="secondTop-more">
查看更多&gt;&gt;
</a>
</div>
@@ -75,7 +75,7 @@
<img src="/assets/index/images/armyIcon_02.png"/>
{{ getOneCategory(29,'title') }}
</div>
<a href="{{ getOneCategory(29,'link') }}" class="secondTop-more">
<a href="{{ getOneCategory(29,'link') }}" target="_blank" class="secondTop-more">
查看更多&gt;&gt;
</a>
</div>
@@ -83,7 +83,7 @@
@if (getArticlesBYCate(29,6)->isNotEmpty())
@foreach (getArticlesBYCate(29,6) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="IndexExpertNew-li">
<span class="IndexExpertNew-tips">客座教授</span>
<div class="IndexExpertNew-title">{{ $article->title }}</div>

View File

@@ -23,7 +23,7 @@
@if ($articles->isNotEmpty())
@foreach ($articles as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-nowrap indexExtend-ul-name">
{{ $article->title }}
</div>
@@ -35,9 +35,7 @@
@endforeach
@endif
</ul>
<!-- 分页 -->
@if ($articles->isNotEmpty())
{{ $articles->links('layouts.pagination') }}
@endif

View File

@@ -21,7 +21,7 @@
@if (getArticlesBYCate(7,4)->isNotEmpty())
@foreach (getArticlesBYCate(7,4) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-img newBranch-img">
{{-- <span style="background-image: url({{ $article->cover_path }});"></span>--}}
</div>
@@ -45,7 +45,7 @@
@endif
</ul>
<div class="secondMore">
<a href="{{ getOneCategory(7,'link') }}">查看更多&gt;</a>
<a href="{{ getOneCategory(7,'link') }}" target="_blank">查看更多&gt;</a>
</div>
</div>
@@ -61,7 +61,7 @@
@if (getArticlesBYCate(17,4)->isNotEmpty())
@foreach (getArticlesBYCate(17,4) as $article)
<li>
<a href="{{ $article->link }}">
<a href="{{ $article->link }}" target="_blank">
<div class="ce-img newBranch-img">
{{-- <span style="background-image: url({{ $article->cover_path }});"></span>--}}
</div>
@@ -85,7 +85,7 @@
@endif
</ul>
<div class="secondMore">
<a href="{{ getOneCategory(17,'link') }}">查看更多&gt;</a>
<a href="{{ getOneCategory(17,'link') }}" target="_blank">查看更多&gt;</a>
</div>
</div>

View File

@@ -67,7 +67,7 @@
@if (getArticlesByCateIds(6)->isNotEmpty())
@foreach (getArticlesByCateIds(6) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank" title="{{ $article->title }}">
<div class="ce-nowrap indexNews-ul-name">
{{ $article->title }}
</div>
@@ -91,7 +91,7 @@
@if (getArticlesBYCate(24,4)->isNotEmpty())
@foreach (getArticlesBYCate(24,4) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank" title="{{ $article->title }}">
<div class="indexBuild-icon">
<img src="/assets/index/images/Build_icon0{{ $loop->index }}.png">
</div>
@@ -108,7 +108,7 @@
<div class="indexBuild-talent">
<div class="indexBuild-talent-title">
<span>{{ getOneCategory(28,'title') }}</span>
<a href="{{ getOneCategory(28,'link') }}">MORE</a>
<a href="{{ getOneCategory(28,'link') }}" target="_blank">MORE</a>
</div>
<div class="swiper-cont">
<div class="swiper-container indexBuild-swiper">
@@ -147,7 +147,7 @@
@if (getArticlesBYCate(24,5,'all',false,'asc')->isNotEmpty())
@foreach (getArticlesBYCate(24,5) as $article)
@if($loop->index==4)
<a href="{{ $article->link }}" class="indexBuild-new"
<a href="{{ $article->link }}" target="_blank" class="indexBuild-new"
title="{{ $article->title }}">
<div class="indexBuild-icon">
<img src="/assets/index/images/Build_icon05.png">
@@ -192,7 +192,8 @@
@if (getArticlesBYCate(8,6)->isNotEmpty())
@foreach (getArticlesBYCate(8,6) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank"
title="{{ $article->title }}">
<div class="ce-nowrap indexNews-ul-name">
{{ $article->title }}
<div class="ce-nowrap indexNews-ul-text">
@@ -211,7 +212,8 @@
@if (getArticlesBYCate(5,6)->isNotEmpty())
@foreach (getArticlesBYCate(5,6) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank"
title="{{ $article->title }}">
<div class="ce-nowrap indexNews-ul-name">
{{ $article->title }}
<div class="ce-nowrap indexNews-ul-text">
@@ -263,7 +265,7 @@
<div class="ce-nowrap-multi indexMedia-text">
{{ getOneArticleBYCate(17,'description') }}
</div>
<a class="indexMedia-more" href="{{ getOneCategory(17,'link') }}">MORE</a>
<a class="indexMedia-more" href="{{ getOneCategory(17,'link') }}" target="_blank">MORE</a>
</div>
</div>
</div>
@@ -290,7 +292,7 @@
@if (getArticlesBYCate(12,5)->isNotEmpty())
@foreach (getArticlesBYCate(12,5) as $article)
<li>
<a href="{{ $article->link }}"
<a href="{{ $article->link }}" target="_blank"
title="{{ $article->title }}">
<div class="ce-nowrap-multi indexNews-ul-name">
{{ $article->title }}
@@ -308,7 +310,7 @@
@if (getArticlesBYCate(30,5)->isNotEmpty())
@foreach (getArticlesBYCate(30,5) as $article)
<li>
<a href="{{ $article->link }}"
<a href="{{ $article->link }}" target="_blank"
title="{{ $article->title }}">
<div class="ce-nowrap-multi indexNews-ul-name">
{{ $article->title }}
@@ -371,7 +373,7 @@
@if (getArticlesBYCate(27,4)->isNotEmpty())
@foreach (getArticlesBYCate(27,4) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank" title="{{ $article->title }}">
<div class="ce-img indexTeam-img">
<span style="background-image: url({{ $article->cover_path }});"></span>
</div>
@@ -397,7 +399,7 @@
@if (getArticlesBYCate(29,9)->isNotEmpty())
@foreach (getArticlesBYCate(29,9) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank" title="{{ $article->title }}">
<div class="IndexExpertNew-li">
<span class="IndexExpertNew-tips">客座教授</span>
<div class="IndexExpertNew-title">{{ $article->title }}</div>
@@ -408,7 +410,7 @@
@endif
</ul>
<div class="IndexExpert-more">
<a href="{{ getOneCategory(29,'link') }}">查看更多 &gt;</a>
<a href="{{ getOneCategory(29,'link') }}" target="_blank">查看更多 &gt;</a>
</div>
</div>
<!-- end 专家智库 -->
@@ -419,7 +421,7 @@
@if (getArticlesBYCate(18,4)->isNotEmpty())
@foreach (getArticlesBYCate(18,4) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank" title="{{ $article->title }}">
<div class="ce-nowrap indexExtend-ul-name">
{{ $article->title }}
</div>
@@ -432,7 +434,7 @@
@endif
</ul>
<div class="IndexExpert-more">
<a href="{{ getOneCategory(18,'link') }}">查看更多 &gt;</a>
<a href="{{ getOneCategory(18,'link') }}" target="_blank">查看更多 &gt;</a>
</div>
</div>
<!-- end 项目推广 -->
@@ -443,7 +445,7 @@
@if (getArticlesBYCate(16,4)->isNotEmpty())
@foreach (getArticlesBYCate(16,4) as $article)
<li>
<a href="{{ $article->link }}" title="{{ $article->title }}">
<a href="{{ $article->link }}" target="_blank" title="{{ $article->title }}">
<div class="ce-nowrap indexExtend-ul-name">
{{ $article->title }}
</div>
@@ -456,7 +458,7 @@
@endif
</ul>
<div class="IndexExpert-more">
<a href="{{ getOneCategory(16,'link') }}">查看更多 &gt;</a>
<a href="{{ getOneCategory(16,'link') }}" target="_blank">查看更多 &gt;</a>
</div>
</div>
<!-- end 成果专利 -->

View File

@@ -86,7 +86,7 @@
<ul class="linkUl">
@if ($links->isNotEmpty())
@foreach ($links as $link)
<li><a href="{{ $link->url }}">{{ $link->title}}</a></li>
<li><a href="{{ $link->url }}" target="_blank">{{ $link->title}}</a></li>
@endforeach
@endif
</ul>