Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5使用Taro.navigateTo,如果通过?携带参数,会报错 #16895

Open
tingchow opened this issue Nov 20, 2024 · 0 comments
Open

H5使用Taro.navigateTo,如果通过?携带参数,会报错 #16895

tingchow opened this issue Nov 20, 2024 · 0 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@tingchow
Copy link

tingchow commented Nov 20, 2024

相关平台

H5

复现仓库

[email protected]:tingchow/mozi_wechatapp.git
浏览器版本: Chrome 130.0.6723.117
使用框架: React

复现步骤

  1. npm run dev:h5
  2. 使用Taro.navigateTo({
    url: /pages/detail/index?symbol=BTC,
    }); 需要有?拼接参数
  3. 无法跳转,提示
    errMsg
    :
    "navigateTo:fail page /pages/detail/index?symbol=BTC is not found"

期望结果

url携带参数可正常跳转

实际结果

携带参数无法跳转,并提示not found
image

环境信息

👽 Taro v3.6.29


  Taro CLI 3.6.29 environment info:
    System:
      OS: Windows 10 10.0.19045
    Binaries:
      Node: 16.20.2 - C:\Program Files\nodejs\node.EXE
      npm: 8.19.4 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.29 => 3.6.29
      @tarojs/components: 3.6.29 => 3.6.29
      @tarojs/helper: 3.6.29 => 3.6.29
      @tarojs/plugin-framework-react: 3.6.29 => 3.6.29
      @tarojs/plugin-html: ^3.6.29 => 3.6.29
      @tarojs/plugin-platform-alipay: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-h5: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-jd: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-qq: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-swan: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-tt: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-weapp: 3.6.29 => 3.6.29
      @tarojs/react: 3.6.29 => 3.6.29
      @tarojs/runtime: 3.6.29 => 3.6.29
      @tarojs/shared: 3.6.29 => 3.6.29
      @tarojs/taro: 3.6.29 => 3.6.29
      @tarojs/taro-loader: 3.6.29 => 3.6.29
      @tarojs/webpack5-runner: 3.6.29 => 3.6.29
      babel-preset-taro: 3.6.29 => 3.6.29
      eslint-config-taro: 3.6.29 => 3.6.29
      react: ^18.0.0 => 18.3.1

补充信息

微信小程序无问题,在H5模式下url携带参数无法跳转,不携带参数可正常跳转
Taro版本为3.6.29

@TheKonka TheKonka added V-3 Version - 3.x F-react Framework - React T-h5 Target - 编译到 H5 labels Nov 21, 2024
@github-project-automation github-project-automation bot moved this to Padding in H5 Nov 21, 2024
This was referenced Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Status: Padding
Development

No branches or pull requests

2 participants