31 44
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
<u-tabs :list="tabs" font-size="32" bg-color="#f3f5f7" inactive-color="#999999"
|
<u-tabs :list="tabs" font-size="32" bg-color="#f3f5f7" inactive-color="#999999"
|
||||||
:active-item-style="{color: '#222222'}" :is-scroll="true" :current="currIndex" @change="(i) => (currIndex = i)"> </u-tabs>
|
:active-item-style="{color: '#222222'}" :is-scroll="true" :current="currIndex" @change="(i) => (currIndex = i)"> </u-tabs>
|
||||||
</div>
|
</div>
|
||||||
<OnlineClass ref="OnlineClass" @toDetail="toDetail" v-show="currIndex == 0"></OnlineClass>
|
<OnlineClass ref="OnlineClass" :height="height" @toDetail="toDetail" v-show="currIndex == 0"></OnlineClass>
|
||||||
<GeneralLawExam ref="GeneralLawExam" @toTest="toTest" v-show="currIndex == 1"></GeneralLawExam>
|
<GeneralLawExam ref="GeneralLawExam" :height="height" @toTest="toTest" v-show="currIndex == 1"></GeneralLawExam>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ export default {
|
|||||||
customNavigation: true,
|
customNavigation: true,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currIndex: 0,
|
currIndex: 1,
|
||||||
tabs: [
|
tabs: [
|
||||||
{
|
{
|
||||||
name: '在线课堂',
|
name: '在线课堂',
|
||||||
@@ -28,6 +28,8 @@ export default {
|
|||||||
name: '普法考试',
|
name: '普法考试',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
screenHeight: 0,
|
||||||
|
height: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -37,6 +39,11 @@ export default {
|
|||||||
this.$refs.GeneralLawExam.getList();
|
this.$refs.GeneralLawExam.getList();
|
||||||
this.$refs.GeneralLawExam.getUserInfo()
|
this.$refs.GeneralLawExam.getUserInfo()
|
||||||
}
|
}
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (res)=> {
|
||||||
|
this.screenHeight = res.screenHeight
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
OnlineClass,
|
OnlineClass,
|
||||||
@@ -52,6 +59,11 @@ export default {
|
|||||||
this.$refs.GeneralLawExam.getUserInfo()
|
this.$refs.GeneralLawExam.getUserInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
screenHeight(v) {
|
||||||
|
if(v) {
|
||||||
|
this.height = this.screenHeight - 230
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="classDetail">
|
<div class="classDetail">
|
||||||
<u-navbar title="在线课堂" background="#f4f6fa"></u-navbar>
|
<u-navbar title="在线课堂" background="#fff"></u-navbar>
|
||||||
|
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<img :src="data.pictureUrl" alt="" v-if="data.courseType == 0">
|
<img :src="data.pictureUrl" alt="" v-if="data.courseType == 0">
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
:show-action="false" @search="getList" @clear="title='',getList()"></u-search>
|
:show-action="false" @search="getList" @clear="title='',getList()"></u-search>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="all_test">全部考试</p>
|
<p class="all_test">全部考试{{height}}</p>
|
||||||
<div class="card_list" v-if="testList.length">
|
<div class="card_list" v-if="testList.length">
|
||||||
<scroll-view class="scroll_box" scroll-y>
|
<scroll-view :style="{height: height + 'px'}" scroll-y>
|
||||||
<div class="card" v-for="item in testList" :key="item.id">
|
<div class="card" v-for="item in testList" :key="item.id">
|
||||||
<div class="card_top">
|
<div class="card_top">
|
||||||
<div class="card_title">{{ item.examinationName }}</div>
|
<div class="card_title">{{ item.examinationName }}</div>
|
||||||
@@ -62,6 +62,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex"
|
import { mapState } from "vuex"
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
height: Number,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showAuth: false,
|
showAuth: false,
|
||||||
@@ -76,7 +79,6 @@ export default {
|
|||||||
flag: false,
|
flag: false,
|
||||||
current: 1,
|
current: 1,
|
||||||
testList: [],
|
testList: [],
|
||||||
height: '',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -172,10 +174,6 @@ export default {
|
|||||||
padding: 8px 32px;
|
padding: 8px 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.scroll_box {
|
|
||||||
height: calc(100% - 230px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
.card_top,
|
.card_top,
|
||||||
|
|||||||
@@ -7,18 +7,20 @@
|
|||||||
<p class="all_class">全部课程</p>
|
<p class="all_class">全部课程</p>
|
||||||
|
|
||||||
<div class="card_list" v-if="classList.length">
|
<div class="card_list" v-if="classList.length">
|
||||||
<div class="card" v-for="item in classList" :key="item.id" @click="handleToDetail(item.id)">
|
<scroll-view :style="{height: height + 'px'}" scroll-y>
|
||||||
<div class="card_left">
|
<div class="card" v-for="item in classList" :key="item.id" @click="handleToDetail(item.id)">
|
||||||
<img :src="item.pictureUrl" alt="">
|
<div class="card_left">
|
||||||
</div>
|
<img :src="item.pictureUrl" alt="">
|
||||||
<div class="card_right">
|
</div>
|
||||||
<div class="title">{{ item.title }}</div>
|
<div class="card_right">
|
||||||
<div class="num">
|
<div class="title">{{ item.title }}</div>
|
||||||
<div>{{ item.learnerNumber }}人已学习</div>
|
<div class="num">
|
||||||
<div v-if="item.videoDuration">视频时长{{ item.videoDuration }}</div>
|
<div>{{ item.learnerNumber }}人已学习</div>
|
||||||
|
<div v-if="item.videoDuration">视频时长{{ item.videoDuration }}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</scroll-view>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty :description="`暂无数据`" class="emptyWrap" v-else/>
|
<AiEmpty :description="`暂无数据`" class="emptyWrap" v-else/>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,6 +28,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
height: Number,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
current: 1,
|
current: 1,
|
||||||
@@ -33,10 +38,6 @@ export default {
|
|||||||
classList: [],
|
classList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.$instance.post(`/app/appcourseinfo/listByApplet`, null, {
|
this.$instance.post(`/app/appcourseinfo/listByApplet`, null, {
|
||||||
|
|||||||
@@ -9,26 +9,22 @@
|
|||||||
<div><span class="col_blue">{{ activeIndex + 1 }}</span>/{{ list.length }}</div>
|
<div><span class="col_blue">{{ activeIndex + 1 }}</span>/{{ list.length }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic">
|
<div class="topic">
|
||||||
<div>
|
<!-- 题目 -->
|
||||||
<div >
|
<div>{{ item.title }}</div>
|
||||||
<!-- 题目 -->
|
<!-- 单选,判断 -->
|
||||||
<div>{{ item.title }}</div>
|
<div class="answer_list" v-if="item.type==0 || item.type==2">
|
||||||
<!-- 单选,判断 -->
|
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
||||||
<div class="answer_list" v-if="item.type==0 || item.type==2">
|
:class="{'Checked': clickIndex === inx, 'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && clickIndex === inx && opt.checked == 0}"
|
||||||
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
@click="itemClick(inx)">
|
||||||
:class="{'Checked': clickIndex === inx, 'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && clickIndex === inx && opt.checked == 0}"
|
{{ opt.sort }}: {{ opt.content}}
|
||||||
@click="itemClick(inx)">
|
</div>
|
||||||
{{ opt.sort }}: {{ opt.content}}
|
</div>
|
||||||
</div>
|
<!-- 多选 -->
|
||||||
</div>
|
<div class="answer_list" v-if="item.type==1">
|
||||||
<!-- 多选 -->
|
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
||||||
<div class="answer_list" v-if="item.type==1">
|
:class="{'Checked': opt.isChecked,'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && opt.isChecked && opt.checked == 0}"
|
||||||
<div class="answer_item" v-for="(opt,inx) in item.items" :key="inx"
|
@click="itemClick(inx)">
|
||||||
:class="{'Checked': opt.isChecked,'Succeed': showAnalysis && opt.checked == 1, 'Error': showAnalysis && opt.isChecked && opt.checked == 0}"
|
{{ opt.sort }}: {{ opt.content}}
|
||||||
@click="itemClick(inx)">
|
|
||||||
{{ opt.sort }}: {{ opt.content}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,11 +38,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn" @click="nextTopic" v-if="activeIndex < list.length - 1 && showNext">下一题</div>
|
<div class="btn" @click="nextTopic" v-if="activeIndex < list.length - 1 && showNext">下一题</div>
|
||||||
<div class="btn" v-show="showConfirm" @click="confirm">确定</div>
|
<div class="btn" v-show="showConfirm" @click="confirm">确定</div>
|
||||||
<div class="btn" v-show="showTiJiao" @click="submit">提交</div>
|
<div class="btn" v-show="showTiJiao" @click="submit">提交</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user