修改bug

This commit is contained in:
田岩
2025-09-02 15:07:06 +08:00
parent 14f3b2e294
commit 05f56c3ce1
16 changed files with 179 additions and 102 deletions
+5 -5
View File
@@ -6,18 +6,18 @@ ENV = 'development'
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
# DEV
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# app入口
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7002'
#VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786'
#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# h5专用地址
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
#VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# 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.116:7001'
# 任东
@@ -26,7 +26,7 @@ VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.130:9604'
# 张建成
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
# 王洋洋
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
# 于嘉文
+6 -3
View File
@@ -112,8 +112,11 @@ export const queryCurrentUser = (data) => request({
// userId: "USER001"
// userName: "ADMIN" / todo name
// userStatus: "01"
setUserInfo(res.body)
const userInfo = getUserInfo()
setUserInfo({
...userInfo,
...res.body
})
console.log('预加载头像');
const base_url = get_base_url()
@@ -121,7 +124,7 @@ export const queryCurrentUser = (data) => request({
// #ifdef APP-PLUS
// 更新用户信息中的头像路径
const updateUserAvatar = (imagePath) => {
const userInfo = getUserInfo()
setUserInfo({
...userInfo,
'imagePath': imagePath
+1
View File
@@ -40,6 +40,7 @@ export const goto_login_fun = (from = 'http') => {
const page = pages[pages.length - 1];
page_route = page.route
}
console.log('当前页路由', page_route);
if (page_route === 'pages/login/login') return;
common.hideLoading()
common.show('未登录', '现在去登录', false).then(() => {
+6 -1
View File
@@ -203,7 +203,12 @@
});
// 声音加载完毕
audioStore.onAudioLoaded((e) => {
voiceTime.value = (Math.ceil(e.duration) || 1) + 's';
// 计算原始时长
const originalTime = Math.ceil(e.duration) || 1;
// 判断是否在118-123秒范围内
const displayTime = originalTime >= 118 && originalTime <= 124 ? 120 : originalTime;
// 赋值显示
voiceTime.value = displayTime + 's';
});
watch(
-4
View File
@@ -96,7 +96,6 @@
default: '请稍后再试!',
type: String
},
canAnswer: {
default: true,
type: Boolean
@@ -150,7 +149,6 @@
// 结束录音
const stopRecord = (status = false) => {
if (props.isDisabled) return;
console.log('结束录音嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻');
if (startTimer.value) {
clearTimeout(startTimer.value);
startTimer.value = null;
@@ -170,10 +168,8 @@
});
}, times);
}
nextTick(() => (recordingStatus.value = 'not_started'));
};
onMounted(async () => {
// #ifdef APP-PLUS
recorderManager.onStop(function (res) {
+4 -1
View File
@@ -130,7 +130,8 @@
{
"path": "pages/mascot/mascot_select_list",
"style": {
"navigationBarTitleText": "",
"navigationBarTitleText": "吉祥物列表",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -203,6 +204,7 @@
"path": "pages/examination/index",
"style": {
"navigationBarTitleText": "考试",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -221,6 +223,7 @@
"path": "pages/practice/index",
"style": {
"navigationBarTitleText": "练习",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
+49 -28
View File
@@ -109,22 +109,24 @@
<image :src="optionErrorIcon('#000000')" class="img"></image>
</view>
</view>
<view class="sheet_table">
<view
class="sheet_table_item"
v-for="(item, index) in topicList"
:class="{
current: index === questionNumber,
mark: markList.includes(item.qnsId),
completed: completedListStatus[index]
}"
@click="click_sheet_item(index)"
>
<view class="circle">
{{ index + 1 }}
<scroll-view :scroll-y="true" class="sheet_table_scroll" :show-scrollbar="false">
<view class="sheet_table">
<view
class="sheet_table_item"
v-for="(item, index) in topicList"
:class="{
current: index === questionNumber,
mark: markList.includes(item.qnsId),
completed: completedListStatus[index]
}"
@click="click_sheet_item(index)"
>
<view class="circle">
{{ index + 1 }}
</view>
</view>
</view>
</view>
</scroll-view>
<view class="sheet_button">
<uv-button
class="button"
@@ -344,7 +346,16 @@
console.log('点击交卷', paperData);
// 判断是否完成所有题目
const completeList = topicList
.filter((res) => !!(Array.isArray(res.my_answer) ? res.my_answer.length > 0 : res.my_answer?.anserResult !== ''))
.filter((res) => {
const myAnswer = res.my_answer;
if (Array.isArray(myAnswer)) {
return myAnswer.length > 0;
}
if (typeof myAnswer === 'object' && myAnswer !== null) {
return typeof myAnswer.anserResult === 'string' && myAnswer.anserResult !== '';
}
return false;
})
.map((res) => ({
a: res.qnsId,
b: res.my_answer,
@@ -364,8 +375,10 @@
borderRadius: '8rpx'
};
const incompleteNumber = topicList.length - completeList.length;
console.log('completeList', completeList);
console.log('incompleteNumber', incompleteNumber);
console.log('completeList', completeList);
console.log('topicList', topicList);
if (incompleteNumber === 0) {
// 完成
dialogConfiguration.title = '确认现在交卷吗?';
@@ -452,15 +465,16 @@
}
func.then((res) => {
// 判断是否需要查分
if (res.body.flagQuery === 'Y') {
// 需要查分
common.redirectTo(
`/pages/examination/result?execId=${res.body.execId}&examLenTm=${examLenTm}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=${mode}&crsId=${paperData.crsId}`
);
} else {
// todo 此处应该有个弹窗交代下结果
common.navigateBack();
}
common.redirectTo(
`/pages/examination/result?execId=${res.body.execId}&flagQuery=${res.body.flagQuery}&flagQueryDetail=${res.body.flagQueryDetail}&examLenTm=${examLenTm}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=${mode}&crsId=${paperData.crsId}`
);
// if (res.body.flagQuery === 'Y') {
// // 需要查分
// } else {
// // todo 此处应该有个弹窗交代下结果
// common.navigateBack();
// }
})
.catch((res) => {
console.log('error', res);
@@ -525,13 +539,19 @@
height: 30rpx;
}
}
.sheet_table_scroll {
max-height: calc(80vh - 180rpx);
// background-color: red;
width: calc(100vw - 108rpx);
}
.sheet_table {
width: 100%;
margin-top: 48rpx;
margin-bottom: 48rpx;
display: flex;
flex-wrap: wrap;
width: calc(100vw - 108rpx);
align-content: space-between;
.sheet_table_item {
@@ -642,7 +662,8 @@
}
.scroll-Y {
max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx);
// 应该问答题才能减去160的输入框高度
max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx - 160rpx);
min-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx - 380rpx);
// background-color: yellow;
}
+80 -32
View File
@@ -15,22 +15,21 @@
:scroll-with-animation="true"
:show-scrollbar="false"
>
<view class="information-details-div">
<view class="information-details-div" :class="{ unable: flagQuery === 'N' }">
<view class="top">
<view class="left">
<view class="top">得分</view>
<view class="mid">
<view class="mid" v-show="flagQuery === 'Y'">
<text v-if="pass_status === 0" class="loading-pass">--</text>
<text v-if="pass_status === -1" class="no-pass">{{ result.examGrade }}</text>
<text v-if="pass_status === 1" class="pass">{{ result.examGrade }}</text>
</view>
<view class="bottom" v-if="result.passGrade">
<view class="bottom" v-if="result.passGrade && flagQuery === 'Y'">
<text class="">通过分数{{ result.passGrade }}</text>
</view>
<view class="unable_text_dev" v-if="flagQuery === 'N'">无法查看</view>
<view class="bottom">
<text v-if="pass_status === -1">失败乃成功之母继续努力</text>
<text v-if="pass_status === 1">考的不错啊继续加油</text>
<text v-if="pass_status === 0">考试结果计算中...</text>
<text>{{ statusText }}</text>
<image
v-if="pass_status === 1"
src="@/static/images/login/clap.png"
@@ -40,25 +39,8 @@
</view>
</view>
<view class="right">
<view class="img_div">
<image
v-if="pass_status === 1"
src="@/static/images/examination/qualified.png"
mode="aspectFit"
class="img"
></image>
<image
v-if="pass_status === -1"
src="@/static/images/examination/unqualified.png"
mode="aspectFit"
class="img"
></image>
<image
v-if="pass_status === 0"
src="@/static/images/examination/getting_in.gif"
mode="aspectFit"
class="img"
></image>
<view class="img_div unable_img">
<image :src="statusImage" mode="aspectFit" class="img"></image>
</view>
</view>
</view>
@@ -92,6 +74,7 @@
</view>
</view>
<view class="main-div">
<view class="answer_title">答题详情</view>
<view class="sheet_table_div" v-if="pass_status !== 0 && topicList.length > 0">
<swiper
:indicator-dots="false"
@@ -113,11 +96,16 @@
</swiper>
<view class="swiper-dots"></view>
</view>
<!-- 获取答题结果时候的图片 -->
<view class="loading-pass-image-div" v-if="pass_status === 0">
<image src="@/static/images/examination/getting_robot.png" mode="widthFix" class="img"></image>
<view class="loading-pass-image-div" v-if="pass_status === 0 && flagQueryDetail === 'Y'">
<image src="@/static/images/examination/getting_robot.png" mode="widthFix" class="await_img img"></image>
<view class="tip">你的等待会有更精确的结果要耐心哦~</view>
</view>
<view class="loading-pass-image-div" v-if="flagQueryDetail === 'N'">
<image src="@/static/images/examination/unable_img.png" mode="widthFix" class="img"></image>
<view class="tip">您暂无权限查看此试卷详情</view>
</view>
<view
class=""
v-show="index === sheet_index"
@@ -132,6 +120,10 @@
</template>
<script setup>
import qualified from '@/static/images/examination/qualified.png';
import unqualified from '@/static/images/examination/unqualified.png';
import getting_in from '@/static/images/examination/getting_in.gif';
import { onLoad, onUnload } from '@dcloudio/uni-app';
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from 'vue';
import { queryPaperExamScore } from '@/api/examination.js';
@@ -168,15 +160,43 @@
}
return groups;
});
const flagQuery = ref('N');
const flagQueryDetail = ref('N');
const scrollTop = ref(0);
const topic = ref();
const sheet_index = ref(-1);
const statusImage = computed(() => {
//
if (pass_status.value === 1) {
return qualified;
} else if (pass_status.value === -1 || flagQuery.value === 'N') {
return unqualified;
} else if (pass_status.value === 0 && flagQuery.value !== 'N') {
return getting_in;
}
//
return unqualified;
});
const statusText = computed(() => {
if (flagQuery.value === 'N') {
return '您无权限查看此试卷';
} else if (flagQuery.value === 'Y') {
switch (pass_status.value) {
case -1:
return '失败乃成功之母,继续努力';
case 1:
return '考的不错啊,继续加油';
case 0:
return '考试结果计算中...';
default:
return ''; //
}
}
return ''; //
});
//
const sheet_click = (index) => {
// console.log('topicList', topicList[index]);
// topic.value = topicList[index]
sheet_index.value = index;
// scrollTop.value = index * 200;
};
const scroll = (event) => {};
@@ -264,7 +284,11 @@
result.mode = e.mode || '';
result.papersId = e.papersId;
get_result();
flagQueryDetail.value = e.flagQueryDetail;
flagQuery.value = e.flagQuery;
if (flagQueryDetail.value === 'Y' || flagQuery.value === 'Y') {
get_result();
}
});
//
onUnload(() => {
@@ -305,7 +329,29 @@
</script>
<style scoped lang="scss">
//
.unable {
.unable_text_dev {
font-weight: 600;
font-size: 46rpx;
color: #9f9fa1;
text-align: left;
}
.unable_img {
filter: blur(4px); /* 模糊程度,值越大越模糊 */
}
}
$bg-margin-left: 30rpx;
.answer_title {
font-weight: 600;
font-size: 32rpx;
color: #000000;
line-height: 44rpx;
text-align: left;
margin-left: $bg-margin-left;
}
.current {
background-color: rgba(0, 102, 255, 0.6);
border-color: #0066ff;
@@ -469,10 +515,12 @@
align-items: center;
padding-top: 80rpx;
padding-bottom: 100rpx;
// background-color: red;
.img {
// background-color: red;
width: 52vw;
}
.await_img {
margin-left: -100rpx;
}
@@ -33,8 +33,8 @@
</view>
</uv-swipe-action-item>
</uv-swipe-action>
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
<list-no-data v-if="total == 0 && status == 'nomore'">暂无数据</list-no-data>
<uv-load-more v-if="total !== 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
</scroll-view>
</view>
</template>
@@ -41,8 +41,8 @@
</view>
</uv-swipe-action-item>
</uv-swipe-action>
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
<list-no-data v-if="total == 0 && status == 'nomore'">暂无数据</list-no-data>
<uv-load-more v-if="total !== 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
</scroll-view>
</view>
</template>
+4 -3
View File
@@ -19,7 +19,7 @@
<view class="message_div" @click="common.navigateTo('/pages/messageNotification/index')">
<image src="@/static/images/index/message_b.png" class="message_img"></image>
<view class="message_text">消息</view>
<view class="message_num message_num_font">30</view>
<view class="message_num message_num_font" v-if="no_read_message_num>0">{{no_read_message_num}}</view>
</view>
</view>
<!-- 文字logo -->
@@ -42,7 +42,7 @@
<view class="message_div" @click="common.navigateTo('/pages/messageNotification/index')">
<image src="@/static/images/index/message.png" class="message_img"></image>
<view class="message_text">消息</view>
<view class="message_num message_num_font">30</view>
<view class="message_num message_num_font" v-if="no_read_message_num>0">{{no_read_message_num}}</view>
</view>
</view>
<!-- 滚动通知 -->
@@ -284,6 +284,7 @@
import { noticeMessageCount } from '@/api/messageNotification.js';
const scrollTop = ref(0);
const no_read_message_num = ref(0);
const mascotShow = ref(false);
const stdtTmLenRef = ref(null);
const accmPracticeCntRef = ref(null);
@@ -452,7 +453,7 @@
recommend_class_list.value = res.body;
});
noticeMessageCount().then(res => {
console.log('res', res);
no_read_message_num.value = res.body
})
});
onHide(() => {});
+2 -1
View File
@@ -9,7 +9,7 @@
</view>
<view class="detail_div">
<view class="left">
<image src="/src/static/images/test/2.png" mode="aspectFill" class="img"></image>
<image-preview class="img" :src="detailData.ossAddr" mode="scaleToFill"></image-preview>
</view>
<view class="right">
<view class="title_div">
@@ -474,6 +474,7 @@
width: 225rpx;
height: 169rpx;
border-radius: 16rpx;
overflow: hidden;
}
.right {
overflow: hidden;
+12 -17
View File
@@ -23,18 +23,13 @@
>
<view class="item" v-for="(item, index) in data_list" @click="readMessageOpen(item)">
<view class="icon">
<image
class="img_100"
:src="imageMap[item.noticeTyp]"
mode="widthFix"
></image>
<image class="img_100" :src="imageMap[item.noticeTyp]" mode="widthFix"></image>
<!-- <image
v-if="item.noticeTyp == '02'"
class="img_100"
src="@/static/images/messageNotification/type_02.png"
mode="widthFix"
></image> -->
</view>
<view class="right">
<view class="top">
@@ -54,8 +49,8 @@
</view>
</view>
</view>
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
<uv-load-more :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
<list-no-data v-if="total == 0 && status == 'nomore'">暂无数据</list-no-data>
<uv-load-more v-if="total !== 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
</scroll-view>
<uni-popup ref="popup" type="bottom">
<view class="popup">
@@ -78,19 +73,19 @@
import { onLoad } from '@dcloudio/uni-app';
import { queryTraPersonalMessageNoticePaging, readNotice, oneTimeRead } from '@/api/messageNotification.js';
import common from '../../common/common';
import type_01 from '@/static/images/messageNotification/type_01.png';
import type_02 from '@/static/images/messageNotification/type_02.png';
import type_03 from '@/static/images/messageNotification/type_03.png';
import type_04 from '@/static/images/messageNotification/type_04.png';
const imageMap = {
'01': type_01,
'02': type_02,
'03': type_03,
'04': type_04,
'01': type_01,
'02': type_02,
'03': type_03,
'04': type_04
};
const status = ref('loadmore'); // loadmore - loading - nomore -
const limit = 20;
const total = ref(-1);
@@ -116,7 +111,7 @@
page.data_list.length = 0;
getData();
};
//
const onRefresh = () => {
if (_freshing.value) return;
@@ -126,7 +121,7 @@
_freshing.value = false;
}, 1000);
};
const getData = (from = '') => {
if (from === 'first') {
if (total.value !== -1) {
@@ -13,8 +13,8 @@
<view class="time_and_num"></view>
</view>
</view>
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
<list-no-data v-if="total == 0 && status == 'nomore'">暂无数据</list-no-data>
<uv-load-more v-if="total !== 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
</scroll-view>
</view>
</template>
+4 -1
View File
@@ -66,7 +66,8 @@
{
"path": "pages/mascot/mascot_select_list",
"style": {
"navigationBarTitleText": "",
"navigationBarTitleText": "吉祥物列表",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -139,6 +140,7 @@
"path": "pages/examination/index",
"style": {
"navigationBarTitleText": "考试",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
@@ -157,6 +159,7 @@
"path": "pages/practice/index",
"style": {
"navigationBarTitleText": "练习",
"disableSwipeBack": true,
"app-plus": {
"titleNView": false
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB