You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

preface.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. $(function() {
  2. function getGradeName (gradeid) {
  3. let gradename = "";
  4. if (gradeid == 1) {
  5. gradename = "一年级";
  6. } else if (gradeid == 2) {
  7. gradename = "二年级";
  8. } else if (gradeid == 3) {
  9. gradename = "三年级";
  10. } else if (gradeid == 4) {
  11. gradename = "四年级";
  12. } else if (gradeid == 5) {
  13. gradename = "五年级";
  14. } else if (gradeid == 6) {
  15. gradename = "六年级";
  16. } else if (gradeid == 7) {
  17. gradename = "七年级";
  18. } else if (gradeid == 8) {
  19. gradename = "八年级";
  20. } else if (gradeid == 9) {
  21. gradename = "九年级";
  22. } else if (gradeid == 10) {
  23. gradename = "高一";
  24. } else if (gradeid == 11) {
  25. gradename = "高二";
  26. } else if (gradeid == 12) {
  27. gradename = "高三";
  28. }
  29. return gradename;
  30. };
  31. // 考试类型 10期末20期中30月考40周考
  32. var examTypeInfo = [
  33. {
  34. label: "期末",
  35. value: 10
  36. },
  37. {
  38. label: "期中",
  39. value: 20
  40. },
  41. {
  42. label: "月考",
  43. value: 30
  44. },
  45. {
  46. label: "周考",
  47. value: 40
  48. }
  49. ];
  50. function getExamTypeName (type) {
  51. let info = examTypeInfo.filter((v) => v.value === type);
  52. if (info.length > 0) {
  53. return info[0].label;
  54. }
  55. return "";
  56. };
  57. // outerHeight(true) 高度为 height+margin+padding+border
  58. var parameter = $(".preface_html_root").data("page-params");
  59. console.log("preface:parameter", JSON.parse(parameter));
  60. $(".gradename").text(4);
  61. $(".examtype").text(4);
  62. $(".classnum").text(4);
  63. $(".subjectnum").text(4);
  64. $(".allscore").text(4);
  65. });