Only say the key point, do not say nonsense and explanation, go to see the code, do not post a lot of pictures, the demo link below can see.
1. Development environment introduction
- The node 10.24.0
2. Experience the demo
Front-end blog: Demo (support mobile access) Admin system: visitor mode access. Account number: test password: 0000 wechat small program search: 10 meat bun warehouse code address
Function of 3.
- The article
- classification
- Log in to register
- Verification code (mobile phone/email)
- IP current-limiting
- Comment reply (check sensitive words)
4. Technology stack
- PC Blog: Vue family bucket
- PC background management system: React Family bucket + ANTD
- Small program side: MPvue
- Server: Egg
- Server: Centos 2-core 2G5M pm2 nginx
- FTP: fileZilla
5. Featured functions
- Ali Cloud SMS service
- Aliyun text service
- IP flow limiting (100 times per day)
- Visitor mode accesses real data
6. Return the status code
200 Succeeded 201 Failed to verify the result 202 Invalid parameters 300 Operation with no permission 401 No permission 403 Traffic is restricted or blocked from the IP address 422 Incorrect parameters
7. Database structure
- The users table user
field | explain | type | Enumerated values |
---|---|---|---|
id | A primary key | int | |
nickname | nickname | string | |
username | account | string | Login Account (Email/mobile phone number) |
password | password | string | |
root | level | int | 0. The default 77. Root |
status | User state | int | 1. 0 is disabled by default |
create_time | Creation time | timestamp | |
update_time | Update time | timestamp |
- The article table article
field | explain | type | note |
---|---|---|---|
id | A primary key | int | |
title | The article title | string | |
author | The authors | string | |
introduction | The article introduces | string | |
tag | The article label | string | |
cover | The article covers | string | |
bucket | Directory hierarchy | string | |
content | The article content | string | The data field is text and the length is 1000000 |
browser | viewed | int | |
is_del | Soft Delete Or not | int | 1 on the shelf, 2 off the shelf |
istop | Placed at the top | int | 0 common 1 is the top |
create_time | Creation time | timestamp | |
update_time | Update time | timestamp |
- Article classification table category
field | explain | type |
---|---|---|
id | A primary key | int |
name | The name of the | string |
create_time | Creation time | timestamp |
update_time | Update time | timestamp |
- This article reviews
- 4.1 Comment Table
field | explain | type |
---|---|---|
id | A primary key | int |
article_id | The article id | int |
content | content | string |
user_id | Comment user ID | int |
create_time | Creation time | timestamp |
update_time | Update time | timestamp |
- 4.2 Reply form Reply
field | explain | type |
---|---|---|
id | A primary key | int |
comment_id | Comment id | int |
content | content | string |
to_id | Target User ID | int |
from_id | Comment user ID | int |
create_time | Creation time | timestamp |
update_time | Update time | timestamp |
- Verification code table code
field | explain | type |
---|---|---|
id | A primary key | int |
code | The name of the | string |
username | account | string |
create_time | Creation time | timestamp |
update_time | Update time | timestamp |
- IP tables IP
field | explain | type |
---|---|---|
id | A primary key | int |
ip | The name of the | string [primary key] |
client | The client | string |
day | In a single number | int |
total | Total number of visits | int |
userId | The user id | int |
create_time | Creation time | timestamp |
update_time | Update time | timestamp |