Skip to content

Commit

Permalink
start deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
mtianyan committed Jul 25, 2020
1 parent 083ab37 commit 744ea32
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 55 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd OnlineMooc
docker-compose up
# 导入数据
docker exec -it mxonline3_mtianyan_mysql_1 bash
docker exec -it onlinemooc_mtianyan_mysql_1 bash
mysql -u root -p -D mxonline3 < sql/mxonline3.sql
# 输入密码: mtianyanroot
```
Expand Down
52 changes: 0 additions & 52 deletions front_end/src/.umi/umi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-nocheck
import './core/polyfill';
import '@@/core/devScripts';
import '../global.jsx';
import { plugin } from './core/plugin';
import { createHistory } from './core/history';
Expand All @@ -11,38 +10,6 @@ import { renderClient } from '/Users/mtianyan/Desktop/Github/Mxonline3/front_end
require('../global.less');
require('./plugin-locale/locale')._onCreate();

(() => {
// Runtime block add component
window.GUmiUIFlag = require('/Users/mtianyan/Desktop/Github/Mxonline3/front_end/node_modules/@umijs/plugin-ui-blocks/lib/sdk/flagBabelPlugin/GUmiUIFlag.js').default;

// Enable/Disable block add edit mode
window.addEventListener('message', (event) => {
try {
const { action, data } = JSON.parse(event.data);
switch (action) {
case 'umi.ui.checkValidEditSection':
const haveValid = !!document.querySelectorAll('div.g_umiuiBlockAddEditMode').length;
const frame = document.getElementById('umi-ui-bubble');
if (frame && frame.contentWindow) {
frame.contentWindow.postMessage(
JSON.stringify({
action: 'umi.ui.checkValidEditSection.success',
payload: {
haveValid,
},
}),
'*',
);
}
default:
break;
}
} catch(e) {
}
}, false);
})();


const getClientRender = (args: { hot?: boolean } = {}) => plugin.applyPlugins({
key: 'render',
type: ApplyPluginsType.compose,
Expand All @@ -68,25 +35,6 @@ export default clientRender();
};


(() => {
try {
const ua = window.navigator.userAgent;
const isIE = ua.indexOf('MSIE ') > -1 || ua.indexOf('Trident/') > -1;
if (isIE) return;

// Umi UI Bubble
require('/Users/mtianyan/Desktop/Github/Mxonline3/front_end/node_modules/@umijs/preset-ui/lib/bubble').default({
port: 3000,
path: '/Users/mtianyan/Desktop/Github/Mxonline3/front_end',
currentProject: '',
isBigfish: undefined,
});
} catch (e) {
console.warn('Umi UI render error:', e);
}
})();


// hot module replacement
// @ts-ignore
if (module.hot) {
Expand Down
2 changes: 1 addition & 1 deletion front_end/src/pages/document.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
padding: 0;
}
#root {
background-image: url('/home_bg.png');
background-image: url('/static/home_bg.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
padding: 0;
}
#root {
background-image: url("/home_bg.png");
background-image: url("/static/home_bg.png");
background-repeat: no-repeat;
background-size: 100% auto;
}
Expand Down

0 comments on commit 744ea32

Please sign in to comment.