扫码进入小程序页面,通过携带的参数判断是否要跳转,结果跳转了两次?
发布于 5 年前 作者 liuyong 13104 次浏览 来自 问答

扫码进入小程序页面,通过携带的参数判断是否要跳转,结果连续跳转了两次,并且在第二次跳转的时候携带的参数为空

if (!that.isOrBind) {

	uni.navigateTo({

						url: '../../pages/choosingPets/choosingPets?type=4&scene=' + that.scene

					})

					this.scene = ''

				} else {

					console.log('跳转')

					uni.navigateTo({

						url: '../../pagesA/dogTagIndex/dogTagInfo?scene=' + that.scene

					})

					this.scene = ''

					console.log(this.scene)

				}

走else的时候,连续跳转了两次,但是congsole只打印一次,isOrBind是进入页面后请求来的

回到顶部