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.

75 lines
2.6 KiB

1 week ago
  1. "use strict";
  2. const common_vendor = require("../../../common/vendor.js");
  3. if (!Array) {
  4. const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
  5. const _easycom_oneBtn2 = common_vendor.resolveComponent("oneBtn");
  6. (_easycom_up_navbar2 + _easycom_oneBtn2)();
  7. }
  8. const _easycom_up_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
  9. const _easycom_oneBtn = () => "../../../components/oneBtn/oneBtn.js";
  10. if (!Math) {
  11. (_easycom_up_navbar + nodata + _easycom_oneBtn)();
  12. }
  13. const nodata = () => "../../../components/nodata/nodata.js";
  14. const _sfc_main = {
  15. __name: "myStudy",
  16. setup(__props) {
  17. common_vendor.ref(false);
  18. const currentNav = common_vendor.ref(1);
  19. function changeNav(val) {
  20. currentNav.value = val;
  21. }
  22. const statisticsData = common_vendor.ref([
  23. { name: "我的收藏", num: 0 },
  24. { name: "我的错题", num: 1 },
  25. { name: "考试记录", num: 2 },
  26. { name: "预计合格率", num: "100%" }
  27. ]);
  28. const currentChart = common_vendor.ref(1);
  29. function changeChart(num) {
  30. currentChart.value = num;
  31. }
  32. return (_ctx, _cache) => {
  33. return common_vendor.e({
  34. a: common_vendor.p({
  35. leftText: " ",
  36. leftIconColor: "#fff",
  37. safeAreaInsetTop: true,
  38. autoBack: true,
  39. title: "我的学习",
  40. bgColor: "transparent",
  41. titleStyle: {
  42. color: "#fff"
  43. }
  44. }),
  45. b: common_vendor.o(($event) => changeNav(1)),
  46. c: currentNav.value == 1 ? 1 : "",
  47. d: common_vendor.o(($event) => changeNav(2)),
  48. e: currentNav.value == 2 ? 1 : "",
  49. f: common_vendor.f(statisticsData.value, (item, index, i0) => {
  50. return {
  51. a: common_vendor.t(item.num),
  52. b: common_vendor.t(item.name),
  53. c: index
  54. };
  55. }),
  56. g: common_vendor.o(($event) => changeChart(1)),
  57. h: currentChart.value == 1 ? 1 : "",
  58. i: common_vendor.o(($event) => changeChart(2)),
  59. j: currentChart.value == 2 ? 1 : "",
  60. k: currentChart.value == 1
  61. }, currentChart.value == 1 ? {} : {}, {
  62. l: currentChart.value == 2
  63. }, currentChart.value == 2 ? {} : {}, {
  64. m: currentNav.value == 2
  65. }, currentNav.value == 2 ? {
  66. n: common_vendor.o(($event) => _ctx.$goPage("/pages/exercises/beforeExam/beforeExam")),
  67. o: common_vendor.p({
  68. text: "去考试"
  69. })
  70. } : {});
  71. };
  72. }
  73. };
  74. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-140ee42a"]]);
  75. wx.createPage(MiniProgramPage);