通过vue框架重写卖座网
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
vue2.0+vuex+axios+router(vue全家桶)+es2015(es6)
直接请求接口,会出现跨域问题,所以中间加了一层server端,通过本地代理转发到server,然后才去请求真实的api
在config文件夹下的index.js进行配置
module.exports = {
dev: {
proxyTable: {
"/api":{
"target": "https://m.maizuo.com/v4/api/",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/api" : ""
}
},
},
}
}