-
+
普通分类
-
+
@@ -77,9 +77,9 @@
分类描述
-
- 导航栏分类优先级
+ 分类优先级
@@ -189,6 +189,7 @@
},
saveSortEdit() {
if (this.$common.isEmpty(this.sortForHttp.sortType) ||
+ this.$common.isEmpty(this.sortForHttp.priority) ||
this.$common.isEmpty(this.sortForHttp.sortName) ||
this.$common.isEmpty(this.sortForHttp.sortDescription)) {
this.$message({
@@ -198,14 +199,6 @@
return;
}
- if (this.sortForHttp.sortType === 0 && this.$common.isEmpty(this.sortForHttp.priority)) {
- this.$message({
- message: "导航栏分类必须输入优先级!",
- type: "error"
- });
- return;
- }
-
let url;
if (this.$common.isEmpty(this.sortForHttp.id)) {
url = "/webInfo/saveSort";
diff --git a/src/components/admin/userList.vue b/src/components/admin/userList.vue
index 61f86d4..cc2ee9c 100644
--- a/src/components/admin/userList.vue
+++ b/src/components/admin/userList.vue
@@ -20,6 +20,12 @@
+
+
+
+
+
{
+ this.$http.get(this.$constant.baseURL + "/admin/user/changeUserAdmire", {
+ userId: user.id,
+ admire: user.admire
+ }, true)
+ .then((res) => {
+ this.$message({
+ message: "修改成功!",
+ type: "success"
+ });
+ })
+ .catch((error) => {
+ this.$message({
+ message: error.message,
+ type: "error"
+ });
+ });
+ }).catch(() => {
+ this.$message({
+ type: 'success',
+ message: '已取消保存!'
+ });
+ });
+ }
+ },
editUser(user) {
this.changeUser.id = user.id;
this.changeUser.userType = user.userType;
diff --git a/src/components/articleList.vue b/src/components/articleList.vue
index 5ddbf3f..998b1e1 100644
--- a/src/components/articleList.vue
+++ b/src/components/articleList.vue
@@ -14,7 +14,7 @@
发现
-
{{ article.articleTitle }}
+
+
+ {{ article.articleTitle }}
+ {{ article.articleTitle }}
+
+
diff --git a/src/components/comment/commentBox.vue b/src/components/comment/commentBox.vue
index d2c991b..fc0c590 100644
--- a/src/components/comment/commentBox.vue
+++ b/src/components/comment/commentBox.vue
@@ -88,14 +88,6 @@
return;
}
- if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
- this.$message({
- message: "请先绑定邮箱!",
- type: "error"
- });
- return;
- }
-
this.showPicture = true;
},
@@ -121,14 +113,6 @@
return;
}
- if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
- this.$message({
- message: "请先绑定邮箱!",
- type: "error"
- });
- return;
- }
-
this.commentContent = "";
this.$emit("showGraffiti");
},
@@ -141,18 +125,10 @@
return;
}
- if (this.$common.isEmpty(this.$store.state.currentUser.email)) {
- this.$message({
- message: "请先绑定邮箱!",
- type: "error"
- });
- return;
- }
-
if (this.commentContent.trim() === "") {
this.$message({
message: "你还没写呢~",
- type: "warning",
+ type: "warning"
});
return;
}
diff --git a/src/components/comment/graffiti.vue b/src/components/comment/graffiti.vue
index 48b65e1..7412d16 100644
--- a/src/components/comment/graffiti.vue
+++ b/src/components/comment/graffiti.vue
@@ -144,7 +144,7 @@
this.setCanvasStyle();
},
created() {
- if (!this.$common.isEmpty(this.$store.state.currentUser) && !this.$common.isEmpty(this.$store.state.currentUser.email)) {
+ if (!this.$common.isEmpty(this.$store.state.currentUser)) {
this.getUpToken();
}
},
@@ -275,7 +275,7 @@
if (this.preDrawAry.length < 1) {
this.$message({
message: "你还没画呢~",
- type: "warning",
+ type: "warning"
});
return;
}
diff --git a/src/components/common/photo.vue b/src/components/common/photo.vue
index 6fec8ae..f6a5a40 100644
--- a/src/components/common/photo.vue
+++ b/src/components/common/photo.vue
@@ -15,9 +15,9 @@
- {{resourcePath.introduction}}
+ {{resourcePath.title}}
- {{resourcePath.introduction}}
+ {{resourcePath.title}}
diff --git a/src/components/common/treeHole.vue b/src/components/common/treeHole.vue
index 9920817..97e17c6 100644
--- a/src/components/common/treeHole.vue
+++ b/src/components/common/treeHole.vue
@@ -19,7 +19,7 @@
😃 {{treeHole.createTime}}
+ v-if="!$common.isEmpty($store.state.currentUser) && $store.state.currentUser.id === treeHole.userId">
-
{{index + 1}}号选手:{{item.title}}
+
{{index + 1}}号选手:{{item.classify}}
-
+
-
{{funny.introduction}}
+
{{funny.title}}
@@ -88,26 +88,26 @@
pagination: {
current: 1,
size: 9999,
- order: "introduction",
+ order: "title",
desc: false,
resourceType: "funny",
- searchKey: ""
+ classify: ""
},
activeName: 0,
audio: null,
funnys: [{
- title: "",
+ classify: "",
count: null,
data: [{
- title: "",
+ classify: "",
cover: "",
url: "",
- introduction: ""
+ title: ""
}]
}],
funny: {
+ classify: "",
title: "",
- introduction: "",
cover: "",
url: ""
}
@@ -132,7 +132,7 @@
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.funnys = res.data;
- this.changeFunny(this.funnys[0].title);
+ this.changeFunny(this.funnys[0].classify);
}
})
.catch((error) => {
@@ -147,13 +147,13 @@
.then((res) => {
if (!this.$common.isEmpty(res.data) && !this.$common.isEmpty(res.data.records)) {
this.funnys.forEach(funny => {
- if (funny.title === this.pagination.searchKey) {
+ if (funny.classify === this.pagination.classify) {
funny.data = res.data.records;
this.$forceUpdate();
}
});
}
- this.pagination.searchKey = "";
+ this.pagination.classify = "";
})
.catch((error) => {
this.$message({
@@ -162,10 +162,10 @@
});
});
},
- changeFunny(title) {
+ changeFunny(classify) {
this.funnys.forEach(funny => {
- if (funny.title === title && this.$common.isEmpty(funny.data)) {
- this.pagination.searchKey = title;
+ if (funny.classify === classify && this.$common.isEmpty(funny.data)) {
+ this.pagination.classify = classify;
this.listFunny();
}
});
diff --git a/src/components/home.vue b/src/components/home.vue
index 1e4e5ce..9b8b1c3 100644
--- a/src/components/home.vue
+++ b/src/components/home.vue
@@ -6,7 +6,7 @@
@@ -29,13 +29,14 @@
🏡 首页
-
-
-
+
+
+
+
+
+
+
+
@@ -44,16 +45,23 @@
+
+
+
+
+
-
+
@@ -161,13 +169,14 @@
🏡
首页
-
-
- 📒 {{ menu.sortName }}
-
-
+
+
+
+
+
+
+
+
@@ -176,16 +185,23 @@
+
+
+
+ 🧰 百宝箱
+
+
+
💬 非礼勿言
-
+
- 🐔 只因
+ 🎺 曲乐
@@ -266,6 +282,7 @@
root.style.setProperty("--articleFontColor", "#E4E4E4");
root.style.setProperty("--articleGreyFontColor", "#D4D4D4");
root.style.setProperty("--commentContent", "#D4D4D4");
+ root.style.setProperty("--favoriteBg", "#1e1e1e");
}
},
destroyed() {
@@ -397,6 +414,7 @@
root.style.setProperty("--articleFontColor", "#E4E4E4");
root.style.setProperty("--articleGreyFontColor", "#D4D4D4");
root.style.setProperty("--commentContent", "#D4D4D4");
+ root.style.setProperty("--favoriteBg", "#1e1e1e");
} else {
root.style.setProperty("--background", "white");
root.style.setProperty("--fontColor", "black");
@@ -405,6 +423,7 @@
root.style.setProperty("--articleFontColor", "#1F1F1F");
root.style.setProperty("--articleGreyFontColor", "#616161");
root.style.setProperty("--commentContent", "#F7F9FE");
+ root.style.setProperty("--favoriteBg", "#f7f9fe");
}
},
toTop() {
diff --git a/src/components/index.vue b/src/components/index.vue
index d6e9ecb..36127db 100644
--- a/src/components/index.vue
+++ b/src/components/index.vue
@@ -40,7 +40,7 @@
-
+
@@ -98,7 +98,8 @@
current: 1,
size: 10,
total: 0,
- searchKey: ""
+ searchKey: "",
+ sortId: null
},
guShi: {
"content": "",
@@ -121,13 +122,31 @@
},
methods: {
+ async selectSort(sort) {
+ this.pagination = {
+ current: 1,
+ size: 10,
+ total: 0,
+ searchKey: "",
+ sortId: sort.id
+ };
+ this.articles = [];
+ await this.getArticles();
+ this.$nextTick(() => {
+ document.querySelector('.recent-posts').scrollIntoView({
+ behavior: "smooth",
+ block: "start",
+ inline: "nearest"
+ });
+ });
+ },
pageArticles() {
this.pagination.current = this.pagination.current + 1;
this.getArticles();
},
- getArticles() {
- this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination)
+ async getArticles() {
+ await this.$http.post(this.$constant.baseURL + "/article/listArticle", this.pagination)
.then((res) => {
if (!this.$common.isEmpty(res.data)) {
this.articles = this.articles.concat(res.data.records);
diff --git a/src/components/love.vue b/src/components/love.vue
index 930fd83..2b1eb46 100644
--- a/src/components/love.vue
+++ b/src/components/love.vue
@@ -113,7 +113,7 @@
+ :src="$constant.loveWeiYan">
@@ -160,24 +160,16 @@
-
-
-
+
+
- {{photoPagination.searchKey}}
+ {{photoPagination.classify}}
@@ -423,7 +415,7 @@