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] route不能跳转(hidePage出错,获取不到ref),hash模式路径改变代码报错 #3115

Closed
hnsxxscyx opened this issue May 21, 2019 · 4 comments
Assignees

Comments

@hnsxxscyx
Copy link

hnsxxscyx commented May 21, 2019

报错信息:

index.esm.js?587d:2529 Uncaught (in promise) TypeError: Cannot read property 'style' of undefined
    at Route.hidePage (index.esm.js?587d:2529)
    at Route.componentWillReceiveProps (index.esm.js?587d:2509)

具体方法:

{
   key: "hidePage",
   value: function hidePage() {
     var dom = this.containerRef;
     dom.style.display = 'none';
   }
 }, 

已尝试移除所有页面就留俩,已taro update,已尝试init新项目复制代码进去,全是这一个错

跳转代码:

componentDidShow() {
    const sessionkey = Taro.getStorageSync("sessionkey")
    if (sessionkey) {
      set("sessionkey", sessionkey)
    } else {
      Taro.navigateTo({
        url: "/pages/account/login/index",
      })
    }
  }
@taro-bot
Copy link

taro-bot bot commented May 21, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@luckyadam luckyadam added the H5 label May 21, 2019
@taro-bot
Copy link

taro-bot bot commented May 21, 2019

CC @Littly

@Littly
Copy link
Contributor

Littly commented Jun 2, 2019

是在app.js中调用的Taro.navigateTo吗?

@taro-bot
Copy link

taro-bot bot commented Jun 8, 2019

Hello~

您的问题所提供的信息不足,我们无法定位到具体的问题。如果有空的话还请拔冗提供更具体的信息,否则这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@taro-bot taro-bot bot removed the to be closed label Jun 10, 2019
@taro-bot taro-bot bot closed this as completed Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants