学习记录
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="top">
|
||||
<div class="flex-left">
|
||||
<img class="video-img" src="https://cdn.cunwuyun.cn/img/qrcode-sign-fail.png" alt="">
|
||||
<img class="video-img" :src="item.pictureUrl" alt="">
|
||||
<img class="play-icon" src="https://cdn.cunwuyun.cn/dvcp/pay-btn.png" alt="">
|
||||
<div class="status status0">未完成</div>
|
||||
</div>
|
||||
<div class="flex-right">
|
||||
<h3>课程名称</h3>
|
||||
<h3>{{item.title}}</h3>
|
||||
<div class="time">
|
||||
<span>23人已学习</span>
|
||||
<span>{{item.learnerNumber}}人已学习</span>
|
||||
<span>共3分56秒</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,7 +44,9 @@ export default {
|
||||
appName: "学习记录",
|
||||
data() {
|
||||
return {
|
||||
|
||||
current: 1,
|
||||
pages: 2,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -58,9 +60,28 @@ export default {
|
||||
frontColor: "#000000",
|
||||
backgroundColor: "#F4F6FA",
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
getList() {
|
||||
if(this.current > this.pages) return
|
||||
this.$instance.post(`/app/appcourseinfo/listByApplet?size=20¤t=${this.current}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.pages = res.data.pages
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
toTestForm(id) {
|
||||
uni.navigateTo({url: `../AppLegalLearning/testForm?id=${id}`})
|
||||
},
|
||||
toTestResult(id) {
|
||||
uni.navigateTo({url: `../AppLegalLearning/result?id=${id}`})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user