hookehuyr

feat: 更新视频资源路径并优化路由配置

- 将本地视频资源替换为CDN链接
- 调整路由配置,将Splash设为默认页面
- 移除未使用的Vant组件声明
- 添加构建和部署相关的npm脚本
- 将Splash页背景图片替换为视频并优化样式
......@@ -9,7 +9,14 @@
"build": "vite build",
"build-watch": "vite build --watch",
"serve": "vite preview",
"lint": "eslint . --ext vue,js,jsx,cjs,mjs --fix --ignore-path .gitignore"
"lint": "eslint . --ext vue,js,jsx,cjs,mjs --fix --ignore-path .gitignore",
"tar": "tar -czvpf dist.tar.gz stdj",
"build_tar": "npm run build && npm run tar",
"scp-xys": "scp -P 12101 dist.tar.gz zhsy@oa.jcedu.org:/home/www/f",
"dec-xys": "ssh -p 12101 zhsy@oa.jcedu.org 'cd /home/www/f && tar -xzvf dist.tar.gz && rm -rf dist.tar.gz'",
"remove_tar": "rm -rf dist.tar.gz",
"remove_dist": "rm -rf stdj",
"xys_upload": "npm run build_tar && npm run scp-xys && npm run dec-xys && npm run remove_tar && npm run remove_dist"
},
"dependencies": {
"@vant/area-data": "^1.3.1",
......@@ -29,6 +36,7 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.3",
"autoprefixer": "^10.4.17",
"less": "^4.4.2",
"postcss": "^8.4.35",
"postcss-px-to-viewport": "^1.1.1",
"tailwindcss": "^3.4.1",
......
This diff is collapsed. Click to expand it.
......@@ -12,11 +12,9 @@ declare module 'vue' {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
VanButton: typeof import('vant/es')['Button']
VanCell: typeof import('vant/es')['Cell']
VanIcon: typeof import('vant/es')['Icon']
VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading']
VanOverlay: typeof import('vant/es')['Overlay']
VideoPlayer: typeof import('./components/VideoPlayer.vue')['default']
}
}
......
/*
* @Date: 2025-10-30 10:29:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-11-01 21:12:36
* @LastEditTime: 2025-11-04 10:53:52
* @FilePath: /stdj_h5/src/router/index.js
* @Description: 文件描述
*/
import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
const routes = [
{
path: '/splash',
path: '/',
name: 'Splash',
component: () => import('../views/Splash.vue')
},
{
path: '/',
path: '/home',
name: 'Home',
component: Home
component: () => import('../views/Home.vue')
},
{
path: '/masters',
......
......@@ -169,7 +169,7 @@ const router = useRouter()
useTitle('西园戒幢律寺三坛大戒法会');
// 视频配置
const videoUrl = ref('/src/assets/images/02 西园戒幢律寺三坛大戒法会/sample-10s.mp4')
const videoUrl = ref('https://cdn.ipadbiz.cn/stdj/video/sample-10s.mp4')
const videoOptions = ref({
fluid: true,
......
<template>
<div class="splash-container" :class="{ 'fade-out': isExiting }">
<!-- 背景图片 -->
<div class="background-image"></div>
<!-- 背景视频 -->
<video
class="background-video"
autoplay
muted
loop
playsinline
webkit-playsinline
preload="auto"
>
<source src="https://cdn.ipadbiz.cn/stdj/video/sample-10s.mp4" type="video/mp4" />
</video>
<!-- 黑色半透明蒙板 -->
<div class="overlay"></div>
......@@ -44,7 +54,7 @@ const enterApp = () => {
isExiting.value = true
// 等待淡出动画完成后跳转
setTimeout(() => {
router.push('/')
router.push('/home')
}, 500)
}
......@@ -53,7 +63,7 @@ onMounted(() => {
})
</script>
<style scoped>
<style scoped lang="less">
.splash-container {
position: fixed;
top: 0;
......@@ -71,17 +81,14 @@ onMounted(() => {
opacity: 0;
}
/* 背景图片 */
.background-image {
/* 背景视频 */
.background-video {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url('https://cdn.ipadbiz.cn/stdj/images/%E5%90%AF%E5%8A%A8%E9%A1%B5%E6%B5%B7%E6%8A%A5%E8%83%8C%E6%99%AF@2x.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
width: 100vw;
height: 100vh;
object-fit: cover;
z-index: 1;
opacity: 0;
animation: backgroundFadeIn 0.8s ease-out forwards;
......