The payment in vue jumps out of the chain. After re-entering the vue, click return to enter the payment.

problem description

in a vue mobile development project, send a payment request on the order page and send an address returned by . After receiving the request, the backend returns the payment address according to the payment method, and the client jumps to that address (open Alipay or Wechat or something), and the payment is successfully returned to the client.

Click the back button and you will return to the payment page. Is there any good way to do this?

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

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

May.27,2022

vue has a beforeRouteEnter hook to determine the source

beforeRouteEnter (to, from, next) {
   if (from.path == '/') {
     // ()
   }
   next()
}

from.path = ='/', the trigger condition is that someone else enters through location.href or outside (that is, not through this.$router.push)

Menu