index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="content">
  3. <!-- <image class="logo" src="@/static/logo.png"></image> -->
  4. <view class="text-area1" @tap="onArea1Click">
  5. <image style="width: 50%; height: 50%;" src="../static/签到.png"></image>
  6. <text style="color: #ed696f;font-size: 30px">每日签到</text>
  7. </view>
  8. <view class="text-area2" @tap="onArea2Click">
  9. <image style="width: 50%; height: 50%;" src="../static/线上答题2.png"></image>
  10. <text style="color: #ed696f;font-size: 30px">每日答题</text>
  11. </view>
  12. <view class="text-area3" @tap="onArea3Click">
  13. <image style="width: 50%; height: 50%;" src="../static/main_100.png"></image>
  14. <text style="color: #ed696f;font-size: 30px">百分挑战</text>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. methods: {
  21. onArea1Click() {
  22. // 假设跳转到签到页面
  23. console.log("zhehsi 1")
  24. },
  25. onArea2Click() {
  26. // 假设跳转到答题页面
  27. uni.navigateTo({
  28. url: '/pages/mine/answer/dailyanswer'
  29. });
  30. },
  31. onArea3Click() {
  32. // 假设跳转到百分挑战页面
  33. console.log("zheshi 3")
  34. }
  35. }
  36. };
  37. </script>
  38. <style>
  39. .content {
  40. display: flex;
  41. flex-direction: column;
  42. align-items: center;
  43. justify-content: center;
  44. background-image: url('../static/gradient_1080_1920 (1).png');
  45. }
  46. .text-area1 {
  47. margin-top: 20%;
  48. display: flex;
  49. flex-direction: column;
  50. align-items: center;
  51. justify-content: center;
  52. border-radius: 10%;
  53. justify-content: center;
  54. background-color: white;
  55. width: 200px;
  56. height: 180px;
  57. margin-bottom: 50px;
  58. cursor: pointer;
  59. }
  60. .text-area2 {
  61. display: flex;
  62. justify-content: center;
  63. flex-direction: column;
  64. align-items: center;
  65. justify-content: center;
  66. border-radius: 10%;
  67. background-color: white;
  68. width: 200px;
  69. height: 180px;
  70. margin-bottom: 50px;
  71. cursor: pointer;
  72. }
  73. .text-area3 {
  74. display: flex;
  75. justify-content: center;
  76. flex-direction: column;
  77. align-items: center;
  78. justify-content: center;
  79. border-radius: 10%;
  80. background-color: white;
  81. width: 200px;
  82. height: 180px;
  83. margin-bottom: 40px;
  84. cursor: pointer;
  85. }
  86. .title {
  87. font-size: 36rpx;
  88. color: #8f8f94;
  89. }
  90. </style>