projectName是一个后台管理系统,是供应链(TS)生态中的一环
git clone http://gitlab.sftcwl.com/speed/fe-speed.git
git submodule init
git submodule updat
cd common-base
git checkout --track origin/speed_dev_zhangjing
cd ..
npm install
// src/config/proxy.conf.js
// 前端根据接口文档模拟的数据地址
const mock = 'http://gz-loc-development00.gz.sftcwl.com:7300/mock/5cc17532cf3b914cf60a6043/management';
// 后端提供的可联调环境
const rdName = 'http://gz-loc-development00.gz.sftcwl.com:9991';
module.exports = {
'/user': mock, // 匹配到以/user开头的url,代理到mock域名
'/management': rdName, // 匹配到以/management开头的url,代理到rdName域名
};
npm run start
npm run build
// src/config/deploy.conf.js
const deployCfg = {
rdName: {
receiver: 'http://10.188.40.14:9444/receiver.php',
root: '/home/rdName/odp_speed/',
},
};
module.exports = deployCfg;
npm run deploy rdName
├── common-base 公共模块(不可修改)
├── pass 前端登陆服务模块
├── dist 打包生成
├── src 业务开发模块
├── ├── components UI类组件
├── ├── config 配置文件
├── ├── containers 容器类组件(对component的组合)
├── ├── state 公共状态管理
├── ├── static 静态资源
├── ├── theme 全局样式
├── ├── translations 国际化语言
├── ├── utils 工具函数
react相关
UI库
国际化语言
工具库
不可变对象