kaiyuanshe / kaiyuanshe/kaiyuanshe.github.io

活动邀请函模板编辑器

Open
#215 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
27
Forks
14
PR merge metrics
No merged PRs in 30d

Description

## 业务逻辑

1. **活动组织者**在活动页面上看到编辑入口按钮,**鉴权代码**参考:

https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/e948952ef7c8c8e731b3a4b6c05c90d08ef672be/models/Activity/Agenda.ts#L126-L132

2. 拉取某个议程的数据,以其**数据对象字段名**为组件名罗列**可拖拽组件**:
- URL 显示为二维码
- 其余显示为纯文本

3. 点击画布空白处上传背景图到对象存储,并在**模板 JSON** 中记录图片 URL

4. 点击拖拽组件后加入画布,并可在其中拖拽移动,其尺寸、位置均以**画布尺寸百分比**为单位记录在模板 JSON

5. 将模板 JSON 存入活动记录的 `cardTemplate` 字段

6. [邀请函生成页面][1]读取模板、议程数据后渲染

## 参考代码

- 拖拽:https://codepen.io/tech_query/pen/bGmJaYr
- 画布:https://codepen.io/tech_query/pen/mGJzbK

[1]: https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/e948952ef7c8c8e731b3a4b6c05c90d08ef672be/pages/activity/%5Bid%5D/agenda/%5BagendaId%5D/invitation.tsx

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.