传参sceneUrl
This commit is contained in:
@ -1,17 +1,15 @@
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { Button, Tabs, Form, Input, Modal, Space, Checkbox, message, PageHeader, Popconfirm, Progress, Tag, Spin } from 'antd';
|
||||
import React, { useState, useRef, } from 'react';
|
||||
import { Button, Tabs, Form, Input, Modal, Checkbox, message, PageHeader, Popconfirm, Progress, Spin } from 'antd';
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { getSection, exitProject, getProject, getOther, supplierRegister, exitProjectPayCheck } from './service';
|
||||
import { getSupplierUser } from '@/utils/SupplierList/service'
|
||||
import { getProMethod, getSessionUserData, getRA } from '@/utils/session';
|
||||
import { getProMethod, } from '@/utils/session';
|
||||
import '@/assets/ld_style.less';
|
||||
import { history } from 'umi';
|
||||
import { followUpAProjectSupplier, getDicData } from '@/utils/session';
|
||||
import { getDictName, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import ProList from '@ant-design/pro-list';
|
||||
import { MessageOutlined } from '@ant-design/icons';
|
||||
import CreateForm from '@/pages/ListTableList/components/CreateForm';
|
||||
import kefu from '@/assets/img/kefu.png' //智慧客服
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
const { TextArea } = Input;
|
||||
@ -128,7 +126,7 @@ const Index: React.FC<{}> = () => {
|
||||
title: '我要咨询',
|
||||
dataIndex: 'consult',
|
||||
render: (text: any, record: any) => (
|
||||
<Button type="text" danger size='large' icon={<MessageOutlined />} onClick={()=>{createHiddenForm(record);initChatUI()}}/>
|
||||
<span onClick={()=>{createHiddenForm(record);initChatUI()}}><img style={{width:20,height:20, cursor:'pointer'}} src={kefu} alt="" /></span>
|
||||
),
|
||||
},
|
||||
{
|
||||
@ -407,7 +405,9 @@ const Index: React.FC<{}> = () => {
|
||||
})
|
||||
}
|
||||
const createHiddenForm = (record:any)=>{//智慧客服-创建临时表单
|
||||
const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=' + REACT_APP_CUSTOMERSERVICE_CLIENT_ID + '&redirect_uri=' + REACT_APP_CUSTOMERSERVICE_REDIRECT + '/redirect?page=home&mall3_token=';//智慧客服
|
||||
//const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=' + REACT_APP_CUSTOMERSERVICE_CLIENT_ID + '&redirect_uri=' + REACT_APP_CUSTOMERSERVICE_REDIRECT + '/redirect?page=home&mall3_token=';//智慧客服
|
||||
const customerservice = REACT_APP_CUSTOMERSERVICE_USERCENTER + '&client_id=S00hFPxc&redirect_uri=http://localhost:3000/redirect?page=home&mall3_token=';//智慧客服
|
||||
|
||||
var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement
|
||||
if(tempForm) document.body.removeChild(tempForm);
|
||||
tempForm = document.createElement("form")
|
||||
@ -516,6 +516,10 @@ const Index: React.FC<{}> = () => {
|
||||
}
|
||||
tempForm.appendChild(hideInput)
|
||||
})
|
||||
var input = document.createElement("input")
|
||||
input.name= 'sceneUrl'
|
||||
input.value= window.location.pathname
|
||||
tempForm.appendChild(input)
|
||||
document.body.appendChild(tempForm);
|
||||
}else{
|
||||
message.warn('参数为空')
|
||||
@ -523,12 +527,7 @@ const Index: React.FC<{}> = () => {
|
||||
}
|
||||
const initChatUI = () => { //智慧客服
|
||||
var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement
|
||||
var hideInput = document.createElement("input")
|
||||
if(tempForm){
|
||||
hideInput.type="hidden"
|
||||
hideInput.name= 'consultType'
|
||||
hideInput.value= 'PROJECTLIST'
|
||||
tempForm.appendChild(hideInput)
|
||||
tempForm.submit();
|
||||
document.body.removeChild(tempForm);
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ import Weboffice from "@/pages/webOffice/weboffice";
|
||||
import { queryingPagingData } from '@/utils/PageUtils';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import { MessageOutlined } from '@ant-design/icons';
|
||||
|
||||
import kefu from '@/assets/img/kefu.png' //智慧客服
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
//标的类型
|
||||
@ -218,6 +217,10 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
|
||||
}
|
||||
tempForm.appendChild(hideInput)
|
||||
})
|
||||
var input = document.createElement("input")
|
||||
input.name= 'sceneUrl'
|
||||
input.value= window.location.pathname
|
||||
tempForm.appendChild(input)
|
||||
document.body.appendChild(tempForm);
|
||||
}else{
|
||||
message.warn('参数为空')
|
||||
@ -225,12 +228,7 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
|
||||
}
|
||||
const initChatUI = () => { //智慧客服
|
||||
var tempForm = document.getElementById('tempForm_CustomerService') as HTMLFormElement
|
||||
var hideInput = document.createElement("input")
|
||||
if(tempForm){
|
||||
hideInput.type="hidden"
|
||||
hideInput.name= 'consultType'
|
||||
hideInput.value= 'PROJECTLIST'
|
||||
tempForm.appendChild(hideInput)
|
||||
tempForm.submit();
|
||||
document.body.removeChild(tempForm);
|
||||
}
|
||||
@ -287,7 +285,7 @@ const LookingForBusinessOpportunitiesList: React.FC<{}> = () => {
|
||||
title: '我要咨询',
|
||||
dataIndex: 'consult',
|
||||
render: (text: any, record: any) => (
|
||||
<Button type="text" danger size='large' icon={<MessageOutlined />} onClick={()=>{createHiddenForm(record);initChatUI()}}/>
|
||||
<span onClick={()=>{createHiddenForm(record);initChatUI()}}><img style={{width:20,height:20, cursor:'pointer'}} src={kefu} alt="" /></span>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user