@@ -423,13 +490,14 @@
知识库
Agent
- 新媒体应用
+ AI创作
获取秘钥
@@ -557,11 +625,18 @@ export default {
return {
constants: {},
activeSection: 'top',
- scrollLocked: false
+ scrollLocked: false,
+ videoModalOpen: false,
+ videoModalSrc: '',
+ videoModalKey: ''
};
},
mounted() {
this.initScrollSpy();
+ window.addEventListener('keydown', this.onModalKeydown);
+ },
+ beforeDestroy() {
+ window.removeEventListener('keydown', this.onModalKeydown);
},
methods: {
initScrollSpy() {
@@ -620,6 +695,45 @@ export default {
}
setTimeout(() => this.scrollTo('about'), 200);
},
+ openVideo(key) {
+ // 视频文件与封面映射集中放这里,以后加视频就在这加分支
+ const map = {
+ xuanchuan: {
+ src: '/img/xuanchuan.mp4'
+ }
+ };
+ const cfg = map[key];
+ if (!cfg) return;
+ this.videoModalKey = key;
+ this.videoModalSrc = cfg.src;
+ this.videoModalOpen = true;
+ // 锁住页面滚动,避免背景跟着滚
+ document.body.style.overflow = 'hidden';
+ // 等