vue-element-admin login report template 405 Error Request failed with status code 405

1, open main.js

cd vue-element-admin/src

vim main.js

2, will be "production" into a "development" can

import { mockXHR } from ‘…/mock’
 if (process.env.NODE_ENV === ‘production’) {
mockXHR()
}

3, when the step 2 is unsuccessful, the deleted sentence is determined, i.e.,

import { mockXHR } from ‘…/mock’
// if (process.env.NODE_ENV === ‘production’) {
mockXHR()
// }

Guess you like

Origin www.cnblogs.com/celiany/p/12158071.html
405