Commit 524a4348 by 李伟康

fix(api/components): 修复 HTTP 请求和消息提示相关问题

- 在 HTTP 请求中添加方法日志输出
- 优化首页左侧组件的跟踪功能和跳转逻辑
- 修复组件生命周期中的定时器管理问题
1 parent 5f10cadf
......@@ -79,6 +79,7 @@ class Request {
return;
}
if (code == 20 || code == 21) {
console.log(params.method)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading();
......
......@@ -191,6 +191,7 @@ export default {
})
},
startTrack () {
if(this.trackInterval) clearInterval(this.trackInterval)
this.trackInterval = setInterval(() => {
this.leaveTrack()
}, 5000)
......@@ -225,6 +226,7 @@ export default {
this.$emit('closeTips')
try {
jumpUrl = await this.findBeiSenSSOToken()
this.jumpUrl = jumpUrl
} catch (error) {
console.log(error)
}
......@@ -350,6 +352,11 @@ export default {
},
beforeCreate () {
clearInterval(this.trackInterval)
this.trackInterval = null
},
beforeDestroy() {
clearInterval(this.trackInterval)
this.trackInterval = null
},
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!