解决方法
出现问题:在使用微信开发者工具时使用 redirectTo跳转至首页,跳转成功;但是转成真机测试,跳转失败。
setTimeout(() => {
_this.$u.route({
url: '/pages/home/index',
type: 'redirectTo'
})
}, 500)
解决方法:
redirectTo换成reLaunch
redirectTo:关闭当页面,打开到应用内的某个页面。
reLaunch:关闭所有页面,打开一个新的页面。
setTimeout(() => {
_this.$u.route({
url: '/pages/home/index',
type: 'reLaunch'
})
}, 500)