Commit 0f0a8943 authored by wangxuelai's avatar wangxuelai

'最新代码提交'

parent 5bf28b13
......@@ -17,6 +17,6 @@
</head>
<body>
<div id="root"></div>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1571940439010" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.js?1572261335909" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -5,11 +5,11 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "set OWNNER_ENV=dev&& webpack-dev-server",
"start": "set OWNNER_ENV=dev&& webpack-dev-server --progress",
"lint": "eslint --ext .js src",
"lib": "webpack --config webpackconfig/webpack.dll.config.js",
"test-build": "set OWNNER_ENV=test&& webpack --config webpackconfig/webpack.test.config.js",
"build": "set OWNNER_ENV=pro&& webpack --config webpackconfig/webpack.pro.config.js"
"lib": "webpack --config webpackconfig/webpack.dll.config.js --progress",
"test-build": "set OWNNER_ENV=test&& webpack --config webpackconfig/webpack.test.config.js --progress",
"build": "set OWNNER_ENV=pro&& webpack --config webpackconfig/webpack.pro.config.js --progress"
},
"author": "",
"license": "ISC",
......
......@@ -13,7 +13,7 @@ class CropperModal extends React.Component {
const {
uploadImgUrl, avatorUploader, cropperboxShow, getCropperUrl,
} = this.props;
const $dialogImg = $('#croppercontent').css({ height: '90%' }).find('img');
const $dialogImg = $('#croppercontent').css({ height: '100%' }).find('img');
setTimeout(() => {
$('#cropperimg').cropper(Object.assign({}, avatorUploader.cropper.config, {
// aspectRatio: options.aspectRatio,
......@@ -31,7 +31,7 @@ class CropperModal extends React.Component {
const rotate = parseInt(rotateData, 10);
const paramA = ['rotate', rotate].join(',');
const paramB = ['crop', `x_${x}`, `y_${y}`, `w_${w}`, `h_${h}`].join(',');
getCropperUrl(`image/resize,w_640/${paramA}/${paramB}`);
getCropperUrl(`image/resize,w_1280/${paramA}/${paramB}`);
},
}));
});
......
......@@ -4,6 +4,7 @@ import './index.less';
import 'antd/dist/antd.less'; // eslint-disable-line
import models from './models/index';
// 1. Initialize
const app = dva();
// 2. Pluginsss
// app.use({});
......@@ -17,6 +18,5 @@ for (const model in models) {
}
// 4. Router
app.router(require('./router').default);
// 5. Start
app.start('#root');
......@@ -75,7 +75,8 @@ export default {
url: signature.host,
};
const uploadImg = yield call(uploader.uploadImg, params);
const imgUrl = imagify(filename, 'image/resize,w_640');
// const imgUrl = imagify(filename, 'image/resize,w_640');
const imgUrl = imagify(filename);
yield put({
type: 'updateState',
payload: {
......
......@@ -3,7 +3,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const baseconfig = require('./webpackconfig/webpack.base.config.js');
module.exports = webpackMerge(baseconfig, {
entry: './src/index.js',
output: {
......@@ -15,6 +14,7 @@ module.exports = webpackMerge(baseconfig, {
contentBase: path.join(__dirname, '/'),
compress: true,
port: 80,
overlay: true
overlay: true,
compress: true, // 代码压缩
},
});
\ No newline at end of file
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