Commit 5ffc7e0e by 张立顺

fix 重复点击路径的问题

1 parent 838ad42e
...@@ -1013,6 +1013,7 @@ Component({ ...@@ -1013,6 +1013,7 @@ Component({
// } // }
// }, // },
navGo: throttle(async function (e) { navGo: throttle(async function (e) {
// debugger
// wx.$util.showLoading('跳转中...') // wx.$util.showLoading('跳转中...')
let { let {
mode, mode,
...@@ -1025,9 +1026,13 @@ Component({ ...@@ -1025,9 +1026,13 @@ Component({
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
// 如果 item.path 相同,则不执行后续跳转 // 如果 item.path 相同,则不执行后续跳转
if (item.path === lastPath) { if (item.path === lastPath) {
console.log('路径一样');
return; // 直接返回,不执行后续逻辑 return; // 直接返回,不执行后续逻辑
} }
// 解决路径不清空问题
setTimeout(() => {
lastPath = null
}, 2000)
lastPath = item.path; // 更新上一次的路径 lastPath = item.path; // 更新上一次的路径
if (item.path) { if (item.path) {
if (item.menuText == "驻店目标") { if (item.menuText == "驻店目标") {
......
...@@ -3,7 +3,7 @@ import api from "~/api/api.js"; ...@@ -3,7 +3,7 @@ import api from "~/api/api.js";
let eventRequest = []; let eventRequest = [];
const checkDailyReport = async (sceneType) => { const checkDailyReport = async (sceneType) => {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
// debugger
// 判读是否要填写日报 // 判读是否要填写日报
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
// 判断员工是否已打卡上班 // 判断员工是否已打卡上班
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!