From a31c8c9d7df2883b38871819239ec914c6e5ae0c Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期一, 23 十二月 2024 11:55:58 +0800
Subject: [PATCH] 民航服务基本技能视频资源插入

---
 src/books/aviationBasicSkills/view/components/chapter002.vue |  262 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 243 insertions(+), 19 deletions(-)

diff --git a/src/books/aviationBasicSkills/view/components/chapter002.vue b/src/books/aviationBasicSkills/view/components/chapter002.vue
index 0223c27..4f0e710 100644
--- a/src/books/aviationBasicSkills/view/components/chapter002.vue
+++ b/src/books/aviationBasicSkills/view/components/chapter002.vue
@@ -2,7 +2,7 @@
     <div class="chapter" num="3">
         <!-- 绗簩鍗曞厓灏侀潰 -->
         <div class="page-box" page="33">
-            <div v-if="showPageList.indexOf(32) > -1">
+            <div v-if="showPageList.indexOf(33) > -1">
                 <div style="background-color: #F99F1D; padding-top: 50px">
                     <h1 class="fl jc-c" id="a007"><img class="" style="width: 80%; " alt=""
                             src="../../assets/images/xm2.jpg" /></h1>
@@ -21,6 +21,22 @@
                         <p class="bj-1-zt">2.鍏峰楂樼灮杩滅灘鐨勯暱杩滃彂灞曠溂鍏夊拰澶у眬鎰忚瘑銆�</p>
                         <p class="bj-1-zt">3.鍏绘垚姹傜湡鍔″疄銆佸紑鎷撳垱鏂扮殑鑱屼笟绮剧銆�</p>
                         <p><br></p>
+                        <div class="video-box-cover">
+                            <p class="center text">
+                                <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>瑙嗛锛氶」鐩簩 瀵煎叆_1 </span>
+                                <el-tooltip class="item" effect="dark"
+                                    :content="chapterData.isCollectVideo ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
+                                    <img :src="collectResourceList.findIndex(item => item.id == '0ad0533dd0c9b76fa61dfc15448c3701') > -1 ? collectCheck : collectImg"
+                                        alt="" class="collect-btn" @click="handleCollect('video-01')" />
+                                </el-tooltip>
+                            </p>
+                        </div>
                         <p><br></p>
                     </div>
                 </div>
@@ -28,7 +44,7 @@
         </div>
         <!-- 26椤� -->
         <div class="page-box" page="34">
-            <div v-if="showPageList.indexOf(33) > -1">
+            <div v-if="showPageList.indexOf(34) > -1">
                 <ul class="fl al-c pad-t-55 pad-l-60 mb-45">
                     <li class="header-left-Number">026</li>
                     <li class="header-left-text">姘戣埅鏈嶅姟鍩烘湰鎶�鑳斤紙绗� 2 鐗堬級</li>
@@ -55,7 +71,7 @@
         </div>
         <!-- 27椤� -->
         <div class="page-box" page="35">
-            <div v-if="showPageList.indexOf(34) > -1">
+            <div v-if="showPageList.indexOf(35) > -1">
                 <ul class="fl al-c jc-fe mr-70 pad-t-55 mb-45">
                     <img class="headerImg mr-10" src="../../assets/images/headerlogo.png" alt="">
                     <li class="headerText">椤圭洰浜�</li>
