From 9a159bc8d68efc8a7e040fc92bc2a0d37e71d285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Sat, 28 Feb 2026 10:26:24 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5Femoji=E8=A1=A8=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development.yh | 6 +-- src/api/courseDetail.js | 9 ++++ .../comment-input/comment-input.vue | 53 +++++++++++++++---- 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/.env.development.yh b/.env.development.yh index d7401711..aa7bd6da 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -2,14 +2,14 @@ ENV = 'development.yh' # 'development.yh' -# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' + VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' -VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' +# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' # VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603' -VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601' +# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601' # VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.158:9601' # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.32.154:9602' # VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.32.157:9605' diff --git a/src/api/courseDetail.js b/src/api/courseDetail.js index bd0efd11..9c1f8d5d 100644 --- a/src/api/courseDetail.js +++ b/src/api/courseDetail.js @@ -70,3 +70,12 @@ export const queryTraCrsRankingList = (data) => { }; +// 获取百禄表情列表 +export const queryTraMemeInfoList = (data) => { + return request({ + url: '/traapp/traMemeInfo/queryTraMemeInfoList', + method: 'post', + data + }); +}; + diff --git a/src/components/comment-input/comment-input.vue b/src/components/comment-input/comment-input.vue index 8262af52..a798767f 100644 --- a/src/components/comment-input/comment-input.vue +++ b/src/components/comment-input/comment-input.vue @@ -6,6 +6,7 @@ - + @@ -46,7 +47,7 @@ - + {{emojiItem}} @@ -61,6 +62,7 @@ import commentInput4 from '@/static/images/courseDetail/comment-input-4.png' import { reactive, ref } from 'vue'; import { emojiList } from '@/emoji'; + import { queryTraMemeInfoList } from '@/api/courseDetail.js' const customStyle = { backgroundColor: 'rgb(227, 230, 237)', padding: '18rpx' @@ -74,16 +76,26 @@ const click_input = () => { if(!isShow.value) isShow.value = true } + const textareaRef = ref() const focus = (event) => { popHeight.value = '278px' isShow.value = true - console.log('event', event.detail.height); + console.log('event', event); + console.dir(textareaRef.value) + getMemList() } + const resStart = ref(-1) const blur = (event) => { - console.log('失去焦点不一定关闭'); + console.log('失去焦点不一定关闭',event); // popHeight.value = '0px' + resStart.value = event.detail.cursor isShow.value = true } + const insertValue = (emojiItem) => { + let _val = value.value + value.value = _val.substring(0, resStart.value) + emojiItem + _val.substring(resStart.value, _val.length) + resStart.value+=emojiItem.length + } const fileList = reactive([]); // 方法 const upload = (limit = 4) => { @@ -111,19 +123,36 @@ } }) } - + const memList = ref([]) + const getMemList = () => { + if(memList.value.length > 0){ + return + } + queryTraMemeInfoList().then(res=>{ + console.log(res) + memList.value = res.body || [] + }) + }