cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    [#include "/business/wechat/include/title.html" /]
    [#include "/business/wechat/include/wheader.html" /]
    <script type="text/javascript" src="${common_static}/static/wechat/style/js/project.js"></script>
</head>
 
<body>
<header class="kltit tcenter">
    <label class="dropmenu"></label><a href="javascript:history.go(-1);"><span></span></a>知识详情
     <div class="wlsdrop2">
        [#if RequestParameters.ismanager ?? ]
        <a href="${base}/ewyw/ewKnowledge/ewEditKnowledge.html?id=${kw.id}&start=1"><p class="bianji">编辑</p></a>
        [#else]
            [#if kw.IS_EDITOR == 1]
                [#if kw.AUDIT_STATE == '1']
                <a href="javascript:popupTips('正在审核中,不能编辑');"><p class="bianji">申请编辑</p></a>
                [#else]
                <a href="${base}/ewyw/ewKnowledge/ewEditShKnowledge.html?id=${kw.id}&start=1"><p class="bianji">申请编辑</p></a>
                [/#if]
            [/#if]
        [/#if]
        <a id="qxsc" href="javascript:delFavorite();" [#if kw.favourite?? && kw.favourite == 1 ][#else]style="display:none;"[/#if]><p class="shoucang">取消收藏</p></a>
        <a id="sc" href="javascript:addFavorite();" [#if kw.favourite?? && kw.favourite == 1 ]style="display:none;"[/#if]><p class="shoucang">收藏</p></a>
        <a id="zan" href="javascript:zan();"><p class="ding" [#if kw.zan?? || kw.cai?? ]style="display:none;"[/#if]>顶</p></a>
        <a id="cai" href="javascript:cai();"><p class="cai" [#if kw.zan?? || kw.cai?? ]style="display:none;"[/#if]>踩</p></a>
        [#if RequestParameters.ismanager ?? ]
        <a id="qxzd" href="javascript:toTop(2);" [#if kw.IS_TOP != 1]style="display:none;"[/#if]><p class="zhiding">取消置顶</p></a>
        <a id="zd" href="javascript:toTop(1);" [#if kw.IS_TOP == 1]style="display:none;"[/#if]><p class="zhiding">设为置顶</p></a>
        <a id="qxjh" href="javascript:toEssence(2);" [#if kw.IS_ESSENCE != 1]style="display:none;"[/#if]><p class="jinghua">取消精华</p></a>
        <a id="jh" href="javascript:toEssence(1);" [#if kw.IS_ESSENCE == 1]style="display:none;"[/#if]><p class="jinghua">设为精华</p></a>
        <a id="jy" href="javascript:updstate(1);" [#if kw.STATE != 1]style="display:none;"[/#if]><p class="jinyong">禁用</p></a>
        <a id="qy" href="javascript:updstate(2);" [#if kw.STATE == 1]style="display:none;"[/#if]><p class="qiyong">启用</p></a>
        [/#if]
    </div>
    </header>
<h2 class="kldetailtit">${kw.TITLE}</h2>
<section class="kldetail">
<div class="knowledge-detail">[#if kw.IS_TOP == 1]<span></span>[/#if][#if kw.IS_ESSENCE == 1]<span class="marrow"></span>[/#if][#if kw.favourite?? && kw.favourite == 1]<span class="collect"></span>[/#if]<span [#if kw.zan?? && kw.zan == 1]class="zan"[#else]class="zan2"[/#if]>${kw.ZANNUM}</span><span [#if kw.cai?? && kw.cai == 1]class="cai"[#else]class="cai2"[/#if]>${kw.CAINUM}</span></div>
    <h3><span class="subicon1"></span>关键字</h3>
    <p>
    [#if kw.tag_list?? && kw.tag_list?size>0]
           [#list kw.tag_list as tag]
             <span class="m5">${tag}</span>
           [/#list]
       [/#if]
    </p>
    <h3><span class="subicon2"></span>概述</h3>
    <p class="fontcolor9">${StringUtil.str2Html(kw.SUMMARY)}</p>
    <h3><span class="subicon3"></span>全文</h3>
    <p>${kw.CONTENT}</p>
</section>
<section class="kldetailrela">
    <a href="javascript:void(0)"><h2>关联信息<span></span></h2></a>
    <div class="kltype mb0">
        <a href="${base}/ewyw/ewKnowledge/ewKnowLinkFile.html?knowId=${kw.FILE_ID}"><p>
            <em></em><label>${kw.filesize}篇</label><span class="tpye14"></span>附件
        </p></a>
        <a href="${base}/ewyw/ewKnowledge/ewKnowLinkknow.html?knowId=${kw.ID}"><p>
            <em></em><label>${kw.knowsize}篇</label><span class="tpye16"></span>关联知识
        </p></a>
    </div>
</section>
 
<script type="text/javascript">
var id = '${kw.ID}';
$(function(){
        $.post("${base}/ewyw/ewKnowledge/updateLibraryHits.html",{"libraryId":id},function(data){
        });
});
    
function addFavorite(){
        $.post("${base}/ewyw/ewKnowledge/addMyLibraryFavorite.html",{"library_id":id},function(data){
            if(data=='1'){
               window.location.reload(true);
               popupTips("收藏成功");
            }else if(data=='0'){
                popupTips("该条知识已收藏过,不能重复收藏!");
            }else{
                popupTips("收藏失败");
            }
        });
    
}
 
function delFavorite(){
    $.post("${base}/ewyw/ewKnowledge/delMyLibraryFavorite.html",{"library_id":id},function(data){
        if(data==1){
            popupTips("取消成功");
           window.location.reload(true);
        }else{
            popupTips("取消失败");
        }
    });
}
 
function cai(){
    $.post("${base}/ewyw/ewKnowledge/caiLibrary.html",{"library_id":id},function(data){
       window.location.reload(true);
    });
    
}
function zan(){
    $.post("${base}/ewyw/ewKnowledge/zanLibrary.html",{"library_id":id},function(data){
       window.location.reload(true);
    });
    
}
 
function updstate(state) {
        var temp ;
        if(state == 1){
          temp = "禁用";
        }else{
          temp = "启用";
        }
        if(confirm('确定要'+temp+'吗?')){
            $.post("${base}/ewyw/ewKnowledge/updstate.html",{"id":id,"state":state},function(data,textStatus) {
                  if(data == 1){
                     if(state == 1){
                         window.location.href="${base}/ewyw/ewKnowledge/ewknowjy.html?id="+id;
                     }else{
                         window.location.reload(true);
                     }
                     popupTips(temp+"成功");
                  }else{
                     popupTips(temp+"失败");
                  }
            })
        }
    }
    
    function toTop(state) {
        var temp ;
        if(state == 1){
          temp = "置顶";
        }else{
          temp = "取消置顶";
        }
        if(confirm('确定要'+temp+'吗?')){
            $.post("${base}/ewyw/ewKnowledge/updtop.html",{"id":id,"state":state},function(data,textStatus) {
                  if(data == 1){
                     window.location.reload(true);
                     popupTips(temp+"成功");
                  }else{
                     popupTips(temp+"失败");
                  }
            })
        }
    }
    
    function toEssence(state) {
        var temp ;
        if(state == 1){
          temp = "设为精华";
        }else{
          temp = "取消精华";
        }
        if(confirm('确定要'+temp+'吗?')){
            $.post("${base}/ewyw/ewKnowledge/updEssence.html",{"id":id,"state":state},function(data,textStatus) {
                  if(data == 1){
                     window.location.reload(true);
                     popupTips(temp+"成功");
                  }else{
                     popupTips(temp+"失败");
                  }
            })
        }
    }
</script>
</body>
</html>