fdkk.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <div class="ifrcon">
  3. <iframe
  4. allowfullscreen="true"
  5. ref="iframe"
  6. :key="selected.id"
  7. :src="`https://airshow.4dkankan.com/spc.html?m=${selected.id}`"
  8. frameborder="0"
  9. @click="handleifrclk"
  10. ></iframe>
  11. <mbui :isShow="isShowM" @close="isShowM =false">
  12. <div class="img_ul" slot="imgList">
  13. <ul v-if="selectExh.scenes">
  14. <li
  15. v-for="(item, i) in selectExh.scenes"
  16. @click="selected = item"
  17. :key="i"
  18. :class="{ active: selected.id == item.id }"
  19. >
  20. <div>
  21. <img :src="`https://airshow.4dkankan.com/images/images${item.id}/smallPic.jpg`" v-errorimg="`${fdkk_CDN}/hangzhan/images/images${item.id}/result.png`" alt="" />
  22. <rollName
  23. :offset="20"
  24. :active="selected.id == item.id"
  25. class="pic-name"
  26. :myref="'subw' + item.id"
  27. :name="item.title"
  28. />
  29. </div>
  30. <span class="bar"></span>
  31. </li>
  32. </ul>
  33. </div>
  34. <div class="txt_ul" slot="txtList">
  35. <ul>
  36. <li
  37. v-for="(item, i) in list"
  38. @click="selectExh = item"
  39. :key="i"
  40. :class="{ active: selectExh.id == item.id }"
  41. >
  42. <span>{{ selectExh.id == item.id ? item.title : item.short }}</span>
  43. </li>
  44. </ul>
  45. </div>
  46. <div class="btn_zhankai" slot="btn_zhankai">
  47. <img @click="isShowM=true" :src="require('@/assets/images/menu.png')" alt="">
  48. </div>
  49. <vHeader class="ui_header" slot="header"/>
  50. <vSelect :type="type" slot="select"></vSelect>
  51. </mbui>
  52. </div>
  53. </template>
  54. <script>
  55. import mbui from "./ui";
  56. import vHeader from "./ui/Show.Header.vue";
  57. import vSelect from "./ui/select.vue";
  58. export default {
  59. props:['type'],
  60. components: {
  61. mbui,
  62. vSelect,
  63. vHeader
  64. },
  65. data() {
  66. return {
  67. params: "",
  68. isShowM:true,
  69. selected: '',
  70. selectExh:{},
  71. list:[]
  72. };
  73. },
  74. watch:{
  75. selected:{
  76. deep:true,
  77. handler:function (newVal) {
  78. console.log(newVal);
  79. }
  80. }
  81. },
  82. methods: {
  83. handleifrclk(){
  84. console.log(1111111);
  85. },
  86. getList(){
  87. window.$.ajax({url:`${this.g_CDN}fdkk/data.json`,success:(data)=>{
  88. this.list=data.list
  89. this.selectExh = this.list[0]
  90. this.selected = this.selectExh.scenes[0]
  91. }})
  92. }
  93. },
  94. mounted(){
  95. this.getList()
  96. this.$bus.$on('showM',()=>{
  97. this.isShowM = true
  98. })
  99. }
  100. };
  101. </script>
  102. <style lang="less" scoped>
  103. .ifrcon {
  104. width: 100%;
  105. height: 100%;
  106. background: #fcfcfc;
  107. > iframe {
  108. width: 100%;
  109. height: 100%;
  110. }
  111. .img_ul {
  112. width: 100%;
  113. position: relative;
  114. // &::before,
  115. // &::after {
  116. // background: linear-gradient(
  117. // to right,
  118. // rgba(0, 0, 0, 0.4),
  119. // rgba(0, 0, 0, 0)
  120. // );
  121. // position: absolute;
  122. // content: "";
  123. // width: 80px;
  124. // height: 67px;
  125. // top: 0;
  126. // z-index: 10;
  127. // pointer-events: none;
  128. // }
  129. // &::before {
  130. // left: 0;
  131. // }
  132. // &::after {
  133. // right: 0;
  134. // background: linear-gradient(
  135. // to left,
  136. // rgba(0, 0, 0, 0.4),
  137. // rgba(0, 0, 0, 0)
  138. // );
  139. // }
  140. > ul {
  141. overflow-x: auto;
  142. display: flex;
  143. justify-content: center;
  144. &::-webkit-scrollbar {
  145. display: none;
  146. }
  147. > li {
  148. cursor: pointer;
  149. list-style: none;
  150. display: inline-block;
  151. margin: 0 5px;
  152. position: relative;
  153. padding-bottom: 7px;
  154. > div {
  155. width: 68px;
  156. height: 68px;
  157. overflow: hidden;
  158. position: relative;
  159. border-radius: 8px;
  160. cursor: pointer;
  161. > img {
  162. position: absolute;
  163. top: 50%;
  164. left: 50%;
  165. height: 100%;
  166. transform: translate(-50%, -50%);
  167. }
  168. .iconfont {
  169. position: absolute;
  170. left: 4px;
  171. top: 4px;
  172. z-index: 99;
  173. }
  174. > span {
  175. text-align: center;
  176. display: inline-block;
  177. background: rgba(0, 0, 0, 0.3);
  178. position: absolute;
  179. text-overflow: ellipsis;
  180. overflow: hidden;
  181. white-space: nowrap;
  182. left: 0;
  183. bottom: 0;
  184. width: 100%;
  185. }
  186. }
  187. .bar {
  188. display: none;
  189. }
  190. .pic-name {
  191. background: rgba(0, 0, 0, 0.6);
  192. position: absolute;
  193. left: 0;
  194. bottom: 0;
  195. text-align: center;
  196. /deep/ span {
  197. word-break: keep-all;
  198. white-space: nowrap;
  199. font-size: 12px;
  200. }
  201. }
  202. &.active {
  203. .bar {
  204. display: inline-block;
  205. position: absolute;
  206. bottom: 0px;
  207. width: 80%;
  208. left: 50%;
  209. transform: translateX(-50%);
  210. height: 2px;
  211. background: @color;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. .txt_ul {
  218. width: 90%;
  219. margin: 18px auto;
  220. border: 2px solid @color;
  221. border-radius: 30px;
  222. padding: 8px 15px 10px;
  223. > ul {
  224. overflow-x: auto;
  225. display: flex;
  226. &::-webkit-scrollbar {
  227. display: none;
  228. }
  229. > li {
  230. border: 1px solid rgba(256, 256, 256, 0.4);
  231. border-radius: 24px;
  232. padding: 6px 9px;
  233. margin: 0 5px;
  234. > span {
  235. font-size: 16px;
  236. display: inline-block;
  237. vertical-align: middle;
  238. line-height: 1.2;
  239. word-break: keep-all;
  240. color: rgba(256, 256, 256, 0.4);
  241. }
  242. &.active {
  243. padding: 6px 12px;
  244. border: 1px solid @color;
  245. > span {
  246. color: #fff;
  247. }
  248. }
  249. }
  250. }
  251. }
  252. .ui_header{
  253. }
  254. .btn_zhankai{
  255. position: fixed;
  256. left: 50%;
  257. bottom: 24px;
  258. transform: translateX(-50%);
  259. >img{
  260. width: 40px;
  261. height: 40px;
  262. }
  263. }
  264. }
  265. </style>