|
@@ -1,11 +1,135 @@
|
|
|
-import { Component } from '@angular/core';
|
|
|
+import { Component, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
|
+import { CommonModule } from '@angular/common';
|
|
|
+import { Router, RouterLink, RouterModule, RouterState } from '@angular/router';
|
|
|
+import { register } from 'swiper/element/bundle';
|
|
|
+import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
|
+import { Routes } from '@angular/router';
|
|
|
+import {
|
|
|
+ faUser,
|
|
|
+ faArrowRight,
|
|
|
+ faRobot,
|
|
|
+ faVrCardboard,
|
|
|
+ faBook,
|
|
|
+ faChartLine,
|
|
|
+ faHome,
|
|
|
+ faSearch,
|
|
|
+ faComments
|
|
|
+} from '@fortawesome/free-solid-svg-icons';
|
|
|
+// 注册 Swiper 元素
|
|
|
|
|
|
+register();
|
|
|
@Component({
|
|
|
selector: 'app-page-home',
|
|
|
- imports: [],
|
|
|
+ standalone: true,
|
|
|
+ imports: [CommonModule, RouterModule, FontAwesomeModule,FaIconComponent,RouterModule],
|
|
|
templateUrl: './page-home.html',
|
|
|
- styleUrl: './page-home.scss'
|
|
|
+ styleUrls: ['./page-home.scss'],
|
|
|
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
|
})
|
|
|
+
|
|
|
export class PageHome {
|
|
|
+ // Font Awesome icons
|
|
|
+ icons = {
|
|
|
+ user: faUser,
|
|
|
+ arrowRight: faArrowRight,
|
|
|
+ robot: faRobot,
|
|
|
+ vrCardboard: faVrCardboard,
|
|
|
+ book: faBook,
|
|
|
+ chartLine: faChartLine,
|
|
|
+ home: faHome,
|
|
|
+ search: faSearch,
|
|
|
+ comments: faComments,
|
|
|
+ };
|
|
|
+
|
|
|
+ // 用户信息
|
|
|
+ user = {
|
|
|
+ name: '李华',
|
|
|
+ pendingInterviews: 3
|
|
|
+ };
|
|
|
+
|
|
|
+ // 岗位数据
|
|
|
+ jobs = [
|
|
|
+ {
|
|
|
+ title: '前端开发工程师',
|
|
|
+ salary: '25-40K·15薪',
|
|
|
+ companyLogo: 'TX',
|
|
|
+ companyName: '腾讯科技 · 深圳',
|
|
|
+ tags: ['Vue.js', 'React', 'TypeScript'],
|
|
|
+ match: 87
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Java高级工程师',
|
|
|
+ salary: '30-50K·16薪',
|
|
|
+ companyLogo: 'AL',
|
|
|
+ companyName: '阿里巴巴 · 杭州',
|
|
|
+ tags: ['Spring Cloud', '分布式', 'MySQL'],
|
|
|
+ match: 76
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '产品经理',
|
|
|
+ salary: '20-35K·14薪',
|
|
|
+ companyLogo: 'BD',
|
|
|
+ companyName: '百度 · 北京',
|
|
|
+ tags: ['Axure', '用户研究', 'PRD'],
|
|
|
+ match: 92
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 快速入口
|
|
|
+ quickActions = [
|
|
|
+ {
|
|
|
+ icon: this.icons.robot,
|
|
|
+ title: 'AI模拟面试',
|
|
|
+ description: '智能评估您的表现',
|
|
|
+ gradient: 'linear-gradient(135deg, var(--primary-blue), #3A7BD5)',
|
|
|
+ RouterLink:'/interview/mobile/page-interview'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: this.icons.vrCardboard,
|
|
|
+ title: 'VR企业展厅',
|
|
|
+ description: '沉浸式了解企业',
|
|
|
+ gradient: 'linear-gradient(135deg, #9F7AEA, #6B46C1)',
|
|
|
+ RouterLink:'/interview/mobile/page-job-hunting'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: this.icons.book,
|
|
|
+ title: '面试题库',
|
|
|
+ description: '海量真题练习',
|
|
|
+ gradient: 'linear-gradient(135deg, #F6AD55, #DD6B20)',
|
|
|
+ RouterLink:'/interview/mobile/page-mine'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: this.icons.chartLine,
|
|
|
+ title: '成长报告',
|
|
|
+ description: '查看历史表现',
|
|
|
+ gradient: 'linear-gradient(135deg, #48BB78, #38A169)',
|
|
|
+ RouterLink:'/interview/mobile/page-mine'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ // Swiper配置
|
|
|
+ swiperConfig = {
|
|
|
+ slidesPerView: 1.1,
|
|
|
+ spaceBetween: 15,
|
|
|
+ grabCursor: true,
|
|
|
+ breakpoints: {
|
|
|
+ 600: {
|
|
|
+ slidesPerView: 2.1,
|
|
|
+ spaceBetween: 20
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ // 处理卡片点击
|
|
|
+ handleCardClick() {
|
|
|
+ alert('即将跳转到对应功能页面');
|
|
|
+ }
|
|
|
|
|
|
+ // 获取问候语
|
|
|
+ get greeting() {
|
|
|
+ const hour = new Date().getHours();
|
|
|
+ if (hour < 12) return '上午好';
|
|
|
+ if (hour < 18) return '下午好';
|
|
|
+ return '晚上好';
|
|
|
+ }
|
|
|
}
|