From daf14f2b1b116129a1c19e732df84d38d07b6275 Mon Sep 17 00:00:00 2001 From: Mehdi104797 <92753457+Mehdi104797@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:00:58 +0330 Subject: [PATCH] =?UTF-8?q?=D8=AA=D8=BA=DB=8C=DB=8C=D8=B1=D8=A7=D8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/chat/components/Group.vue | 35 +++++++++++++++++----------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/components/chat/components/Group.vue b/components/chat/components/Group.vue index 188ffe3..03d0b0e 100644 --- a/components/chat/components/Group.vue +++ b/components/chat/components/Group.vue @@ -411,14 +411,14 @@ @@ -492,14 +492,14 @@ @@ -1318,6 +1318,9 @@ export default { // immediate: true, }, }, + created() { + this.httpService = useNuxtApp()["$http"]; + }, beforeMount() { const { $eventBus } = useNuxtApp(); // fired from chat.vue footer menu @@ -1371,7 +1374,8 @@ export default { // "app-version-code": import.meta.env.VITE_APP_VERSION, // }; - this.httpService = useNuxtApp()["$http"]; + + // this.authHttpService = new HttpService(import.meta.env.VITE_AUTH_BASE_URL); // this.keyValueHttpService = new HttpService( @@ -1512,7 +1516,7 @@ export default { collapseAll: false, groups: [], showReplaceInput: true, - httpService: undefined, + httpService: {}, authHttpService: undefined, list: [], @@ -1622,12 +1626,13 @@ export default { target.classList.add("error"); }, getGroupTypes() { - this.httpService - .postRequest("keyvalue/" + chatApi.forms.groupTypes) - .then((response) => { - this.groupfilters = response.data; - }); + let url = chatApi.forms.groupTypes; + console.log("🚀 ~ getGroupTypes ~ url:", url); + this.httpService.postRequest("api/keyvalue/" + url).then((response) => { + this.groupfilters = response.data; + }); }, + showGroupFilter() { if (this.isGroupFilterActive) { this.selectedGroupFilter = []; @@ -1705,7 +1710,7 @@ export default { if (this.fetchingData) return; this.fetchingData = true; - let url = "message/" + chatApi[listType].list; + let url = "api/message/" + chatApi[listType].list; // let urlPrefix = chatApi.groups.list; if (!(listType == "lobbies" || listType == "unReads")) @@ -1724,7 +1729,7 @@ export default { this.inviteLinkId = this.$route.query["invite-id"]; this.redirectViaInviteLink = true; } - + const tempGroupFilter = this.selectedGroupFilter; const payload = { type: tempGroupFilter.map((item) => item.id), @@ -1954,7 +1959,9 @@ export default { }, getListOnScroll() { + debugger; const listType = this.$route.name; + console.log("🚀 ~ getListOnScroll ~ listType:", listType); let url = "message/" + chatApi[listType].list; // let urlPrefix = chatApi.groups.list; @@ -1967,9 +1974,11 @@ export default { // const methodType = listType == "unReads" ? 'postRequest' : 'getRequest' const tempGroupFilter = this.selectedGroupFilter; + console.log("🚀 ~ getListOnScroll ~ tempGroupFilter:", tempGroupFilter); const payload = { type: tempGroupFilter.map((item) => item.id), }; + console.log("🚀 ~ getListOnScroll ~ url:", url); this.httpService .postRequest(url, payload)