From 50bdb66e0539abd94880f331549c0cef81065caa Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 06 九月 2024 14:33:31 +0800
Subject: [PATCH] login

---
 pages/digitalCourses/digitalCoursesDetails/index.wxss                                    |    2 +
 packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml |    4 +-
 packageDomain/pages/resourceDetails/document/index.js                                    |    3 +
 pages/digitalCourses/digitalCoursesDetails/index.js                                      |   22 ++++++-----
 pages/study/index.js                                                                     |   44 +++++++++++-----------
 pages/digitalCourses/digitalCoursesDetails/index.wxml                                    |   14 +++++-
 packageBookService/pages/bookServices/examination/examination.js                         |    3 +
 packageDomain/pages/resourceDetails/myVideo/index.js                                     |    4 +
 packageDomain/pages/resourceDetails/myAudio/index.js                                     |    3 +
 9 files changed, 61 insertions(+), 38 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml b/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml
index ae932ee..4fe987f 100644
--- a/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml
+++ b/packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml
@@ -12,10 +12,10 @@
       <text>璧勬簮璐拱</text>
     </view>
   </t-button>
-  <!-- <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;margin:0 20rpx" bind:tap="goLearnTask">
+  <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;margin:0 20rpx" bind:tap="goLearnTask">
     <view slot="content" class="btn-content">
       <image src="/static/images/bookService/detail/renwudan锛廼con.png" />
       <text>瀛︿範浠诲姟鍗�</text>
     </view>
-  </t-button> -->
+  </t-button>
 </view>
\ No newline at end of file
diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js
index c96c46d..3579fe6 100644
--- a/packageBookService/pages/bookServices/examination/examination.js
+++ b/packageBookService/pages/bookServices/examination/examination.js
@@ -1,6 +1,9 @@
 import {
   getPublicImage
 } from "../../../../assets/js/middleGround/tool";
+import {
+  loginInfo
+} from '../../../../assets/js/login';
 const app = getApp();
 Page({
   /**
diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js
index 4808f57..dd3cd03 100644
--- a/packageDomain/pages/resourceDetails/document/index.js
+++ b/packageDomain/pages/resourceDetails/document/index.js
@@ -1,6 +1,9 @@
 // pages/resourceDetails/document/index.js
 import Toast from 'tdesign-miniprogram/toast/index';
 const app = getApp()
+import {
+  loginInfo
+} from '../../../../assets/js/login';
 Page({
 
   /**
diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js
index 1a5f65d..4875000 100644
--- a/packageDomain/pages/resourceDetails/myAudio/index.js
+++ b/packageDomain/pages/resourceDetails/myAudio/index.js
@@ -1,6 +1,9 @@
 // pages/resourceDetails/index.js
 const app = getApp()
 const myAudio = wx.createInnerAudioContext();
+import {
+  loginInfo
+} from '../../../../assets/js/login';
 // innerAudioContext.onPlay(function callback),
 // InnerAudioContext.onTimeUpdate(function callback)
 Page({
diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js
index 7b64637..f31ea0f 100644
--- a/packageDomain/pages/resourceDetails/myVideo/index.js
+++ b/packageDomain/pages/resourceDetails/myVideo/index.js
@@ -1,6 +1,8 @@
 // pages/resourceDetails/index.js
 const app = getApp()
-
+import {
+  loginInfo
+} from '../../../../assets/js/login';
 Page({
 
   /**
diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js
index 355702d..bf16ec4 100644
--- a/pages/digitalCourses/digitalCoursesDetails/index.js
+++ b/pages/digitalCourses/digitalCoursesDetails/index.js
@@ -317,7 +317,7 @@
       }
       this.getAboutBook(res.datas.productLinkInfo[res.datas.productLinkInfo.length - 1].LinkPath)
       this.getCertificateList()
-      res.datas.content = res.datas.content.replace('../', app.config.requestCtx + '/')
+      res.datas.content = res.datas.content && res.datas.content.replace('../', app.config.requestCtx + '/')
       this.setData({
         lecturerList: lecturer,
         digitalsData: res.datas,
@@ -625,17 +625,19 @@
         }
       })
       .then((res) => {
-        this.setData({
-          relationTextBook: res.datas[0]
-        })
-        if (this.data.relationTextBook.purchasedSaleMethodIdList.includes(this.data.relationTextBook.defaultSaleMethodId)) {
+        if (res.datas.length > 0) {
           this.setData({
-            isTextBookBuy: true
+            relationTextBook: res.datas[0]
           })
-        } else {
-          this.setData({
-            isTextBookBuy: false
-          })
+          if (this.data.relationTextBook.purchasedSaleMethodIdList.includes(this.data.relationTextBook.defaultSaleMethodId)) {
+            this.setData({
+              isTextBookBuy: true
+            })
+          } else {
+            this.setData({
+              isTextBookBuy: false
+            })
+          }
         }
       })
   },
diff --git a/pages/digitalCourses/digitalCoursesDetails/index.wxml b/pages/digitalCourses/digitalCoursesDetails/index.wxml
index ea1cde4..9cfdb18 100644
--- a/pages/digitalCourses/digitalCoursesDetails/index.wxml
+++ b/pages/digitalCourses/digitalCoursesDetails/index.wxml
@@ -134,8 +134,13 @@
                     <view>{{isTextBookBuy ? '闃呰' : '璇曠湅'}}</view>
                   </view>
                 </view>
-                <tree id="test-tree" openIds="{{openTeachids}}" bookInfo="{{digitalsData}}" treeList="{{learnList}}">
-                </tree>
+                <view wx:if="{{learnList.length > 0}}">
+                  <tree id="test-tree" openIds="{{openTeachids}}" bookInfo="{{digitalsData}}" treeList="{{learnList}}">
+                  </tree>
+                </view>
+                <view wx:if="{{learnList.length == 0}}" class="noData">
+                  <empty />
+                </view>
               </view>
               <view wx:if="{{selectActive == 'test'}}">
                 <view class="testBtnBox">
@@ -157,6 +162,9 @@
                   </view>
                 </view>
                 <testTree id="tree" openIds="{{openTeachids}}" bookInfo="{{digitalsData}}" tab="{{tab}}" treeList="{{testList}}"></testTree>
+                <view wx:if="{{testList.length == 0}}" class="noData">
+                  <empty />
+                </view>
               </view>
             </view>
           </view>
@@ -222,7 +230,7 @@
           <view class="correlation" wx:else>
             <view style="margin-bottom: 30rpx;" wx:for="{{relatedBookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onCorrelationBook">
               <view class="correlationImage">
-                <image src="{{item.icon}}" mode="" />
+                <image src="{{item.icon}}" mode="" mode="aspectFit" />
                 <img wx:if="{{item.icon == ''}}" src="/static/images/default-book-img.png" alt="" />
               </view>
               <view class="correlationName">{{item.name}}</view>
diff --git a/pages/digitalCourses/digitalCoursesDetails/index.wxss b/pages/digitalCourses/digitalCoursesDetails/index.wxss
index 8c5e864..3e1bcb0 100644
--- a/pages/digitalCourses/digitalCoursesDetails/index.wxss
+++ b/pages/digitalCourses/digitalCoursesDetails/index.wxss
@@ -508,6 +508,8 @@
 .correlationImage {
   width: 300rpx;
   height: 180rpx;
+  /* background: #D9D9D9; */
+  border: 2rpx solid #ddd;
 }
 
 .correlation {
diff --git a/pages/study/index.js b/pages/study/index.js
index 45af0a6..943c756 100644
--- a/pages/study/index.js
+++ b/pages/study/index.js
@@ -132,23 +132,23 @@
         titleBook: "鍥句功锛�" + res.totalSize + "鏈級",
       })
     })
