Namespace uses getters to establish a quick access mode for sub-modules

Store /index.js file uses modules to manage sub-modules, and uses getters to establish a quick access to sub-modules

Getters.js quick access to file contents as shown in the figure below:

Actions call method

Import {mapActions} from 'vuex' import {mapActions} from 'vuex' import {mapActions} from 'vuex' mapActions(['user/login']) }Copy the code

Unified introduction of SVG

Sass: Variable life and use, variable scope scope

Axios:

1 Create an axios instance

  1. Request interceptors mainly deal with tokensUnified injection problem**

3. Responder interceptor Responder interceptors mainly deal with abnormal and normal data returned

The API introduces the request wrapped in Request.js under utils, and then makes the interface request

To set the background, write:

Set SRC alias to @ in vue.config.js

El-element UI modifier (this is no longer required, as it used to be required to add event operations, such as carriage returns, to the EL-Element UI)

Cross domain

  1. Local development environments cross domains

  1. Production environments cross domains