From c96612e8a63ecef9590be0f8b5199277ec94e5b9 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期三, 18 九月 2024 18:43:12 +0800
Subject: [PATCH] 云学习购买目录,修改bug

---
 pages/digitalCourses/index.wxml |   87 +++++++++++++++++++++++--------------------
 1 files changed, 47 insertions(+), 40 deletions(-)

diff --git a/pages/digitalCourses/index.wxml b/pages/digitalCourses/index.wxml
index e66145d..940cc90 100644
--- a/pages/digitalCourses/index.wxml
+++ b/pages/digitalCourses/index.wxml
@@ -1,6 +1,6 @@
 <import src="index.skeleton.wxml" />
 <template is="skeleton" wx:if="{{loading}}" />
-<view wx:else="">
+<view wx:else>
   <view style="width: 100%; height: {{barHeight}}px;"></view>
   <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
     <view class="back-icon">
@@ -57,48 +57,55 @@
         />
       </view>
     </view>
-    <scroll-view
-      scroll-y="{{true}}"
-      class="outsideContentBox"
-      bindscrolltolower="onScrollToLower"
-    >
-      <view class="ExternalInformationBox">
-        <view
-          class="informationBox"
-          wx:for="{{courseList}}"
-          wx:key="index"
-          wx:for-item="item"
-          data-item="{{item}}"
-        >
-          <view class="book-img" bind:tap="courseDetail" data-item="{{item}}">
-            <image src="{{item.icon}}" mode="aspectFit" />
+  </view>
+  <t-skeleton
+    theme="paragraph"
+    animation="gradient"
+    loading="{{contentLoading}}"
+    class="content-loading"
+    wx:if="{{contentLoading}}"
+  ></t-skeleton>
+  <scroll-view
+    scroll-y="{{true}}"
+    class="outsideContentBox"
+    bindscrolltolower="onScrollToLower"
+    wx:if="{{!contentLoading}}"
+  >
+    <view class="ExternalInformationBox">
+      <view
+        class="informationBox"
+        wx:for="{{courseList}}"
+        wx:key="index"
+        wx:for-item="item"
+        data-item="{{item}}"
+      >
+        <view class="book-img" bind:tap="courseDetail" data-item="{{item}}">
+          <image
+            src="{{item.icon ? item.icon : 'https://jsek.bnuic.com/home/image/courseIcon.png'}}"
+            mode="aspectFit"
+          />
+        </view>
+        <view class="book-Info">
+          <view class="book-name" bind:tap="courseDetail" data-item="{{item}}">
+            {{item.name}}
           </view>
-          <view class="book-Info">
-            <view
-              class="book-name"
-              bind:tap="courseDetail"
-              data-item="{{item}}"
-            >
-              {{item.name}}
-            </view>
-            <view class="viewCount"> {{item.viewCount }}娆$偣鍑� </view>
-            <view class="author">
-              <view> {{ item.courseLeader}} </view>
-              <view> {{ item.classHours}}璇炬椂 </view>
-            </view>
-            <view class="money">
-              <view wx:if="{{item.price != 0}}">锟{item.price }}</view>
-              <view wx:else> 鍏嶈垂</view>
-              <view bind:tap="addCart" data-item="{{item}}">
-                <t-icon name="cart" size="16" />
-              </view>
+          <view class="viewCount"> {{item.viewCount }}娆$偣鍑� </view>
+          <view class="author">
+            <view> {{ item.courseLeader}} </view>
+            <view> {{ item.classHours}}璇炬椂 </view>
+          </view>
+          <view class="money">
+            <view wx:if="{{item.price != 0}}">锟{item.price }}</view>
+            <view wx:else> 鍏嶈垂</view>
+            <view bind:tap="addCart" data-item="{{item}}">
+              <t-icon name="cart" size="16" />
             </view>
           </view>
         </view>
       </view>
-      <view wx:if="{{courseList.length <= 0}}" class="noDataBox">
-        <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" />
-      </view>
-    </scroll-view>
-  </view>
+    </view>
+    <view wx:if="{{noData}}" class="noDataBox">
+      <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" />
+    </view>
+  </scroll-view>
 </view>

--
Gitblit v1.9.1