Browse Source
- 在个人资料页新增头像上传及预览组件,支持本地图片文件选择与拖拽上传 - 实现头像上传过程中的类型、大小校验以及上传进度反馈 - 支持输入头像URL,增加图片链接格式有效性验证 - 优化联系表单,新增前端字段验证与错误提示,提升用户体验 - 联系表单提交成功后跳转新增的感谢反馈页面 - 规范联系表单后端接口请求,添加邮箱及内容的服务器端验证和日志记录 - 统一修正服务导入路径,移除未使用的服务统一导出文件 - 调整 vscode 配置,将 pug 关联语言由 pug 修改为 jade - 优化联系页面 UI 及样式,改进反馈类型选择和错误消息显示机制main
12 changed files with 628 additions and 69 deletions
Binary file not shown.
Binary file not shown.
@ -1,36 +0,0 @@ |
|||
// 服务层统一导出
|
|||
import UserService from "./UserService.js" |
|||
import ArticleService from "./ArticleService.js" |
|||
import BookmarkService from "./BookmarkService.js" |
|||
import SiteConfigService from "./SiteConfigService.js" |
|||
import JobService from "./JobService.js" |
|||
|
|||
// 导出所有服务类
|
|||
export { |
|||
UserService, |
|||
ArticleService, |
|||
BookmarkService, |
|||
SiteConfigService, |
|||
JobService |
|||
} |
|||
|
|||
// 导出默认实例(单例模式)
|
|||
export const userService = new UserService() |
|||
export const articleService = new ArticleService() |
|||
export const bookmarkService = new BookmarkService() |
|||
export const siteConfigService = new SiteConfigService() |
|||
export const jobService = new JobService() |
|||
|
|||
// 默认导出
|
|||
export default { |
|||
UserService, |
|||
ArticleService, |
|||
BookmarkService, |
|||
SiteConfigService, |
|||
JobService, |
|||
userService, |
|||
articleService, |
|||
bookmarkService, |
|||
siteConfigService, |
|||
jobService |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
extends /layouts/empty.pug |
|||
|
|||
block pageHead |
|||
|
|||
block pageContent |
|||
.contact-success.container(class="mt-[20px] bg-white rounded-[12px] shadow p-6 border border-gray-100") |
|||
.success-content(class="text-center py-8") |
|||
// 成功图标 |
|||
.success-icon(class="mb-6") |
|||
.icon-container(class="inline-flex items-center justify-center w-20 h-20 bg-green-100 rounded-full") |
|||
span(class="text-4xl text-green-600") ✓ |
|||
|
|||
// 成功标题 |
|||
h1(class="text-3xl font-bold mb-4 text-gray-800") 留言提交成功! |
|||
|
|||
// 成功消息 |
|||
.success-message(class="mb-8") |
|||
p(class="text-lg text-gray-600 mb-3") 感谢您的留言,我们已经收到了您的反馈。 |
|||
p(class="text-gray-500") 我们会在 <strong class="text-green-600">24小时内</strong> 通过邮箱回复您,请注意查收。 |
|||
|
|||
// 联系信息卡片 |
|||
.contact-cards(class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8") |
|||
.contact-card(class="text-center p-4 bg-blue-50 rounded-lg border border-blue-200") |
|||
.icon(class="text-2xl mb-2") 📧 |
|||
h3(class="font-semibold text-blue-800 mb-1") 邮箱回复 |
|||
p(class="text-sm text-gray-600") 24小时内回复 |
|||
.contact-card(class="text-center p-4 bg-green-50 rounded-lg border border-green-200") |
|||
.icon(class="text-2xl mb-2") 💬 |
|||
h3(class="font-semibold text-green-800 mb-1") 在线客服 |
|||
p(class="text-sm text-gray-600") 工作日 9:00-18:00 |
|||
.contact-card(class="text-center p-4 bg-purple-50 rounded-lg border border-purple-200") |
|||
.icon(class="text-2xl mb-2") 📱 |
|||
h3(class="font-semibold text-purple-800 mb-1") 社交媒体 |
|||
p(class="text-sm text-gray-600") 实时互动 |
|||
|
|||
// 操作按钮 |
|||
.actions(class="flex flex-col sm:flex-row justify-center gap-4") |
|||
a(href="/" class="inline-flex items-center justify-center px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors") |
|||
span(class="mr-2") 🏠 |
|||
| 返回首页 |
|||
a(href="/contact" class="inline-flex items-center justify-center px-6 py-3 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors") |
|||
span(class="mr-2") ✍️ |
|||
| 再次留言 |
|||
a(href="/about" class="inline-flex items-center justify-center px-6 py-3 bg-green-100 text-green-700 rounded-lg hover:bg-green-200 transition-colors") |
|||
span(class="mr-2") ℹ️ |
|||
| 了解我们 |
|||
|
|||
// 温馨提示 |
|||
.tips(class="mt-8 p-4 bg-yellow-50 rounded-lg border border-yellow-200") |
|||
h3(class="font-semibold text-yellow-800 mb-2 flex items-center") |
|||
span(class="mr-2") 💡 |
|||
| 温馨提示 |
|||
ul(class="text-sm text-yellow-700 space-y-1 text-left") |
|||
li • 请确保您提供的邮箱地址正确,以便我们及时回复 |
|||
li • 如有紧急问题,建议通过在线客服或电话联系我们 |
|||
li • 您也可以关注我们的社交媒体获取最新动态和回复 |
|||
li • 我们承诺保护您的隐私,不会泄露您的联系信息 |
|||
|
|||
// 页脚信息 |
|||
.contact-footer(class="text-center mt-8 pt-6 border-t border-gray-200") |
|||
p(class="text-gray-500 text-sm") 再次感谢您对我们的关注和支持! |
|||
p(class="text-gray-400 text-xs mt-2") 如有其他问题,欢迎随时与我们联系 |
|||
Loading…
Reference in new issue