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

删除垃圾代码

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