Home > front end >  Call WeChat h5 after completion of payment, the browser history of back problems
Call WeChat h5 after completion of payment, the browser history of back problems

Time:10-13

Vue single-page applications, in the current page calls WeChat h5 payment last in detail the letter in the middle of the page, then pay to complete the return to the current page, but when the browser back into the middle page, how to remove the ring, a great god, please give some advice, thank you ~

CodePudding user response:

Pay a success callback to add a page jump

CodePudding user response:

Thank you reply, adjustable WeChat pay when I gave the callback page address, WeChat pay back to the callback after the completion of the page, the question now is when press the back button and enter the WeChat payment in the middle of the page, the way I currently use is in the back by routing blocking redirect, a bypass the problem,

CodePudding user response:

refer to the second floor weixin_39712109 response:
thank you for reply, tune up WeChat pay when I gave the callback page address, WeChat pay back to the callback after the completion of the page, the question now is when press the back button and enter the WeChat payment in the middle of the page, the way I currently use is in the back by routing blocking redirect, bypass the problem,

Hello, I now also encountered the same problem with you, is now on ios mobile phones have this problem, but not in the android machine, it is on the analysis of the problem, want to know whether to communicate with you in details under this problem?

CodePudding user response:

Const goBack=()=& gt; {
Window. The history. The go (3)
Window. The removeEventListener (" popstate ", goBack, false)
}
Window. The addEventListener (' popstate, goBack, false)
Const pushHistory=()=& gt; {
Var state={
Title: "title",
Url: "#"
}
Window. The history. PushState (state, "title", "#")
}
PushHistory ()
}

CodePudding user response:

Back through the routing interception when redirection, this how to do?

CodePudding user response:

Pay for success with this. $router. The replace () replace the middle pages of routing for success after the callback routing of the page
  • Related