index.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <script src="./vue.min.js"></script>
  7. <!-- 引入样式 -->
  8. <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
  9. <!-- 引入组件库 -->
  10. <script src="https://unpkg.com/element-plus"></script>
  11. <title>珠海市自然资源局倾斜建筑展示</title>
  12. <style>
  13. body {
  14. margin: 0;
  15. }
  16. * {
  17. box-sizing: border-box;
  18. margin: 0;
  19. padding: 0;
  20. }
  21. #app {
  22. min-width: 100vw;
  23. height: 100vh;
  24. box-sizing: border-box;
  25. overflow: hidden;
  26. }
  27. #bg-video {
  28. width: 100%;
  29. height: 100%;
  30. object-fit: cover;
  31. position: absolute;
  32. top: 0;
  33. left: 0;
  34. }
  35. #bg-audio {
  36. position: absolute;
  37. top: 0;
  38. left: 0;
  39. }
  40. .welcome-btn {
  41. padding: 15px 40px;
  42. background: url(./img/beginBg.png);
  43. background-size: 100% 100%;
  44. position: absolute;
  45. bottom: 15vh;
  46. left: 50%;
  47. transform: translateX(-50%);
  48. display: flex;
  49. justify-content: center;
  50. align-items: center;
  51. font-size: 1.2em;
  52. letter-spacing: 5px;
  53. cursor: pointer;
  54. color: #cbb18e;
  55. }
  56. .page2-box {
  57. width: 100%;
  58. height: 100%;
  59. position: absolute;
  60. top: 0;
  61. left: 0;
  62. z-index: 2;
  63. }
  64. .page2-box>.info-box {
  65. max-width: 250px;
  66. /* min-width: 12vw; */
  67. position: absolute;
  68. top: 10px;
  69. left: 10px;
  70. }
  71. .info-title-box {
  72. max-width: 250px;
  73. /* min-width: 12vw; */
  74. padding: 10px;
  75. background: url(./img/info-title-bg.png);
  76. background-size: 100% 100%;
  77. display: flex;
  78. justify-content: center;
  79. align-items: center;
  80. color: white;
  81. cursor: pointer;
  82. }
  83. .info-title-box>.text {
  84. display: flex;
  85. justify-content: center;
  86. align-items: center;
  87. color: white;
  88. max-width: 55%;
  89. }
  90. .info-title-box>.text>.scroll-wrap {
  91. max-width: 100%;
  92. display: inline-block;
  93. vertical-align: top;
  94. overflow: hidden;
  95. white-space: nowrap;
  96. }
  97. .info-title-box>.text>.scroll-wrap>.scroll-item {
  98. animation: scroll linear 7s alternate infinite;
  99. float: left;
  100. }
  101. @keyframes scroll {
  102. 0% {
  103. margin-left: 0;
  104. transform: translateX(0);
  105. }
  106. 10% {
  107. margin-left: 0;
  108. transform: translateX(0);
  109. }
  110. 90% {
  111. margin-left: 100%;
  112. transform: translateX(-100%);
  113. }
  114. 100% {
  115. margin-left: 100%;
  116. transform: translateX(-100%);
  117. }
  118. }
  119. .info-title-box>.line {
  120. width: 1px;
  121. height: 20px;
  122. margin: auto 20px;
  123. background: white;
  124. }
  125. .info-title-box>img {
  126. width: 20px;
  127. /* height: 25px; */
  128. }
  129. .info-desc-box {
  130. width: 100%;
  131. max-height: 70vh;
  132. overflow-y: auto;
  133. background: rgba(94, 27, 19, .6431372549019608);
  134. backdrop-filter: blur(10px);
  135. border-radius: 10px 10px;
  136. color: white;
  137. padding: 30px;
  138. text-indent: 2em;
  139. letter-spacing: 2px;
  140. transition: opacity 1s ease;
  141. margin-top: 10px;
  142. opacity: 0;
  143. }
  144. .info-desc-box::-webkit-scrollbar {
  145. width: 8px;
  146. background-color: transparent;
  147. }
  148. .info-desc-box::-webkit-scrollbar-thumb {
  149. border-radius: 10px;
  150. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
  151. background-color: #911212;
  152. }
  153. .info-desc-box::-webkit-scrollbar-track {
  154. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  155. border-radius: 10px;
  156. background-color: transparent;
  157. }
  158. .options-box {
  159. width: 100%;
  160. height: 50px;
  161. display: flex;
  162. justify-content: space-between;
  163. align-items: center;
  164. position: absolute;
  165. bottom: 30px;
  166. left: 0;
  167. padding: 0 20px;
  168. z-index: 2;
  169. }
  170. /* .guide-options-box>img{
  171. opacity: 0.5;
  172. } */
  173. .guide-options-box>.left-box>.option-item>img {
  174. opacity: 0.4;
  175. }
  176. .guide-options-box>.left-box>.option-item>.el-image {
  177. opacity: 0.4;
  178. }
  179. .guide-options-box>.right-box>.option-item>img {
  180. opacity: 0.4;
  181. }
  182. .options-box>.left-box>.option-item {
  183. cursor: pointer;
  184. position: relative;
  185. }
  186. .options-box>.right-box>.option-item {
  187. cursor: pointer;
  188. position: relative;
  189. }
  190. .options-box>.left-box>.option-item>.tip-box {
  191. background: url(./img/tip-bg.png);
  192. background-size: 100% 100%;
  193. pointer-events: none;
  194. transition: all .5s;
  195. opacity: 0;
  196. position: absolute;
  197. left: 50%;
  198. transform: translateX(-50%);
  199. top: -40px;
  200. width: 80px;
  201. height: 37px;
  202. line-height: 30px;
  203. text-align: center;
  204. font-size: 14px;
  205. color: #fff;
  206. }
  207. .options-box>.left-box>.option-item>.guide-tip-box {
  208. position: absolute;
  209. bottom: 55px;
  210. left: 50%;
  211. transform: translateX(-50%);
  212. font-size: 18px;
  213. white-space: nowrap;
  214. z-index: 70;
  215. color: #cbb18e;
  216. display: flex;
  217. flex-direction: column;
  218. align-items: center;
  219. justify-content: center;
  220. }
  221. .options-box>.left-box>.option-item>.guide-tip-box>.play-text {
  222. transform: translateX(25%);
  223. }
  224. .options-box>.left-box>.option-item>.guide-tip-box>.guide-cicle {
  225. width: 20px !important;
  226. height: 20px !important;
  227. }
  228. .options-box>.left-box>.option-item>.guide-tip-box>.guide-line {
  229. width: 5px !important;
  230. }
  231. .options-box>.right-box>.option-item>.guide-tip-box {
  232. position: absolute;
  233. bottom: 55px;
  234. left: 50%;
  235. transform: translateX(-50%);
  236. font-size: 18px;
  237. white-space: nowrap;
  238. z-index: 70;
  239. color: #cbb18e;
  240. display: flex;
  241. flex-direction: column;
  242. align-items: center;
  243. justify-content: center;
  244. }
  245. .options-box>.right-box>.option-item>.guide-tip-box>.play-text {
  246. transform: translateX(25%);
  247. }
  248. .options-box>.right-box>.option-item>.guide-tip-box>.guide-cicle {
  249. width: 20px !important;
  250. height: 20px !important;
  251. }
  252. .options-box>.right-box>.option-item>.guide-tip-box>.guide-line {
  253. width: 5px !important;
  254. }
  255. .options-box>.right-box>.option-item>.tip-box {
  256. background: url(./img/tip-bg.png);
  257. background-size: 100% 100%;
  258. pointer-events: none;
  259. transition: all .5s;
  260. opacity: 0;
  261. position: absolute;
  262. left: 50%;
  263. transform: translateX(-50%);
  264. top: -40px;
  265. width: 80px;
  266. height: 37px;
  267. line-height: 30px;
  268. text-align: center;
  269. font-size: 14px;
  270. color: #fff;
  271. }
  272. .options-box>.right-box>.option-item {
  273. cursor: pointer;
  274. }
  275. .options-box>.left-box>.option-item>img {
  276. width: 45px;
  277. }
  278. .options-box>.left-box>.option-item>.el-image {
  279. width: 45px;
  280. }
  281. .options-box>.right-box>.option-item>img {
  282. width: 45px;
  283. }
  284. .options-box>.left-box {
  285. display: flex;
  286. }
  287. .options-box>.right-box {
  288. display: flex;
  289. }
  290. .el-image-viewer__img {
  291. /* transform: scale(0.8) rotate(0deg) !important; */
  292. height: 75vh;
  293. }
  294. .guide-box {
  295. width: 100%;
  296. height: 100%;
  297. position: absolute;
  298. left: 0;
  299. top: 0;
  300. background: rgba(0, 0, 0, 0.7);
  301. color: #ffe794;
  302. }
  303. .guide-box>.begin-btn {
  304. padding: 15px 40px;
  305. background: url(./img/beginBg.png);
  306. background-size: 100% 100%;
  307. position: absolute;
  308. bottom: 15vh;
  309. left: 50%;
  310. transform: translateX(-50%);
  311. display: flex;
  312. justify-content: center;
  313. align-items: center;
  314. font-size: 1.2em;
  315. letter-spacing: 5px;
  316. cursor: pointer;
  317. color: #cbb18e;
  318. }
  319. .progress-bar {
  320. width: 100%;
  321. height: 20px;
  322. background: #911212;
  323. position: absolute;
  324. left: 0;
  325. bottom: 0;
  326. padding: 10px;
  327. display: flex;
  328. justify-content: center;
  329. align-items: center;
  330. }
  331. .progress-bar>.content-box {
  332. width: 100%;
  333. height: 5px;
  334. background: white;
  335. }
  336. .progress-bar>.content-box>.progress-bar-passed {
  337. background: #d6b970;
  338. height: 5px;
  339. transition: width 0.1s ease;
  340. position: relative;
  341. }
  342. .progress-bar>.content-box>.progress-bar-passed>.cicle-box {
  343. width: 15px;
  344. height: 15px;
  345. border-radius: 50px;
  346. border: 1px #d6b970 solid;
  347. background: white;
  348. position: absolute;
  349. right: 0;
  350. top: 0;
  351. transform: translate(50%, -25%);
  352. cursor: pointer;
  353. }
  354. @media screen and (max-width: 768px) {
  355. .page2-box>.info-box {
  356. max-width: 250px;
  357. /* min-width: 12vw; */
  358. position: absolute;
  359. top: 10px;
  360. left: 50%;
  361. transform: translateX(-50%);
  362. }
  363. .options-box>.left-box {
  364. flex-direction: column;
  365. }
  366. .options-box {
  367. align-items: end;
  368. }
  369. .options-box>.left-box>.option-item {
  370. width: 35px;
  371. }
  372. .options-box>.left-box>.option-item>img {
  373. width: 35px;
  374. }
  375. .options-box>.left-box>.option-item>.el-image {
  376. width: 35px;
  377. margin-top: 10px;
  378. }
  379. .options-box>.right-box>.option-item>img {
  380. width: 35px;
  381. }
  382. .options-box>.left-box>.option-item>.tip-box {
  383. display: none !important;
  384. }
  385. .options-box>.right-box>.option-item>.tip-box {
  386. display: none !important;
  387. }
  388. .el-image-viewer__img {
  389. /* transform: scale(0.8) rotate(0deg) !important; */
  390. height: auto;
  391. }
  392. .guide-box>.begin-btn {
  393. bottom: 50vh;
  394. }
  395. .options-box>.left-box>.option-item>.guide-tip-box {
  396. bottom: 50%;
  397. transform: translateY(50%);
  398. left: 110%;
  399. flex-direction: row-reverse;
  400. }
  401. .options-box>.left-box>.option-item>.guide-tip-box>.guide-line {
  402. height: auto !important;
  403. transform: rotate(90deg);
  404. margin: 0 10px;
  405. }
  406. .options-box>.left-box>.option-item>.guide-tip-box>.guide-line {
  407. width: 10px !important;
  408. }
  409. .options-box>.right-box>.option-item>.guide-tip-box {
  410. bottom: 50%;
  411. transform: translate(-110%, 50%);
  412. left: 0;
  413. flex-direction: row;
  414. }
  415. .options-box>.right-box>.option-item>.guide-tip-box>.guide-line {
  416. height: auto !important;
  417. transform: rotate(90deg);
  418. margin: 0 10px;
  419. }
  420. .options-box>.right-box>.option-item>.guide-tip-box>.guide-line {
  421. width: 10px !important;
  422. }
  423. }
  424. .preview-page{
  425. position: fixed;
  426. text-align: center;
  427. color:#fff;
  428. left: 50%;
  429. bottom:80px;
  430. height:30px;
  431. padding: 0 23px;
  432. border-radius:15px;
  433. line-height:30px;
  434. transform: translateX(-50%);
  435. z-index: 9999;
  436. }
  437. </style>
  438. </head>
  439. <body>
  440. <div id="app">
  441. <!-- 视频背景 -->
  442. <video @timeupdate="timeUpdate" id="bg-video" :src="`${baseUrl}/video/${curModel.name}.mp4`" muted loop
  443. x5-playsinline="true"
  444. playsinline="true"
  445. webkit-playsinline="true"
  446. x-webkit-airplay="true"
  447. x5-video-player-type="h5-page"
  448. preload="metadata"
  449. ></video>
  450. <audio id="bg-audio" :src="`${baseUrl}/audio/${curModel.name}.mp3`" loop></audio>
  451. <!-- 开始探索 -->
  452. <div @click="goCurIndex2" class="welcome-btn" v-if="curPage == 1">开始探索</div>
  453. <!-- 左侧简介 -->
  454. <div class="page2-box" v-else>
  455. <div class="info-box" v-show="!isClearing">
  456. <div class="info-title-box" @click="isShowDescBox = !isShowDescBox">
  457. <div class="text">
  458. <div class="scroll-wrap">
  459. <div class="scroll-item">
  460. {{curModel.name}}
  461. </div>
  462. </div>
  463. </div>
  464. <div class="line"></div><img src="./img/icon-down.png" alt="">
  465. </div>
  466. <div class="info-desc-box" :style="{opacity: isShowDescBox ? 1:0}">{{curModel.desc}}</div>
  467. </div>
  468. <!-- 下面功能按钮去 -->
  469. <div class="options-box " :class="{'guide-options-box': isGuideOpen}">
  470. <div class="left-box">
  471. <div class="option-item" @mousemove="hoverIndex = 1" @mouseleave="hoverIndex = -1"
  472. :style="{opacity: !isClearing ? 1:0,marginRight: '20px'}" @click="videoPlayChange()">
  473. <div class="tip-box" :style="{opacity: hoverIndex == 1 && !isGuideOpen ?1:0}">{{isPlayingVideo ?'暂停':'播放'}}
  474. </div>
  475. <div class="guide-tip-box" v-if="isGuideOpen && guideStep == 1">
  476. <div>播放/暂停</div>
  477. <img class="guide-line" style="height: 8vh" src="./img/guide-line.png" alt="" />
  478. <img class="guide-cicle" src="./img/guide-cicle.png" alt="" />
  479. </div>
  480. <img v-if="!isPlayingVideo" src="./img/icon-manyou-1.png" alt=""><img v-else src="./img/icon-manyou.png"
  481. alt="">
  482. </div>
  483. <div class="option-item" @mousemove="hoverIndex = 2 " @mouseleave="hoverIndex = -1"
  484. :style="{opacity: !isClearing ? 1:0}">
  485. <div class="tip-box" :style="{opacity: hoverIndex == 2 && !isGuideOpen ?1:0}">图片预览</div>
  486. <div class="guide-tip-box" v-if="isGuideOpen && guideStep == 1">
  487. <div>点击查看图片</div>
  488. <img class="guide-line" style="height: 4vh" src="./img/guide-line.png" alt="" />
  489. <img class="guide-cicle" src="./img/guide-cicle.png" alt="" />
  490. </div>
  491. <el-image @wheel="handleWheel" src="./img/icon-images.png" @click="openViewer"
  492. :preview-src-list="imagesList" :initial-zoom-num="0.5" alt="" @switch="onSwitch"
  493. @close="closePreview">
  494. <template #viewer>
  495. <div class="preview-page">{{imgCur}}/{{imagesList.length}}</div>
  496. </template>
  497. </el-image>
  498. </div>
  499. </div>
  500. <div class="right-box">
  501. <div class="option-item" @mousemove="hoverIndex = 3" @mouseleave="hoverIndex = -1" @click="clearingChange()">
  502. <div class="tip-box" :style="{opacity: hoverIndex == 3 && !isGuideOpen?1:0}">{{isClearing ? '取消':'清屏'}}
  503. </div>
  504. <div class="guide-tip-box" v-if="isGuideOpen && guideStep == 2">
  505. <div>点击清屏</div>
  506. <img class="guide-line" style="height: 8vh" src="./img/guide-line.png" alt="" />
  507. <img class="guide-cicle" src="./img/guide-cicle.png" alt="" />
  508. </div>
  509. <img v-if="!isClearing" src="./img/icon-qingping.png" alt=""><img v-else src="./img/icon-qingping-1.png"
  510. alt="">
  511. </div>
  512. </div>
  513. </div>
  514. <!-- 提示指引 -->
  515. <div v-show="isGuideOpen" class="guide-box">
  516. <div class="begin-btn" @click="guideStep == 2 ? (isGuideOpen = false) : (guideStep ++) ">
  517. {{ guideStep != 2 ? "下一步" : "我知道了" }}
  518. </div>
  519. </div>
  520. <!-- 进度条 -->
  521. <div class="progress-bar">
  522. <div class="content-box" id="progress-track">
  523. <!-- <div class="progress-bar-passed" :style="{width: `${curModel.progress}%`}"></div>" ></div> -->
  524. <div class="progress-bar-passed" :style="{width:`${curProgressValue}%`}">
  525. <div class="cicle-box" id="progress-thumb" @mousedown="startDrag" @touchstart="startDrag"></div>
  526. </div>
  527. </div>
  528. </div>
  529. </div>
  530. </div>
  531. <script src="./staticData/data.js"></script>
  532. <script>
  533. var app = Vue.createApp({
  534. data() {
  535. return {
  536. dataAll: dataAll,
  537. baseUrl: './staticData/data',
  538. curModel: null,
  539. curPage: 1,
  540. isShowDescBox: false,
  541. isPlayingVideo: true,
  542. isClearing: false,
  543. imagesList: [],
  544. hoverIndex: 0,
  545. guideStep: 1,
  546. isGuideOpen: true,
  547. curProgressValue: 0, // 当前进度值
  548. dragPosition: '', // 拖动位置(百分比)
  549. isDragging: false, // 是否正在拖动
  550. imgCur: 1,
  551. };
  552. },
  553. mounted() {
  554. const m = this.handleQueryParams().m
  555. const res = this.dataAll.list.filter((item) => {
  556. return item.id == m || item.name == m
  557. })
  558. this.curModel = res[0]
  559. // 初始化大图列表
  560. this.imagesList = res[0].images.map((item) => {
  561. return `${this.baseUrl}/images/${res[0].name}/${item}`
  562. })
  563. if (localStorage.getItem("isGuided") == "true") {
  564. this.isGuideOpen = false;
  565. this.guideStep = null;
  566. } else {
  567. this.isGuideOpen = true;
  568. this.guideStep = 1;
  569. localStorage.setItem("isGuided", "true");
  570. }
  571. document.addEventListener('WeixinJSBridgeReady', function () {
  572. const video = document.getElementById('bg-video');
  573. video.play();
  574. video.pause();
  575. }, false);
  576. },
  577. created() { },
  578. beforeDestroy() {
  579. },
  580. watch: {
  581. },
  582. methods: {
  583. onSwitch(idx) {
  584. this.imgCur = idx + 1
  585. },
  586. closePreview() {
  587. this.imgCur = 1
  588. },
  589. handleQueryParams() {
  590. var queryParams = {};
  591. console.log(window.location.href)
  592. if (!window.location.href.includes('?')) {
  593. alert('请输入参数')
  594. return {}
  595. }
  596. window.location.href.split('?')[1].split('&').forEach(function (item) {
  597. var parts = item.split('=');
  598. queryParams[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);
  599. });
  600. return queryParams;
  601. },
  602. goCurIndex2() {
  603. this.curPage = 2;
  604. const audioDom = document.getElementById('bg-audio');
  605. const videoDom = document.getElementById('bg-video');
  606. if (audioDom && videoDom) {
  607. audioDom.play()
  608. videoDom.play()
  609. }
  610. setTimeout(() => {
  611. this.isShowDescBox = true
  612. setTimeout(() => {
  613. this.isShowDescBox = false
  614. }, 3000)
  615. }, 200)
  616. },
  617. videoPlayChange() {
  618. const videoDom = document.getElementById('bg-video')
  619. const audioDom = document.getElementById('bg-audio')
  620. if (!videoDom.paused && !videoDom.ended && videoDom.readyState > 2) {
  621. videoDom.pause()
  622. audioDom.pause()
  623. this.isPlayingVideo = false
  624. } else {
  625. videoDom.play()
  626. audioDom.play()
  627. this.isPlayingVideo = true
  628. }
  629. },
  630. clearingChange() {
  631. this.isClearing = !this.isClearing
  632. },
  633. openViewer() {
  634. },
  635. handleWheel() {
  636. },
  637. timeUpdate(event) {
  638. this.curProgressValue = event.target.currentTime / event.target.duration * 100
  639. },
  640. getRelativePosition(event) {
  641. // const track = document.querySelector('#progress-track');
  642. // console.log('有没有',track)
  643. const trackRect = document.querySelector('#progress-track').getBoundingClientRect();
  644. let pos;
  645. if (event.type.includes('touch')) {
  646. pos = event.touches[0].clientX - trackRect.left;
  647. } else {
  648. pos = event.clientX - trackRect.left;
  649. }
  650. return Math.min(Math.max(pos / trackRect.width * 100, 0), 100);
  651. },
  652. startDrag(event) {
  653. console.log('被拖动了')
  654. this.isDragging = true
  655. this.curProgressValue = this.getRelativePosition(event);
  656. document.addEventListener('mousemove', this.moveDrag);
  657. document.addEventListener('touchmove', this.moveDrag);
  658. document.addEventListener('mouseup', this.stopDrag);
  659. document.addEventListener('touchend', this.stopDrag);
  660. },
  661. moveDrag(event) {
  662. if (!this.isDragging) return;
  663. this.curProgressValue = this.getRelativePosition(event);
  664. this.updateProgress();
  665. },
  666. stopDrag() {
  667. this.isDragging = false;
  668. document.removeEventListener('mousemove', this.moveDrag);
  669. document.removeEventListener('touchmove', this.moveDrag);
  670. document.removeEventListener('mouseup', this.stopDrag);
  671. document.removeEventListener('touchend', this.stopDrag);
  672. },
  673. updateProgress() {
  674. this.curProgressValue = Math.round(this.curProgressValue)
  675. const videoDom = document.getElementById('bg-video')
  676. // const audioDom = document.getElementById('bg-audio')
  677. // videoDom.pause()
  678. // audioDom.pause()
  679. // this.isPlayingVideo = false
  680. const progressTrack = document.getElementById('progress-track')
  681. if (videoDom && progressTrack) {
  682. let clickProgress = this.curProgressValue / 100
  683. videoDom.currentTime = videoDom.duration * clickProgress;
  684. }
  685. }
  686. },
  687. }).use(ElementPlus).mount('#app');
  688. </script>
  689. </body>
  690. </html>