The WEB version of the Little Fox GPT paid creation system defaults to require the official account to follow and log in. I have always wanted to change it to the account password login form. Continue to view the interface part
Interface for obtaining system setting information
/web.php/login/system
Take x-site from the header as the sitecode, if you can’t get it, the default is 1
Find the setting data from the setting table, as follows sql
select * from setting where site_id=1
Take out the web field, which is the stored json data and parse it
The data extracted from this place is the information configured in the management background, and the front end displays and processes according to the configured information
Interface for obtaining user information
/web.php/user/info
This interface is authenticated by authority, inherits a Base controller, and verifies the login authority in the parent constructor
Take the x-token from the header as the session id, take out the user data stored in the session, and report errno: 403, message: "Please log in" if you can't get it
Get data from the user table, such as the following sql
select * from fox_chatgpt_user where site_id=1 and id=1
Display the user's nickname, avatar, and other user information
The front end displays the QR code of the WeChat official account according to the status of not logged in, forcing users to scan the code to follow