Browse Source

修改bug

zhoufan 7 years ago
parent
commit
9a09f9275f
1 changed files with 68 additions and 21 deletions
  1. 68 21
      WebUI/CallCenterWeb.UI/js/index.js

+ 68 - 21
WebUI/CallCenterWeb.UI/js/index.js

@@ -1011,35 +1011,82 @@ function loadArea(obj) {
1011 1011
 }
1012 1012
 //获取知识库
1013 1013
 function loadZSK() {
1014
-    $.getJSON(huayi.config.callcenter_url + 'CallInScreen/GetZSKList', {
1015
-        "keywords": $(".search").val(),
1014
+    //$.getJSON(huayi.config.callcenter_url + 'CallInScreen/GetZSKList', {
1015
+    //    "keywords": $(".search").val(),
1016
+    //    "token": $.cookie("token")
1017
+    //}, function (result) {
1018
+    //    if (result.state.toLowerCase() == "success") {
1019
+    //        $(".ldcr-bottom .detail-con ul").empty();
1020
+    //        $(result.data).each(function (i, n) {
1021
+    //            var key_w = $(".search").val();
1022
+    //            if (key_w) {
1023
+    //                var after_w = n.F_Title.replace(key_w, '<span style="color:red;">' + key_w + '</span>');
1024
+    //                var html = '<li>' +
1025
+    //            '   <div class="zhishi-title clearfix">' +
1026
+    //            '	    <a href="javascript:void(0);" class="titless" >' + after_w + '</a>' +
1027
+    //            '	    <em >' + n.F_CreateOn + '</em>' +
1028
+    //            '   </div>' +
1029
+    //            '   <div class="explancon">' +
1030
+    //            n.F_Content +
1031
+    //            '   </div>' +
1032
+    //            '</li>';
1033
+    //            } else {
1034
+    //                var html = '<li>' +
1035
+    //            '   <div class="zhishi-title clearfix">' +
1036
+    //            '	    <a href="javascript:void(0);" class="titless" >' + n.F_Title + '</a>' +
1037
+    //            '	    <em >' + n.F_CreateOn + '</em>' +
1038
+    //            '   </div>' +
1039
+    //            '   <div class="explancon">' +
1040
+    //            n.F_Content +
1041
+    //            '   </div>' +
1042
+    //            '</li>';
1043
+    //            }
1044
+
1045
+
1046
+    //            $(html).appendTo($(".ldcr-bottom .detail-con ul")).find(".zhishi-title").click(function (event) {
1047
+    //                event.stopPropagation();
1048
+    //                if ($(this).hasClass("active")) {
1049
+    //                    $(this).removeClass("active")
1050
+    //                } else {
1051
+    //                    $(".zhishi-title").removeClass("active");
1052
+    //                    $(this).addClass("active");
1053
+    //                }
1054
+    //            })
1055
+    //        })
1056
+    //    }
1057
+
1058
+    //})
1059
+
1060
+    $.getJSON(huayi.config.callcenter_url + 'Repository/GetList', {
1061
+        "key": $(".search").val(),
1016 1062
         "token": $.cookie("token")
1017 1063
     }, function (result) {
1018 1064
         if (result.state.toLowerCase() == "success") {
1019 1065
             $(".ldcr-bottom .detail-con ul").empty();
1020
-            $(result.data).each(function (i, n) {
1066
+            $(result.rows).each(function (i, n) {
1021 1067
                 var key_w = $(".search").val();
1068
+                var html = '';
1022 1069
                 if (key_w) {
1023 1070
                     var after_w = n.F_Title.replace(key_w, '<span style="color:red;">' + key_w + '</span>');
1024
-                    var html = '<li>' +
1025
-                '   <div class="zhishi-title clearfix">' +
1026
-                '	    <a href="javascript:void(0);" class="titless" >' + after_w + '</a>' +
1027
-                '	    <em >' + n.F_CreateOn + '</em>' +
1028
-                '   </div>' +
1029
-                '   <div class="explancon">' +
1030
-                n.F_Content +
1031
-                '   </div>' +
1032
-                '</li>';
1071
+                    html = '<li>' +
1072
+                        '   <div class="zhishi-title clearfix">' +
1073
+                        '	    <a href="javascript:void(0);" class="titless" >' + after_w + '</a>' +
1074
+                        '	    <em >' + n.F_CreateTime + '</em>' +
1075
+                        '   </div>' +
1076
+                        '   <div class="explancon">' +
1077
+                        n.F_BaseOn +
1078
+                        '   </div>' +
1079
+                        '</li>';
1033 1080
                 } else {
1034
-                    var html = '<li>' +
1035
-                '   <div class="zhishi-title clearfix">' +
1036
-                '	    <a href="javascript:void(0);" class="titless" >' + n.F_Title + '</a>' +
1037
-                '	    <em >' + n.F_CreateOn + '</em>' +
1038
-                '   </div>' +
1039
-                '   <div class="explancon">' +
1040
-                n.F_Content +
1041
-                '   </div>' +
1042
-                '</li>';
1081
+                    html = '<li>' +
1082
+                        '   <div class="zhishi-title clearfix">' +
1083
+                        '	    <a href="javascript:void(0);" class="titless" >' + n.F_Title + '</a>' +
1084
+                        '	    <em >' + n.F_CreateTime + '</em>' +
1085
+                        '   </div>' +
1086
+                        '   <div class="explancon">' +
1087
+                        n.F_BaseOn +
1088
+                        '   </div>' +
1089
+                        '</li>';
1043 1090
                 }
1044 1091
 
1045 1092