123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <template>
- <view>
-
- <!-- 设置圆角 -->
- <view style="padding: 10px 30px 10px 30px;">
- <uni-search-bar :radius="100" @input="search" placeholder="搜题库"></uni-search-bar>
- </view>
-
-
- <yf-more-list url="/api/repo/user-paging" :params="queryParams" ref="moreList">
- <template v-slot:item="{ data }">
-
- <uni-list-item
- :show-arrow="true"
- :title="data.title"
- :note="data.quCount+'道题'"
- link="navigateTo"
- :to="'/pages/repo/detail?id='+data.id"
- >
- </uni-list-item>
-
- </template>
- </yf-more-list>
- </view>
- </template>
- <script>
- import { checkProcess } from '@/api/repo/repo'
- export default {
- components: { },
- data() {
- return {
-
- queryParams:{
- isTran: true,
- title: ''
- },
- trainData: {}
- }
- },
-
- onPullDownRefresh(){
- this.$refs.moreList.initData()
- },
-
- onReachBottom() {
- // 加载数据
- this.$refs.moreList.loadData()
- },
- onShow() {
- if(this.$refs.moreList){
- this.$refs.moreList.initData()
- }
- this.checkRepo()
- },
-
- methods: {
-
- checkRepo(){
-
- checkProcess().then(data => {
- if(data!=null && data.id!=null){
-
- uni.showModal({
- cancelText: "取消", // 取消按钮的文字
- confirmText: "确认", // 确认按钮文字
- title: '删除提示',
- content: '是否要继续上一次的训练?',
- success: res => {
- if (res.confirm) {
- this.conTrain(data)
- }
- }
- });
- }
- })
- },
- search(e) {
- this.queryParams.title = e
- },
-
- conTrain(data) {
- uni.navigateTo({
- url: '/pages/repo/train?repoId='+data.repoId+'&mode='+data.mode
- });
- }
- }
- }
- </script>
- <style>
-
- .container {
- font-size: 14rpx;
- }
-
- .exam-item{
- display: flex; align-items: center;
- line-height: 25px;
- }
- .exam-item .left{
- width: 80%; text-align: left;
- }
- .exam-item .left .title{
- font-size: 14px;
- }
-
- .exam-item .left .desc{
- font-size: 14px;
- color: #888;
- }
-
- .exam-item .left .icons{
- font-size: 10px;
- display: flex;
- align-items: center;
- color: #666;
- }
-
- .exam-item .right{
- width: 20%; text-align: right;
- }
- </style>
|