Vue + Element UI 前端篇(九):接口格式定义

接口请求格式定义

前台显示需要后台数据,我们这里先把前后端交互接口定义好,没有后台的时候,也方便用mock模拟。

接口定义遵循几个规范:

1. 接口按功能模块划分。

系统登录:登录相关接口

用户管理:用户管理相关接口

机构管理:机构管理相关接口

角色管理 : 角色管理相关接口

菜单管理 : 菜单管理相关接口

字典管理 : 字典管理相关接口

日志管理 : 日志管理相关接口

2. 通用增删改查接口采用统一命名规范。

save : 保存操作

update: 更新操作

delete: 删除操作

findAll: 查询全部

findPage : 分页查询

findTree : 返回对象树

findByXX:根据XX查询

2. 统一请求响应结果。

格式如下:

复制代码

{"code": 200, // 状态吗,200:请求成功,其他:请求出错"msg": null, // 错误消息,成功返回 null, 否则返回出错信息"data": {   // 返回请求数据,JSON 数据格式...}
}

复制代码

系统登录

登录接口

请求URL: /sys/login

请求类型: post

请求参数:

{"captcha": "3323","password": "admin","username": "admin"
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": {"id": null,"userId": 1,"token": "77ae89be36504adfb5c09ef71409ea0e","expireTime": "2018-09-01T16:24:50.473+0000","createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": "2018-09-01T04:24:50.473+0000"}
}

复制代码

用户管理

保存

请求URL: /user/save

请求类型: post

请求参数:

复制代码

{"createBy": 0,"createTime": "2018-09-01T05:40:23.342Z","delFlag": 0,"deptId": 110,"deptName": "","email": "test@qq.com","lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T05:40:23.342Z","mobile": "18999878998","password": "123456","salt": "1312321321","status": 0,"userId": 110,"username": "test"
}

复制代码

请求结果:

{"code": 200,"msg": null,"data": 1
}

修改

请求URL: /user/update

请求类型: post

请求参数:

{"mobile": "test2@qq.com","userId": 110,"username": "test"
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

删除

请求URL: /user/delete

请求类型: post

请求参数:

{"userId": 110
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

分页查询

请求URL: /user/findPage

请求类型: post

请求参数:

{"pageNum": 1,"pageSize": 5
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": {"pageNum": 1,"pageSize": 5,"totalSize": 5,"totalPages": 1,"content": [{"userId": 1,"username": "admin","password": "9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d","salt": "YzcmCZNvbXocrsz9dm8e","email": "admin@qq.com","mobile": "13612345678","status": 1,"deptId": null,"deptName": null,"createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"userId": 2,"username": "Louis","password": "9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d","salt": "YzcmCZNvbXocrsz9dm8e","email": "louis@qq.com","mobile": "18200932238","status": 1,"deptId": null,"deptName": null,"createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"userId": 3,"username": "Kobe","password": "9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d","salt": "YzcmCZNvbXocrsz9dm8e","email": "kobe@qq.com","mobile": "18200932238","status": 1,"deptId": null,"deptName": null,"createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"userId": 4,"username": "Iverson","password": "9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d","salt": "YzcmCZNvbXocrsz9dm8e","email": "iverson@qq.com","mobile": "18200932238","status": 1,"deptId": null,"deptName": null,"createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"userId": 110,"username": "test","password": "123456","salt": "1312321321","email": "test@qq.com","mobile": "test2@qq.com","status": 0,"deptId": 110,"deptName": null,"createBy": 0,"createTime": "2018-09-01T05:40:23.000+0000","lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T05:40:23.000+0000","delFlag": 0}]}
}

复制代码

根据用户查询

请求URL: /user/findByUserName

请求类型: get

请求参数:

{"userName": "admin"
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": {"userId": 1,"username": "admin","password": "9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d","salt": "YzcmCZNvbXocrsz9dm8e","email": "admin@qq.com","mobile": "13612345678","status": 1,"deptId": null,"deptName": null,"createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0}
}

复制代码

更新密码

请求URL: /user/updatePassword

请求类型: get

请求参数:

{"password ": "password ","newPassword ": "newPassword "
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

机构管理

保存

请求URL: /dept/save

请求类型: post

请求参数:

复制代码

{"children": [null],"createBy": 0,"createTime": "2018-09-01T05:34:44.618Z","delFlag": 0,"deptId": 110,"lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T05:34:44.618Z","name": "110","orderNum": 0,"parentId": 0
}

复制代码

请求结果:

{"code": 200,"msg": null,"data": 1
}

修改

请求URL: /dept/update

请求类型: post

请求参数:

{"deptId": 110,"name": "upate"
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

删除

请求URL: /dept/delete

请求类型: post

请求参数:

{"deptId": 110
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

查询机构树

请求URL: /dept/findTree

请求类型: get

请求参数:

{
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": [{"deptId": 1,"parentId": 0,"name": "轻尘集团","orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"deptId": 2,"parentId": 1,"name": "北京分公司","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"deptId": 3,"parentId": 1,"name": "上海分公司","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"deptId": 4,"parentId": 3,"name": "技术部","orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"deptId": 6,"parentId": 3,"name": "宣传部","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"deptId": 7,"parentId": 3,"name": "销售部","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"deptId": 8,"parentId": 3,"name": "市场部","orderNum": 3,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]}]},{"deptId": 9,"parentId": 0,"name": "牧尘集团","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"deptId": 10,"parentId": 9,"name": "北京分公司","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"deptId": 12,"parentId": 10,"name": "技术部","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"deptId": 13,"parentId": 10,"name": "宣传部","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]},{"deptId": 11,"parentId": 9,"name": "上海分公司","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"deptId": 14,"parentId": 11,"name": "销售部","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"deptId": 15,"parentId": 11,"name": "市场部","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]}]}]
}

