Commit d4392056 authored by baixian's avatar baixian

优化

parents 8115a426 de9fc01c
......@@ -13,3 +13,4 @@ src/utils/calendar.js
src/common/blacklist
js/
webpackconfig/
run.js
\ No newline at end of file
......@@ -11,7 +11,7 @@
<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>
<script src="/js/ueeditor/ueditor.config.js?20200102" charset="utf-8"></script><script src="/js/ueeditor/ueditor.all.js?20200102" charset="utf-8"></script>
<script src="js/console-polyfill.js?20200102" charset="utf-8"></script><script src="js/es6-shim.min.js?20200102" charset="utf-8"></script><script src="js/es5-shim.js?20200102" charset="utf-8"></script><script src="js/es5-sham.min.js?20200102" charset="utf-8"></script><script src="js/json3.min.js?20200102" charset="utf-8"></script><script src="js/html5shiv.min.js?20200102" charset="utf-8"></script><script src="js/polyfill.js?20200102" charset="utf-8"></script><script src="lib/vendor.dll.js?20200102" charset="utf-8"></script>
</head>
......@@ -19,4 +19,4 @@
<body>
<div id="root"></div>
<script type="text/javascript" src="./dist/main.9a004d.js"></script></body>
</html>
\ No newline at end of file
</html>
......@@ -69,7 +69,9 @@
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "7.0.0-beta.3",
"babel-preset-react": "7.0.0-beta.3",
"child_process": "^1.0.2",
"clean-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^3.0.1",
"css-loader": "^3.2.0",
"eslint": "^6.5.1",
"eslint-config-airbnb": "16.1.0",
......@@ -80,13 +82,18 @@
"eslint-plugin-react": "^7.16.0",
"file-loader": "^4.2.0",
"html-webpack-plugin": "^3.2.0",
"inquirer": "^7.0.1",
"jsx-loader": "^0.13.2",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"node-cmd": "^3.0.0",
"node-run-cmd": "^1.0.1",
"postcss-loader": "^3.0.0",
"rxjs": "^6.5.4",
"style-loader": "^1.0.0",
"url-loader": "^2.2.0",
"webpack": "^4.41.2",
"webpack-alioss-plugin": "^2.2.5",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2",
......
// var inquirer = require('inquirer');
// var Rx = require('rxjs');
// var nodeCmd = require('node-cmd');
let nodeCmd = require('child_process');
// var prompts = new Rx.Subject();
// inquirer.prompt(prompts);
nodeCmd.exec('npm run start');
// nodeCmd.run('npm run start');
// var prompList = [
// {
// type:'rawlist',
// message:'请选择您需要的打包指令',
// name:'cmd',
// choices: [
// {
// key: "A",
// name: "开发",
// value: "1"
// },
// {
// key: "B",
// name: "测试环境",
// value: "2"
// },
// {
// key: "C",
// name: "打包线上环境并【手动上线】",
// value: "3"
// },
// {
// key: "D",
// name: "打包线上环境并【自动上线】",
// value: "4"
// }
// ]
// }
// ]
// inquirer.prompt(prompList).then(answers=>{
// const { cmd } = answers;
// switch (Number(cmd)) {
// case 1:
// console.log('ssss');
// nodeCmd.run('npm run start');
// prompts.complete();
// // nodeCmd.run('set OWNNER_ENV=dev&& webpack-dev-server --progress');
// break;
// case 2:
// console.log(2, '2');
// break;
// case 3:
// console.log(3, '3');
// break;
// case 4:
// confirmPsd();
// break;
// }
// })
// function confirmPsd () {
// prompts.next({
// type: "password", // 密码为密文输入
// message: "请输入密码:",
// name: "pwd"
// }).then(res=>{
// if (res.pwd == 'shangjiadao') {
// console.log('密码正确')
// } else {
// console.log('密码错误');
// }
// });
// }
\ No newline at end of file
......@@ -10,6 +10,7 @@ class Errorpage extends React.Component {
componentWillUnmount() { // 卸载
}
goback = () => {
console.log('dsadasdsa');
const {
dispatch,
} = this.props;
......@@ -18,7 +19,7 @@ class Errorpage extends React.Component {
render() {
return (
<div className={errorPageStyle.errorpage}>
<img className={errorPageStyle.fade} src={`${__IMGCDN__}qxlogo.png`} alt="商家岛" />
<img className={errorPageStyle.fade} src={`${__IMGCDN__}qxlogo.png`} alt="商试试家岛" />
<div>
<h1 className="fade">温馨提示:该页面无法访问!</h1>
<p className="fade">请确认您是否有这个权限或者页面链接是否正确。
......
......@@ -1059,7 +1059,7 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 8, offset: 0 }} lg={{ span: 4, offset: 0 }} xl={{ span: 4, offset: 0 }} xxl={{ span: 4, offset: 0 }}>
<div className={pageStyle.fasterItem} onClick={this.createTheme}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon1.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon1.png?v=1`} alt="" />
</div>
<span>新建作业打卡</span>
</div>
......@@ -1067,7 +1067,7 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 8, offset: 0 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }} xxl={{ span: 4, offset: 1 }}>
<div className={pageStyle.fasterItem} onClick={this.createCalendarTheme}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon2.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon2.png?v=1`} alt="" />
</div>
<span>新建日历打卡</span>
</div>
......@@ -1075,7 +1075,7 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 8, offset: 0 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }} xxl={{ span: 4, offset: 1 }}>
<div className={pageStyle.fasterItem} onClick={this.createUnlockTheme}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon3.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon3.png?v=1`} alt="" />
</div>
<span>新建闯关打卡</span>
</div>
......@@ -1083,7 +1083,7 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 8, offset: 0 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }} xxl={{ span: 4, offset: 1 }}>
<div className={pageStyle.fasterItem} onClick={() => this.setModal1Visible(true)}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon4.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon4.png?v=1`} alt="" />
</div>
<span>学员报名</span>
</div>
......@@ -1091,7 +1091,7 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 8, offset: 0 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }} xxl={{ span: 4, offset: 1 }}>
<div className={pageStyle.fasterItem} onClick={this.createClass}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon5.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon5.png?v=1`} alt="" />
</div>
<span>新建班级</span>
</div>
......@@ -1101,7 +1101,7 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 8, offset: 0 }} lg={{ span: 4, offset: 0 }} xl={{ span: 4, offset: 0 }} xxl={{ span: 4, offset: 0 }}>
<div className={pageStyle.fasterItem} onClick={this.createCourse}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon6.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon6.png?v=1`} alt="" />
</div>
<span>新建课程</span>
</div>
......@@ -1110,7 +1110,7 @@ class StaticCenter extends React.Component {
<div className={pageStyle.fasterItem} onClick={this.goCallStudent}>
<Badge className={pageStyle.fasterNum} overflowCount={999} count={callData.total}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon7.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon7.png?v=1`} alt="" />
</div>
</Badge>
<span>点名提醒</span>
......@@ -1121,7 +1121,7 @@ class StaticCenter extends React.Component {
<div className={pageStyle.fasterItem} onClick={this.goPlanStudent}>
<Badge className={pageStyle.fasterNum} overflowCount={999} count={assign.total}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon8.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon8.png?v=1`} alt="" />
</div>
</Badge>
<span>分配提醒</span>
......@@ -1133,7 +1133,7 @@ class StaticCenter extends React.Component {
<div className={pageStyle.fasterItem} onClick={this.goBirthStudent}>
<Badge className={pageStyle.fasterNum} overflowCount={999} count={birthday.total}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon9.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon9.png?v=1`} alt="" />
</div>
</Badge>
<span>生日提醒</span>
......@@ -1144,7 +1144,7 @@ class StaticCenter extends React.Component {
<div className={pageStyle.fasterItem} onClick={this.goLeaveShow}>
<Badge className={pageStyle.fasterNum} overflowCount={999} count={leaveNum}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon10.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon10.png?v=1`} alt="" />
</div>
</Badge>
<span>请假提醒</span>
......@@ -1157,7 +1157,7 @@ class StaticCenter extends React.Component {
<div className={pageStyle.fasterItem} onClick={this.goDeadlineStudent}>
<Badge className={pageStyle.fasterNum} overflowCount={999} count={renew.total}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon11.png`} alt="" />
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon11.png?v=1`} alt="" />
</div>
</Badge>
<span>续费提醒</span>
......
......@@ -61,7 +61,7 @@ const devFile ={
module.exports = {
output: {
filename: "[name].[chunkhash:6].js",
chunkFilename: '[name].[chunkhash:6].js?',
chunkFilename: '[name].[chunkhash:6].js',
},
module: {
rules: [
......
......@@ -4,6 +4,7 @@ const webpack = require('webpack');
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const AliOSSPlugin = require('webpack-alioss-plugin');
module.exports = webpackMerge(baseconfig, {
entry: path.resolve(__dirname, "../src/index.js"),
output: {
......@@ -13,6 +14,17 @@ module.exports = webpackMerge(baseconfig, {
mode: 'production',
plugins: [
// new BundleAnalyzerPlugin(),
new AliOSSPlugin({
auth: {
accessKeyId: 'LTAI4FtdH3qGfmYDsS4v3rLQ', // 在阿里 OSS 控制台获取
accessKeySecret: '97Twol7f03gRUM4kbwP8r1n1v0rNBZ', // 在阿里 OSS 控制台获取
region: 'oss-cn-hangzhou', // OSS 服务节点, 示例: oss-cn-hangzhou
bucket: 'shangjiadao', // OSS 存储空间, 在阿里 OSS 控制台获取
},
removeMode: false,
ossBaseDir: 'qingxiao',
project: 'biz/dist', // 项目名(用于存放文件的直接目录)
}),
new CleanWebpackPlugin(),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
......
const webpackMerge = require('webpack-merge');
const baseconfig = require('./webpack.base.config.js');
const webpack = require('webpack');
const CompressionPlugin = require('compression-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const AliOSSPlugin = require('webpack-alioss-plugin');
const path = require('path');
module.exports = webpackMerge(baseconfig, {
entry: path.resolve(__dirname, "../src/index.js"),
output: {
path: path.resolve(__dirname, "../dist"), // string
publicPath:'./dist/',
publicPath:'https://wxloss.oss-cn-hangzhou.aliyuncs.com/qingxiao/biz/dist/',
},
mode: 'production',
plugins: [
// new CleanWebpackPlugin({
// cleanOnceBeforeBuildPatterns: ['./dist']
// new AliOSSPlugin({
// auth: {
// accessKeyId: 'LTAI4FmLMfEmhVZr5kqxTyqv', // 在阿里 OSS 控制台获取
// accessKeySecret: 'OBSXfkmc7Zb21Jw7BhPRrZuq5e4hvY', // 在阿里 OSS 控制台获取
// region: 'oss-cn-hangzhou', // OSS 服务节点, 示例: oss-cn-hangzhou
// bucket: 'wxloss', // OSS 存储空间, 在阿里 OSS 控制台获取
// },
// removeMode: false,
// ossBaseDir: 'qingxiao',
// project: 'biz/dist', // 项目名(用于存放文件的直接目录)
// }),
new CleanWebpackPlugin(),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
// manifest: require('../lib/vendor-manifest.json'),
......
This diff is collapsed.
This diff is collapsed.
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