@@ -72,6 +88,22 @@
                         绗簩锛岃鏈夋湇鍔¤蹇点�傛湇鍔¤川閲忎笌姘村钩鏄皯鑸紒涓氱殑鈥滅敓瀛樼嚎鈥濓紝姘戣埅鍛樺伐搴旂儹鎯呬负鏃呭鏈嶅姟锛屾�ユ梾瀹㈡墍鎬ワ紝甯梾瀹㈡墍闇�锛岀儹鐖卞姵鍔紝涓嶆�曞悆鑻︼紝涓烘梾瀹㈡彁渚涘共鍑�銆佽垝閫傘�佹剦蹇殑鏃呰鐜銆傛皯鑸憳宸ョ殑鏍囧噯灏辨槸浣胯嚜宸辩殑鏈嶅姟璐ㄩ噺涓庝笘鐣岃埅绌烘湇鍔℃爣鍑嗘帴杞紝鏈嶅姟鐨勬渶楂樿拷姹備笉鏄�滄弧鎰忊�濓紝鑰屾槸鍒涚珛鈥滃搧鐗屸�濓紝浣夸紒涓氳幏寰椻�滃搧鐗屾晥搴斺�濄��
                     </p>
                     <p class="p-odd">绗笁锛岃鏈夋晥鐩婃剰璇嗐�傛病鏈夋晥鐩婄殑浼佷笟鏃犳硶鐢熷瓨銆傛病鏈夌粡娴庡疄鍔涚殑浼佷笟锛屾嬁浠�涔堝簲瀵瑰浗闄呭寲鐨勭珵浜夛紵鎵�浠ワ紝鏁堢泭鎰忚瘑蹇呴』娣卞叆浜哄績锛屾晥鐩婂繀椤绘垚涓烘皯鑸粠涓氫汉鍛樺伐浣滅殑鐩爣銆�</p>
+                    <div class="video-box-left">
+                        <p class="center text">
+                            <video :src="videoPathTwo" 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>瑙嗛锛氶」鐩簩 浠诲姟1 </span>
+                            <el-tooltip class="item" effect="dark"
+                                :content="chapterData.isCollectVideo01 ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
+                                <img :src="collectResourceList.findIndex(item => item.id == '74178b45d436d5adc731024742f169fa') > -1 ? collectCheck : collectImg"
+                                    alt="" class="collect-btn" @click="handleCollect('video-02')" />
+                            </el-tooltip>
+                        </p>
+                    </div>
                     <h4 id="d036">锛堜簩锛夊己鍖栬亴涓氱邯寰�</h4>
                     <p class="p-odd">
                         鑱屼笟绾緥鏄湪鐗瑰畾鐨勮亴涓氭椿鍔ㄨ寖鍥村唴浠庝簨鏌愮鑱屼笟鐨勪汉蹇呴』鍏卞悓閬靛畧鐨勮涓哄噯鍒欍�傚畠鍖呮嫭鍔冲姩绾緥銆佺粍缁囩邯寰嬨�佽储缁忕邯寰嬨�佺兢浼楃邯寰嬨�佷繚瀵嗙邯寰嬨�佸浼犵邯寰嬨�佸浜嬬邯寰嬬瓑鍩烘湰绾緥瑕佹眰锛屼互鍙婂悇琛屽悇涓氱殑鐗规畩绾緥瑕佹眰銆傚叾鐗圭偣鏄叿鏈夋槑纭殑瑙勫畾鎬у拰涓�瀹氱殑寮哄埗鎬с�傛皯鑸憳宸ョ殑鑱屼笟绾緥闆嗕腑浣撶幇鍦ㄣ�婁腑鍗庝汉姘戝叡鍜屽浗姘戠敤鑸┖娉曘�嬬瓑娉曡鍒跺害涓紝瀹冧滑鏄垜鍥芥皯鑸�70澶氬勾鏉ョ粡楠屾暀璁殑缁撴櫠锛屽叿鏈夊緢寮虹殑閽堝鎬у拰瑙勮寖鎬с�傛皯鑸憳宸ュ繀椤讳弗鏍奸伒瀹堬紝涓嶅緱鏈変笣姣噲鎬狅紝鍚﹀垯锛屽氨浼氬嵄鍙婇琛屽畨鍏紝缁欏浗瀹跺拰浜烘皯鐢熷懡璐骇甯︽潵涓ラ噸鍗卞銆�
@@ -443,9 +475,10 @@
                     </table>
                     <p class="left"><span class="bj2">鎷撳睍璁粌鈻�</span></p>
                     <p class="p-odd">