复制代码

角色管理

保存

请求URL: /role/save

请求类型: post

请求参数:

复制代码

{"createBy": 0,"createTime": "2018-09-01T05:54:31.748Z","delFlag": 0,"lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T05:54:31.748Z","remark": "string","roleId": 110,"roleName": "110"
}

复制代码

请求结果:

{"code": 200,"msg": null,"data": 1
}

修改

请求URL: /role/update

请求类型: post

请求参数:

{"remark": "1101111","roleId": 110,"roleName": "1101"
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

删除

请求URL: /role/delete

请求类型: post

请求参数:

{"roleId": 110
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

分页查询

请求URL: /role/findPage

请求类型: post

请求参数:

{"pageNum": 1,"pageSize": 5
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": {"pageNum": 1,"pageSize": 5,"totalSize": 4,"totalPages": 1,"content": [{"roleId": 1,"roleName": "admin","remark": "超级管理员","createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"roleId": 2,"roleName": "dev","remark": "开发人员","createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"roleId": 3,"roleName": "test","remark": "测试人员","createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"roleId": 110,"roleName": "1101","remark": "1101111","createBy": 0,"createTime": "2018-09-01T05:54:32.000+0000","lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T05:54:32.000+0000","delFlag": 0}]}
}

复制代码

查询全部

请求URL: /role/findAll

请求类型: get

请求参数:

{}

请求结果:

复制代码

