| | |
| | | </view> |
| | | <!-- 页面内容 --> |
| | | <view class="m-p-15"> |
| | | <view class="cardList"> |
| | | <view class="cardList" v-if="quizList && quizList.length>0"> |
| | | <scroll-view scroll-y="true" class="scroll-Y" @scrolltoupper="upper" |
| | | @scrolltolower="lower" lower-threshold="150" @scroll="scrollView" style="height:100%"> |
| | | <view style="padding: 20px 0 20px"> |
| | | <view class="card-i" v-for="(item,index) in quizList" :key="index"> |
| | | <view class="card-i-l"> |
| | | <view>{{item.name}}</view> |
| | |
| | | <u-button class="study-button" text="重置" shape="circle" size="small" @click="reSet(item.id)"></u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <u-empty style="margin-top: 80px" v-else text="暂无记录" mode="data"></u-empty> |
| | | </view> |
| | | <tabBar :currentPagePath="page"></tabBar> |
| | | </view> |
| | |
| | | onShow() { |
| | | // this.role = uni.getStorageSync('roleName'); |
| | | }, |
| | | created(){ |
| | | uni.hideTabBar() |
| | | }, |
| | | mounted(){ |
| | | |
| | | }, |
| | |
| | | url:'/pages/tabBar/firstPage/firstPage' |
| | | }); |
| | | }, |
| | | |
| | | getQuizList(){ |
| | | const t = this |
| | | getQuizHouse(t.classParams).then(res => { |
| | | if(res.code == 200) { |
| | | let list = res.data.list?res.data.list: []; |
| | | if (res.pageNum != 1) { |
| | | if (res.data.pageNum != 1) { |
| | | t.quizList = t.quizList.concat(list) |
| | | } else { |
| | | t.quizList = list |
| | |
| | | }); |
| | | return |
| | | } |
| | | if(type == 2 && item.totalCount == item.exerciseCount){ |
| | | uni.showToast({ |
| | | title: '该题库所有题目已刷完', |
| | | duration: 1000 |
| | | }); |
| | | return |
| | | } |
| | | // if(type == 2 && item.totalCount == item.exerciseCount){ |
| | | // uni.showToast({ |
| | | // title: '该题库所有题目已刷完', |
| | | // duration: 1000 |
| | | // }); |
| | | // return |
| | | // } |
| | | uni.setStorageSync("prevPage", '/pages/tabBar/wearhouse/wearhouse'); |
| | | uni.navigateTo({ |
| | | url: `/pages/tabBar/wearhouse/questions?bank=` + encodeURIComponent(JSON.stringify(item)) + `&type=` + encodeURIComponent(JSON.stringify(type)) |
| | |
| | | } |
| | | .cardList{ |
| | | width: 100%; |
| | | height: calc(100vh - 160px); |
| | | margin: 20px 0; |
| | | height: calc(100vh - 130px); |
| | | box-sizing: border-box; |
| | | |
| | | .card-i{ |
| | | width: calc(100% - 30px); |