From ccda9ec2fe70d8f51ef184eafc04b78d22dfbabd Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期三, 26 六月 2024 15:02:28 +0800
Subject: [PATCH] 小程序,教材,课程

---
 pages/home/home.js |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index 4b721d9..9bd1189 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -41,6 +41,10 @@
     loading: true
   },
   onShow() {
+    this.setData({
+      searchVal: "",
+    });
+    console.log(this.data.searchVal)
     this.loadHomePage();
     this.getBannerList()
 
@@ -147,6 +151,7 @@
   //鐐瑰嚮鐩綍
   toPages(item) {
     let info = item.target.dataset.info
+    console.log(info);
     if (info.url) {
       if (info.text == "鍥句功鏈嶅姟") {
         wx.switchTab({
@@ -587,6 +592,22 @@
 
   },
 
+  // 鎵竴鎵�
+  onIconScanTap() {
+    wx.scanCode({
+      success(res) {
+        console.log(res);
+        if (res.errMsg == "scanCode:ok" && res.path) {
+          console.log(res.path, 2)
+          wx.redirectTo({
+            url: '/' + res.path,
+          })
+        }
+      }
+    })
+  },
+
+
 
   // 鐩戝惉婊氬姩鏉�
   onScroll(e) {
@@ -602,7 +623,6 @@
       }
     }
   },
-
   isChange(data) {
     this.setData({
       isWhite: data

--
Gitblit v1.9.1