The jump process of obtaining Wechat's silent authorization code in vue single-page application

my business scenario is: when it is determined that the web page is opened in Wechat, click the payment button to jump ( location.href ) to the Wechat authorization page to obtain code (silent form), then redirect to the payment page, and bring back code after the link. If the user steps back at this point, the authorization page will fall into a loop again. I use location.replace to jump to the authorization page. At this time, the user will no longer enter the authorization page. But it will go back to the payment page without code at the beginning, and the intuitive feeling to the user is that the back button is still on the payment page, and you must go back to the home page again. How can you modify this process?

Mar.03,2021

solved it? Friends

  • WeChat Pay is used for vue mobile projects.

    problem description premise is to introduce Wechat sdk using npm I-S weixin-js-sdk. On the required page import wx from weixin-js-sdk Code: mounted () { console.log(wx) } var timestamp = new Date().getTime() alertconsoleconsole.log succ...

    Apr.11,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea4f81-1d1c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea4f81-1d1c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?