From c77b7b31884cc9c305bfb51b2f51d0bb3cd93743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Tue, 19 Aug 2025 13:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 5 +- src/api/favorites.js | 16 + src/api/learningTasks.js | 13 + src/api/messageNotification.js | 34 ++ .../examination/characters-subject.vue | 3 +- src/components/examination/question.vue | 172 ++++---- src/components/examination/touchBtn.vue | 412 ++++++++++++++++++ src/pages/courseDetail/index.vue | 174 ++++---- src/pages/examination/index-old.vue | 201 --------- src/pages/examination/index.vue | 80 ++-- src/pages/index/index.vue | 10 +- .../learningTasks/components/list-item.vue | 14 +- src/pages/messageNotification/index.vue | 26 +- .../{type_2.png => type_01.png} | Bin .../{type_5.png => type_02.png} | Bin .../{type_1.png => type_03.png} | Bin 16 files changed, 723 insertions(+), 437 deletions(-) create mode 100644 src/api/learningTasks.js create mode 100644 src/api/messageNotification.js create mode 100644 src/components/examination/touchBtn.vue delete mode 100644 src/pages/examination/index-old.vue rename src/static/images/messageNotification/{type_2.png => type_01.png} (100%) rename src/static/images/messageNotification/{type_5.png => type_02.png} (100%) rename src/static/images/messageNotification/{type_1.png => type_03.png} (100%) diff --git a/.env.development b/.env.development index 1306b8df..861fc2db 100644 --- a/.env.development +++ b/.env.development @@ -17,4 +17,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # 王洋洋 #VITE_APP_BASE_H5_API_Url = 'http://25.64.16.140:9604' -VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' \ No newline at end of file +VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' +#岳世凯 +#VITE_APP_BASE_H5_API_Url = 'http://25.64.16.141:9701' + diff --git a/src/api/favorites.js b/src/api/favorites.js index 3ecc9254..70426dd6 100644 --- a/src/api/favorites.js +++ b/src/api/favorites.js @@ -31,3 +31,19 @@ export const deleteTraPersonalCollectionById = (data) => { }); }; + + +/* +新增任务收藏 +入参: + collectTyp 收藏类型 必须 String 01--课程,02--任务 + collectBusId 收藏业务ID 必须 String +**/ +export const insertTraPersonalCollectionTask = (data) => { + return request({ + url: base_url + '/traPersonalCollection/insertTraPersonalCollectionTask', + method: 'post', + toastErrors: true, + data + }); +}; \ No newline at end of file diff --git a/src/api/learningTasks.js b/src/api/learningTasks.js new file mode 100644 index 00000000..63794ae1 --- /dev/null +++ b/src/api/learningTasks.js @@ -0,0 +1,13 @@ +import request from '@/api/request' +const base_url = '/trastudy' + +// 查询所有、未完成、已完成的任务(分页) +export const queryAllTraTaskInfoByUserId = (data) => { + return request({ + url: base_url + '/traTaskInfo/queryAllTraTaskInfoByUserId', + method: 'post', + toastErrors: true, + data + }); +}; + diff --git a/src/api/messageNotification.js b/src/api/messageNotification.js new file mode 100644 index 00000000..72fa6ef2 --- /dev/null +++ b/src/api/messageNotification.js @@ -0,0 +1,34 @@ +import request from '@/api/request' +const base_url = '/trastudy' + +// 查询当前用户的所有消息通知 (分页) +export const queryTraPersonalMessageNoticePaging = (data) => { + return request({ + url: base_url + '/traPersonalMessageNotice/queryTraPersonalMessageNoticePaging', + method: 'post', + toastErrors: true, + data + }); +}; + + +// 读取单一消息 +export const readNotice = (data) => { + return request({ + url: base_url + '/traPersonalMessageNotice/readNotice', + method: 'post', + toastErrors: true, + data + }); +}; + + +// 一键读取所有消息(不展示) +export const oneTimeRead = (data) => { + return request({ + url: base_url + '/traPersonalMessageNotice/oneTimeRead', + method: 'post', + toastErrors: true, + data + }); +}; \ No newline at end of file diff --git a/src/components/examination/characters-subject.vue b/src/components/examination/characters-subject.vue index 19223c3c..03e8cc6a 100644 --- a/src/components/examination/characters-subject.vue +++ b/src/components/examination/characters-subject.vue @@ -25,7 +25,6 @@ - \ No newline at end of file diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index 76a2a5a3..d849c82b 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -15,40 +15,45 @@ - + 知识点 {{ form.pgrphNum || 0 }} - - + 已学 {{ form.styParaGraphNum || 0 }} - - + 考试排行榜 - - - - - + + + + - + - + :inactive-style="{ color: '#666666', 'font-size': '30rpx' }" + > @@ -61,66 +66,46 @@ - - + - @@ -227,8 +226,8 @@ left: 25%; width: 40%; height: 40%; - border-top: 4rpx solid #FFFFFF; - border-left: 4rpx solid #FFFFFF; + border-top: 4rpx solid #ffffff; + border-left: 4rpx solid #ffffff; transform: rotate(-45deg); } } @@ -254,7 +253,6 @@ height: 100%; display: flex; flex-direction: column; - } .body-head { @@ -273,7 +271,6 @@ } } - .head-title { border-radius: 24rpx 24rpx 0rpx 0rpx; // height: 162rpx; @@ -307,7 +304,7 @@ display: flex; .examination { - color: #0066FF; + color: #0066ff; .back-icon { position: relative; @@ -328,8 +325,8 @@ left: 25%; width: 40%; height: 40%; - border-top: 4rpx solid #0066FF; - border-left: 4rpx solid #0066FF; + border-top: 4rpx solid #0066ff; + border-left: 4rpx solid #0066ff; transform: rotate(135deg); } } @@ -342,7 +339,6 @@ padding-right: 16rpx; padding-top: 20rpx; padding-bottom: 245rpx; - } .body-tab { @@ -371,7 +367,7 @@ padding-top: 37rpx; justify-content: space-around; background-color: #ffffff; - border: 2rpx solid #E5E5E5; + border: 2rpx solid #e5e5e5; z-index: 1000; :deep(.uv-button-wrapper) { @@ -402,8 +398,6 @@ height: 30rpx; } - - .learn { color: #1dd17a; } @@ -416,4 +410,4 @@ font-weight: 600; color: #000000; } - \ No newline at end of file + diff --git a/src/pages/examination/index-old.vue b/src/pages/examination/index-old.vue deleted file mode 100644 index 335e4571..00000000 --- a/src/pages/examination/index-old.vue +++ /dev/null @@ -1,201 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue index fee54ac3..9f4760af 100644 --- a/src/pages/examination/index.vue +++ b/src/pages/examination/index.vue @@ -43,7 +43,7 @@ - + @@ -60,13 +60,13 @@ - + - + 答题卡 @@ -107,7 +107,7 @@ import Dialog from './components/dialog.vue' import RadioSubject from '@/components/examination/radio-subject.vue' import CharactersSubject from '@/components/examination/characters-subject.vue' - import TouchBtn from '@/pages/course/components/touchBtn.vue' + import TouchBtn from '@/components/examination/touchBtn.vue' import { ref, reactive, @@ -134,7 +134,7 @@ queryPaperExamScore } from '@/api/examination.js' - const sendLoadingText = ref('问题回答中,请在问题回答结束后重试!') + const answerIsOver = ref(true) const feedbackRef = ref(null) const dialogRef = ref(null) @@ -149,9 +149,9 @@ papersName: '', // 试卷名称 }) // 试卷信息 const topicList = reactive([]) // 问题列表 - + const popup_input_bottom = ref('0px') const questionNumber = ref(0) // 题号 - + const systemInfo = uni.getSystemInfoSync(); const showTouchBtn = computed(() => { return topicList[questionNumber.value]['qnsTyp'] === 'ES' }) @@ -207,53 +207,32 @@ } const voicePathValue = ref('') + + // 录音按钮提交 + const touchBtnSubmit = (type, submitObj) => { + if (type === 'voice') { + uploadRecordNow(submitObj) + }else if (type === 'text') { + + } + } // 发送语音 const uploadRecordNow = (voicePath) => { - //#ifdef APP-PLUS + commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {}).then(res => { let _res = JSON.parse(res.data) voicePathValue.value = voicePath console.log('_res', _res, voicePath); - if (_res.rtnCode === '0000') { - - // "chatId": "CHAT025018122068202508081537410000000000000000000000000000000088", - // "fileId": "S3F0250181220722025080815374100000456565", - // "ossFileAddr": "http://25.18.122.66::9786/traoss/show//S3F0250181220722025080815374100000456565", - // "transContent": "下面那几个跟。" - - // activeVoiceId.value = - // if (!!(_res.body.transContent || '').trim()) { - // askData.value = { - // reqBatch: reqBatch.value, - // intrctWay: '02', //01-文本;02-语音;03-图片 - // intrctContent: _res.body.transContent, - // bucketKey: _res.body.fileId, - // ossFileAddr: _res.body.ossFileAddr, - // talkingVoice: voicePath - // } - // sendMessage({ - // "commond": 'ASK', - // "body": askData.value - // }) - // } else { - // // talkingList.value.pop() - // uni.showToast({ - // title: '未识别到文字!', - // icon: "none", - // duration: 1000 - // }); - // } - } else {} + + } }).catch(err => { - // talkingList.value.pop() uni.showToast({ title: '系统异常,请联系管理员', icon: "none", duration: 1000 }); }) - // #endif } // 发送文本 const submitAnswerNow = (val, cb = null) => { @@ -277,6 +256,18 @@ my_answer: [], backend_answer: [], }))) + // 安全区域底部到屏幕底部的高度(即底部安全区域高度) + 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); + }); }); const result_click = ({ @@ -366,7 +357,7 @@ } } }) - + console.log('answerDtoList', answerDtoList); dialogRef.value.close() common.loading('正在提交') @@ -382,7 +373,7 @@ } else { // 不需要查分 common.navigateBack() } - + // const execId = res.body.execId // let timer = setInterval(() => { // queryPaperExamScore({ @@ -413,6 +404,7 @@ padding: 0 38rpx; .sheet_popup_div { + width: 100%; height: 100%; background-color: #FFFFFF; @@ -535,7 +527,7 @@ justify-content: space-between; align-items: center; padding: 0 20rpx 20rpx 20rpx; - + .sheet_button { display: flex; flex-direction: column; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 3fba1e87..92e0d127 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -130,7 +130,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -197,7 +197,7 @@ - + @@ -389,8 +389,8 @@ common.navigateTo('/pages/search/search') } // 进入课程详情页 - const goto_course_detail = (crsNum) => { - common.navigateTo('/pages/courseDetail/index?crsNum=' + crsNum) + const goto_course_detail = (crsId) => { + common.navigateTo('/pages/courseDetail/index?crsId=' + crsId) } const scrolltolower = () => { common.navigateTo('/pages/index/dialog', { diff --git a/src/pages/learningTasks/components/list-item.vue b/src/pages/learningTasks/components/list-item.vue index 31004200..111f74ef 100644 --- a/src/pages/learningTasks/components/list-item.vue +++ b/src/pages/learningTasks/components/list-item.vue @@ -16,10 +16,10 @@ - JBank银行服务礼仪与投诉... + {{item.taskName}} - - 起止时间:2025-05-13至2025-05-13 + + 起止时间:{{item.startTm?.substr(0, 10)}}至{{item.endTm?.substr(0, 10)}} @@ -49,8 +49,8 @@ } from 'vue' import { - queryTraCrsBbsInfoByCrsId, - } from '@/api/courseDetail.js'; + queryAllTraTaskInfoByUserId, + } from '@/api/learningTasks.js'; const getData = (from = '') => { if (from == 'first') { if (total.value !== -1) { @@ -66,8 +66,8 @@ page.value++ } setTimeout(() => { - queryTraCrsBbsInfoByCrsId({ - crsId: 'CRS0250181220722025070408313900000018729', + queryAllTraTaskInfoByUserId({ + state: '01', page: page.value, limit: limit }).then(res => { diff --git a/src/pages/messageNotification/index.vue b/src/pages/messageNotification/index.vue index 7cc98cf3..e3a17740 100644 --- a/src/pages/messageNotification/index.vue +++ b/src/pages/messageNotification/index.vue @@ -15,36 +15,34 @@ suffixIcon="search" :customStyle="customStyle" :suffixIconStyle="suffixIconStyle"> - - 下拉显示 + + v-for="(item, index) in data_list"> - + - 新任务提醒 + {{item.noticeTitle}} - 2025-05-05 + {{item.ctTime.substr(0, 16)}} - - 您的学习任务 + + {{item.noticeContent}} - {{item}} + @@ -70,8 +68,9 @@ onLoad } from '@dcloudio/uni-app' import { - queryTraCrsBbsInfoByCrsId - } from '@/api/courseDetail.js'; + queryTraPersonalMessageNoticePaging + } from '@/api/messageNotification.js'; + const customStyle = { backgroundColor: "#ffffff", paddingLeft: "40rpx", @@ -135,8 +134,7 @@ console.log(status.value, '阿斯顿撒'); setTimeout(() => { - queryTraCrsBbsInfoByCrsId({ - crsId: 'CRS0250181220722025070408313900000018729', + queryTraPersonalMessageNoticePaging({ page: page.value, limit: limit }).then(res => { diff --git a/src/static/images/messageNotification/type_2.png b/src/static/images/messageNotification/type_01.png similarity index 100% rename from src/static/images/messageNotification/type_2.png rename to src/static/images/messageNotification/type_01.png diff --git a/src/static/images/messageNotification/type_5.png b/src/static/images/messageNotification/type_02.png similarity index 100% rename from src/static/images/messageNotification/type_5.png rename to src/static/images/messageNotification/type_02.png diff --git a/src/static/images/messageNotification/type_1.png b/src/static/images/messageNotification/type_03.png similarity index 100% rename from src/static/images/messageNotification/type_1.png rename to src/static/images/messageNotification/type_03.png