From bc63cd0e8e9c380be145f23f3456235d124a50d9 Mon Sep 17 00:00:00 2001
From: yiming <m13691596795@163.com>
Date: 星期五, 29 三月 2024 14:38:17 +0800
Subject: [PATCH] 播放按钮图片

---
 pages/home/home.js |   45 +++++++++++++++++++++++++++++++++------------
 1 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index fcd8dad..58b5b7a 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -16,7 +16,7 @@
     tabList: [], //鐩綍
     current: 1, //杞挱鍥惧弬鏁�
     autoplay: true, //杞挱鍥惧弬鏁�
-    duration: '500', //杞挱鍥惧弬鏁�
+    duration: '500', //杞挱鍥惧弬鏁� 
     interval: 5000, //杞挱鍥惧弬鏁�
     navigation: {
       type: 'dots'
@@ -303,8 +303,8 @@
   //鏁板瓧闃呰
   getReadBookList() {
     const obj = {
-      storeInfo: app.config.digitalTextbooks,
-      path: 'jsek_homepageDigitalTextbooks',
+      storeInfo: app.config.digitalRead,
+      path: 'jsek_homepageDigitalReading',
       coverSize: {
         width: 150
       },
@@ -412,11 +412,9 @@
     const {
       book
     } = e.currentTarget.dataset;
-    wx.showToast({
-      title: "寤鸿涓�",
-      icon: 'none',
-      duration: 1000
-    })
+    wx.navigateTo({
+      url: '/pages/home/digitalRead/index?productId=' + book.id,
+    });
   },
   goTextBookDetail(e) {
     const {
@@ -505,6 +503,10 @@
       wx.navigateTo({
         url: '/packageBookService/pages/bookServices/list/index?assorName=' + this.data.bookTypeData.name
       })
+    } else if (type == "shuziyuedu") {
+      wx.navigateTo({
+        url: '/pages/home/digitalRead/index'
+      })
     } else {
       wx.showToast({
         title: "寤鸿涓�",
@@ -519,12 +521,31 @@
   // 鐩戝惉婊氬姩鏉�
   onScroll(e) {
     this.setData({
-      isWhite: e.detail.scrollTop > 10 ? true : false
+      isWhite: e.detail.scrollTop > 20 ? true : false
     })
   },
   onRetrievalPage() {
-    wx.navigateTo({
-      url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal
-    })
+
+    // 棣栭〉娴嬭瘯鐧诲綍鍔熻兘锛屽悗缁敞閲�
+    // 妫�鏌ョ櫥褰曠姸鎬�
+    const token = wx.getStorageSync(app.config.tokenKey)
+    if (!token) {
+      loginInfo(app, (data) => {
+        // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋�
+        if (data) {
+          wx.navigateTo({
+            url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal
+          })
+        } else {
+          // 鍑虹幇閿欒锛岃繑鍥瀎alse
+        }
+      })
+    } else {
+      wx.navigateTo({
+        url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal
+      })
+    }
+
+
   },
 });
\ No newline at end of file

--
Gitblit v1.9.1