openShow.js 997 B

12345678910111213141516171819202122232425262728293031
  1. function helpShowDetail(number) {
  2. var xml = "";
  3. $.ajax({
  4. async: false,
  5. url: "/a/sys/help/getEnableByNumber?number=" + number,
  6. type:"post",
  7. dataType: "json",
  8. success:function(data){
  9. if(1 === data.enable){
  10. xml += "<a href=\"#\" style='margin-left: 5px;background-color:rgba(255,255,255,0);color: #FFB800;' class=\"layui-icon layui-icon-tips\" onclick=\"helpDetails(\'" + number + "\')\"></a>"
  11. }
  12. }
  13. });
  14. return xml;
  15. }
  16. //打开对话框(查看)
  17. function helpDetails(number){
  18. $.ajax({
  19. url: "/a/sys/help/getByNumber?number=" + number,
  20. type:"post",
  21. dataType: "json",
  22. success:function(data){
  23. if(data.content){
  24. top.layer.open({
  25. title: data.title + "<span style='color: #9e9e9e;font-weight:normal;'> " + number + "</span>",
  26. content: data.content
  27. });
  28. }
  29. }
  30. });
  31. }