补充页面交互逻辑

This commit is contained in:
yumaojun03 2024-12-01 09:52:50 +08:00
parent 548b1683bf
commit 901c25b7a4
5 changed files with 226 additions and 2 deletions

View File

@ -121,7 +121,8 @@ func (m *Log) SetRoot(v zerolog.Logger) {
m.root = &v
}
// /go/src/your_project/some_file:21
// /go/src/your_project/some_file
// 21
func (m *Log) CallerMarshalFunc(pc uintptr, file string, line int) string {
if m.CallerDeep == 0 {
return file

View File

@ -36,4 +36,5 @@ func (h *CommentController) AddComment(ctx *gin.Context) {
// controller.GetBook()
// h.book.GetBook(ctx, isbn)
// exception.IsNotFound(err)
}

View File

@ -1 +1,19 @@
# Web全栈开发
# Web全栈开发(Vblog)
## 软件设计
### 需求
管理markdown个文字的一个网站作者后台发布文章访客前台浏览查看文章
### 流程
![](./docs/flow.drawio)
### 产品原型
https://gitee.com/infraboard/go-course/blob/master/new.md#%E6%9E%B6%E6%9E%84%E8%AE%BE%E8%AE%A1
### 架构

43
vblog/docs/flow.drawio Normal file
View File

@ -0,0 +1,43 @@
<mxfile host="65bd71144e">
<diagram id="608xNrIkPBtdDm-JceqL" name="第 1 页">
<mxGraphModel dx="893" dy="560" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="Actor" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1">
<mxGeometry x="110" y="80" width="30" height="60" as="geometry"/>
</mxCell>
<mxCell id="3" value="Actor" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1">
<mxGeometry x="670" y="80" width="30" height="60" as="geometry"/>
</mxCell>
<mxCell id="5" value="文章的编辑和发布" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="200" y="70" width="170" height="310" as="geometry"/>
</mxCell>
<mxCell id="6" value="后台(需要登录)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="200" y="40" width="100" height="30" as="geometry"/>
</mxCell>
<mxCell id="8" value="看到已经发布的文章列表" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="440" y="70" width="150" height="310" as="geometry"/>
</mxCell>
<mxCell id="9" value="作者" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="95" y="180" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="10" value="访客" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="655" y="180" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="11" value="前台" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="440" y="40" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="13" value="注册" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="34" y="420" width="105" height="50" as="geometry"/>
</mxCell>
<mxCell id="14" value="发布文章" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="171.5" y="420" width="105" height="50" as="geometry"/>
</mxCell>
<mxCell id="15" value="维护文章" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="309" y="420" width="105" height="50" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

161
vblog/docs/page.drawio Normal file
View File

@ -0,0 +1,161 @@
<mxfile host="65bd71144e">
<diagram id="q5X4NpZnwlXZwvvlOuBN" name="第 1 页">
<mxGraphModel dx="893" dy="560" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="10" style="edgeStyle=none;html=1;exitX=1;exitY=0.3333333333333333;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="6">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="2" value="Actor" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" parent="1" vertex="1">
<mxGeometry x="90" y="100" width="30" height="60" as="geometry"/>
</mxCell>
<mxCell id="3" value="作者" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="75" y="50" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="51" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=1;exitY=0.3333333333333333;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="4" target="43">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="4" value="Actor" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" parent="1" vertex="1">
<mxGeometry x="75" y="815" width="30" height="60" as="geometry"/>
</mxCell>
<mxCell id="5" value="访客" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="60" y="730" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="6" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="210" y="120" width="230" height="220" as="geometry"/>
</mxCell>
<mxCell id="7" value="用户名" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="265" y="170" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="8" value="密码" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="265" y="210" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="9" value="提交" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="265" y="260" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="21" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="20">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="11" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="520" y="120" width="300" height="260" as="geometry"/>
</mxCell>
<mxCell id="12" value="作者的工作台(后台)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="520" y="60" width="130" height="30" as="geometry"/>
</mxCell>
<mxCell id="13" value="文章列表" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="520" y="90" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="14" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="530" y="140" width="30" height="220" as="geometry"/>
</mxCell>
<mxCell id="15" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="580" y="140" width="230" height="220" as="geometry"/>
</mxCell>
<mxCell id="16" value="文章列表" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="620" y="170" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="17" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="620" y="210" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="18" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="620" y="250" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="35" value="效果预览" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="19" target="30">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="650" y="410"/>
<mxPoint x="391" y="410"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="19" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="620" y="290" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="20" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="545" y="470" width="250" height="210" as="geometry"/>
</mxCell>
<mxCell id="22" value="创建文章/编辑文章" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="540" y="430" width="120" height="30" as="geometry"/>
</mxCell>
<mxCell id="23" value="标题" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="575" y="500" width="190" height="30" as="geometry"/>
</mxCell>
<mxCell id="24" value="摘要" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="575" y="550" width="190" height="30" as="geometry"/>
</mxCell>
<mxCell id="25" value="内容" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="575" y="600" width="190" height="60" as="geometry"/>
</mxCell>
<mxCell id="26" value="发布" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="740" y="170" width="60" height="20" as="geometry"/>
</mxCell>
<mxCell id="27" value="发布" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="740" y="210" width="60" height="20" as="geometry"/>
</mxCell>
<mxCell id="28" value="发布" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="740" y="250" width="60" height="20" as="geometry"/>
</mxCell>
<mxCell id="29" value="发布" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="740" y="290" width="60" height="20" as="geometry"/>
</mxCell>
<mxCell id="30" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="185" y="470" width="275" height="210" as="geometry"/>
</mxCell>
<mxCell id="31" value="文章详情浏览页(前台)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="185" y="430" width="120" height="30" as="geometry"/>
</mxCell>
<mxCell id="38" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="37" target="11">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="39" value="返回继续编辑" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="38">
<mxGeometry x="0.103" y="-1" relative="1" as="geometry">
<mxPoint as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="37" value="返回后台" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="360" y="480" width="90" height="30" as="geometry"/>
</mxCell>
<mxCell id="40" value="标题" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="240" y="525" width="180" height="25" as="geometry"/>
</mxCell>
<mxCell id="41" value="摘要" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="240" y="562.5" width="180" height="25" as="geometry"/>
</mxCell>
<mxCell id="42" value="内容" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="240" y="600" width="180" height="60" as="geometry"/>
</mxCell>
<mxCell id="52" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="43" target="30">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="43" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="185" y="730" width="275" height="210" as="geometry"/>
</mxCell>
<mxCell id="44" value="文章列表" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="780" width="200" height="20" as="geometry"/>
</mxCell>
<mxCell id="45" value="文章列表" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="810" width="200" height="20" as="geometry"/>
</mxCell>
<mxCell id="46" value="文章列表" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="850" width="200" height="20" as="geometry"/>
</mxCell>
<mxCell id="47" value="文章列表" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="890" width="200" height="20" as="geometry"/>
</mxCell>
<mxCell id="48" value="Go" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="210" y="740" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="49" value="Python" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="250" y="740" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="50" value="文章列表浏览页(前台)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="185" y="690" width="120" height="30" as="geometry"/>
</mxCell>
<mxCell id="53" value="登录页面" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="210" y="80" width="60" height="30" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>