Where should I write the authorization of Wechat on a single page of vue-cli?

the project has a requirement for Wechat web page authorization just to get the openid,. I want to finish it in the front end. When I read the document, the request for code will be redirected to a link, so it"s a bit unclear where the authorization is at the entrance of the route. Please give me some ideas. Thank you

.
Mar.18,2021

Authorization is fine when user information is needed. You can write a separate empty page specifically for user authorization login
when it is detected that user authorization is required, jump to the empty page:

vm.$router.replace({
      path: '/login',
      query: {
        redirect: encodeURIComponent(vm.$route.fullPath)
      }
    })

return to the original page after successful authorization:

this.$router.replace(decodeURIComponent(redirectUrl))
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-1b3f9f3-2c48c.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-1b3f9f3-2c48c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?