|
|
@@ -0,0 +1,858 @@
|
|
|
+<template>
|
|
|
+ <view class="container">
|
|
|
+ <!-- 顶部总览卡 -->
|
|
|
+ <view class="overview-card">
|
|
|
+ <view class="overview-title">培训认证中心</view>
|
|
|
+ <view class="overview-desc">完成必修课时并通过考核后,可持证提供服务</view>
|
|
|
+ <view class="overview-badge" v-if="baseCertReady">
|
|
|
+ <text>✓ 已通过基础认证,可接单</text>
|
|
|
+ </view>
|
|
|
+ <view class="overview-badge pending" v-else>
|
|
|
+ <text>待完成基础类别认证</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 类别 Tab -->
|
|
|
+ <view class="tabs" v-if="certList.length > 0">
|
|
|
+ <view
|
|
|
+ class="tab"
|
|
|
+ v-for="c in certList"
|
|
|
+ :key="c.categoryCode"
|
|
|
+ :class="currentTab === c.categoryCode ? 'tab-active' : ''"
|
|
|
+ @click="switchTab(c.categoryCode)"
|
|
|
+ >
|
|
|
+ <text>{{ c.categoryName }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 当前类别认证状态 -->
|
|
|
+ <view class="cert-card" v-if="currentCert">
|
|
|
+ <view class="cert-head">
|
|
|
+ <view class="cert-name">
|
|
|
+ <text>{{ currentCert.categoryName }}</text>
|
|
|
+ <text class="base-tag" v-if="currentCert.isBase === 1">基础类别</text>
|
|
|
+ </view>
|
|
|
+ <text class="cert-status" :class="currentStatusCss">{{ currentStatusText }}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 课时进度 -->
|
|
|
+ <view class="progress-wrap">
|
|
|
+ <view class="progress-label-row">
|
|
|
+ <text class="progress-label">课时进度</text>
|
|
|
+ <text class="progress-value">{{ currentProgressText }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="progress-bar">
|
|
|
+ <view class="progress-inner" :style="'width:' + currentProgressPercent + '%'"></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="info-list">
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="info-label">学习状态</text>
|
|
|
+ <text class="info-value">{{ currentLearningStatusText }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row" v-if="currentExamStatusText">
|
|
|
+ <text class="info-label">考核状态</text>
|
|
|
+ <text class="info-value">{{ currentExamStatusText }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row" v-if="currentExamAttempts > 0">
|
|
|
+ <text class="info-label">已参加考核</text>
|
|
|
+ <text class="info-value">{{ currentExamAttempts }} 次</text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row" v-if="currentLastAttempt">
|
|
|
+ <text class="info-label">最近一次考核</text>
|
|
|
+ <text class="info-value">{{ currentLastAttempt.score }} 分 · {{ currentLastAttempt.passed === 1 ? '通过' : '未通过' }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row" v-if="currentCert.certNo">
|
|
|
+ <text class="info-label">证书编号</text>
|
|
|
+ <text class="info-value cert-no">{{ currentCert.certNo }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row" v-if="currentCert.certifiedAt">
|
|
|
+ <text class="info-label">认证时间</text>
|
|
|
+ <text class="info-value">{{ formatDateTime(currentCert.certifiedAt) }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 状态引导 / 失败态提示 -->
|
|
|
+ <view class="hint-block" :class="hintLevel">
|
|
|
+ <text class="hint-text">{{ currentHint }}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 考核入口 -->
|
|
|
+ <view class="exam-btn" :class="{ disabled: !currentCert.canExam }" @click="goExam">
|
|
|
+ <text>{{ currentExamBtnText }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="empty-block" v-else-if="!loading && certList.length === 0">
|
|
|
+ <text class="empty-icon">🎓</text>
|
|
|
+ <text class="empty-title">暂无认证信息</text>
|
|
|
+ <text class="empty-desc">如已完成成长规划师身份审核,请联系平台管理员补登认证记录</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 线上课程 -->
|
|
|
+ <view class="section" v-if="currentCert">
|
|
|
+ <view class="section-title">线上课程</view>
|
|
|
+ <view class="course-list" v-if="courses.length > 0">
|
|
|
+ <view class="course-item" v-for="c in courses" :key="c.id">
|
|
|
+ <view class="course-main">
|
|
|
+ <view class="course-title-row">
|
|
|
+ <text class="course-title">{{ c.title }}</text>
|
|
|
+ <text class="course-tag" v-if="c.isRequired === 1">必修</text>
|
|
|
+ <text class="course-tag optional" v-else>选修</text>
|
|
|
+ </view>
|
|
|
+ <text class="course-meta">要求课时 {{ hoursText(c.requiredHours) }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="empty-mini" v-else>该类别暂无线上课程</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 线下培训打卡 -->
|
|
|
+ <view class="section" v-if="currentCert">
|
|
|
+ <view class="section-title">线下培训打卡</view>
|
|
|
+ <view class="activity-list" v-if="tabActivities.length > 0">
|
|
|
+ <view class="activity-item" v-for="a in tabActivities" :key="a.id">
|
|
|
+ <view class="activity-main">
|
|
|
+ <view class="activity-title-row">
|
|
|
+ <text class="activity-title">{{ a.title }}</text>
|
|
|
+ <text class="course-tag" v-if="a.isRequired === 1">必修</text>
|
|
|
+ </view>
|
|
|
+ <text class="activity-meta">{{ formatDateTime(a.startTime) }}</text>
|
|
|
+ <text class="activity-meta" v-if="a.location">{{ a.location }}</text>
|
|
|
+ <text class="activity-meta hours">签到计 {{ hoursText(a.durationHours) }} 课时</text>
|
|
|
+ </view>
|
|
|
+ <view class="checkin-btn" :class="a._checked ? 'checked' : ''" @click="handleCheckIn(a)">
|
|
|
+ <text>{{ a._checked ? '已签到' : '签到' }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="empty-mini" v-else>该类别暂无可报名的培训活动</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="loading-block" v-if="loading">
|
|
|
+ <text class="loading-text">加载中...</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ getMyCertifications,
|
|
|
+ getPlannerCourses,
|
|
|
+ getPlannerTrainingActivities,
|
|
|
+ checkInTrainingActivity,
|
|
|
+ getPlannerExamResult
|
|
|
+} from '../../../utils/api.js'
|
|
|
+import { formatDateTime } from '../../../utils/format.js'
|
|
|
+import fontScaleMixin from '@/mixins/font-scale.js'
|
|
|
+
|
|
|
+export default {
|
|
|
+ mixins: [fontScaleMixin],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ certList: [],
|
|
|
+ currentTab: '',
|
|
|
+ courses: [],
|
|
|
+ activities: [],
|
|
|
+ loading: false,
|
|
|
+ examAttemptsMap: {},
|
|
|
+ submitting: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ /** 当前选中类别的认证记录 */
|
|
|
+ currentCert() {
|
|
|
+ for (var i = 0; i < this.certList.length; i++) {
|
|
|
+ if (this.certList[i].categoryCode === this.currentTab) return this.certList[i]
|
|
|
+ }
|
|
|
+ return null
|
|
|
+ },
|
|
|
+ /** 当前类别下的线下培训活动 */
|
|
|
+ tabActivities() {
|
|
|
+ if (!this.currentCert) return []
|
|
|
+ var code = this.currentCert.categoryCode
|
|
|
+ var list = []
|
|
|
+ for (var i = 0; i < this.activities.length; i++) {
|
|
|
+ if (this.activities[i].categoryCode === code) list.push(this.activities[i])
|
|
|
+ }
|
|
|
+ return list
|
|
|
+ },
|
|
|
+ baseCertReady() {
|
|
|
+ for (var i = 0; i < this.certList.length; i++) {
|
|
|
+ var c = this.certList[i]
|
|
|
+ if (c.isBase === 1 && c.status === 'certified') return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
+ currentProgressPercent() {
|
|
|
+ if (!this.currentCert) return 0
|
|
|
+ var required = parseFloat(this.currentCert.requiredHours)
|
|
|
+ var completed = parseFloat(this.currentCert.completedHours)
|
|
|
+ if (isNaN(required) || required <= 0) return completed > 0 ? 100 : 0
|
|
|
+ if (isNaN(completed)) completed = 0
|
|
|
+ var pct = (completed / required) * 100
|
|
|
+ if (pct > 100) pct = 100
|
|
|
+ return Math.round(pct * 10) / 10
|
|
|
+ },
|
|
|
+ currentProgressText() {
|
|
|
+ if (!this.currentCert) return '0 / 0'
|
|
|
+ return this.hoursText(this.currentCert.completedHours) + ' / ' + this.hoursText(this.currentCert.requiredHours)
|
|
|
+ },
|
|
|
+ currentStatusCss() {
|
|
|
+ if (!this.currentCert) return ''
|
|
|
+ var map = {
|
|
|
+ pending_cert: 'st-pending',
|
|
|
+ learning_completed: 'st-pending',
|
|
|
+ certified: 'st-done',
|
|
|
+ suspended: 'st-fail'
|
|
|
+ }
|
|
|
+ return map[this.currentCert.status] || 'st-pending'
|
|
|
+ },
|
|
|
+ currentStatusText() {
|
|
|
+ if (!this.currentCert) return ''
|
|
|
+ var map = {
|
|
|
+ pending_cert: '学习中',
|
|
|
+ learning_completed: '待考核',
|
|
|
+ certified: '已认证',
|
|
|
+ suspended: '已停用'
|
|
|
+ }
|
|
|
+ return map[this.currentCert.status] || this.currentCert.status || '学习中'
|
|
|
+ },
|
|
|
+ currentLearningStatusText() {
|
|
|
+ if (!this.currentCert) return ''
|
|
|
+ var map = { pending_learning: '学习进行中', learning_completed: '课时已达标' }
|
|
|
+ return map[this.currentCert.learningStatus] || '未开始'
|
|
|
+ },
|
|
|
+ currentExamStatusText() {
|
|
|
+ if (!this.currentCert) return ''
|
|
|
+ var st = this.currentCert.examStatus
|
|
|
+ if (st === 'none' || !st) return ''
|
|
|
+ var map = { exam_failed: '考核未通过', exam_passed: '考核已通过' }
|
|
|
+ var txt = map[st] || st
|
|
|
+ var score = this.currentCert.examScore
|
|
|
+ if (score !== null && score !== undefined) txt = txt + '(' + score + '分)'
|
|
|
+ return txt
|
|
|
+ },
|
|
|
+ currentExamAttempts() {
|
|
|
+ if (!this.currentCert) return 0
|
|
|
+ return parseInt(this.currentCert.examAttempts, 10) || 0
|
|
|
+ },
|
|
|
+ /** 最近一次考核记录(getPlannerExamResult 返回) */
|
|
|
+ currentLastAttempt() {
|
|
|
+ if (!this.currentCert) return null
|
|
|
+ return this.examAttemptsMap[this.currentCert.categoryId] || null
|
|
|
+ },
|
|
|
+ /** 考核按钮文案:已认证 / 可开考 / 需先完成课时 */
|
|
|
+ currentExamBtnText() {
|
|
|
+ if (!this.currentCert) return '开始考核'
|
|
|
+ if (this.currentCert.status === 'certified') return '✓ 已完成认证'
|
|
|
+ if (this.currentCert.canExam) {
|
|
|
+ return this.currentCert.examStatus === 'exam_failed' ? '重新参加考核' : '开始考核'
|
|
|
+ }
|
|
|
+ return '先完成必修课时'
|
|
|
+ },
|
|
|
+ hintLevel() {
|
|
|
+ if (!this.currentCert) return 'hint-info'
|
|
|
+ if (this.currentCert.status === 'certified') return 'hint-ok'
|
|
|
+ if (this.currentCert.status === 'suspended') return 'hint-fail'
|
|
|
+ if (this.currentCert.examStatus === 'exam_failed') return 'hint-fail'
|
|
|
+ if (this.currentCert.learningStatus === 'learning_completed') return 'hint-info'
|
|
|
+ return 'hint-warn'
|
|
|
+ },
|
|
|
+ /** 失败态 / 引导文案 */
|
|
|
+ currentHint() {
|
|
|
+ if (!this.currentCert) return ''
|
|
|
+ var c = this.currentCert
|
|
|
+ if (c.status === 'suspended') {
|
|
|
+ return '该类别认证已停用,无法提供对应服务,请联系平台处理。'
|
|
|
+ }
|
|
|
+ if (c.status === 'certified') {
|
|
|
+ if (c.isBase === 1) {
|
|
|
+ return '已通过基础类别认证,可接单提供成长规划师服务。'
|
|
|
+ }
|
|
|
+ return '已通过该类别认证,可承接对应类别的服务。'
|
|
|
+ }
|
|
|
+ if (c.learningStatus !== 'learning_completed') {
|
|
|
+ var need = this.hoursText(c.requiredHours)
|
|
|
+ var done = this.hoursText(c.completedHours)
|
|
|
+ var gap = Math.round((parseFloat(c.requiredHours) - parseFloat(c.completedHours)) * 10) / 10
|
|
|
+ return '课时未达标:已完成 ' + done + ' 课时,还差 ' + gap + ' 课时(共需 ' + need + ' 课时)。课时达标后方可参加考核。'
|
|
|
+ }
|
|
|
+ if (c.examStatus === 'exam_failed') {
|
|
|
+ return '课时已达标,但上次考核未通过。可重新参加考核,通过后即可认证。'
|
|
|
+ }
|
|
|
+ if (c.examStatus === 'none') {
|
|
|
+ return '课时已达标,尚未参加考核。完成考核后即可取得该类别认证。'
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this._onLoadFired = false
|
|
|
+ this.loadAll()
|
|
|
+ this._onLoadFired = true
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ // 首次进入由 onLoad 负责;返回本页(如考核页返回)时刷新数据
|
|
|
+ if (this._onLoadFired) {
|
|
|
+ this._onLoadFired = false
|
|
|
+ } else {
|
|
|
+ this.loadAll()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ loadAll() {
|
|
|
+ var self = this
|
|
|
+ if (this.loading) return
|
|
|
+ this.loading = true
|
|
|
+ var pending = 2
|
|
|
+ var done = function () {
|
|
|
+ pending--
|
|
|
+ if (pending <= 0) self.loading = false
|
|
|
+ }
|
|
|
+ getMyCertifications().then(function (res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ self.certList = res.data
|
|
|
+ if (!self.currentTab && self.certList.length > 0) {
|
|
|
+ self.currentTab = self.certList[0].categoryCode
|
|
|
+ }
|
|
|
+ // 类别确定后再拉课程与最近考核,避免首屏 categoryId 尚未就绪
|
|
|
+ self.loadCategoryData()
|
|
|
+ }
|
|
|
+ done()
|
|
|
+ }).catch(function () { done() })
|
|
|
+ getPlannerTrainingActivities().then(function (res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ var list = []
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ var a = res.data[i]
|
|
|
+ a._checked = false
|
|
|
+ list.push(a)
|
|
|
+ }
|
|
|
+ self.activities = list
|
|
|
+ }
|
|
|
+ done()
|
|
|
+ }).catch(function () { done() })
|
|
|
+ },
|
|
|
+ /** 仅刷新认证状态(签到后课时会重算,列表接口结果不变,无需重复请求) */
|
|
|
+ refreshCerts() {
|
|
|
+ var self = this
|
|
|
+ // _skipDedup:签到触发课时重算后需即时拿到最新 completedHours,绕开 3 秒去重缓存
|
|
|
+ getMyCertifications({ _skipDedup: true }).then(function (res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ self.certList = res.data
|
|
|
+ if (!self.currentTab && self.certList.length > 0) {
|
|
|
+ self.currentTab = self.certList[0].categoryCode
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(function () {})
|
|
|
+ },
|
|
|
+ /** 加载当前类别的课程与最近一次考核结果(切换 Tab 时也走这里) */
|
|
|
+ loadCategoryData() {
|
|
|
+ var cert = this.currentCert
|
|
|
+ if (!cert) {
|
|
|
+ this.courses = []
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var self = this
|
|
|
+ getPlannerCourses(cert.categoryId).then(function (res) {
|
|
|
+ if (res && res.code === 200 && res.data) self.courses = res.data
|
|
|
+ }).catch(function () { self.courses = [] })
|
|
|
+ getPlannerExamResult(cert.categoryId).then(function (res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ self.$set(self.examAttemptsMap, cert.categoryId, res.data)
|
|
|
+ }
|
|
|
+ }).catch(function () {})
|
|
|
+ },
|
|
|
+ switchTab(categoryCode) {
|
|
|
+ if (this.currentTab === categoryCode) return
|
|
|
+ this.currentTab = categoryCode
|
|
|
+ this.courses = []
|
|
|
+ this.loadCategoryData()
|
|
|
+ },
|
|
|
+ goExam() {
|
|
|
+ var cert = this.currentCert
|
|
|
+ if (!cert) return
|
|
|
+ if (!cert.canExam) {
|
|
|
+ uni.showToast({ title: this.currentHint, icon: 'none', duration: 2600 })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/guide/training/exam?categoryId=' + cert.categoryId + '&categoryName=' + encodeURIComponent(cert.categoryName)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleCheckIn(a) {
|
|
|
+ if (a._checked) {
|
|
|
+ uni.showToast({ title: '该活动已签到', icon: 'none' })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.submitting) return
|
|
|
+ var self = this
|
|
|
+ this.submitting = true
|
|
|
+ checkInTrainingActivity(a.id).then(function (res) {
|
|
|
+ self.submitting = false
|
|
|
+ if (res && res.code === 200) {
|
|
|
+ self.$set(a, '_checked', true)
|
|
|
+ uni.showToast({ title: '签到成功', icon: 'success' })
|
|
|
+ self.refreshCerts()
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: (res && res.message) || '签到失败', icon: 'none' })
|
|
|
+ }
|
|
|
+ }).catch(function () {
|
|
|
+ self.submitting = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ formatDateTime(dateStr) {
|
|
|
+ return formatDateTime(dateStr)
|
|
|
+ },
|
|
|
+ hoursText(v) {
|
|
|
+ var n = parseFloat(v)
|
|
|
+ if (isNaN(n)) return '0'
|
|
|
+ var r = Math.round(n * 10) / 10
|
|
|
+ return String(r)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.container {
|
|
|
+ min-height: 100vh;
|
|
|
+ background: $app-bg;
|
|
|
+ padding: 20rpx;
|
|
|
+ padding-bottom: 60rpx;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 总览卡 ===== */
|
|
|
+.overview-card {
|
|
|
+ background: linear-gradient(135deg, $status-success 0%, $status-success-deep 100%);
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 32rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ box-shadow: 0 4rpx 16rpx rgba(16, 185, 129, 0.25);
|
|
|
+}
|
|
|
+
|
|
|
+.overview-title {
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: $app-surface;
|
|
|
+ margin-bottom: 8rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.overview-desc {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: rgba(255, 255, 255, 0.85);
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.overview-badge {
|
|
|
+ display: inline-block;
|
|
|
+ background: rgba(255, 255, 255, 0.22);
|
|
|
+ border: 1rpx solid rgba(255, 255, 255, 0.4);
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 6rpx 20rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.overview-badge text {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $app-surface;
|
|
|
+}
|
|
|
+
|
|
|
+.overview-badge.pending {
|
|
|
+ background: rgba(0, 0, 0, 0.12);
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 类别 Tab ===== */
|
|
|
+.tabs {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ gap: 12rpx;
|
|
|
+ overflow-x: auto;
|
|
|
+ -webkit-overflow-scrolling: touch;
|
|
|
+ padding: 2rpx 0 18rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.tab {
|
|
|
+ flex-shrink: 0;
|
|
|
+ padding: 12rpx 28rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ background: $app-surface;
|
|
|
+ border: 1rpx solid $facade-gray-200;
|
|
|
+}
|
|
|
+
|
|
|
+.tab-active {
|
|
|
+ background: $status-success-soft;
|
|
|
+ border-color: $status-success;
|
|
|
+}
|
|
|
+
|
|
|
+.tab text {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: $facade-text-body;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
+
|
|
|
+.tab-active text {
|
|
|
+ color: $status-success-deep;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 认证状态卡 ===== */
|
|
|
+.cert-card {
|
|
|
+ background: $app-surface;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 28rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
|
|
|
+}
|
|
|
+
|
|
|
+.cert-head {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.cert-name {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ gap: 10rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.cert-name text {
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: $facade-text-strong;
|
|
|
+}
|
|
|
+
|
|
|
+.base-tag {
|
|
|
+ font-size: 20rpx !important;
|
|
|
+ color: $app-surface !important;
|
|
|
+ background: $status-info !important;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ padding: 2rpx 10rpx;
|
|
|
+ font-weight: normal !important;
|
|
|
+}
|
|
|
+
|
|
|
+.cert-status {
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding: 4rpx 16rpx;
|
|
|
+ border-radius: 16rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.st-pending {
|
|
|
+ background: $status-warning-soft;
|
|
|
+ color: $status-warning-deep;
|
|
|
+}
|
|
|
+
|
|
|
+.st-done {
|
|
|
+ background: $status-success-soft;
|
|
|
+ color: $status-success-deep;
|
|
|
+}
|
|
|
+
|
|
|
+.st-fail {
|
|
|
+ background: $status-danger-soft;
|
|
|
+ color: $status-danger-deep;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 课时进度 ===== */
|
|
|
+.progress-wrap {
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.progress-label-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.progress-label {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: $facade-text-body;
|
|
|
+}
|
|
|
+
|
|
|
+.progress-value {
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: $status-success-deep;
|
|
|
+}
|
|
|
+
|
|
|
+.progress-bar {
|
|
|
+ height: 14rpx;
|
|
|
+ background: $facade-fill-gray-100;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.progress-inner {
|
|
|
+ height: 100%;
|
|
|
+ background: linear-gradient(90deg, $status-success 0%, $status-success-deep 100%);
|
|
|
+ border-radius: 8rpx;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 信息行 ===== */
|
|
|
+.info-list {
|
|
|
+ background: $facade-fill-gray-50;
|
|
|
+ border-radius: 14rpx;
|
|
|
+ padding: 8rpx 20rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.info-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 16rpx 0;
|
|
|
+ border-bottom: 1rpx solid $facade-fill;
|
|
|
+}
|
|
|
+
|
|
|
+.info-row:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+}
|
|
|
+
|
|
|
+.info-label {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: $facade-text-muted;
|
|
|
+}
|
|
|
+
|
|
|
+.info-value {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: $facade-text-strong;
|
|
|
+}
|
|
|
+
|
|
|
+.cert-no {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $status-info-deep;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 提示块 ===== */
|
|
|
+.hint-block {
|
|
|
+ border-radius: 14rpx;
|
|
|
+ padding: 18rpx 20rpx;
|
|
|
+ margin-bottom: 22rpx;
|
|
|
+ border-left: 6rpx solid transparent;
|
|
|
+}
|
|
|
+
|
|
|
+.hint-warn {
|
|
|
+ background: $status-warning-tint;
|
|
|
+ border-left-color: $status-warning-2;
|
|
|
+}
|
|
|
+
|
|
|
+.hint-info {
|
|
|
+ background: $status-info-tint;
|
|
|
+ border-left-color: $status-info;
|
|
|
+}
|
|
|
+
|
|
|
+.hint-ok {
|
|
|
+ background: $status-success-tint;
|
|
|
+ border-left-color: $status-success;
|
|
|
+}
|
|
|
+
|
|
|
+.hint-fail {
|
|
|
+ background: $status-danger-tint-2;
|
|
|
+ border-left-color: $status-danger;
|
|
|
+}
|
|
|
+
|
|
|
+.hint-text {
|
|
|
+ font-size: 25rpx;
|
|
|
+ line-height: 1.6;
|
|
|
+ color: $facade-text-deep;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 考核按钮 ===== */
|
|
|
+.exam-btn {
|
|
|
+ background: linear-gradient(135deg, $status-success 0%, $status-success-deep 100%);
|
|
|
+ border-radius: 44rpx;
|
|
|
+ padding: 22rpx 0;
|
|
|
+ text-align: center;
|
|
|
+ box-shadow: 0 4rpx 16rpx rgba(16, 185, 129, 0.3);
|
|
|
+}
|
|
|
+
|
|
|
+.exam-btn text {
|
|
|
+ color: $app-surface;
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+.exam-btn.disabled {
|
|
|
+ background: $facade-fill-gray-100;
|
|
|
+ box-shadow: none;
|
|
|
+}
|
|
|
+
|
|
|
+.exam-btn.disabled text {
|
|
|
+ color: $facade-text-ghost-light;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 空状态 ===== */
|
|
|
+.empty-block {
|
|
|
+ background: $app-surface;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 80rpx 40rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.empty-icon {
|
|
|
+ font-size: 96rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.empty-title {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: $facade-text-strong;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.empty-desc {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $facade-text-muted;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 1.6;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 区块 ===== */
|
|
|
+.section {
|
|
|
+ background: $app-surface;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 24rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.section-title {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: $facade-text-strong;
|
|
|
+ margin-bottom: 18rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.empty-mini {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $facade-text-muted;
|
|
|
+ text-align: center;
|
|
|
+ padding: 24rpx 0;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 课程列表 ===== */
|
|
|
+.course-item {
|
|
|
+ padding: 20rpx 0;
|
|
|
+ border-bottom: 1rpx solid $facade-fill;
|
|
|
+}
|
|
|
+
|
|
|
+.course-item:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+}
|
|
|
+
|
|
|
+.course-title-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ gap: 10rpx;
|
|
|
+ margin-bottom: 6rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.course-title {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: $facade-text-strong;
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+
|
|
|
+.course-tag {
|
|
|
+ flex-shrink: 0;
|
|
|
+ font-size: 20rpx;
|
|
|
+ color: $status-info-deep;
|
|
|
+ background: $status-info-soft;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ padding: 2rpx 10rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.course-tag.optional {
|
|
|
+ color: $facade-text-muted;
|
|
|
+ background: $facade-fill-gray-100;
|
|
|
+}
|
|
|
+
|
|
|
+.course-meta {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $facade-text-faint;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 活动列表 ===== */
|
|
|
+.activity-item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ padding: 20rpx 0;
|
|
|
+ border-bottom: 1rpx solid $facade-fill;
|
|
|
+}
|
|
|
+
|
|
|
+.activity-item:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+}
|
|
|
+
|
|
|
+.activity-main {
|
|
|
+ flex: 1;
|
|
|
+ margin-right: 20rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.activity-title-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ gap: 10rpx;
|
|
|
+ margin-bottom: 6rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.activity-title {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: $facade-text-strong;
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+
|
|
|
+.activity-meta {
|
|
|
+ font-size: 23rpx;
|
|
|
+ color: $facade-text-faint;
|
|
|
+ line-height: 1.5;
|
|
|
+}
|
|
|
+
|
|
|
+.activity-meta.hours {
|
|
|
+ color: $status-success-deep;
|
|
|
+}
|
|
|
+
|
|
|
+.checkin-btn {
|
|
|
+ flex-shrink: 0;
|
|
|
+ background: $status-success;
|
|
|
+ border-radius: 26rpx;
|
|
|
+ padding: 12rpx 30rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.checkin-btn.checked {
|
|
|
+ background: $facade-fill-gray-100;
|
|
|
+}
|
|
|
+
|
|
|
+.checkin-btn text {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $app-surface;
|
|
|
+}
|
|
|
+
|
|
|
+.checkin-btn.checked text {
|
|
|
+ color: $facade-text-muted;
|
|
|
+}
|
|
|
+
|
|
|
+/* ===== 加载 ===== */
|
|
|
+.loading-block {
|
|
|
+ padding: 40rpx;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+.loading-text {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: $facade-text-muted;
|
|
|
+}
|
|
|
+</style>
|