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

第一周作业提交 #189

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions docs/pages/xsheng1992/01-技术方案设计文档.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# 整体架构设计 V1.0

## 需求

需求文档

## 范围

本次产品涉及四个方面:

- B端编辑器
- B端编辑器前端
- B端编辑器后端

- H5端应用
- SSR渲染(性能高)

- 后台管理
- 后台管理前端
- 后台管理后端

- 统计服务

## 模块设计

![模块图](./images/01-模块图.png)

- B端编辑器:创作者 - 作品的创建、发布及编辑,前后端分离
- H5端应用:普通用户 - 查看作品、分享作品,SSR
- 后台应用:管理员 - 作品管理,紧急操作,前后端分离
- 组件库:同时用于B端及服务端,相同渲染方式呈现作品
- 统计服务:统计pv、uv,生成报告

## 作品的数据结构

编辑器的组件以及H5应用展示的作品数据使用vnode数据格式进行存储。(标准化)

初步定义数据格式如下:

```
{
work: {
title: '作品标题',
settings: {}, // 为作品后续配置项预留
attrs: {}, // 为作品后续页面设置选项预留
components: [ // 数组形式便于排序
{
id: '111',
tag: 'text',
name: '文本1',
attrs: { fontSize: 20 }, // 节点属性
children: ['文本1']
},
{
id: '222',
tag: 'image',
name: '图片1',
attrs: { src: 'xxx.png', width: 100 }, // 节点属性
children: [null]
}
]
},
activeComponentId: '' // 当前选中的组件id
}
```

## 扩展性保证

- 组件的扩展性
- 数据结构的扩展(提供更多配置项)
- 编辑器功能扩展(对组件进行隐藏、锁定)
- 页面配置扩展(如多语言)

## 开发提效

- 开发脚手架提高开发效率
- 使用组件库避免重复实现组件显示逻辑
53 changes: 53 additions & 0 deletions docs/pages/xsheng1992/01-第一周学习笔记.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 第一周学习笔记

## 闭环思维

- 制作人:
- 输入:制作作品(模板、作品、编辑器)
- 反馈:作品的效果(统计)
- 作品受众:
- 输入:看作品
- 反馈: 分享的欲望
- 管理员:
- 输入:后台管理
- 反馈:稳定的增长

![闭环](./images/01-闭环.jpg)

## 统计-渠道

架构师需要对业务增长负责

### 作品投放渠道:

- 微信
- 头条
- 支付宝

如果100w的pv,微信60w,头条20w,支付宝20w

可以分析出哪个渠道pv较高,可以决定后续投入方向

### 分渠道实现方式

通过url后面携带参数进行区分

比如:

- url?channel=a

- url?channel=b

- url?channel=c

## 浅层需求和深层需求

![抽奖流程](./images/01-抽奖流程.png)

### 浅层需求

直接能够看到的需求:如抽奖、抽奖结果

### 深层需求

不容易一眼就看到却很重要的需求:如登录、引导分享
1 change: 1 addition & 0 deletions docs/pages/xsheng1992/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# xsheng1992 - 作业记录
Binary file added docs/pages/xsheng1992/images/01-抽奖流程.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/xsheng1992/images/01-模块图.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/xsheng1992/images/01-闭环.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.