Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
田岩
2025-09-04 09:41:38 +08:00
3 changed files with 45 additions and 15 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# dev
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
# sit
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
@@ -28,7 +28,7 @@ VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# 任东
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
# 张建成
+6 -2
View File
@@ -540,7 +540,10 @@ const nextQuestionSuccess = (info, type = 'next') => {
// 重新回答
unref(ajaxApi)({
processType: 'NEW-ANSER', //NEW-KNOW
requestBody: info.qnsId
requestBody: JSON.stringify({
stdyId: unref(stdyId),
qnsId: info.qnsId
})
}).then(res => {
let _body = res.body || {}
if (!_body.chatBody) {
@@ -789,7 +792,8 @@ const uploadRecordNow = voicePath => {
id: _id
})
scrollToBottomNow()
commonUploadVoiceFile(voicePath, '/trastudy/traStdychat/voiceChart', {
let _path = isPreview.value ? '/trastudy/traStdychat/previewVoiceChart' : '/trastudy/traStdychat/voiceChart'
commonUploadVoiceFile(voicePath, _path, {
processType: 'ANSER-VOICE',
requestBody: JSON.stringify(_data)
})
+37 -11
View File
@@ -18,7 +18,10 @@
<view class="view-list course-list">
<course-item class="course-item" v-for="itemC in courseList" :key="itemC.crsNum" :itemInfo="itemC" @clickItem="toCourseDetail(itemC)" />
<view class="view-tips" v-show="courseList.length > 0">
{{ hasMore ? '滚动加载更多' : '全部加载完成' }}
{{ isLoading ? ''
: (showGetMore ? '滚动加载更多' : '全部加载完成') }}
<CommonLoading v-show="isLoading" class="loading-box"/>
</view>
</view>
<!-- <view class="view-result" v-show="courseList.length === 0">暂无数据</view> -->
@@ -60,7 +63,9 @@
<course-item class="course-item" v-for="itemC in courseList" :key="itemC.crsNum" :itemInfo="itemC" @clickItem="toCourseDetail(itemC)" />
</view>
<view class="view-tips" v-if="activeTab === 'course' && courseList.length > 0">
{{ hasMore ? '滚动加载更多' : '全部加载完成' }}
{{ isLoading ? ''
: (showGetMore ? '滚动加载更多' : '全部加载完成') }}
<CommonLoading v-show="isLoading" class="loading-box"/>
</view>
<view class="view-result" v-show="courseList.length === 0">暂无数据</view>
</view>
@@ -73,7 +78,9 @@
<TaskItem :item="item" v-for="(item, index) in taskList"></TaskItem>
</view>
<view class="view-tips" v-if="activeTab === 'task' && taskList.length > 0">
{{ hasMore ? '滚动加载更多' : '全部加载完成' }}
{{ isLoading ? ''
: (showGetMore ? '滚动加载更多' : '全部加载完成') }}
<CommonLoading v-show="isLoading" class="loading-box"/>
</view>
<view class="view-result" v-show="taskList.length === 0">暂无数据</view>
</view>
@@ -94,7 +101,9 @@
<ExamItem class="exam-list" :item="item" v-for="item in examList"></ExamItem>
</view>
<view class="view-tips" v-if="activeTab === 'exam' && examList.length > 0">
{{ hasMore ? '滚动加载更多' : '全部加载完成' }}
{{ isLoading ? ''
: (showGetMore ? '滚动加载更多' : '全部加载完成') }}
<CommonLoading v-show="isLoading" class="loading-box"/>
</view>
<view class="view-result" v-show="examList.length === 0">暂无数据</view>
</view>
@@ -116,7 +125,7 @@ const fromType = ref('')
onLoad(params => {
inputValue.value = params.searchName
fromType.value = params.from
pageInfo.value.limit = fromType.value === 'course' ? 15 : 3
pageInfo.value.limit = fromType.value === 'course' ? 20 : 3
})
onShow(() => {
search()
@@ -236,16 +245,16 @@ const changeTab = item => {
case 'ability':
break
case 'course':
pageInfo.value.limit = 15
pageInfo.value.limit = 20
break
case 'task':
pageInfo.value.limit = 15
pageInfo.value.limit = 20
break
case 'test':
pageInfo.value.limit = 15
pageInfo.value.limit = 20
break
case 'exam':
pageInfo.value.limit = 15
pageInfo.value.limit = 20
break
default:
pageInfo.value.limit = 3
@@ -292,6 +301,7 @@ const getData = (flag = null) => {
taskList.value = []
}
let _isCourse = fromType.value === 'course' || activeTab.value==='course'
isLoading.value = true
appSearchCrsApi({
type: _isCourse ? '01'
: activeTab.value==='exam' ? '02'
@@ -328,15 +338,22 @@ const getData = (flag = null) => {
// pageInfo.value.total = res.total || 0
// break
// }
})
}).finally(()=> {
isLoading.value = false
})
}
const isLoading = ref(false)
const hasMore = computed(() => {
return pageInfo.value.limit * pageInfo.value.page <= pageInfo.value.total
return (pageInfo.value.limit * pageInfo.value.page <= pageInfo.value.total)
})
const showGetMore = computed(() => {
return hasMore.value || isLoading.value
})
const scrolltolower = () => {
if (!hasMore.value) {
return
}
if(!activeTab.value || activeTab.value === 'all') return
pageInfo.value.page += 1
getData()
}
@@ -376,6 +393,15 @@ const toCourseDetail = item => {
text-align: center;
color: #999;
font-size: 25rpx;
overflow: hidden;
min-height: 50rpx;
position: relative;
.loading-box{
position: absolute;
left:50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
.model-view {
border: 2px solid #f1f1f1;