删除无用代码,添加移动端探针

This commit is contained in:
xujiang 2020-08-25 12:58:02 +08:00
parent 880b73b325
commit 698bbb55c1
3 changed files with 30 additions and 11 deletions

View File

@ -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',
}
]
}

View File

@ -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 (

16
src/pages/mobileTip.js Normal file
View File

@ -0,0 +1,16 @@
import React from 'react'
import { Result } from 'antd';
function MobileTip(props) {
return (
<div>
<Result
status="500"
title="Dooring热情❤提示"
subTitle="你好客官请在PC端使用Dooring哦"
/>
</div>
);
}
export default MobileTip;