From d55c2f9efc069b4293826a8963fde11baf7652de Mon Sep 17 00:00:00 2001 From: yanghang Date: Wed, 23 Jul 2025 15:57:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=97=AE=E9=A2=98=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=AD=8F=E6=8E=A5=E5=8F=A3=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dialog.js | 12 ++++++++ src/pages/course/components/touchBtn.vue | 14 +++++++-- src/pages/index/dialog.vue | 38 +++++++++++++++--------- 3 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 src/api/dialog.js diff --git a/src/api/dialog.js b/src/api/dialog.js new file mode 100644 index 00000000..38de539e --- /dev/null +++ b/src/api/dialog.js @@ -0,0 +1,12 @@ +import request from '@/api/request' + + + +// 获取问题list +export const queryHotQuestionApi = (data) => { + return request({ + url: '/traask/traAskchat/queryHotQuestion', + method: 'post', + data + }); +}; \ No newline at end of file diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 8598c44f..940336de 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -75,6 +75,10 @@ const props = defineProps({ }) const { isDisabled, onlyVoice } = toRefs(props) const isLoadingState = computed(() => props.isLoading) + +const showTalkingModel = ref(false) +const keyboardIsShow = ref(false) + watch(()=>props.isLoading,()=>{},{ deep:true,immediate:true }) @@ -84,8 +88,13 @@ watch(()=>props.canAnswer,()=>{},{ watch(()=>props.onlyVoice,()=>{},{ deep:true,immediate:true }) -const showTalkingModel = ref(false) -const keyboardIsShow = ref(false) +watch(()=>props.isDisabled,(val)=>{ + if(val){ + keyboardIsShow.value = false + } +},{ + deep:true,immediate:true +}) const answerValue = ref('') @@ -315,6 +324,7 @@ const showKeyboard = () => { } } const changeBtn = () => { + if(props.isDisabled) return keyboardIsShow.value = !keyboardIsShow.value answerValue.value = '' } diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index 9fd514d2..dfb23acf 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -27,13 +27,13 @@ {{questionList[item-1]}} + @click="sendText(questionList[item-1].hotContent)">{{questionList[item-1].hotContent}} - {{questionList[item + Math.ceil(questionList.length/2)-1]}} + @click="sendText(questionList[item + Math.ceil(questionList.length/2)-1].hotContent)"> + {{questionList[item + Math.ceil(questionList.length/2)-1].hotContent}} @@ -123,6 +123,9 @@ import { commonUploadVoiceFile } from "@/api/common.js" + import { + queryHotQuestionApi + } from "@/api/dialog.js" const socketStore = useSocketStore() const { @@ -131,16 +134,16 @@ const userInfo = computed(() => getUserInfo()) console.log('userInfoxxx', getUserInfo()); const questionList = ref([ - '对公小程序开户流程?', - '厅堂服务经理2025年管理办法?', - '厅堂服务经理2025年考核表单?', - '吉林银行重要空白凭证调微业务操作规程?', - '协助有权机关查询冻结扣划业务操作规程?', - '柜面个人账户操作规程?', - '久悬未取款账户如何办理销户?', - '境外来华人员个人账户业务开户如何办理?', - '营业机构日间管理风险防控要点有哪些?', - '现金管理平台柜面业务操作?' + // '对公小程序开户流程?', + // '厅堂服务经理2025年管理办法?', + // '厅堂服务经理2025年考核表单?', + // '吉林银行重要空白凭证调微业务操作规程?', + // '协助有权机关查询冻结扣划业务操作规程?', + // '柜面个人账户操作规程?', + // '久悬未取款账户如何办理销户?', + // '境外来华人员个人账户业务开户如何办理?', + // '营业机构日间管理风险防控要点有哪些?', + // '现金管理平台柜面业务操作?' ]) const scrollBoxRef = ref() const scrollTop = ref(99999) @@ -472,8 +475,15 @@ } return false }); - + + const getQuestionList = () => { + queryHotQuestionApi().then(res=> { + console.log(res) + questionList.value = res.body + }) + } onMounted(() => { + getQuestionList() initsocketTask() }) onHide(() => {