Commit 4f1a7479 authored by xuchaozou's avatar xuchaozou

Revert "feat: 初步增加录音模块哦"

This reverts commit 418d85d7.
parent 3ca5bc08
Pipeline #85594 waiting for manual action with stages
import { request, event } from '@wisdom-utils/utils'; import { request, event } from '@wisdom-utils/utils'
import { useCallback, useEffect } from 'react'; import { useCallback, useEffect } from 'react'
const SoundAi = props => { const SoundAi = props => {
const changeSwitch = useCallback(({ recordData, e: checked }) => { const changeSwitch = useCallback(({recordData , e : checked}) => {
if (checked) { if(checked) {
} }
// console.log(checked) // console.log(checked)
// debugger // debugger
...@@ -15,36 +16,34 @@ const SoundAi = props => { ...@@ -15,36 +16,34 @@ const SoundAi = props => {
// loading : false // loading : false
// }) // })
// }, 5000) // }, 5000)
}, []); }, [])
useEffect(() => { useEffect(() => {
request('/PandaOMS/OMS/DataManger/GetDicConfigs', { request("/PandaOMS/OMS/DataManger/GetDicConfigs", {
params: { params: {
ParentName: '智能语音', ParentName: "智能语音",
ChilName: '是否开启', ChilName: "是否开启"
}, }
}) }).then(res => {
.then(res => {
if (res.code != 0) { if (res.code != 0) {
return; return
} }
const { data } = res; const data = res.data
const config = data.find(item => item.nodeName == '是否开启'); const config = data.find(item => item.nodeName == "是否开启")
if (!config) return; if(!config) return
const value = config.nodeValue; const value = config.nodeValue
if (value != '开') return; if(value != "开") return
event.emit('record:changeVisible', { event.emit("record:changeVisible", {
visible: true, visible : true
});
event.on('record:changedStaus', changeSwitch);
}) })
.catch(error => { event.on("record:changedStaus", changeSwitch)
}).catch(error => {
// console.log(error) // console.log(error)
}); })
return () => { return () => {
event.off('record:changedStaus', changeSwitch); event.off("record:changedStaus", changeSwitch)
}; }
}, [changeSwitch]); }, [])
return null; return null
}; }
export default SoundAi; export default SoundAi
\ No newline at end of file
...@@ -414,7 +414,7 @@ const Layout = props => { ...@@ -414,7 +414,7 @@ const Layout = props => {
window.share.event.removeAllListeners('updateSite'); window.share.event.removeAllListeners('updateSite');
loginAction.events.removeListener('toggleIndustry', handleToggleIndustry); loginAction.events.removeListener('toggleIndustry', handleToggleIndustry);
}; };
}, [GetIntegrationConfig, loginAction.events, props]); }, [loginAction.events, props]);
useEffect(() => { useEffect(() => {
const needMark = () => const needMark = () =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment