Commit ad7b1f2c authored by wangxuelai's avatar wangxuelai

''

parent feef70f3
const path = require('path');
let imagePath = '';
if (process.env.NODE_ENV == 'development') {
imagePath = "'/image/'";
} else if (process.env.NODE_ENV == 'testenv') {
imagePath = "'/image/'";
} else if (process.env.NODE_ENV == 'production') {
imagePath = "'https://cdn.img.shangjiadao.cn/qingxiao/biz/image/'";
}
export default {
"env": {
"development": {
......@@ -6,7 +14,15 @@ export default {
'_CDN_': '',
'ENVIRONMENT': 'dev',
// '__IMGCDN__': 'http://wxloss.oss-cn-hangzhou.aliyuncs.com/qingxiaobiz/'
'__IMGCDN__': 'https://cdn.img.shangjiadao.cn/qingxiao/biz/image/'
'__IMGCDN__': '/image/'
}
},
"testenv": {
define: {
'_CDN_': '',
'ENVIRONMENT': 'testenv',
// '__IMGCDN__': 'http://wxloss.oss-cn-hangzhou.aliyuncs.com/qingxiaobiz/'
'__IMGCDN__': '/image/'
}
},
"production": {
......@@ -22,7 +38,7 @@ export default {
],
"theme": {
"primary-color": "#1890FF",
"imagepath": process.env.NODE_ENV == 'production' ? "'https://cdn.img.shangjiadao.cn/qingxiao/biz/image/'" : "'http://localhost:80/image/'",
"imagepath": imagePath,
},
es5ImcompatibleVersions: true,
"proxy": {
......
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>轻校</title>
<link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills -->
<!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script>
<![endif]--><script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script><link href="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.css?1567680024317" rel="stylesheet"><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script></head><body><div id="root"></div><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.js?1567680024317" charset="utf-8"></script></body></html>
\ No newline at end of file
<![endif]-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<link href="/dist/index.css?1567756008842" rel="stylesheet">
<script src="/lib/vendor.dll.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script>
</head>
<body>
<div id="root"></div>
<script src="/dist/index.js?1567756008842" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -3,7 +3,7 @@
"scripts": {
"start": "set NODE_ENV=development&&set PORT=80 && roadhog server",
"build": "set NODE_ENV=production&&roadhog build",
"test-build": "set NODE_ENV=development&&roadhog build",
"test-build": "set NODE_ENV=testenv&&roadhog build",
"lint": "eslint --ext .js src test",
"precommit": "npm run lint",
"lib": "webpack --config webpackconfig/webpack.dll.config.js"
......
......@@ -13,6 +13,9 @@ if (ENVIRONMENT == 'pro') {
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
} else if (ENVIRONMENT == 'testenv') {
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
}
export default {
userRegister: `${api}service/user/register`,
......
......@@ -34,13 +34,13 @@ class Institutions extends React.Component {
<div className={pageStyles.rowinfo} span={20}>{schoolDetail.title}</div>
</div>
{schoolDetail.contact_people &&
<div className={pageStyles.rowline} gutter="32">
<div className={`${pageStyles.rowline} ${pageStyles.contactpeople}`} gutter="32">
<div className={pageStyles.rowinfotitle}>&nbsp;&nbsp;&nbsp;&nbsp;人:</div>
<div className={pageStyles.rowinfo}>{schoolDetail.contact_people}</div>
</div>
}
{schoolDetail.tel_phone &&
<div className={pageStyles.rowline} gutter="32">
<div className={`${pageStyles.rowline} ${pageStyles.contactpeople}`} gutter="32">
<div className={pageStyles.rowinfotitle}>联系方式:</div>
<div className={pageStyles.rowinfo}>{schoolDetail.tel_phone.join(',')}</div>
</div>
......
......@@ -21,6 +21,9 @@
display: flex;
align-items: center;
flex-flow:row wrap;
&.contactpeople {
align-items: flex-start;
}
}
.rowinfotitle {
color: rgba(0,0,0,0.65);
......
......@@ -157,7 +157,7 @@ class GoodsAddModal extends React.Component {
onCancel={this.close}
confirmLoading={submitting}
onOk={this.save}
className="modifyclassModal"
className="goodsaddModal"
maskClosable={false}
zIndex={110}
>
......
......@@ -404,10 +404,12 @@
cursor: pointer;
}
:global {
.ant-form-item {
margin-bottom: 0;
.ant-form-item-children {
padding-left: 0;
.goodsaddModal {
.ant-form-item {
margin-bottom: 0;
.ant-form-item-children {
padding-left: 0;
}
}
}
}
......
......@@ -10,6 +10,7 @@
.container {
min-height: 100vh;
background-color: #fff;
padding-left: 24px;
}
.content {
padding: 23px 25px 27px;
......
......@@ -23,7 +23,7 @@
:global {
.addstudentcontent {
.ant-form-item {
margin-bottom: 20px;
// margin-bottom: 20px;
}
}
}
\ No newline at end of file
......@@ -31,6 +31,23 @@ const proFile = {
}
}
};
const testFile ={
title: '轻校',
template: './public/index.ejs',
filename: '../index.html',
inject: false,
// hash: true,
files: {
CDN: '',
header: {
js: ["lib/vendor.dll.js"],
css: [ "dist/index.css" ]
},
footer: {
js: ["dist/index.js"]
}
}
};
const devFile ={
title: '轻校',
template: './public/index.ejs',
......@@ -49,13 +66,20 @@ const devFile ={
};
module.exports = function (config, env) {
const newConfig = config;
const production = process.env.NODE_ENV == 'production';
if (!production) { // 线下环境
// newConfig.output.filename = "[name].js";
// newConfig.output.path = path.resolve(__dirname, './dist');
// newConfig.output.publicPath = "dist/";
// const production = process.env.NODE_ENV == 'production';
const NODE_ENV = process.env.NODE_ENV;
let htmlOption;
if (NODE_ENV == 'development') { // 线下环境
newConfig.output.chunkFilename = "[name].js?[chunkhash:4]";
htmlOption = devFile;
} else if (NODE_ENV == 'testenv') {
newConfig.output.filename = "[name].js";
newConfig.output.path = path.resolve(__dirname, './dist');
newConfig.output.publicPath = "/dist/";
newConfig.output.chunkFilename = "[name].js?[chunkhash:6]";
htmlOption = testFile;
} else { // 线上环境
htmlOption = proFile;
newConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
......@@ -67,8 +91,6 @@ module.exports = function (config, env) {
newConfig.output.publicPath = "https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/";
newConfig.output.chunkFilename = "[name].js?[chunkhash:6]";
}
let htmlOption;
production ? htmlOption = proFile : htmlOption = devFile;
newConfig.plugins.push(new HtmlWebpackPlugin(htmlOption));
newConfig.plugins.push(new webpack.DllReferencePlugin({
context: __dirname,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment