From 325cd2f8d5f3be0658b1f4eb7972af14e193013f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AE=BF=E6=98=95?= Date: Wed, 4 Nov 2020 16:09:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=AB=E5=90=8D=E5=85=B6?= =?UTF-8?q?=E5=A6=99=E6=97=B6=E9=97=B4undefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/questions-answers/community.vue | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/pages/user/questions-answers/community.vue b/src/pages/user/questions-answers/community.vue index 56e0c27..b8cba52 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, }; -- 2.26.0