# 博客系统(服务器) **Repository Path**: coderfeifei/blog_server ## Basic Information - **Project Name**: 博客系统(服务器) - **Description**: No description available - **Primary Language**: Unknown - **License**: Artistic-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-23 - **Last Updated**: 2022-05-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: 微前端 ## README # 博客系统服务器接口文档
分支说明 | 分支名称 | 分支说明 | | :-----| :----: | | master | 主分支(部署分支) | | feature | 特性分支 | | hotfix | bug分支 | 接口文档 > 协议头和域名统一 : http://localhost:4000 | 接口功能 | 接口地址(path) | 请求方式 | 请求参数 | 返回值 | | :-----:| :----: | :-----:| :----: | :----: | | 科一题目获取 | /jiaokaoquestions | GET |{index:} | {id:xx,question:xx ……}| | 科一题目总数 | /questionNum | GET|{}|{num:xxx}| | 科四题目获取 | /jkfour | GET |{index:xxx} | {id:xx,question:xx ……}| | 科四题目总数 | /questionNumfour | GET|{}|{num:xxx}| | 考试类型 | /examtype | GET|{}|options:[{lable:'科一',value:'/jiaokaoquestions',num:'/questionNum'},]| |城市列表|/cityList|GET|{}|[{prov:'',city:[name:'',district:[{name:'',code:''}]]] }]| |城市天气|/weather|GET|{location}|{now:{},location:{},foreasts:{}}| |普通用户注册|/userRegister|POST|{userName,passWord}|{code: 0, msg: '登录成功', data: user.userName}| |普通用户登录|/userLogin|POST|{userName,passWord}|{code: 0, msg: '登录成功'}| |图片上传|/manage/img/upload|POST|{image}|{code:0}| |图片删除|/manage/img/delete|POST|{name}|{code:0}| |bug反馈|/bugReceive|POST|{picUrl, Desc, author}|{code: 0}| |查看bug|/bugList|GET|{}|{code: 0,data:list}| |修改bug状态|/updateBugState|GET|{_id}|{code : 0}| ## 前台接口 ### 请求所有文章简介 请求地址:http://localhost:4000/passage_info 请求方式:GET 请求参数:{} ### 请求文章内容 请求地址:http://localhost:4000/passage 请求方式:GET 请求参数:{passageID:123} ## 后台接口 ### 1.图片上传接口 请求地址:http://localhost:4000/manage/img/upload 请求方式:POST 请求参数:{image:binary} ### 2.图片删除 请求地址:http://localhost:4000/manage/img/delete 请求方式:POST 请求参数:{name:图片名} ### 3.发布文章 请求地址:http://localhost:4000/addPassage 请求方式:POST 请求参数:{title,info,context,categoryID,tags(array)} 标题摘要和内容 ### 4.删除文章 请求地址:http://localhost:4000//deletePassage 请求方式:POST 请求参数 {_id:xxx} ### 5.添加分类 请求地址:http://localhost:4000/addCategory 请求方式:POST 请求参数:{categoryName:分类名称} ### 6.请求所有分类 请求地址:http://localhost:4000/getCategory 请求方式:GET 请求参数:{} ### 7.修改分类 请求地址:http://localhost:4000/updateCategory 请求方式:POST 请求参数:{_id:xxx,newName:xxx} ### 8.删除分类 请求地址:http://localhost:4000/deleteCategory 请求方式:POST 请求参数:{_id:xxx} ### 9.请求文章分类 后端分页 请求地址:http://localhost:4000//passage_detail 请求方式:POST 请求参数:{pageNum:1,pageSize:2} ### 10.根据分类的id查询对应的分类 请求地址:http://localhost:4000/queryCategoryName 请求方式:POST 请求参数:{_id:xxx} ### 11.修改文章 请求地址:http://localhost:4000/UpdatePassage 请求方式:POST 请求参数:{_id:xxx,title,info,context,categoryID,tags} ### 12.获取文章全部内容 请求地址:http://localhost:4000/passage_allcontext 请求方式:POST 请求参数:{_id:xxx} ### 13.添加访问量和观看量 接口仅用于测试 请求地址:http://localhost:4000/addvisited 请求方式:POST 请求参数:{ visited_count, star_count, time } ### 14.获取前七日发布的文章数, 评论数,浏览量,star量, 不包括当天数据 请求地址:http://localhost:4000/PassagePublicSort 请求方式:GET 请求参数:{cur_day:xxx}(13位时间戳) ### 15.添加管理员 请求地址:http://localhost:4000/addmannager 请求方式:POST 请求参数:{Mana_Name:xxx,Mana_PWD:xxx} ### 16.登录 请求地址:http://localhost:4000/login 请求方式:POST 请求参数:{Mana_Name:xxx,Mana_PWD:xxx} ### 17.自动登录 请求地址:http://localhost:4000/autoLogin 请求方式:POST 请求参数:{Mana_Name:xxx,Mana_PWD:xxx}