增加多种效果

This commit is contained in:
2025-12-12 11:34:31 +08:00
parent 590046d601
commit 926e7b3386
7 changed files with 17 additions and 6 deletions

View File

@@ -72,7 +72,8 @@ const thumbnails = ref({}) // 存储压缩后的 Blob URL
let observer = null
let imageObserver = null
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
// --- 核心优化:浏览器端 Canvas 压缩 ---
// 目的:虽然网络流量没变(还是下载了原图),但渲染到 DOM 上的是 resizing 后的 canvas blob

View File

@@ -194,7 +194,8 @@ const getCurrentAnimationClass = (index) => {
return 'anim-ken-burns-4'
}
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
const formatNumber = (num) => num < 10 ? `0${num}` : num
const formatDate = (dateStr) => {
if(!dateStr) return ''

View File

@@ -78,7 +78,8 @@ let animationId
let photoMeshes = []
let particleSystem
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
// --- 核心优化:图片压缩与纹理生成 (带 CORS 代理回退) ---
const createCompressedTexture = (originalUrl) => {

View File

@@ -69,7 +69,8 @@ const emit = defineEmits(['loadMore'])
const loadTrigger = ref(null)
let observer = null
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
const formatDate = (dateStr) => {
if (!dateStr) return 'Unknown Date'

View File

@@ -144,7 +144,8 @@ const showToolbar = ref(true)
const showSettings = ref(false)
let toolbarTimer = null
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
const onSlideChange = (swiper) => {
currentIndex.value = swiper.activeIndex

View File

@@ -242,7 +242,8 @@ const loading = ref(true)
const viewMode = ref('grid') // 'grid' | 'list' | 'timeline' | 'stack' | 'coverflow'
const swiperModules = [EffectCoverflow, EffectCards, Pagination]
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
const getList = async () => {
loading.value = true

View File

@@ -23,6 +23,11 @@ export default defineConfig({
target: 'http://i.nailaoyun.cn/api/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},
'/t-oss': {
target: 'http://i.nailaoyun.cn/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/t-oss/, '')
}
}
}