27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
node版本 10.15.3(重点)
|
||
安装 cnpm 命令:
|
||
npm install -g cnpm --registry=https://registry.npm.taobao.org
|
||
|
||
cnpm install下载依赖包
|
||
|
||
|
||
本地调试时候: 静态文件全部放在public/static下
|
||
|
||
本项目使用vue-cli4 对应使用webpack4 配置文件在根目录的vue.config.js
|
||
|
||
npm run dev 在本地测试需要代理
|
||
在根目录的vue.config.js =>devServer=> proxy=> target中设置代理域名
|
||
不使用代理请求不了接口就没有数据显示,动态页面空白。
|
||
想要在生产环境看到打印的数据可以注释babel.config.js的plugins.push('transform-remove-console')
|
||
|
||
在浏览器输入商城网址
|
||
|
||
例如:
|
||
https://dev5.yunzshop.com/addons/yun_shop/?menu#/home?shop_id=1&type=5&mid=0&i=2
|
||
|
||
然后把https://dev5.yunzshop.com改成本地调试的localhost:8081
|
||
|
||
localhost:8081/addons/yun_shop/?menu#/home?shop_id=1&type=5&mid=0&i=2
|
||
可能会需要登录,登录后会跳转到线上地址,记得手动改回本地调试localhost:8081的地址
|
||
本地调试时记得是localhost:8081/addons/yun_shop/ 这个前缀路径否则会出现空白
|