hotList.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <div class="hotList">
  3. <div class="title">
  4. <div class="titleLL">热点列表</div>
  5. <div class="titleRR" @click="$emit('close')">
  6. <img src="../../../assets/img/close.png" alt="" />
  7. </div>
  8. </div>
  9. <div class="main">
  10. <div class="txtNone" v-if="data.length === 0">暂无热点</div>
  11. <div class="txt" v-else>
  12. <span
  13. :class="{ active: hotInd === index }"
  14. @click="openHot(item, index)"
  15. v-for="(item, index) in data"
  16. :key="index"
  17. >{{ item.info.title ? item.info.title : "热点" }}</span
  18. >
  19. </div>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. components: {},
  26. data() {
  27. return {
  28. data: [],
  29. hotInd: null,
  30. };
  31. },
  32. computed: {},
  33. watch: {},
  34. methods: {
  35. openHot(e, index) {
  36. // 停止自动导览
  37. window.player.director.stopTour();
  38. setTimeout(() => {
  39. e && e.examine(window.player, true);
  40. this.hotInd = index;
  41. }, 200);
  42. },
  43. },
  44. created() {
  45. this.data = window.myHotList || [];
  46. },
  47. mounted() {},
  48. beforeCreate() {}, //生命周期 - 创建之前
  49. beforeMount() {}, //生命周期 - 挂载之前
  50. beforeUpdate() {}, //生命周期 - 更新之前
  51. updated() {}, //生命周期 - 更新之后
  52. beforeDestroy() {}, //生命周期 - 销毁之前
  53. destroyed() {}, //生命周期 - 销毁完成
  54. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  55. };
  56. </script>
  57. <style lang='less' scoped>
  58. .hotList {
  59. position: absolute;
  60. width: 940px;
  61. height: 640px;
  62. top: 50%;
  63. left: 50%;
  64. transform: translate(-50%, -50%);
  65. background-image: url("../../../assets/img/open/bg-list.png");
  66. background-size: 100% 100%;
  67. padding: 60px 80px;
  68. .title {
  69. height: 60px;
  70. display: flex;
  71. align-items: center;
  72. justify-content: space-between;
  73. .titleLL {
  74. font-size: 24px;
  75. color: #d6b970;
  76. }
  77. .titleRR {
  78. cursor: pointer;
  79. }
  80. }
  81. .main {
  82. margin-top: 20px;
  83. width: calc(100% - 14px);
  84. height: calc(100% - 100px);
  85. overflow-y: auto;
  86. .txtNone {
  87. height: 100%;
  88. color: #d6b970;
  89. font-size: 20px;
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. }
  94. .txt {
  95. width: calc(100% - 10px);
  96. color: #fff;
  97. font-size: 16px;
  98. & > span {
  99. border-top: 1px solid #f0e2c0;
  100. padding: 15px 0;
  101. cursor: pointer;
  102. display: block;
  103. width: 100%;
  104. &:last-child {
  105. margin-bottom: 60px;
  106. border-bottom: 1px solid #f0e2c0;
  107. }
  108. &:hover {
  109. color: #d6b970;
  110. }
  111. }
  112. .active {
  113. color: #d6b970;
  114. }
  115. }
  116. &::-webkit-scrollbar-thumb {
  117. outline: 2px solid #d6b970;
  118. }
  119. &::-webkit-scrollbar {
  120. width: 2px;
  121. }
  122. }
  123. }
  124. @media screen and (max-width: 1000px) {
  125. .hotList {
  126. width: 94%;
  127. height: 90%;
  128. padding: 30px 10px 30px 30px;
  129. .title {
  130. .titleLL {
  131. font-size: 18px;
  132. }
  133. .titleRR {
  134. position: absolute;
  135. right: -5px;
  136. top: 5px;
  137. }
  138. }
  139. .main {
  140. margin-top: 10px;
  141. .txt {
  142. font-size: 14px;
  143. & > span {
  144. &:hover {
  145. color: #fff;
  146. }
  147. }
  148. .active {
  149. color: #d6b970;
  150. }
  151. }
  152. }
  153. }
  154. }
  155. </style>