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.