Fox AI payment creation system chatgpt management background-front-end interface Vue source code environment construction

After the Little Fox AI paid creation system is set up, it can only be used by connecting to the WeChat official account. My official account has been connected to my own customer service system, and I can no longer connect to Xiaohu, so I want to modify the user login method.

Now in the background setting part, in addition to scanning the official account to log in, I want to add a login method, account password login.

edit source code

The background vue source code already exists, it is based on vue-admin-template, first deal with the development environment

npm install

configuration interface

The interface address part in the dev environment can be configured in .env.development

# just a flag
ENV = 'development'

# base api
VUE_APP_BASE_API = ''

If you fill in your own remote interface, an error cross-domain will be reported

Therefore, it is necessary to configure the proxy forwarding domain name in /vue.config.js, that is, the domain name part of the following part, which is forwarded by the proxy, so as to prevent cross-domain situations

proxy: {
  [process.env.VUE_APP_BASE_API]: {
    target: 'https://chatgpt.v1kf.com/admin.php/',
    changeOrigin: true,
    pathRewrite: {
      ['^' + process.env.VUE_APP_BASE_API]: ''
    }
  }
}

Excuting an order

npm run dev

You can successfully access the online interface in the development environment and directly modify the development interface

Guess you like

Origin blog.csdn.net/taoshihan/article/details/131930135