onSubmit(values) {
uni.redirectTo({
url: '/pages/main'
});
}
- 发布:2024-09-13 11:08
- 更新:2025-01-17 18:12
- 阅读:442
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows10
HBuilderX类型: 正式
HBuilderX版本号: 4.26
浏览器平台: Chrome
浏览器版本: 128.0.6613.137
项目创建方式: HBuilderX
操作步骤:
预期结果:
正常跳转
正常跳转
实际结果:
chunk-vendors.js:31372 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
at as (chunk-vendors.js:31372:12)
at vs (chunk-vendors.js:31478:9)
at Is (chunk-vendors.js:31485:14)
at invoke (chunk-vendors.js:31565:29)
at S (chunk-vendors.js:33945:506329)
at O (chunk-vendors.js:33945:507319)
at chunk-vendors.js:33945:411066
at new Promise (<anonymous>)
at Object.redirectTo (chunk-vendors.js:33945:411032)
at eval (login.vue:272:1)
chunk-vendors.js:31372 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
at as (chunk-vendors.js:31372:12)
at vs (chunk-vendors.js:31478:9)
at Is (chunk-vendors.js:31485:14)
at invoke (chunk-vendors.js:31565:29)
at S (chunk-vendors.js:33945:506329)
at O (chunk-vendors.js:33945:507319)
at chunk-vendors.js:33945:411066
at new Promise (<anonymous>)
at Object.redirectTo (chunk-vendors.js:33945:411032)
at eval (login.vue:272:1)
bug描述:
我在第一次进入到app/H5的登录界面时候,使用登录按钮进行页面跳转,会报错
chunk-vendors.js:31372 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
at as (chunk-vendors.js:31372:12)
at vs (chunk-vendors.js:31478:9)
at Is (chunk-vendors.js:31485:14)
at invoke (chunk-vendors.js:31565:29)
at S (chunk-vendors.js:33945:506329)
at O (chunk-vendors.js:33945:507319)
at chunk-vendors.js:33945:411066
at new Promise (<anonymous>)
at Object.redirectTo (chunk-vendors.js:33945:411032)
at eval (login.vue:272:1)
但如果我在onLoad或者onShow的时候跳转,或者onShow结束以后跳转,都可以正常跳转。且正常跳转以后,我退出登录回到登录界面,再次点击登录,就可以正常跳转。只有第一次进入页面或者刷新登录页面的时候不行
圆白菜 (作者)
项目问题:在绑定了云函数的云服务空间后,通过登录按钮调用uni.redirectTo无法跳转,但是在onload中调用可以跳转。
在解绑云函数并删除云函数文件,重新打包自定义基座后,问题消失
圆白菜 (作者)
您好,可以的,我这边也发现了问题的诱因,是我使用了云函数以后似乎就会有这个问题,我应该怎么把测试项目发过来呢
2024-09-19 15:00
DCloud_UNI_yuhe
回复 圆白菜: 你可以这样,尝试把相关的逻辑提取出来,新建一个测试项目发过来。
2024-09-19 15:36
DCloud_UNI_yuhe
在下方评论区有一个上传附件,可以上传压缩包
2024-09-19 15:37
圆白菜 (作者)
回复 DCloud_UNI_yuhe: 好的,我放到下面的评论里了
2024-09-19 15:55