diff --git a/backend/database/mongo.go b/backend/database/mongo.go index 3d4cc1a..301200f 100644 --- a/backend/database/mongo.go +++ b/backend/database/mongo.go @@ -200,6 +200,9 @@ func (m *MongoDBManager) GetMaxPostID() (int, error) { options.FindOne().SetSort(bson.M{"id": -1}), ).Decode(&post) if err != nil { + if err == mongo.ErrNoDocuments { + return 0, nil + } return 0, err } diff --git a/frontend/src/pages/auth.vue b/frontend/src/pages/auth.vue index ffcf315..eac50f0 100644 --- a/frontend/src/pages/auth.vue +++ b/frontend/src/pages/auth.vue @@ -19,7 +19,7 @@ 请给墙号(QQ: 2297454588)发送 - #注册 + #注册账号 来获得初始密码。 diff --git a/frontend/src/pages/index.vue b/frontend/src/pages/index.vue index 555e205..d3f8c65 100644 --- a/frontend/src/pages/index.vue +++ b/frontend/src/pages/index.vue @@ -110,10 +110,10 @@ - + - {{ index }}. {{ rule }} + {{ index + 1 }}. {{ rule }}
请给墙号(QQ: 2297454588)发送
#注册
#注册账号
来获得初始密码。
{{ index }}. {{ rule }}
{{ index + 1 }}. {{ rule }}