Commit ff028b35 authored by 林文清's avatar 林文清

学习首页ui

parent aa3c83d8
This diff is collapsed.
...@@ -37,59 +37,65 @@ ...@@ -37,59 +37,65 @@
<scroll-view scroll-y style="height:100%;width:100%;"> <scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean"> <view class="lean">
<view class="top"> <view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="currency-class"> <view class="currency-class">
<view class="title">通用课程</view>
<view class="class1" @click=ccc(courselist[0].id)> <view class="class1" @click=ccc(courselist[0].id)>
<image class="img" :src="courselist[0].pic" mode=""></image> <image class="img" :src="courselist[0].pic" mode=""></image>
<view class="right"> <view class="right">
<view class=""> <view class="u-font-32">
{{ courselist[0].title }} {{ courselist[0].title }}
</view> </view>
<view class="intro"> <view class="u-font-24">
{{ courselist[0].desc }} {{ courselist[0].desc }}
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="line-percent">
<u-line-progress active-color="#2979ff" :percent=courselist[0].percent <u-line-progress active-color="#2979ff" :percent="courselist[0].percent"
style="width:54%;"> :show-percent="false">
</u-line-progress> </u-line-progress>
<text v-text="courselist[0].status"></text> <text class="font-default-color"
:class="{'font-active-color':courselist[0].percent}"
v-text="courselist[0].status"></text>
</view> </view>
</view> </view>
</view> </view>
<view class="class1" @click=ccc(courselist[1].id)> <view class="class1 u-margin-top-40" @click=ccc(courselist[1].id)>
<image class="img" :src="courselist[1].pic" mode=""></image> <image class="img" :src="courselist[1].pic" mode=""></image>
<view class="right"> <view class="right">
<view class=""> <view class="u-font-32">
{{ courselist[1].title }} {{ courselist[1].title }}
</view> </view>
<view class=""> <view class="u-font-24">
{{ courselist[1].desc }} {{ courselist[1].desc }}
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="line-percent">
<u-line-progress active-color="#2979ff" :percent="courselist[1].percent" <u-line-progress active-color="#2979ff" :percent="courselist[1].percent"
style="width:54%;"> :show-percent="false">
</u-line-progress> </u-line-progress>
<text v-text="courselist[1].status"></text> <text class="font-default-color"
:class="{'font-active-color':courselist[1].percent}"
v-text="courselist[1].status"></text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="title u-margin-top-50 u-margin-bottom-30">技能课程</view>
<view class="currency-class"> <view class="currency-class">
<view class="title">技能课程</view>
<view class="class1" @click=ccc(courselist[2].id)> <view class="class1" @click=ccc(courselist[2].id)>
<image class="img" :src="courselist[2].pic" mode=""></image> <image class="img" :src="courselist[2].pic" mode=""></image>
<view class="right"> <view class="right">
<view class=""> <view class="u-font-32 font-bold">
{{ courselist[2].title }} {{ courselist[2].title }}
</view> </view>
<view class=""> <view class="u-font-24">
{{ courselist[2].desc }} {{ courselist[2].desc }}
</view> </view>
<view class="" style="display:flex;justify-content: space-between;"> <view class="line-percent" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent="courselist[2].percent" <u-line-progress active-color="#2979ff" :percent="courselist[2].percent"
style="width:54%;"> :show-percent="false">
</u-line-progress> </u-line-progress>
<text v-text="courselist[2].status"></text> <text class="font-default-color"
:class="{'font-active-color':courselist[2].percent}"
v-text="courselist[2].status"></text>
</view> </view>
</view> </view>
</view> </view>
...@@ -289,6 +295,7 @@ ...@@ -289,6 +295,7 @@
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.data) { if (res.data) {
res.data.learnedInfo.learnPercent *= 100;
this.courselist[i].status = this.getTypeName(res.data.learnedInfo.learnPercent); this.courselist[i].status = this.getTypeName(res.data.learnedInfo.learnPercent);
this.courselist[i].percent = res.data.learnedInfo.learnPercent; this.courselist[i].percent = res.data.learnedInfo.learnPercent;
} }
...@@ -336,7 +343,7 @@ ...@@ -336,7 +343,7 @@
var id = this.exam.id; var id = this.exam.id;
if (this.exam.examStatus == 0) { if (this.exam.examStatus == 0) {
console.log("这是个标识符", this.exam.id); console.log("这是个标识符", this.exam.id);
wx.navigateTo({ wx.navigateTo({
url: "./answer?userExamId=" + id, url: "./answer?userExamId=" + id,
}); });
...@@ -522,9 +529,10 @@ ...@@ -522,9 +529,10 @@
/* //在线学习 */ /* //在线学习 */
.currency-class { .currency-class {
width: 100%; width: 100%;
/* height: 340rpx; */
background: #ffffff; background: #ffffff;
padding: 18rpx; padding: 30rpx;
margin-bottom: 11px; /* margin-bottom: 11px; */
border-radius: 12rpx; border-radius: 12rpx;
} }
...@@ -535,22 +543,23 @@ ...@@ -535,22 +543,23 @@
} }
.class1 { .class1 {
display: -webkit-box;
display: -webkit-flex;
display: flex; display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
padding-top: 22rpx;
margin-top: 28rpx;
border-top: 1rpx solid #808080;
} }
.img { .img {
width: 201rpx; width: 160rpx;
height: 201rpx; height: 120rpx;
display: block; /* display: block; */
margin-right: 0rpx; /* margin-right: 0rpx; */
} }
.right { .right {
width: 428rpx; width: 434rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
...@@ -581,4 +590,30 @@ ...@@ -581,4 +590,30 @@
swiper { swiper {
height: 691rpx; height: 691rpx;
} }
</style>
\ No newline at end of file .line-percent {
display: flex;
justify-content: space-between;
line-height: 24rpx;
font-size: 24rpx;
color: #999999;
}
.u-progress {
width: 280rpx !important;
height: 12rpx !important;
background-color: #ececec;
}
.font-bold {
font-weight: bold;
}
.font-default-color {
color: #999999;
}
.font-active-color {
color: #2272FF;
}
</style>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment