index.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. uni.navigateTo({
  34. url: '/pages/mine/answer/challenge'
  35. });
  36. }
  37. }
  38. };
  39. </script>
  40. <style>
  41. .content {
  42. display: flex;
  43. flex-direction: column;
  44. align-items: center;
  45. justify-content: center;
  46. background-image: url('../static/gradient_1080_1920 (1).png');
  47. }
  48. .text-area1 {
  49. margin-top: 20%;
  50. display: flex;
  51. flex-direction: column;
  52. align-items: center;
  53. justify-content: center;
  54. border-radius: 10%;
  55. justify-content: center;
  56. background-color: white;
  57. width: 200px;
  58. height: 180px;
  59. margin-bottom: 50px;
  60. cursor: pointer;
  61. }
  62. .text-area2 {
  63. display: flex;
  64. justify-content: center;
  65. flex-direction: column;
  66. align-items: center;
  67. justify-content: center;
  68. border-radius: 10%;
  69. background-color: white;
  70. width: 200px;
  71. height: 180px;
  72. margin-bottom: 50px;
  73. cursor: pointer;
  74. }
  75. .text-area3 {
  76. display: flex;
  77. justify-content: center;
  78. flex-direction: column;
  79. align-items: center;
  80. justify-content: center;
  81. border-radius: 10%;
  82. background-color: white;
  83. width: 200px;
  84. height: 180px;
  85. margin-bottom: 40px;
  86. cursor: pointer;
  87. }
  88. .title {
  89. font-size: 36rpx;
  90. color: #8f8f94;
  91. }
  92. </style>