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

prepareShow函数修改

上级 f2a3f007
import React from 'react'; import React from 'react';
import ZdyTable from './ZdyTable'; import ZdyTable from './ZdyTable';
export default function Index(props) { export default ZdyTable;
return <ZdyTable {...props} />;
}
...@@ -7,13 +7,7 @@ import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils"; ...@@ -7,13 +7,7 @@ import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils";
export default function prepareShow(postData) { export default function prepareShow(postData) {
let agg = deepCopy(postData); let agg = deepCopy(postData);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if(window.location.href.indexOf('mobile/FlowDetail') > -1){ let data = agg?.unifiedServicePatternModel?.content;
resolve(true);
return;
}
// resolve(true);
// return;
let data = postData?.unifiedServicePatternModel?.content;
let g = !!data && isJSON(data) && JSON.parse(data)?.templateWillMount; let g = !!data && isJSON(data) && JSON.parse(data)?.templateWillMount;
if (g && typeof g === 'string' && g.length > 10) { if (g && typeof g === 'string' && g.length > 10) {
let p = { let p = {
...@@ -35,7 +29,6 @@ export default function prepareShow(postData) { ...@@ -35,7 +29,6 @@ export default function prepareShow(postData) {
console.log('执行templateWillMount公式完成', res); console.log('执行templateWillMount公式完成', res);
window.zdyTableTemplateWillMountProps = res; window.zdyTableTemplateWillMountProps = res;
resolve(true); resolve(true);
// return postData;
} }
}) })
.catch(error => { .catch(error => {
...@@ -47,6 +40,8 @@ export default function prepareShow(postData) { ...@@ -47,6 +40,8 @@ export default function prepareShow(postData) {
resolve(true); resolve(true);
console.log(e); console.log(e);
} }
}else{
resolve(true);
} }
}); });
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论