bztang-h5/开发.txt

27 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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/ 这个前缀路径否则会出现空白