-                        1.宸ヤ綔涓細閬囧埌涓庤嚜韬埄鐩婄浉鍐茬獊鐨勬椂鍊欙紝姘戣埅鍛樺伐搴旇�冭檻鑷繁鐨勮涓烘槸鍚︾鍚堝浗瀹跺拰绀句細鐨勫埄鐩娿��<input v-model="questionData.teskOne.four" class="input-bottom-border w40 fz-14"
-                        @change="setBookQuestion" />銆佺鍚堟皯鑸矖浣嶇殑鑱屼笟閬撳痉銆�<input v-model="questionData.teskOne.five" class="input-bottom-border w40 fz-14"
-                        @change="setBookQuestion" />銆�
+                        1.宸ヤ綔涓細閬囧埌涓庤嚜韬埄鐩婄浉鍐茬獊鐨勬椂鍊欙紝姘戣埅鍛樺伐搴旇�冭檻鑷繁鐨勮涓烘槸鍚︾鍚堝浗瀹跺拰绀句細鐨勫埄鐩娿��<input v-model="questionData.teskOne.four"
+                            class="input-bottom-border w40 fz-14" @change="setBookQuestion" />銆佺鍚堟皯鑸矖浣嶇殑鑱屼笟閬撳痉銆�<input
+                            v-model="questionData.teskOne.five" class="input-bottom-border w40 fz-14"
+                            @change="setBookQuestion" />銆�
                     </p>
                     <p class="p-odd">2.姘戣埅鍛樺伐鑱屼笟閬撳痉鐨勮姹傛湁鍝簺锛�</p>
                     <textarea v-model="questionData.teskOne.six" placeholder="璇疯緭鍏ュ唴瀹�" rows="6"
@@ -511,6 +544,22 @@
                     </p>
                     <h5 id="e006">2.杈冨己鐨勫璇氦娴佽兘鍔�</h5>
                     <p class="p-odd">姘戣埅鏈嶅姟琛屼笟鐨勫悇绉嶅矖浣嶏紝濡傚畨妫�銆佺┖涔樸�佸�兼満銆佺エ鍔$瓑锛岄殢鏃跺彲鑳介亣鍒颁笘鐣屽悇鍥界殑鏃呭锛屾墍浠ワ紝姘戣埅鍛樺伐闇�瑕佸叿澶囪緝寮虹殑澶栬浜ゆ祦鑳藉姏銆�</p>
+                    <div class="video-box-left">
+                        <p class="center text">
+                            <video :src="videoPathThree" 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>瑙嗛锛氶」鐩簩 浠诲姟2 </span>
+                            <el-tooltip class="item" effect="dark"
+                                :content="chapterData.isCollectVideo02 ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
+                                <img :src="collectResourceList.findIndex(item => item.id == '088eaf1382e9ed4b330a1b3fa93f12e4') > -1 ? collectCheck : collectImg"
+                                    alt="" class="collect-btn" @click="handleCollect('video-03')" />
+                            </el-tooltip>
+                        </p>
+                    </div>
                     <h4 id="d052">锛堜笁锛夎绠楁満杩愮敤鑳藉姏</h4>
                     <p class="p-odd">
                         闅忕潃鎴戝浗缁忔祹鐨勯閫熷彂灞曪紝姘戠敤鑸┖杩愯緭涓氬憟鐜拌摤鍕冨彂灞曠殑鎬佸娍銆傝绠楁満鎶�鏈殑搴旂敤鑼冨洿瓒婃潵瓒婂箍锛屾皯鑸緷璧栬绠楁満澶勭悊涓氬姟鐨勭▼搴︿篃瓒婃潵瓒婇珮銆傚悇涓昏鏈哄満閮戒娇鐢ㄦ満鍦虹患鍚堜俊鎭绠楁満绠$悊绯荤粺锛屽疄鐜颁簡鍔炲叕銆佷笟鍔″拰鏈嶅姟鐨勮嚜鍔ㄥ寲锛屽缃戜笂璁㈢エ銆佸�兼満绛夈�傛墍浠ワ紝璁$畻鏈鸿繍鐢ㄨ兘鍔涙槸涓�椤圭浉褰撻噸瑕佺殑鍩烘湰鎶�鑳姐��
@@ -571,7 +620,9 @@
                 </div>
             </div>
         </div>
+
         <!-- 37椤� -->
+
         <div class="page-box" page="45">
             <div v-if="showPageList.indexOf(45) > -1">
                 <ul class="fl al-c jc-fe mr-70 pad-t-55 mb-45">
