Nav apraksta

repositorydetail.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $(function() {
  2. var id = helper.request.queryString("id");
  3. Ajax(id);
  4. function Ajax(id) {
  5. $.ajax({
  6. type: "get",
  7. url: huayi.config.callcenter_url + "callcenterapi/api/Knowledge/getsingle",
  8. async: true,
  9. dataType: 'json',
  10. data: {
  11. token: $.cookie("token"),
  12. id: id
  13. },
  14. success: function(data) {
  15. var con = data.data;
  16. if(data.state.toLowerCase() == 'success') {
  17. //alert(con.types[0]);
  18. $('.lb').html(con.typenames[0]); //所属类别
  19. // if (con.types[0]) {
  20. // $('.lb').html(con.types[0]); //所属类别
  21. // } else if (con.types[1]{
  22. // $('.lb').html(con.types[1]); //所属类别
  23. // } else if (con.types[2]{
  24. // $('.lb').html(con.types[2]); //所属类别
  25. // } else if (con.types[3]{
  26. // $('.lb').html(con.types[3]); //所属类别
  27. // }else if (con.types[4]{
  28. // $('.lb').html(con.types[4]); //所属类别
  29. // }else if (con.types[5]{
  30. // $('.lb').html(con.types[5]); //所属类别
  31. // }else if (con.types[6]{
  32. // $('.lb').html(con.types[6]); //所属类别
  33. // }
  34. $('.cjr').html(con.model.createuser); //创建人
  35. $('.time').html(con.model.createtime); //创建日期
  36. $('.content').html(con.model.content); //创建内容
  37. $('.con_title').html(con.model.title); //创建标题
  38. }
  39. }
  40. });
  41. }
  42. })