From 2eaafde35b7269095a57d9c0b21c89de0c33419a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 May 2022 16:13:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E4=B8=8D=E5=BE=97=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ChatInput/ChatInput.jsx | 22 +++++++++++-------- .../components/RatePopover/RatePopover.jsx | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx b/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx index 83bde57..762f022 100644 --- a/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx +++ b/src/pages/customerservice/support/conversation/components/ChatInput/ChatInput.jsx @@ -43,7 +43,7 @@ const ChatInput = ((props) => { const [loading, setLoading] = useState(false) const [uploadFile, setUploadFile] = useState({}) const [isSendFile, setIsSendFile] = useState(false) //发送文件之前确认 - + const location = useLocation() //imgInputSize:输入框图片尺寸 @@ -489,13 +489,17 @@ const str_substr = (start, end, str)=> { if(conversationId=='' || conversationId==undefined){ message.warn('您还没有发起咨询,无需评价') }else{ - API.estimate({id: conversationId, remarkScore: score*2, remarkTime: moment(new Date()).format('yyyy-MM-DD HH:mm:ss')}).then(res=>{ - if (res && res.success) { - message.success('感谢您的评价!') - }else{ - message.warn(res && res.message) - } - }) + if(score==0){ + message.warn('请您评价本次服务,满意请给我们五星好评,谢谢') + }else{ + API.estimate({id: conversationId, remarkScore: score*2, remarkTime: moment(new Date()).format('yyyy-MM-DD HH:mm:ss')}).then(res=>{ + if (res && res.success) { + message.success('感谢您的评价!') + }else{ + message.warn(res && res.message) + } + }) + } } } useEffect(()=>{ @@ -532,7 +536,7 @@ const str_substr = (start, end, str)=> { } }} > - +
{e.preventDefault()}} className={style.input_area} diff --git a/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx b/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx index bb5dc26..6da2904 100644 --- a/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx +++ b/src/pages/customerservice/support/conversation/components/RatePopover/RatePopover.jsx @@ -12,7 +12,7 @@ export default function RatePopover(props) { return ( <> -
setRateModal(true)} className={style.customer_service_content}/> +
{ setScore(0); setRateModal(true)}} className={style.customer_service_content}/> {rateModal && { setRateModal(false)