From 61052ffdfbbb93dae84803c5bd966899c2afb684 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 10 一月 2025 17:49:40 +0800
Subject: [PATCH] 云学习购买

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

diff --git a/pages/home/home.js b/pages/home/home.js
index 71d2aea..a70fd1b 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -1,7 +1,6 @@
 import {
   fetchHome
 } from '../../services/home/home';
-import moment from 'moment'
 import {
   loginInfo
 } from '../../assets/js/login';
@@ -50,7 +49,7 @@
     if (token) {
       this.getShoppingCartList()
     }
-
+    this.init();
   },
 
   onLoad() {
@@ -77,7 +76,7 @@
         }
       })
     }
-    this.init();
+
   },
   onReachBottom() {},
   onPullDownRefresh() {
@@ -115,6 +114,9 @@
       path: 'jsek_banner\\jsek_homeBannerApplet',
       fields: {
         jsek_link: []
+      },
+      coverSize: {
+        width: 400
       },
       paging: {
         start: 0,
@@ -646,10 +648,16 @@
       success(res) {
         console.log(res);
         if (res.errMsg == "scanCode:ok" && res.path || res.result) {
-          let path = res.path || res.result
-          wx.redirectTo({
-            url: '/' + path,
-          })
+          if (res.path) {
+            let path = res.path || res.result
+            wx.redirectTo({
+              url: '/' + path,
+            })
+          } else {
+            wx.redirectTo({
+              url: '/pages/scanResult/index?result=' + res.result,
+            })
+          }
         }
       }
     })

--
Gitblit v1.9.1