Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

活动邀请函模板编辑器 #215

Open
TechQuery opened this issue Oct 11, 2023 · 1 comment
Open

活动邀请函模板编辑器 #215

TechQuery opened this issue Oct 11, 2023 · 1 comment
Labels
feature New feature or request Fund

Comments

@TechQuery
Copy link
Member

TechQuery commented Oct 11, 2023

业务逻辑

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

async checkAuthorization(title: string, mobilePhone: string) {
mobilePhone = mobilePhone.replace(/^\+86-?/, '');
const [matched] = await this.getList({ title, 负责人手机号: mobilePhone });
return (this.currentAuthorized = !!matched);
}

  1. 拉取某个议程的数据,以其数据对象字段名为组件名罗列可拖拽组件

    • URL 显示为二维码
    • 其余显示为纯文本
  2. 点击画布空白处上传背景图到对象存储,并在模板 JSON 中记录图片 URL

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

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

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

参考代码

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@TechQuery TechQuery added the feature New feature or request label Oct 11, 2023
@polar-sh polar-sh bot added the Fund label Sep 7, 2024
@TechQuery
Copy link
Member Author

TechQuery commented Oct 27, 2024

现在可以用 gpt-4-vision-preview 模型从 issue 中的图片生成代码发 pull request,拖拽式编辑器就不需要做了:

界面参考:https://github.com/Yuyz0112/dewhale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Fund
Projects
Development

No branches or pull requests

1 participant