index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <script setup lang="ts">
  2. import Introduce from "./components/introduce/index.vue";
  3. const router = useRouter();
  4. const moduleIndex = ref(0);
  5. watch(moduleIndex, (newValue: number) => {
  6. // console.log(moduleIndex.value);
  7. if (newValue === 3) {
  8. router.push({
  9. path: "/product",
  10. });
  11. }
  12. });
  13. onMounted(() => {
  14. moduleIndex.value = 0;
  15. });
  16. </script>
  17. <template>
  18. <div class="all">
  19. <!-- 功能栏 -->
  20. <div class="option-box">
  21. <!-- 展馆介绍 -->
  22. <div
  23. class="box-item"
  24. @click="
  25. () => {
  26. moduleIndex = 1;
  27. }
  28. "
  29. >
  30. <div class="box-top"></div>
  31. <div class="box-botoom">展馆介绍</div>
  32. </div>
  33. <div class="box-line"></div>
  34. <!-- 星星 -->
  35. <div class="box-line"></div>
  36. <div
  37. class="box-item"
  38. @click="
  39. () => {
  40. moduleIndex = 2;
  41. }
  42. "
  43. >
  44. <div class="box-top"></div>
  45. <div class="box-botoom">线上展厅</div>
  46. </div>
  47. <div class="box-line"></div>
  48. <!-- 星星 -->
  49. <div class="box-line"></div>
  50. <div
  51. class="box-item"
  52. @click="
  53. () => {
  54. moduleIndex = 3;
  55. }
  56. "
  57. >
  58. <div class="box-top"></div>
  59. <div class="box-botoom">文物鉴赏</div>
  60. </div>
  61. </div>
  62. <!-- 场馆介绍 -->
  63. <Introduce
  64. v-show="moduleIndex == 1"
  65. @close="
  66. () => {
  67. moduleIndex = 0;
  68. }
  69. "
  70. />
  71. <!-- -->
  72. </div>
  73. </template>
  74. <style lang="less" scoped>
  75. .all {
  76. width: 100%;
  77. height: 100%;
  78. background: rgba(85, 117, 224, 0.418);
  79. background-size: 100% 100%;
  80. .option-box {
  81. width: 100%;
  82. height: 100px;
  83. display: flex;
  84. justify-content: center;
  85. position: absolute;
  86. bottom: 0;
  87. // background: rgba(114, 17, 17, 0.671);
  88. .box-item {
  89. height: 100%;
  90. cursor: pointer;
  91. .box-top {
  92. width: 68px;
  93. height: 68px;
  94. background: #fff3e1;
  95. border-radius: 20px;
  96. display: flex;
  97. justify-content: center;
  98. align-items: center;
  99. margin-bottom: 5px;
  100. }
  101. .box-botoom {
  102. width: 100%;
  103. text-align: center;
  104. font-family: "AlimamaShuHeiTi-Bold";
  105. font-weight: bold;
  106. font-size: 16px;
  107. color: #fff3e1;
  108. }
  109. }
  110. .box-line {
  111. width: 70px;
  112. height: 2px;
  113. background: #fff3e1;
  114. margin-top: 34px;
  115. margin-left: 5px;
  116. margin-right: 5px;
  117. }
  118. }
  119. }
  120. </style>