diff --git a/src/pages/user/questions-answers/community.vue b/src/pages/user/questions-answers/community.vue index 56e0c27453638fa09052bdb550c5f84562712c1d..b8cba5218cc4e166b6776c58b65276ac278e6177 100644 --- a/src/pages/user/questions-answers/community.vue +++ b/src/pages/user/questions-answers/community.vue @@ -226,12 +226,19 @@ export default { this.diaDel = true; }, getQList() { + console.log(this.search_date); let query = { search: this.search_ask, style: 3, create_user: this.search_user, - start: this.search_date.length != 0 ? this.search_date[0] : "", - end: this.search_date.length != 0 ? this.search_date[1] : "", + start: + this.search_date && this.search_date.length != 0 + ? this.search_date[0] + : "", + end: + this.search_date && this.search_date.length != 0 + ? this.search_date[1] + : "", limit: this.currentlimit, page: this.currentPage, order: "created", @@ -244,12 +251,19 @@ export default { }); }, getAList() { + console.log(this.search_date); let query = { search: this.search_ask, style: 3, create_user: this.search_user, - start: this.search_date.length != 0 ? this.search_date[0] : "", - end: this.search_date.length != 0 ? this.search_date[1] : "", + start: + this.search_date && this.search_date.length != 0 + ? this.search_date[0] + : "", + end: + this.search_date && this.search_date.length != 0 + ? this.search_date[1] + : "", limit: this.currentlimit, page: this.currentPage, };