Commit cae85bec by liaoym

修复样式

1 parent 37286d30
No preview for this file type

2.91 MB | W: | H:

2.91 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -24,6 +24,7 @@
<view class="item-compare">
<text class="compare-text">对比上月</text>
<text class="compare-percent">25.6%</text>
<image class="compare-icon" :src="require('@/assets/images/studyCenter/up-arrow.png')" mode="aspectFit" />
</view>
</view>
</view>
......@@ -33,6 +34,7 @@
<view class="list-item" @click="goToMyCourse">
<image class="item-icon" :src="require('@/assets/images/studyCenter/my-courses.png')" mode="aspectFit" />
<view class="item-text">我的课程</view>
<view class="badge">2</view>
</view>
<view class="list-item" @click="goToMyExam">
<image class="item-icon" :src="require('@/assets/images/studyCenter/my-exam.png')" mode="aspectFit" />
......@@ -47,7 +49,46 @@
<view class="item-text">排行榜</view>
</view>
</view>
<!-- 我的学习时长 -->
<view class="study-duration-card">
<view class="card-title">
<text class="title-text">我的学习时长</text>
<view class="title-compare">
<text class="compare-label">对比上月</text>
<text class="compare-value" :style="{ color: monthCompare.color }">{{ monthCompare.percent }}</text>
<image class="compare-arrow" :src="monthCompare.icon" mode="aspectFit" />
</view>
</view>
<view class="duration-content">
<!-- 左边:累计 -->
<view class="duration-item">
<view class="item-label">累计</view>
<view class="item-value">
<text class="value-number">345</text>
<text class="value-unit">小时</text>
</view>
</view>
<!-- 右边:本月 -->
<view class="duration-item">
<view class="item-label">本月</view>
<view class="item-value">
<text class="value-number">25</text>
<text class="value-unit">小时</text>
</view>
<view class="item-compare">
<text class="compare-text">对比上月</text>
<text class="compare-percent" style=" color: #35c376; ">25.6%</text>
<image class="compare-icon" :src="require('@/assets/images/studyCenter/green.png')" mode="aspectFit" />
</view>
</view>
</view>
</view>
</view>
<!-- <view class="study-left">
<view class="title">学习看板</view>
<view class="study-board-box"> -->
......@@ -204,6 +245,13 @@ export default {
// 筛选相关数据
totalCourseCount: 123,
searchKeyword: '', // 搜索关键词
// 对比上月数据(临时模拟数据)
monthCompare: {
percent: '0%',
color: '#ff9d0a',
icon: require('@/assets/images/studyCenter/heng.png')
},
courseConfig: courseConfig, // 课程筛选配置
sortOptions: [
{ label: '综合排序', value: 'default' },
......@@ -459,15 +507,49 @@ export default {
background: #ffffff;
padding: toRpx(24) toRpx(32) toRpx(28) toRpx(32);
.card-title {
width: toRpx(168);
height: toRpx(36);
color: #333333;
font-size: toRpx(28);
font-weight: 500;
font-family: "HarmonyOSSansSC";
text-align: left;
line-height: toRpx(36);
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: toRpx(24);
.title-text {
color: #333333;
font-size: toRpx(28);
font-weight: 500;
font-family: "HarmonyOSSansSC";
line-height: toRpx(36);
}
.title-compare {
display: flex;
align-items: center;
.compare-label {
width: toRpx(104);
height: toRpx(36);
color: #666666;
font-size: toRpx(26);
font-weight: 400;
font-family: "HarmonyOSSansSC";
line-height: toRpx(36);
}
.compare-value {
width: toRpx(36);
height: toRpx(36);
font-size: toRpx(26);
font-weight: 400;
font-family: "HarmonyOSSansSC";
line-height: toRpx(36);
margin-left: toRpx(4);
}
.compare-arrow {
width: toRpx(28);
height: toRpx(28);
margin-left: toRpx(4);
}
}
}
.duration-content {
......@@ -535,6 +617,11 @@ export default {
display: flex;
align-items: center;
margin-top: toRpx(8);
.compare-icon {
width: toRpx(28);
height: toRpx(28);
margin-left: toRpx(4);
}
}
.compare-text {
......@@ -567,13 +654,14 @@ export default {
display: flex;
flex-wrap: wrap;
gap: toRpx(28);
margin-bottom: toRpx(178);
.list-item {
width: toRpx(168);
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: toRpx(28);
position: relative;
.item-icon {
width: toRpx(96);
......@@ -590,6 +678,25 @@ export default {
font-family: "HarmonyOSSansSC";
text-align: center;
}
.badge {
position: absolute;
top: 0;
right: toRpx(24);
width: toRpx(24);
height: toRpx(24);
border-radius: toRpx(732);
background: #f24724;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: toRpx(20);
font-weight: 400;
font-family: "HarmonyOSSansSC";
text-align: center;
line-height: 1;
}
}
}
}
......
......@@ -167,7 +167,6 @@ export default {
align-items: center;
justify-content: center;
height: toRpx(88);
margin-top: var(--status-bar-height);
position: relative;
.back {
......
......@@ -102,7 +102,6 @@ export default {
align-items: center;
justify-content: center;
height: toRpx(88);
margin-top: var(--status-bar-height);
position: relative;
.back {
......
......@@ -92,7 +92,6 @@ export default {
align-items: center;
justify-content: center;
height: toRpx(88);
margin-top: var(--status-bar-height);
position: relative;
.back {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!