From 86cbb2a45a153a704bcc0d63697f83d2832caa71 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期二, 09 七月 2024 09:51:15 +0800
Subject: [PATCH] css,token

---
 pages/personalCenter/index.wxml                                       |    2 
 pages/test/testCover.js                                               |   19 ++++
 pages/index/resourceCover.js                                          |   17 +++
 packageBookService/pages/bookServices/detail/components/tree/index.js |    8 --
 packageBookService/pages/bookServices/detail/index.wxml               |    4 
 packageDomain/pages/resourceDetails/myVideo/index.js                  |    2 
 pages/retrievalPage/index.wxml                                        |   50 ++----------
 packageBookService/pages/bookServices/detail/index.js                 |    6 -
 pages/personalCenter/index.js                                         |    2 
 pages/retrievalPage/index.js                                          |   37 ++++++---
 pages/index/bookDetail.js                                             |   24 +++++-
 pages/retrievalPage/index.wxss                                        |   32 ++-----
 12 files changed, 102 insertions(+), 101 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js
index 1c287fe..0fbed14 100644
--- a/packageBookService/pages/bookServices/detail/components/tree/index.js
+++ b/packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -208,11 +208,8 @@
         wx.navigateTo({
           url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`,
         });
-<<<<<<< Updated upstream
-=======
 
         // debugger
->>>>>>> Stashed changes
         if (item.selectType == "pdf" || item.selectType == "document") {
           const fileLink = item.file ? item.file : item.freeFile
           console.log(fileLink);
@@ -221,12 +218,7 @@
               fileLink +
               "&fileName=" +
               item.name +
-<<<<<<< Updated upstream
-              "&fileType=pdf" +
-              "&bookBuy=true"
-=======
               "&fileType=pdf" + "&bookBuy=true"
->>>>>>> Stashed changes
           });
         }
         // if (item.selectType == "document") {
diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 5a990bc..bfb8e61 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -2101,7 +2101,7 @@
         const smBook = list.find(item => item.content[0].id == this.data.bookDetail.id)
         console.log('宸茬敵璇�', smBook);
         if (smBook && smBook.state == 'Normal') {
-          const flag = new Date(smBook.feedBack.endDate + '23:59:59').getTime() > new Date().getTime()
+          const flag = new Date(smBook.feedBack.endDate + ' 23:59:59').getTime() > new Date().getTime()
           if (flag) {
             this.setData({
               applicationState: 'Normal'
@@ -2212,9 +2212,7 @@
             return false;
           } else if (isApply.state == 'Normal') {
             console.log(isApply.state, "isApply.state")
-            const flag = new Date(isApply.feedBack.endDate + '23:59:59').getTime() > new Date().getTime()
-            console.log(isApply.feedBack.endDate, new Date()
-              'ooo')
+            const flag = new Date(isApply.feedBack.endDate + ' 23:59:59').getTime() > new Date().getTime()
             if (flag) {
               wx.showToast({
                 title: "璇ヤ功宸茬敵璇凤紒",
diff --git a/packageBookService/pages/bookServices/detail/index.wxml b/packageBookService/pages/bookServices/detail/index.wxml
index 97371a8..d79e000 100644
--- a/packageBookService/pages/bookServices/detail/index.wxml
+++ b/packageBookService/pages/bookServices/detail/index.wxml
@@ -196,7 +196,7 @@
       </view>
       <view class="btn-text">绾歌川鏍蜂功鐢宠</view>
     </view>
-    <view class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy}}">
+    <view class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy || applicationState == 'overdue'}}">
       <view>
         <t-image src="/static/images/bookService/detail/shidu.png"></t-image>
       </view>
@@ -206,7 +206,7 @@
     <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy &&  bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">鍔犲叆璐墿杞�</view>
     <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">绔嬪嵆璐拱</view>
     <view class="buy receiveColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}">鍏嶈垂棰嗗彇</view>
-    <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy}}">绔嬪嵆鏌ョ湅</view>
+    <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy || applicationState == 'Normal'}}">绔嬪嵆鏌ョ湅</view>
   </view>
 </view>
 
diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js
index 146bb86..c0a4b32 100644
--- a/packageDomain/pages/resourceDetails/myVideo/index.js
+++ b/packageDomain/pages/resourceDetails/myVideo/index.js
@@ -252,6 +252,7 @@
                   showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey),
                   titleName: items.name
                 })
+                console.log(this.data.showData, 11)
               } else {
                 this.setData({
                   showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile,
@@ -284,7 +285,6 @@
     })
     if (item.selectType == "video" || item.learnSelectType === "video") {
       if (this.data.formPath === "jsek_cloudLearning") {
-
         let file
         item.protectedFile || item.file ? file = item.protectedFile || item.file : file = item.freeFile
         this.setData({
diff --git a/pages/index/bookDetail.js b/pages/index/bookDetail.js
index ac1a9b6..20fa968 100644
--- a/pages/index/bookDetail.js
+++ b/pages/index/bookDetail.js
@@ -13,12 +13,28 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-    if (options.scene) {
-      this.setData({
-        refcode: options.scene,
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋�
+        if (data) {
+          if (options.scene) {
+            this.setData({
+              refcode: options.scene,
+            })
+            this.getBookList()
+          }
+        }
       })
-      this.getBookList()
+    } else {
+      if (options.scene) {
+        this.setData({
+          refcode: options.scene,
+        })
+        this.getBookList()
+      }
     }
+
   },
 
   /**
diff --git a/pages/index/resourceCover.js b/pages/index/resourceCover.js
index 683ad99..2bb6892 100644
--- a/pages/index/resourceCover.js
+++ b/pages/index/resourceCover.js
@@ -20,9 +20,22 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-    if (options.scene) {
-      this.getBookInfo(options.scene)
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋�
+        if (data) {
+          if (options.scene) {
+            this.getBookInfo(options.scene)
+          }
+        }
+      })
+    } else {
+      if (options.scene) {
+        this.getBookInfo(options.scene)
+      }
     }
+
   },
 
   /**
diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js
index c756a91..8db3ea7 100644
--- a/pages/personalCenter/index.js
+++ b/pages/personalCenter/index.js
@@ -121,7 +121,7 @@
       value: false
     },
     loadingProps: {
-      size: '50rpx',
+      size: '10rpx',
     },
     scrollTop: 0,
   },
diff --git a/pages/personalCenter/index.wxml b/pages/personalCenter/index.wxml
index 5579bac..c14b54f 100644
--- a/pages/personalCenter/index.wxml
+++ b/pages/personalCenter/index.wxml
@@ -1,4 +1,4 @@
-<view>
+<view class="container">
   <t-pull-down-refresh value="{{baseRefresh.value}}" loadingProps="{{loadingProps}}" loadingTexts="{{['涓嬫媺鍒锋柊', '姝e湪鍒锋柊', '鍒锋柊瀹屾垚']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll">
     <view style="width: 100%; height: {{barHeight}}px;"></view>
     <view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px">
diff --git a/pages/retrievalPage/index.js b/pages/retrievalPage/index.js
index 4346ab2..3b5f105 100644
--- a/pages/retrievalPage/index.js
+++ b/pages/retrievalPage/index.js
@@ -38,37 +38,37 @@
       page: 1,
       total: 0,
     },
-    tabValue: 0,
+    tabValue: '0',
     tabPanelstyle: 'display:flex;justify-content:center;align-items:center;',
     // tab閫夐」
     tabList: [{
         title: "鍥句功",
         index: "0",
-        // bookTotal: this.data.bookTotal
+        bookTotal: 0
       },
       {
         title: "璇剧▼",
         index: "1",
-        // bookTotal: this.data.courseTotal
+        bookTotal: 0
       },
       {
         title: "鏁板瓧鏁欐潗",
         index: "2",
-        // bookTotal: this.data.digitalTextbooksTotal
+        bookTotal: 0
       }, {
         title: "涓撻",
         index: "3",
-        // bookTotal: this.data.seminarTotal
+        bookTotal: 0
       },
       {
         title: "涔︾洰",
         index: "4",
-        // bookTotal: this.data.bookFairTotal
+        bookTotal: 0
       },
       {
         title: "涔﹀睍",
         index: "5",
-        // bookTotal: this.data.biblioClassificationTotal
+        bookTotal: 0
       },
     ],
     tabsId: 0, //榛樿閫夊瀷涓鸿澶�
@@ -428,7 +428,9 @@
       this.setData({
         bookData: datas1,
         bookTotal: data1.totalCount,
+        [`tabList[${0}].bookTotal`]: data1.totalCount
       })
+      console.log(this.data.tabList, 7777)
       //鏁板瓧璇剧▼    1
       const data2 = resp[1]
       const datas2 = handleQueryResourceListData({
@@ -437,7 +439,8 @@
       })
       this.setData({
         courseData: datas2,
-        courseTotal: data2.totalCount
+        courseTotal: data2.totalCount,
+        [`tabList[${1}].bookTotal`]: data2.totalCount
       })
       // 鏁板瓧鏁欐潗    2
       const data3 = resp[2]
@@ -447,7 +450,8 @@
       })
       this.setData({
         digitalTextbooksData: datas3,
-        digitalTextbooksTotal: data3.totalCount
+        digitalTextbooksTotal: data3.totalCount,
+        [`tabList[${2}].bookTotal`]: data3.totalCount
       })
       // 涓撻鐮旇   3
       const data4 = resp[3]
@@ -457,7 +461,8 @@
       })
       this.setData({
         seminarData: datas4,
-        seminarTotal: data4.totalCount
+        seminarTotal: data4.totalCount,
+        [`tabList[${3}].bookTotal`]: data4.totalCount
       })
       // 涔﹀睍      4
       const data5 = resp[4]
@@ -471,7 +476,8 @@
       // console.log(datas5, 'sadasd');
       this.setData({
         biblioClassificationData: datas5,
-        biblioClassificationTotal: data5.totalCount
+        biblioClassificationTotal: data5.totalCount,
+        [`tabList[${5}].bookTotal`]: data5.totalCount
       })
       this.setData({
         loading: false,
@@ -515,7 +521,8 @@
 
       this.setData({
         bookFairData: res.datas,
-        bookFairTotal: res.total
+        bookFairTotal: res.total,
+        [`tabList[${4}].bookTotal`]: res.total
       })
 
     })
@@ -898,7 +905,11 @@
     }
   },
   onTabsClick(event) {
-    console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
+    console.log(`
+                      Click tab, tab - panel value is $ {
+                        event.detail.value
+                      }.
+                      `);
   },
   tabClick() {
     console.log(2323);
diff --git a/pages/retrievalPage/index.wxml b/pages/retrievalPage/index.wxml
index 05e391a..a097d87 100644
--- a/pages/retrievalPage/index.wxml
+++ b/pages/retrievalPage/index.wxml
@@ -8,31 +8,22 @@
       <view class="cancellation" bind:tap="onCancellation">鍙栨秷</view>
     </view>
   </view>
-
-
   <view>
     <!-- Tab甯冨眬 -->
-    <view class="navBox">
-      <view class="titleBox" wx:for="{{tabList}}" bindtap="tabsOn" data-idx="{{item.index}}">
-
-        <view class="tabIndexBox">
-
-
-          <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}">{{item.title}} </text>
-          <!-- <view style="font-size: 22rpx;"> ({{bookTotal}}) </view> -->
+    <scroll-view scroll-x="{{true}}" class="scroll-x">
+      <view class="navBox">
+        <view class="titleBox" wx:for="{{tabList}}" bindtap="tabsOn" data-idx="{{item.index}}">
+          <view class="tabIndexBox">
+            <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}">{{item.title}} ({{item.bookTotal}}) </text>
+          </view>
+          <hr class="{{item.index == tabsId ? 'lineBox' : ''}}" />
         </view>
-
-
-        <hr class="{{item.index == tabsId ? 'lineBox' : ''}}" />
       </view>
-    </view>
+    </scroll-view>
     <!-- 鍐呭甯冨眬 -->
     <swiper class="swiperTtemBox" bindchange="slideOn" current="{{tabsId}}" circular>
       <!-- circular 鍚敤寰幆婊戝姩 -->
       <swiper-item>
-        <view wx:if="{{bookData.length <= 0}}" class="noDataBox">
-          <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
-        </view>
         <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
           <view class="bookDataBox">
             <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook">
@@ -55,14 +46,6 @@
         </scroll-view>
       </swiper-item>
       <swiper-item>
-
-
-
-
-        <view wx:if="{{courseData.length <= 0}}" class="noDataBox">
-          <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
-        </view>
-
         <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
           <view class="listBox1">
             <view>
@@ -99,10 +82,6 @@
 
       </swiper-item>
       <swiper-item>
-        <view wx:if="{{digitalTextbooksData.length <= 0}}" class="noDataBox">
-          <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
-        </view>
-
         <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
           <view class="bookDataBox">
             <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="underConstruction">
@@ -126,11 +105,6 @@
 
       </swiper-item>
       <swiper-item>
-
-        <view wx:if="{{seminarData.length <= 0}}" class="noDataBox">
-          <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
-        </view>
-
         <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
           <view class="listBox">
             <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox" data-item="{{item}}" bind:tap="underConstruction">
@@ -164,9 +138,6 @@
 
       </swiper-item>
       <swiper-item>
-        <view wx:if="{{bookFairData.length <= 0 }}" class="noDataBox">
-          <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
-        </view>
         <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
           <view class="outsideHigherBox">
             <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index">
@@ -194,11 +165,6 @@
         </scroll-view>
       </swiper-item>
       <swiper-item>
-        <view wx:if="{{biblioClassificationData.length <= 0}}" class="noDataBox">
-          <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" />
-        </view>
-
-
         <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
           <view class="outside">
             <view class="contentBox" wx:for="{{biblioClassificationData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}">
diff --git a/pages/retrievalPage/index.wxss b/pages/retrievalPage/index.wxss
index d6e7896..7b0b2a5 100644
--- a/pages/retrievalPage/index.wxss
+++ b/pages/retrievalPage/index.wxss
@@ -402,50 +402,44 @@
 
 
 
-
+.scroll-x {
+  height: 70rpx;
+  border-bottom: 2rpx solid rgb(243, 244, 249);
+  padding-top: 20rpx;
+}
 
 .navBox {
   /* tab鏁翠綋鏍峰紡 */
   height: 70rpx;
-
   display: flex;
   align-items: center;
-  justify-content: space-around;
-  border-bottom: 2rpx solid rgb(243, 244, 249);
-  line-height: 45rpx;
-  margin-top: 20rpx;
-  /* overflow-y: scroll; */
   display: flex;
   flex: 1 0 auto;
-
-  /* 
-  overflow-x: hidden; */
 }
 
 .fontColorBox {
   /* 閫変腑tab鏍峰紡 */
   color: #FF6C00;
-  font-weight: bold;
-
 }
 
 .titleBox {
   /* 鏈�変腑tab鏍峰紡 */
   height: 70rpx;
-  color: rgb(168, 170, 175);
   font-size: 28rpx;
   display: flex;
   flex-direction: column;
   align-items: center;
-
+  min-width: 180rpx;
+  flex: 1
 }
 
 .lineBox {
   /* 绾挎潯鏍峰紡 */
-  width: 32rpx;
+  width: 80rpx;
   height: 8rpx;
   background: #FF6C00;
-  margin-top: 10rpx;
+  margin-top: 25rpx;
+  margin-right: 10rpx;
   border-radius: 4rpx;
 }
 
@@ -457,9 +451,5 @@
 }
 
 .tabIndexBox {
-  display: flex;
-  margin: 0 20rpx;
-
-
-
+  text-align: center;
 }
\ No newline at end of file
diff --git a/pages/test/testCover.js b/pages/test/testCover.js
index b426d38..2e47b6d 100644
--- a/pages/test/testCover.js
+++ b/pages/test/testCover.js
@@ -18,10 +18,25 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-    if (options.scene) {
-      this.getBookInfo(options.scene)
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋�
+        if (data) {
+          // 鐧诲綍鎴愬姛锛岃嚜鍔ㄨ褰晅oken鍜岀敤鎴蜂俊鎭紝骞惰繑鍥瀟rue
+          if (options.scene) {
+            this.getBookInfo(options.scene)
+          }
+        }
+      })
+    } else {
+      // 濡傛灉鏄涓�娆$櫥褰曪紝浼氳烦杞嚦缁戝畾鐢ㄦ埛淇℃伅椤甸潰锛屽~鍐欏畬鐢ㄦ埛淇℃伅鍚庤繘琛岀櫥褰曞苟鍌ㄥ瓨token鍜岀敤鎴蜂俊鎭紝缁撴潫鍚庤烦杞洖褰撳墠椤甸潰锛堟惡甯﹂〉闈㈠弬鏁帮級
+      if (options.scene) {
+        this.getBookInfo(options.scene)
+      }
     }
 
+
   },
 
   /**

--
Gitblit v1.9.1