diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d694c2e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:1.27.0 +COPY dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +RUN echo 'Asia/Shanghai' > /etc/timezone diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..49025f2 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,8 @@ +server { + listen 80; + server_name _; + + # 设置根目录 + root /usr/share/nginx/html; + index index.html; +} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 65669ba..db3d8af 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,9 @@ diff --git a/src/store/profile.ts b/src/store/profile.ts index c847d00..d9dc41f 100644 --- a/src/store/profile.ts +++ b/src/store/profile.ts @@ -62,7 +62,7 @@ export const useProfileStore = defineStore('profile', { education: [ { period: '2015年9月 - 2017年6月', - degree: '自动化专业 专科(偏软件方向)', + degree: '自动化专业', school: '南京工业大学', description: '主修自动化专业,侧重软件与控制系统开发方向,系统学习数据结构、算法、计算机基础等核心课程,参与多个课程设计与项目实践。', detailsTitle: '主要课程', diff --git a/src/utils/index.ts b/src/utils/index.ts index 9b450b3..1454a81 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -20,3 +20,14 @@ export const getObserver = () => { }) }, { threshold: 0.1 }) } + +// 滚动到指定区域 +export const scrollToSection = (sectionId: string) => { + const element = document.getElementById(sectionId) + if (element) { + window.scrollTo({ + top: element.offsetTop - 80, + behavior: 'smooth' + }) + } +}