From 996f42e3465101fda308f1a18fdb67c836c8e608 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 17 二月 2025 10:45:53 +0800 Subject: [PATCH] 课程播放进度修复 --- pages/home/home.js | 32 ++++++++++++++++++++++++++------ 1 files changed, 26 insertions(+), 6 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index fd1ab24..106412b 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'; @@ -40,6 +39,7 @@ value: false }, loading: true, + showStateMenu: false, // 鏂板勾鍏憡寮圭獥 }, onShow() { this.setData({ @@ -51,8 +51,19 @@ this.getShoppingCartList() } this.init(); + // const stateMenu = wx.getStorageSync('stateMenu') + // if (stateMenu == 'true') { + // this.setData({ + // showStateMenu: true + // }) + // wx.setStorageSync('stateMenu', 'false') + // } }, - + closeStateMenu() { + this.setData({ + showStateMenu: false + }) + }, onLoad() { this.getBannerList() const systInfo = wx.getSystemInfoSync(); @@ -115,6 +126,9 @@ path: 'jsek_banner\\jsek_homeBannerApplet', fields: { jsek_link: [] + }, + coverSize: { + width: 400 }, paging: { start: 0, @@ -646,10 +660,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