Commit ad7b1f2c authored by wangxuelai's avatar wangxuelai

''

parent feef70f3
const path = require('path'); 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 { export default {
"env": { "env": {
"development": { "development": {
...@@ -6,7 +14,15 @@ export default { ...@@ -6,7 +14,15 @@ export default {
'_CDN_': '', '_CDN_': '',
'ENVIRONMENT': 'dev', 'ENVIRONMENT': 'dev',
// '__IMGCDN__': 'http://wxloss.oss-cn-hangzhou.aliyuncs.com/qingxiaobiz/' // '__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": { "production": {
...@@ -22,7 +38,7 @@ export default { ...@@ -22,7 +38,7 @@ export default {
], ],
"theme": { "theme": {
"primary-color": "#1890FF", "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, es5ImcompatibleVersions: true,
"proxy": { "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> <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> <![endif]-->
\ No newline at end of file <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 @@ ...@@ -3,7 +3,7 @@
"scripts": { "scripts": {
"start": "set NODE_ENV=development&&set PORT=80 && roadhog server", "start": "set NODE_ENV=development&&set PORT=80 && roadhog server",
"build": "set NODE_ENV=production&&roadhog build", "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", "lint": "eslint --ext .js src test",
"precommit": "npm run lint", "precommit": "npm run lint",
"lib": "webpack --config webpackconfig/webpack.dll.config.js" "lib": "webpack --config webpackconfig/webpack.dll.config.js"
......
...@@ -13,6 +13,9 @@ if (ENVIRONMENT == 'pro') { ...@@ -13,6 +13,9 @@ if (ENVIRONMENT == 'pro') {
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/'; // dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
api = 'https://test.wp53.cn/v2/api/'; api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/'; 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 { export default {
userRegister: `${api}service/user/register`, userRegister: `${api}service/user/register`,
......
...@@ -34,13 +34,13 @@ class Institutions extends React.Component { ...@@ -34,13 +34,13 @@ class Institutions extends React.Component {
<div className={pageStyles.rowinfo} span={20}>{schoolDetail.title}</div> <div className={pageStyles.rowinfo} span={20}>{schoolDetail.title}</div>
</div> </div>
{schoolDetail.contact_people && {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.rowinfotitle}>&nbsp;&nbsp;&nbsp;&nbsp;人:</div>
<div className={pageStyles.rowinfo}>{schoolDetail.contact_people}</div> <div className={pageStyles.rowinfo}>{schoolDetail.contact_people}</div>
</div> </div>
} }
{schoolDetail.tel_phone && {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.rowinfotitle}>联系方式:</div>
<div className={pageStyles.rowinfo}>{schoolDetail.tel_phone.join(',')}</div> <div className={pageStyles.rowinfo}>{schoolDetail.tel_phone.join(',')}</div>
</div> </div>
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-flow:row wrap; flex-flow:row wrap;
&.contactpeople {
align-items: flex-start;
}
} }
.rowinfotitle { .rowinfotitle {
color: rgba(0,0,0,0.65); color: rgba(0,0,0,0.65);
......
...@@ -157,7 +157,7 @@ class GoodsAddModal extends React.Component { ...@@ -157,7 +157,7 @@ class GoodsAddModal extends React.Component {
onCancel={this.close} onCancel={this.close}
confirmLoading={submitting} confirmLoading={submitting}
onOk={this.save} onOk={this.save}
className="modifyclassModal" className="goodsaddModal"
maskClosable={false} maskClosable={false}
zIndex={110} zIndex={110}
> >
......
...@@ -404,10 +404,12 @@ ...@@ -404,10 +404,12 @@
cursor: pointer; cursor: pointer;
} }
:global { :global {
.ant-form-item { .goodsaddModal {
margin-bottom: 0; .ant-form-item {
.ant-form-item-children { margin-bottom: 0;
padding-left: 0; .ant-form-item-children {
padding-left: 0;
}
} }
} }
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
.container { .container {
min-height: 100vh; min-height: 100vh;
background-color: #fff; background-color: #fff;
padding-left: 24px;
} }
.content { .content {
padding: 23px 25px 27px; padding: 23px 25px 27px;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
:global { :global {
.addstudentcontent { .addstudentcontent {
.ant-form-item { .ant-form-item {
margin-bottom: 20px; // margin-bottom: 20px;
} }
} }
} }
\ No newline at end of file
...@@ -31,6 +31,23 @@ const proFile = { ...@@ -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 ={ const devFile ={
title: '轻校', title: '轻校',
template: './public/index.ejs', template: './public/index.ejs',
...@@ -49,13 +66,20 @@ const devFile ={ ...@@ -49,13 +66,20 @@ const devFile ={
}; };
module.exports = function (config, env) { module.exports = function (config, env) {
const newConfig = config; const newConfig = config;
const production = process.env.NODE_ENV == 'production'; // const production = process.env.NODE_ENV == 'production';
if (!production) { // 线下环境 const NODE_ENV = process.env.NODE_ENV;
// newConfig.output.filename = "[name].js"; let htmlOption;
// newConfig.output.path = path.resolve(__dirname, './dist'); if (NODE_ENV == 'development') { // 线下环境
// newConfig.output.publicPath = "dist/";
newConfig.output.chunkFilename = "[name].js?[chunkhash:4]"; 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 { // 线上环境 } else { // 线上环境
htmlOption = proFile;
newConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({ newConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({
compress: { compress: {
warnings: false, warnings: false,
...@@ -67,8 +91,6 @@ module.exports = function (config, env) { ...@@ -67,8 +91,6 @@ module.exports = function (config, env) {
newConfig.output.publicPath = "https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/"; newConfig.output.publicPath = "https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/";
newConfig.output.chunkFilename = "[name].js?[chunkhash:6]"; newConfig.output.chunkFilename = "[name].js?[chunkhash:6]";
} }
let htmlOption;
production ? htmlOption = proFile : htmlOption = devFile;
newConfig.plugins.push(new HtmlWebpackPlugin(htmlOption)); newConfig.plugins.push(new HtmlWebpackPlugin(htmlOption));
newConfig.plugins.push(new webpack.DllReferencePlugin({ newConfig.plugins.push(new webpack.DllReferencePlugin({
context: __dirname, 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