search

Home  >  Q&A  >  body text

javascript - Has anyone encountered the following problems when making WeChat payment on web pages?

Single page application made with react, embedded in WeChat. When calling WeChat's JSAPI, a problem as shown in the figure appeared in the online test. After google, it was said that it was due to a routing problem. Some friends said that they can pay normally after refreshing, but I can't pay even after refreshing. . . . Please tell me, is it a front-end configuration issue?

Take a look, this is the JS code I introduced from the official website.


Some people say that this is the reason, because the single-page routing switches the hash, so it needs to be re-initialized, but I don’t know how to re-initialize it.

高洛峰高洛峰2705 days ago727

reply all(1)I'll reply

  • 習慣沉默

    習慣沉默2017-07-05 10:41:27

    /q/10...

    Routing problem, try adding # in front of it?

    reply
    0
  • Cancelreply