|
@@ -1,34 +1,30 @@
|
|
|
<template>
|
|
|
<view style="padding: 30rpx;">
|
|
|
- <view v-for="(item, index) in list" :key="index" style="margin-bottom: 30rpx;">
|
|
|
- <navigator hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId">
|
|
|
- <!-- <navigator hover-class="none" url="/pages2/bank/detail"> -->
|
|
|
- <view class="class_item">
|
|
|
- <image class="img" :src="$method.splitImgHost(item.coverUrl, true)"></image>
|
|
|
- <view style="color: #333333;font-weight: bold;font-size: 32rpx;">
|
|
|
- {{item.goodsName}}
|
|
|
- </view>
|
|
|
- <view class=".content_box">
|
|
|
- <image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
|
|
|
- 学习有效期:<text class="content"> {{$method.timestampToTime(item.studyStartTime)}} - {{$method.timestampToTime(item.studyEndTime)}} </text>
|
|
|
- </view>
|
|
|
-
|
|
|
+ <view v-for="(item, index) in list" :key="index" style="margin-bottom: 30rpx;" @click="studyIn(item,index)">
|
|
|
+ <view class="class_item">
|
|
|
+ <image class="img" :src="$method.splitImgHost(item.coverUrl, true)"></image>
|
|
|
+ <view style="color: #333333;font-weight: bold;font-size: 32rpx;">
|
|
|
+ {{item.goodsName}}
|
|
|
+ </view>
|
|
|
+ <view class=".content_box">
|
|
|
+ <image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
|
|
|
+ 学习有效期:<text class="content"> {{$method.timestampToTime(item.studyStartTime)}} - {{$method.timestampToTime(item.studyEndTime)}} </text>
|
|
|
</view>
|
|
|
- <!-- </navigator> -->
|
|
|
- <view class="bottomBox">
|
|
|
- <view style="color: #999999;font-size: 24rpx;">刷题进度:{{item.doNum}}/{{item.totalNum}}</view>
|
|
|
- <view class="box_progress">
|
|
|
- <view style="width: 60%;">
|
|
|
- <u-line-progress :show-percent="false" height="22" active-color="#007AFF" :percent="(item.doNum/item.totalNum)*100"></u-line-progress>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <!-- <navigator hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId"> -->
|
|
|
- <view class="btn">进入刷题</view>
|
|
|
- <!-- </navigator> -->
|
|
|
- </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="bottomBox">
|
|
|
+ <view style="color: #999999;font-size: 24rpx;">刷题进度:{{item.doNum}}/{{item.totalNum}}</view>
|
|
|
+ <view class="box_progress">
|
|
|
+ <view style="width: 60%;">
|
|
|
+ <u-line-progress :show-percent="false" height="22" active-color="#007AFF" :percent="(item.doNum/item.totalNum)*100"></u-line-progress>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <!-- <navigator hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId"> -->
|
|
|
+ <view class="btn">进入刷题</view>
|
|
|
+ <!-- </navigator> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
- </navigator>
|
|
|
+ </view>
|
|
|
|
|
|
</view>
|
|
|
<view v-if="list.length==0">
|
|
@@ -42,29 +38,52 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- list:[]
|
|
|
-
|
|
|
+ list:[],
|
|
|
+ param:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
+ total:0,
|
|
|
+ itemIndex:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
this.listGoodsUserQuestion();
|
|
|
},
|
|
|
onShow(){
|
|
|
-
|
|
|
+ if(this.itemIndex !== '') {
|
|
|
+ this.refreshByIndex();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ onReachBottom() {
|
|
|
+ if (this.list.length < this.total) {
|
|
|
+ this.param.pageNum++;
|
|
|
+ this.listGoodsUserQuestion();
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
listGoodsUserQuestion() {
|
|
|
- this.$api.listGoodsUserQuestion({
|
|
|
-
|
|
|
- }).then(res => {
|
|
|
- this.list = res.data.rows;
|
|
|
+ this.$api.listGoodsUserQuestion(this.param).then(res => {
|
|
|
+ this.list = [...this.list,...res.data.rows];
|
|
|
+ this.total = res.data.total;
|
|
|
})
|
|
|
},
|
|
|
- studyIn(){
|
|
|
- this.$navTo.togo('/pages2/verify/input');
|
|
|
+ studyIn(item,index){
|
|
|
+ this.itemIndex = index;
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages2/bank/question_detail?id='+item.goodsId
|
|
|
+ })
|
|
|
},
|
|
|
- appointment(){
|
|
|
- this.$navTo.togo('/pages2/appointment/index');
|
|
|
+
|
|
|
+ refreshByIndex() {
|
|
|
+ console.log('refreshByIndex')
|
|
|
+ this.$api.listGoodsUserQuestion({
|
|
|
+ pageNum:this.itemIndex+1,
|
|
|
+ pageSize:1,
|
|
|
+ }).then(res => {
|
|
|
+ this.$set(this.list,this.itemIndex,res.data.rows[0])
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|