@@ -964,6 +1015,22 @@
                     <p class="p-even td-0">
                         淇濈鍛樸�佹补鏂欏寲楠屽憳銆佹补鏂欏徃娉靛憳銆侀鏈哄姞娌瑰憳銆佹补鏂欒閲忕粺璁″憳銆佹补鏂欑數姘斾华琛ㄥ憳銆佹补鏂欑壒绉嶈澶囦慨鐞嗗憳宸ョ銆�
                     </p>
+                    <div class="video-box">
+                        <p class="center text">
+                            <video :src="videoPathFour" 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>瑙嗛锛氶」鐩簩 浠诲姟3 </span>
+                            <el-tooltip class="item" effect="dark"
+                                :content="chapterData.isCollectVideo03 ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
+                                <img :src="collectResourceList.findIndex(item => item.id == '1b93521d7ff9abe65a4d6b53e4facc84') > -1 ? collectCheck : collectImg"
+                                    alt="" class="collect-btn" @click="handleCollect('video-04')" />
+                            </el-tooltip>
+                        </p>
+                    </div>
                     <h4 id="d061" class="p-even">锛堜竴锛夐壌瀹氭柟寮�</h4>
                     <p class="p-even">閴村畾鍒嗙悊璁虹煡璇嗗拰鎿嶄綔鎶�鑳借�冩牳锛岄噰鐢ㄩ棴鍗风瑪璇曞舰寮忥紝鐞嗚鐭ヨ瘑鍜屾搷浣滄妧鑳借�冩牳鏃堕棿鍧囦负90鍒嗛挓銆�</p>
                     <h4 id="d062" class="p-even">锛堜簩锛夐壌瀹氭爣鍑�</h4>
@@ -1275,6 +1342,22 @@
                     <p class="p-even">
                         鐒﹁檻鏄埅绌烘湇鍔′汉鍛樺父瑙佺殑鎯呯华鍥版壈锛屼骇鐢熺殑鍘熷洜澶氭簮浜庡伐浣溿�佺敓娲讳笌浜洪檯浜ゅ線鏂归潰鎵�閬彈鍒扮殑鎸姌銆備緥濡傦紝鍙戠敓绾犵悍浜嬩欢锛屼綔涓轰笌鏃呭鐩存帴鎺ヨЕ銆侀潰瀵归潰鏈嶅姟鐨勮埅绌烘湇鍔′汉鍛橈紙鍖呮嫭绌轰腑涔樺姟鍛樺拰鍦伴潰鏈嶅姟浜哄憳锛夛紝灏卞鍦ㄧ煕鐩炬渶鍓嶆部锛屽績鐞嗗帇鍔涚壒鍒ぇ锛屾瀬鏄撳紩鍙戠劍铏戞儏缁�傝繃搴︾殑鎴栨寔涔呯殑鐒﹁檻浼氬奖鍝嶈埅绌烘湇鍔′汉鍛樼殑姝e父蹇冪悊娲诲姩锛屽鑷村績鐞嗙柧鐥咃紝浠庤�屼弗閲嶅奖鍝嶄粬浠殑姝e父鐢熸椿鍜屽伐浣溿��
                     </p>
+                    <div class="video-box">
+                        <p class="center text">
+                            <video :src="videoPathFive" 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>瑙嗛锛氶」鐩簩 浠诲姟4 </span>
+                            <el-tooltip class="item" effect="dark"
+                                :content="chapterData.isCollectVideo04 ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
+                                <img :src="collectResourceList.findIndex(item => item.id == 'a4835abeeb56542fbd5efe47d3310b18') > -1 ? collectCheck : collectImg"
+                                    alt="" class="collect-btn" @click="handleCollect('video-05')" />
+                            </el-tooltip>
+                        </p>
+                    </div>
                 </div>
             </div>
         </div>
@@ -1697,14 +1780,16 @@
                 </ul>
                 <div class="bodystyle">
                     <p class="left p-even"><span class="bj2">鎷撳睍璁粌鈻�</span></p>
