This is a background management system built by vue+vuex+vue-router+axios+elementUI. Tianjia has the function of controlling routing permissions by >obtaining permissions from the background. However, because it does not have a background, it can only obtain false data from the local >data. To simulate obtaining data from the background, in fact, you can set fake data from the locally enabled node service. However, in order to introduce > everyone to a json-server front-end, a package that is often used to simulate fake data so that it does not work with other > One when building webpack The global simulation of fake data has been implemented to reduce the time for front-end and back-end debugging, so we apologize for the trouble caused by installing an additional package, but it can also bring a lot of convenience to the future work of the front-end. I also used webpack. The requirement of decentralized thinking. To load files using the context (parameter 1, parameter 2, parameter 3) method, you only need to add the file of the corresponding rule. There is no need to manually add and introduce it. If you have any good suggestions for this shelf or you don’t understand, you can add me on the microblog. Signal(1932488122).
# 先本地全局安装json-server包
npm install -g json-server
# 再从新启用一个 命令行窗口 启动一个node的服务
json-server --watch db.json
# 安装项目的依赖包
npm install
# 开始运行项目(开发环境可以通过config里的index.js文件的的proxyTable对象里边设置代理跨域)
npm run dev
# 上线部署的时候打包命令
npm run build