diff --git a/doc/.vuepress/config.js b/doc/.vuepress/config.js index 929477e..ba7b9c3 100755 --- a/doc/.vuepress/config.js +++ b/doc/.vuepress/config.js @@ -203,6 +203,12 @@ module.exports = { }, ], }, + { + title: 'FAQ', + path: '/zh/guide/FAQ', + collapsable: false, + sidebarDepth: 1, + }, ], }, }; diff --git a/doc/zh/guide/FAQ.md b/doc/zh/guide/FAQ.md new file mode 100644 index 0000000..cd58cf0 --- /dev/null +++ b/doc/zh/guide/FAQ.md @@ -0,0 +1,28 @@ +dooring + +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` diff --git a/src/components/Zan/index.tsx b/src/components/Zan/index.tsx index aeb682e..ef7b95c 100644 --- a/src/components/Zan/index.tsx +++ b/src/components/Zan/index.tsx @@ -3,7 +3,7 @@ import { Button, Popover } from 'antd'; import styles from './index.less'; interface IProps { - text: any; + text?: any; } ///这组件写的有问题 popover会重定位 diff --git a/src/pages/editor/components/Header/index.tsx b/src/pages/editor/components/Header/index.tsx index 906cbea..b66e1ea 100644 --- a/src/pages/editor/components/Header/index.tsx +++ b/src/pages/editor/components/Header/index.tsx @@ -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: , + okText: '知道了', + }); + }; + const savePreview = () => { const { tid } = props.location.query || ''; req.post('/visible/preview', { tid, tpl: pointData }); @@ -316,6 +325,15 @@ const HeaderComponent = memo((props: HeaderComponentProps) => { +