{"code": 200,"msg": null,"data": [{"roleId": 1,"roleName": "admin","remark": "超级管理员","createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"roleId": 2,"roleName": "dev","remark": "开发人员","createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"roleId": 3,"roleName": "test","remark": "测试人员","createBy": null,"createTime": "2018-08-14T03:11:11.000+0000","lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0},{"roleId": 110,"roleName": "1101","remark": "1101111","createBy": 0,"createTime": "2018-09-01T05:54:32.000+0000","lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T05:54:32.000+0000","delFlag": 0}]
}

复制代码

菜单管理

保存

请求URL: /menu/save

请求类型: post

请求参数:

复制代码

{"createBy": 0,"createTime": "2018-09-01T06:01:47.825Z","delFlag": 0,"icon": "string","lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T06:01:47.825Z","menuId": 110,"name": "110","orderNum": 0,"parentId": 0,"perms": "sys:menu:list","type": 0,"url": "/sys/menu"
}

复制代码

请求结果:

{"code": 200,"msg": null,"data": 1
}

修改

请求URL: /menu/update

请求类型: post

请求参数:

{"menuId": 110,"name": "1101"
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

删除

请求URL: /menu/delete

请求类型: post

请求参数:

{"menuId": 110
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

查询菜单树

请求URL: /menu/findTree

请求类型: get

请求参数:

{
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": [{"menuId": 1,"parentId": 0,"name": "系统管理","url": null,"perms": null,"type": 0,"icon": "fa el-icon-setting","orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"menuId": 2,"parentId": 1,"name": "用户管理","url": "/sys/user","perms": null,"type": 1,"icon": "el-icon-service","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"menuId": 9,"parentId": 2,"name": "查看","url": null,"perms": "sys:user:view","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 10,"parentId": 2,"name": "新增","url": null,"perms": "sys:user:save","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 11,"parentId": 2,"name": "修改","url": null,"perms": "sys:user:update","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 12,"parentId": 2,"name": "删除","url": null,"perms": "sys:user:delete","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]},{"menuId": 3,"parentId": 1,"name": "机构管理","url": "/sys/dept","perms": null,"type": 1,"icon": "el-icon-news","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"menuId": 13,"parentId": 3,"name": "查看","url": null,"perms": "sys:dept:view","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 14,"parentId": 3,"name": "新增","url": null,"perms": "sys:dept:save","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 15,"parentId": 3,"name": "修改","url": null,"perms": "sys:dept:update","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 16,"parentId": 3,"name": "删除","url": null,"perms": "sys:dept:delete","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]},{"menuId": 4,"parentId": 1,"name": "角色管理","url": "/sys/role","perms": null,"type": 1,"icon": "el-icon-view","orderNum": 4,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"menuId": 17,"parentId": 4,"name": "查看","url": null,"perms": "sys:role:view","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 18,"parentId": 4,"name": "新增","url": null,"perms": "sys:role:save","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 19,"parentId": 4,"name": "修改","url": null,"perms": "sys:role:update","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 20,"parentId": 4,"name": "删除","url": null,"perms": "sys:role:delete","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]},{"menuId": 5,"parentId": 1,"name": "菜单管理","url": "/sys/menu","perms": null,"type": 1,"icon": "el-icon-menu","orderNum": 5,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"menuId": 21,"parentId": 5,"name": "查看","url": null,"perms": "sys:menu:view","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 22,"parentId": 5,"name": "新增","url": null,"perms": "sys:menu:save","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 23,"parentId": 5,"name": "修改","url": null,"perms": "sys:menu:update","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 24,"parentId": 5,"name": "删除","url": null,"perms": "sys:menu:delete","type": 2,"icon": null,"orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]},{"menuId": 6,"parentId": 1,"name": "SQL监控","url": "/druid/sql","perms": null,"type": 1,"icon": "el-icon-info","orderNum": 6,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 8,"parentId": 1,"name": "系统日志","url": "/sys/log","perms": "sys:log:list","type": 1,"icon": "el-icon-info","orderNum": 7,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]},{"menuId": 25,"parentId": 0,"name": "内容管理","url": null,"perms": null,"type": 0,"icon": "el-icon-document","orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"menuId": 26,"parentId": 25,"name": "栏目管理","url": "/content/category","perms": null,"type": 1,"icon": "el-icon-tickets","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 27,"parentId": 25,"name": "文章管理","url": "/content/artical","perms": null,"type": 1,"icon": "el-icon-tickets","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]},{"menuId": 28,"parentId": 0,"name": "使用案例","url": null,"perms": null,"type": 0,"icon": "el-icon-picture-outline","orderNum": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": [{"menuId": 29,"parentId": 28,"name": "国际化","url": "/demo/i18n","perms": null,"type": 1,"icon": "el-icon-edit","orderNum": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []},{"menuId": 30,"parentId": 28,"name": "换皮肤","url": "/demo/theme","perms": null,"type": 1,"icon": "el-icon-picture","orderNum": 2,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"delFlag": 0,"children": []}]}]
}

复制代码

字典管理

保存

请求URL: /dict/save

请求类型: post

请求参数:

复制代码

{"createBy": 0,"createTime": "2018-09-01T06:05:44.794Z","delFlag": 0,"description": "aaaa","id": 110,"label": "aa","lastUpdateBy": 0,"lastUpdateTime": "2018-09-01T06:05:44.794Z","remarks": "aaaaaa","sort": 0,"type": "a","value": "aaaaa"
}

复制代码

请求结果:

{"code": 200,"msg": null,"data": 1
}

修改

请求URL: /dict/update

请求类型: post

请求参数:

