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

学习首页ui

parent aa3c83d8
This diff is collapsed.
......@@ -37,59 +37,65 @@
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean">
<view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="currency-class">
<view class="title">通用课程</view>
<view class="class1" @click=ccc(courselist[0].id)>
<image class="img" :src="courselist[0].pic" mode=""></image>
<view class="right">
<view class="">
<view class="u-font-32">
{{ courselist[0].title }}
</view>
<view class="intro">
<view class="u-font-24">
{{ courselist[0].desc }}
</view>
<view class="" style="display:flex;justify-content: space-between;">
<u-line-progress active-color="#2979ff" :percent=courselist[0].percent
style="width:54%;">
<view class="line-percent">
<u-line-progress active-color="#2979ff" :percent="courselist[0].percent"
:show-percent="false">
</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 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>
<view class="right">
<view class="">
<view class="u-font-32">
{{ courselist[1].title }}
</view>
<view class="">
<view class="u-font-24">
{{ courselist[1].desc }}
</view>
<view class="" style="display:flex;justify-content: space-between;">
<view class="line-percent">
<u-line-progress active-color="#2979ff" :percent="courselist[1].percent"
style="width:54%;">
:show-percent="false">
</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 class="title u-margin-top-50 u-margin-bottom-30">技能课程</view>
<view class="currency-class">
<view class="title">技能课程</view>
<view class="class1" @click=ccc(courselist[2].id)>
<image class="img" :src="courselist[2].pic" mode=""></image>
<view class="right">
<view class="">
<view class="u-font-32 font-bold">
{{ courselist[2].title }}
</view>
<view class="">
<view class="u-font-24">
{{ courselist[2].desc }}
</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"
style="width:54%;">
:show-percent="false">
</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>
......@@ -289,6 +295,7 @@
.then((res) => {
if (res.code == 200) {
if (res.data) {
res.data.learnedInfo.learnPercent *= 100;
this.courselist[i].status = this.getTypeName(res.data.learnedInfo.learnPercent);
this.courselist[i].percent = res.data.learnedInfo.learnPercent;
}
......@@ -336,7 +343,7 @@
var id = this.exam.id;
if (this.exam.examStatus == 0) {
console.log("这是个标识符", this.exam.id);
wx.navigateTo({
url: "./answer?userExamId=" + id,
});
......@@ -522,9 +529,10 @@
/* //在线学习 */
.currency-class {
width: 100%;
/* height: 340rpx; */
background: #ffffff;
padding: 18rpx;
margin-bottom: 11px;
padding: 30rpx;
/* margin-bottom: 11px; */
border-radius: 12rpx;
}
......@@ -535,22 +543,23 @@
}
.class1 {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
padding-top: 22rpx;
margin-top: 28rpx;
border-top: 1rpx solid #808080;
}
.img {
width: 201rpx;
height: 201rpx;
display: block;
margin-right: 0rpx;
width: 160rpx;
height: 120rpx;
/* display: block; */
/* margin-right: 0rpx; */
}
.right {
width: 428rpx;
width: 434rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
......@@ -581,4 +590,30 @@
swiper {
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