Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import request from '@/api/request'
|
||||
|
||||
|
||||
|
||||
// 获取问题list
|
||||
export const queryHotQuestionApi = (data) => {
|
||||
return request({
|
||||
url: '/traask/traAskchat/queryHotQuestion',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
@@ -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 = ''
|
||||
}
|
||||
|
||||
+30
-14
@@ -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)
|
||||
@@ -166,6 +169,7 @@
|
||||
const talkingList = ref([])
|
||||
|
||||
const showModelComfirm = ref(false)
|
||||
const reconcatNum = ref(1)
|
||||
const initsocketTask = () => {
|
||||
socketStore.creatSocket('/traask/asksocket/open?summary=')
|
||||
// unref(SocketObj).on('open', (res)=>{
|
||||
@@ -182,8 +186,13 @@
|
||||
// })
|
||||
unref(SocketObj).on('error', () => {
|
||||
if ((watchFlag.value === 1) || showModelComfirm.value) return
|
||||
if (reconcatNum.value === 5) {
|
||||
common.msg('系统网络异常,请稍后再试!')
|
||||
return
|
||||
}
|
||||
showModelComfirm.value = true
|
||||
common.show('提示信息', '网络环境不稳定,请重试!', false, '', '确认').then((res) => {
|
||||
reconcatNum.value += 1
|
||||
common.redirectTo(`/pages/index/dialog`)
|
||||
}).finally(() => {
|
||||
showModelComfirm.value = false
|
||||
@@ -472,8 +481,15 @@
|
||||
}
|
||||
return false
|
||||
});
|
||||
|
||||
|
||||
const getQuestionList = () => {
|
||||
queryHotQuestionApi().then(res=> {
|
||||
console.log(res)
|
||||
questionList.value = res.body
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
getQuestionList()
|
||||
initsocketTask()
|
||||
})
|
||||
onHide(() => {
|
||||
|
||||
Reference in New Issue
Block a user