Browse Source

文章流量统计页面 点击文章标题跳转文章页面

XMTT 7 years ago
parent
commit
bf77202d8a

+ 1 - 1
css/model/sys/article.css

@ -19,7 +19,7 @@
19 19
    width: 4%;
20 20
}
21 21
22
.sys_article_index .table-opt .name,.sys_article_viewcount .table-opt .icon-line-chart{
22
.sys_article_index .table-opt .name,.sys_article_viewcount .table-opt .icon-line-chart,.sys_article_viewcount .articleTitle .name{
23 23
    cursor:pointer;
24 24
}
25 25

+ 2 - 1
html/model/sys/article/viewcount.html

@ -55,7 +55,8 @@
55 55
                <!--<td class="opt-check" ><i class="icon icon-st-check" articleId="{{id}}"></i></td>-->
56 56
                <td class="table-opt" articleId="{{id}}"><i class="icon icon-line-chart"></i></td>
57 57
                <td class="hand-id" articleId="{{id}}">{{-_index}}</td>
58
                <td class="articleTitle">{{articleTitle}}</td>
58
                <!--<td class="articleTitle">{{articleTitle}}</td>-->
59
                <td class="articleTitle"><a class="name">{{articleTitle}}</a></td>
59 60
                <td class="professorName">{{professorName}}</td>
60 61
                <td class="subject">{{subject}}</td>
61 62
                <td class="colNum">{{colNum}}</td>

+ 9 - 1
js/model/sys/article/viewcount.js

@ -45,7 +45,7 @@ spa_define(function () {
45 45
                            if (articleId) {
46 46
                                util.get("../ajax/article/base", {id: articleId}, function (data) {
47 47
                                    if (data) {
48
                                        $e.parent().find(".articleTitle").text(data.articleTitle);
48
                                        $e.parent().find(".articleTitle .name").text(data.articleTitle).attr('shareId',data.shareId).attr('createTime',data.createTime);
49 49
                                        $e.parent().find(".professorName").text(data.professorName || data.organizationName);
50 50
                                        $e.parent().find(".subject").text(data.subject);
51 51
                                        $e.parent().find(".colNum").text(caption("banner", data.colNum));
@ -144,6 +144,14 @@ spa_define(function () {
144 144
                        }
145 145
                    })
146 146
                });
147
                root.on("click",".articleTitle a.name",function () {
148
                    console.log("xmtt");
149
                    var articleId = $(this).attr("articleId");
150
                    var time = $(this).attr("createTime").substring(0,8);
151
                    var shareId = $(this).attr("shareId");
152
                    // window.open('http://www.ekexiu.com/articalShow.html?articleId=' + articleId);
153
                    window.open('http://www.ekexiu.com/shtml/a/'+time+'/' + shareId+'.html');
154
                });
147 155
                var myChart = echarts.init(document.getElementById('total'));
148 156
                var tableData = {data: []},
149 157
                    allData = [];