From 7563745d85fbab0d69bf1fb69a32109de778bd9b Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期五, 31 五月 2024 14:26:33 +0800
Subject: [PATCH] ppt

---
 src/books/English/view/components/chapter001.vue |  123 +++++++++++++++++++++++++++++++++-------
 1 files changed, 100 insertions(+), 23 deletions(-)

diff --git a/src/books/English/view/components/chapter001.vue b/src/books/English/view/components/chapter001.vue
index 8dc5e7f..eadab25 100644
--- a/src/books/English/view/components/chapter001.vue
+++ b/src/books/English/view/components/chapter001.vue
@@ -830,11 +830,19 @@
                 >
               </p>
             </div>
-            <p>get selected as ...琚�変负鈥︹��</p>
-            <p>(a) variety of ...鍚勭鍚勬牱鐨勨�︹��</p>
-            <p>come across 鍋堕亣锛涚鍒�</p>
-            <p>be curious about ...瀵光�︹�︽劅鍒板ソ濂�</p>
-            <p>along the way 娌块��</p>
+            <ul class="w100 fl fw-wr">
+              <li>
+                <p>get selected as ...琚�変负鈥︹��</p>
+                <p>(a) variety of ...鍚勭鍚勬牱鐨勨�︹��</p>
+                <p>come across 鍋堕亣锛涚鍒�</p>
+              </li>
+              <li>
+                <p>be curious about ...瀵光�︹�︽劅鍒板ソ濂�</p>
+                <p>along the way 娌块��</p>
+              </li>
+            </ul>
+            
+            
             <div class="bj-note">
               <p class="m0"><b class="fz-18">Notes:</b></p>
               <p class="m0">
@@ -1664,7 +1672,7 @@
             </div>
             <div class="resource-primary-border" style="padding: 8px">
               <div class="banshi openImgBox">
-                <div class="swiper-container swiper-ppt">
+                <div class="swiper-container swiper_ppt">
                   <div class="swiper-wrapper">
                     <div class="swiper-slide">
                       <div class="imgBox" style="width: 100%; height: 100%">
@@ -1804,9 +1812,9 @@
                   </div>
                   <div class="swiper-button-next"></div>
                   <div class="swiper-button-prev"></div>
-                   <!-- 鏄剧ず褰撳墠椤靛拰鎬婚〉鏁扮殑鍏冪礌 -->  
-                  <div class="pagination-info"></div> 
                 </div>
+                <!-- 鏄剧ず褰撳墠椤靛拰鎬婚〉鏁扮殑鍏冪礌 -->
+                <div class="pageBox">{{ pageNum }} / {{ total }}</div>
               </div>
             </div>
           </div>
@@ -2298,14 +2306,31 @@
 
 <script>
 import getResourcePath from "@/assets/methods/resources";
