diff --git a/src/pages/user/questions-answers/community.vue b/src/pages/user/questions-answers/community.vue index cb26d5f8a88e89d40b7820e46979bd5a7dd09dd1..9efe1639e86b550bdd7bceffe7416806ae606c82 100644 --- a/src/pages/user/questions-answers/community.vue +++ b/src/pages/user/questions-answers/community.vue @@ -235,11 +235,11 @@ export default { style: 3, create_user: this.search_user, start: - this.search_date && this.search_date.length != 0 + this.search_date && this.search_date[0] ? this.search_date[0] : "", end: - this.search_date && this.search_date.length != 0 + this.search_date && this.search_date[1] ? this.search_date[1] : "", limit: this.currentlimit, @@ -248,7 +248,7 @@ export default { }; this.$api.user.getQuestionList(query).then((response) => { if (response.data.success == 1) { - this.tableData = response.data.data; + this.tableData = response.data.data || []; this.total_list = response.data.total; } }); @@ -260,11 +260,11 @@ export default { style: 3, create_user: this.search_user, start: - this.search_date && this.search_date.length != 0 + this.search_date && this.search_date[0] ? this.search_date[0] : "", end: - this.search_date && this.search_date.length != 0 + this.search_date && this.search_date[1] ? this.search_date[1] : "", limit: this.currentlimit, @@ -272,7 +272,7 @@ export default { }; this.$api.user.getAnswerList(query).then((response) => { if (response.data.success == 1) { - this.tableData = response.data.data; + this.tableData = response.data.data || []; this.total_list = response.data.total; } });