index.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view>
  3. <view @click="goBack">{{gradeTerm.text}}</view>
  4. <view>
  5. <view v-for="item in data.list" :key="item.index" @click="listClick"> {{item.index}} {{item.label}} </view>
  6. </view>
  7. <view>
  8. <uni-button @click="handleCheckCatalogue">go catalogue</uni-button>
  9. <navigator :url="`/pages/study/catalogue?gradeId=1&termId=1&text=一年级上册`" hover-class="navigator-hover">
  10. <button type="default">学习计划</button>
  11. </navigator>
  12. <navigator url="navigate/navigate?title=navigate" hover-class="navigator-hover">
  13. <button type="default">成长</button>
  14. </navigator>
  15. <navigator url="navigate/navigate?title=navigate" hover-class="navigator-hover">
  16. <button type="default">伙伴</button>
  17. </navigator>
  18. <navigator url="navigate/navigate?title=navigate" hover-class="navigator-hover">
  19. <button type="default">我的</button>
  20. </navigator>
  21. </view>
  22. <!-- 蛋 -->
  23. <view class="ezy-popup" >蛋</view>
  24. <catalogue ref="catalogueRef" @change-zhang="handleChangeZhang"></catalogue>
  25. </view>
  26. </template>
  27. <script setup>
  28. import {
  29. reactive,ref,onMounted
  30. } from "vue";
  31. import { onLoad,onReady } from '@dcloudio/uni-app';
  32. import catalogue from "@/components/catalogue/catalogue.vue";
  33. const catalogueRef = ref(null);
  34. const gradeTerm = ref('')
  35. onLoad((options) => {
  36. gradeTerm.value = options;
  37. })
  38. const data = reactive({
  39. list: [{
  40. label: '长度中的隐含条件问题',
  41. id: 1,
  42. },
  43. {
  44. label: '解决重叠问题',
  45. id: 2,
  46. },
  47. {
  48. label: '列表法解决方案问题',
  49. id: 3,
  50. },
  51. {
  52. label: '真题测试',
  53. id: 4,
  54. },
  55. ]
  56. })
  57. function handleChangeZhang(data) {
  58. console.log('章:', data);
  59. }
  60. function listClick(data) {
  61. uni.navigateTo({
  62. url:'/pages/study/lookShipin'
  63. })
  64. }
  65. function handleCheckCatalogue() {
  66. catalogueRef.value.showPopup();
  67. }
  68. function goBack() {
  69. uni.navigateBack()
  70. }
  71. </script>
  72. <style>
  73. </style>