增加参数questionType

This commit is contained in:
unknown
2022-05-13 11:02:56 +08:00
parent baec521f7c
commit 42b9e51aeb
3 changed files with 14 additions and 10 deletions

View File

@ -42,6 +42,7 @@ class manager extends PureComponent {
staffId: '', //智慧客服'
staffName:'', //智慧客服
kfType:0,//智慧客服
questionType:0,//智慧客服
// NTKF_PARAM: {
// siteid: "bl_1000", //企业ID,为固定值
// settingid: "bl_1000_1492484340268", //接待组ID为固定值必填
@ -173,7 +174,7 @@ class manager extends PureComponent {
};
render() {
const { downlist, projectlist, staloading, tlist, trelist, idList, dateNum } = this.props;
const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, mainDetail, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType,} = this.state;
const { datevalue, messId, messageDetail, detailId, noticeDetail, questData, questVisible, mainDetail, isModalVisible, isCloseWs, optionsModal, projectModal, supplierNumber, staffId, staffName, kfType, questionType,} = this.state;
return (
<>
{
@ -321,8 +322,9 @@ class manager extends PureComponent {
this.setState({kfType: 2})
this.setState({projectModal: true})
}}
openWin={(index)=>{
this.setState({kfType: index})
openWin={(kfType, questionType)=>{
this.setState({questionType: questionType})
this.setState({kfType: kfType})
this.setState({optionsModal: false})
this.setState({isModalVisible: true})
this.setState({isCloseWs: false})
@ -330,6 +332,7 @@ class manager extends PureComponent {
}}
closeWin={()=>{
this.setState({kfType: 0})
this.setState({questionType: 0})
this.setState({optionsModal: false})
this.setState({isModalVisible: false})
this.setState({isCloseWs: true})
@ -338,8 +341,8 @@ class manager extends PureComponent {
optionsModal={optionsModal}
projectModal={projectModal}
isModalVisible={isModalVisible}
//supplierNo='EMPTY'
kfType={kfType}
questionType={questionType}
staffId={staffId}
staffName={staffName}
supplierNumber={supplierNumber}

View File

@ -26,6 +26,7 @@ const ChatInput = ((props) => {
isModalVisible,
supplierNo,
kfType,
questionType,
conversationId,
isSend,
sendMsg,
@ -200,8 +201,7 @@ const ChatInput = ((props) => {
"contentType": msg.message.type=="text"?1:msg.message.type=="image"?2:msg.message.type=="file"?3:'',
"custType": kfType == 2? 2 : 1,
"message": msg.message.type=="image" || msg.message.type=="file" ?JSON.stringify(msg.message.content):msg.message.content,
//"questionType": location.pathname.indexOf('/home')!=-1? 3 : 1,
"questionType": 2,
"questionType": questionType,
"supplierNo": supplierNo
}
API.sendToCs(params).then(res => {

View File

@ -45,7 +45,7 @@ const conversation = (props) => {
const wid = 600
const hei = 500
let {isModalVisible, isCloseWs, closeWin, hideWin, msgAlert, supplierNumber, staffId, staffName, optionsModal, projectModal, closeOptionsModal, closeProjectModal, kfType, openWin, openProjectWin} = props
let {isModalVisible, isCloseWs, closeWin, hideWin, msgAlert, supplierNumber, staffId, staffName, optionsModal, projectModal, closeOptionsModal, closeProjectModal, kfType, questionType, openWin, openProjectWin} = props
const onMsgRender = ()=>{
let serverAvatar = user
let data = wsMsg
@ -292,7 +292,7 @@ const getProject = (params)=>{
}
])
closeProjectModal && closeProjectModal()
openWin && openWin(2)
openWin && openWin(2,10)
}}
okText="确定"
cancelText="取消"
@ -317,6 +317,7 @@ const getProject = (params)=>{
textHeight={textHeight}
listHeight={listHeight}
kfType={kfType}
questionType={questionType}
supplierNo={kfType==1?'EMPTY':agentNumber}
conversationId={conversationId}
closeWin={()=>{
@ -396,8 +397,8 @@ const getProject = (params)=>{
<Modal title="请选择您要咨询的客服类型" visible={optionsModal} footer={null} onCancel={()=>{
closeOptionsModal && closeOptionsModal()
}}>
<p><a href="#" onClick={()=> openWin && openWin(1)}>点击咨询平台客服</a>平台操作相关问题</p>
<p><a href="#" onClick={()=> openWin && openWin(1)}>点击咨询智慧安全公司客服</a>iPASS及电子签章相关问题</p>
<p><a href="#" onClick={()=> openWin && openWin(1,2)}>点击咨询平台客服</a>平台操作相关问题</p>
<p><a href="#" onClick={()=> openWin && openWin(1,6)}>点击咨询智慧安全公司客服</a>iPASS及电子签章相关问题</p>
<p><a href="#" onClick={()=> openProjectWin && openProjectWin()}>点击咨询代理机构客服</a>项目内容相关问题</p>
</Modal>
}