From 8dc4e50769a7ebc5f0a3d766f61aa08b8f23b772 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 06 九月 2024 11:23:21 +0800
Subject: [PATCH] login

---
 packageDomain/pages/resourceDetails/document/index.js                            |    6 +++
 pages/digitalCourses/digitalCoursesDetails/index.js                              |    6 +++
 packageBookService/pages/bookServices/examination/examination.js                 |    6 +++
 packageBookService/pages/bookServices/detail/components/teachResource/index.wxml |    8 ++--
 packageDomain/pages/resourceDetails/myVideo/index.js                             |   22 ++++++++--
 packageDomain/pages/resourceDetails/myAudio/index.js                             |    6 +++
 packageBookService/pages/bookServices/detail/index.js                            |   20 +++++++++
 pages/digitalTextbooks/digitalTextbooksDetails/index.js                          |    6 +++
 8 files changed, 70 insertions(+), 10 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/teachResource/index.wxml b/packageBookService/pages/bookServices/detail/components/teachResource/index.wxml
index c475deb..78e6737 100644
--- a/packageBookService/pages/bookServices/detail/components/teachResource/index.wxml
+++ b/packageBookService/pages/bookServices/detail/components/teachResource/index.wxml
@@ -1,13 +1,13 @@
-<view class="teach-btn">
-  <!-- <t-button theme="primary" style="width: 120px; height: 36px" class="btn-upload" bind:tap="uploadBtn">
+<!-- <view class="teach-btn"> -->
+<!-- <t-button theme="primary" style="width: 120px; height: 36px" class="btn-upload" bind:tap="uploadBtn">
     <t-image src="/static/images/bookService/detail/upload.png" style="margin-top: 20rpx"></t-image>
     <text>涓婁紶璧勬簮</text>
   </t-button> -->
-  <!-- <t-button theme="primary" style="width: 120px; height: 36px">
+<!-- <t-button theme="primary" style="width: 120px; height: 36px">
     <t-image src="/static/images/bookService/detail/download.png"></t-image>
     鎵归噺涓嬭浇
   </t-button> -->
-</view>
+<!-- </view> -->
 <view class="applyResult  {{applyState == 'none' ? 'applyNone' : applyState == 'Normal' ? 'applyPass' : applyState == 'WaitAudit' ? 'applying' :applyState == 'Reject' ? 'applyReject' :'' }}">
   <view wx:if="{{applyState == 'WaitAudit'}}">璧勬簮涓嬭浇鐢宠姝e湪瀹℃牳涓紝璇疯�愬績绛夊緟锛�</view>
   <view wx:if="{{applyState == 'Normal'}}">
diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 8e0ddd0..ac1c263 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -198,13 +198,22 @@
         id: options.id,
         name: options.name,
         storeInfo: options.storeInfo,
+
       },
     });
     wx.setNavigationBarTitle({
       title: options.name,
     })
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
+
     this.getBookInfo(options.id);
     // this.getResourceClass(); // 鑾峰彇璧勬簮鎵�灞炲垎绫�
+
     const token = wx.getStorageSync(app.config.tokenKey);
     if (token) {
       this.getShoppingCartProductGet();
@@ -219,6 +228,15 @@
       // 鑾峰彇鐢宠娆℃暟
       this.getSelectPaperBookCount();
       this.getSelectBookCount();
+    }
+    if (options.tabValue) {
+      this.setData({
+        tabValue: options.tabValue,
+      });
+      const checkData = this.data.cmsDatas.find(
+        (item) => item.refCode == options.tabValue
+      );
+      this.getResourceDataList(checkData)
     }
   },
 
@@ -719,7 +737,7 @@
       e.detail.label == "浜戞祴璇�"
     ) {
       const checkData = this.data.cmsDatas.find(
-        (item) => item.refCode == e.detail.value
+        (item) => item.refCode == this.data.tabValue
       );
       if (!this.data.resourceClassList.length) this.getResourceClass()
       if (checkData) {
diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js
index 19bcdfe..c96c46d 100644
--- a/packageBookService/pages/bookServices/examination/examination.js
+++ b/packageBookService/pages/bookServices/examination/examination.js
@@ -82,6 +82,12 @@
         mockid: options.mockid,
       });
     }
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
     this.init();
   },
 
diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js
index 839ba57..4808f57 100644
--- a/packageDomain/pages/resourceDetails/document/index.js
+++ b/packageDomain/pages/resourceDetails/document/index.js
@@ -64,6 +64,12 @@
       applyState: options.applyState,
       deadline: options.deadline
     })
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
     this.resourceDetailsData()
   },
 
diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js
index 217aa09..1a5f65d 100644
--- a/packageDomain/pages/resourceDetails/myAudio/index.js
+++ b/packageDomain/pages/resourceDetails/myAudio/index.js
@@ -104,6 +104,12 @@
         parentName: options.parentName,
       })
     }
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
     this.resourceDetailsData()
     this.getNoteList()
   },
diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js
index 24c52d0..7b64637 100644
--- a/packageDomain/pages/resourceDetails/myVideo/index.js
+++ b/packageDomain/pages/resourceDetails/myVideo/index.js
@@ -88,6 +88,12 @@
         parentName: options.parentName,
       })
     }
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
     this.resourceDetailsData()
 
   },
@@ -307,13 +313,19 @@
   aliVod(md5, currentVideo) {
     let query = {
       md5: md5,
-      appRefCode: config.appRefCode
+      appRefCode: app.config.appRefCode
     }
-    MG.file.getAliVod(query).then((res) => {
+    app.MG.file.getAliVod(query).then((res) => {
       if (res) {
-        this.setData({
-          showDataVod: res,
-        })
+        if (res && res.data == '') {
+          this.setData({
+            showDataVod: currentVideo,
+          })
+        } else {
+          this.setData({
+            showDataVod: res,
+          })
+        }
       } else if (currentVideo) {
         this.setData({
           showDataVod: currentVideo,
diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js
index c41e720..355702d 100644
--- a/pages/digitalCourses/digitalCoursesDetails/index.js
+++ b/pages/digitalCourses/digitalCoursesDetails/index.js
@@ -155,6 +155,12 @@
     this.setData({
       bookId: options.id
     })
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
     this.digitalCoursesDetailsGet(options.id)
     this.getPlayerList()
     this.getType()
diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.js b/pages/digitalTextbooks/digitalTextbooksDetails/index.js
index 01c7c66..dee28fb 100644
--- a/pages/digitalTextbooks/digitalTextbooksDetails/index.js
+++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.js
@@ -89,6 +89,12 @@
     this.setData({
       digitalTextId: options.id
     })
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        if (data) {} else {}
+      })
+    }
     this.digitalTextbooksDetailsGet(this.data.digitalTextId)
     this.getType()
     this.getCertificateList()

--
Gitblit v1.9.1