传参sceneUrl

This commit is contained in:
unknown
2022-07-18 10:01:12 +08:00
parent f2c3408fc8
commit 2bb91c7f76
4 changed files with 35 additions and 36 deletions

View File

@ -195,22 +195,24 @@ const Promenu: React.FC<{}> = () => {
setAnchorEl(null);
};
const initChatUI = () => { //智慧客服
var pathname = window.location.pathname
var consultType = pathname.substring(pathname.lastIndexOf('/')+1)
var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement
if(tempForm){
var hideInput = document.getElementById('tempInput_CustomerService') as HTMLInputElement
if(hideInput){
hideInput.value= consultType
}else{
hideInput = document.createElement("input")
hideInput.id = 'tempInput_CustomerService'
hideInput.type="hidden"
hideInput.name= 'consultType'
hideInput.value= consultType
tempForm.appendChild(hideInput)
if(MethodDict!='procurement_mode_6' && MethodDict!='procurement_mode_7' && window.location.pathname.indexOf('BidEvaluation')!=-1){
message.warn('非谈判类项目【评标】阶段禁止沟通')
}else{
var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement
if(tempForm){
var hideInput = document.getElementById('tempInput_CustomerService') as HTMLInputElement
if(hideInput){
hideInput.value= window.location.pathname
}else{
hideInput = document.createElement("input")
hideInput.id = 'tempInput_CustomerService'
hideInput.type="hidden"
hideInput.name= 'sceneUrl'
hideInput.value= window.location.pathname
tempForm.appendChild(hideInput)
}
tempForm.submit();
}
tempForm.submit();
}
}
return (