From ede1d40b218c3469d5f55dabc076778464b1a3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 5 Mar 2026 09:50:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E?= =?UTF-8?q?=E5=90=89=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84?= =?UTF-8?q?=E9=9C=80=E6=B1=82=5Ffix:=20=E8=A7=86=E9=A2=91=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/common.js | 6 +- .../comment-input/comment-input.vue | 14 +- .../image-preview/preview-detail.vue | 10 +- src/pages/course/components/talkingItem.vue | 174 ++++++++++-------- src/store/storage.js | 7 +- 6 files changed, 119 insertions(+), 94 deletions(-) diff --git a/.env.development b/.env.development index 93437482..f620d0e7 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ ENV = 'development' #VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # DEV diff --git a/src/api/common.js b/src/api/common.js index 1bc5e8e7..80258eb9 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -47,7 +47,7 @@ export const getPreviewFileUrl = (id) => { return get_base_url() + `/traoss/tras3/show/${id}` } // 对象存储下载 /traoss/tras3/show/{文件ID} -export function downloadFile(id) { +export function downloadFile(id = '', url = '') { const token = getToken(); const header = { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", @@ -55,10 +55,10 @@ export function downloadFile(id) { if (token) header['summary'] = token let baseUrl = get_base_url(); - + let _url = id?`${baseUrl}/traoss/tras3/show/${id}?tk=${token}`:`${url}?tk=${token}` return new Promise((resolve, reject) => { uni.downloadFile({ - url: `${baseUrl}/traoss/tras3/show/${id}`, + url: _url, header, success(result) { resolve(result) diff --git a/src/components/comment-input/comment-input.vue b/src/components/comment-input/comment-input.vue index 75b6f280..c0146a6b 100644 --- a/src/components/comment-input/comment-input.vue +++ b/src/components/comment-input/comment-input.vue @@ -171,7 +171,6 @@ const focus = (event) => { isShow.value = true isFocus.value = true - console.log('focusevent'); if(!isReply.value){ getMemList() } @@ -185,7 +184,6 @@ }) const resStart = ref(-1) const blur = (event) => { - console.log('失去焦点不一定关闭',event); // popHeight.value = '0px' resStart.value = event.detail.cursor isShow.value = true @@ -193,7 +191,6 @@ } const hideAll = (flag=false) => { popHeight.value = '0px' - console.log('hideAll'); isShow.value = false isFocus.value = false if(flag){ @@ -245,7 +242,6 @@ const extension = url.slice(lastDotIndex + 1).split('?')[0].toLowerCase() return ['png', 'jpg'].includes(extension) }) - console.log(tempFilePaths,valid) if (!valid) return common.msg('您选择的图片格式有误。') const data = { bizScen: 'S3005' @@ -304,13 +300,10 @@ bbsTag: bbsTag.value, // 评价标签 (SUG 建议 ASK 提问 ) bbsContent: value.value // 评价内容 } - console.log(_params) publishCrsEvaluation(_params).then((res) => { const loadingDuration = Date.now() - loadingStartTime; const minLoadingTime = 700; - console.log(loadingStartTime, loadingDuration); const delayTime = Math.max(0, minLoadingTime - loadingDuration); - console.log('delayTime', delayTime); setTimeout(() => { common.hideLoading(); nextTick(() => common.msg('发表成功')); @@ -322,9 +315,7 @@ emit('submitOver') }, 500); }, delayTime); - }).catch(err=>{ - console.log(err) - }) + }).catch(err=>{}) }; const reply_send = async () => { emit('sendReply', {...answerData.value, bbsContent: value.value}) @@ -351,10 +342,7 @@ popHeight.value = val ? `${maxKeyboardHeight.value}px` : (keyboardHeight.value+'px') }) watch(()=> keyboardHeight.value,(val)=>{ - console.log(val,showEmoji.value) - console.log(maxKeyboardHeight.value) popHeight.value = showEmoji.value ? `${maxKeyboardHeight.value}px` : keyboardHeight.value+'px' - console.log(popHeight.value) }) defineExpose({hideAll, resetVal}) diff --git a/src/components/image-preview/preview-detail.vue b/src/components/image-preview/preview-detail.vue index 827eaffe..316e959e 100644 --- a/src/components/image-preview/preview-detail.vue +++ b/src/components/image-preview/preview-detail.vue @@ -94,7 +94,10 @@ }, srcList() { return this.storageStore?.getFileSrcList - } + }, + isBase() { + return this.storageStore?.getIsBase + }, }, watch: { fileId: { @@ -148,6 +151,11 @@ }, initSrc(newval, oldval) { let _src + if(this.isBase){ + _src = newval + this.fileUrlShow = _src + return _src + } if (newval.indexOf('http') === 0) { _src = newval + '?tk=' + getToken() } else { diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 456638bf..b074c3b5 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -68,11 +68,13 @@ - + + + :fileId="dataInfo.vidoAddrs[0].vidAddr" :picId="dataInfo.vidoAddrs[0].vidImgAddr" + @click="previewVideo(dataInfo.vidoAddrs[0])"> @@ -234,7 +236,8 @@ downloadVoiceFile, downloadVoiceParams, uploadVoiceFile, - getAudioByText + getAudioByText, + downloadFile } from '@/api/common.js'; import { studyParagraphOverApi, @@ -245,6 +248,7 @@ import ChartFive from './chartFive.vue'; import common from '@/common/common'; import { + getPhoneEnvBool, getUserInfo } from '@/common/common'; import { @@ -260,7 +264,7 @@ import { previewFileFnc } from '@/common/common' - + const storageStore = useStorageStore(); const audioCacheObj = computed(() => storageStore.audioObj); @@ -337,7 +341,7 @@ ...(dataInfo.value?.traQnsInfoVo || {}), my_answer: dataInfo.value?.traQnsInfoVo?.anserResult || '', answerMethod: props.answerMethod, - ...(props.type === 5?{ + ...(props.type === 5 ? { "qnsTyp": "ES", my_answer: dataInfo.value, itemVos: [{ @@ -346,21 +350,21 @@ "qnsId": dataInfo.value.qnsId, "itemAnswer": dataInfo.value.itemAnswer, "relKeyword": dataInfo.value.relKeyword, - anserResult:dataInfo.value?.traQnsInfoVo?.anserResult || '', + anserResult: dataInfo.value?.traQnsInfoVo?.anserResult || '', "evalSettingVos": dataInfo.value?.essayEvalVo, }] - }:{}) - + } : {}) + }; }); - const mode = computed(()=>{ + const mode = computed(() => { return props.type == 5 ? 'study_answer' : props.type == 8 ? 'study_result' : 'study' }); // 考试 examination 练习practice 学习study 学习结果study_answer - - const imgAddrs = computed(()=>{ + + const imgAddrs = computed(() => { return (dataInfo.value.imageAddrs || []) }) - + const previewFile = info => { previewFileFnc({ fileId: info.fileId, @@ -424,16 +428,16 @@ return false; } if (type.value === 5) { - if(dataInfo.value.stdyStat !== 'Y' && dataInfo.value.isLastQns === 'Y'){ + if (dataInfo.value.stdyStat !== 'Y' && dataInfo.value.isLastQns === 'Y') { return false - }else{ + } else { return true; } } if (type.value === 8) { - if(dataInfo.value.stdyStat !== 'Y' && dataInfo.value.isLastQns === 'Y'){ + if (dataInfo.value.stdyStat !== 'Y' && dataInfo.value.isLastQns === 'Y') { return false - }else{ + } else { return !!dataInfo.value.traQnsInfoVo?.judgeResult; } } @@ -466,44 +470,59 @@ const changeBr = (str = '') => { return str.replace(/\/n/g, '\n'); }; - - const previewVideo = (obj)=>{ - console.log(obj) - storageStore.setShowPreviewDetail({ - status: true, - fileType: 'video', - fileId: '', - fileSrc: obj.vidAddr - }) + + const previewVideo = async (obj) => { + const IsAndEnv = getPhoneEnvBool('AND'); + if (IsAndEnv) { + storageStore.setShowPreviewDetail({ + status: true, + fileType: 'video', + fileId: '', + isBase: false, + fileSrc: obj.vidAddr + }) + } else { + common.loading('加载中'); + try { + const _res = await downloadFile('', obj.vidAddr) + storageStore.setShowPreviewDetail({ + status: true, + fileType: 'video', + fileId: '', + isBase: _res.tempFilePath ? true : false, + fileSrc: _res.tempFilePath || obj.vidAddr + }) + } catch {} finally { + common.hideLoading(); + } + } } - const previewImage = (obj, arr=[])=>{ + const previewImage = (obj, arr = []) => { storageStore.setShowPreviewDetail({ - status: true, - fileType: arr.length>0?'imageList':'image', - fileId: '', + status: true, + fileType: arr.length > 0 ? 'imageList' : 'image', + fileId: '', fileSrc: obj, fileSrcList: arr }) } - - + + const voiceTime = ref(''); const itemInfo = ref({}); - + onMounted(() => { initVoice(); }); onUnload(() => { // pauseVoice(); - console.log('onUnload') talkVoiceObj.value?.destroy() - if(downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord() + if (downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord() downloadFnc.value = null }); onHide(() => { - console.log('onHide') - voiceLoading.value = false; - if(downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord() + voiceLoading.value = false; + if (downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord() downloadFnc.value = null }); let prevTime = -1; @@ -513,7 +532,7 @@ talkVoiceObj.value.onEnded(() => { console.log('onEnded'); voiceIsPlaying.value = false - if(props.activeVoiceId){ + if (props.activeVoiceId) { emit('changePlay', ''); } prevTime = -1; @@ -522,9 +541,9 @@ }); talkVoiceObj.value.onStop(() => { console.log('onStop'); - voiceLoading.value = false; + voiceLoading.value = false; voiceIsPlaying.value = false - if(props.activeVoiceId){ + if (props.activeVoiceId) { emit('changePlay', ''); } prevTime = -1; @@ -533,10 +552,10 @@ }); talkVoiceObj.value.onPause(() => { voiceIsPlaying.value = false - voiceLoading.value = false; + voiceLoading.value = false; prevTime = talkVoiceObj.value.currentTime; pauseTime = prevTime - if(downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord() + if (downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord() downloadFnc.value = null }); talkVoiceObj.value.onPlay(() => { @@ -545,12 +564,12 @@ pauseTime = prevTime startPlay.value = true voiceIsPlaying.value = true - setTimeout(()=> { - startPlay.value= false - },300) + setTimeout(() => { + startPlay.value = false + }, 300) emit('changePlay', unref(dataInfo)?.id); }); - + talkVoiceObj.value.onTimeUpdate(() => { if (activeVoiceId.value === unref(dataInfo)?.id) { setTimeout(() => { @@ -559,8 +578,9 @@ prevTime = talkVoiceObj.value.currentTime; } } else { - if (props.isPlaying && (talkVoiceObj.value.currentTime > 0) && props.activeVoiceId && !startPlay.value) { - console.log(pauseTime , prevTime) + if (props.isPlaying && (talkVoiceObj.value.currentTime > 0) && props.activeVoiceId && !startPlay + .value) { + console.log(pauseTime, prevTime) emit('changePlay', ''); } } @@ -575,7 +595,7 @@ // emit('changePlay', ''); }); const pauseVoice = () => { - voiceLoading.value = false; + voiceLoading.value = false; if (!talkVoiceObj.value) return; talkVoiceObj.value.pause(); emit('changePlay', ''); @@ -597,7 +617,7 @@ const downloadFnc = ref(null) const playVoice = (readType = 'pgth') => { console.log('playVoice11111111') - if(voiceIsPlaying.value) return + if (voiceIsPlaying.value) return let _content = showContent.value; if (!_content) { common.msg('没有可以播放的文字信息!'); @@ -607,14 +627,14 @@ emit('changePlay', unref(dataInfo)?.id); // readType 阅读内容类型pgrh段落/qns问题 if (talkVoiceObj.value.src && talkVoiceObj.value.src === itemVoice.value) { - if(voiceIsPlaying.value) return + if (voiceIsPlaying.value) return talkVoiceObj.value.play(); return; } talkVoiceObj.value.src = ''; if (itemVoice.value) { setTimeout(() => { - if(voiceIsPlaying.value) return + if (voiceIsPlaying.value) return talkVoiceObj.value.src = itemVoice.value; talkVoiceObj.value.play(); }, 100); @@ -666,7 +686,7 @@ if (url) { voiceLoading.value = false; itemVoice.value = url; - if(voiceIsPlaying.value) return + if (voiceIsPlaying.value) return talkVoiceObj.value.src = url; talkVoiceObj.value.play(); } else { @@ -681,16 +701,16 @@ } voiceLoading.value = false; itemVoice.value = res.tempFilePath; - if(voiceIsPlaying.value) return + if (voiceIsPlaying.value) return talkVoiceObj.value.src = res.tempFilePath; // 判斷是否在當前頁面 - if(unref(isGettingId) === unref(dataInfo)?.id){ + if (unref(isGettingId) === unref(dataInfo)?.id) { talkVoiceObj.value.play(); storageStore.setStorage('audio', _url + _params.teachNo, itemVoice.value); } }, complete() { - voiceLoading.value = false; + voiceLoading.value = false; downloadFnc.value = null }, }); @@ -715,7 +735,7 @@ // }); } }); - + } }, 100); }; @@ -748,11 +768,11 @@ const setVoiceTime = (sum) => { plus.io.getAudioInfo({ filePath: unref(dataInfo).talkingVoice, - success:(res)=>{ - voiceTime.value = (Math.floor(res.duration) || 1) + 's' + success: (res) => { + voiceTime.value = (Math.floor(res.duration) || 1) + 's' }, - fail:(res)=>{ - voiceTime.value = (unref(dataInfo).voiceTime || 1) + 's' + fail: (res) => { + voiceTime.value = (unref(dataInfo).voiceTime || 1) + 's' } }) } @@ -809,16 +829,16 @@ clickNow(); if ([5, 8].indexOf(props.type) >= 0) { // 完成问题 - if(dataInfo.value.stdyStat === 'Y' && dataInfo.value.isLastQns === 'Y'){ + if (dataInfo.value.stdyStat === 'Y' && dataInfo.value.isLastQns === 'Y') { emit('nextQuestion', unref(dataInfo), 'overNextGraph'); - }else{ + } else { emit('nextQuestion', unref(dataInfo)); } } else if ([3].indexOf(props.type) >= 0) { // 完成段落 - if(unref(dataInfo).hasQns !=='Y'){ + if (unref(dataInfo).hasQns !== 'Y') { emit('nextQuestion', unref(dataInfo), 'overNextGraph'); - }else{ + } else { emit('nextQuestion', unref(dataInfo), 'overGraph'); } } else if ([9].indexOf(props.type) >= 0) { @@ -971,11 +991,12 @@ // min-height: 36px; } } - - .file-items{ + + .file-items { float: left; width: 100%; padding-top: 12rpx; + .file-item { line-height: 36rpx; font-size: 28rpx; @@ -983,7 +1004,7 @@ color: #06f; } } - + .cont-img-box { float: left; width: calc(33% - 13.34rpx); @@ -993,19 +1014,22 @@ background-color: #fafafa; margin-bottom: 20rpx; margin-right: 20rpx; - - &.cont-video-box{ + + &.cont-video-box { width: 433rpx; height: 269rpx; margin-right: 0rpx; } - &:nth-child(3n){ + + &:nth-child(3n) { margin-right: 0; } - &.cont-img-box2{ + + &.cont-img-box2 { width: calc(50% - 10rpx); height: 200rpx; - &:nth-child(2n){ + + &:nth-child(2n) { margin-right: 0rpx; } } diff --git a/src/store/storage.js b/src/store/storage.js index af43a267..01621c5e 100644 --- a/src/store/storage.js +++ b/src/store/storage.js @@ -13,6 +13,7 @@ export const useStorageStore = defineStore('storageStore',{ fileId: '', fileSrc: '', fileSrcList: [], + isBase: false, gettingVoiceId: '' }), getters:{ @@ -46,17 +47,21 @@ export const useStorageStore = defineStore('storageStore',{ getGettingVoiceId(state){ return state.gettingVoiceId }, + getIsBase(state){ + return state.isBase + } }, actions:{ setGettingVoiceId(id){ return this.gettingVoiceId = id }, - setShowPreviewDetail({ status = false, fileType = 'image', fileId = '', fileSrc = '', fileSrcList = [] }){ + setShowPreviewDetail({ status = false, fileType = 'image', fileId = '', fileSrc = '', fileSrcList = [], isBase = false }){ this.showPreviewDetail = status this.fileId = fileId this.fileType = fileType this.fileSrc = fileSrc this.fileSrcList = fileSrcList + this.isBase = isBase }, setTouchBtnZIndex(index = 12){ this.touchBtnZIndex = index From c6ed57d0a1337a9c5d95151a416a70d74ee421dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Thu, 5 Mar 2026 14:59:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E?= =?UTF-8?q?=E5=90=89=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84?= =?UTF-8?q?=E9=9C=80=E6=B1=82=5F=E4=BF=AE=E5=A4=8D=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E5=BD=93=E5=89=8D=E7=A7=AF=E5=88=86=E4=B8=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/pages/pointsMall/pointsMall.vue | 88 +++++++++++++++++++++-------- 2 files changed, 65 insertions(+), 27 deletions(-) diff --git a/.env.development b/.env.development index 85e17ced..93437482 100644 --- a/.env.development +++ b/.env.development @@ -5,11 +5,11 @@ ENV = 'development' #VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' -#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # DEV -VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' +#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' # sit #VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786' diff --git a/src/pages/pointsMall/pointsMall.vue b/src/pages/pointsMall/pointsMall.vue index d54f9b5e..4fd5d309 100644 --- a/src/pages/pointsMall/pointsMall.vue +++ b/src/pages/pointsMall/pointsMall.vue @@ -3,7 +3,6 @@ ref="pagingRef" v-model="data_list" @query="queryList" - :fixed="false" class="scroll_div" :auto="true" empty-view-text="暂无学习任务" @@ -17,6 +16,7 @@ 积分商城 + @@ -24,12 +24,18 @@ 当前积分 - {{points}} - 积分明细> + + + + 积分明细> - + @@ -44,35 +50,67 @@ {{ item.excPoints }} - - {{ item.endTm.substr(0,10) }}截止 - + {{ item.endTm.substr(0, 10) }}截止