Browse Source

文章作者点击跳转

XMTT 7 years ago
parent
commit
59e9085266

+ 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,.sys_article_viewcount .articleTitle .name{
22
.sys_article_index .table-opt .name,.sys_article_index .author,.sys_article_viewcount .table-opt .icon-line-chart,.sys_article_viewcount .articleTitle .name,.sys_article_viewcount .professorName .author{
23 23
    cursor:pointer;
24 24
}
25 25

+ 1 - 1
html/model/sys/article/index.html

@ -97,7 +97,7 @@
97 97
                <td class="opt-check" ><i class="icon icon-st-check" articleId="{{articleId}}" shareId="{{shareId}}" createTime="{{createTime}}"></i></td>
98 98
                <td>{{pi}}</td>
99 99
                <td class="table-opt" articleId="{{articleId}}" shareId="{{shareId}}" createTime="{{createTime}}"><a class="name">{{articleTitle}}</a></td>
100
                <td>{{professorName}}{{organizationName}}</td>
100
                <td professorId="{{professorId}}" orgId="{{orgId}}"><a class="author">{{professorName}}{{organizationName}}</a></td>
101 101
                <td>{{subject}}</td>
102 102
                <td class="hand-dict" dict="banner" code="{{colNum}}"></td>
103 103
                <td>{{publishTime-showDay}}</td>

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

@ -57,7 +57,7 @@
57 57
                <td class="hand-id" articleId="{{id}}">{{-_index}}</td>
58 58
                <!--<td class="articleTitle">{{articleTitle}}</td>-->
59 59
                <td class="articleTitle"><a class="name">{{articleTitle}}</a></td>
60
                <td class="professorName">{{professorName}}</td>
60
                <td class="professorName"><a class="author">{{professorName}}</a></td>
61 61
                <td class="subject">{{subject}}</td>
62 62
                <td class="colNum">{{colNum}}</td>
63 63
                <td class="publishTime">{{publishTime}}</td>

+ 9 - 0
js/model/sys/article/index.js

@ -41,6 +41,15 @@ spa_define(function () {
41 41
                        var shareId = $(this).parent().attr("shareId");
42 42
                        // window.open('http://www.ekexiu.com/articalShow.html?articleId=' + articleId);
43 43
                        window.open('http://www.ekexiu.com/shtml/a/'+time+'/' + shareId+'.html');
44
                    });
45
                    root.find("a.author").on("click",function () {
46
                        var professorId = $(this).parent().attr("professorId");
47
                        var orgId = $(this).parent().attr("orgId");
48
                        if(orgId) {
49
                            window.open('http://www.ekexiu.com/cmpInforShow.html?orgId='+orgId);
50
                        }else if(professorId){
51
                            window.open('http://www.ekexiu.com/userInforShow.html?professorId='+professorId);
52
                        }
44 53
                    })
45 54
                });
46 55

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

@ -46,7 +46,7 @@ spa_define(function () {
46 46
                                util.get("../ajax/article/base", {id: articleId}, function (data) {
47 47
                                    if (data) {
48 48
                                        $e.parent().find(".articleTitle .name").text(data.articleTitle).attr('shareId',data.shareId).attr('createTime',data.createTime);
49
                                        $e.parent().find(".professorName").text(data.professorName || data.organizationName);
49
                                        $e.parent().find(".professorName .author").text(data.professorName || data.organizationName).attr('professorId',data.professorId).attr('orgId',data.orgId);
50 50
                                        $e.parent().find(".subject").text(data.subject);
51 51
                                        $e.parent().find(".colNum").text(caption("banner", data.colNum));
52 52
                                        $e.parent().find(".publishTime").text(showDay(data.publishTime));
@ -151,6 +151,15 @@ spa_define(function () {
151 151
                    // window.open('http://www.ekexiu.com/articalShow.html?articleId=' + articleId);
152 152
                    window.open('http://www.ekexiu.com/shtml/a/'+time+'/' + shareId+'.html');
153 153
                });
154
                root.on("click",".professorName a.author",function () {
155
                    var professorId = $(this).attr("professorId");
156
                    var orgId = $(this).attr("orgId");
157
                    if(orgId) {
158
                        window.open('http://www.ekexiu.com/cmpInforShow.html?orgId='+orgId);
159
                    }else if(professorId){
160
                        window.open('http://www.ekexiu.com/userInforShow.html?professorId='+professorId);
161
                    }
162
                })
154 163
                var myChart = echarts.init(document.getElementById('total'));
155 164
                var tableData = {data: []},
156 165
                    allData = [];