fix: 问题来源修改魏接口获取

This commit is contained in:
yanghang
2025-07-23 15:57:43 +08:00
parent 41015eb0d7
commit d55c2f9efc
3 changed files with 48 additions and 16 deletions
+12
View File
@@ -0,0 +1,12 @@
import request from '@/api/request'
// 获取问题list
export const queryHotQuestionApi = (data) => {
return request({
url: '/traask/traAskchat/queryHotQuestion',
method: 'post',
data
});
};
+12 -2
View File
@@ -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 = ''
}
+24 -14
View File
@@ -27,13 +27,13 @@
<scroll-view :scroll-x="true" :show-scrollbar="false">
<view class="question-row">
<view class="question-item" v-for="item in Math.ceil(questionList.length/2)"
@click="sendText(questionList[item-1])">{{questionList[item-1]}}</view>
@click="sendText(questionList[item-1].hotContent)">{{questionList[item-1].hotContent}}</view>
</view>
<view class="question-row">
<view class="question-item"
v-for="item in questionList.length - Math.ceil(questionList.length/2)"
@click="sendText(questionList[item + Math.ceil(questionList.length/2)-1])">
{{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}}
</view>
</view>
</scroll-view>
@@ -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(() => {