-                    <p class="p-even">1.蹇冪悊绱犺川鏄敱蹇冪悊娼滆兘銆�<input v-model="questionData.teskFour.four" class="input-bottom-border fz-14"
-                        @change="setBookQuestion" />銆佸績鐞嗙壒鐐广��<input v-model="questionData.teskFour.five" class="input-bottom-border  fz-14"
-                        @change="setBookQuestion" />銆�<input v-model="questionData.teskFour.six" class="input-bottom-border  fz-14"
-                        @change="setBookQuestion" />缁勬垚鐨勩��</p>
-                    <p class="p-even">2.鍐锋紶鐨勮〃鐜板寘鎷己涔忕Н鏋佺殑璁ょ煡鍔ㄦ満銆�<input v-model="questionData.teskFour.seven" class="input-bottom-border  fz-14"
-                        @change="setBookQuestion" />銆佹儏鎰熸贰婕犮��<input v-model="questionData.teskFour.eight" class="input-bottom-border  fz-14"
-                        @change="setBookQuestion" />銆佹剰蹇楄“閫�銆�<input v-model="questionData.teskFour.nine" class="input-bottom-border  fz-14"
-                        @change="setBookQuestion" />銆�</p>
+                    <p class="p-even">1.蹇冪悊绱犺川鏄敱蹇冪悊娼滆兘銆�<input v-model="questionData.teskFour.four"
+                            class="input-bottom-border fz-14" @change="setBookQuestion" />銆佸績鐞嗙壒鐐广��<input
+                            v-model="questionData.teskFour.five" class="input-bottom-border  fz-14"
+                            @change="setBookQuestion" />銆�<input v-model="questionData.teskFour.six"
+                            class="input-bottom-border  fz-14" @change="setBookQuestion" />缁勬垚鐨勩��</p>
+                    <p class="p-even">2.鍐锋紶鐨勮〃鐜板寘鎷己涔忕Н鏋佺殑璁ょ煡鍔ㄦ満銆�<input v-model="questionData.teskFour.seven"
+                            class="input-bottom-border  fz-14" @change="setBookQuestion" />銆佹儏鎰熸贰婕犮��<input
+                            v-model="questionData.teskFour.eight" class="input-bottom-border  fz-14"
+                            @change="setBookQuestion" />銆佹剰蹇楄“閫�銆�<input v-model="questionData.teskFour.nine"
+                            class="input-bottom-border  fz-14" @change="setBookQuestion" />銆�</p>
                     <p class="left p-even"><span class="bj2">鑷垜璇勪环鈻�</span></p>
                     <textarea v-model="questionData.teskFour.ten" placeholder="璇疯緭鍏ュ唴瀹�" rows="6"
                         class="fz-16 ml-9 block2 textarea-box" @change="setBookQuestion"></textarea>
@@ -1911,6 +1996,38 @@
                         <p>鏍规嵁鏈换鍔℃墍瀛︼紝瀵圭収姘戣埅鍛樺伐韬綋绱犺川鏍囧噯锛屽皬缁勭爺璁ㄥ浣曚繚鎸佸仴搴风殑浣撻瓌銆�</p>
                         <textarea v-model="questionData.teskFive.two" placeholder="璇疯緭鍏ュ唴瀹�" rows="6"
                             class="fz-16 ml-2e  textarea-box" @change="setBookQuestion"></textarea>
+                    </div>
+                    <div class="video-box">
+                        <p class="center text">
+                            <video :src="videoPathSix" 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>瑙嗛锛氶」鐩簩 浠诲姟5 浠板崸璧峰潗 </span>
+                            <el-tooltip class="item" effect="dark"
+                                :content="chapterData.isCollectVideo05 ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
+                                <img :src="collectResourceList.findIndex(item => item.id == '84b6c6467a3be2a41452dcc2b5e6134a') > -1 ? collectCheck : collectImg"
+                                    alt="" class="collect-btn" @click="handleCollect('video-06')" />
+                            </el-tooltip>
+                        </p>
+                    </div>
+                    <div class="video-box">
+                        <p class="center text">
+                            <video :src="videoPathSeven" 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>瑙嗛锛氶」鐩簩 浠诲姟5 浣撳墠灞�</span>
+                            <el-tooltip class="item" effect="dark"
+                                :content="chapterData.isCollectVideo06 ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
+                                <img :src="collectResourceList.findIndex(item => item.id == 'd804cf70e2973630865e75ad0ba89f96') > -1 ? collectCheck : collectImg"
+                                    alt="" class="collect-btn" @click="handleCollect('video-07')" />
+                            </el-tooltip>
+                        </p>
                     </div>
                     <div class="bj4 ml-9">
                         <div class="fl al-c mb-10">
