Browse Source

feat(ui-kit): 案例授权页五态组件化 + 5 页非V4色值对齐 token

liaoxg 20 hours ago
parent
commit
c469e470bb

+ 10 - 3
train-frontend/pages/case/index.vue

@@ -4,8 +4,9 @@
       <text class="section-title">案例授权</text>
       <text class="section-title">案例授权</text>
       <text class="card-desc">教学案例将展示您的姓名与执业信息,请确认是否同意授权展示</text>
       <text class="card-desc">教学案例将展示您的姓名与执业信息,请确认是否同意授权展示</text>
 
 
-      <view v-if="loading" class="empty-tip">加载中…</view>
-      <view v-else-if="list.length === 0" class="empty-tip">暂无需要授权的案例</view>
+      <LoadingSkeleton v-if="loading" :rows="3" />
+      <ErrorState v-else-if="error" message="案例列表加载失败" @retry="loadMine" />
+      <EmptyState v-else-if="list.length === 0" icon="🗒️" title="暂无需要授权的案例" desc="有教学案例待授权时会在此展示" />
       <view v-else>
       <view v-else>
         <view class="case-item" v-for="item in list" :key="item.id">
         <view class="case-item" v-for="item in list" :key="item.id">
           <text class="case-title">{{ item.title }}</text>
           <text class="case-title">{{ item.title }}</text>
@@ -26,12 +27,17 @@
 <script>
 <script>
 import { getMyCases, decideCase } from '@/utils/api.js'
 import { getMyCases, decideCase } from '@/utils/api.js'
 import { guardPage } from '@/utils/guard.js'
 import { guardPage } from '@/utils/guard.js'
+import LoadingSkeleton from '@/components/loading-skeleton.vue'
+import ErrorState from '@/components/error-state.vue'
+import EmptyState from '@/components/empty-state.vue'
 
 
 export default {
 export default {
+  components: { LoadingSkeleton, ErrorState, EmptyState },
   data() {
   data() {
     return {
     return {
       list: [],
       list: [],
       loading: false,
       loading: false,
+      error: false,
       deciding: false
       deciding: false
     }
     }
   },
   },
@@ -43,10 +49,11 @@ export default {
     loadMine() {
     loadMine() {
       var self = this
       var self = this
       self.loading = true
       self.loading = true
+      self.error = false
       getMyCases().then(function(resp) {
       getMyCases().then(function(resp) {
         self.list = resp.data || []
         self.list = resp.data || []
       }).catch(function() {
       }).catch(function() {
-        uni.showToast({ title: '加载案例失败', icon: 'none' })
+        self.error = true
       }).finally(function() {
       }).finally(function() {
         self.loading = false
         self.loading = false
       })
       })

+ 1 - 1
train-frontend/pages/cohort/index.vue

@@ -274,7 +274,7 @@ export default {
   padding: 26rpx 24rpx;
   padding: 26rpx 24rpx;
   margin-bottom: 20rpx;
   margin-bottom: 20rpx;
 }
 }
-.cohort-card:active { background: #F7FBFE; }
+.cohort-card:active { background: #F5FAFE; }
 .card-top {
 .card-top {
   display: flex;
   display: flex;
   justify-content: space-between;
   justify-content: space-between;

+ 1 - 1
train-frontend/pages/course/index.vue

@@ -193,7 +193,7 @@ export default {
 .course-tag.st-upcoming { color: #2E6FA8; background: #E8F3FC; }
 .course-tag.st-upcoming { color: #2E6FA8; background: #E8F3FC; }
 .course-tag.st-active { color: #0E8A4F; background: #E6F6EE; }
 .course-tag.st-active { color: #0E8A4F; background: #E6F6EE; }
 .course-tag.st-finished { color: #6B7B8C; background: #E3ECF4; }
 .course-tag.st-finished { color: #6B7B8C; background: #E3ECF4; }
-.course-tag.mine { color: #2E6FA8; background: #EEF2FF; }
+.course-tag.mine { color: #2E6FA8; background: #E8F3FC; }
 .course-tag.my-confirmed { color: #0E8A4F; background: #E6F6EE; }
 .course-tag.my-confirmed { color: #0E8A4F; background: #E6F6EE; }
 .course-tag.my-reviewing { color: #2E6FA8; background: #E8F3FC; }
 .course-tag.my-reviewing { color: #2E6FA8; background: #E8F3FC; }
 .course-tag.my-rejected { color: #C0392B; background: #FDE8E8; }
 .course-tag.my-rejected { color: #C0392B; background: #FDE8E8; }

+ 1 - 1
train-frontend/pages/index/index.vue

@@ -573,7 +573,7 @@ export default {
 .dynamic-item:last-child { border-bottom: none; }
 .dynamic-item:last-child { border-bottom: none; }
 .dynamic-item:active { background: #F5FAFE; }
 .dynamic-item:active { background: #F5FAFE; }
 .dynamic-tag { flex-shrink: 0; font-size: 22rpx; font-weight: 600; padding: 4rpx 14rpx; border-radius: 6rpx; margin-right: 16rpx; }
 .dynamic-tag { flex-shrink: 0; font-size: 22rpx; font-weight: 600; padding: 4rpx 14rpx; border-radius: 6rpx; margin-right: 16rpx; }
-.dynamic-tag-course { background: #EEF2FF; color: #2E6FA8; }
+.dynamic-tag-course { background: #E8F3FC; color: #2E6FA8; }
 .dynamic-main { flex: 1; overflow: hidden; }
 .dynamic-main { flex: 1; overflow: hidden; }
 .dynamic-title { display: block; font-size: 28rpx; font-weight: 600; color: #1E3A5F; margin-bottom: 4rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .dynamic-title { display: block; font-size: 28rpx; font-weight: 600; color: #1E3A5F; margin-bottom: 4rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .dynamic-desc { display: block; font-size: 22rpx; color: #6B7B8C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .dynamic-desc { display: block; font-size: 22rpx; color: #6B7B8C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

+ 1 - 1
train-frontend/pages/practitioner/index.vue

@@ -535,7 +535,7 @@ export default {
   border-radius: 18rpx;
   border-radius: 18rpx;
 }
 }
 .entry-item.active:active { background: #F5FAFE; }
 .entry-item.active:active { background: #F5FAFE; }
-.entry-item.disabled { background: #FAFCFE; }
+.entry-item.disabled { background: #F5FAFE; }
 .entry-icon { font-size: 52rpx; margin-bottom: 12rpx; }
 .entry-icon { font-size: 52rpx; margin-bottom: 12rpx; }
 .entry-name { font-size: 28rpx; font-weight: 600; color: #1F4E79; }
 .entry-name { font-size: 28rpx; font-weight: 600; color: #1F4E79; }
 .entry-item.disabled .entry-name { color: #94A3B2; }
 .entry-item.disabled .entry-name { color: #94A3B2; }

+ 1 - 1
train-frontend/pages/work/detail.vue

@@ -459,7 +459,7 @@ export default {
 .photo-cell { width: 190rpx; height: 190rpx; margin: 8rpx; border-radius: 12rpx; overflow: hidden; }
 .photo-cell { width: 190rpx; height: 190rpx; margin: 8rpx; border-radius: 12rpx; overflow: hidden; }
 .photo-img { width: 100%; height: 100%; }
 .photo-img { width: 100%; height: 100%; }
 .add-cell {
 .add-cell {
-  background: #F0F6FC;
+  background: #E8F3FC;
   border: 1px dashed #C5DFF3;
   border: 1px dashed #C5DFF3;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;