-    // let data1 = {
-    //   Size: 9999,
-    //   Start: 0,
-    //   sort: {
-    //     type: "Desc",
-    //     field: "CreateDate",
-    //   },
-    //   searchList: [{
-    //     keywords: 'jsek_digitalCourses',
-    //     field: "ProductType",
-    //   }],
-    // }
-    // app.MG.store.getPurchasedProductList(data1).then((res) => {
-    //   that.setData({
-    //     titleCourse: "璇剧▼锛�" + res.totalSize + "闂級",
-    //   })
-    // })
+    let data1 = {
+      Size: 9999,
+      Start: 0,
+      sort: {
+        type: "Desc",
+        field: "CreateDate",
+      },
+      searchList: [{
+        keywords: 'jsek_digitalCourses',
+        field: "ProductType",
+      }],
+    }
+    app.MG.store.getPurchasedProductList(data1).then((res) => {
+      that.setData({
+        titleCourse: "璇剧▼锛�" + res.totalSize + "闂級",
+      })
+    })
     let data2 = {
       Size: 9999,
       Start: 0,
@@ -246,11 +246,11 @@
         url: `/packageBookService/pages/bookServices/detail/index?id=${book.product.id}&name=${book.product.name}`,
       });
     }
-    if (this.data.active == 1) {
-      // wx.navigateTo({
-      //   url: `/packageBookService/pages/bookServices/detail/index?id=${book.product.id}&name=${book.product.name}`,
-      // });
-    }
+    // if (this.data.active == 1) {
+    //   wx.navigateTo({
+    //     url: `/pages/digitalCourses/digitalCoursesDetails/index?id=${book.product.id}`,
+    //   });
+    // }
     if (this.data.active == 2) {
       wx.navigateTo({
         url: `/pages/digitalTextbooks/digitalTextbooksDetails/index?id=${book.product.id}`,

--
Gitblit v1.9.1