index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="exercise">
  3. <view class="title">答题</view>
  4. <view class="subTitle">坚持练习掌握优质内容</view>
  5. <view class="firstCard" @click="goExercise('dayQuestion')">
  6. <view class="left">
  7. <i class="t-icon custom-t-icon-rili"></i>
  8. </view>
  9. <view class="right">
  10. <view class="partName">每日答题</view>
  11. <view class="tip">太阳每天都是新的</view>
  12. </view>
  13. </view>
  14. <view class="secondCard" @click="goExercise('specialQuestion')">
  15. <view class="left">
  16. <i class="t-icon custom-t-icon-list"></i>
  17. </view>
  18. <view class="right">
  19. <view class="partName">专项答题</view>
  20. <view class="tip">术业有专攻,道义有精论</view>
  21. </view>
  22. </view>
  23. <!-- 底部导航 -->
  24. <Tabbar :current-page="2" />
  25. </view>
  26. </template>
  27. <script>
  28. import Tabbar from "@/components/Tabbar/index.vue";
  29. export default {
  30. components: {
  31. Tabbar
  32. },
  33. data() {
  34. return {}
  35. },
  36. onLoad() {
  37. },
  38. methods: {
  39. // 跳转到答题页面
  40. goExercise(val) {
  41. uni.navigateTo({
  42. // url: 'test?id=1&name=uniapp'
  43. // pages/exercise/components/dayQuestion/index
  44. url: `/pages/exercise/components/${val}/index`
  45. });
  46. },
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. page {
  52. background-color: #f9f9f9;
  53. height: 100%;
  54. }
  55. .exercise {
  56. padding: 40rpx;
  57. .title {
  58. font-size: 60rpx;
  59. font-weight: 900;
  60. }
  61. .subTitle {
  62. margin: 20rpx 0;
  63. color: #666;
  64. }
  65. .firstCard,
  66. .secondCard {
  67. width: 98%;
  68. height: 300rpx;
  69. margin: 30rpx 0;
  70. border-radius: 20rpx;
  71. display: flex;
  72. align-items: center;
  73. box-shadow: 0 0 20rpx 10rpx rgba(0, 0, 0, 0.1);
  74. .left {
  75. width: 40%;
  76. text-align: center;
  77. .t-icon {
  78. width: 100rpx;
  79. height: 100rpx;
  80. }
  81. .custom-t-icon-rili {
  82. width: 120rpx;
  83. height: 120rpx;
  84. }
  85. }
  86. .right {
  87. flex: 1;
  88. padding: 0 20rpx;
  89. .partName {
  90. font-size: 52rpx;
  91. font-weight: 600;
  92. margin-bottom: 36rpx;
  93. }
  94. .tip {
  95. color: #333;
  96. }
  97. }
  98. }
  99. .firstCard {
  100. margin-top: 60rpx;
  101. background: linear-gradient(to right, #f8a189, #f9ece5);
  102. }
  103. .secondCard {
  104. background: linear-gradient(to right, #96bef3, #e8f2f8);
  105. }
  106. }
  107. </style>