@@ -2132,10 +2249,10 @@
                     <p class="left p-even"><span class="bj2">鎷撳睍璁粌鈻�</span></p>
                     <p class="p-even">璇疯繘琛岃韩浣撳仴搴疯嚜鎴戣瘎浼般��</p>
                     <textarea v-model="questionData.teskFive.three" placeholder="璇疯緭鍏ュ唴瀹�" rows="6"
-                    class="fz-16 textarea-box-left" @change="setBookQuestion"></textarea>
+                        class="fz-16 textarea-box-left" @change="setBookQuestion"></textarea>
                     <p class="left p-even"><span class="bj2">鑷垜璇勪环鈻�</span></p>
                     <textarea v-model="questionData.teskFive.four" placeholder="璇疯緭鍏ュ唴瀹�" rows="6"
-                    class="fz-16 textarea-box-left" @change="setBookQuestion"></textarea>
+                        class="fz-16 textarea-box-left" @change="setBookQuestion"></textarea>
                 </div>
             </div>
         </div>
@@ -2144,6 +2261,8 @@
 
 
 <script>
+import { getResourcePath } from "@/assets/methods/resources";
+import { getCollectResource, setCollectResource } from "@/assets/methods/resources";
 export default {
     name: "chapterTwo",
     props: {
@@ -2153,6 +2272,25 @@
     },
     data() {
         return {
+            collectImg: require("../../assets/images/icon/heart.png"),
+            collectCheck: require("../../assets/images/icon/heart-check.png"),
+            videoPathOne: "",
+            videoPathTwo: "",
+            videoPathThree: "",
+            videoPathFour: "",
+            videoPathFive: "",
+            videoPathSix: "",
+            videoPathSeven: "",
+            collectResourceList: [],
+            chapterData: {
+                isCollectVideo: false,
+                isCollectVideo01: false,
+                isCollectVideo02: false,
+                isCollectVideo03: false,
+                isCollectVideo04: false,
+                isCollectVideo05: false,
+                isCollectVideo06: false,
+            },
             questionData: {
                 teskOne: {
                     one: "",
@@ -2160,8 +2298,8 @@
                     three: "",
                     four: "",
                     five: "",
-                    six:"",
-                    seven:"",
+                    six: "",
+                    seven: "",
                 },
                 teskTwo: {
                     one: "",
@@ -2275,18 +2413,104 @@
             },
         };
     },
-    mounted() {
+    async mounted() {
         const bookQuestion = localStorage.getItem("aviation-book-chapter02");
         if (bookQuestion) {
             this.questionData = JSON.parse(bookQuestion);
         }
+
         const bookTableData = localStorage.getItem("aviation-book-chapter02-tableData");
         if (bookTableData) {
             this.tableData = JSON.parse(bookTableData);
         }
 
+        const choiceQuestion = localStorage.getItem("aviation-book-chapter02-Data");
+        if (choiceQuestion) {
+            this.chapterData = JSON.parse(choiceQuestion);
+        }
+
+        this.getVidoePath();
+        this.collectResourceList = await getCollectResource(this.config.activeBook.bookId)
     },
     methods: {
+        async getVidoePath() {
+            this.videoPathOne = await getResourcePath(
+                "0ad0533dd0c9b76fa61dfc15448c3701"
+            );
+            this.videoPathTwo = await getResourcePath(
+                "74178b45d436d5adc731024742f169fa"
+            );
+            this.videoPathThree = await getResourcePath(
+                "088eaf1382e9ed4b330a1b3fa93f12e4"
+            );
+            this.videoPathFour = await getResourcePath(
+                "1b93521d7ff9abe65a4d6b53e4facc84"
+            );
+            this.videoPathFive = await getResourcePath(
+                "a4835abeeb56542fbd5efe47d3310b18"
+            );
+            this.videoPathSix = await getResourcePath(
+                "84b6c6467a3be2a41452dcc2b5e6134a"
+            );
+            this.videoPathSeven = await getResourcePath(
+                "d804cf70e2973630865e75ad0ba89f96"
+            );
+        },
+        handleCollect(e) {
+            if (e == 'video-01') {
+                this.handleCollectResource("0ad0533dd0c9b76fa61dfc15448c3701", "0ad0533dd0c9b76fa61dfc15448c3701", '', "瑙嗛", "bits", '瑙嗛锛氶」鐩簩 瀵煎叆_1')
+                this.chapterData.isCollectVideo = !this.chapterData.isCollectVideo
+            } else if (e == 'video-02') {
+                this.handleCollectResource("74178b45d436d5adc731024742f169fa", "74178b45d436d5adc731024742f169fa", '', "瑙嗛", "bits", '瑙嗛锛氶」鐩簩 浠诲姟1')
+                this.chapterData.isCollectVideo01 = !this.chapterData.isCollectVideo01
+            } else if (e == 'video-03') {
+                this.handleCollectResource("088eaf1382e9ed4b330a1b3fa93f12e4", "088eaf1382e9ed4b330a1b3fa93f12e4", '', "瑙嗛", "bits", '瑙嗛锛氶」鐩簩 浠诲姟2')
+                this.chapterData.isCollectVideo02 = !this.chapterData.isCollectVideo02
+            } else if (e == 'video-04') {
+                this.handleCollectResource("1b93521d7ff9abe65a4d6b53e4facc84", "1b93521d7ff9abe65a4d6b53e4facc84", '', "瑙嗛", "bits", '瑙嗛锛氶」鐩簩 浠诲姟3')
+                this.chapterData.isCollectVideo03 = !this.chapterData.isCollectVideo03
+            } else if (e == 'video-05') {
+                this.handleCollectResource("a4835abeeb56542fbd5efe47d3310b18", "a4835abeeb56542fbd5efe47d3310b18", '', "瑙嗛", "bits", '瑙嗛锛氶」鐩簩 浠诲姟4')
+                this.chapterData.isCollectVideo04 = !this.chapterData.isCollectVideo04
+            } else if (e == 'video-06') {
+                this.handleCollectResource("84b6c6467a3be2a41452dcc2b5e6134a", "84b6c6467a3be2a41452dcc2b5e6134a", '', "瑙嗛", "bits", '瑙嗛锛氶」鐩簩 浠诲姟5 浠板崸璧峰潗')
+                this.chapterData.isCollectVideo05 = !this.chapterData.isCollectVideo05
+            } else if (e == 'video-07') {
+                this.handleCollectResource("d804cf70e2973630865e75ad0ba89f96", "d804cf70e2973630865e75ad0ba89f96", '', "瑙嗛", "bits", '瑙嗛锛氶」鐩簩 浠诲姟5 浣撳墠灞�')
+                this.chapterData.isCollectVideo06 = !this.chapterData.isCollectVideo06
+            }
+            this.handleChapterData();
+        },
+
+        //璧勬簮鏀惰棌浜嬩欢
+        // resourcePath  鏂囦欢璺緞锛�
+        // resourceType  鏂囦欢绫诲瀷
+        // source        鏂囦欢鏉ユ簮
+        handleCollectResource(id, md5, resourcePath, resourceType, source, resourceName) {
+            let list = this.collectResourceList
+            if (list.findIndex(item => item.id == id) > -1) {
+                list = list.filter(item => item.id != id)
+            } else {
+                list.push({
+                    id,
+                    md5,
+                    resourcePath,
+                    resourceType,
+                    source,
+                    resourceName,
+                })
+            }
+            this.collectResourceList = list
+            setCollectResource(this.config.activeBook.bookId, this.collectResourceList)
+        },
+        handleChapterData() {
+            localStorage.setItem(
+                "aviation-book-chapter02-Data",
+                JSON.stringify(this.chapterData)
+            );
+        },
+        
+
         setBookQuestion() {
             localStorage.setItem(
                 "aviation-book-chapter02",

--
Gitblit v1.9.1