diff --git a/.umirc.js b/.umirc.js index a24e48b..181ada5 100644 --- a/.umirc.js +++ b/.umirc.js @@ -14,6 +14,9 @@ export default defineConfig({ }, title: '趣谈前端-h5-visible-tool', exportStatic: {}, + base: 'h5_plus', + publicPath: '/h5_plus/', + outputPath: '../server/static/h5_plus', routes: [ { path: '/', @@ -24,12 +27,16 @@ export default defineConfig({ component: '../pages/editor', }, { - path: '/preview', - component: '../pages/editor/preview', + path: '/login', + component: '../pages/login', }, { - path: '/prevH5', - component: '../pages/editor/preH5', + path: '/mobileTip', + component: '../pages/mobileTip', + }, + { + path: '/preview', + component: '../pages/editor/preview', } ] } diff --git a/src/pages/editor/Container.js b/src/pages/editor/Container.js index c471e9e..0dbcccc 100644 --- a/src/pages/editor/Container.js +++ b/src/pages/editor/Container.js @@ -14,7 +14,6 @@ import FormEditor from 'components/FormEditor' import template from 'components/DynamicEngine/template' import mediaTpl from 'components/DynamicEngine/mediaTpl' import schema from 'components/DynamicEngine/schema' -import req from '@/utils/req' import styles from './index.less' @@ -63,13 +62,10 @@ const Container = memo((props) => { }) } - const savePreview = () => { - const { tid } = props.location.query || '' - req.post('/visible/preview', { tid, tpl: pointData }) - } - useEffect(() => { - + if(window.innerWidth < 1024) { + props.history.push('/mobileTip') + } }, []) return ( diff --git a/src/pages/mobileTip.js b/src/pages/mobileTip.js new file mode 100644 index 0000000..2cca494 --- /dev/null +++ b/src/pages/mobileTip.js @@ -0,0 +1,16 @@ +import React from 'react' +import { Result } from 'antd'; + +function MobileTip(props) { + return ( +