From 326467df08eb1af36cce83ac161addaa947e2e82 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 29 三月 2024 19:31:17 +0800
Subject: [PATCH] css

---
 pages/home/home.js |   63 ++++++++++++++++++++++++++-----
 1 files changed, 53 insertions(+), 10 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index add28de..39bb7c2 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 {
@@ -502,8 +500,37 @@
   onMoreGuide(e) {
     let type = e.currentTarget.dataset.info
     if (type == "tushufuwu") {
+      let assortCode = "";
+      if (this.data.bookTypeData.name == '楂樼瓑鏁欒偛') {
+        assortCode = "jsek_higherEducation"
+      }
+      if (this.data.bookTypeData.name == '鑱屼笟鏁欒偛') {
+        assortCode = "jsek_vocationalEducation"
+      }
+      if (this.data.bookTypeData.name == '鏁欏笀鏁欒偛') {
+        assortCode = "jsek_teacherEducation"
+      }
+      if (this.data.bookTypeData.name == '灏戝効鏁欒偛') {
+        assortCode = "jsek_childrenEducation"
+      }
+      if (this.data.bookTypeData.name == '鑰冭瘯鍩硅') {
+        assortCode = "jsek_examTraining"
+      }
+      if (this.data.bookTypeData.name == '涓婚鍑虹増') {
+        assortCode = "jsek_themePublishing"
+      }
+      if (this.data.bookTypeData.name == '瀛︽湳钁椾綔') {
+        assortCode = "jsek_academicWorks"
+      }
+      if (this.data.bookTypeData.name == '澶т紬璇荤墿') {
+        assortCode = "jsek_popularReadingMaterials"
+      }
       wx.navigateTo({
-        url: '/packageBookService/pages/bookServices/list/index?assorName=' + this.data.bookTypeData.name
+        url: '/packageBookService/pages/bookServices/list/index?assorName=' + this.data.bookTypeData.name + '&assortCode=' + assortCode
+      })
+    } else if (type == "shuziyuedu") {
+      wx.navigateTo({
+        url: '/pages/home/digitalRead/index'
       })
     } else {
       wx.showToast({
@@ -518,8 +545,24 @@
 
   // 鐩戝惉婊氬姩鏉�
   onScroll(e) {
+    console.log(e)
     this.setData({
-      isWhite: e.detail.scrollTop > 10 ? true : false
+      isWhite: true
+    })
+    if (e.detail.scrollTop == 0) {
+      this.setData({
+        isWhite: false
+      })
+    }
+    // this.setData({
+    //   isWhite: e.detail.scrollTop > 20 ? true : false
+    // })
+  },
+
+  onScrollToTop(e) {
+
+    this.setData({
+      isWhite: e.detail.scrollTop > 50 ? true : false
     })
   },
   onRetrievalPage() {

--
Gitblit v1.9.1