From d464f452c2ad713bb90227e8edce358be0740a4a Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期二, 31 十二月 2024 17:30:19 +0800 Subject: [PATCH] 民航礼仪视频插入 --- src/books/aviationEtiquette/view/components/chapter005.vue | 93 +++++++++++++--------------------------------- 1 files changed, 26 insertions(+), 67 deletions(-) diff --git a/src/books/aviationEtiquette/view/components/chapter005.vue b/src/books/aviationEtiquette/view/components/chapter005.vue index a3bcc4c..0c77498 100644 --- a/src/books/aviationEtiquette/view/components/chapter005.vue +++ b/src/books/aviationEtiquette/view/components/chapter005.vue @@ -380,6 +380,25 @@ <p class="fz-15"> 鏌愰珮鏍℃瘡骞翠妇琛屼簲鍥涚ぜ浠椂瑁呯锛屼互鑸┖鑱屼笟绀间华鍜屾妧鑳藉睍绀轰负涓伙紝璁╂瘡涓�鍚嶅鐢熷弬涓庤繘鏉ュ苟鎴愪负涓昏锛屽鏍囧浗闄呰禌浜嬬殑楂樿鏍笺�侀珮姘村噯锛屽叏鏂逛綅灞曠ず瀛︾敓鐨勮亴涓氶閲囧拰鏃跺皻椋庤矊銆備粠鐝骇鏅強璧涘埌鏈�缁圱鍙板憟鐜帮紝閫氳繃褰㈠舰鑹茶壊鐨勭紪鎺掑拰鏈嶈鑷埗锛屽悓瀛︿滑灞曠幇浜嗛珮搴﹁亴涓氬寲鐨勬皯鑸憳宸ョ殑涓撲笟绱犺川銆� </p> + <div class="video-box"> + <p class="center text td-0"> + <video :src="videoPathOne" webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" + x5-video-orientation="h5" x5-video-player-fullscreen="true" x5-playsinline="" controls + controlslist="nodownload" class="w100 video" style="border-radius: 10px"></video> + </p> + <p class="center videoname"> + <span>瑙嗛锛氱ぜ浠椂瑁呯</span> + <el-tooltip class="item" effect="dark" :content="chapterData.isCollectVideo ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌' + " placement="top-start"> + <img :src="collectResourceList.findIndex( + (item) => item.id == 'd3ac730a06dcc8381de684ace3263a63' + ) > -1 + ? collectCheck + : collectImg + " alt="" class="collect-btn" @click="handleCollect('video-01')" /> + </el-tooltip> + </p> + </div> </div> <div class="bk2"> <div class="zysx"> @@ -931,25 +950,8 @@ nine: "", }, }, - chapter004: { - videoMd5: [ - { - isCollectVideo: false, - handleMd5: "", - md5: "7454A10BD25ED828FF31D0702DA63D55", - name: "浠�涔堟槸蹇冪悊鍋ュ悍", - }, - { - isCollectVideo: false, - handleMd5: "", - md5: "E4AC28F178D660E96355C17E6F283E66", - name: "蹇冪悊鍋ュ悍鐨�10椤规爣鍑�", - }, - ], - }, chapterData: { isCollectVideo: false, - isCollectVideo01: false, }, }; }, @@ -962,18 +964,12 @@ } const choiceQuestion = localStorage.getItem( - "civilAviatyonSevervices-book-chapter04-Data" + "aviationEtiquette-book-chapter04-Data" ); if (choiceQuestion) { this.chapterData = JSON.parse(choiceQuestion); } - const videoData = localStorage.getItem( - "civilAviatyonSevervices-book-chapter004" - ); - if (videoData) { - this.chapter004 = JSON.parse(videoData); - } this.getVidoePath(); this.collectResourceList = await getCollectResource( this.config.activeBook.bookId @@ -982,17 +978,8 @@ methods: { async getVidoePath() { this.videoPathOne = await getResourcePath( - "f230fd8fd7952a4ad4dd05d94df7e797" + "d3ac730a06dcc8381de684ace3263a63" ); - this.videoPathTwo = await getResourcePath( - "700cfdb8b85b372045b1e97e3356ae3a" - ); - for (let index = 0; index < this.chapter004.videoMd5.length; index++) { - const item = this.chapter004.videoMd5[index]; - if (item.md5 && !item.md5.includes("https:")) { - item.handleMd5 = await getResourcePath(item.md5); - } - } }, setBookQuestion() { @@ -1004,17 +991,10 @@ handleChapterData() { localStorage.setItem( - "civilAviatyonSevervices-book-chapter04-Data", + "aviationEtiquette-book-chapter04-Data", JSON.stringify(this.chapterData) ); }, - handlechapter004() { - localStorage.setItem( - "civilAviatyonSevervices-book-chapter004", - JSON.stringify(this.chapter004) - ); - }, - handleFocus(id) { this.isFocused = id; // 褰搕extarea鑱氱劍鏃讹紝璁剧疆涓簍rue }, @@ -1023,38 +1003,17 @@ }, handleCollect(e) { - if (e.md5) { + if (e == "video-01") { this.handleCollectResource( - e.md5, - e.md5, + "d3ac730a06dcc8381de684ace3263a63", + "d3ac730a06dcc8381de684ace3263a63", "", "瑙嗛", "bits", - "寰灏忚鍫傦細" + e.name - ); - e.isCollectVideo = !e.isCollectVideo; - } else if (e == "video-01") { - this.handleCollectResource( - "f230fd8fd7952a4ad4dd05d94df7e797", - "f230fd8fd7952a4ad4dd05d94df7e797", - "", - "瑙嗛", - "bits", - "瑙嗛锛氬績鐞嗗鐨勬祦娲�" + "瑙嗛锛氱ぜ浠椂瑁呯" ); this.chapterData.isCollectVideo = !this.chapterData.isCollectVideo; - } else if (e == "video-02") { - this.handleCollectResource( - "700cfdb8b85b372045b1e97e3356ae3a", - "700cfdb8b85b372045b1e97e3356ae3a", - "", - "瑙嗛", - "bits", - "瑙嗛锛氬績鐞嗗鐨勭爺绌跺唴瀹�" - ); - this.chapterData.isCollectVideo01 = !this.chapterData.isCollectVideo01; } - this.handlechapter004(); this.handleChapterData(); }, //璧勬簮鏀惰棌浜嬩欢 -- Gitblit v1.9.1