1.0.1 • Published 3 years ago
yxz-portal-webui v1.0.1
云匣子标准版ui-portal工程
1.安装npm依赖库(使用node版本10、建议10.19.0)
npm install
注意:npm源使用淘宝源 - https://registry.npm.taobao.org/
2.拷贝config/index.js.bak文件为config/index.js,修改代理配置
test: {
'/3.0': {
target: 'https://192.168.1.11',
changeOrigin: true,
secure: false,
headers: {
'referer': 'https://192.168.1.11/',
'Origin':'https://192.168.1.11/'}
}
}
3.本地mock调试
npm run dev-local
4.本地连接服务器调试
npm run dev-test
5.构建前端代码
npm run publish
拓展(websocket服务联调)
将/src/tools/proxyTools.js文件中的代理服务器地址修改为联调的服务器地址
if(process.env.NODE_ENV !== 'production') {
tunnelURL = 'wss://192.168.1.11/ws';
}