info.uvue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <script lang="ts" setup>
  2. import Back from '@/components/back.uvue'
  3. import user from './components/user.uvue'
  4. import conversion from './components/conversion.uvue'
  5. import setting from './components/set.uvue'
  6. import { ref, computed } from 'vue'
  7. const active = ref<'user' | 'conversion' | 'set'>('user')
  8. </script>
  9. <template>
  10. <cl-page>
  11. <Back />
  12. <img src="https://oss.xiaoxiongcode.com/static/个人中心/bg.png" alt="" class="w-full h-full object-cover">
  13. <view class="content">
  14. <view class="flex flex-row justify-between items-center">
  15. <view
  16. class="flex flex-row items-center justify-center gap-2 w-[120px] bg-[#B1E5FE] rounded-xl px-[10px] py-[5px] text-[#00A9FF]"
  17. :class="{ 'bg-[#00A9FF] !text-white': active === 'user' }" @click="active = 'user'">
  18. <cl-image src="https://oss.xiaoxiongcode.com/static/个人中心/图层 506.png" mode="heightFix" height="20px"
  19. width="auto"></cl-image> 个人信息
  20. </view>
  21. <view
  22. class="flex flex-row items-center justify-center gap-2 w-[120px] bg-[#B1E5FE] rounded-xl px-[10px] py-[5px] text-[#00A9FF]"
  23. :class="{ 'bg-[#00A9FF] !text-white': active === 'conversion' }" @click="active = 'conversion'">
  24. <cl-image src="https://oss.xiaoxiongcode.com/static/个人中心/图层 503.png" mode="heightFix" height="20px"
  25. width="auto"></cl-image> 兑换记录
  26. </view>
  27. <view
  28. class="flex flex-row items-center justify-center gap-2 w-[120px] bg-[#B1E5FE] rounded-xl px-[10px] py-[5px] text-[#00A9FF]"
  29. :class="{ 'bg-[#00A9FF] !text-white': active === 'set' }" @click="active = 'set'">
  30. <cl-image src="https://oss.xiaoxiongcode.com/static/个人中心/图层 504.png" mode="heightFix" height="20px"
  31. width="auto"></cl-image> 设置
  32. </view>
  33. </view>
  34. <view class="w-full h-full">
  35. <user v-if="active === 'user'" />
  36. <conversion v-else-if="active === 'conversion'" />
  37. <setting v-else-if="active === 'set'" />
  38. </view>
  39. </view>
  40. </cl-page>
  41. </template>
  42. <style lang="scss" scoped>
  43. .content {
  44. @apply absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-[#76DAF9] w-[80vw] h-[80vh] max-w-[1000px] max-h-[620px] rounded-[30px] p-[20px] text-white;
  45. }
  46. </style>