diff --git a/docs/vap播放说明.md b/docs/vap播放说明.md index 228e0da..5f97ea6 100644 --- a/docs/vap播放说明.md +++ b/docs/vap播放说明.md @@ -119,7 +119,7 @@ const bgVapUrl = mp4Url('bg') 生成的线上地址形如: ```text -https://tkm-likei.oss-ap-southeast-1.aliyuncs.com/h5/Azizi/Activities/ActiveGame/bg.mp4 +https://cdn.azizichat.com/h5/Azizi/Activities/ActiveGame/bg.mp4 ``` 开发环境会走: @@ -199,7 +199,7 @@ await preloadVapConfig(resolveProtectedAssetUrl(bgVapUrl)) ```js const rewardVapUrl = - 'https://tkm-likei.oss-ap-southeast-1.aliyuncs.com/svgasource/manager-d824e59b-1a88-4d4f-aed3-01768ba20542.mp4' + 'https://cdn.azizichat.com/svgasource/manager-d824e59b-1a88-4d4f-aed3-01768ba20542.mp4' ``` ## 预加载建议 diff --git a/src/components/itemCenter.vue b/src/components/itemCenter.vue index 2d6b2af..39a8539 100644 --- a/src/components/itemCenter.vue +++ b/src/components/itemCenter.vue @@ -102,7 +102,7 @@ const shouldShowImage = computed(() => { // const isOSSImage = computed(() => { // return ( // props.imgUrl.startsWith('/oss/h5/Azizi/') || -// props.imgUrl.startsWith('https://tkm-likei.oss-ap-southeast-1.aliyuncs.com/h5/Azizi/') +// props.imgUrl.startsWith('https://cdn.azizichat.com/h5/Azizi/') // ) // }) diff --git a/src/config/imagePaths.js b/src/config/imagePaths.js index fd90dbf..fc8264f 100644 --- a/src/config/imagePaths.js +++ b/src/config/imagePaths.js @@ -1,9 +1,7 @@ import { protectAssetUrl } from '@/utils/protectedAssets.js' export const OSS_BASE_URL = - process.env.NODE_ENV === 'development' - ? '/oss/h5/Azizi/' - : 'https://tkm-likei.oss-ap-southeast-1.aliyuncs.com/h5/Azizi/' + process.env.NODE_ENV === 'development' ? '/oss/h5/Azizi/' : 'https://cdn.azizichat.com/h5/Azizi/' function buildAssetUrl(imagePath, filename, extension) { return `${OSS_BASE_URL}${imagePath}${filename}.${extension}` diff --git a/src/utils/image/imageCacheManager.js b/src/utils/image/imageCacheManager.js index 0fa9f2c..bc62045 100644 --- a/src/utils/image/imageCacheManager.js +++ b/src/utils/image/imageCacheManager.js @@ -61,7 +61,7 @@ class ImageCacheManager { let cacheName if ( - normalizedUrl.startsWith('https://tkm-likei.oss-ap-southeast-1.aliyuncs.com/h5/Azizi/') || + normalizedUrl.startsWith('https://cdn.azizichat.com/h5/Azizi/') || normalizedUrl.includes('/oss/h5/Azizi/') ) { cacheName = this.imageCacheName @@ -309,9 +309,7 @@ class ImageCacheManager { const containsAssets = normalizedUrl.includes('/assets/') const containsOssH5 = normalizedUrl.includes('/oss/h5/Azizi/') - const startsWithOss = normalizedUrl.startsWith( - 'https://tkm-likei.oss-ap-southeast-1.aliyuncs.com/h5/Azizi/', - ) + const startsWithOss = normalizedUrl.startsWith('https://cdn.azizichat.com/h5/Azizi/') // 只缓存三种类型的资源 return containsAssets || containsOssH5 || startsWithOss diff --git a/src/views/Activities/DailyRecharge/composables/useDailyRechargeRewardVap.js b/src/views/Activities/DailyRecharge/composables/useDailyRechargeRewardVap.js index 0d79ad1..8e3268c 100644 --- a/src/views/Activities/DailyRecharge/composables/useDailyRechargeRewardVap.js +++ b/src/views/Activities/DailyRecharge/composables/useDailyRechargeRewardVap.js @@ -9,7 +9,11 @@ const isEmptySourceValue = (value) => { return true } - return ['', 'null', 'undefined'].includes(String(value || '').trim().toLowerCase()) + return ['', 'null', 'undefined'].includes( + String(value || '') + .trim() + .toLowerCase(), + ) } const getRewardRawSourceUrl = (reward = {}) => { @@ -52,7 +56,9 @@ export function useDailyRechargeRewardVap(options = {}) { if (resolvedUrl.startsWith('//')) { const protocol = - typeof window !== 'undefined' && window.location?.protocol ? window.location.protocol : 'https:' + typeof window !== 'undefined' && window.location?.protocol + ? window.location.protocol + : 'https:' return `${protocol}${resolvedUrl}` } @@ -71,7 +77,7 @@ export function useDailyRechargeRewardVap(options = {}) { if (resolvedUrl.startsWith('/')) { return process.env.NODE_ENV === 'development' ? `/oss${resolvedUrl}` - : `https://tkm-likei.oss-ap-southeast-1.aliyuncs.com${resolvedUrl}` + : `https://cdn.azizichat.com${resolvedUrl}` } return `https://${resolvedUrl}` @@ -82,7 +88,10 @@ export function useDailyRechargeRewardVap(options = {}) { return false } - return /^https?:\/\/.+\.mp4(?:[?#].*)?$/i.test(sourceUrl) || /^\/oss\/.+\.mp4(?:[?#].*)?$/i.test(sourceUrl) + return ( + /^https?:\/\/.+\.mp4(?:[?#].*)?$/i.test(sourceUrl) || + /^\/oss\/.+\.mp4(?:[?#].*)?$/i.test(sourceUrl) + ) } const getRewardVapSourceUrl = (reward = {}) => { @@ -227,7 +236,10 @@ export function useDailyRechargeRewardVap(options = {}) { const retryDelay = Math.min(500 + retryCount * 500, 2000) const retryTimer = window.setTimeout(() => { rewardVapRetryTimers.delete(sourceUrl) - if (getCurrentMainRewardVapSourceUrl() !== sourceUrl || failedRewardVapUrls.value.has(sourceUrl)) { + if ( + getCurrentMainRewardVapSourceUrl() !== sourceUrl || + failedRewardVapUrls.value.has(sourceUrl) + ) { return } diff --git a/vite.config.js b/vite.config.js index b2506ac..98ae941 100644 --- a/vite.config.js +++ b/vite.config.js @@ -312,7 +312,7 @@ export default defineConfig(({ mode }) => { cors: true, proxy: { '/oss': { - target: 'https://tkm-likei.oss-ap-southeast-1.aliyuncs.com', + target: 'https://cdn.azizichat.com', changeOrigin: true, secure: true, rewrite: (path) => path.replace(/^\/oss/, ''),