|
@@ -385,8 +385,8 @@
|
|
|
<div class="tab-content-list" style="display: block;">
|
|
|
<ul>
|
|
|
{{range $i, $v := .T.newArticle_1}}
|
|
|
- <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
- <p>{{$v.title}}</p>
|
|
|
+ <li><a data-id="{{$v._id}}" href="/article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
+ <p class="visited-hd">{{$v.title}}</p>
|
|
|
<div>
|
|
|
<span class="light">{{$v.subtype}}</span>
|
|
|
{{if $v.industry}}<span>{{$v.industry}}</span>{{end}}
|
|
@@ -401,8 +401,8 @@
|
|
|
<div class="tab-content-list">
|
|
|
<ul>
|
|
|
{{range $i, $v := .T.newArticle_2}}
|
|
|
- <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
- <p>{{$v.title}}</p>
|
|
|
+ <li><a data-id="{{$v._id}}" href="/article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
+ <p class="visited-hd">{{$v.title}}</p>
|
|
|
<div>
|
|
|
<span class="light">{{$v.subtype}}</span>
|
|
|
{{if $v.area}}<span>{{$v.area}}</span>{{end}}
|
|
@@ -416,8 +416,8 @@
|
|
|
<div class="tab-content-list">
|
|
|
<ul>
|
|
|
{{range $i, $v := .T.newArticle_3}}
|
|
|
- <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
- <p>{{$v.title}}</p>
|
|
|
+ <li><a data-id="{{$v._id}}" href="/article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
+ <p class="visited-hd">{{$v.title}}</p>
|
|
|
<div>
|
|
|
<span class="light">{{$v.subtype}}</span>
|
|
|
{{if $v.area}}<span>{{$v.area}}</span>{{end}}
|
|
@@ -431,14 +431,14 @@
|
|
|
<div class="tab-content-list">
|
|
|
<ul>
|
|
|
{{range $i, $v := .T.newArticle_4}}
|
|
|
- <li><a href=" /article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
- <p>{{$v.title}}</p>
|
|
|
+ <li><a data-id="{{$v._id}}" href="/article/indexcontent/{{$v._id}}.html" target="_blank">
|
|
|
+ <p class="visited-hd">{{$v.title}}</p>
|
|
|
<div>
|
|
|
<span class="light">{{$v.subtype}}</span>
|
|
|
{{if $v.area}}<span>{{$v.area}}</span>{{end}}
|
|
|
{{if $v.industry}}<span>{{$v.industry}}</span>{{end}}
|
|
|
{{if $v.budget}} <span>{{$v.budget}}</span>{{end}}
|
|
|
- <strong data-format-time="{{$v.publishtime}}"></strong>
|
|
|
+ <strong data-format-time="{{$v.publishtime}}"></strong>
|
|
|
</div></a></li>
|
|
|
{{end}}
|
|
|
</ul>
|
|
@@ -636,10 +636,8 @@
|
|
|
</div>
|
|
|
{{include "/common/pcbottom.html"}}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</section>
|
|
|
+ <script type="text/javascript" src='{{Msg "seo" "cdn"}}/common-module/collection/js/visited.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script type="text/javascript" src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script type="text/javascript" src='{{Msg "seo" "cdn"}}/js/index_pc.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script src="//cdn-common.jianyu360.com/cdn/lib/countup/2.0.8/dist/countUp.js"></script>
|
|
@@ -717,7 +715,50 @@
|
|
|
<script src="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js"></script>
|
|
|
<script src='{{Msg "seo" "cdn"}}/js/pc-collect-user-info.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script>
|
|
|
+var visitedLinks = {
|
|
|
+ init: function () {
|
|
|
+ this.checkVisited()
|
|
|
+ this.bindEvents()
|
|
|
+ },
|
|
|
+ checkVisited: function () {
|
|
|
+ $('.tab-content-list a').each(function () {
|
|
|
+ var $this = $(this)
|
|
|
+ var id = $this.attr('data-id')
|
|
|
+ var visited = false
|
|
|
+ try {
|
|
|
+ visited = visitedPath.pathVisited(
|
|
|
+ new VisitedPathItem(
|
|
|
+ '/article/content/*.html',
|
|
|
+ 'id=' + id
|
|
|
+ )
|
|
|
+ )
|
|
|
+ } catch (error) {}
|
|
|
+
|
|
|
+ if (visited) {
|
|
|
+ $this.addClass('visited')
|
|
|
+ } else {
|
|
|
+ $this.removeClass('visited')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ bindEvents: function () {
|
|
|
+ $('.tab-content-list').on('click', 'a', function (e) {
|
|
|
+ e.preventDefault()
|
|
|
+ var $this = $(e.currentTarget)
|
|
|
+ var id = $this.attr('data-id')
|
|
|
+ $this.addClass('visited')
|
|
|
+ visitedPath.pathVisiting(
|
|
|
+ new VisitedPathItem(
|
|
|
+ '/article/content/*.html',
|
|
|
+ 'id=' + id
|
|
|
+ )
|
|
|
+ )
|
|
|
+ window.open($this.attr('href'))
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
$(function () {
|
|
|
+ visitedLinks.init()
|
|
|
// 处理时间格式化
|
|
|
$("strong[data-format-time]").each(function () {
|
|
|
var timeStr = $(this).attr('data-format-time')
|