تغییرات

This commit is contained in:
Mehdi104797 2025-04-03 11:00:58 +03:30
parent be90244a87
commit daf14f2b1b

View File

@ -411,14 +411,14 @@
<img <img
class="group-picture" class="group-picture"
@error="handleImageSrcOnError($event, false)" @error="handleImageSrcOnError($event, false)"
src="~/assets/common/img/icomoon/PNG/eye.png" src="~/assets/common/img/icomoon/PNG/eye.png"
:alt="groupItem.title" :alt="groupItem.title"
/> />
<img <img
class="group-picture mini-mode" class="group-picture mini-mode"
@error="handleImageSrcOnError($event, false)" @error="handleImageSrcOnError($event, false)"
@click.prevent="showMessages(groups, groupItem, index)" @click.prevent="showMessages(groups, groupItem, index)"
src="~/assets/common/img/icomoon/PNG/eye.png" src="~/assets/common/img/icomoon/PNG/eye.png"
:alt="groupItem.title" :alt="groupItem.title"
/> />
</div> </div>
@ -492,14 +492,14 @@
<img <img
class="group-picture" class="group-picture"
@error="handleImageSrcOnError($event, false)" @error="handleImageSrcOnError($event, false)"
src="~/assets/common/img/icomoon/PNG/eye.png" src="~/assets/common/img/icomoon/PNG/eye.png"
:alt="groupItem.title" :alt="groupItem.title"
/> />
<img <img
class="group-picture mini-mode" class="group-picture mini-mode"
@error="handleImageSrcOnError($event, false)" @error="handleImageSrcOnError($event, false)"
@click.prevent="showMessages(groups, groupItem, index)" @click.prevent="showMessages(groups, groupItem, index)"
src="~/assets/common/img/icomoon/PNG/eye.png" src="~/assets/common/img/icomoon/PNG/eye.png"
:alt="groupItem.title" :alt="groupItem.title"
/> />
</div> </div>
@ -1318,6 +1318,9 @@ export default {
// immediate: true, // immediate: true,
}, },
}, },
created() {
this.httpService = useNuxtApp()["$http"];
},
beforeMount() { beforeMount() {
const { $eventBus } = useNuxtApp(); const { $eventBus } = useNuxtApp();
// fired from chat.vue footer menu // fired from chat.vue footer menu
@ -1371,7 +1374,8 @@ export default {
// "app-version-code": import.meta.env.VITE_APP_VERSION, // "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.authHttpService = new HttpService(import.meta.env.VITE_AUTH_BASE_URL);
// this.keyValueHttpService = new HttpService( // this.keyValueHttpService = new HttpService(
@ -1512,7 +1516,7 @@ export default {
collapseAll: false, collapseAll: false,
groups: [], groups: [],
showReplaceInput: true, showReplaceInput: true,
httpService: undefined, httpService: {},
authHttpService: undefined, authHttpService: undefined,
list: [], list: [],
@ -1622,12 +1626,13 @@ export default {
target.classList.add("error"); target.classList.add("error");
}, },
getGroupTypes() { getGroupTypes() {
this.httpService let url = chatApi.forms.groupTypes;
.postRequest("keyvalue/" + chatApi.forms.groupTypes) console.log("🚀 ~ getGroupTypes ~ url:", url);
.then((response) => { this.httpService.postRequest("api/keyvalue/" + url).then((response) => {
this.groupfilters = response.data; this.groupfilters = response.data;
}); });
}, },
showGroupFilter() { showGroupFilter() {
if (this.isGroupFilterActive) { if (this.isGroupFilterActive) {
this.selectedGroupFilter = []; this.selectedGroupFilter = [];
@ -1705,7 +1710,7 @@ export default {
if (this.fetchingData) return; if (this.fetchingData) return;
this.fetchingData = true; this.fetchingData = true;
let url = "message/" + chatApi[listType].list; let url = "api/message/" + chatApi[listType].list;
// let urlPrefix = chatApi.groups.list; // let urlPrefix = chatApi.groups.list;
if (!(listType == "lobbies" || listType == "unReads")) if (!(listType == "lobbies" || listType == "unReads"))
@ -1724,7 +1729,7 @@ export default {
this.inviteLinkId = this.$route.query["invite-id"]; this.inviteLinkId = this.$route.query["invite-id"];
this.redirectViaInviteLink = true; this.redirectViaInviteLink = true;
} }
const tempGroupFilter = this.selectedGroupFilter; const tempGroupFilter = this.selectedGroupFilter;
const payload = { const payload = {
type: tempGroupFilter.map((item) => item.id), type: tempGroupFilter.map((item) => item.id),
@ -1954,7 +1959,9 @@ export default {
}, },
getListOnScroll() { getListOnScroll() {
debugger;
const listType = this.$route.name; const listType = this.$route.name;
console.log("🚀 ~ getListOnScroll ~ listType:", listType);
let url = "message/" + chatApi[listType].list; let url = "message/" + chatApi[listType].list;
// let urlPrefix = chatApi.groups.list; // let urlPrefix = chatApi.groups.list;
@ -1967,9 +1974,11 @@ export default {
// const methodType = listType == "unReads" ? 'postRequest' : 'getRequest' // const methodType = listType == "unReads" ? 'postRequest' : 'getRequest'
const tempGroupFilter = this.selectedGroupFilter; const tempGroupFilter = this.selectedGroupFilter;
console.log("🚀 ~ getListOnScroll ~ tempGroupFilter:", tempGroupFilter);
const payload = { const payload = {
type: tempGroupFilter.map((item) => item.id), type: tempGroupFilter.map((item) => item.id),
}; };
console.log("🚀 ~ getListOnScroll ~ url:", url);
this.httpService this.httpService
.postRequest(url, payload) .postRequest(url, payload)