Home > Article > Web Front-end > What to do if uniapp jump is invalid
Solution to invalid uniapp jump: If the path to jump is in the tabBar in pages.json, you need to use [uni.switchTab] to jump, the code is [let page = getCurrentPages().pop ();].
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version. This method is suitable for all brands of computers.
Recommended (free): uni-app development tutorial
Solution to invalid uniapp jump:
In a In the interface, uni.navigateTo
is used to jump, but the jump does not respond.
this.$request(this.$api['xxxx/xxxxxx'], this.journeyMessage, res =>{ uni.navigateTo({ url: '/pages/journey/journeyList' }); console.log('11111111111111') })
is debugged and found that the code is executed, but has no effect.
Finally refer to the online boss Found:
If the path to jump is in the tabBar in pages.json, you need to use uni.switchTab
to jump
But use uni.switchTab to jump The transfer will not refresh,
uni.switchTab({ url:'', success:(res)=> { let page = getCurrentPages().pop(); //跳转页面成功之后 if (!page) return; page.loadData(); //如果页面存在,则重新刷新页面 } });
Related free learning recommendations: php programming (video)
The above is the detailed content of What to do if uniapp jump is invalid. For more information, please follow other related articles on the PHP Chinese website!