diff --git a/.env.development b/.env.development index 224e7ca9..8d53a6b2 100644 --- a/.env.development +++ b/.env.development @@ -6,27 +6,29 @@ 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' +VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002' +#VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002' +# 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' # 任东 -# 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_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_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' # 于嘉文 diff --git a/src/api/index.js b/src/api/index.js index 5f5e6a05..cd5e5e84 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -85,4 +85,7 @@ export const queryCrsInfoByRecmd = (data) => { method: 'post', data }); -}; \ No newline at end of file +}; + + + diff --git a/src/api/login.js b/src/api/login.js index 4e9e0601..9b9644e4 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -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 diff --git a/src/api/messageNotification.js b/src/api/messageNotification.js index 72fa6ef2..3022df25 100644 --- a/src/api/messageNotification.js +++ b/src/api/messageNotification.js @@ -31,4 +31,12 @@ export const oneTimeRead = (data) => { toastErrors: true, data }); +}; + +export const noticeMessageCount = (data) => { + return request({ + url: base_url + '/traPersonalMessageNotice/noticeMessageCount', + method: 'post', + data + }); }; \ No newline at end of file diff --git a/src/api/request.js b/src/api/request.js index c0ec1b72..9c602f2d 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -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(() => { diff --git a/src/components/examination/question.vue b/src/components/examination/question.vue index c64fc6c8..c07cb837 100644 --- a/src/components/examination/question.vue +++ b/src/components/examination/question.vue @@ -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( diff --git a/src/components/examination/touchBtn.vue b/src/components/examination/touchBtn.vue index e5ed1e6a..63ae6fd5 100644 --- a/src/components/examination/touchBtn.vue +++ b/src/components/examination/touchBtn.vue @@ -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) { diff --git a/src/pages.json b/src/pages.json index 201d7d54..0f86c625 100644 --- a/src/pages.json +++ b/src/pages.json @@ -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 } diff --git a/src/pages/course/index.vue b/src/pages/course/index.vue index bf86c119..d164e13b 100644 --- a/src/pages/course/index.vue +++ b/src/pages/course/index.vue @@ -45,6 +45,7 @@ 筛选 + { + changeTab({name:activeTab.value || '全部'}) + }); + }) + onUnmounted(() => { + uni.$off('refresh_course_list'); }) onActivated(() => { // 重新获取标签信息 @@ -426,7 +434,7 @@ import { onShow } from "@dcloudio/uni-app" height: 588rpx; padding-bottom: 80rpx; overflow-y: hidden; - z-index: 2; + z-index: 10; background-color: #f9f9f9; box-shadow: 0rpx 12rpx 20rpx rgba(160,160,160,.25); border-radius: 0 0 0rpx 0rpx; @@ -504,7 +512,17 @@ import { onShow } from "@dcloudio/uni-app" } } } - .filter-list{ + .model-filter-list{ + position: fixed; + width: 100vw; + height: 100vh; + overflow: hidden; + top: 0; + left: 0; + z-index: 1; + } + .filter-list, + .model-filter-list{ display: none; &.show{ display: block; diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 7f4f777c..77821c3c 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -35,7 +35,7 @@ 开启学习之旅 - + {{ chooseRate }}倍 @@ -80,6 +80,7 @@ :isLoading="isUploadingVoice" :onlyVoice="answerOnlyVoice" :canAnswer="testAnswer" + :adjustPosition="true" :canAnswerText="'每个问题最多连续发送五次答案!'" :isDisabled="(lastTalkingInfo.type || 0) !== 4" /> @@ -123,7 +124,7 @@ import { reactive, ref, computed, unref, onMounted, onUnmounted, getCurrentInstance, nextTick } from 'vue' import { onLoad, onShow, onUnload, onHide } from '@dcloudio/uni-app' import { previewFile, downloadFile, commonUploadVoiceFile, downloadVoiceFile, uploadVoiceFile } from '@/api/common.js' -import { getToken } from '@/common/common.js' +import { getToken, getPhoneEnvBool } from '@/common/common.js' import { get_base_url, goto_login_fun } from '@/api/request' import { getCourseStudyInfoApi, afreshStudyCourseApi, queryQuestionEvalateApi, textChartApi, setStudyTeacherApi, textChartPreviewApi, previewAfreshStudyCourse } from '@/api/study.js' import common from '@/common/common' @@ -154,6 +155,7 @@ const inputRef = ref('') const flagVal = ref('1') const isUploadingVoice = ref(false) const isPreview = ref(false) +const IsAndEnv = ref(getPhoneEnvBool('AND')) const ajaxApi = computed(() => (isPreview.value ? textChartPreviewApi : textChartApi)) @@ -347,6 +349,7 @@ const showOrder = ref(0) const isLastPgrph = ref(false) const backRouter = () => { // common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`) + uni.$emit('refresh_course_list') common.navigateBack() } @@ -395,6 +398,7 @@ const getGraphInfoUnStudy = (flag = 0) => { }) .finally(() => {}) } + uni.$emit('refresh_course_list') return } lastTalkingInfo.value = { @@ -664,6 +668,7 @@ const sendMessage = data => { const startPgrphId = ref('') const imageId = ref('') onLoad(params => { + changeAppHeightBottom() watchFlag.value = 1 isPreview.value = params.isPreview === 'preview' crsId.value = params.crsId || '' @@ -680,7 +685,23 @@ onMounted(() => { const keyboardHeight = ref('0px') const setHeight = res => { keyboardHeight.value = res.height + 'px' - scrollToBottomNow() + // scrollToBottomNow() +} + +const keyBoardIsHide = computed(() => { + return parseInt(keyboardHeight.value) == 0 +}) +const bottomHeight = ref('0px') +const totalBotHeight = computed(() => { + return keyBoardIsHide.value ? 0 + 'px' : parseInt(keyboardHeight.value) - parseInt(bottomHeight.value) + 'px' +}) +const changeAppHeightBottom = height => { + //#ifdef APP-PLUS + // 获取系统信息 + const systemInfo = uni.getSystemInfoSync() + // 计算安全区域底部高度 + bottomHeight.value = systemInfo.screenHeight - systemInfo.safeArea.bottom + 'px' + // #endif } onHide(() => { //#ifdef APP-PLUS @@ -768,7 +789,7 @@ const uploadRecordNow = voicePath => { }) .then(res => { let _res = JSON.parse(res.data) - console.log(_res) + console.log(_res) if (_res.rtnCode === '0000') { talkingList.value = talkingList.value.map(t => { if (t.id === _id) { @@ -780,8 +801,8 @@ const uploadRecordNow = voicePath => { talkingContent: '', talkingVoice: voicePath, recordId: _res.body.chatBody.recordId, - asrStartTm: unref(lastTalkingInfo).asrStartTm, - stdyPgrphId: _res.body.chatBody.stdyPgrphId, + asrStartTm: unref(lastTalkingInfo).asrStartTm, + stdyPgrphId: _res.body.chatBody.stdyPgrphId, type: 1, userInfo: { ...choiceTeacherInfo.value @@ -792,18 +813,18 @@ const uploadRecordNow = voicePath => { return t } }) - console.log(11111,_res.body.chatBody) + console.log(11111, _res.body.chatBody) scrollToBottomNow() } else { } setIsUploadingVoice() }) .catch(err => { - console.log('err',err) + console.log('err', err) setIsUploadingVoice() talkingList.value = talkingList.value.filter(t => t.id !== _id) uni.showToast({ - title: '系统异常,请联系管理员', + title: err.message || '系统异常,请联系管理员', icon: 'none', duration: 1000 }) @@ -1037,11 +1058,14 @@ const chooseRateNow = item => { } - diff --git a/src/pages/search/search.vue b/src/pages/search/search.vue index b794fd22..4c4cf6a7 100644 --- a/src/pages/search/search.vue +++ b/src/pages/search/search.vue @@ -88,7 +88,7 @@ }); const del_all = () => { - common.show('', '历史搜索记录清除后无法恢复,确认删除吗?').then((res) => { + common.show('', '确认删除全部搜索历史?').then((res) => { if (res) { common.setValue(storageKey, []); historyList.value = []; diff --git a/src/pages/testingHall/components/content.vue b/src/pages/testingHall/components/content.vue index 0b92716e..5a783e2a 100644 --- a/src/pages/testingHall/components/content.vue +++ b/src/pages/testingHall/components/content.vue @@ -10,8 +10,8 @@ - - + 暂无数据 + diff --git a/src/pagesA.json b/src/pagesA.json index e9bacbe6..7fb8ef4c 100644 --- a/src/pagesA.json +++ b/src/pagesA.json @@ -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 } diff --git a/src/static/images/examination/unable_img.png b/src/static/images/examination/unable_img.png new file mode 100644 index 00000000..99150854 Binary files /dev/null and b/src/static/images/examination/unable_img.png differ