diff --git a/.env.development b/.env.development index 524dc5b..f8a6cbe 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,5 @@ # 开发环境 — 请求走 vite proxy VITE_API_BASE_URL=/api + +# 见识星球接口 — 开发环境走 vite proxy 中转解决跨域 +VITE_JIANSHI_BASE_URL=/jianshi-api diff --git a/.env.production b/.env.production index 0d362ab..19e8491 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,5 @@ # 生产环境 — 同域路径代理,不需要完整域名 VITE_API_BASE_URL=/api + +# 见识星球接口 — 生产环境直接请求真实域名 +VITE_JIANSHI_BASE_URL=https://www.jianshixingqiu.com/proxy-api diff --git a/.kiro/steering/project-guidelines.md b/.kiro/steering/project-guidelines.md index 7d33cdd..2332baf 100644 --- a/.kiro/steering/project-guidelines.md +++ b/.kiro/steering/project-guidelines.md @@ -17,7 +17,7 @@ inclusion: always - 颜色用尽量用variables.scss里的统一颜色变量,特别是背景,按钮,文字的颜色 - 除了Home.vue首页外,其他页面我上传了截图要写页面或组件的,需要参考图片里文字和布局结构,在保证美观前提上自由发挥(如果我粘贴了图片内容里的完整样式过来,那就要参考我给的样式结合图片里的结构和样式代码保证还原度) -- 全局用1rem=100px的格式并注意对某些特殊元素组件的line-height行高影响,纵布局如非必要不用flex-direction: column布局 +- 全局用1rem=100px的格式并注意对某些特殊元素组件的line-height行高影响,纵布局能用div自动排列加上下margin的就用div排列,不要用display:flex加flex-direction: column布局,除非是像这个盒子里有个子元素需要固定在底部这样需要明确高度的情况就用flex-direction: column,否则没有高度要求内部子元素只需要正常从上到下排列纵布局只用div - 如果是建一个组件,这个组件看我说是用在views里哪个页面的,比如用在Profile.vue里的组件,组件名字最前面要加Profile,而且整个组件的命名不能过度简化,要容易看懂组件的用途;如果检测到某种名字开头的组件数量比如Profile开头的超过15个,就在components里新建个类似profile这样的页面名字的文件夹,把这类命名的组件都移到文件夹里并查找更新组件所有被引用地方的文件地址 ## 注意事项 diff --git a/src/api/jobs.ts b/src/api/jobs.ts index 808ca31..f5cb894 100644 --- a/src/api/jobs.ts +++ b/src/api/jobs.ts @@ -29,6 +29,8 @@ export interface JobListItem { companyShortName: string /** 公司类型(如"上市企业") */ companyType: string + /** 公司标签列表(如 ["新能源汽车", "乘用车制造", "10000人以上"]) */ + companyTags: string[] /** 地区名称 */ regionName: string /** 岗位分类名称 */ @@ -45,6 +47,8 @@ export interface JobListItem { matchScore: number /** 匹配度详情 */ matchDetail: MatchDetail + /** 招聘分类:0=社招 1=校招 2=实习 */ + recruitCategory?: number } // ==================== 分页结构 ==================== diff --git a/src/api/mentor.ts b/src/api/mentor.ts new file mode 100644 index 0000000..ad5c706 --- /dev/null +++ b/src/api/mentor.ts @@ -0,0 +1,204 @@ +import jianshiRequest from '@/utils/jianshiRequest' + +/** + * 分页查询导师列表请求参数 + */ +export interface MentorListParams { + /** 页码,>= 1 */ + page: number + /** 每页条数,1~100 */ + pageSize: number + /** 搜索关键词,可选 */ + keyword?: string + /** 行业ids,可选 */ + industryIds?: number[] + /** 导师ids,可选 */ + mentorIds?: number[] + /** 身份类型:0企业在职 1生涯规划师 2心理咨询师 3教职工 4在校学生,可选 */ + identityType?: number | null + /** 标签ids,可选 */ + labelIds?: number[] + /** 约聊方式:0语音电话 1线下约见,可选 */ + chatType?: number + /** 价格最大值,可选 */ + maxChatPrice?: number + /** 价格最小值,可选 */ + minChatPrice?: number + /** 公司名,可选 */ + agencyName?: string + /** 机构类型,可选 */ + type?: string | null + /** 排序:0默认 1金牌导师优先 2好评优先 3价格升序 4价格降序 */ + sort: number +} + +/** + * 导师列表项数据 + */ +export interface MentorItem { + /** 导师id(字符串,避免大数精度丢失) */ + id: string + /** 用户id */ + userId: number + /** 平台名 */ + platformName: string + /** 头像 */ + picture: string + /** 话题标题字符串 */ + titleStr: string + /** 话题列表 */ + titles: string[] + /** 标签字符串 */ + labelStr: string + /** 标签列表 */ + labels: string[] + /** 最低价格 */ + price: number + /** 机构名 */ + agencyName: string + /** 岗位 */ + position: string + /** 机构logo */ + agencyLogo: string + /** 排序 */ + sort: number + /** 认证类型 */ + type: string + /** 身份类型 */ + identityType: number +} + +/** + * 分页查询导师列表响应 + */ +export interface MentorPageResult { + records: MentorItem[] + total: number + size: number + current: number + pages: number +} + +/** + * 分页查询导师列表 + * POST /public/website/pageSelectMentor + */ +export function fetchMentorList(params: MentorListParams): Promise { + return jianshiRequest.post('/public/website/pageSelectMentor', params) +} + +// ==================== 导师详情接口 ==================== + +/** + * 导师详情 — 在职人士认证信息 + */ +export interface MentorWorking { + companyName: string + type: number + companyLogo: string + industryId: number + position: string + currentPositionTerm: number + term: number + images: string[] + link: string +} + +/** + * 导师详情 — 认证信息 + */ +export interface MentorVerification { + career?: { agencyName: string; position: string; type: number; term: number; agencyLogo: string; images: string[] } + psychology?: { agencyName: string; position: string; type: number; agencyLogo: string; term: number; images: string[] } + staff?: { schoolName: string; type: number; schoolLogo: string; position: string; term: number; images: string[] } + student?: { schoolName: string; type: number; schoolLogo: string; major: string; startTime: string; endTime: string; degree: number; images: string[] } + working?: MentorWorking +} + +/** + * 导师详情 — 基本信息 + */ +export interface MentorInfo { + platformName: string + realName: string + nickName: string + picture: string + identityType: number + country?: string + province?: string + everCompany?: string + city?: string + phone: string + mail?: string + introduce?: string + introduceImages?: string[] + wechat?: string + cooperationCount?: number + starLevel?: number + remark?: string + sort?: number + status: number +} + +/** + * 导师详情 — 支持服务项 + */ +export interface MentorSupport { + type: number + introduce?: string +} + +/** + * 导师详情 — 标签关系 + */ +export interface MentorLabelRelation { + labelId: number + alias?: string +} + +/** + * 导师详情完整数据 + */ +export interface MentorFullInfo { + id: number + mentorInfo: MentorInfo + verification?: MentorVerification + supports?: MentorSupport[] + labelRelations?: MentorLabelRelation[] +} + +/** + * 导师话题项 + */ +export interface MentorTalk { + id: number + teacherUserId: number + title: string + content: string + chatType: string + seePrice: number + seeSalePrice: number + chatPrice: number + chatSalePrice: number + tags: string + status: string + talkTimes: number + jobBusinessType: string + caseImages?: string[] +} + +/** + * 获取导师详情信息 + * GET /public/website/selectMentorFullInfo?mentorId=xxx + */ +export function fetchMentorFullInfo(mentorId: string): Promise { + return jianshiRequest.get('/public/website/selectMentorFullInfo', { params: { mentorId } }) +} + +/** + * 获取导师话题列表 + * GET /public/website/selectTalk?teacherId=xxx + */ +export function fetchMentorTalks(teacherId: string): Promise { + return jianshiRequest.get('/public/website/selectTalk', { params: { teacherId } }) +} diff --git a/src/assets/styles/auto.scss b/src/assets/styles/auto.scss index ddf9098..33ae898 100644 --- a/src/assets/styles/auto.scss +++ b/src/assets/styles/auto.scss @@ -391,6 +391,12 @@ body:not(#_) { .flex-warp{ flex-wrap: wrap; } +.flex1{ + flex: 1; +} +.flex2{ + flex: 2; +} //字体粗细 .fw600{ diff --git a/src/assets/styles/components/side-nav.scss b/src/assets/styles/components/side-nav.scss index 4e8b061..c9665d8 100644 --- a/src/assets/styles/components/side-nav.scss +++ b/src/assets/styles/components/side-nav.scss @@ -55,7 +55,7 @@ &__item { display: flex; align-items: center; - gap: 0.08rem; + gap: 0.04rem; padding: 0.1rem 0.12rem; border-radius: 0.08rem; color: #9598ab; @@ -65,13 +65,17 @@ font-size: 0.14rem; &:hover { - background: $btn-dark; - color: #fff; + background: #EDF9FA; + color: $accent; + + svg{ + color: $btn-dark; + } } &--active { - background: $btn-dark; - color: #fff; + background: #EDF9FA; + color: $accent; } } @@ -79,6 +83,8 @@ width: 0.2rem; height: 0.2rem; object-fit: contain; + font-size: 0.16rem; + } &__item-label { diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index d9d46de..3645cd6 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -9,6 +9,8 @@ @use './pages/job-detail.scss'; @use './pages/profile.scss'; @use './pages/login.scss'; +@use './pages/mentor.scss'; +@use './pages/mentor-detail.scss'; // 组件样式 @use './components/hello-world.scss'; diff --git a/src/assets/styles/pages/jobs.scss b/src/assets/styles/pages/jobs.scss index bf3718b..f33c483 100644 --- a/src/assets/styles/pages/jobs.scss +++ b/src/assets/styles/pages/jobs.scss @@ -12,9 +12,9 @@ box-sizing: border-box; overflow: hidden; background: $bg-main; + font-size: 0.14rem; display: flex; flex-direction: column; - font-size: 0.14rem; } // 页面标题 @@ -203,26 +203,33 @@ // 职位列表 &__list { - display: flex; - flex-direction: column; - gap: 0.12rem; + gap: 0; flex: 1; overflow-y: auto; padding-bottom: 0.2rem; + + // 列表中每张卡片间距用 margin-bottom 替代 gap + & > .jobs-page__job-card { + margin-bottom: 0.12rem; + + &:last-child { + margin-bottom: 0; + } + } } &__job-card { background: $bg-white; border-radius: 0.12rem; - padding: 0.16rem 0.14rem; + padding: 0.2rem 0.24rem; transition: all 0.25s ease; border: 0.02rem solid transparent; cursor: pointer; + position: relative; &:hover { box-shadow: 0 0.04rem 0.16rem rgba(0, 0, 0, 0.06); background: #fbfbfb; - //transform: translateY(-0.01rem); } &--selected { @@ -238,65 +245,48 @@ gap: 0.2rem; } - &__job-left { + // ========== 左栏:职位信息 ========== + &__col-left { flex: 1; min-width: 0; - } - - &__job-icon { - width: 0.54rem; - height: 0.54rem; - border-radius: 0.1rem; - background: $theme-color; display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - border: 1px solid #E8E8E8; - } - - &__company-svg { - width: 0.24rem; - height: 0.24rem; - color: $accent; - } - - &__job-info { - flex: 1; - min-width: 0; + flex-direction: column; // 纵排,配合 meta-bottom 的 margin-top: auto 把它推到底部 } &__job-title-row { display: flex; align-items: center; - justify-content: space-between; + gap: 0.08rem; } &__job-name { - font-size: 0.15rem; - font-weight: 600; - color: $text-dark; - line-height: 1.4; + font-size: 0.18rem; + font-weight: 520; + color: #000000; + line-height: 0.24rem; } - &__job-more { - color: $text-light; - cursor: pointer; + // 收藏红心 + &__favorite-btn { background: none; border: none; - padding: 0.04rem; - border-radius: 0.04rem; - transition: all 0.2s; + cursor: pointer; + padding: 0.02rem; display: flex; align-items: center; + color: #8C8C8C; + transition: color 0.2s; &:hover { - color: $text-dark; - background: $bg-main; + color: $danger; + } + + &--liked { + color: $danger; } } - &__more-svg { + &__favorite-svg { width: 0.16rem; height: 0.16rem; } @@ -323,168 +313,218 @@ height: 0.14rem; } - &__job-meta { - font-size: 0.14rem; - color: $text-middle; - margin-top: 0.04rem; - line-height: 1.4; - } - - &__job-dot { - margin: 0 0.04rem; - color: #D9D9D9; - } - - &__job-tip { - font-size: 0.11rem; - color: $accent-hover; - background: $theme-color; - border-radius: 0.04rem; - padding: 0.05rem 0.1rem; - margin-top: 0.1rem; - display: inline-flex; - align-items: center; - gap: 0.04rem; - border: 1px solid rgba(79, 194, 201, 0.2); - } - - &__tip-svg { - width: 0.12rem; - height: 0.12rem; - flex-shrink: 0; - } - + // 职位标签 &__job-tags { display: flex; gap: 0.08rem; - margin-top: 0.1rem; flex-wrap: wrap; + margin-top: 0.08rem; } &__job-tag { - font-size: 0.11rem; - color: #888; - background: $bg-main; - border-radius: 0.04rem; - padding: 0.03rem 0.1rem; - transition: all 0.2s; - - &:hover { - color: $accent-hover; - background: $theme-color; - } - } - - // 底部操作栏 - &__job-actions { - display: flex; - align-items: center; - justify-content: space-between; - margin-top: 0.14rem; - position: relative; - } - - &__job-action-left { - display: flex; - align-items: center; - gap: 0.08rem; - } - - &__action-icon-btn { - width: 0.28rem; - height: 0.28rem; - border-radius: 50%; - border: none; - background: $bg-main; - color: $text-light; - cursor: pointer; display: flex; align-items: center; justify-content: center; - transition: all 0.2s; - - &:hover { - background: $theme-color; - color: $accent; - } - - &--liked { - background: #FFF0ED; - color: $danger; - - &:hover { - background: #FFE4DE; - } - } + padding: 0.04rem 0.06rem; + background: #F4F4F4; + border-radius: 0.04rem; + font-size: 0.12rem; + font-weight: 330; + color: #929292; + line-height: 0.16rem; } - &__action-svg { - width: 0.14rem; - height: 0.14rem; + // 底部:地区 + 学历 + 招聘分类,margin-top: auto 把它推到左栏底部 + &__job-meta-bottom { + display: flex; + align-items: center; + gap: 0.12rem; + margin-top: auto; + padding-top: 0.08rem; + flex-wrap: wrap; + } + + &__meta-location { + display: flex; + align-items: center; + gap: 0.02rem; + font-size: 0.14rem; + font-weight: 330; + color: #8C8C8C; + line-height: 0.19rem; + } + + &__location-icon { + width: 0.18rem; + height: 0.18rem; + color: #8C8C8C; + flex-shrink: 0; + } + + &__meta-edu { + font-size: 0.14rem; + font-weight: 330; + color: #8C8C8C; + line-height: 0.19rem; + } + + &__meta-recruit { + display: flex; + align-items: center; + justify-content: center; + padding: 0.02rem 0.06rem; + background: #EDF9FA; + border-radius: 0.04rem; + font-size: 0.12rem; + font-weight: 330; + color: $accent; + line-height: 0.16rem; + } + + // ========== 中栏:公司信息(居中) ========== + &__col-center { + flex: 1; // 参与 flex 空间分配,获得真实宽度约束 + min-width: 0; // 防止内容撑破 flex 容器 + } + + // 公司信息容器,需要 min-width 才能让内部标签换行 + &__company-info { + min-width: 0; + } + + &__company-row { + display: flex; + align-items: center; + gap: 0.06rem; + margin-bottom: 0.06rem; + flex-wrap: wrap; + } + + &__company-logo { + width: 0.24rem; + height: 0.24rem; + border-radius: 0.04rem; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + font-size: 0.24rem; + color: #8C8C8C; + overflow: hidden; + } + + &__company-name { + font-size: 0.18rem; + font-weight: 330; + color: #000000; + line-height: 0.24rem; + } + + &__company-tags { + display: flex; + align-items: center; + gap: 0.08rem; + flex-wrap: wrap; + min-width: 0; // 允许内容收缩触发换行 + margin-top: 0.06rem; + } + + &__company-tag { + display: flex; + align-items: center; + justify-content: center; + padding: 0.04rem 0.06rem; + background: #F4F4F4; + border-radius: 0.04rem; + font-size: 0.12rem; + font-weight: 330; + color: #929292; + line-height: 0.16rem; + } + + // ========== 右栏:操作按钮 ========== + &__col-right { + display: flex; + flex-direction: column; + text-align: right; } &__job-action-right { display: flex; align-items: center; - gap: 0.12rem; + flex-wrap: wrap; + gap: 0.1rem; } &__job-helper { - font-size: 0.12rem; - color: $text-light; - cursor: pointer; - transition: color 0.2s; display: flex; align-items: center; - gap: 0.04rem; - background: $bg-main; - border: 1px solid #E8E8E8; - padding: 0.04rem 0.08rem; - border-radius: 0.14rem; + justify-content: center; + padding: 0.08rem 0.16rem; + border: 1.23px solid $accent; + border-radius: 0.08rem; + background: none; + font-size: 0.14rem; + font-weight: 450; + color: $accent; + cursor: pointer; + transition: all 0.2s; + line-height: 0.19rem; + white-space: nowrap; &:hover { - color: $accent; background: $theme-color; } } - &__helper-svg { - width: 0.14rem; - height: 0.14rem; - } - &__job-apply-btn { - background: $btn-dark; - border: 0.02rem solid $btn-dark; - border-radius: 0.2rem; - padding: 0.04rem 0.2rem; - color: $bg-white; - font-size: 0.12rem; + display: flex; + align-items: center; + justify-content: center; + padding: 0.08rem 0.16rem; + background: $accent; + border: none; + border-radius: 0.08rem; + font-size: 0.14rem; + font-weight: 450; + color: #FFFFFF; cursor: pointer; transition: all 0.2s; - font-weight: 500; + line-height: 0.19rem; + white-space: nowrap; &:hover { - background: $btn-dark-hover; + background: $accent-hover; } &--active { background: $accent; - border-color: $accent; - color: $bg-white; + color: #FFFFFF; + } + } - &:hover { - background: $accent-hover; - border-color: $accent-hover; - } + // 不再显示 + &__hide-btn { + display: block; + margin-top: auto; + font-size: 0.14rem; + font-weight: 330; + color: #8C8C8C; + cursor: pointer; + transition: color 0.2s; + line-height: 0.19rem; + white-space: nowrap; + + &:hover { + color: $text-dark; } } // 弹出菜单 &__job-popup { position: absolute; - right: 0.26rem; - top: -0.64rem; + right: 1.4rem; + top: 0.5rem; background: $bg-white; border: 1px solid #E8E8E8; border-radius: 0.1rem; @@ -507,38 +547,29 @@ } } - // 匹配度卡片 + // ========== 最右侧:匹配度 ========== &__job-match { - width: 1.1rem; + width: 1.01rem; text-align: center; flex-shrink: 0; - border-radius: 0.12rem; + border-radius: 0.08rem; padding: 0.14rem 0.1rem; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - gap: 0.02rem; transition: all 0.25s ease; &--high { - background: linear-gradient(135deg, $theme-color 0%, rgba(79, 194, 201, 0.15) 100%); - border: 1px solid rgba(79, 194, 201, 0.25); + background: #FBFDF7; } &--low { - background: $bg-main; - border: 1px solid #E8E8E8; + background: #FBFDF7; } } &__match-ring { position: relative; - width: 0.64rem; - height: 0.64rem; - display: flex; - align-items: center; - justify-content: center; + width: 0.62rem; + height: 0.62rem; + margin: 0 auto; } &__ring-svg { @@ -551,23 +582,39 @@ &__match-score { font-size: 0.18rem; - font-weight: 700; - color: $text-dark; - line-height: 1; - position: relative; + font-weight: 520; + line-height: 0.62rem; + position: absolute; + top: 0; + left: 0; + width: 100%; + text-align: center; z-index: 1; } - &__match-label { - font-size: 0.1rem; - color: $text-light; + &__match-level { + font-size: 0.13rem; + font-weight: 520; + line-height: 0.19rem; margin-top: 0.04rem; } - &__match-level { - font-size: 0.1rem; - color: $text-light; - margin-top: 0.01rem; + // 高匹配度颜色 + &__job-match--high &__match-score { + color: #9FD051; + } + + &__job-match--high &__match-level { + color: #9FD051; + } + + // 低匹配度颜色 + &__job-match--low &__match-score { + color: #9FD051; + } + + &__job-match--low &__match-level { + color: #9FD051; } // 未登录锁定态 @@ -580,7 +627,8 @@ width: 0.32rem; height: 0.32rem; color: $text-light; - margin-bottom: 0.06rem; + display: block; + margin: 0 auto 0.06rem; } &__match-lock-text { @@ -658,16 +706,6 @@ to { transform: rotate(360deg); } } - // 高匹配度特殊样式 - &__job-match--high &__match-score { - color: $accent-hover; - } - - &__job-match--high &__match-level { - color: $accent; - font-weight: 500; - } - // ==================== AI助手投递提醒弹窗 ==================== // 遮罩层 @@ -766,10 +804,16 @@ // 选项列表容器 &__options { - display: flex; - flex-direction: column; - gap: 0.1rem; margin-bottom: 0.16rem; + + // 选项间距用 margin-bottom + .dislike-dialog__option { + margin-bottom: 0.1rem; + + &:last-child { + margin-bottom: 0; + } + } } // 单个选项行 diff --git a/src/assets/styles/pages/mentor-detail.scss b/src/assets/styles/pages/mentor-detail.scss new file mode 100644 index 0000000..ad0e081 --- /dev/null +++ b/src/assets/styles/pages/mentor-detail.scss @@ -0,0 +1,247 @@ +@use '../variables' as *; + +// ==================== 导师详情页样式 ==================== + +.mentor-detail { + font-size: 0.14rem; + width: 100%; + height: var(--app-height, 100vh); + background: $bg-main; + overflow: hidden; + + // 主体区域 + &__body { + flex: 1; + height: 100%; + overflow: hidden; + margin-left: 2rem; + padding: 0.24rem 0.4rem 0; + display: flex; + flex-direction: column; + } + + // 页面标题 + &__page-title { + font-size: 0.18rem; + font-weight: 600; + color: $text-dark; + margin-bottom: 0.12rem; + flex-shrink: 0; + } + + // 返回按钮 + &__back { + display: flex; + align-items: center; + gap: 0.04rem; + font-size: 0.13rem; + color: $text-middle; + cursor: pointer; + margin-bottom: 0.16rem; + flex-shrink: 0; + + &:hover { + color: $accent; + } + } + + &__back-icon { + width: 0.14rem; + height: 0.14rem; + } + + // 滚动容器 + &__scroll { + flex: 1; + overflow-y: auto; + padding-bottom: 0.24rem; + + &::-webkit-scrollbar { + width: 4px; + } + &::-webkit-scrollbar-thumb { + background: $border-color; + border-radius: 2px; + } + } + + // 通用卡片 + &__card { + background: $bg-white; + border-radius: 0.08rem; + padding: 0.4rem 0.32rem; + margin-bottom: 0.16rem; + } + + // ==================== 导师信息卡片 ==================== + + &__info-card { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.2rem; + } + + &__info-left { + display: flex; + align-items: center; + gap: 0.16rem; + min-width: 0; + } + + // 头像 + &__avatar-wrap { + flex-shrink: 0; + } + + &__avatar { + width: 1.04rem; + height: 1.04rem; + border-radius: 50%; + object-fit: cover; + } + + &__avatar-placeholder { + width: 0.6rem; + height: 0.6rem; + border-radius: 50%; + background: $accent; + color: $bg-white; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.2rem; + font-weight: 600; + } + + // 导师文字信息 + &__info-text { + min-width: 0; + } + + &__name { + font-size: 0.24rem; + font-weight: 600; + color: $text-dark; + margin-bottom: 0.04rem; + } + + &__meta { + font-size: 0.18rem; + color: $text-middle; + margin-bottom: 0.04rem; + display: inline-block; + font-weight: 400; + margin-left: 0.1rem; + } + + &__location { + font-size: 0.14rem; + color: $text-middle; + margin-bottom: 0.08rem; + + >span{ + color: $text-dark; + } + } + + &__services { + font-size: 0.14rem; + color: $text-middle; + >span{ + color: $text-dark; + } + } + + // 立即咨询按钮 + &__consult-btn { + width: 0.92rem; + text-align: center; + height: 0.32rem; + line-height: 0.30rem; + background: #fff; + border: 0.01rem solid $accent; + color: $accent; + border-radius: 0.08rem; + font-size: 0.12rem; + text-decoration: none; + white-space: nowrap; + flex-shrink: 0; + transition: background 0.15s; + + &:hover { + background: $btn-dark; + color: #fff; + } + } + + // ==================== 区域标题 ==================== + + &__section-title { + font-size: 0.18rem; + font-weight: 600; + color: $accent; + margin-bottom: 0.14rem; + } + + // ==================== 话题列表 ==================== + + &__talk-item { + margin-bottom: 0.16rem; + + &:last-child { + margin-bottom: 0; + } + } + + &__talk-title { + font-size: 0.16rem; + font-weight: 600; + color: $text-dark; + margin-bottom: 0.06rem; + line-height: 1.5; + } + + &__talk-content { + font-size: 0.14rem; + color: $text-middle; + line-height: 1.7; + white-space: pre-wrap; + word-break: break-all; + } + + // ==================== 个人介绍 ==================== + + &__introduce { + font-size: 0.12rem; + color: $text-middle; + line-height: 1.7; + white-space: pre-wrap; + word-break: break-all; + } + + // ==================== 加载状态 ==================== + + &__loading { + display: flex; + align-items: center; + justify-content: center; + gap: 0.08rem; + padding: 0.3rem; + color: $text-middle; + font-size: 0.13rem; + } + + &__loading-spinner { + width: 0.18rem; + height: 0.18rem; + border: 2px solid $border-color; + border-top-color: $accent; + border-radius: 50%; + animation: mentorDetailSpin 0.7s linear infinite; + } + + @keyframes mentorDetailSpin { + to { transform: rotate(360deg); } + } +} diff --git a/src/assets/styles/pages/mentor.scss b/src/assets/styles/pages/mentor.scss new file mode 100644 index 0000000..ed48640 --- /dev/null +++ b/src/assets/styles/pages/mentor.scss @@ -0,0 +1,375 @@ +@use '../variables' as *; + +// ==================== Mentor 导师页面样式 ==================== + +.mentor-page { + font-size: 0.14rem; + width: 100%; + height: var(--app-height, 100vh); + background: $bg-main; + overflow: hidden; + + // 主体区域(SideNav 固定宽 2rem,主内容左移让出空间) + &__body { + flex: 1; + height: 100%; + overflow: hidden; + margin-left: 2rem; + } + + // 左侧主内容区 + &__main { + flex: 1; + display: flex; + flex-direction: column; + height: 100%; + overflow: hidden; + + min-width: 0; + } + + // 顶部标题 + 搜索框 + &__header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 0.16rem; + flex-shrink: 0; + background: #fff; + padding: 0.16rem 0.24rem; + } + + &__title-wrap { + display: flex; + align-items: center; + gap: 0.08rem; + } + + &__title-icon { + color: $accent; + font-size: 0.18rem; + } + + &__title { + font-size: 0.18rem; + font-weight: 600; + color: $text-dark; + line-height: 1.4; + } + + &__subtitle { + font-size: 0.12rem; + color: $text-middle; + margin-top: 0.02rem; + } + + // 搜索框 + &__search-wrap { + position: relative; + display: flex; + align-items: center; + width: 2.8rem; + background: $bg-white; + border: 1px solid $border-color; + border-radius: 0.2rem; + padding: 0 0.12rem; + height: 0.36rem; + + &:focus-within { + border-color: $accent; + } + } + + &__search-icon { + width: 0.16rem; + height: 0.16rem; + color: $text-light; + flex-shrink: 0; + cursor: pointer; + + &:hover { + color: $accent; + } + } + + &__search-input { + flex: 1; + border: none; + outline: none; + font-size: 0.13rem; + color: $text-dark; + background: transparent; + padding: 0 0.08rem; + line-height: 1; + + &::placeholder { + color: $text-light; + } + } + + &__search-clear { + font-size: 0.12rem; + color: $text-light; + cursor: pointer; + padding: 0.02rem 0.04rem; + border-radius: 50%; + flex-shrink: 0; + line-height: 1; + + &:hover { + color: $text-middle; + background: $bg-main; + } + } + + // 行业 Tab 筛选栏 + &__tabs { + display: flex; + align-items: center; + gap: 0.00rem; + flex-wrap: wrap; + margin: 0 0.24rem; + margin-bottom: 0.16rem; + flex-shrink: 0; + background: #fff; + padding: 0.06rem; + border-radius: 0.08rem; + + } + + &__tab { + height: 0.35rem; + text-align: center; + padding: 0 0.16rem; + line-height: 0.35rem; + border-radius: 0.08rem; + min-width: 0.8rem; + font-size: 0.13rem; + color: $text-middle; + cursor: pointer; + background: $bg-white; + box-sizing: border-box; + border: 1px solid transparent; + transition: all 0.15s; + white-space: nowrap; + + &:not(&--active):hover { + color: $accent; + border: 1px solid $accent; + } + + &--active { + background: $accent; + color: $bg-white; + border: 1px solid $accent; + + &:hover { + color: $bg-white; + + } + } + } + + // 导师列表滚动容器 + &__list { + flex: 1; + overflow-y: auto; + padding-bottom: 0.24rem; + margin: 0 0.17rem 0 0.24rem; + padding-right: 0.04rem; + &::-webkit-scrollbar { + width: 4px; + } + &::-webkit-scrollbar-thumb { + background: $border-color; + border-radius: 2px; + } + } + + // 导师卡片 + &__card { + display: flex; + align-items: center; + background: $bg-white; + border-radius: 0.12rem; + padding: 0.18rem 0.2rem; + margin-bottom: 0.12rem; + gap: 0.2rem; + transition: box-shadow 0.15s; + + &:hover { + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); + } + } + + // 卡片左侧 — 限制最大宽度让右侧话题纵向对齐 + &__card-left { + flex: 1 1 0; + max-width: 50%; + display: flex; + align-items: center; + gap: 0.14rem; + min-width: 0; + } + + // 头像 + &__avatar-wrap { + flex-shrink: 0; + width: 0.56rem; + } + + &__avatar { + width: 0.5rem; + height: 0.5rem; + border-radius: 50%; + object-fit: cover; + } + + &__avatar-placeholder { + width: 0.5rem; + height: 0.5rem; + border-radius: 50%; + background: $accent; + color: $bg-white; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.18rem; + font-weight: 600; + } + + // 导师信息文字区 + &__card-info { + flex: 1; + min-width: 0; + } + + &__card-name { + font-size: 0.15rem; + font-weight: 600; + color: $text-dark; + margin-bottom: 0.04rem; + } + + &__card-meta { + font-size: 0.12rem; + color: $text-middle; + margin-bottom: 0.08rem; + } + + &__card-sep { + margin: 0 0.04rem; + color: $border-color; + } + + &__card-labels { + display: flex; + flex-wrap: wrap; + gap: 0.06rem; + } + + &__card-label { + font-size: 0.11rem; + color: $accent; + background: rgba(18, 199, 190, 0.1); + border-radius: 0.1rem; + padding: 0.02rem 0.08rem; + } + + // 卡片右侧 — flex:1 让话题区自适应剩余空间,窄屏不会撑出滚动条 + &__card-right { + flex: 1 1 0; + display: flex; + align-items: center; + gap: 0.12rem; + min-width: 0; + } + + // 话题列表 — 占据右侧剩余空间,自动截断 + &__card-topics { + flex: 1; + min-width: 0; + } + + // 单条话题,跟随容器宽度自动截断,不设死宽度 + &__card-topic { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 0.12rem; + color: $text-middle; + line-height: 1.6; + } + + // 查看详情按钮 + &__detail-btn { + height: 0.32rem; + line-height: 0.32rem; + width: 0.92rem; + text-align: center; + background: $bg-white; + border: 0.01rem solid $btn-dark; + color: $btn-dark; + border-radius: 0.08rem; + font-size: 0.12rem; + text-decoration: none; + white-space: nowrap; + cursor: pointer; + transition: background 0.15s; + + &:hover { + background: $btn-dark; + color: $bg-white; + } + } + + // 加载中提示 + &__loading { + display: flex; + align-items: center; + justify-content: center; + gap: 0.08rem; + padding: 0.2rem; + color: $text-middle; + font-size: 0.13rem; + } + + &__loading-spinner { + width: 0.18rem; + height: 0.18rem; + border: 2px solid $border-color; + border-top-color: $accent; + border-radius: 50%; + animation: mentorSpin 0.7s linear infinite; + } + + @keyframes mentorSpin { + to { transform: rotate(360deg); } + } + + // 没有更多 + &__no-more { + text-align: center; + font-size: 0.12rem; + color: $text-light; + padding: 0.16rem; + } + + // 空列表 + &__empty { + text-align: center; + font-size: 0.13rem; + color: $text-light; + padding: 0.4rem; + } + + // 右侧广告区域(固定 4rem) + &__aside { + width: 3rem; + flex-shrink: 0; + height: 100%; + background: $bg-white; + border-left: 1px solid $border-color; + overflow-y: auto; + } +} diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index 18f4c04..33e8a25 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -18,13 +18,13 @@ $bg-middle: #E6E6E6; $bg-white: #FFFFFF; // 深色文字(标题、正文) -$text-dark: #000000; +$text-dark: #1A1A1A; // 浅色文字(副标题、占位符、辅助信息) $text-light: #BFBFBF; // 中间色文字(使用优先级高于浅色文字,稍微要深色一点的副标题、占位符、辅助信息) -$text-middle: #777777; +$text-middle: #6A7282; // 强调色 / 品牌色 //$accent: #4FC2C9; diff --git a/src/components/SideNav.vue b/src/components/SideNav.vue index 27db1fc..a6c68ad 100644 --- a/src/components/SideNav.vue +++ b/src/components/SideNav.vue @@ -17,16 +17,77 @@ :class="{ 'side-nav__item--active': isActive(item.name) }" @click="handleNav(item)" > - + + {{ item.label }} {{ item.badge }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +