提交 2e4dfc54 authored 作者: 钟是志's avatar 钟是志

删除垃圾代码

上级 d610672e
......@@ -19,8 +19,6 @@ import { getModal } from '@/webPublic/one_stop_public/utils/utils';
import beforeApplySubmit from '@/webPublic/one_stop_public/utils/beforeApplySubmit';
const Modal = getModal();
// let dingshiqi = {};
// const ThisWindow = window;
class SponsorForm extends Component {
constructor(props) {
......@@ -28,14 +26,12 @@ class SponsorForm extends Component {
this.setEditor = editor => {
this.editor = editor;
};
this.focusEditor = () => {
if (this.editor) {
this.editor.focus();
}
};
const { propsState } = props;
this.state = {
visible: false, // 确认弹框状态
img: '', // 上传图片路径
......@@ -47,7 +43,6 @@ class SponsorForm extends Component {
init: {}, // 默认值
disabled: false, // 按钮控制状态
data: '', //当前用户数据
appId: propsState.appId,
postData: propsState.postData,
isLoading: propsState.isLoading,
......@@ -55,28 +50,6 @@ class SponsorForm extends Component {
};
}
/**
* 发起请求拿取表单
*/
componentDidMount() {
// dingshiqi = ThisWindow.setTimeout(() => {
// this.giveMessageTop();
// }, 500);
}
// giveMessageTop = () => {
// if (this.props.history.location.state) {
// let { noNeedCaoGao } = this.props.history.location.state;
// if (noNeedCaoGao) {
// let dom = document.getElementById('tabsTableFromIframe');
// if (typeof dom.scrollHeight !== 'undefined') {
// ThisWindow.top.postMessage('iframeHeight-' + dom.scrollHeight, '*');
// }
// clearTimeout(dingshiqi);
// }
// }
// };
// 钟是志 iframe Modal样式修改
countHeight = () => {
let dom = document.getElementById('tabsTableFromIframe');
let top = 0;
......@@ -93,7 +66,6 @@ class SponsorForm extends Component {
* 提交完成后用户提示
*/
info = () => {
let { isCg, noNeedCaoGao } = this.props.history.location.state;
let top = this.countHeight();
let style = {};
if (top) {
......@@ -127,18 +99,6 @@ class SponsorForm extends Component {
this.setState({
disabled: true,
});
/***
* 需要加入跳转功能;
* 钟是志
* 在iframe中打开时 直接返回一个postMessage;
* */
if (noNeedCaoGao) {
// if (ThisWindow && ThisWindow.top) {
// ThisWindow.top.postMessage('returnList', '*');
// }
resolve(true);
return true;
}
router.goBack();
resolve(true);
return true;
......@@ -288,7 +248,6 @@ class SponsorForm extends Component {
render() {
let { disabled, visible, postData, isLoading } = this.state;
let { init, noNeedApplyButton } = this.props;
let { isCg, noNeedCaoGao } = this.props.history.location.state;
let routerState = {
history: this.props?.history,
location: this.props?.location,
......@@ -303,7 +262,7 @@ class SponsorForm extends Component {
<div className={styles.form} id="add_form">
{isEmpty(postData) === false ? (
<ZdyTable
isCg={isCg}
isCg={undefined}
get="web"
postData={postData}
form={this.props.form}
......@@ -333,8 +292,6 @@ class SponsorForm extends Component {
) : (
''
)}
{/* <DataVBank /> */}
{/* 提交申请的弹窗 */}
<AddModal
visible={visible}
handleOk={this.handleOk}
......@@ -375,8 +332,7 @@ export default class SponsorFormDetail extends Component {
}
componentDidMount() {
let { id, dispatch, history } = this.props;
let { isCg, draftId } = history.location.state;
let { id, dispatch } = this.props;
dispatch({
type: 'modileHome/getDetail',
payload: {
......@@ -390,7 +346,7 @@ export default class SponsorFormDetail extends Component {
appId: val.id,
isLoading: true,
postData: val,
draftId: !!draftId ? draftId : '',
draftId: '',
},
() => {},
);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论