restore mock/mock-server.js
This commit is contained in:
parent
efcd50cfea
commit
30d0ff0d44
|
@ -33,8 +33,10 @@ function unregisterRoutes() {
|
||||||
|
|
||||||
// for mock server
|
// for mock server
|
||||||
const responseFake = (url, type, respond) => {
|
const responseFake = (url, type, respond) => {
|
||||||
|
/** Mock-Server的Context */
|
||||||
|
const MOCK_SERVER_CONTEXT = '^' + process.env.VUE_APP_MOCK_SERVER_CONTEXT
|
||||||
return {
|
return {
|
||||||
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
|
url: new RegExp(`${MOCK_SERVER_CONTEXT}${url}`),
|
||||||
type: type || 'get',
|
type: type || 'get',
|
||||||
response(req, res) {
|
response(req, res) {
|
||||||
console.log('request invoke:' + req.path)
|
console.log('request invoke:' + req.path)
|
||||||
|
|
Loading…
Reference in New Issue