Merge branch 'develop' into 'sit'

Develop

See merge request K17_AITS/tra-app!116
This commit is contained in:
田岩
2025-09-04 14:54:14 +08:00
21 changed files with 244 additions and 110 deletions
+5 -4
View File
@@ -15,20 +15,21 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# h5专用地址
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# 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'
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
# UAT
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
# 任东
# 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 -1
View File
@@ -9,7 +9,7 @@
<view class="item-title">{{itemInfo.crsName}}</view>
<scroll-view class="item-tags" :scroll-x="true">
<view class="item-tag-view">
<view class="item-tag" v-for="item in tagsShowList">{{item.tagName}}</view>
<view :class="['item-tag', this.activeTag.includes(item.tagId)?'active-tag':'']" v-for="item in tagsShowList">{{item.tagName}}</view>
</view>
</scroll-view>
<view class="item-publish">更新{{itemInfo.mtTime}}</view>
@@ -135,6 +135,11 @@
text-overflow: ellipsis;
max-width: 200rpx;
box-sizing: border-box;
&.active-tag{
background-color: #ffa150;
color: #fff;
border: 2rpx solid #ffa150;
}
}
}
}
+5 -1
View File
@@ -56,9 +56,13 @@
inputValue.value = newVal;
}
);
const clearText = () => {
console.log('清除搜索结果');
inputValue.value = ''
};
const search = () => {
emits('search', inputValue.value);
};
defineExpose({clearText})
</script>
<style scoped lang="scss"></style>
+6 -3
View File
@@ -16,7 +16,7 @@
<image class="talk-btn-icon" v-show="keyboardIsShow && !!answerValue" src="/src/static/images/course/send.png"
mode="" @click.stop="showKeyboard"></image>
</view>
<uv-overlay :show="showTalkingModel" opacity=".9" @click="showTalkingModel = false">
<uni-popup ref="talkModelRef" type="bottom" @click="showTalkingModel = false" mask-background-color="rgba(0,0,0,0.9)">
<view class="overlay-box">
<view class="circle-bg-box">
<view class="icon-box">
@@ -34,7 +34,7 @@
<image src="@/static/images/course/voice-white.gif" mode="" class="gif-box"></image>
</view>
</view>
</uv-overlay>
</uni-popup>
</view>
</template>
@@ -101,7 +101,8 @@
const showTalkingModel = ref(false)
const keyboardIsShow = ref(false)
const talkModelRef= ref()
watch(() => showTalkingModel.value, (val) => val ? talkModelRef.value.open() : talkModelRef.value.close())
watch(() => props.isLoading, () => {}, {
deep: true,
immediate: true
@@ -253,6 +254,8 @@
}
}
// #endif
// setTimeout(()=> {talkModelRef.value.open()}, 2000)
})
// 录音结束
+43 -9
View File
@@ -48,21 +48,23 @@
<view :class="['model-filter-list',showFilterList?'show':'']" @click="showFilterList = false"></view>
<uv-scroll-list class="tags-view" :indicator="false">
<uv-tags text="全部"
shape="circle"
plain
class="tags-item"
size="mini"
bgColor="#f6f8fa"
:borderColor="activeTag.length === 0 ? '#06f' : '#f6f8fa'"
:color="activeTag.length === 0 ? '#06f' : '#333'"
:class="activeTag.length === 0?'tags-item active-tags-item':'tags-item'"
size="medium"
: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'"
size="medium"
:bgColor="'#f6f8fa'"
:borderColor="activeTag.includes(item.value)?'#06f' : '#f6f8fa'"
:color="activeTag.includes(item.value)?'#06f' : '#333'"
@click="chooseTag(item)"
class="tags-item" size="mini"
:class="activeTag.includes(item.value)?'tags-item active-tags-item':'tags-item'"
></uv-tags>
</uv-scroll-list>
<view class="course-list">
@@ -556,13 +558,45 @@ import { onShow } from "@dcloudio/uni-app"
.tags-view{
height: 84rpx;
display: block;
padding: 20rpx 120rpx 20rpx 20rpx;
padding: 15rpx 120rpx 15rpx 20rpx;
box-sizing: border-box;
white-space: nowrap;
border-bottom: 2rpx solid #eee;
.tags-item{
margin-right: 30rpx;
display: inline-block;
&.active-tags-item{
position: relative;
overflow: hidden;
border-radius: 4rpx;
overflow: hidden;
&::before{
content: '';
display: block;
width: 40rpx;
height: 40rpx;
position: absolute;
right: -20rpx;
bottom: -20rpx;
transform: rotateZ(-45deg);
background-color: #06f;
overflow: hidden;
z-index: 10;
}
&::after{
content: '';
display: block;
width: 8rpx;
height: 4rpx;
position: absolute;
right: 3rpx;
bottom: 8rpx;
transform: rotateZ(-45deg);
border-left: 1px solid #fff;
border-bottom: 1px solid #fff;
z-index: 11;
}
}
::v-deep .uv-tags{
padding: 0 20rpx;
.uv-tags__text{
+18 -12
View File
@@ -239,22 +239,29 @@
try {
if (!id) {
common.loading('收藏中');
const result = await insertTraPersonalCollectionTask({
insertTraPersonalCollectionTask({
collectTyp: '01',
collectBusId: crsId.value
});
console.log('result.body', result.body);
form.value.collectId = result.body;
common.msg('收藏成功');
})
.then((result) => {
form.value.collectId = result.body;
common.msg('收藏成功');
})
.catch(() => {
common.hideLoading();
});
} else {
common.loading('取消收藏中');
await deleteTraPersonalCollectionById({
deleteTraPersonalCollectionById({
collectId: id
});
form.value.collectId = null;
common.msg('取消成功');
})
.then(() => {
form.value.collectId = null;
common.msg('取消成功');
})
.catch(() => {
common.hideLoading();
});
}
} catch (e) {
common.hideLoading();
@@ -277,7 +284,6 @@
});
onUnload(() => {
uni.$off('refresh_comment_data');
// 如果收藏变了,并且上一页是收藏页,更新收藏列表
if (form.value.collectId !== collectId.value) {
const pages = getCurrentPages();
@@ -26,7 +26,7 @@
:bold="true"
></uv-icon>
</view>
<view class="bottom">考试次数</view>
<view class="bottom">考试记录</view>
</view>
</view>
</view>
@@ -26,7 +26,7 @@
:bold="true"
></uv-icon>
</view>
<view class="bottom">练习次数</view>
<view class="bottom">练习记录</view>
</view>
</view>
</view>
@@ -26,7 +26,7 @@
:bold="true"
></uv-icon>
</view>
<view class="bottom">学习次数</view>
<view class="bottom">学习记录</view>
</view>
</view>
</view>
+11 -6
View File
@@ -1,5 +1,5 @@
<template>
<uni-popup ref="feedbackPopupRef" class="popup">
<uni-popup ref="feedbackPopupRef" class="popup" :mask-click="false">
<view class="feedback_popup_div" :style="{ marginBottom: feedback_popup_bottom }">
<view class="title_div">
<view class="text">反馈</view>
@@ -104,11 +104,8 @@
await new Promise((resolve) => setTimeout(resolve, delayTime));
}
common.hideLoading();
await nextTick(() => {
feedbackInfo.type = [];
feedbackInfo.text = '';
feedbackInfo.qnsId = '';
feedbackInfo.examId = '';
await nextTick(() => {
reset()
feedbackPopupRef.value.close();
setTimeout(() => {
common.msg('反馈信息提交成功');
@@ -119,10 +116,18 @@
common.hideLoading();
});
};
const reset = () => {
feedbackInfo.type = [];
feedbackInfo.text = '';
feedbackInfo.qnsId = '';
feedbackInfo.examId = '';
}
const openFeedback = (status) => {
if (status) {
feedbackPopupRef.value.open('bottom');
} else {
reset()
feedbackPopupRef.value.close();
}
};
+48 -19
View File
@@ -5,7 +5,9 @@
<view class="title ellipsis-text" @click="hand_in_paper_button_click()">
{{ paperData.papersName }}
</view>
<view class="back_div"></view>
<view class="back_div" @click="exit_examination">
<image :src="practiceExitIcon()" class="img"></image>
</view>
</view>
<view class="countdown-and-question-number-div">
<view class="top">
@@ -158,7 +160,7 @@
import common from '@/common/common';
import { getPageCache, setupKeyboardHeightListener } from '@/common/common';
import { commonUploadVoiceFile } from '@/api/common.js';
import { optionErrorIcon, examinationSheetIcon } from '@/common/imgSvg';
import { optionErrorIcon, examinationSheetIcon, practiceExitIcon } from '@/common/imgSvg';
import { commitPaperExam, commitCrsExam } from '@/api/examination.js';
const answerIsOver = ref(true);
const feedbackRef = ref(null);
@@ -167,7 +169,18 @@
const touchBtnRef = ref(null);
const countDownRef = ref(null);
let examinationStartTime = 0; // 考试开始时间
const style_button_1 = {
color: '#FFFFFF',
fontSize: '30rpx',
backgroundColor: '#0066FF',
borderRadius: '8rpx'
};
const style_button_2 = {
color: '#0066FF',
fontSize: '30rpx',
backgroundColor: '#E2EDFF',
borderRadius: '8rpx'
};
const mode = 'examination'; // 考试 examination 练习practice
const paperData = reactive({
crsId: '', // 课程ID,通过课程id是否为空字符串判断这个试卷是课程考试还是考试中心考试
@@ -334,15 +347,37 @@
countDownRef.value.start();
}, 500);
});
const exit_examination = () => {
dialogRef.value.open({
title: '确认现在退出吗?',
buttonList: [
{
key: 'revert',
name: '继续答题',
style: style_button_1
},
{
key: 'exit',
name: '退出考试',
style: style_button_2
}
]
});
};
const result_click = ({ key }) => {
console.log('杀杀杀', key);
if (key === 'hand_in_paper') {
// 现在交卷
hand_in_paper('弹窗确认交卷');
} else if (key === 'continue') {
// 继续考试
dialogRef.value.close();
} else if (key === 'exit') {
// 中途退出
dialogRef.value.close();
common.navigateBack();
} else if (key === 'revert') {
// 返回
dialogRef.value.close();
}
};
@@ -367,18 +402,6 @@
c: !!res.my_answer
}));
const style_button_1 = {
color: '#FFFFFF',
fontSize: '30rpx',
backgroundColor: '#0066FF',
borderRadius: '8rpx'
};
const style_button_2 = {
color: '#0066FF',
fontSize: '30rpx',
backgroundColor: '#E2EDFF',
borderRadius: '8rpx'
};
const incompleteNumber = topicList.length - completeList.length;
console.log('incompleteNumber', incompleteNumber);
console.log('completeList', completeList);
@@ -470,7 +493,7 @@
}
func.then((res) => {
// 考试完成事件
uni.$emit('exam_completed')
uni.$emit('exam_completed');
// 判断是否需要查分
const flagQueryDetail = res.body.flagQueryDetail === '' ? res.body.flagQuery : res.body.flagQueryDetail;
common.redirectTo(
@@ -772,7 +795,13 @@
top: 0;
width: 70rpx;
height: 70rpx;
// background-color: red;
display: flex;
align-items: center;
justify-content: flex-end;
.img {
width: 32rpx;
height: 32rpx;
}
}
}
@@ -26,7 +26,7 @@
:bold="true"
></uv-icon>
</view>
<view class="bottom">考试次数</view>
<view class="bottom">考试记录</view>
</view>
</view>
</view>
@@ -33,9 +33,13 @@
<text class="blod_color">{{ item.taskFinishSums ?? 0 }}/{{ item.taskSums ?? 0 }}</text>
</view>
<view>
进度
<text class="blod_color">{{ item.finishCrs ?? item.learnedNumber ?? 0 }}/{{ item.sumCrs ?? item.taskNumber ?? 0 }}门课程</text>
</view>
<!-- <view>
我的进度
<text class="blod_color">{{ item.myProcess ?? 0 }}%</text>
</view>
</view> -->
</view>
</view>
</view>
@@ -145,7 +149,8 @@
};
const updateData = (item) => {
console.log('收藏的updateData');
console.log('收藏的updateData', item);
console.log('收藏的updatedata_list', data_list);
const index = data_list.findIndex((res) => res.taskId === item.taskId);
console.log('updateData', index, item);
if (index !== -1) {
+1 -1
View File
@@ -655,7 +655,7 @@
...t,
hotContent: t.refineContent
}
})
}).filter(t=> t.refineContent)
})
}
const loadData = async () => {
+4 -3
View File
@@ -47,14 +47,14 @@
</view>
<!-- 滚动通知 -->
<view class="notice_div">
<uv-notice-bar
<!-- <uv-notice-bar
v-show="notice_text.length"
:text="notice_text"
:bgColor="null"
color="rgba(255,255,255,0.7)"
:speed="40"
direction="column"
></uv-notice-bar>
></uv-notice-bar> -->
</view>
<!-- 学习时长和飞天兔子为了挡住部分兔子只能多一个盒子 -->
<view class="study_duration_and_profile_div">
@@ -720,7 +720,8 @@
// margin-top: 10rpx;
margin-left: $bg-margin-left;
width: 400rpx;
height: 74rpx;
// height: 74rpx;
height: 34rpx;
font-weight: 500;
color: rgba(255, 255, 255, 0.7);
text-align: left;
+18 -9
View File
@@ -8,15 +8,16 @@
</view>
</template>
<script setup>
import common from '@/common/common';
import { ref, reactive, onMounted, nextTick, watch } from 'vue';
import itemVue from './content-item.vue';
import { queryAllTraTaskInfoByUserId } from '@/api/learningTasks.js';
const status = ref('loading'); // loadmore - loading - nomore -
const limit = 20;
const total = ref(-1);
const page = ref(0);
const data_list = reactive([]);
import common from '@/common/common';
import { ref, reactive, onMounted, nextTick } from 'vue';
import itemVue from './content-item.vue';
import { queryAllTraTaskInfoByUserId } from '@/api/learningTasks.js';
const props = defineProps({
state: {
type: String,
@@ -24,7 +25,7 @@
}
});
const getData = (from = '', searchText = '') => {
const getData = (from = '', _searchText = '') => {
if (from == 'first') {
if (total.value !== -1) {
return;
@@ -43,7 +44,7 @@
state: props.state,
page: page.value,
limit: limit,
taskName: searchText
taskName: _searchText || searchText.value
})
.then((res) => {
total.value = res.total;
@@ -62,10 +63,18 @@
const scrolltolower = (item) => {
getData();
};
const search = (value) => {
const searchText = ref('');
const search = (value, state) => {
console.log('value', value, state);
total.value = -1;
console.log('value', value);
getData('first', value);
searchText.value = value;
if (state) {
getData('first', value);
} else {
total.value = -1;
page.value = 1;
data_list.length = 0;
}
};
const updateData = (item) => {
const index = data_list.findIndex((res) => res.taskId === item.taskId);
+36 -22
View File
@@ -159,7 +159,7 @@
taskId: detailData.taskId
})
.then((res) => {
data_list.length = 0
data_list.length = 0;
data_list.push(...res.body);
})
.finally(() => {
@@ -184,20 +184,29 @@
try {
if (!id) {
common.loading('收藏中');
const res = await insertTraPersonalCollectionTask({
insertTraPersonalCollectionTask({
collectTyp: '02',
collectBusId: detailData.taskId
});
detailData.collectionId = res.body;
common.msg('收藏成功');
})
.then((res) => {
detailData.collectionId = res.body;
common.msg('收藏成功');
})
.catch(() => {
common.hideLoading();
});
} else {
common.loading('取消收藏中');
await deleteTraPersonalCollectionById({
deleteTraPersonalCollectionById({
collectId: id
});
detailData.collectionId = null;
common.msg('取消成功');
})
.then(() => {
detailData.collectionId = null;
common.msg('取消成功');
})
.catch(() => {
common.hideLoading();
});
}
} catch (e) {
common.hideLoading();
@@ -211,21 +220,22 @@
});
getData();
const updateFun = () => {
console.log('详情监听里面学习完成后更新任务历程');
queryTraTaskInfoByTaskId({taskId:detailData.taskId}).then(({body}) => {
uni.$emit('refresh_favorites_data', body)
Object.assign(detailData, {
...body
setTimeout(() => {
console.log('详情监听里面学习完成后更新任务历程');
queryTraTaskInfoByTaskId({ taskId: detailData.taskId }).then(({ body }) => {
uni.$emit('refresh_favorites_data', body);
Object.assign(detailData, {
...body
});
});
})
getData();
}
getData();
}, 4000);
};
// ,
uni.$on('refresh_course_list', () => updateFun())
uni.$on('refresh_course_list', () => updateFun());
// ,
uni.$on('exam_completed', () => updateFun())
uni.$on('exam_completed', () => updateFun());
});
onUnload(() => {
uni.$off('refresh_course_list');
@@ -236,12 +246,16 @@
if (pages.length >= 2) {
const prevPage = pages[pages.length - 2];
if (prevPage.route === 'pages/favorites/index') {
//
uni.$emit('refresh_favorites_list', {
type: 'task',
state: !!detailData.collectionId, //
old: collectId.value, // id
new: detailData.collectionId // id
});
} else if (prevPage.route === 'pages/learningTasks/index') {
//
uni.$emit('refresh_tasks_list', detailData);
}
}
}
+12 -7
View File
@@ -49,6 +49,7 @@
import common from '@/common/common.js';
const listItemRefs = ref([]);
const tabAct = ref(0);
const searchText = ref('');
const tabList = ref([
{
name: '全 部'
@@ -68,7 +69,11 @@
tabAct.value = item.detail.current;
};
const search = (value) => {
listItemRefs.value[tabAct.value]?.search(value);
listItemRefs.value[0]?.search(value, tabAct.value === 0);
listItemRefs.value[1]?.search(value, tabAct.value === 1);
listItemRefs.value[2]?.search(value, tabAct.value === 2);
};
onMounted(() => {
@@ -81,15 +86,15 @@
{
immediate: true
}
); // immediateonMounted
);
});
onLoad(() => {
uni.$on('refresh_tasks_list', (res) => {
console.log('列表监听里面学习完成后更新任务历程', res);
if(typeof listItemRefs.value[tabAct.value]?.updateData === 'function') {
listItemRefs.value[tabAct.value]?.updateData(res);
}
// item
if (typeof listItemRefs.value[tabAct.value]?.updateData === 'function') {
listItemRefs.value[tabAct.value]?.updateData(res);
}
});
});
onUnload(() => {
-1
View File
@@ -760,7 +760,6 @@
width: 32rpx;
height: 32rpx;
}
// background-color: red;
}
}
+14 -4
View File
@@ -33,7 +33,7 @@
}
});
const getData = (from = '', searchText = '') => {
const getData = (from = '', _searchText = '') => {
if (from === 'first') {
if (total.value !== -1) return;
status.value = 'loading';
@@ -48,7 +48,7 @@
setTimeout(() => {
let params = {
papersName: searchText,
papersName: _searchText || searchText.value,
page: page.value,
limit: limit
};
@@ -76,10 +76,20 @@
const scrolltolower = () => {
getData();
};
const search = (value) => {
const searchText = ref('');
const search = (value, state) => {
console.log('value', value, state);
total.value = -1;
getData('first', value);
searchText.value = value;
if (state) {
getData('first', value);
} else {
total.value = -1;
page.value = 1;
data_list.length = 0;
}
};
defineExpose({
getData,
search
+6 -2
View File
@@ -72,9 +72,13 @@
const swiperChange = (item) => {
tabAct.value = item.detail.current;
};
const search = (value) => {
contentRefs.value[tabAct.value]?.search(value);
}
contentRefs.value[0]?.search(value, tabAct.value === 0);
contentRefs.value[1]?.search(value, tabAct.value === 1);
contentRefs.value[2]?.search(value, tabAct.value === 2);
};
const gotoDetails = (item) => {
setPageCache('testing_hall_details', item)
common.navigateTo('/pages/testingHall/details');