physics.uvue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <script setup lang='ts'>
  2. import { ref } from 'vue'
  3. import { router } from '@/.cool'
  4. import { user } from '@/.cool'
  5. const visible = ref(false)
  6. function handleView(url) {
  7. router.push({ path: url })
  8. }
  9. function handleViewPractice() {
  10. if (user.token == 'Basic ZW5kOmVuZA==') {
  11. uni.showToast({
  12. title: '请先登录',
  13. icon: 'none'
  14. })
  15. router.push({
  16. path: "/pages/user/login",
  17. });
  18. return
  19. }
  20. router.push({ path: '/pages/practice/index' })
  21. }
  22. function openPopup() {
  23. visible.value = true
  24. }
  25. </script>
  26. <template>
  27. <view class="content">
  28. <view @tap="handleView('/pages/catalog/index')" class=" box">
  29. <image class=" w-full h-full rounded-[35px]" mode="heightFix"
  30. src="https://oss.xiaoxiongcode.com/static/home/681.png" lazy-load />
  31. <!-- <image class="absolute top-2 right-2 z-[2] h-[14vh]" mode="heightFix"
  32. src="https://oss.xiaoxiongcode.com/static/home/682.png" /> -->
  33. <!-- <image class="absolute bottom-5 left-5 z-[2] h-[40vh]" mode="heightFix" src="https://oss.xiaoxiongcode.com/static/home/3.gif" />
  34. <image class="absolute bottom-[14vh] right-[12vw] z-[2] h-[20vh]" mode="heightFix" src="https://oss.xiaoxiongcode.com/static/home/play.png" /> -->
  35. </view>
  36. <view class=" box">
  37. <image class=" w-full h-[15vw]" mode="heightFix" src="https://oss.xiaoxiongcode.com/static/home/761.png"
  38. lazy-load @tap="handleViewPractice" />
  39. <image class=" w-full h-[15vw]" mode="heightFix" src="https://oss.xiaoxiongcode.com/static/home/762.png" lazy-load
  40. @tap="handleView('/pages/test/index')" />
  41. </view>
  42. </view>
  43. </template>
  44. <style lang="scss" scoped>
  45. .content {
  46. @apply w-[90vw] mx-auto flex flex-row items-center justify-between;
  47. height: calc(97vh - 85px);
  48. .box {
  49. @apply h-[32vw] relative flex flex-col items-center justify-between;
  50. overflow: visible;
  51. // border-radius: 30px;
  52. // border: 1vh solid #fff;
  53. }
  54. }
  55. </style>