hookehuyr

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

- 将本地视频资源替换为CDN链接
- 调整路由配置,将Splash设为默认页面
- 移除未使用的Vant组件声明
- 添加构建和部署相关的npm脚本
- 将Splash页背景图片替换为视频并优化样式
...@@ -9,7 +9,14 @@ ...@@ -9,7 +9,14 @@
9 "build": "vite build", 9 "build": "vite build",
10 "build-watch": "vite build --watch", 10 "build-watch": "vite build --watch",
11 "serve": "vite preview", 11 "serve": "vite preview",
12 - "lint": "eslint . --ext vue,js,jsx,cjs,mjs --fix --ignore-path .gitignore" 12 + "lint": "eslint . --ext vue,js,jsx,cjs,mjs --fix --ignore-path .gitignore",
13 + "tar": "tar -czvpf dist.tar.gz stdj",
14 + "build_tar": "npm run build && npm run tar",
15 + "scp-xys": "scp -P 12101 dist.tar.gz zhsy@oa.jcedu.org:/home/www/f",
16 + "dec-xys": "ssh -p 12101 zhsy@oa.jcedu.org 'cd /home/www/f && tar -xzvf dist.tar.gz && rm -rf dist.tar.gz'",
17 + "remove_tar": "rm -rf dist.tar.gz",
18 + "remove_dist": "rm -rf stdj",
19 + "xys_upload": "npm run build_tar && npm run scp-xys && npm run dec-xys && npm run remove_tar && npm run remove_dist"
13 }, 20 },
14 "dependencies": { 21 "dependencies": {
15 "@vant/area-data": "^1.3.1", 22 "@vant/area-data": "^1.3.1",
...@@ -29,6 +36,7 @@ ...@@ -29,6 +36,7 @@
29 "devDependencies": { 36 "devDependencies": {
30 "@vitejs/plugin-vue": "^5.0.3", 37 "@vitejs/plugin-vue": "^5.0.3",
31 "autoprefixer": "^10.4.17", 38 "autoprefixer": "^10.4.17",
39 + "less": "^4.4.2",
32 "postcss": "^8.4.35", 40 "postcss": "^8.4.35",
33 "postcss-px-to-viewport": "^1.1.1", 41 "postcss-px-to-viewport": "^1.1.1",
34 "tailwindcss": "^3.4.1", 42 "tailwindcss": "^3.4.1",
......
This diff is collapsed. Click to expand it.
...@@ -12,11 +12,9 @@ declare module 'vue' { ...@@ -12,11 +12,9 @@ declare module 'vue' {
12 RouterLink: typeof import('vue-router')['RouterLink'] 12 RouterLink: typeof import('vue-router')['RouterLink']
13 RouterView: typeof import('vue-router')['RouterView'] 13 RouterView: typeof import('vue-router')['RouterView']
14 VanButton: typeof import('vant/es')['Button'] 14 VanButton: typeof import('vant/es')['Button']
15 - VanCell: typeof import('vant/es')['Cell']
16 VanIcon: typeof import('vant/es')['Icon'] 15 VanIcon: typeof import('vant/es')['Icon']
17 VanList: typeof import('vant/es')['List'] 16 VanList: typeof import('vant/es')['List']
18 VanLoading: typeof import('vant/es')['Loading'] 17 VanLoading: typeof import('vant/es')['Loading']
19 - VanOverlay: typeof import('vant/es')['Overlay']
20 VideoPlayer: typeof import('./components/VideoPlayer.vue')['default'] 18 VideoPlayer: typeof import('./components/VideoPlayer.vue')['default']
21 } 19 }
22 } 20 }
......
1 /* 1 /*
2 * @Date: 2025-10-30 10:29:15 2 * @Date: 2025-10-30 10:29:15
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-11-01 21:12:36 4 + * @LastEditTime: 2025-11-04 10:53:52
5 * @FilePath: /stdj_h5/src/router/index.js 5 * @FilePath: /stdj_h5/src/router/index.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
8 import { createRouter, createWebHashHistory } from 'vue-router' 8 import { createRouter, createWebHashHistory } from 'vue-router'
9 -import Home from '../views/Home.vue'
10 9
11 const routes = [ 10 const routes = [
12 { 11 {
13 - path: '/splash', 12 + path: '/',
14 name: 'Splash', 13 name: 'Splash',
15 component: () => import('../views/Splash.vue') 14 component: () => import('../views/Splash.vue')
16 }, 15 },
17 { 16 {
18 - path: '/', 17 + path: '/home',
19 name: 'Home', 18 name: 'Home',
20 - component: Home 19 + component: () => import('../views/Home.vue')
21 }, 20 },
22 { 21 {
23 path: '/masters', 22 path: '/masters',
......
...@@ -169,7 +169,7 @@ const router = useRouter() ...@@ -169,7 +169,7 @@ const router = useRouter()
169 useTitle('西园戒幢律寺三坛大戒法会'); 169 useTitle('西园戒幢律寺三坛大戒法会');
170 170
171 // 视频配置 171 // 视频配置
172 -const videoUrl = ref('/src/assets/images/02 西园戒幢律寺三坛大戒法会/sample-10s.mp4') 172 +const videoUrl = ref('https://cdn.ipadbiz.cn/stdj/video/sample-10s.mp4')
173 173
174 const videoOptions = ref({ 174 const videoOptions = ref({
175 fluid: true, 175 fluid: true,
......
1 <template> 1 <template>
2 <div class="splash-container" :class="{ 'fade-out': isExiting }"> 2 <div class="splash-container" :class="{ 'fade-out': isExiting }">
3 - <!-- 背景图片 --> 3 + <!-- 背景视频 -->
4 - <div class="background-image"></div> 4 + <video
5 + class="background-video"
6 + autoplay
7 + muted
8 + loop
9 + playsinline
10 + webkit-playsinline
11 + preload="auto"
12 + >
13 + <source src="https://cdn.ipadbiz.cn/stdj/video/sample-10s.mp4" type="video/mp4" />
14 + </video>
5 15
6 <!-- 黑色半透明蒙板 --> 16 <!-- 黑色半透明蒙板 -->
7 <div class="overlay"></div> 17 <div class="overlay"></div>
...@@ -44,7 +54,7 @@ const enterApp = () => { ...@@ -44,7 +54,7 @@ const enterApp = () => {
44 isExiting.value = true 54 isExiting.value = true
45 // 等待淡出动画完成后跳转 55 // 等待淡出动画完成后跳转
46 setTimeout(() => { 56 setTimeout(() => {
47 - router.push('/') 57 + router.push('/home')
48 }, 500) 58 }, 500)
49 } 59 }
50 60
...@@ -53,7 +63,7 @@ onMounted(() => { ...@@ -53,7 +63,7 @@ onMounted(() => {
53 }) 63 })
54 </script> 64 </script>
55 65
56 -<style scoped> 66 +<style scoped lang="less">
57 .splash-container { 67 .splash-container {
58 position: fixed; 68 position: fixed;
59 top: 0; 69 top: 0;
...@@ -71,17 +81,14 @@ onMounted(() => { ...@@ -71,17 +81,14 @@ onMounted(() => {
71 opacity: 0; 81 opacity: 0;
72 } 82 }
73 83
74 -/* 背景图片 */ 84 +/* 背景视频 */
75 -.background-image { 85 +.background-video {
76 position: absolute; 86 position: absolute;
77 top: 0; 87 top: 0;
78 left: 0; 88 left: 0;
79 - right: 0; 89 + width: 100vw;
80 - bottom: 0; 90 + height: 100vh;
81 - 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'); 91 + object-fit: cover;
82 - background-size: cover;
83 - background-position: center;
84 - background-repeat: no-repeat;
85 z-index: 1; 92 z-index: 1;
86 opacity: 0; 93 opacity: 0;
87 animation: backgroundFadeIn 0.8s ease-out forwards; 94 animation: backgroundFadeIn 0.8s ease-out forwards;
......