Commit a6717728 authored by zhengke's avatar zhengke

修改

parent a8eec79b
......@@ -94,16 +94,13 @@
dataList: [],
current: 0, //默认从第几个开始-用于从快捷菜单点入
statusBarHeight: 0,
isDati: false,
isDati: false
});
let UserInfo = uni.getStorageSync('userInfo');
watch(() => [...props.paperData], (val) => {
data.dataList = [...data.dataList, ...val];
})
let methods = {
stopTouchMove(){
return true
},
goBack() {
uni.navigateBack();
},
......
......@@ -16,6 +16,9 @@
font-size:40rpx;
z-index: 999;
" :style="{ top: `calc(${statusBarHeight}px + 105rpx)` }" @click="showAnswerSheet"></i>
<div class="loading" v-if="loading">
<van-loading type="spinner" color="#fff" text-color="#fff" size="28rpx">题库加载中...</van-loading>
</div>
<swiper class="swiper-box" style="height:100vh" :current="current" @change="onchange">
<swiper-item v-for="(item, index) in dataList" :key="index" :data-index="index">
<singlenumber v-if="item.QuestionTypeKey=='single-number'||item.QuestionTypeKey=='single'"
......@@ -97,7 +100,8 @@
setMsg:{
Id:0
},
CommonType:-1
CommonType:-1,
loading:true
});
let UserInfo = uni.getStorageSync('userInfo');
......@@ -137,12 +141,11 @@
if (res.Code == 1) {
let TempData = res.Data.PageData;
data.dataList=TempData;
// if(data.msg.pageSize==20){
// data.dataList=TempData;
// }else{
// data.dataList = [...data.dataList, ...TempData];
// }
setTimeout(x=>{
if(data.dataList.length>0){
data.loading=false;
}
},2000)
data.Count = res.Data.Count;
}
}
......@@ -196,7 +199,7 @@
...methods,
};
},
async onLoad(options) {
async onLoad(options) {
if (options && options.BankId) {
this.msg.BankId = options.BankId;
this.startMsg.BankId = options.BankId;
......@@ -209,20 +212,10 @@
this.msg.StudentId='';
this.isShowJx=false;
this.getList();
// let _that = this;
// setTimeout(function(){
// console.log('111');
// _that.msg.pageSize=1000;
// _that.getList();
// },2000)
}
if(options.Type==2){
this.isShowJx=true;
this.getList();
// setTimeout(function(){
// this.msg.pageSize=1000;
// this.getList();
// },2000)
}
//3 4 5 6从错题跳过来
if(options.Type==3){
......@@ -268,4 +261,16 @@
color: gray;
font-size: 26rpx;
}
.loading {
position: fixed;
z-index: 9999;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
}
</style>
......@@ -8,6 +8,9 @@
<template #title>
</template>
</van-nav-bar>
<div class="loading" v-if="loading">
<van-loading type="spinner" color="#fff" text-color="#fff" size="28rpx">题库加载中...</van-loading>
</div>
<view class="exam-con">
<!-- 单词 语法-->
<word :paperData="dataList" v-if="Type==1||Type==2" :Count="Count" :Times="Times" @getAfter="getAfter()" />
......@@ -60,12 +63,14 @@
examMsg: {
PageIndex: 1,
PageSize: 20,
BankType: 1,
StartId: 0
BankType: 1
},
Count: 0, //题目总数
Type: 1, //1单词 2语法 3听力 4阅读
Times: 0
Times: 0,
loading: true,
StartId: 0,
StartIndex: ''
});
let methods = {
//返回
......@@ -83,6 +88,10 @@
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.Count = res.Data.Count;
this.StartIndex = this.dataList.findIndex(cItem => cItem.QuestionId == data.StartId);
if(this.dataList.length>0){
this.loading=false;
}
}
});
},
......@@ -92,6 +101,10 @@
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.Count = res.Data.Count;
this.StartIndex = this.dataList.findIndex(cItem => cItem.QuestionId == data.StartId);
if(this.dataList.length>0){
this.loading=false;
}
}
});
},
......@@ -111,6 +124,10 @@
}
});
});
if(this.dataList.length>0){
this.loading=false;
}
this.StartIndex = this.dataList.findIndex(cItem => cItem.QuestionId == data.StartId);
this.Count = res.Data.Count;
}
});
......@@ -119,9 +136,12 @@
GetMyQuestionReading() {
let res = GetQuestionReading(data.examMsg).then(res => {
if (res.Code == 1) {
console.log(res, '数据');
this.dataList = res.Data.PageData;
this.Count = res.Data.Count;
if(this.dataList.length>0){
this.loading=false;
}
this.StartIndex = this.dataList.findIndex(cItem => cItem.QuestionId == data.StartId);
}
});
},
......@@ -159,7 +179,7 @@
this.examMsg.BankType = options.BankType;
}
if (options && options.StartId) {
this.examMsg.StartId = options.StartId;
this.StartId = options.StartId;
}
if (options && options.Times){
this.Times = options.Times;
......@@ -194,4 +214,16 @@
margin-left: 30rpx;
color: #000;
}
.loading {
position: fixed;
z-index: 9999;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
}
</style>
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