Commit 9e990c87 by kyle

学习记录

parent 0e7872c2
...@@ -54,4 +54,15 @@ ...@@ -54,4 +54,15 @@
width: 80%; width: 80%;
border-radius: 20rpx; border-radius: 20rpx;
} }
.container uni-slider{
margin: 0;
}
.container uni-slider .uni-slider-value{
text-align: right;
}
.noListTip{
text-align: center;
margin-top: 10%;
color: #999;
}
</style> </style>
...@@ -84,5 +84,9 @@ export default { ...@@ -84,5 +84,9 @@ export default {
//邀请加盟与申请加盟保存接口 //邀请加盟与申请加盟保存接口
saveApplyInfo(params){ saveApplyInfo(params){
return request(`${cffpURL}/partner/saveApplyInfo`, "POST", params) return request(`${cffpURL}/partner/saveApplyInfo`, "POST", params)
},
// 我的学习,学习记录
userStudyList(params){
return request(`${cffpURL}/study/userStudyList`, "POST", params)
} }
} }
...@@ -105,6 +105,15 @@ ...@@ -105,6 +105,15 @@
} }
} }
,{
"path" : "pages/myLearning/myLearning",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
], ],
// "tabBar": { // "tabBar": {
// "color": "#7A7E83", // tab 上的文字默认颜色 // "color": "#7A7E83", // tab 上的文字默认颜色
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
{ key: '01', name: '我的积分', icon: 'integral', link: '', isOpen: false }, { key: '01', name: '我的积分', icon: 'integral', link: '', isOpen: false },
{ key: '02', name: '申请加盟', icon: 'applyJoin', link: '../application-process/basic-info', isOpen: true }, { key: '02', name: '申请加盟', icon: 'applyJoin', link: '../application-process/basic-info', isOpen: true },
{ key: '03', name: '学习认证', icon: 'learningCertify', link: '', isOpen: false }, { key: '03', name: '学习认证', icon: 'learningCertify', link: '', isOpen: false },
{ key: '04', name: '邀请加盟', icon: 'shareJoin', link: '../inviteJoin/inviteJoin', isOpen: false }, { key: '04', name: '邀请加盟', icon: 'shareJoin', link: '../inviteJoin/inviteJoin', isOpen: true },
{ key: '05', name: '我的分享', icon: 'share', link: '', isOpen: false }, { key: '05', name: '我的分享', icon: 'share', link: '', isOpen: false },
{ key: '06', name: '我的团队', icon: 'team', link: '', isOpen: false }, { key: '06', name: '我的团队', icon: 'team', link: '', isOpen: false },
{ key: '07', name: '更多功能', icon: 'more', link: '../personalCenter/personalCenter', isOpen: true } { key: '07', name: '更多功能', icon: 'more', link: '../personalCenter/personalCenter', isOpen: true }
......
<template>
<view class="container">
<!-- tab选项 -->
<view class="tabTitle">
<text :class="{'actived': tabType===1}" @click="switchTab(1)">学习记录</text>
<text :class="{'actived': tabType===2}" @click="switchTab(2)">学习统计</text>
</view>
<!-- tab内容 -->
<view class="tabContent">
<view class="learningRecordContainer" v-if="tabType===1">
<h3 class="noListTip">暂无学习记录!</h3>
<view class="learningRecordItem" v-for="item in userStudyList">
<view class="dateBox">{{item.studyTime}}</view>
<!-- 课程详情 -->
<view class="courseInfoContent" v-for="subItem in item.userStudyInfos" :key="subItem.fileId">
<view class="thumbnailBox">
<img :src="subItem.displayImage" alt="">
</view>
<view class="courseDetailBox">
<h4>{{subItem.fileTitle}}</h4>
<view class="summaryBox">
<text>学习时长:{{subItem.studyDuration}}分钟</text>
</view>
<view class="processBox">
<view class="sliderBox">
<slider :value="subItem.progressBar" show-value block-size="14" disabled activeColor="#20269B"/>
</view>
<view>%</view>
</view>
<view class="dataBox">
<text>可观看截至:{{subItem.effectiveEndDate}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="learningStatisticsContainer" v-if="tabType===2">
</view>
</view>
</view>
</template>
<script>
import api from "@/api/api";
export default {
data() {
return {
tabType:1,
userStudyList:[],
userId:null
}
},
methods: {
switchTab(type){
this.tabType = type;
if(type===1){
}else{
}
},
userStudyList(){
api.userStudyList({userId:this.userId}).then(res=>{
if(res['success']){
this.userStudyList = res['data']['userStudyTimeInfos'];
}
console.log(res)
})
}
},
onLoad() {
},
mounted() {
}
}
</script>
<style lang="scss">
.container{
position: relative;
height: 100%;
.tabTitle{
color: #666666;
background-color:#fff;
display: flex;
align-items: center;
justify-content: space-around;
padding: 30rpx 60rpx 0;
text{
&.actived{
color: #333;
border-bottom: 4rpx solid #20269B;
}
}
}
.learningRecordContainer{
padding: 20rpx 30rpx;
.dateBox{
padding-left: 16rpx;
}
.courseInfoContent{
display: flex;
align-items: center;
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 10rpx;
padding: 5rpx 10rpx;
.thumbnailBox{
width: 200rpx;
height: 200rpx;
background-color: #888;
margin-right: 26rpx;
img{
max-width: 100%;
height: auto;
}
}
.courseDetailBox{
width: 100%;
color: #333;
h4{
font-size: 32rpx;
}
.summaryBox{
font-size: 24rpx;
margin: 10rpx 0;
text{
margin-right: 20rpx;
}
}
.processBox{
display: flex;
justify-content: flex-start;
font-size: 28rpx;
color: #888;
.sliderBox{
width: 100%;
}
}
.dataBox{
text{
font-size: 28rpx;
}
}
}
}
}
}
</style>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
}, },
{id:'02',categoryName:'活动管理', {id:'02',categoryName:'活动管理',
children:[ children:[
{title:'我的学习',icon:'myLearning',link:'',isOpen:true,isShow:true}, {title:'我的学习',icon:'myLearning',link:'/pages/myLearning/myLearning',isOpen:true,isShow:true},
{title:'学习认证',icon:'learningCertify',link:'',isOpen:true,isShow:true}, {title:'学习认证',icon:'learningCertify',link:'',isOpen:true,isShow:true},
{title:'我的分享',icon:'share',link:'',isOpen:true,isShow:true} {title:'我的分享',icon:'share',link:'',isOpen:true,isShow:true}
], ],
......
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