diff --git a/src/components/officialPopup/index.vue b/src/components/officialPopup/index.vue deleted file mode 100644 index 794d819..0000000 --- a/src/components/officialPopup/index.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - diff --git a/src/router/index.ts b/src/router/index.ts index 61d638c..2942a73 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -4,7 +4,6 @@ import pcRouter from './pcRouter'; import mobileRouter from './mobileRouter'; import MobilePrivacyPolicy from '@/views/mobile/privacyPolicy/index.vue'; import MobileSearch from '@/views/mobile/mobileSearch/index.vue'; -import Polymerization from '@/views/polymerization/index.vue'; const routes: RouteRecordRaw[] = [ { @@ -121,14 +120,6 @@ const routes: RouteRecordRaw[] = [ title: '历史记录', }, }, - { - path: '/polymerization', - name: 'polymerization', - component: Polymerization, - meta: { - title: '聚合下载', - }, - }, ]; const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -140,7 +131,7 @@ router.beforeEach((to, from, next) => { home && home.scrollTo(0, 0); document.title = '蛋黄派-' + to.meta.title; const token = localStorage.getItem('token'); - if (token || to.path === '/home' || to.path === '/polymerization') { + if (token || to.path === '/home') { next(); } else { next('/home'); diff --git a/src/views/mobile/components/HomeItem.vue b/src/views/mobile/components/HomeItem.vue index af1549a..a0f4d0f 100644 --- a/src/views/mobile/components/HomeItem.vue +++ b/src/views/mobile/components/HomeItem.vue @@ -3,7 +3,7 @@ - +
+
+ +
{{ adv.title }}
+
+
@@ -39,6 +39,7 @@ import { reactive, computed } from 'vue'; import { useGlobalStore } from '@/stores/global'; import { AdType } from '@/enums/app'; import { getAdItem } from '@/utils/getConfig'; +import { jumpAdv } from '@/utils/index'; import { useRoute, useRouter } from 'vue-router'; import HomeApi from '@/service/home'; const route = useRoute(); @@ -103,6 +104,13 @@ const jumpTopic = (item: any) => { }); }; +// 每个专区展示 ADV_ICON_COUNT 个小图标广告,广告不足时循环补齐 +const ADV_ICON_COUNT = 5; +const getSectionAdvs = (sectionIndex: number) => { + const len = state.advList.length; + return Array.from({ length: ADV_ICON_COUNT }, (_, i) => state.advList[(sectionIndex * ADV_ICON_COUNT + i) % len]); +}; + const init = () => { state.advList = getAdItem(AdType.MOBILEHOMETOPIC); queryList(); @@ -172,13 +180,29 @@ init(); grid-row-gap: 16px; grid-column-gap: 12px; } - .advBanner { + .advIconList { margin-top: 24px; - border-radius: 8px; - overflow: hidden; - height: 67px; - :deep(img) { - border-radius: 8px; + display: flex; + justify-content: space-between; + .advIconItem { + width: 60px; + .advIcon { + position: relative; + width: 60px; + height: 60px; + border-radius: 12px; + overflow: hidden; + } + .advName { + margin-top: 4px; + font-size: 12px; + line-height: 14px; + text-align: center; + color: #fff; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } } } } diff --git a/src/views/polymerization/MyDecryptImg/index.vue b/src/views/polymerization/MyDecryptImg/index.vue deleted file mode 100644 index 872fa79..0000000 --- a/src/views/polymerization/MyDecryptImg/index.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - diff --git a/src/views/polymerization/advClick.ts b/src/views/polymerization/advClick.ts deleted file mode 100644 index 5db8ae5..0000000 --- a/src/views/polymerization/advClick.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { getDevType } from '@/utils'; -export default function jumpAdvClick(item: any) { - window.open(item.url); - fetch('https://dhpht.cestalt.com/api/app/recreation/click',{ - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - id: item.id, - sysType: getDevType(), - type: item.type - }), - }).then((response) => response.json()) -} \ No newline at end of file diff --git a/src/views/polymerization/bg.jpg b/src/views/polymerization/bg.jpg deleted file mode 100644 index 563380a..0000000 Binary files a/src/views/polymerization/bg.jpg and /dev/null differ diff --git a/src/views/polymerization/index.vue b/src/views/polymerization/index.vue deleted file mode 100644 index 8699f22..0000000 --- a/src/views/polymerization/index.vue +++ /dev/null @@ -1,359 +0,0 @@ - - - diff --git a/src/views/polymerization/text.png b/src/views/polymerization/text.png deleted file mode 100644 index 296ec43..0000000 Binary files a/src/views/polymerization/text.png and /dev/null differ