From 6800be033ffcd618d8b0b819fed8235a19d6b136 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期三, 25 九月 2024 16:18:15 +0800
Subject: [PATCH] cs

---
 packageDomain/pages/resourceDetails/document/index.js |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js
index 7247648..13930df 100644
--- a/packageDomain/pages/resourceDetails/document/index.js
+++ b/packageDomain/pages/resourceDetails/document/index.js
@@ -283,7 +283,6 @@
   //鍒氳繘鏉ョ殑鏃跺�欒皟鐢�
   handleTeachData(item) {
     //鍥剧墖
-    console.log(item, 'item11111');
     if (item.selectType == 'picture') {
       this.setData({
         showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile,
@@ -307,13 +306,17 @@
       app.MG.file.getPdfInfo({
         md5: item.file
       }).then((res) => {
-        if (res && res.totalPages) {
-          for (let i = 0; i < res.totalPages; i++) {
+        let naturalResources = []
+        if (res && JSON.parse(res).totalPages) {
+          for (let i = 0; i < JSON.parse(res).totalPages; i++) {
             const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + item.file + '&index=' + (i + 1) + '&dpi=300'
-            this.data.naturalResources.push(src)
-            // console.log(this.data.naturalResources, ' this.data.naturalResources');
+            naturalResources.push(src)
           }
         }
+        this.setData({
+          naturalResources
+        })
+        console.log('ppt', this.data.naturalResources);
       })
     }
   },

--
Gitblit v1.9.1