navigateTo跳转问题

小程序 文章 2021-02-04 14:01 426 0 全屏看文

AI助手支持GPT4.0

navigateTo跳转问题navigateTo jump problem

navigateTo跳转问题
框架类型 问题类型 终端类型 微信版本 基础库版本
小程序 Bug 微信iOS客户端 所有 所有

https://developers.weixin.qq.com/miniprogram/dev/apioute/wx.navigateTo.html


第一步:A navigateTo B第二步:B navigateTo C第三步:C redirectTo B(二三两步重复多次)问题:在B页面点击左上角返回按钮后重复多次返回到B,最后才返回到A。需求:这种情况能在B页面左上角点一次就回到A吗?


Framework type problem type terminal type wechat version basic library version applet bug wechat IOS client all https://developers.weixin.qq.com/miniprogram/dev/apioute/wx.navigateTo.html Step 1: a navigateto B step 2: B navigateto C step 3: C redirectto B (repeat two, three and two steps for many times) problem: click the return button in the upper left corner of B page and return to B for many times before returning to a. Requirement: can you click once in the top left corner of B page to return to a? Code snippet all

回答:

oneGod:
没有这种的,要么你就B redirectTo C,然后C redirectTo B,你多次B navigateTo C,路由页面栈中有多个,肯定是要多次返回B的


blah blah blah:

按照你现在的逻辑,B不能直接到A。因为B页面没有卸载。而且这种有重复的页面也不大好,最多有10层页面栈。

默垂眸:

C到B直接使用navigateBack返回不香吗

-EOF-

AI助手支持GPT4.0