|
|
|
@@ -10,7 +10,7 @@ |
|
|
|
@refresherrefresh="onRefresh" |
|
|
|
> |
|
|
|
<view class="toolbox-content"> |
|
|
|
<swiper class="hero" circular autoplay :interval="4000" @change="onBannerChange"> |
|
|
|
<swiper v-if="banners.length" class="hero" circular autoplay :interval="4000" @change="onBannerChange"> |
|
|
|
<swiper-item v-for="(banner, i) in banners" :key="i" @click="onTool(banner)"> |
|
|
|
<image class="hero-img" :src="banner.image" mode="aspectFill" /> |
|
|
|
</swiper-item> |
|
|
|
@@ -56,28 +56,22 @@ import { useApp } from '@/utils/useApp.js' |
|
|
|
const { toast } = useApp() |
|
|
|
const refreshing = ref(false) |
|
|
|
const bannerIndex = ref(0) |
|
|
|
const AI_CDN_BASE = 'https://cdn.aionline.cc/ai' |
|
|
|
|
|
|
|
const defaultBanners = [ |
|
|
|
{ |
|
|
|
image: '/static/toolbox/home_banner_note17.png', |
|
|
|
title: 'Note 17 系列', |
|
|
|
link_type: 'none', |
|
|
|
type: '' |
|
|
|
} |
|
|
|
] |
|
|
|
const defaultBanners = [] |
|
|
|
|
|
|
|
const defaultRecommends = [ |
|
|
|
{ |
|
|
|
name: 'AI动漫头像', |
|
|
|
title: 'AI动漫头像', |
|
|
|
image: '/static/toolbox/home_card_avatar.png', |
|
|
|
image: `${AI_CDN_BASE}/toolbox/home_card_avatar.png`, |
|
|
|
link_type: 'app', |
|
|
|
type: 'anime-avatar' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'AI取名', |
|
|
|
title: 'AI取名', |
|
|
|
image: '/static/toolbox/home_card_name.png', |
|
|
|
image: `${AI_CDN_BASE}/toolbox/home_card_name.png`, |
|
|
|
link_type: 'app', |
|
|
|
type: 'ai-name' |
|
|
|
} |
|
|
|
@@ -85,7 +79,7 @@ const defaultRecommends = [ |
|
|
|
|
|
|
|
const defaultApps = [ |
|
|
|
{ |
|
|
|
icon: '/static/toolbox/tool_id_photo.png', |
|
|
|
icon: `${AI_CDN_BASE}/toolbox/tool_id_photo.png`, |
|
|
|
name: 'AI证件照/签证照', |
|
|
|
title: 'AI证件照/签证照', |
|
|
|
desc: '各类规格证件照、免冠照、换底色换正装', |
|
|
|
@@ -94,7 +88,7 @@ const defaultApps = [ |
|
|
|
type: 'id-photo' |
|
|
|
}, |
|
|
|
{ |
|
|
|
icon: '/static/toolbox/tool_portrait.png', |
|
|
|
icon: `${AI_CDN_BASE}/toolbox/tool_portrait.png`, |
|
|
|
name: 'AI形象照/职业照/写真', |
|
|
|
title: 'AI形象照/职业照/写真', |
|
|
|
desc: '上传自拍生成职业照、艺术写真、古风', |
|
|
|
@@ -103,7 +97,7 @@ const defaultApps = [ |
|
|
|
type: 'portrait-photo' |
|
|
|
}, |
|
|
|
{ |
|
|
|
icon: '/static/toolbox/tool_id_photo.png', |
|
|
|
icon: `${AI_CDN_BASE}/toolbox/tool_id_photo.png`, |
|
|
|
name: '老照片上色', |
|
|
|
title: '老照片上色', |
|
|
|
desc: '模糊破损老照片修复、黑白照片自然上色', |
|
|
|
|