Commit de9fc01c authored by wangxuelai's avatar wangxuelai

''

parent 9b4f7ef5
...@@ -13,3 +13,4 @@ src/utils/calendar.js ...@@ -13,3 +13,4 @@ src/utils/calendar.js
src/common/blacklist src/common/blacklist
js/ js/
webpackconfig/ webpackconfig/
run.js
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>轻校</title> <title>轻校</title>
<link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"> <link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png" >
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" /> <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Polyfills --> <!-- Polyfills -->
<!--[if lt IE 10]> <!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script> <script src="js/console-polyfill.js"></script>
<![endif]--> <![endif]-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script> <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.config.js?20200102" charset="utf-8"></script><script src="/js/ueeditor/ueditor.all.js?20200102" charset="utf-8"></script>
<script src="/js/ueeditor/ueditor.all.js?20200102" charset="utf-8"></script> <script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20200102" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20200102" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20200102" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20200102" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20200102" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20200102" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20200102" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20200102" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20200102" charset="utf-8"></script>
</head> </head>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="text/javascript" src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.b8f35f.js"></script> <script type="text/javascript" src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.fc13ed.js"></script></body>
</body>
</html> </html>
\ No newline at end of file
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
"babel-preset-es2015": "7.0.0-beta.3", "babel-preset-es2015": "7.0.0-beta.3",
"babel-preset-react": "7.0.0-beta.3", "babel-preset-react": "7.0.0-beta.3",
"child_process": "^1.0.2",
"clean-webpack-plugin": "^3.0.0", "clean-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^3.0.1",
"css-loader": "^3.2.0", "css-loader": "^3.2.0",
"eslint": "^6.5.1", "eslint": "^6.5.1",
"eslint-config-airbnb": "16.1.0", "eslint-config-airbnb": "16.1.0",
...@@ -80,13 +82,18 @@ ...@@ -80,13 +82,18 @@
"eslint-plugin-react": "^7.16.0", "eslint-plugin-react": "^7.16.0",
"file-loader": "^4.2.0", "file-loader": "^4.2.0",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"inquirer": "^7.0.1",
"jsx-loader": "^0.13.2", "jsx-loader": "^0.13.2",
"less": "^3.10.3", "less": "^3.10.3",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"node-cmd": "^3.0.0",
"node-run-cmd": "^1.0.1",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"rxjs": "^6.5.4",
"style-loader": "^1.0.0", "style-loader": "^1.0.0",
"url-loader": "^2.2.0", "url-loader": "^2.2.0",
"webpack": "^4.41.2", "webpack": "^4.41.2",
"webpack-alioss-plugin": "^2.2.5",
"webpack-bundle-analyzer": "^3.6.0", "webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.9", "webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2", "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 { ...@@ -10,6 +10,7 @@ class Errorpage extends React.Component {
componentWillUnmount() { // 卸载 componentWillUnmount() { // 卸载
} }
goback = () => { goback = () => {
console.log('dsadasdsa');
const { const {
dispatch, dispatch,
} = this.props; } = this.props;
...@@ -18,7 +19,7 @@ class Errorpage extends React.Component { ...@@ -18,7 +19,7 @@ class Errorpage extends React.Component {
render() { render() {
return ( return (
<div className={errorPageStyle.errorpage}> <div className={errorPageStyle.errorpage}>
<img className={errorPageStyle.fade} src={`${__IMGCDN__}qxlogo.png`} alt="商家岛" /> <img className={errorPageStyle.fade} src={`${__IMGCDN__}qxlogo.png`} alt="商试试家岛" />
<div> <div>
<h1 className="fade">温馨提示:该页面无法访问!</h1> <h1 className="fade">温馨提示:该页面无法访问!</h1>
<p className="fade">请确认您是否有这个权限或者页面链接是否正确。 <p className="fade">请确认您是否有这个权限或者页面链接是否正确。
......
...@@ -61,7 +61,7 @@ const devFile ={ ...@@ -61,7 +61,7 @@ const devFile ={
module.exports = { module.exports = {
output: { output: {
filename: "[name].[chunkhash:6].js", filename: "[name].[chunkhash:6].js",
chunkFilename: '[name].[chunkhash:6].js?', chunkFilename: '[name].[chunkhash:6].js',
}, },
module: { module: {
rules: [ rules: [
......
...@@ -4,6 +4,7 @@ const webpack = require('webpack'); ...@@ -4,6 +4,7 @@ const webpack = require('webpack');
const path = require('path'); const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; // const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const AliOSSPlugin = require('webpack-alioss-plugin');
module.exports = webpackMerge(baseconfig, { module.exports = webpackMerge(baseconfig, {
entry: path.resolve(__dirname, "../src/index.js"), entry: path.resolve(__dirname, "../src/index.js"),
output: { output: {
...@@ -13,6 +14,17 @@ module.exports = webpackMerge(baseconfig, { ...@@ -13,6 +14,17 @@ module.exports = webpackMerge(baseconfig, {
mode: 'production', mode: 'production',
plugins: [ plugins: [
// new BundleAnalyzerPlugin(), // 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 CleanWebpackPlugin(),
// new webpack.DllReferencePlugin({ // new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'), // context: path.resolve(__dirname, '../'),
......
const webpackMerge = require('webpack-merge'); const webpackMerge = require('webpack-merge');
const baseconfig = require('./webpack.base.config.js'); const baseconfig = require('./webpack.base.config.js');
const webpack = require('webpack'); const webpack = require('webpack');
const CompressionPlugin = require('compression-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const AliOSSPlugin = require('webpack-alioss-plugin');
const path = require('path'); const path = require('path');
module.exports = webpackMerge(baseconfig, { module.exports = webpackMerge(baseconfig, {
entry: path.resolve(__dirname, "../src/index.js"), entry: path.resolve(__dirname, "../src/index.js"),
output: { output: {
path: path.resolve(__dirname, "../dist"), // string path: path.resolve(__dirname, "../dist"), // string
publicPath:'./dist/', publicPath:'https://wxloss.oss-cn-hangzhou.aliyuncs.com/qingxiao/biz/dist/',
}, },
mode: 'production', mode: 'production',
plugins: [ plugins: [
// new CleanWebpackPlugin({ // new AliOSSPlugin({
// cleanOnceBeforeBuildPatterns: ['./dist'] // 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({ // new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'), // context: path.resolve(__dirname, '../'),
// manifest: require('../lib/vendor-manifest.json'), // 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