图片上传到图床

This commit is contained in:
jqtmviyu 2025-03-29 16:55:07 +08:00
parent 7f9e25dc6e
commit bcb5a6d865
6 changed files with 18 additions and 18 deletions

View File

@ -436,7 +436,7 @@ display: -webkit-box;
</html>
```
![](https://img.081024.xyz/Pasted image 20250307165306.png)
![](https://img.081024.xyz/Pasted%20image%2020250307165306.png)
```css
.miaosha i {
@ -451,7 +451,7 @@ display: -webkit-box;
}
```
![](https://img.081024.xyz/Pasted image 20250307165159.png)
![](https://img.081024.xyz/Pasted%20image%2020250307165159.png)
```css
/** 让border左下宽度为0,*/
@ -467,4 +467,4 @@ display: -webkit-box;
}
```
![](https://img.081024.xyz/Pasted image 20250307165642.png)
![](https://img.081024.xyz/Pasted%20image%2020250307165642.png)

View File

@ -226,7 +226,7 @@ index -> index.js -> index.json -> index.node
3. 如果上一层目录中也没有查找到,则再向上翻一层去查找,直到找到当前项目所在的盘符根目录为止!
4. 如果找到当前盘符根目录还找不到,则报错:***cannot find module***
![|528x731](1-node补充-1743191788266.png)
![](https://img.081024.xyz/模块加载流程.drawio.png)
## nodejs 加密

View File

@ -19,7 +19,7 @@ cookie、session、token、jwt、单点登录 https://zhuanlan.zhihu.com/p/2814
## session
![](../assets/Pasted%20image%2020230326031222.png)
![](https://img.081024.xyz/Pasted%20image%2020230326031222.png)
* ==信息存在服务器, id 存一份在浏览器==, 只把信息对应的唯一 id 通过 cookie 发给用户, 用户请求数据在 cookie 里携带这个 id
* express-session `app.use(session({secret: "加密的盐"}))`
@ -37,8 +37,8 @@ cookie、session、token、jwt、单点登录 https://zhuanlan.zhihu.com/p/2814
> session 的维护给服务端造成很大困扰,我们必须找地方存放它,又要考虑分布式的问题,甚至要单独为了它启用一套 Redis 集群
> 用户登录,服务端校验账号密码,获得用户信息, 把用户信息、token 配置编码成 token发给浏览器
![](../assets/Pasted%20image%2020230326031429.png)
![](https://pic3.zhimg.com/v2-ed5716bacaf7936a14553bb6723d2b4e_r.jpg)
![](https://img.081024.xyz/Pasted%20image%2020230326031429.png)
![|1208x324](https://img.081024.xyz/v2-ed5716bacaf7936a14553bb6723d2b4e_r.jpg)
## refresh token
@ -47,7 +47,7 @@ cookie、session、token、jwt、单点登录 https://zhuanlan.zhihu.com/p/2814
* access token 用来访问业务接口,由于有效期足够短,盗用风险小,也可以使请求方式更宽松灵活
* refresh token 用来获取 access token有效期可以长一些通过独立服务和严格的请求方式增加安全性由于不常验证==也可以如前面的 session 一样处理, 存服务器, 并且能主动使其失效==
![](../assets/Pasted%20image%2020230326032412.png)
![](https://img.081024.xyz/Pasted%20image%2020230326032412.png)
## jwt
@ -60,7 +60,7 @@ cookie、session、token、jwt、单点登录 https://zhuanlan.zhihu.com/p/2814
jwt 格式:
![](https://pic1.zhimg.com/v2-726d71fbe8fba4adb9c9f7b5e0854ce4_r.jpg)
![|1208x478](https://img.081024.xyz/v2-726d71fbe8fba4adb9c9f7b5e0854ce4_r.jpg)
base 64 加密后的 header 和 base 64 加密后的 payload 使用.连接组成的字符串 (头部在前),然后通过 header 中声明的加密方式进行加盐 secret 组合加密,然后就构成了 jwt 的第三部分
@ -158,7 +158,7 @@ app.use(expressJwt({
## 单点登录
![](../assets/Pasted%20image%2020230326033011.png)
![](https://img.081024.xyz/Pasted%20image%2020230326033011.png)
## OAuth 2.0
@ -166,4 +166,4 @@ app.use(expressJwt({
https://www.jianshu.com/p/c93823396844
![](../assets/Pasted%20image%2020230326043412.png)
![](https://img.081024.xyz/Pasted%20image%2020230326043412.png)

View File

@ -399,7 +399,7 @@ SELECT timestampdiff(DAY, '2024-01-01', NOW());
### 多表查询
![](assets/6-MySQL-20240601234301884.jpg)
![](https://img.081024.xyz/6-MySQL-20240601234301884.jpg)
#### 交叉连接/关联查询
@ -445,9 +445,9 @@ from student left join score on student.sno=score.sno
where student.degree is NULL;
```
![](assets/6-MySQL-20240602021704838.jpg)
![](https://img.081024.xyz/6-MySQL-20240602021704838.jpg)
![](assets/6-MySQL-20240602021732743.jpg)
![](https://img.081024.xyz/6-MySQL-20240602021732743.jpg)
#### 子查询

View File

@ -6,7 +6,7 @@
https://vuex.vuejs.org/zh/
![image-20210127204118836|788x443](assets/image-20210127204118836.png)
![image-20210127204118836|788x443](https://img.081024.xyz/image-20210127204118836.png)
1. 修改state状态必须通过 **`mutations`**
2. **`mutations`** 只能执行**同步**代码,类似 ajax、定时器之类的代码不能在mutations中执行

View File

@ -28,7 +28,7 @@ npx create-strapi-app@latest my-project --quickstart
1. 添加类型
`模型构建器 --> 创建一个新的Content Type --> 名称: student --> 添加字段: name, gender, age, address --> 最后保存`
![](../assets/2023-01-07_14-30-36.jpg)
![|837x348](https://img.081024.xyz/2023-01-07_14-30-36.jpg)
2. 添加内容
`内容管理 --> student --> 添加条目`
@ -39,7 +39,7 @@ npx create-strapi-app@latest my-project --quickstart
`模型构建器 --> student --> 编辑 --> 高级设置 --> Draft: 关闭`
![](../assets/Pasted%20image%2020230107144153.png)
![](https://img.081024.xyz/Pasted%20image%2020230107144153.png)
3. 查看api
`设置 --> 角色列表 --> Public --> 权限 --> 选中 --> 图标`
@ -49,4 +49,4 @@ npx create-strapi-app@latest my-project --quickstart
{"data":[{"id":1,"attributes":{"name":"孙悟空","gender":"male","age":18,"address":"花果山","createdAt":"2023-01-07T05:54:16.938Z","updatedAt":"2023-01-07T05:54:32.179Z"}},{"id":2,"attributes":{"name":"猪八戒","gender":"male","age":25,"address":"高老庄","createdAt":"2023-01-07T06:40:22.715Z","updatedAt":"2023-01-07T06:40:22.715Z"}}],"meta":{"pagination":{"page":1,"pageSize":25,"pageCount":1,"total":2}}}
```
![](../assets/Pasted%20image%2020230107144440.png)
![](https://img.081024.xyz/Pasted%20image%2020230107144440.png)