diff --git a/.env.development b/.env.development index a7b52e29..0f91d31d 100644 --- a/.env.development +++ b/.env.development @@ -17,4 +17,4 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' #VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' # h5专用地址 -VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' \ No newline at end of file +VITE_APP_BASE_H5_API_Url = 'http://aitstest.jlbank.com.cn:7001' \ No newline at end of file diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 69f1d7ca..6a6a7243 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -9,13 +9,16 @@ >按住说话 - + - - - + + + + @@ -83,6 +86,8 @@ watch(()=>props.onlyVoice,()=>{},{ }) const showTalkingModel = ref(false) const keyboardIsShow = ref(false) + + const answerValue = ref('') const talkBtnRef = ref() // 录音 @@ -98,13 +103,27 @@ const initRecord = () => { // stopRecord() unref(recordObjCom)?.onStop((res, duration)=>{ audioPath.value = res.tempFilePath - showTalkingModel.value = false if(!isOut.value){ if(startFlag.value !== 2){ - common.msg('说话时间太短,没有听清!') - return + // setTimeout(() => { + // showTalkingModel.value = false + // nextTick(() => { + // // showTalkingModel.value = false + // common.msg('说话时间太短,没有听清!') + // }) + // },100) + closeModel(()=>{ + nextTick(() => { + // showTalkingModel.value = false + common.msg('说话时间太短,没有听清!') + }) + }) + }else{ + closeModel() + emit('uploadVoice', audioPath.value) } - emit('uploadVoice', audioPath.value) + }else{ + closeModel() } }) unref(recordObjCom).onStart(() => { @@ -115,7 +134,6 @@ const initRecord = () => { let _recordPerm = uni.getAppAuthorizeSetting() let _state = _recordPerm.microphoneAuthorized if(_state === 'authorized'){ - console.log('大大大大大'); showTalkingModel.value = true } }) @@ -126,15 +144,21 @@ const startRecord = () => { } const stopRecord = () => { - if(unref(recordObjCom).stop){ try{ - unref(recordObjCom)?.stop() + if(unref(recordObjCom).stop){ + unref(recordObjCom).stop() + }else{ + closeModel() + } }catch{ - showTalkingModel.value = false + closeModel() } - }else{ +} +const closeModel = (cb = () => {}) => { + setTimeout(() => { showTalkingModel.value = false - } + cb && cb() + },100) } // #endif //#ifndef APP-PLUS @@ -201,6 +225,7 @@ const getRecordPermission = (obj) => { } const isMoving = ref(false) const showOverlayTalking = (obj) => { + if(showTalkingModel.value) return if(isLoadingState.value){ uni.showToast({ title: props.loadingText, @@ -268,17 +293,15 @@ const showKeyboard = () => { } if(!isDisabled.value){ if(keyboardIsShow.value){ - if(answerValue.value){ + if(answerValue.value.trim()){ emit( 'submitAnswer', answerValue.value, - () => { - keyboardIsShow.value = !keyboardIsShow.value - answerValue.value = '' - } + changeBtn ) }else{ - keyboardIsShow.value = !keyboardIsShow.value + // keyboardIsShow.value = !keyboardIsShow.value + common.msg("不能发送空白消息!") } }else{ keyboardIsShow.value = !keyboardIsShow.value @@ -291,6 +314,10 @@ const showKeyboard = () => { }) } } +const changeBtn = () => { + keyboardIsShow.value = !keyboardIsShow.value + answerValue.value = '' +} diff --git a/src/pages/course/index.vue b/src/pages/course/index.vue index 1fbf94f6..835e2e8d 100644 --- a/src/pages/course/index.vue +++ b/src/pages/course/index.vue @@ -32,11 +32,11 @@ {{item.label}} - + {{itemT.label}} - + @@ -290,6 +290,10 @@ import { onShow } from "@dcloudio/uni-app" changeTab({name:'全部'}) }) onActivated(() => { + // 重新获取标签信息 + getTraTagListApi().then(res=>{ + tagsTree.value = res.body||[] + }) changeTab({name:activeTab.value || '全部'}) }); @@ -368,7 +372,8 @@ import { onShow } from "@dcloudio/uni-app" overflow-y: auto; z-index: 2; background-color: #f9f9f9; - box-shadow: 0rpx 3.85rpx 38rpx rgba(0,0,0,.05); + box-shadow: 0rpx 12rpx 20rpx rgba(160,160,160,.25); + border-radius: 0 0 0rpx 0rpx; padding: 0rpx 25rpx; box-sizing: border-box; .filter-type{ @@ -383,7 +388,8 @@ import { onShow } from "@dcloudio/uni-app" .filter-type-list{ overflow: hidden; .filter-type-item{ - width: calc(25% - 18rpx); + // width: calc(25% - 18rpx); + display: inline-block; font-size: 29rpx; box-sizing: border-box; padding:0 20rpx; @@ -399,7 +405,7 @@ import { onShow } from "@dcloudio/uni-app" border-radius: 6rpx; margin-bottom: 20rpx; &:nth-child(4n){ - margin-right: 0; + margin-right: 24rpx; } &.is-active{ color: #06f; diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index e28d2642..07d95aa8 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -953,6 +953,7 @@ const chooseRateNow = (item) => { display: flex; flex-direction: column; .body-title{ + height: 150rpx; text-align: center; font-size: 33rpx; @@ -965,9 +966,11 @@ const chooseRateNow = (item) => { // margin-bottom: 23rpx; .arrow-icon{ position: absolute; - left:36rpx; - top:80rpx; + left:21rpx; + top:65rpx; color: #000; + padding: 15rpx; + // background-color: red; } } .study-num{ diff --git a/src/pages/courseDetail/components/comment.vue b/src/pages/courseDetail/components/comment.vue index 1ba652de..ec11be8a 100644 --- a/src/pages/courseDetail/components/comment.vue +++ b/src/pages/courseDetail/components/comment.vue @@ -75,7 +75,7 @@ @click="common.navigateTo('/pages/courseDetail/submit?crsNum='+props.crsNum+'&imgId='+props.imgId)">发布评价 - + diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index f235a184..708c55c8 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -148,9 +148,12 @@ .back_div { margin-right: 10rpx; position: fixed; - left: 46rpx; - top: 64rpx; - + left: 25rpx; + top: 45rpx; + // background-color: red; + // width: 60rpx; + // height: 60rpx; + padding: 20rpx; .back-icon { position: relative; width: 40rpx; diff --git a/src/pages/courseDetail/submit.vue b/src/pages/courseDetail/submit.vue index 74acac21..d65eeb6f 100644 --- a/src/pages/courseDetail/submit.vue +++ b/src/pages/courseDetail/submit.vue @@ -251,8 +251,9 @@ align-items: center; .back_div { - margin-right: 10rpx; - + // margin-right: 10rpx; + padding: 15rpx; + // background-color: red; .back-icon { position: relative; width: 40rpx; diff --git a/src/pages/index/components/talking-item.vue b/src/pages/index/components/talking-item.vue index 2a17752d..a539d4d5 100644 --- a/src/pages/index/components/talking-item.vue +++ b/src/pages/index/components/talking-item.vue @@ -49,7 +49,7 @@ \ No newline at end of file diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f5ff929b..43089de3 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -225,6 +225,7 @@