mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-11 17:32:50 +00:00
🆕 添加问题反馈文档,优化部分ts类型
This commit is contained in:
parent
5641d33b7c
commit
03bddcbcc3
@ -203,6 +203,12 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'FAQ',
|
||||
path: '/zh/guide/FAQ',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
28
doc/zh/guide/FAQ.md
Normal file
28
doc/zh/guide/FAQ.md
Normal file
@ -0,0 +1,28 @@
|
||||
<img src="http://cdn.dooring.cn/dr/logo.ff7fc6bb.png" alt="dooring" width=200>
|
||||
|
||||
H5-Dooring 仍在持续迭代, 如果有任何问题, 可以点击 [立即反馈](http://h5.dooring.cn/h5?tid=86C45FAE)。
|
||||
|
||||
## 问题汇总
|
||||
|
||||
#### 1. 本地部署后, win系统下如何启动server?
|
||||
|
||||
win下启动server, 需要将server/package.json的启动脚本修改为如下:
|
||||
|
||||
``` js
|
||||
"scripts": {
|
||||
"start": "set NODE_ENV=development&& nodemon -w src --exec \"babel-node src\"",
|
||||
// ... 其他不变
|
||||
},
|
||||
```
|
||||
|
||||
#### 2. 添加自定义组件, 需要改哪些文件?
|
||||
|
||||
dooring支持根据企业自身业务添加自定义组件, 目前2.0版本添加自定义组件只需要在 `editor/src/components/BasicShop` 对应的组件分类下添加组件即可, 最后在 `editor/src/components/BasicShop/template.ts`下对应位置添加组件描述即可生效. 同时, 为了保证发布后的H5页面保持最新, 需要在部署发布代码前在H5工程中对应的位置也同步一份组件代码. 后续会对这一流程做一定的优化.
|
||||
|
||||
#### 3. 本地如何调试对应的项目?
|
||||
|
||||
授权后, 本地安装项目依赖, 在调试编辑器(editor)项目或后台管理项目(admin)前, 需要先启动服务器工程(server), 在
|
||||
`server/index.js` 代码中添加 editor / admin 项目的启动 `ip`, 这样就能跨域请求了, 同时需要修改 editor / admin 项目中 `utils/tools.ts` 下的api地址, 开发环境改为本地 `server` 项目的 `ip`.
|
||||
|
||||
|
||||
如果在部署中遇到其他问题, 欢迎加我微信交流: `Mr_xuxiaoxi`
|
||||
@ -3,7 +3,7 @@ import { Button, Popover } from 'antd';
|
||||
import styles from './index.less';
|
||||
|
||||
interface IProps {
|
||||
text: any;
|
||||
text?: any;
|
||||
}
|
||||
|
||||
///这组件写的有问题 popover会重定位
|
||||
|
||||
@ -13,6 +13,7 @@ import {
|
||||
SketchOutlined,
|
||||
UploadOutlined,
|
||||
InstagramOutlined,
|
||||
WechatOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { history } from 'umi';
|
||||
import QRCode from 'qrcode.react';
|
||||
@ -162,6 +163,14 @@ const HeaderComponent = memo((props: HeaderComponentProps) => {
|
||||
history.push(`/editor?tid=${uuid(8, 16)}`);
|
||||
};
|
||||
|
||||
const toShare = () => {
|
||||
Modal.info({
|
||||
title: '一键将海报分享到朋友圈, 为Dooring助力',
|
||||
content: <img src="http://cdn.dooring.cn/dr/h5door.png" width="300" />,
|
||||
okText: '知道了',
|
||||
});
|
||||
};
|
||||
|
||||
const savePreview = () => {
|
||||
const { tid } = props.location.query || '';
|
||||
req.post('/visible/preview', { tid, tpl: pointData });
|
||||
@ -316,6 +325,15 @@ const HeaderComponent = memo((props: HeaderComponentProps) => {
|
||||
<Button type="link" onClick={toPreview} disabled={!pointData.length}>
|
||||
预览
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
style={{ marginRight: '5px' }}
|
||||
title="一键分享"
|
||||
onClick={toShare}
|
||||
disabled={!pointData.length}
|
||||
>
|
||||
<WechatOutlined />
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
style={{ marginRight: '9px' }}
|
||||
|
||||
@ -57,7 +57,7 @@ const PreviewPage = memo((props: PreviewPageProps) => {
|
||||
document.title = pageConfig.title || 'H5-Dooring | 强大的H5编辑神器';
|
||||
// 设置数据源
|
||||
setPointData(
|
||||
tpl.map(item => ({
|
||||
tpl.map((item: any) => ({
|
||||
...item,
|
||||
point: { ...item.point, isDraggable: false, isResizable: false },
|
||||
})),
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
import req from '@/utils/req'
|
||||
|
||||
export function getTemplate(data) {
|
||||
return req('/test', { method: 'GET', params: data })
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user