แสดงการแจ้งเตือน
This commit is contained in:
parent
4079eb1b84
commit
a5e476e49a
1 changed files with 20 additions and 3 deletions
|
|
@ -51,6 +51,7 @@ async function fetchTotolNotificate() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const statusLoad = ref<boolean>(false);
|
||||||
const fetchlistNotification = async (index: number, type: string) => {
|
const fetchlistNotification = async (index: number, type: string) => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.msgNotificate + `?page=${index}&pageSize=${15}`)
|
.get(config.API.msgNotificate + `?page=${index}&pageSize=${15}`)
|
||||||
|
|
@ -75,8 +76,7 @@ const fetchlistNotification = async (index: number, type: string) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
notiList.value.push(...list);
|
notiList.value.push(...list);
|
||||||
|
statusLoad.value = totalInbox.value === 0 ? true : false;
|
||||||
totalInbox.value = res.data.result.total;
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
@ -238,7 +238,11 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||||
ทั้งหมด {{ totalInbox }} ข้อความ
|
ทั้งหมด {{ totalInbox }} ข้อความ
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-infinite-scroll @load="onLoad" :offset="250">
|
<q-infinite-scroll
|
||||||
|
@load="onLoad"
|
||||||
|
:offset="250"
|
||||||
|
v-if="statusLoad === false"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in notiList"
|
v-for="(item, index) in notiList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|
@ -309,6 +313,19 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</q-infinite-scroll>
|
</q-infinite-scroll>
|
||||||
|
<div class="q-pa-md" v-else>
|
||||||
|
<q-banner rounded class="bg-amber-1 text-center">
|
||||||
|
<div class="text-yellow-10">
|
||||||
|
<q-icon
|
||||||
|
name="mdi-alert-box"
|
||||||
|
class="q-mx-xs"
|
||||||
|
size="sm"
|
||||||
|
color="yellow-10"
|
||||||
|
/>
|
||||||
|
ไมมีข้อมูล
|
||||||
|
</div>
|
||||||
|
</q-banner>
|
||||||
|
</div>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue