diff --git a/src/components/Main.vue b/src/components/Main.vue index 6dcb7d6..7009509 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -82,9 +82,22 @@ export default defineComponent({ size: pageSize, }, }) - .then(function (response) { - appList.value = response.data.data.list; + .then(async (response) => { total.value = response.data.data.total; + const list = response.data.data.list.filter(app => !app.icon.endsWith("application-x-executable.svg")) + // 因为有部分应用没有图标不利于演示,暂时隐藏 + if (list.length < 24) { + const randomPage = Math.floor(Math.random() * 20) + 20 + const resp = await service + .get(`/api/v0/web-store/apps`, { + params: { + page: randomPage, + size: pageSize, + }, + }) + list.push(...resp.data.data.list.filter(app => !app.icon.endsWith("application-x-executable.svg"))) + } + appList.value = list.slice(0, size); dataLoadingFlag.value = false; }) .catch(function (error) {