index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <route lang="json5">
  2. {
  3. style: {
  4. navigationStyle: 'custom',
  5. navigationBarTitleText: '',
  6. },
  7. }
  8. </route>
  9. <template>
  10. <view class="w-full min-h-screen bg-bgc flex flex-col items-center">
  11. <view class="font-600 text-[48rpx] text-white flex flex-col justify-center w-690rpx mt-20rpx">
  12. <text class="text-primary">{{ $t('task.Tasks') }}</text>
  13. <text>{{ $t('task.GetRewardsFor') }}</text>
  14. <text>{{ $t('CompletingQuests') }}</text>
  15. </view>
  16. <view
  17. class="w-690rpx h-90rpx p-10rpx box-border bg-cardlight rounded-20rpx flex items-center justify-center mt-70rpx"
  18. >
  19. <view
  20. class="w-325rpx h-70rpx rounded-20rpx flex items-center justify-center text-white text-26rpx font-700"
  21. :class="activeTab === 'one' ? 'tab-bg' : ''"
  22. @click="changeActiveTab('one')"
  23. >
  24. In-game
  25. </view>
  26. <view
  27. class="w-325rpx h-70rpx rounded-20rpx flex items-center justify-center text-white text-26rpx font-700"
  28. :class="activeTab === 'two' ? 'tab-bg' : ''"
  29. @click="changeActiveTab('two')"
  30. >
  31. Partners
  32. </view>
  33. </view>
  34. <view class="w-690rpx flex flex-col items-center mb-120rpx">
  35. <view
  36. v-for="(item, index) in 10"
  37. :key="index"
  38. class="w-full h-full mt-20rpx bg-cardlight rounded-20rpx flex justify-between"
  39. >
  40. <view class="flex-1 flex">
  41. <view class="min-w-120rpx h-120rpx rounded-10rpx flex items-center justify-center">
  42. <image
  43. src="@/static/images/task/task1.png"
  44. class="w-90rpx h-90rpx rounded-10rpx"
  45. mode="scaleToFill"
  46. />
  47. </view>
  48. <view class="flex flex-col justify-center ml-15rpx text-[#fff] flex-1">
  49. <text class="text-[28rpx] font-700">加入频道</text>
  50. <view class="mt-10rpx">
  51. <image
  52. src="@/static/images/trophy/jinbi.png"
  53. class="w-30rpx h-30rpx"
  54. mode="scaleToFill"
  55. />
  56. <text class="fw-400 ml-10rpx text-26rpx">+1111</text>
  57. </view>
  58. </view>
  59. <view class="flex flex-col justify-center mr-20rpx">
  60. <view class="w-160rpx text-center">
  61. <view
  62. class="w-160rpx h-60rpx bg-primary rounded-10rpx flex items-center justify-center"
  63. >
  64. <text class="text-26rpx font-700">check</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <tabbar currentTab="pages/task/index"></tabbar>
  73. </template>
  74. <script setup lang="ts">
  75. import tabbar from '@/components/TabBar/index.vue'
  76. type Tab = 'one' | 'two'
  77. const activeTab = ref<Tab>('one')
  78. // 点击切换个人数据或团队数据
  79. const changeActiveTab = async (tab: Tab) => {
  80. activeTab.value = tab
  81. if (tab === 'one') {
  82. } else if (tab === 'two') {
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .tab-bg {
  88. background: var(--primary-color);
  89. color: var(--text-color);
  90. }
  91. </style>