|
|
@ -1,9 +1,13 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view v-if="getLoading" class="wp100 relative" style="height: 100vh;"> |
|
|
|
<view v-if="getLoading" class="wp100 relative" style="height: 100vh;"> |
|
|
|
<image class="wp100" mode="widthFix" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E8%80%83%E8%AF%95%E6%8F%90%E9%86%92_20230906135037.png"></image> |
|
|
|
<image class="wp100" mode="widthFix" |
|
|
|
|
|
|
|
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E8%80%83%E8%AF%95%E6%8F%90%E9%86%92_20230906135037.png"> |
|
|
|
|
|
|
|
</image> |
|
|
|
<view class="wp100 flex ai-c jc-c" style="position: absolute;bottom: 0;left: 0;padding-bottom: 124rpx;"> |
|
|
|
<view class="wp100 flex ai-c jc-c" style="position: absolute;bottom: 0;left: 0;padding-bottom: 124rpx;"> |
|
|
|
<image style="width: 452rpx;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%87%91%E6%AD%A6%E8%81%94_20230831123333.png" mode="widthFix"></image> |
|
|
|
<image style="width: 452rpx;" |
|
|
|
|
|
|
|
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%87%91%E6%AD%A6%E8%81%94_20230831123333.png" |
|
|
|
|
|
|
|
mode="widthFix"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="!getLoading"> |
|
|
|
<view v-if="!getLoading"> |
|
|
@ -11,8 +15,8 @@ |
|
|
|
<u-sticky bgColor="#fff"> |
|
|
|
<u-sticky bgColor="#fff"> |
|
|
|
<u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs> |
|
|
|
<u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs> |
|
|
|
</u-sticky> |
|
|
|
</u-sticky> |
|
|
|
<view class="m10tb"> |
|
|
|
<view class="m10tb" v-if="activityList&&activityList.length"> |
|
|
|
<u-swiper :list="activityList" @click="handleToActivity"></u-swiper> |
|
|
|
<u-swiper class="acticity" keyName="image" :list="activityList" @click="handleToActivity"></u-swiper> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="background-color: rgb(245, 245, 245);"> |
|
|
|
<view style="background-color: rgb(245, 245, 245);"> |
|
|
|
<template v-if="subject=='1' || subject=='4'"> |
|
|
|
<template v-if="subject=='1' || subject=='4'"> |
|
|
@ -31,12 +35,16 @@ |
|
|
|
mapActions |
|
|
|
mapActions |
|
|
|
} from 'pinia' //引入映射函数 |
|
|
|
} from 'pinia' //引入映射函数 |
|
|
|
import useQuestionStore from '@/jtools/store/question' //引入store |
|
|
|
import useQuestionStore from '@/jtools/store/question' //引入store |
|
|
|
|
|
|
|
import useUserStore from '@/jtools/store/user' |
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
import { |
|
|
|
import { |
|
|
|
querySysConfigList, |
|
|
|
querySysConfigList, |
|
|
|
} from '@/jtools/api/question'; |
|
|
|
} from '@/jtools/api/question'; |
|
|
|
import Subject1 from "./components/Subject1"; |
|
|
|
import Subject1 from "./components/Subject1"; |
|
|
|
import Subject2 from "./components/Subject2"; |
|
|
|
import Subject2 from "./components/Subject2"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
queryActivityList |
|
|
|
|
|
|
|
} from '@/jtools/api/activity'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
Subject1, |
|
|
|
Subject1, |
|
|
@ -44,7 +52,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
show:false, |
|
|
|
show: false, |
|
|
|
subject: storage.get('curSubject') || '1', |
|
|
|
subject: storage.get('curSubject') || '1', |
|
|
|
curTab: 0, |
|
|
|
curTab: 0, |
|
|
|
searchValue: '', |
|
|
|
searchValue: '', |
|
|
@ -52,37 +60,40 @@ |
|
|
|
categoryList: [], |
|
|
|
categoryList: [], |
|
|
|
rightList: storage.get(`rightList_subject${this.subject}`) || [], |
|
|
|
rightList: storage.get(`rightList_subject${this.subject}`) || [], |
|
|
|
wrongList: storage.get(`wrongList_subject${this.subject}`) || [], |
|
|
|
wrongList: storage.get(`wrongList_subject${this.subject}`) || [], |
|
|
|
activityList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'] |
|
|
|
activityList: [] |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.show=true |
|
|
|
this.show = true |
|
|
|
this.getSubjectConfig() |
|
|
|
this.getSubjectConfig() |
|
|
|
if (this.subject == '1' || this.subject == '4') { |
|
|
|
if (this.subject == '1' || this.subject == '4') { |
|
|
|
this.rightList = storage.get(`rightList_subject${this.subject}`) || [] |
|
|
|
this.rightList = storage.get(`rightList_subject${this.subject}`) || [] |
|
|
|
this.wrongList = storage.get(`wrongList_subject${this.subject}`) || [] |
|
|
|
this.wrongList = storage.get(`wrongList_subject${this.subject}`) || [] |
|
|
|
} |
|
|
|
} |
|
|
|
if(this.subject=='2'||this.subject=='3'){ |
|
|
|
if (this.subject == '2' || this.subject == '3') { |
|
|
|
this.$refs.subjectRef.getDiverType() |
|
|
|
this.$refs.subjectRef.getDiverType() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.queryActivityList() |
|
|
|
}, |
|
|
|
}, |
|
|
|
onHide(){ |
|
|
|
onHide() { |
|
|
|
this.show=false |
|
|
|
this.show = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1","curSubject","orderQuestion_subject1","orderQuestion_subject4"]), //映射函数,取出tagslist |
|
|
|
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "curSubject", "orderQuestion_subject1", |
|
|
|
|
|
|
|
"orderQuestion_subject4" |
|
|
|
|
|
|
|
]), //映射函数,取出tagslist |
|
|
|
getLoading() { |
|
|
|
getLoading() { |
|
|
|
return this.loading_subject4 && this.loading_subject1 |
|
|
|
return this.loading_subject4 && this.loading_subject1 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
watch: { |
|
|
|
getLoading(newVal){ |
|
|
|
getLoading(newVal) { |
|
|
|
if(this.show){ |
|
|
|
if (this.show) { |
|
|
|
if(newVal){ |
|
|
|
if (newVal) { |
|
|
|
if(this.loading_subject4 && this.loading_subject1){ |
|
|
|
if (this.loading_subject4 && this.loading_subject1) { |
|
|
|
uni.hideTabBar(); |
|
|
|
uni.hideTabBar(); |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
uni.showTabBar() |
|
|
|
uni.showTabBar() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -101,8 +112,8 @@ |
|
|
|
name: item.configItemName |
|
|
|
name: item.configItemName |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.subject=storage.get('curSubject') || '1', |
|
|
|
this.subject = storage.get('curSubject') || '1', |
|
|
|
this.curTab=this.categoryList.findIndex(item=>item.configItemCode==this.subject) |
|
|
|
this.curTab = this.categoryList.findIndex(item => item.configItemCode == this.subject) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -119,10 +130,27 @@ |
|
|
|
}, 100) |
|
|
|
}, 100) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//查询活动列表 |
|
|
|
|
|
|
|
queryActivityList() { |
|
|
|
|
|
|
|
queryActivityList({ |
|
|
|
|
|
|
|
schoolId: useUserStore().userInfo?.schoolId || '' |
|
|
|
|
|
|
|
}).then(resp => { |
|
|
|
|
|
|
|
this.activityList = resp.data.map(item => ({ |
|
|
|
|
|
|
|
...item, |
|
|
|
|
|
|
|
image: 'https://jwl.ahduima.com' + item.image |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 去活动 |
|
|
|
// 去活动 |
|
|
|
handleToActivity(index) { |
|
|
|
handleToActivity(index) { |
|
|
|
|
|
|
|
let detailId; |
|
|
|
|
|
|
|
this.activityList.find((item, index1) => { |
|
|
|
|
|
|
|
if (index === index1) { |
|
|
|
|
|
|
|
detailId = item.detailId; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/activity' |
|
|
|
url: '/pages/index/activity?detailId=' + detailId, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|