problem_feedback.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. if ($('.content').height() > 750) {
  2. $('#iframe-main', parent.document).css('height', $('.content').height() + 20)
  3. } else {
  4. $('#iframe-main', parent.document).css('height', '750px')
  5. }
  6. function addQuestion() {
  7. layer.open({
  8. type: 1,
  9. title: '我要提问',
  10. area: '600px',
  11. content: $('#addQuestion'),
  12. btn: ['发布', '取消'], //可以无限个按钮
  13. yes: function (index, layero) {
  14. alert(1)
  15. }
  16. , btn2: function (index, layero) {
  17. $('#addQuestionForm')[0].reset();
  18. $('#addQuestion').hide();
  19. },
  20. cancel: function (index, layero) {
  21. $('#addQuestionForm')[0].reset();
  22. $('#addQuestion').hide();
  23. }
  24. });
  25. }
  26. // 分页初始化
  27. layui.use('laypage', function () {
  28. var laypage = layui.laypage;
  29. laypage.render({
  30. elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号
  31. , count: 1
  32. , layout: ['prev', 'page', 'next', 'skip']
  33. , jump: function (obj, first) {
  34. $.ajax({
  35. url: '',
  36. type: 'get',
  37. success: function (data) {
  38. console.log(obj.curr)
  39. }
  40. })
  41. if (!first) {
  42. $("#data_table tr:not(:first)").remove();
  43. }
  44. }
  45. });
  46. });