From 4c29b79d485d68d506e798f4fd381232ebc55a86 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期六, 14 九月 2024 11:27:33 +0800
Subject: [PATCH] bug

---
 pages/digitalCourses/index.wxml |  103 ++++++++++++++++++++++++---------------------------
 1 files changed, 48 insertions(+), 55 deletions(-)

diff --git a/pages/digitalCourses/index.wxml b/pages/digitalCourses/index.wxml
index 3222dd1..15d4087 100644
--- a/pages/digitalCourses/index.wxml
+++ b/pages/digitalCourses/index.wxml
@@ -1,71 +1,64 @@
-<view style="width: 100%; height: {{barHeight}}px;"></view>
-<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
-  <view>
-    <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" />
+<import src="index.skeleton.wxml" />
+<template is="skeleton" wx:if="{{loading}}" />
+<view wx:else>
+  <view style="width: 100%; height: {{barHeight}}px;"></view>
+  <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
+    <view class="back-icon">
+      <!-- <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> -->
+      <image src="/static/images/digitalTextbooks/chevron-left.png" bind:tap="goBack" mode="aspectFit" />
+    </view>
+    <t-search model:value="{{searchValue}}" shape="round" placeholder="璇疯緭鍏ヨ绋嬪悕绉�/ISBN/璇剧▼璐熻矗浜�" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" />
   </view>
-  <t-search model:value="{{searchValue}}" shape="round" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" />
-</view>
-
-
-
-<t-tabs defaultValue="{{0}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel">
-  <t-tab-panel wx:for="{{tabList}}" wx:key="index" wx:for-item="item" wx:for-index="index" label="{{item.name}}" value="{{index}}" style="{{tabPanelstyle}}">
-
-    <view class="contentBox">
-
-      <view class="titleBox">
-        <view class="frameBox"></view>
-        <view class="titleTextBox">
-          <image src="/static/images/digitalCourses/zhuantitaolun@2x.png" mode="aspectFit" />
-
-          <!-- <view>鏁板瓧璇剧▼鍒楄〃</view> -->
-
-
-
-        </view>
+  <view class="heardTab">
+    <view class="tabBox">
+      <t-tabs defaultValue="{{active}}" bind:change="onTabsChange" t-class="custom-tabs">
+        <t-tab-panel wx:for="{{tabList}}" wx:key="index" wx:for-item="item" label="{{item.name}}" value="{{index}}">
+        </t-tab-panel>
+      </t-tabs>
+    </view>
+    <view class="dropdown">
+      <t-dropdown-menu>
+        <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" />
+      </t-dropdown-menu>
+    </view>
+  </view>
+  <view class="contentBox">
+    <view class="titleBox">
+      <view class="frameBox"></view>
+      <view class="titleTextBox">
+        <image src="/static/images/digitalCourses/zhuantitaolun@2x.png" mode="aspectFit" />
       </view>
+    </view>
 
-
-      <view class="ExternalInformationBox">
-        <view class="informationBox" wx:for="{{courseList}}" wx:key="index" wx:for-item="item" data-item="{{item}}" bind:tap="courseDetail">
-
-          <view class="book-img">
-            <image src="{{item.icon}}" mode="aspectFit" />
-          </view>
-
-          <view class="book-name">
+  </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="viewCount">
-            {{item.viewCount }}娆$偣鍑�
-
-          </view>
+          <view class="viewCount"> {{item.viewCount }}娆$偣鍑� </view>
           <view class="author">
-            <view>
-              {{ item.courseLeader}}
-            </view>
-            <view>
-              {{ item.classHours}}璇炬椂
-            </view>
+            <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>
+            <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>
-
     </view>
-
-  </t-tab-panel>
-
-</t-tabs>
\ No newline at end of file
+    <view wx:if="{{courseList.length <= 0 &&  !contentLoading}}" class="noDataBox">
+      <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" />
+    </view>
+  </scroll-view>
+</view>
\ No newline at end of file

--
Gitblit v1.9.1