History.push () can jump in Wechat developer tools, but not in Wechat.

problem description

history.push ("/ test") can be redirected in Wechat developer tools, but not in Wechat on mobile. Is it a question of compatibility?

the environmental background of the problems and what methods you have tried

the web website in Wechat"s official account needs to be redirected in js. Now I have written a history to realize the route jump

.

related codes

history.js
import createHistory from "history/createBrowserHistory";
export default createHistory();

A.js
import history from "./history"
getEvent = () => {
    post("url",params).then(data => {
        //post
        if(){
            history.push("/test");
        }
    })
}

what result do you expect? What is the error message actually seen?

Please give us some advice, great gods

Menu