From a47e8ae08413b99a7fcd4195a535687234b0160f Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 28 五月 2024 19:21:49 +0800
Subject: [PATCH] 页码

---
 src/books/childHealth/view/content/index.vue |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/books/childHealth/view/content/index.vue b/src/books/childHealth/view/content/index.vue
index 63b78b9..4dd0a6a 100644
--- a/src/books/childHealth/view/content/index.vue
+++ b/src/books/childHealth/view/content/index.vue
@@ -1,6 +1,13 @@
 <template>
   <div class="page-main" @scroll="throttledScrollHandler">
-    <div class="page-content">
+    <div
+      class="page-content"
+      :style="{
+        fontSize: fontSize ? fontSize + 'px' : '16px',
+        transform: `scale(${pageZoom ? pageZoom : 1})`,
+        transformOrigin: 'center top'
+      }"
+    >
       <pageHeader
         v-if="showCatalogList.indexOf(0) > -1"
         :showPageList="loadPageList"
@@ -66,6 +73,7 @@
       ></chapterTwelve>
       <chapterThirteen
         v-if="showCatalogList.indexOf(13) > -1"
+        :showPageList="loadPageList"
       ></chapterThirteen>
     </div>
   </div>
@@ -105,10 +113,13 @@
       questionData: {}
     };
   },
-  provide() {
-    return {
-      changeQuestionData: this.changeQuestionData
-    };
+  computed: {
+    fontSize() {
+      return this.$store.state.qiankun.fontSize;
+    },
+    pageZoom() {
+      return this.$store.state.qiankun.scale / 100;
+    }
   },
   watch: {
     showCatalogList: {
@@ -464,7 +475,7 @@
             "chapter"
           );
           const catalog = catalogDom.getAttribute("num");
-          console.log(page,"page",catalog,"catalog");
+          console.log(page, "page", catalog, "catalog");
           // 杩斿洖椤电爜鍜岀珷鑺備俊鎭�
           if (this.$store.state.qiankun && this.$store.state.qiankun.pageChange)
             this.$store.state.qiankun.pageChange({
@@ -495,7 +506,7 @@
                 if (testData[catalog][page]) {
                   if (Array.isArray(testData[catalog][page])) {
                     this.questionData[page] = await getQuestionList(
-                      [],
+                      page,
                       testData[catalog][page],
                       this.config.activeBook
                     );
@@ -522,9 +533,6 @@
         }
       });
     },
-    changeQuestionData(page, data) {
-      this.$props.questionData[page] = data;
-    }
   },
   components: {
     pageHeader,

--
Gitblit v1.9.1