{"description": "bbbb","id": 110,"label": "bbbb"
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

删除

请求URL: /dict/delete

请求类型: post

请求参数:

{"id": 110
}

请求结果:

{"code": 200,"msg": null,"data": 1
}

分页查询

请求URL: /dict/findPage

请求类型: get

请求参数:

{"pageNum": 1,"pageSize": 5
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": {"pageNum": 1,"pageSize": 5,"totalSize": 2,"totalPages": 1,"content": [{"id": 1,"value": "male","label": "男","type": "sex","description": "男性","sort": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"remarks": null,"delFlag": 0},{"id": 2,"value": "female","label": "女","type": "sex","description": "女性","sort": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"remarks": null,"delFlag": 0}]}
}

复制代码

日志管理

分页查询

请求URL: /log/findPage

请求类型: get

请求参数:

{"pageNum": 1,"pageSize": 5
}

请求结果:

复制代码

{"code": 200,"msg": null,"data": {"pageNum": 1,"pageSize": 5,"totalSize": 2,"totalPages": 1,"content": [{"id": 1,"value": "male","label": "男","type": "sex","description": "男性","sort": 0,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"remarks": null,"delFlag": 0},{"id": 2,"value": "female","label": "女","type": "sex","description": "女性","sort": 1,"createBy": null,"createTime": null,"lastUpdateBy": null,"lastUpdateTime": null,"remarks": null,"delFlag": 0}]}
}

复制代码

好了,后续前台页面需要调用相关接口的时候,就可以用上面的格式进行 mock 模拟了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/125282.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Windows无法删除分区怎么办?

我们知道Windows系统内置的磁盘管理工具是一个很实用的程序,可以帮助我们完成很多磁盘分区相关的基础操作,比如当我们想要删除硬盘上的某一个分区时,先想到的可能会是磁盘管理工具。但是当我们准备在磁盘管理工具中删除某个分区时&#xff0c…

ArcGIS Maps SDK for JS(二):MapView简介----创建2D地图

文章目录 1 AMD 引用 ArcGIS Maps SDK for JavaScript2 加载相应模块3 创建地图4 创建 2D 视图 view5 确定页面内容6 CSS 样式7 完整代码 本教程使用 AMD 模块&#xff0c;指导您如何在二维地图视图中创建一个简单的地图。 1 AMD 引用 ArcGIS Maps SDK for JavaScript 在 <…

【zookeeper】zookeeper日常运维

本文将分享一些zookeeper在日常使用中一些维护经验。 zookeeper清理快照 脚本或者命令清理 zookeeper长时间运行&#xff0c;快照逐渐增多可能造成服务器磁盘被占满的情况&#xff0c;但我们不能贸然用rm命令删除快照文件&#xff0c;如果直接删完会导致丢失好多数据&#x…

使用ppt和texlive生成eps图片(高清、可插入latex论文)

一、说明 写论文经常需要生成高清的图片插入到论文中&#xff0c;本文以ppt画图生成高质量的eps图片的实现来介绍具体操作方法。关于为什么要生成eps图片&#xff0c;一个是期刊要求&#xff08;也有不要求的&#xff09;&#xff0c;另一个是显示图像的质量高。 转化获得eps…

vue 页面加水印

首先创建一个waterMark.js文件&#xff0c;当然文件命名可自定义&#xff0c; use strictconst watermark {}/**** param {要设置的水印的内容} str* param {需要设置水印的容器} container*/ const setWatermark (str, container) > {const id 1.23452384164.123412415…

9.8day58 单调栈

739. 每日温度 - 力扣&#xff08;LeetCode&#xff09; 知识点&#xff1a;1.建栈 2.如果后面要加入的数小于栈顶元素就把数组的下标压进栈里 3.反之 就让该数于栈顶元素进行比较 如果该数大于栈顶元素&#xff08;while&#xff09; 就把栈顶元素下表对应的arr数组的值进行…

嵌入式Linux驱动开发(同步与互斥专题)(二)

一、自旋锁spinlock的实现 自旋锁&#xff0c;顾名思义&#xff1a;自己在原地打转&#xff0c;等待资源可用&#xff0c;一旦可用就上锁霸占它。 ① 原地打转的是CPU x&#xff0c;以后CPU y会解锁&#xff1a;这涉及多个CPU&#xff0c;适用于SMP系统&#xff1b; ② 对于单…

4.3.3.1 【MySQL】CHAR(M)列的存储格式

我们知道 Compact 行格式在 CHAR(M) 类型的列中存储数据的时候还挺麻烦&#xff0c;分变长字符集和定长字符集的情况&#xff0c;而在 Redundant 行格式中十分干脆&#xff0c;不管该列使用的字符集是啥&#xff0c;只要是使用 CHAR(M) 类型&#xff0c;占用的真实数据空间就是…

Java-HashMap中put()方法是如何实现的,内含详细流程图

文章目录 Java中的HashMap什么是HashMap&#xff1f;对比其他Map中put()方法HashMap中put()方法使用示例 HashMap中put()源码解析手绘流程图实现原理源码探究&#xff08;JDK 1.8&#xff09; 设计put()的意义总结 Java中的HashMap 什么是HashMap&#xff1f; HashMap是Java中…

2023国赛数学建模C题模型代码

C题代码全部都完成了&#xff0c;可以看文末名片 我们先看C题的一个背景 在生鲜商超中,蔬菜类商品保鲜期短,且品相会随销售时间增加而变差。商超需要根据历史销售和需求每天进行补货。由于蔬菜品种众多、产地不同,补货时间在凌晨,商家须在不明确具体单品和价格的情况下进行补…

好奇!为什么很少看到女项目经理?

最近被刚进公司的新人问到&#xff0c;在项目管理领域&#xff0c;为什么女性项目经理的数量相对较少。一时之间我也有些茫然&#xff0c;下了班总结一下&#xff0c;跟大家探讨探讨。 一、职业选择的局限性 其实大多数时候&#xff0c;出现和性别有关的问题时&#xff0c;都是…

mockjs+json-server模拟百万条数据

文章目录 前言场景前置操作安装axios或者Ajax&#xff08;作者用的是axios&#xff09;mock.js文件编辑编辑json-server文件夹添加百万条虚拟数据后言 前言 hello world 欢迎来到前端的世界 &#x1f61c;当前文章系列专栏&#xff1a;前端 &#x1f431;‍&#x1f453;博主在…

QT文件对话框,将标签内容保存至指定文件

一、主要步骤 首先&#xff0c;通过getSaveFileName过去想要保存的文件路径及文件名&#xff0c;其次&#xff0c;通过QFile类实例化一个文件对象&#xff0c;再读取文本框中的内容&#xff0c;最后将读取到的内容写入到文件中&#xff0c;最后关闭文件。 1.txt即为完成上述操作…

架构设计基础设施保障IaaS之网络

目录 1 DNS运用1.1 DNS功能作用1.2 DNS配置实践 2 DNS生产最佳实践方案2.1 全球加速功能2.2 不同运营商的加速方案2.3 全球业务高可用方案2.4 跨地域负载均衡 3 DNS域名劫持解决方案4 CDN剖析4.1 CDN原理4.2 缓存过期配置处理流程4.3 缓存配置规则 5 CDN运用6 CDN最佳实践方案6…

检索与毒害 —— 对抗人工智能供应链攻击

作者&#xff1a;DAVE ERICKSON 在这篇文章中&#xff0c;了解人工智能大语言模型的供应链漏洞&#xff0c;以及如何利用搜索引擎的人工智能检索技术来对抗人工智能的错误信息和故意篡改。 虽然对于人工智能研究人员来说可能是新鲜事&#xff0c;但供应链攻击对于网络安全世界…

入栏需看——学习记忆

记忆方法千千种&#xff0c;本栏意在梳理其中道道来&#xff0c;旦有小得&#xff0c;肥肠幸耶。从不同角度分析学习记忆。 逻辑篇 有逻辑 用思维导图 思维导图记忆有逻辑的文本/内容 理论 巧记书本结构–思维导图 模仿 HCIE-Cloud Computing LAB备考第一步&#xff1a…

解某麦数据请求参数analysis加密

意外发现一个可以查询app下载量得网站&#xff0c; 想筛选一下哪些下载量在1w-10w之间&#xff0c;大概需要5k个.。 感觉应该没啥加密&#xff0c;好把&#xff0c;是我小看了&#xff0c;有个参数是加密得&#xff0c;如图。 analysis 扣js开始&#xff0c; f12 去资源文件…

六大排序算法(Java版):从插入排序到快速排序(含图解)

目录 插入排序 (Insertion Sort) 直接插入排序的特性总结&#xff1a; 选择排序 (Selection Sort) 直接选择排序的特性总结 冒泡排序 (Bubble Sort) 冒泡排序的特性总结 堆排序&#xff08;Heap Sort&#xff09; 堆排序的特性总结 希尔排序 (Shell Sort) 希尔排序的…

一.使用qt creator 设计显示GUI

一.安装qt creator 二.创建项目 文件-》新建项目 三.使用设计 可以直接使用鼠标拖拽 四.转换为py文件 # from123.py 为导出 py文件的文件名 form.ui 为 qt creator创造的 ui 文件 pyuic5 -o x:\xxx\from123.py form.ui五.显示GUI from PyQt5.QtWidgets import * fr…

Kafka3.0.0版本——消费者(独立消费者消费某一个主题中某个分区数据案例__订阅分区)

目录 一、独立消费者消费某一个主题中某个分区数据案例1.1、案例需求1.2、案例代码1.3、测试 一、独立消费者消费某一个主题中某个分区数据案例 1.1、案例需求 创建一个独立消费者&#xff0c;消费firstTopic主题 0 号分区的数据&#xff0c;所下图所示&#xff1a; 1.2、案…