Commit db4fdd81 authored by zhengke's avatar zhengke

修改

parent 67568518
......@@ -126,7 +126,8 @@
props: {
paperData: Array,
Count: Number,
Times: Number
Times: Number,
StartIndex: Number
},
setup(props, context) {
let {
......@@ -148,6 +149,11 @@
watch(() => [...props.paperData], (val) => {
data.dataList = [...data.dataList, ...val];
})
watch(()=>props.StartIndex,(val)=>{
if(val>-1){
data.current=val;
}
})
watch(()=>data.current, (newVal, oldValue) => {
innerAudioContext.stop();
data.isPlay=false;
......
......@@ -124,7 +124,8 @@
props: {
paperData: Array,
Count: Number,
Times: Number
Times: Number,
StartIndex: Number
},
setup(props, context) {
let {
......@@ -143,6 +144,11 @@
})
data.dataList = [...data.dataList, ...val];
})
watch(()=>props.StartIndex,(val)=>{
if(val>-1){
data.current=val;
}
})
let methods = {
stopTouchMove(){
return true
......
......@@ -11,7 +11,7 @@
</template>
</van-nav-bar>
<swiper class="swiper-box" :style="{height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,}"
:current="current" @change="onchange">
:current="current" @change="onchange" :touchable="false">
<swiper-item v-for="(item1, index1) in dataList" :key="index1">
<view class="item1" :style="{height: `calc(100vh - 390rpx)`}">
<view class="flex flex_start_center">
......@@ -84,7 +84,8 @@
props: {
paperData: Array,
Count: Number,
Times: Number
Times: Number,
StartIndex: Number
},
setup(props, context) {
let {
......@@ -94,12 +95,18 @@
dataList: [],
current: 0, //默认从第几个开始-用于从快捷菜单点入
statusBarHeight: 0,
isDati: false
isDati: false,
// stopTouchMove:false
});
let UserInfo = uni.getStorageSync('userInfo');
watch(() => [...props.paperData], (val) => {
data.dataList = [...data.dataList, ...val];
})
watch(()=>props.StartIndex,(val)=>{
if(val>-1){
data.current=val;
}
})
let methods = {
goBack() {
uni.navigateBack();
......
......@@ -13,11 +13,11 @@
</div>
<view class="exam-con">
<!-- 单词 语法-->
<word :paperData="dataList" v-if="Type==1||Type==2" :Count="Count" :Times="Times" @getAfter="getAfter()" />
<word :paperData="dataList" v-if="Type==1||Type==2" :StartIndex="StartIndex" :Count="Count" :Times="Times" @getAfter="getAfter()" />
<!-- 听力 -->
<listen :paperData="dataList" v-if="Type==3" :Count="Count" :Times="Times" @getAfter="getAfter()" />
<listen :paperData="dataList" v-if="Type==3" :StartIndex="StartIndex" :Count="Count" :Times="Times" @getAfter="getAfter()" />
<!-- 阅读理解 -->
<readingCompre :paperData="dataList" v-if="Type==4" :Count="Count" :Times="Times" @getAfter="getAfter()" />
<readingCompre :paperData="dataList" v-if="Type==4" :StartIndex="StartIndex" :Count="Count" :Times="Times" @getAfter="getAfter()" />
</view>
</view>
</template>
......@@ -70,7 +70,7 @@
Times: 0,
loading: true,
StartId: 0,
StartIndex: ''
StartIndex: 0
});
let methods = {
//返回
......@@ -89,7 +89,7 @@
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){
if(this.dataList.length>=0){
this.loading=false;
}
}
......@@ -102,7 +102,7 @@
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){
if(this.dataList.length>=0){
this.loading=false;
}
}
......@@ -124,7 +124,7 @@
}
});
});
if(this.dataList.length>0){
if(this.dataList.length>=0){
this.loading=false;
}
this.StartIndex = this.dataList.findIndex(cItem => cItem.QuestionId == data.StartId);
......@@ -138,7 +138,7 @@
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.Count = res.Data.Count;
if(this.dataList.length>0){
if(this.dataList.length>=0){
this.loading=false;
}
this.StartIndex = this.dataList.findIndex(cItem => cItem.QuestionId == data.StartId);
......
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