-
+import Swiper from "swiper/bundle";
+import "swiper/swiper-bundle.css";
 export default {
   name: "chapter-one",
-  props:{
-    showPageList:{
-      type:Array
+  props: {
+    showPageList: {
+      type: Array,
+    },
+    pageNum:{
+      type:String
+    },
+    total:{
+      type:String
     }
   },
+  // watch: {
+  //   showPageList: {
+  //     handler(newVal, oldVal) {
+  //       if (newVal.indexOf(14) > -1) {
+  //         console.log("椤电爜", newVal, oldVal);
+  //         this.setSwiper();
+  //       }
+  //     },
+  //   },
+  // },
   data() {
     return {
       imgThirteen: require("../../assets/images/grammar.jpg"),
@@ -2316,6 +2341,8 @@
       showAnswerFive: false,
       showImg: false,
       showQuestionAnswer: false,
+      // pageNum: "1",
+      // total: "27",
       questionData: {
         warnUp: {
           one: {
@@ -2367,7 +2394,7 @@
         },
       },
       testData: {
-        check:[],
+        check: [],
         tx: {
           one: "",
           two: "",
@@ -2480,9 +2507,9 @@
       localStorage.setItem("english-testOne", JSON.stringify(this.testData));
     },
     changeTestData() {
-      localStorage.removeItem("english-testOne")
+      localStorage.removeItem("english-testOne");
       this.testData = {
-        check:[],
+        check: [],
         tx: {
           one: "",
           two: "",
@@ -2524,7 +2551,7 @@
           four: "",
           five: "",
         },
-      }
+      };
     },
     setBookQuestion() {
       localStorage.setItem(
@@ -2594,11 +2621,11 @@
       this.dropdownData = dropdownDatas;
     },
     changeDropdown() {
-      localStorage.removeItem("english-dropdown-one")
-      for(let key in this.dropdownData) {
-        const item =  this.dropdownData[key]
-        item.value = ""
-        item.isRight = null
+      localStorage.removeItem("english-dropdown-one");
+      for (let key in this.dropdownData) {
+        const item = this.dropdownData[key];
+        item.value = "";
+        item.isRight = null;
       }
     },
     setDropdownData() {
@@ -2609,7 +2636,49 @@
     },
     saveData() {
       console.log(this.testData);
-    }
+    },
+    setSwiper() {
+      const that = this;
+      const dom = document.querySelector(".swiper_ppt");
+      console.log("dom", dom);
+      new Swiper(dom, {
+        loop: false, // 鏃犵紳
+        autoplay: false,
+        paginationClickable: true,
+        slidesPerView: 1, // 涓�缁勪笁涓�
+        spaceBetween: 30, // 闂撮殧
+        // 濡傛灉闇�瑕佸墠杩涘悗閫�鎸夐挳
+        navigation: {
+          nextEl: (this.container ? this.container : document).querySelector(
+            ".swiper-button-next"
+          ),
+          prevEl: (this.container ? this.container : document).querySelector(
+            ".swiper-button-prev"
+          ),
+        },
+        // 绐楀彛鍙樺寲,閲嶆柊init,閽堝F11鍏ㄥ睆鍜屾斁澶х缉灏�,蹇呴』鍔�
+        observer: true,
+        observeParents: true,
+        on: {
+          slideChange: function (value) {
+            console.log("ppt椤电爜", value);
+            let currentPage = value.activeIndex + 1; // 鑾峰彇褰撳墠椤碉紙浠�1寮�濮嬭鏁帮級
+            let totalPages = value.slides.length; // 鑾峰彇鎬婚〉鏁�
+            // this.changePage(currentPage)
+            that.pageNum = currentPage;
+            this.total = totalPages;
+            console.log(this.pageNum, this.total);
+          },
+          // slideChangeTran sitionStart:function (value) {
+          //   // 姣忓綋婊戝潡鏀瑰彉鏃惰Е鍙戯紝鏇存柊褰撳墠椤靛拰鎬婚〉鏁扮殑鏄剧ず
+          //   let currentPage = value.activeIndex + 1; // 鑾峰彇褰撳墠椤碉紙浠�1寮�濮嬭鏁帮級
+          //   let totalPages = value.slides.length; // 鑾峰彇鎬婚〉鏁�
+          //   var paginationInfoEl = document.querySelector('.pagination-info');
+          //   paginationInfoEl.textContent = currentPage + '/' + totalPages;
+          // }
+        },
+      });
+    },
   },
 };
 </script>
@@ -2646,7 +2715,7 @@
   font-size: 14px;
   border-width: 1px;
   min-width: 80px;
-  min-height: 28px;
+  height: 30px;
   background-color: #fff;
   &:hover {
     background-color: #0bab87;
@@ -2654,11 +2723,19 @@
   }
 }
 .banshi {
+  position: relative;
   margin-top: 40px;
   width: 100%;
   height: 350px;
   margin: 0 auto;
 }
+.pageBox {
+  z-index: 9999999999;
+  color: #999;
+  position: absolute;
+  left: 48%;
+  bottom: 0px;
+}
 select {
   height: 24px;
 }

--
Gitblit v1.9.1