合并冲突
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
>
|
||||
按住说话
|
||||
</uv-button>
|
||||
|
||||
|
||||
<uv-input
|
||||
v-if="keyboardIsShow"
|
||||
class="input-box"
|
||||
@@ -146,15 +144,20 @@
|
||||
console.log('延迟开始');
|
||||
recordingStatus.value = 'preparing';
|
||||
popupRef.value.open();
|
||||
recorderManager.start();
|
||||
}, 80);
|
||||
|
||||
recorderManager.start({duration:6000});
|
||||
startTime = Date.now();
|
||||
setInterval(() => {
|
||||
const endTime = Date.now();
|
||||
const recordDuration = (endTime - startTime) / 1000;
|
||||
console.log('当前录音时间1', recordDuration);
|
||||
})
|
||||
}, 1000);
|
||||
};
|
||||
// 结束录音
|
||||
const stopRecord = () => {
|
||||
if(props.isDisabled) return;
|
||||
|
||||
console.log('结束录音');
|
||||
|
||||
console.log('结束录音嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻');
|
||||
if (startTimer.value) {
|
||||
clearTimeout(startTimer.value);
|
||||
startTimer.value = null;
|
||||
@@ -193,7 +196,9 @@
|
||||
if (recordingStatus.value !== 'preparing') {
|
||||
stopRecord();
|
||||
}
|
||||
|
||||
startTime = Date.now();
|
||||
|
||||
recordingStatus.value = 'in_recording';
|
||||
});
|
||||
// #endif
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
}
|
||||
|
||||
|
||||
.nav-bar-div {
|
||||
z-index: 1900;
|
||||
width: 100%;
|
||||
|
||||
+213
-232
@@ -5,21 +5,28 @@
|
||||
<view class="course-center-body">
|
||||
<view class="body-title">
|
||||
<!-- @click="test.testApi" -->
|
||||
<uv-icon class="arrow-icon" name="arrow-left" @click="common.switchTab('/pages/index/index')" />
|
||||
<uv-icon class="arrow-icon" name="arrow-left" @click="common.switchTab('/pages/index/index')"/>
|
||||
AI学习
|
||||
</view>
|
||||
<view class="input-view" @click="toSearchPage">
|
||||
<uv-input shape="circle" placeholderStyle='color:#999999;font-size:28rpx' placeholder="请输入课程名"
|
||||
suffixIcon="search" :customStyle="customStyle" :suffixIconStyle="suffixIconStyle" :readonly="true">
|
||||
<view class="input-view" @click="toSearchPage">
|
||||
<uv-input shape="circle"
|
||||
placeholderStyle='color:#999999;font-size:28rpx'
|
||||
placeholder="请输入课程名"
|
||||
suffixIcon="search"
|
||||
:customStyle="customStyle"
|
||||
:suffixIconStyle="suffixIconStyle"
|
||||
:readonly="true">
|
||||
</uv-input>
|
||||
</view>
|
||||
<view class="tabs-view">
|
||||
<uv-tabs :list="tabList" @click="changeTab" :scrollable="false" active-style="font-weight:bold; color:#000;"
|
||||
line-color="#06f"></uv-tabs>
|
||||
<uv-tabs :list="tabList" @click="changeTab" :scrollable="false"
|
||||
active-style="font-weight:bold; color:#000;"
|
||||
line-color="#06f"
|
||||
></uv-tabs>
|
||||
</view>
|
||||
<view class="list-view">
|
||||
<view class="filter-btn" @click="()=>{showFilterList = !showFilterList; activeTagPop = activeTag}">筛选
|
||||
<uv-icon class="filter-icon" name="list" />
|
||||
<uv-icon class="filter-icon" name="list"/>
|
||||
</view>
|
||||
<view :class="['filter-list',showFilterList?'show':'']">
|
||||
<scroll-view :scroll-y="true" class="scroll-box-tags">
|
||||
@@ -27,8 +34,7 @@
|
||||
<!-- .filter(t=>(t.children||[]).length>0) -->
|
||||
<view class="filter-type-title">{{item.label}}</view>
|
||||
<scroll-view :scroll-x="true" class="filter-type-list">
|
||||
<view :class="['filter-type-item', activeTagPop.includes(itemT.value)?'is-active':'']"
|
||||
v-for="itemT in (item.children||[])" @click="chooseTagPop(itemT)">
|
||||
<view :class="['filter-type-item', activeTagPop.includes(itemT.value)?'is-active':'']" v-for="itemT in (item.children||[])" @click="chooseTagPop(itemT)">
|
||||
{{itemT.label}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -40,41 +46,70 @@
|
||||
</view>
|
||||
</view>
|
||||
<uv-scroll-list class="tags-view" :indicator="false">
|
||||
<uv-tags text="全部" shape="circle" plain class="tags-item" size="mini"
|
||||
:type="activeTag.length === 0?'primary':'info'" @click="chooseTag({value:''})"></uv-tags>
|
||||
<uv-tags :text="item.label" v-for="item in tagsList" :key="item.value" shape="circle" plain
|
||||
:type="activeTag.includes(item.value)?'primary':'info'" @click="chooseTag(item)" class="tags-item"
|
||||
size="mini"></uv-tags>
|
||||
<uv-tags text="全部"
|
||||
shape="circle"
|
||||
plain
|
||||
class="tags-item"
|
||||
size="mini"
|
||||
:type="activeTag.length === 0?'primary':'info'"
|
||||
@click="chooseTag({value:''})"
|
||||
></uv-tags>
|
||||
<uv-tags :text="item.label"
|
||||
v-for="item in tagsList"
|
||||
:key="item.value"
|
||||
shape="circle"
|
||||
plain
|
||||
:type="activeTag.includes(item.value)?'primary':'info'"
|
||||
@click="chooseTag(item)"
|
||||
class="tags-item" size="mini"
|
||||
></uv-tags>
|
||||
</uv-scroll-list>
|
||||
<view class="course-list">
|
||||
<view class="left-type-list" v-if="'全部' === activeTab">
|
||||
<view v-for="item in courseTypeList" :key="item.value"
|
||||
:class="['type-item',activeCourseType == item.value ?'is-active':'']" @click="changeCourseType(item)">
|
||||
<view
|
||||
v-for="item in courseTypeList"
|
||||
:key="item.value"
|
||||
:class="['type-item',activeCourseType == item.value ?'is-active':'']"
|
||||
@click="changeCourseType(item)"
|
||||
>
|
||||
{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="left-type-list" v-if="'生产线'===activeTab">
|
||||
<view v-for="item in coursePrdlineList" :key="item.value"
|
||||
:class="['type-item', activePrdlineType == item.value ?'is-active':'']" @click="changePrdLine(item)">
|
||||
<view
|
||||
v-for="item in coursePrdlineList"
|
||||
:key="item.value"
|
||||
:class="['type-item', activePrdlineType == item.value ?'is-active':'']"
|
||||
@click="changePrdLine(item)"
|
||||
>
|
||||
{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-course-list">
|
||||
<view class="type-list" v-for="item in courseListTreeShow" :key="item.value">
|
||||
<view class="type-title" v-if="item.courseList.length > 0 && showTypeName">
|
||||
<view
|
||||
class="type-list"
|
||||
v-for="item in courseListTreeShow"
|
||||
:key="item.value"
|
||||
>
|
||||
<view
|
||||
class="type-title"
|
||||
v-if="item.courseList.length > 0 && showTypeName"
|
||||
>
|
||||
<!-- v-if="itemT.courseList.length>0 && " -->
|
||||
<view class="left-color"></view>
|
||||
{{item.label}}
|
||||
</view>
|
||||
<CourseItem v-for="itemC in item.courseList" :key="itemC.crsNum" :itemInfo="itemC" :activeTag="activeTag"
|
||||
@clickItem="toCourseDetail(itemC)" />
|
||||
<view class="type-list" v-for="itemT in item.children" :key="itemT.value">
|
||||
<CourseItem v-for="itemC in item.courseList" :key="itemC.crsNum" :itemInfo="itemC" :activeTag="activeTag" @clickItem="toCourseDetail(itemC)"/>
|
||||
<view
|
||||
class="type-list"
|
||||
v-for="itemT in item.children"
|
||||
:key="itemT.value"
|
||||
>
|
||||
<view class="type-title" v-if="itemT.courseList.length>0">
|
||||
<view class="left-color"></view>
|
||||
{{itemT.label}}
|
||||
{{itemT.label}}
|
||||
</view>
|
||||
<CourseItem v-for="itemTC in itemT.courseList" :key="itemTC.crsNum" :activeTag="activeTag"
|
||||
:itemInfo="itemTC" @clickItem="toCourseDetail(itemTC)" />
|
||||
<CourseItem v-for="itemTC in itemT.courseList" :key="itemTC.crsNum" :activeTag="activeTag" :itemInfo="itemTC" @clickItem="toCourseDetail(itemTC)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -85,58 +120,42 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import CourseItem from "@/components/course-item/course-item.vue"
|
||||
import common from '@/common/common'
|
||||
import {
|
||||
getPrdLineTypeListApi,
|
||||
getTraTagListApi,
|
||||
getCourseTypeListApi,
|
||||
queryCrsInfoByCatalogApi,
|
||||
queryCrsInfoByPrdLineApi,
|
||||
queryCrsInfoByLastnewApi,
|
||||
queryCrsInfoByPopularApi,
|
||||
queryCrsInfoByRecmdApi
|
||||
} from "@/api/course.js"
|
||||
import {
|
||||
onMounted,
|
||||
onActivated,
|
||||
ref,
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
onShow
|
||||
} from "@dcloudio/uni-app"
|
||||
import CourseItem from "@/components/course-item/course-item.vue"
|
||||
import common from '@/common/common'
|
||||
import {
|
||||
getPrdLineTypeListApi,
|
||||
getTraTagListApi,
|
||||
getCourseTypeListApi,
|
||||
queryCrsInfoByCatalogApi,
|
||||
queryCrsInfoByPrdLineApi,
|
||||
queryCrsInfoByLastnewApi,
|
||||
queryCrsInfoByPopularApi,
|
||||
queryCrsInfoByRecmdApi
|
||||
} from "@/api/course.js"
|
||||
import { onMounted, onActivated, ref, computed } from 'vue'
|
||||
import { onShow } from "@dcloudio/uni-app"
|
||||
const customStyle = {
|
||||
backgroundColor: "#ffffff",
|
||||
paddingLeft: "40rpx",
|
||||
height: '60rpx',
|
||||
height:'60rpx',
|
||||
paddingTop: "5px",
|
||||
paddingBottom: "5px",
|
||||
border: "none"
|
||||
}
|
||||
}
|
||||
const suffixIconStyle = {
|
||||
color: "#2c8ef2",
|
||||
fontSize: "40rpx"
|
||||
}
|
||||
const tabsCustomStyle = {
|
||||
const tabsCustomStyle ={
|
||||
backgroundColor: "#ffffff",
|
||||
borderRadius: '23rpx',
|
||||
}
|
||||
const tabList = [{
|
||||
name: '全部'
|
||||
},
|
||||
{
|
||||
name: '热门'
|
||||
},
|
||||
{
|
||||
name: '最新'
|
||||
},
|
||||
{
|
||||
name: '推荐'
|
||||
},
|
||||
{
|
||||
name: '生产线'
|
||||
},
|
||||
const tabList = [
|
||||
{ name:'全部'},
|
||||
{ name:'热门'},
|
||||
{ name:'最新'},
|
||||
{ name:'推荐'},
|
||||
{ name:'生产线'},
|
||||
]
|
||||
const activeTab = ref('全部')
|
||||
const activeCourseType = ref('')
|
||||
@@ -145,79 +164,78 @@
|
||||
const courseTypeList = ref([])
|
||||
const coursePrdlineList = ref([])
|
||||
const tagsTree = ref([])
|
||||
|
||||
|
||||
const showFilterList = ref(false)
|
||||
const {
|
||||
statusBarHeight
|
||||
} = uni.getWindowInfo()
|
||||
|
||||
|
||||
const pageTopPadding = computed(() => statusBarHeight + 'px')
|
||||
|
||||
|
||||
const activeTagPop = ref([])
|
||||
|
||||
|
||||
const chooseTagPop = (item) => {
|
||||
if (!item.value) {
|
||||
if(!item.value){
|
||||
activeTagPop.value = []
|
||||
return
|
||||
}
|
||||
activeTagPop.value = activeTagPop.value.filter((t => !!t))
|
||||
if (activeTagPop.value.includes(item.value)) {
|
||||
activeTagPop.value = activeTagPop.value.filter((t => t !== item.value))
|
||||
} else {
|
||||
activeTagPop.value = activeTagPop.value.filter((t=>!!t))
|
||||
if(activeTagPop.value.includes(item.value)){
|
||||
activeTagPop.value = activeTagPop.value.filter((t=>t !== item.value))
|
||||
}else{
|
||||
activeTagPop.value.push(item.value)
|
||||
}
|
||||
}
|
||||
// 点击标签
|
||||
const chooseTag = (item) => {
|
||||
if (!item.value) {
|
||||
const chooseTag = (item)=>{
|
||||
if(!item.value){
|
||||
activeTag.value = []
|
||||
return
|
||||
}
|
||||
activeTag.value = activeTag.value.filter((t => !!t))
|
||||
if (activeTag.value.includes(item.value)) {
|
||||
activeTag.value = activeTag.value.filter((t => t !== item.value))
|
||||
} else {
|
||||
activeTag.value = activeTag.value.filter((t=>!!t))
|
||||
if(activeTag.value.includes(item.value)){
|
||||
activeTag.value = activeTag.value.filter((t=>t !== item.value))
|
||||
}else{
|
||||
activeTag.value.push(item.value)
|
||||
}
|
||||
// showFilterList.value = false
|
||||
}
|
||||
// 点击生产线分类
|
||||
const changePrdLine = (item) => {
|
||||
const changePrdLine = (item)=>{
|
||||
activePrdlineType.value = item.value === activePrdlineType.value ? '' : item.value
|
||||
}
|
||||
// 点击课程分类
|
||||
const changeCourseType = (item) => {
|
||||
const changeCourseType = (item)=>{
|
||||
activeCourseType.value = item.value === activeCourseType.value ? '' : item.value
|
||||
}
|
||||
const showTypeName = computed(() => {
|
||||
return (activeTab.value === '全部' && activeCourseType.value === '') || (activeTab.value === '生产线' &&
|
||||
activePrdlineType.value === '')
|
||||
})
|
||||
const tagsList = computed(() => {
|
||||
const showTypeName = computed(()=>{
|
||||
return (activeTab.value === '全部' && activeCourseType.value === '') || (activeTab.value === '生产线' && activePrdlineType.value === '')
|
||||
})
|
||||
const tagsList = computed(()=>{
|
||||
let _arr = []
|
||||
tagsTree.value.forEach(t => {
|
||||
tagsTree.value.forEach(t=>{
|
||||
let _tarr = t.children || []
|
||||
_arr = _arr.concat(_tarr)
|
||||
})
|
||||
let _reqList = _arr.filter(t => t.required === "Y")
|
||||
let _reqListN = _arr.filter(t => t.required === "N")
|
||||
let _reqList = _arr.filter(t=>t.required === "Y")
|
||||
let _reqListN = _arr.filter(t=>t.required === "N")
|
||||
return _reqList.concat(_reqListN)
|
||||
})
|
||||
|
||||
|
||||
const courseListBase = ref([])
|
||||
const courseList = computed(() => {
|
||||
if (activeTag.value.length > 0 && !!activeTag.value[0]) {
|
||||
return courseListBase.value.filter(t => {
|
||||
let _tags = (t.tagCataList || []).map(k => k.tagId)
|
||||
const courseList = computed(()=>{
|
||||
if(activeTag.value.length > 0 && !!activeTag.value[0]){
|
||||
return courseListBase.value.filter(t=>{
|
||||
let _tags = (t.tagCataList||[]).map(k=>k.tagId)
|
||||
let _pass = false
|
||||
activeTag.value.forEach(k => {
|
||||
if (_tags.includes(k)) {
|
||||
if(_tags.includes(k)){
|
||||
_pass = true
|
||||
}
|
||||
})
|
||||
return _pass
|
||||
})
|
||||
} else {
|
||||
}else{
|
||||
return courseListBase.value
|
||||
}
|
||||
// return activeTag.value.length > 0
|
||||
@@ -225,22 +243,22 @@
|
||||
// :courseListBase.value
|
||||
})
|
||||
// 整理树形
|
||||
const courseListTree = computed(() => {
|
||||
let _arr = activeTab.value === '全部' ? courseTypeList.value :
|
||||
activeTab.value === '生产线' ? coursePrdlineList.value : []
|
||||
let _idKey = activeTab.value === '全部' ? 'tagId' : 'prdLineId'
|
||||
|
||||
let _tree = _arr.map(t => {
|
||||
let _children = t.children || []
|
||||
const courseListTree = computed(()=>{
|
||||
let _arr = activeTab.value === '全部'? courseTypeList.value
|
||||
: activeTab.value === '生产线'? coursePrdlineList.value: []
|
||||
let _idKey = activeTab.value === '全部'? 'tagId': 'prdLineId'
|
||||
|
||||
let _tree = _arr.map(t=>{
|
||||
let _children = t.children||[]
|
||||
return {
|
||||
label: t.label,
|
||||
required: t.required,
|
||||
value: t.value,
|
||||
courseList: courseList.value.filter(k => k[_idKey] === t.value),
|
||||
children: _children.map(k => {
|
||||
value:t.value,
|
||||
courseList: courseList.value.filter(k=>k[_idKey] === t.value),
|
||||
children: _children.map(k=>{
|
||||
return {
|
||||
...k,
|
||||
courseList: courseList.value.filter(m => m[_idKey] === k.value),
|
||||
courseList: courseList.value.filter(m=>m[_idKey] === k.value),
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -248,15 +266,15 @@
|
||||
return _tree
|
||||
})
|
||||
// 过滤树形
|
||||
const courseListTreeShow = computed(() => {
|
||||
let _type = activeTab.value === '全部' ? activeCourseType.value : activePrdlineType.value
|
||||
if (activeTab.value === '全部' || activeTab.value === '生产线') {
|
||||
if (_type) {
|
||||
return courseListTree.value.filter(t => t.value === _type)
|
||||
} else {
|
||||
return courseListTree.value
|
||||
const courseListTreeShow = computed(()=>{
|
||||
let _type = activeTab.value === '全部'? activeCourseType.value : activePrdlineType.value
|
||||
if(activeTab.value === '全部'|| activeTab.value === '生产线'){
|
||||
if(_type){
|
||||
return courseListTree.value.filter(t=> t.value === _type)
|
||||
}else{
|
||||
return courseListTree.value
|
||||
}
|
||||
} else {
|
||||
}else{
|
||||
return [{
|
||||
children: [],
|
||||
courseList: courseList.value,
|
||||
@@ -266,37 +284,37 @@
|
||||
}
|
||||
})
|
||||
const changeTab = (item) => {
|
||||
if (!item) return
|
||||
if(!item) return
|
||||
activeTab.value = item.name
|
||||
// activeTag.value = ''
|
||||
activeCourseType.value = ''
|
||||
activePrdlineType.value = ''
|
||||
switch (item.name) {
|
||||
switch (item.name){
|
||||
case '全部':
|
||||
queryCrsInfoByCatalogApi().then(res => {
|
||||
queryCrsInfoByCatalogApi().then(res=>{
|
||||
courseListBase.value = res.body || []
|
||||
})
|
||||
break;
|
||||
break;
|
||||
case '热门':
|
||||
queryCrsInfoByPopularApi().then(res => {
|
||||
queryCrsInfoByPopularApi().then(res=>{
|
||||
courseListBase.value = res.body || []
|
||||
})
|
||||
break;
|
||||
break;
|
||||
case '最新':
|
||||
queryCrsInfoByLastnewApi().then(res => {
|
||||
queryCrsInfoByLastnewApi().then(res=>{
|
||||
courseListBase.value = res.body || []
|
||||
})
|
||||
break;
|
||||
break;
|
||||
case '推荐':
|
||||
queryCrsInfoByRecmdApi().then(res => {
|
||||
queryCrsInfoByRecmdApi().then(res=>{
|
||||
courseListBase.value = res.body || []
|
||||
})
|
||||
break;
|
||||
break;
|
||||
case '生产线':
|
||||
queryCrsInfoByPrdLineApi().then(res => {
|
||||
queryCrsInfoByPrdLineApi().then(res=>{
|
||||
courseListBase.value = res.body || []
|
||||
})
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 跳转搜索页
|
||||
@@ -308,66 +326,58 @@
|
||||
common.navigateTo('/pages/courseDetail/index?crsNum=' + item.crsNum + '&crsId=' + item.crsId)
|
||||
// common.navigateTo('/pages/course/study?crsNum=' + item.crsNum)
|
||||
}
|
||||
onMounted(() => {
|
||||
getCourseTypeListApi().then(res => {
|
||||
courseTypeList.value = res.body || []
|
||||
onMounted(()=>{
|
||||
getCourseTypeListApi().then(res=>{
|
||||
courseTypeList.value = res.body||[]
|
||||
})
|
||||
getPrdLineTypeListApi().then(res => {
|
||||
coursePrdlineList.value = res.body || []
|
||||
getPrdLineTypeListApi().then(res=>{
|
||||
coursePrdlineList.value = res.body||[]
|
||||
})
|
||||
getTraTagListApi().then(res => {
|
||||
tagsTree.value = res.body || []
|
||||
})
|
||||
changeTab({
|
||||
name: '全部'
|
||||
getTraTagListApi().then(res=>{
|
||||
tagsTree.value = res.body||[]
|
||||
})
|
||||
changeTab({name:'全部'})
|
||||
})
|
||||
onActivated(() => {
|
||||
onActivated(() => {
|
||||
// 重新获取标签信息
|
||||
getTraTagListApi().then(res => {
|
||||
tagsTree.value = res.body || []
|
||||
})
|
||||
changeTab({
|
||||
name: activeTab.value || '全部'
|
||||
getTraTagListApi().then(res=>{
|
||||
tagsTree.value = res.body||[]
|
||||
})
|
||||
changeTab({name:activeTab.value || '全部'})
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.course-center {
|
||||
.course-center{
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top-bg {
|
||||
background: linear-gradient(16deg, rgba(234, 246, 255, 0) 0%, #c3e6ff 100%);
|
||||
.top-bg{
|
||||
background: linear-gradient(16deg,rgba(234,246,255,0) 0%,#c3e6ff 100%);
|
||||
height: 480rpx;
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.bot-bg {
|
||||
.bot-bg{
|
||||
// background-color: #F6F8FF;
|
||||
background: linear-gradient(136deg, rgba(234, 246, 255, 0) 0%, #c3e6ff 100%);
|
||||
background: linear-gradient(136deg,rgba(234,246,255,0) 0%,#c3e6ff 100%);
|
||||
width: 750rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.course-center-body {
|
||||
.course-center-body{
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
left: 0;
|
||||
left:0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0 15rpx;
|
||||
padding:0 15rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: v-bind(pageTopPadding);
|
||||
|
||||
// padding-top: var(--status-bar-height);
|
||||
.body-title {
|
||||
.body-title{
|
||||
height: 90rpx;
|
||||
// background-color: red;
|
||||
text-align: center;
|
||||
@@ -376,30 +386,28 @@
|
||||
line-height: 46rpx;
|
||||
box-sizing: border-box;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
color:#000;
|
||||
position: relative;
|
||||
|
||||
// margin-bottom: 23rpx;
|
||||
.arrow-icon {
|
||||
.arrow-icon{
|
||||
position: absolute;
|
||||
left: 36rpx;
|
||||
top: 20rpx;
|
||||
left:36rpx;
|
||||
top:20rpx;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.input-view {}
|
||||
|
||||
.tabs-view {
|
||||
.input-view{
|
||||
|
||||
}
|
||||
.tabs-view{
|
||||
background: #ffffff;
|
||||
margin-top: 23rpx;
|
||||
border-radius: 23rpx;
|
||||
padding: 6rpx 10rpx 12rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-bottom:15rpx;
|
||||
}
|
||||
|
||||
.list-view {
|
||||
flex: 1;
|
||||
.list-view{
|
||||
flex:1;
|
||||
overflow: hidden;
|
||||
margin-bottom: 15rpx;
|
||||
background: #ffffff;
|
||||
@@ -407,48 +415,42 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.filter-list {
|
||||
.filter-list{
|
||||
position: absolute;
|
||||
top: 84rpx;
|
||||
left: 0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 588rpx;
|
||||
padding-bottom: 80rpx;
|
||||
overflow-y: hidden;
|
||||
z-index: 2;
|
||||
background-color: #f9f9f9;
|
||||
box-shadow: 0rpx 12rpx 20rpx rgba(160, 160, 160, .25);
|
||||
box-shadow: 0rpx 12rpx 20rpx rgba(160,160,160,.25);
|
||||
border-radius: 0 0 0rpx 0rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.scroll-box-tags {
|
||||
.scroll-box-tags{
|
||||
height: 508rpx;
|
||||
padding: 0rpx 25rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.filter-type {
|
||||
.filter-type{
|
||||
padding: 10rpx 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.filter-type-title {
|
||||
.filter-type-title{
|
||||
font-size: 29rpx;
|
||||
line-height: 40rpx;
|
||||
margin-bottom: 15rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.filter-type-list {
|
||||
.filter-type-list{
|
||||
overflow: hidden;
|
||||
|
||||
.filter-type-item {
|
||||
.filter-type-item{
|
||||
// width: calc(25% - 18rpx);
|
||||
display: inline-block;
|
||||
font-size: 29rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20rpx;
|
||||
padding:0 20rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
@@ -460,23 +462,19 @@
|
||||
background-color: #f1f3f8;
|
||||
border-radius: 6rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
&:nth-child(4n) {
|
||||
&:nth-child(4n){
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
&.is-active{
|
||||
color: #06f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&+.filter-type {
|
||||
&+.filter-type{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.btns-box {
|
||||
.btns-box{
|
||||
height: 80rpx;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
@@ -485,8 +483,7 @@
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding-top: 10rpx;
|
||||
|
||||
.btn-sub {
|
||||
.btn-sub{
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
background-color: #06f;
|
||||
@@ -496,8 +493,7 @@
|
||||
padding: 0 40rpx;
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
&.cencle-btn {
|
||||
&.cencle-btn{
|
||||
background-color: #fff;
|
||||
color: #06f;
|
||||
margin-right: 40rpx;
|
||||
@@ -505,16 +501,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-list {
|
||||
.filter-list{
|
||||
display: none;
|
||||
|
||||
&.show {
|
||||
&.show{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
.filter-btn{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
@@ -525,12 +518,11 @@
|
||||
background: #fff;
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
box-shadow: -4rpx 0 6rpx rgba(0, 0, 0, .05);
|
||||
box-shadow: -4rpx 0 6rpx rgba(0,0,0,.05);
|
||||
white-space: nowrap;
|
||||
padding-right: 30rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.filter-icon {
|
||||
.filter-icon{
|
||||
// display: inline-block;
|
||||
font-size: 26rpx;
|
||||
position: absolute;
|
||||
@@ -539,23 +531,19 @@
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.tags-view {
|
||||
.tags-view{
|
||||
height: 84rpx;
|
||||
display: block;
|
||||
padding: 20rpx 120rpx 20rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
|
||||
.tags-item {
|
||||
.tags-item{
|
||||
margin-right: 30rpx;
|
||||
display: inline-block;
|
||||
|
||||
::v-deep .uv-tags {
|
||||
::v-deep .uv-tags{
|
||||
padding: 0 20rpx;
|
||||
|
||||
.uv-tags__text {
|
||||
.uv-tags__text{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -564,18 +552,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.course-list {
|
||||
.course-list{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex:1;
|
||||
overflow: hidden;
|
||||
|
||||
.left-type-list {
|
||||
.left-type-list{
|
||||
width: 152rpx;
|
||||
border-right: 2rpx solid #eee;
|
||||
overflow-y: auto;
|
||||
|
||||
.type-item {
|
||||
.type-item{
|
||||
min-height: 90rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 22rpx;
|
||||
@@ -586,20 +571,17 @@
|
||||
word-break: break-all;
|
||||
text-align: center;
|
||||
white-space: pre-wrap;
|
||||
|
||||
&.is-active {
|
||||
background-color: rgba(44, 142, 242, .1);
|
||||
&.is-active{
|
||||
background-color: rgba(44,142,242,.1);
|
||||
color: #06f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right-course-list {
|
||||
flex: 1;
|
||||
.right-course-list{
|
||||
flex:1;
|
||||
overflow-y: auto;
|
||||
|
||||
.type-list {
|
||||
.type-title {
|
||||
.type-list{
|
||||
.type-title{
|
||||
font-size: 33rpx;
|
||||
line-height: 43rpx;
|
||||
margin: 20rpx 15rpx 5rpx;
|
||||
@@ -609,8 +591,7 @@
|
||||
// white-space: nowrap;
|
||||
word-break: break-all;
|
||||
font-weight: 600;
|
||||
|
||||
.left-color {
|
||||
.left-color{
|
||||
width: 8rpx;
|
||||
height: 33rpx;
|
||||
margin-top: 5rpx;
|
||||
|
||||
@@ -121,9 +121,6 @@
|
||||
|
||||
const popup = ref(null);
|
||||
const popup_input_bottom = ref('0px');
|
||||
|
||||
const inputValue = ref('');
|
||||
const placeholder = ref('');
|
||||
const message_list = reactive([]);
|
||||
const status = ref(''); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 20;
|
||||
@@ -182,7 +179,7 @@
|
||||
};
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from == 'submit') {
|
||||
if (from === 'submit') {
|
||||
status.value = '';
|
||||
total.value = -1;
|
||||
page.value = 1;
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import common from '@/common/common';
|
||||
const props = defineProps({
|
||||
modelValue: Object
|
||||
});
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
modelValue: Object
|
||||
})
|
||||
const min_no_success_id = computed(() => {
|
||||
const find_item = props.modelValue?.pgrphData.find(res => (res.pgrphStdyStateName == '未学习' || res.pgrphStdyStateName == '学习中'))
|
||||
const find_item = props.modelValue?.pgrphData.find(res => (res.pgrphStdyStateName === '未学习' || res.pgrphStdyStateName === '学习中'))
|
||||
return find_item?.pgrphId || ''
|
||||
})
|
||||
|
||||
const toDetail = (item) => {
|
||||
if (item.pgrphStdyStateName == '已学习' || item.pgrphStdyStateName == '学习中' || min_no_success_id.value == item.pgrphId) {
|
||||
if (item.pgrphStdyStateName === '已学习' || item.pgrphStdyStateName === '学习中' || min_no_success_id.value === item.pgrphId) {
|
||||
emit('toStudyPrgh', item)
|
||||
} else {
|
||||
common.msg('请按顺序学习知识点')
|
||||
|
||||
@@ -76,15 +76,15 @@
|
||||
</view>
|
||||
</uv-sticky>
|
||||
<!-- <swiper class="body-swiper" @change="swiper_change" :current="tabAct"><swiper-item> -->
|
||||
<view class="course-info" v-if="tabAct == 0">
|
||||
<view class="course-info" v-if="tabAct === 0">
|
||||
<introduceVue v-model="form"></introduceVue>
|
||||
</view>
|
||||
<!--</swiper-item><swiper-item>-->
|
||||
<view class="point" v-if="tabAct == 1">
|
||||
<view class="point" v-if="tabAct === 1">
|
||||
<knowledge v-model="form" @toStudyPrgh="toStudyPrgh"></knowledge>
|
||||
</view>
|
||||
<!--</swiper-item><swiper-item>-->
|
||||
<view class="evaluate" v-if="tabAct == 2 && form">
|
||||
<view class="evaluate" v-if="tabAct === 2 && form">
|
||||
<comment ref="commentRef" :crsId="crsId" :imgId="form.imgId"></comment>
|
||||
</view>
|
||||
<!--</swiper-item></swiper>-->
|
||||
@@ -120,7 +120,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, computed, onMounted } from 'vue';
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { onShow, onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import { getCourseDetailApi } from '@/api/courseDetail.js';
|
||||
import { startExamByCrs } from '@/api/examination.js';
|
||||
@@ -143,7 +143,7 @@
|
||||
const isPreview = ref(''); // 记录是否是预览
|
||||
const tabAct = ref(0);
|
||||
const scrollTop = ref(0);
|
||||
const practiceButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat === '02');
|
||||
const practiceButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat === '01');
|
||||
const examinationButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat !== '00');
|
||||
|
||||
const tabSwitch = (item) => {
|
||||
@@ -185,10 +185,6 @@
|
||||
scrollTop.value = e.detail.scrollTop;
|
||||
};
|
||||
|
||||
const swiper_change = (res) => {
|
||||
tabAct.value = res.detail.current;
|
||||
};
|
||||
|
||||
// 去考试
|
||||
const goto_examination = async () => {
|
||||
if (isPreview.value === 'preview') return common.msg('预览课程不允许考试');
|
||||
@@ -219,7 +215,7 @@
|
||||
// 去练习
|
||||
const goto_practice = async () => {
|
||||
if (isPreview.value === 'preview') return common.msg('预览课程不允许练习');
|
||||
if (form.value.examStat !== '00') return common.msg('该课程下暂无试题');
|
||||
if (form.value.examStat === '01') return common.msg('该课程下暂无试题');
|
||||
common.loading();
|
||||
startPracticeByCrs({
|
||||
crsId: crsId.value
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, nextTick } from 'vue';
|
||||
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { publishCrsEvaluation } from '@/api/courseDetail.js';
|
||||
import common from '@/common/common';
|
||||
@@ -92,7 +91,7 @@
|
||||
|
||||
const submit = () => {
|
||||
if (formData.bbsContent === '') {
|
||||
if (formData.bbsTag == 'SUG') {
|
||||
if (formData.bbsTag === 'SUG') {
|
||||
return common.msg('请输入你的建议');
|
||||
} else {
|
||||
return common.msg('请输入你的问题');
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, reactive, nextTick } from 'vue';
|
||||
import { computed, ref, reactive } from 'vue';
|
||||
import common from '@/common/common';
|
||||
import { queryCrsExamHisByExamId } from '@/api/courseRecord.js';
|
||||
const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
@@ -98,7 +98,6 @@
|
||||
// 跳转到详情
|
||||
const click_list_item = (list_item) => {
|
||||
console.log('list_item', list_item);
|
||||
const examLenTm = 666;
|
||||
const papersName = item.value.examName;
|
||||
|
||||
common.navigateTo(
|
||||
|
||||
@@ -9,17 +9,16 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import itemVue from './examRecordItem.vue';
|
||||
import common from '@/common/common';
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { queryCrsExamRecordPaging } from '@/api/courseRecord.js';
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
@@ -48,15 +47,8 @@
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const getStatusClass = (isFinish) => {
|
||||
// 00进行中、01已完成、02已超时
|
||||
if (isFinish === '00') return 'in_progress';
|
||||
if (isFinish === '01') return 'completed';
|
||||
return 'expired';
|
||||
};
|
||||
|
||||
const scrolltolower = (item) => {
|
||||
const scrolltolower = () => {
|
||||
getData();
|
||||
};
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, reactive, nextTick } from 'vue';
|
||||
import { computed, ref, reactive } from 'vue';
|
||||
import common from '@/common/common';
|
||||
import { queryPracticeHis } from '@/api/courseRecord.js';
|
||||
const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
|
||||
@@ -9,17 +9,16 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import itemVue from './practiceRecordItem.vue';
|
||||
import common from '@/common/common';
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { queryPracticeRecordPaging } from '@/api/courseRecord.js';
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
@@ -49,7 +48,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
const scrolltolower = (item) => {
|
||||
const scrolltolower = () => {
|
||||
getData();
|
||||
};
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
}
|
||||
});
|
||||
const secondsToHours = (seconds) => {
|
||||
console.log('typeof seconds', typeof seconds);
|
||||
if (typeof seconds === 'number') {
|
||||
// 转换为小时并保留一位小数
|
||||
return (seconds / 3600).toFixed(1);
|
||||
|
||||
@@ -9,17 +9,16 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import itemVue from './studyRecordItem.vue';
|
||||
import common from '@/common/common';
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import { ref, reactive} from 'vue';
|
||||
import { queryStdyRecordPaging } from '@/api/courseRecord.js';
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
@@ -50,37 +49,11 @@
|
||||
});
|
||||
|
||||
};
|
||||
const getStatusClass = (isFinish) => {
|
||||
// 00进行中、01已完成、02已超时
|
||||
if (isFinish === '00') return 'in_progress';
|
||||
if (isFinish === '01') return 'completed';
|
||||
return 'expired';
|
||||
};
|
||||
|
||||
const scrolltolower = (item) => {
|
||||
|
||||
const scrolltolower = () => {
|
||||
getData();
|
||||
};
|
||||
|
||||
// 计算两个时间的时间差
|
||||
const formatDuration = (startTm, endTm) => {
|
||||
// 解析时间字符串为时间戳(毫秒)
|
||||
const startTime = new Date(startTm).getTime();
|
||||
const endTime = new Date(endTm).getTime();
|
||||
|
||||
// 计算时间差(秒),确保为正数
|
||||
const seconds = Math.abs(Math.floor((endTime - startTime) / 1000));
|
||||
|
||||
// 计算时、分、秒
|
||||
const hours = Math.floor(seconds / 3600);
|
||||
const minutes = Math.floor((seconds % 3600) / 60);
|
||||
const remainingSeconds = seconds % 60;
|
||||
|
||||
// 补零格式化函数(统一处理所有单位)
|
||||
const formatNumber = (num) => num.toString().padStart(2, '0');
|
||||
|
||||
// 小时、分钟、秒均保持两位数格式
|
||||
return `${formatNumber(hours)}:${formatNumber(minutes)}:${formatNumber(remainingSeconds)}`;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getData
|
||||
});
|
||||
|
||||
@@ -19,15 +19,12 @@
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
import Subject from '@/components/examination/subject.vue';
|
||||
import common from '@/common/common';
|
||||
import { queryPracticeRecordByExrId } from '@/api/courseRecord.js';
|
||||
|
||||
const exrId = ref('');
|
||||
const pass_status = ref(0);
|
||||
|
||||
const topicList = reactive([]);
|
||||
|
||||
const get_result = () => {
|
||||
|
||||
@@ -45,11 +45,9 @@
|
||||
import studyRecordList from './components/studyRecordList.vue';
|
||||
import practiceRecordList from './components/practiceRecordList.vue';
|
||||
import examRecordList from './components/examRecordList.vue';
|
||||
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import common from '@/common/common.js';
|
||||
const listItemRefs = ref([]);
|
||||
const taskRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
const tabList = ref([
|
||||
{
|
||||
@@ -69,14 +67,10 @@
|
||||
const swiperChange = (item) => {
|
||||
tabAct.value = item.detail.current;
|
||||
};
|
||||
const search = (value) => {
|
||||
listItemRefs.value[tabAct.value]?.search(value);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
watch(
|
||||
tabAct,
|
||||
(newValue, oldValue) => {
|
||||
(newValue) => {
|
||||
typeof listItemRefs.value[newValue]?.getData === 'function' &&
|
||||
listItemRefs.value[newValue]?.getData('first');
|
||||
},
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
onMounted,
|
||||
nextTick,
|
||||
} from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed, onMounted, onUnmounted, nextTick } from 'vue';
|
||||
import { ref, reactive, onMounted, onUnmounted, nextTick } from 'vue';
|
||||
import { optionErrorIcon } from '@/common/imgSvg';
|
||||
import { saveTraQnsFeedback } from '@/api/examination.js';
|
||||
import common from '@/common/common';
|
||||
@@ -104,7 +104,7 @@
|
||||
await new Promise((resolve) => setTimeout(resolve, delayTime));
|
||||
}
|
||||
common.hideLoading();
|
||||
nextTick(() => {
|
||||
await nextTick(() => {
|
||||
feedbackInfo.type = [];
|
||||
feedbackInfo.text = '';
|
||||
feedbackInfo.qnsId = '';
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
mark: markList.includes(item.qnsId),
|
||||
completed: completedListStatus[index]
|
||||
}"
|
||||
@click="clikc_sheet_item(index)"
|
||||
@click="click_sheet_item(index)"
|
||||
>
|
||||
<view class="circle">
|
||||
{{ index + 1 }}
|
||||
@@ -143,16 +143,14 @@
|
||||
import Feedback from './components/feedback.vue';
|
||||
import Dialog from './components/dialog.vue';
|
||||
import Subject from '@/components/examination/subject.vue';
|
||||
import CharactersSubject from '@/components/examination/characters-subject.vue';
|
||||
import TouchBtn from '@/components/examination/touchBtn.vue';
|
||||
import { ref, reactive, computed, onMounted, nextTick } from 'vue';
|
||||
import { ref, reactive, computed} from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import common from '@/common/common';
|
||||
import { getPageCache } from '@/common/common';
|
||||
import { getPageCache, setupKeyboardHeightListener } from '@/common/common';
|
||||
import { commonUploadVoiceFile } from '@/api/common.js';
|
||||
import { optionErrorIcon, examinationSheetIcon } from '@/common/imgSvg';
|
||||
import { commitPaperExam, queryPaperExamScore, startExamByCrs, commitCrsExam } from '@/api/examination.js';
|
||||
|
||||
import { commitPaperExam, commitCrsExam } from '@/api/examination.js';
|
||||
const answerIsOver = ref(true);
|
||||
const feedbackRef = ref(null);
|
||||
const dialogRef = ref(null);
|
||||
@@ -215,16 +213,13 @@
|
||||
// 弹出框配置
|
||||
const dialogConfiguration = reactive({});
|
||||
|
||||
const activeVoiceId = ref('');
|
||||
|
||||
const swiperChange = (item) => {
|
||||
questionNumber.value = item.detail.current;
|
||||
};
|
||||
|
||||
// 倒计时结束
|
||||
const finish = (item) => {
|
||||
|
||||
console.log('倒计时结束自动交卷');
|
||||
hand_in_paper('倒计时结束自动交卷')
|
||||
};
|
||||
|
||||
// 按上一题下一题
|
||||
@@ -243,7 +238,7 @@
|
||||
const openSheet = (status) => (status ? popupRef.value.open('bottom') : popupRef.value.close());
|
||||
|
||||
// 点击答题卡按钮
|
||||
const clikc_sheet_item = (index) => {
|
||||
const click_sheet_item = (index) => {
|
||||
questionNumber.value = index;
|
||||
};
|
||||
|
||||
@@ -260,8 +255,6 @@
|
||||
}
|
||||
};
|
||||
|
||||
const voicePathValue = ref('');
|
||||
|
||||
// 录音按钮提交
|
||||
const touchBtnSubmit = (type, submitObj) => {
|
||||
const old_text = touchBtnRef.value?.clearinputText(); // 清除发送框数据
|
||||
@@ -317,27 +310,15 @@
|
||||
my_answer: []
|
||||
}))
|
||||
);
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 安全区域底部到屏幕底部的高度(即底部安全区域高度)
|
||||
const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom;
|
||||
uni.onKeyboardHeightChange((res) => {
|
||||
let keyboardHeight = res.height;
|
||||
// 仅在iOS端补偿安全区域高度
|
||||
if (systemInfo.platform === 'ios') {
|
||||
keyboardHeight = Math.max(0, keyboardHeight - safeAreaBottomHeight); // 避免负数
|
||||
}
|
||||
popup_input_bottom.value = `${keyboardHeight}px`;
|
||||
console.log('端补偿安全区域高度', popup_input_bottom.value);
|
||||
});
|
||||
// #endif
|
||||
setupKeyboardHeightListener((height) => {
|
||||
popup_input_bottom.value = `${height}px`;
|
||||
})
|
||||
});
|
||||
|
||||
const result_click = ({ key }) => {
|
||||
console.log('res', key);
|
||||
if (key === 'hand_in_paper') {
|
||||
// 现在交卷
|
||||
hand_in_paper();
|
||||
hand_in_paper('弹窗确认交卷');
|
||||
} else if (key === 'continue') {
|
||||
// 继续考试
|
||||
dialogRef.value.close();
|
||||
@@ -404,9 +385,9 @@
|
||||
dialogRef.value.open();
|
||||
};
|
||||
// 执行交卷
|
||||
const hand_in_paper = () => {
|
||||
const hand_in_paper = (strs='') => {
|
||||
console.log('交卷的原因', strs);
|
||||
const answerDtoList = topicList.map((res) => {
|
||||
console.log('resres', res);
|
||||
let answerItem = {
|
||||
examId: paperData.examId,
|
||||
papersId: paperData.papersId,
|
||||
@@ -430,12 +411,9 @@
|
||||
};
|
||||
}
|
||||
});
|
||||
console.log('提交的', answerDtoList);
|
||||
console.log('answerDtoList', answerDtoList);
|
||||
// 计算当前时间与开始时间的毫秒差值,再转换为整数秒
|
||||
const examLenTm = Math.floor((new Date().getTime() - examinationStartTime) / 1000);
|
||||
dialogRef.value.close();
|
||||
console.log('examLenTm', examLenTm);
|
||||
common.loading('正在提交');
|
||||
// 这里通过是否存在examId来判断是考试中心的考试还是课程的考试
|
||||
let func;
|
||||
@@ -457,7 +435,6 @@
|
||||
});
|
||||
}
|
||||
func.then((res) => {
|
||||
console.log('提交成功', res);
|
||||
// 判断是否需要查分
|
||||
if (res.body.flagQuery === 'Y') {
|
||||
// 需要查分
|
||||
|
||||
@@ -9,17 +9,16 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import itemVue from './examRecordItem.vue';
|
||||
import common from '@/common/common';
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { queryExamRecordPaging } from '@/api/courseRecord.js';
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
@@ -49,7 +48,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
const scrolltolower = (item) => {
|
||||
const scrolltolower = () => {
|
||||
getData();
|
||||
};
|
||||
|
||||
|
||||
@@ -9,40 +9,15 @@
|
||||
</view>
|
||||
<view class="detail-body">
|
||||
<examRecordList ref="listItemRef"></examRecordList>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import examRecordList from './components/examRecordList.vue';
|
||||
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import common from '@/common/common.js';
|
||||
const listItemRef = ref(null);
|
||||
const taskRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
const tabList = ref([
|
||||
{
|
||||
name: '学习记录'
|
||||
},
|
||||
{
|
||||
name: '练习记录'
|
||||
},
|
||||
{
|
||||
name: '考试记录'
|
||||
}
|
||||
]);
|
||||
|
||||
const tabChange = (item) => {
|
||||
tabAct.value = item.index;
|
||||
};
|
||||
const swiperChange = (item) => {
|
||||
tabAct.value = item.detail.current;
|
||||
};
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
listItemRef.value?.getData('first');
|
||||
});
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
</template>
|
||||
<script setup>
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import { ref, reactive} from 'vue';
|
||||
import { queryTraPersonalCollectionCrsPaging, deleteTraPersonalCollectionById } from '@/api/favorites.js';
|
||||
import common from '@/common/common';
|
||||
const options = [
|
||||
@@ -57,7 +57,7 @@
|
||||
];
|
||||
const getData = (from = '') => {
|
||||
console.log('status.value', status.value);
|
||||
if (from == 'first') {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
@@ -108,10 +108,10 @@
|
||||
});
|
||||
});
|
||||
};
|
||||
const scrolltolower = (item) => {
|
||||
const scrolltolower = () => {
|
||||
getData();
|
||||
};
|
||||
const refreshData = (params) => {
|
||||
const refreshData = () => {
|
||||
total.value = -1;
|
||||
getData('first');
|
||||
};
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import { ref, reactive} from 'vue';
|
||||
import { queryTraPersonalCollectionTaskPaging,deleteTraPersonalCollectionById } from '@/api/favorites.js';
|
||||
import { setPageCache } from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
];
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
@@ -104,7 +104,6 @@
|
||||
common.show('提示', '确认删除吗?').then((res) => {
|
||||
if (!res) return;
|
||||
common.loading();
|
||||
const collectId = '11';
|
||||
deleteTraPersonalCollectionById({ collectId: item.collectionId })
|
||||
.then(() => {
|
||||
data_list.splice(index, 1); // 从列表移除
|
||||
@@ -118,7 +117,6 @@
|
||||
|
||||
// 跳转到详情
|
||||
const click_item = (item) => {
|
||||
// tudo
|
||||
if (item.isTimeOut === '00') {
|
||||
common.msg('任务已结束');
|
||||
return;
|
||||
|
||||
@@ -45,11 +45,10 @@
|
||||
import FavoritesTask from './components/favoritesTask.vue';
|
||||
import FavoritesCourse from './components/favoritesCourse.vue';
|
||||
// 我的收藏
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import { onShow, onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import { LineBg } from '@/enum.js';
|
||||
import common from '@/common/common';
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
const courseRef = ref(null);
|
||||
const taskRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
@@ -180,7 +180,6 @@
|
||||
common.navigateTo('/pages/courseDetail/index?crsId=' + item.crsId);
|
||||
};
|
||||
const collect_click = async (id) => {
|
||||
console.log('学习', id);
|
||||
try {
|
||||
if (!id) {
|
||||
common.loading('收藏中');
|
||||
|
||||
@@ -44,10 +44,9 @@
|
||||
<script setup>
|
||||
import { LineBg } from '@/enum.js';
|
||||
import content from './components/content.vue';
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import common from '@/common/common.js';
|
||||
const listItemRefs = ref([]);
|
||||
const taskRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
const tabList = ref([
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
];
|
||||
|
||||
const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
@@ -152,7 +152,6 @@
|
||||
const isLastTopic = computed(
|
||||
() => topicList.length === finishCurrent.value + 1 && finishCurrent.value === questionNumber.value
|
||||
);
|
||||
|
||||
const transition = (event) => {
|
||||
if (isTriggered.value) return;
|
||||
const dx = event.detail.dx;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
import common from '@/common/common';
|
||||
|
||||
@@ -34,20 +34,11 @@
|
||||
import PreviewAiSparring from './components/previewAiSparring.vue'
|
||||
import PreviewCourse from './components/previewCourse.vue'
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
computed,
|
||||
nextTick,
|
||||
onMounted,
|
||||
watch
|
||||
} from 'vue';
|
||||
import {
|
||||
queryTraCrsBbsInfoByCrsId,
|
||||
replyTraCrsBbsInfo,
|
||||
qryChildTraCrsBbsInfo
|
||||
} from '@/api/courseDetail.js';
|
||||
import common from '@/common/common';
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
import {
|
||||
LineBg
|
||||
} from '@/enum.js'
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
label: "否",
|
||||
}
|
||||
] // 性别
|
||||
const base_url = get_base_url()
|
||||
|
||||
// 去选择百禄
|
||||
const gotoMascot = () => {
|
||||
@@ -137,7 +136,7 @@
|
||||
}
|
||||
// 显示性别的计算属性
|
||||
const showGenderText = computed(() => {
|
||||
const item = sexOptions.find((item) => item.value == userInfo.value.gender)
|
||||
const item = sexOptions.find((item) => item.value === userInfo.value.gender)
|
||||
if (item) {
|
||||
return item.label
|
||||
} else {
|
||||
@@ -147,7 +146,7 @@
|
||||
|
||||
// 显示是否匿名的计算属性
|
||||
const showAnonymousText = computed(() => {
|
||||
const item = anonymousOptions.find((item) => item.value == userInfo.value?.anonymous)
|
||||
const item = anonymousOptions.find((item) => item.value === userInfo.value?.anonymous)
|
||||
if (item) {
|
||||
return item.label
|
||||
} else {
|
||||
|
||||
@@ -17,19 +17,14 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, nextTick, onMounted } from 'vue';
|
||||
import { ref, reactive} from 'vue';
|
||||
import { queryTraExamPapersPage } from '@/api/testingHall.js';
|
||||
import { queryTraCrsBbsInfoByCrsId } from '@/api/courseDetail.js';
|
||||
import itemVue from './content-item.vue';
|
||||
const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 20;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
const triggered = ref(false);
|
||||
const _freshing = ref(false);
|
||||
const offset = ref(0);
|
||||
const scrollRef = ref(null);
|
||||
const props = defineProps({
|
||||
index: {
|
||||
@@ -37,16 +32,9 @@
|
||||
default: 0
|
||||
}
|
||||
});
|
||||
const onRefresh = () => {
|
||||
if (_freshing.value) return;
|
||||
_freshing.value = true;
|
||||
setTimeout(() => {
|
||||
triggered.value = false;
|
||||
_freshing.value = false;
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
const getData = (from = '', searchText = '') => {
|
||||
if (from == 'first') {
|
||||
if (from === 'first') {
|
||||
if (total.value !== -1) return;
|
||||
status.value = 'loading';
|
||||
total.value = -1;
|
||||
@@ -64,9 +52,9 @@
|
||||
page: page.value,
|
||||
limit: limit
|
||||
};
|
||||
if (props.index == 1) {
|
||||
if (props.index === 1) {
|
||||
params.examStat = 'Y';
|
||||
} else if (props.index == 2) {
|
||||
} else if (props.index === 2) {
|
||||
params.examStat = 'N';
|
||||
}
|
||||
queryTraExamPapersPage(params)
|
||||
|
||||
@@ -120,7 +120,6 @@
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { reactive, computed } from 'vue';
|
||||
import { startTraExamPapersInfo } from '@/api/examination.js';
|
||||
|
||||
import common from '@/common/common';
|
||||
import { setPageCache, getPageCache } from '@/common/common';
|
||||
const detailData = reactive({
|
||||
|
||||
@@ -65,13 +65,6 @@
|
||||
}]);
|
||||
|
||||
const contentRefs = ref([])
|
||||
const status = ref('loadmore') // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 20;
|
||||
const total = ref(-1)
|
||||
const page = ref(0)
|
||||
const data_list = reactive([])
|
||||
|
||||
|
||||
const triggered = ref(false)
|
||||
const tabChange = (item) => {
|
||||
tabAct.value = item.index;
|
||||
@@ -80,7 +73,6 @@
|
||||
tabAct.value = item.detail.current;
|
||||
};
|
||||
const search = (value) => {
|
||||
console.log('value', value);
|
||||
contentRefs.value[tabAct.value]?.search(value);
|
||||
}
|
||||
const gotoDetails = (item) => {
|
||||
|
||||
@@ -40,7 +40,7 @@ const animationfinish = () => {
|
||||
indexNowNow.value = indexNow.value
|
||||
}
|
||||
const swiperTransition = (e) => {
|
||||
if (e.dx > 30 && indexNowNow.value == 2) {
|
||||
if (e.dx > 30 && indexNowNow.value === 2) {
|
||||
common.navigateBack()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,19 +79,17 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed, onMounted, nextTick, onUnmounted } from 'vue';
|
||||
import { ref, reactive, computed, nextTick} from 'vue';
|
||||
import { onLoad, onHide, onShow, onUnload } from '@dcloudio/uni-app';
|
||||
|
||||
import Feedback from '@/pages/examination/components/feedback.vue';
|
||||
import Dialog from '@/pages/examination/components/dialog.vue';
|
||||
import Subject from '@/components/examination/subject.vue';
|
||||
import CharactersSubject from '@/components/examination/characters-subject.vue';
|
||||
import TouchBtn from '@/components/examination/touchBtn.vue';
|
||||
import common from '@/common/common';
|
||||
import { setPageCache, getPageCache, setupKeyboardHeightListener } from '@/common/common';
|
||||
import {getPageCache, setupKeyboardHeightListener } from '@/common/common';
|
||||
import { commonUploadVoiceFile } from '@/api/common.js';
|
||||
import { optionErrorIcon, examinationSheetIcon, practiceExitIcon } from '@/common/imgSvg';
|
||||
import { practiceAnswer, practiceCommit, queryCrsPracticeAnswerResult } from '@/api/practice.js';
|
||||
import {practiceExitIcon } from '@/common/imgSvg';
|
||||
import {practiceCommit, queryCrsPracticeAnswerResult } from '@/api/practice.js';
|
||||
|
||||
import { queryMistakesAnswerByMisId, mistakesCorrect } from '@/api/wrongQuestionRecord.js';
|
||||
const feedbackRef = ref(null);
|
||||
@@ -109,7 +107,6 @@
|
||||
const questionNumber = ref(0); // 题号
|
||||
|
||||
// 根据课程ID获取课程的题目 undefined为没有, 00为加载中, 02为加载失败
|
||||
|
||||
const topic = computed({
|
||||
get: () => topicList[questionNumber.value],
|
||||
set: (val) => (topicList[questionNumber.value] = val)
|
||||
|
||||
@@ -58,14 +58,13 @@
|
||||
// 我的收藏
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import { LineBg } from '@/enum.js';
|
||||
import { queryMistakesAnswerByMisId, queryTraMistakesCollection } from '@/api/wrongQuestionRecord.js';
|
||||
import { queryTraMistakesCollection } from '@/api/wrongQuestionRecord.js';
|
||||
import common from '@/common/common';
|
||||
import { setPageCache } from '@/common/common';
|
||||
|
||||
const customStyle = {
|
||||
borderRadius: '16rpx'
|
||||
};
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
|
||||
const courseRef = ref(null);
|
||||
const correctRef = ref(null);
|
||||
|
||||
Reference in New Issue
Block a user