Vue local mock data realizes rapid development of front-end and back-end separation

 

webpack.dev.conf.js configuration access local json

Directly in the component that needs to request data: Ajax call interface to access data 

 

 desc:

1: The json file is placed in the static directory

2: The interface format is agreed with the backend, and the backend interface is developed and replaced directly with the online interface.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324978656&siteId=291194637