apps.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view style="padding: 0 32rpx">
  3. <u-class title="专业分流">
  4. <view class="content">
  5. <view v-for="(item,index) in appList" :key="index" class="app-item" @click="onClick(item)">
  6. <image class="icon" :src="item.icon" />
  7. <view class="label">
  8. {{item.label}}
  9. </view>
  10. </view>
  11. </view>
  12. </u-class>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. appList: [{
  20. label: '分流名额',
  21. icon: '/static/index/diversion_quota_icon.png',
  22. url: '/pages/apps/shunt-places/shunt-places'
  23. },
  24. {
  25. label: '本人成绩',
  26. icon: '/static/index/my_grades_icon.png',
  27. url: '/pages/apps/my-grades/my-grades'
  28. },
  29. {
  30. label: '特别申请',
  31. icon: '/static/index/special_icon.png',
  32. url: '/pages/apps/special-application/special-application'
  33. },
  34. {
  35. label: '专业分流',
  36. icon: '/static/index/diversion_icon.png',
  37. url: '/pages/apps/change-major/change-major'
  38. },
  39. {
  40. label: '进度查询',
  41. icon: '/static/index/progress_query_icon.png',
  42. url: '/pages/apps/progress-query/progress-query'
  43. },
  44. // {
  45. // label: 'test',
  46. // icon: '/static/index/progress_query_icon.png',
  47. // url: '/pages/apps/test/test'
  48. // }
  49. ]
  50. }
  51. },
  52. methods: {
  53. onClick(item) {
  54. console.log(item);
  55. item.url && uni.navigateTo({
  56. url: item.url
  57. })
  58. },
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .content {
  64. display: flex;
  65. flex-wrap: wrap;
  66. justify-content: space-between;
  67. flex-direction: row;
  68. .app-item {
  69. display: flex;
  70. align-items: center;
  71. flex-direction: column;
  72. font-size: 29rpx;
  73. background: white;
  74. font-weight: 400;
  75. color: #333333;
  76. cursor: pointer;
  77. padding: 16rpx 0;
  78. &:hover {
  79. opacity: 0.8;
  80. }
  81. .icon {
  82. width: 142rpx;
  83. height: 142rpx;
  84. }
  85. }
  86. }
  87. </style>