Skip to content

Commit a2d4bee

Browse files
committed
修改关于我bug
1 parent 0597fe2 commit a2d4bee

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

blog-mysql8.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ INSERT INTO `tb_menu` VALUES (214, '网站管理', '/website', '/website/Website
205205
DROP TABLE IF EXISTS `tb_message`;
206206
CREATE TABLE `tb_message` (
207207
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
208-
`nickname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '昵称',
208+
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '昵称',
209209
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '头像',
210210
`message_content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '留言内容',
211211
`ip_address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户ip',

blog-springboot/src/main/java/com/minzheng/blog/vo/BlogInfoVO.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ public class BlogInfoVO {
2424
*/
2525
private String aboutContent;
2626

27-
2827
}

blog-vue/admin/src/views/about/About.vue

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,23 @@ export default {
3333
});
3434
},
3535
updateAbout() {
36-
let param = new URLSearchParams();
37-
param.append("aboutContent", this.aboutContent);
38-
this.axios.put("/api/admin/about", param).then(({ data }) => {
39-
if (data.flag) {
40-
this.$notify.success({
41-
title: "成功",
42-
message: data.message
43-
});
44-
} else {
45-
this.$notify.error({
46-
title: "失败",
47-
message: data.message
48-
});
49-
}
50-
});
36+
this.axios
37+
.put("/api/admin/about", {
38+
aboutContent: this.aboutContent
39+
})
40+
.then(({ data }) => {
41+
if (data.flag) {
42+
this.$notify.success({
43+
title: "成功",
44+
message: data.message
45+
});
46+
} else {
47+
this.$notify.error({
48+
title: "失败",
49+
message: data.message
50+
});
51+
}
52+
});
5153
}
5254
}
5355
};

0 commit comments

Comments
 (0)