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

增加moment;

上级 7510a9d3
...@@ -4,18 +4,22 @@ import {uaaRequest} from '@/webPublic/one_stop_public/utils/request'; ...@@ -4,18 +4,22 @@ import {uaaRequest} from '@/webPublic/one_stop_public/utils/request';
import { Spin } from 'antd'; import { Spin } from 'antd';
import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils"; import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils";
import { getMessage, getModal } from '@/webPublic/one_stop_public/utils/utils'; import { getMessage, getModal } from '@/webPublic/one_stop_public/utils/utils';
import moment from 'moment';
const Modal = getModal(); const Modal = getModal();
const message = getMessage(); const message = getMessage();
export default function prepareShow(postData = {} , content = '') { // 模板挂载前执行的公式 export default function prepareShow(postData = {} , content = '') { // 模板挂载前执行的公式
let agg = deepCopy(postData); let agg = deepCopy(postData);
window.message = message;
window.Modal = Modal;
window.moment = moment;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let data = agg?.unifiedServicePatternModel?.content || content; let data = agg?.unifiedServicePatternModel?.content || 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 = { // 函数参数
message, // message,
Modal, // Modal,
uaaRequest, uaaRequest,
userNowInfo: userNowInfo:
(isJSON(localStorage.getItem('user')) && JSON.parse(localStorage.getItem('user'))) || (isJSON(localStorage.getItem('user')) && JSON.parse(localStorage.getItem('user'))) ||
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论