Get code,openid from the page loaded by view in WeChat Mini Programs

We made a web game and wanted to encapsulate it as WeChat Mini Programs. What I want to achieve is to use Wechat"s web page to get code and get openid.
first go to a blank page. When you jump to another page, call up the Wechat authorization page and get the code.
this process has bothered me for a long time, asking my old friend to give me an idea

Mar.09,2021
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-1b3cff9-2c355.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-1b3cff9-2c355.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?