html52.com
我爱小程序-开发者交流社区

wx.redirectTo 有时候不跳转

问题模块 框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
API和组件 小程序 Bug redirectTo 工具 6.5.3 2.0.0

- 当前 Bug 的表现(可附上截图)


- 预期表现


- 复现路径


- 提供一个最简复现 Demo


wx.redirectTo({

url: '../../pages/list/list?token=' + that.globalData.token + '&username=' + res.data.body.companyName,

success:function(res){

console.log('requestIfBind success', res)

},

fail:function(res){

console.log('requestIfBind fail', res)

},

complete:function(res){

console.log('requestIfBind complete', res)

}

})

}


重复进入页面有时候就会不跳转,success 都有执行

网友回复

微盟:

排查下二次进入页面时,that.globalData.token res.data.body.companyName的值是否异常,打印看下

松:

url 用绝对路径试试

是小白啊:

麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付