diff --git a/.env.development b/.env.development index 57cec9ff..c4d7d7c5 100644 --- a/.env.development +++ b/.env.development @@ -24,7 +24,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # 线上 # VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' -VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' +VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' # VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' diff --git a/src/api/dialog.js b/src/api/dialog.js index b4e6e606..e945b88a 100644 --- a/src/api/dialog.js +++ b/src/api/dialog.js @@ -5,7 +5,8 @@ import request from '@/api/request' // 获取问题list export const queryHotQuestionApi = (data) => { return request({ - url: '/traask/traAskchat/queryHotQuestion', + // url: '/traask/traAskchat/queryHotQuestion', + url: '/traask/traAskchat/queryHotQuestions', method: 'post', data }); @@ -21,7 +22,7 @@ export const queryAskBatchSessionPaging = (data) => { // 问答详情 /traAskchatSession/queryAskHisByBatchIdPaging export const queryAskHisByBatchIdPaging = (data) => { return request({ - url: '/traask/traAskchatSession/queryAskHisByBatchIdPaging', + url: '/traask/traAskchatSession/queryAskHisByBatchId', method: 'post', data }); @@ -33,4 +34,12 @@ export const insertTraAskFeedback = (data) => { method: 'post', data }); +}; +// 赞 /取消赞/traAskFeedback/updateDownvoteStat +export const updateLikeStat = (data) => { + return request({ + url: '/traask/traAskFeedback/updateLikeStat', + method: 'post', + data + }); }; \ No newline at end of file diff --git a/src/pages/index/components/answer.vue b/src/pages/index/components/answer.vue index 0a48e472..12bd9732 100644 --- a/src/pages/index/components/answer.vue +++ b/src/pages/index/components/answer.vue @@ -39,12 +39,12 @@ - - + + - - + + diff --git a/src/pages/index/components/feedback.vue b/src/pages/index/components/feedback.vue index df0b5cd0..05a809d8 100644 --- a/src/pages/index/components/feedback.vue +++ b/src/pages/index/components/feedback.vue @@ -44,6 +44,7 @@ } from '@/common/imgSvg' import common from '../../../common/common'; + const emit = defineEmits(['feedbackAnswer']) const feedback_popup_bottom = ref('0px') // 反馈框下距离 const feedbackPopupRef = ref(null) // FM("01", "虚假信息"), @@ -63,7 +64,7 @@ value: "04", label: "其他", }]) - const feedbackInfo = reactive({ + const feedbackInfo = ref({ type: [], // 反馈类型 text: '', // 反馈内容 examId: '', // 考试ID @@ -71,40 +72,44 @@ }) const feedback_item_click = (value) => { // 单选 - feedbackInfo.type = [value] + feedbackInfo.value.type = [value] // 多选 - // if (feedbackInfo.type.includes(value)) { - // feedbackInfo.type = feedbackInfo.type.filter(item => item !== value); // 如果已存在,则从数组中移除 + // if (feedbackInfo.value.type.includes(value)) { + // feedbackInfo.value.type = feedbackInfo.value.type.filter(item => item !== value); // 如果已存在,则从数组中移除 // } else { - // feedbackInfo.type.push(value); // 如果不存在,则添加到数组中 + // feedbackInfo.value.type.push(value); // 如果不存在,则添加到数组中 // } } const answerData = ref({}) // 反馈提交 const submit_feedback_fun = () => { + if(!feedbackInfo.value.text){ + common.msg('反馈内容不能为空!') + return + } // todo 待接口 - console.log('反馈提交'); const params = JSON.parse(JSON.stringify({ askId: answerData.value.seqNo, - fbkTyp: feedbackInfo.type[0], - fbkContent: feedbackInfo.text + fbkTyp: feedbackInfo.value.type[0], + reqBatch: answerData.value.reqBatch, + fbkContent: feedbackInfo.value.text })) insertTraAskFeedback(params).then(res=>{ common.msg('反馈提交成功!') - feedbackInfo = { + feedbackInfo.value = { type: [], // 反馈类型 text: '', // 反馈内容 examId: '', // 考试ID qnsId: '', // 试题IDID } - emit('feedbackAnswer', params) close() + emit('feedbackAnswer', params) }) } const openFeedback = (status) => { if (status) { feedbackPopupRef.value.open('bottom') - // feedbackInfo.examId + // feedbackInfo.value.examId const systemInfo = uni.getSystemInfoSync(); // 安全区域底部到屏幕底部的高度(即底部安全区域高度) const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom; @@ -129,7 +134,7 @@ openFeedback(true) } const close = () => { - openFeedback() + openFeedback(null) } defineExpose({ open, diff --git a/src/pages/index/components/history.vue b/src/pages/index/components/history.vue index f8ee2aad..06888043 100644 --- a/src/pages/index/components/history.vue +++ b/src/pages/index/components/history.vue @@ -5,11 +5,11 @@ 对话记录 - + {{item.sseContent}} - + @@ -63,7 +63,7 @@