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

发起页面修改

上级 042ce18f
......@@ -11,6 +11,7 @@ import { setOneStopActiveMenusConfig, setOneStopConfig } from '@/webPublic/zyd_p
import { getOneStopConfigList } from '@/webPublic/one_stop_public/publicServices';
import prepareShow from '@/webPublic/one_stop_public/Table/prepareShow';
import { queryApiVersion } from '@/webPublic/one_stop_public/utils/queryConfig';
import { getOneStopMyInfo } from '@/webPublic/one_stop_public/utils/utils';
// 根据模板code查询模板数据
// 查询表格中某条数据
......@@ -132,7 +133,7 @@ export const getHistoryFormDetail = (params = {}) => {
if (res) {
// console.log(queryApiVersion());
if (queryApiVersion() === '2.0') { // 2.0的接口 流程日志单独获取
return api2_0_getTaskInfo(params)
return api2_0_getTaskInfo(params)
.then((res2) => {
return {
...res,
......@@ -145,7 +146,8 @@ export const getHistoryFormDetail = (params = {}) => {
} else {
return null;
}
}).then((g) => {
})
.then((g) => {
// console.log(g);
return g;
});
......@@ -190,17 +192,7 @@ export const getAppTypeList = () => {
export const getListByTreeList = (params = {}) => {
return uaaRequest('/UnifiedAppApi/getListByTree', params);
};
export const getOneStopMyInfo = (params = {}) => {
return uaaRequest('/UserApi/getMy', params).then((res) => {
if (res) {
if(!res.groupsId){
res.groupsId = 'pub';
}
localStorage.setItem('user', JSON.stringify(res));
}
});
};
export { getOneStopMyInfo };
export function getOneStopActiveMenus(key) {
return new Promise((resolve, reject) => {
......@@ -213,7 +205,6 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value
getOneStopActiveMenus()
.then((res) => {
});
getOneStopMyInfo({});
return fetchTableData({
dataObjId: config.onestopConfigDataObjId || '1248169933162938368',
pageNo: 1,
......
import React from 'react';
import { Modal, message } from 'antd';
import { isJSON } from '@/webPublic/one_stop_public/copy';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request';
import { deepCopy } from '@/webPublic/one_stop_public/utils/myutils';
import { getMessage, getModal } from '@/webPublic/one_stop_public/utils/utils';
import moment from 'moment';
import { giveSmartFormGlobalProps } from '@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps';
import { getToken } from '@/webPublic/one_stop_public/utils/token';
const Modal = getModal();
const message = getMessage();
export default function prepareShow(postData = {}, content = '') {
// 模板挂载前执行的公式
......
......@@ -4,9 +4,7 @@
* 通知提醒框二次封装
*/
import React from 'react';
import { notification } from 'antd';
import { getModal } from '@/webPublic/one_stop_public/utils/utils';
const Modal = getModal();
import { notification, Modal } from 'antd';
/**
*
......
......@@ -2,20 +2,21 @@
* 设置token
* */
import { isJSON } from '@/webPublic/one_stop_public/copy';
import { getOneStopMyInfo } from '@/webPublic/one_stop_public/utils/utils';
export const setToken = (value, time) => {
export function setToken(value, time){
if(getToken() !== value){
localStorage.setItem('antd-pro-token-onestop', value);
localStorage.setItem('antd-pro-token', value);
localStorage.setItem('wisdom-school-token', value);
getOneStopMyInfo();
}
}
/**
* 获取token
* */
export const getToken = () => {
export function getToken(){
const x = localStorage.getItem('antd-pro-token-onestop');
if (x && x.length > 11) {
return x;
......@@ -26,7 +27,7 @@ export const getToken = () => {
}
return null;
};
}
/**
* 删除token
......@@ -35,7 +36,7 @@ export const delToken = () => {
localStorage.removeItem('antd-pro-token-onestop');
localStorage.removeItem('antd-pro-token');
localStorage.removeItem('wisdom-school-token');
}
};
export const getUserInfo = () => {
let x = localStorage.getItem('user');
......@@ -50,4 +51,4 @@ export const getUserInfo = () => {
groupsId: 'pub',
};
}
}
};
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
import { Modal, Popconfirm, message } from 'antd';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request';
const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
......@@ -54,3 +55,14 @@ export const getPopconfirm = () => {
export const getMessage = () => {
return isFromIframe() ? window?.parent?.iframeParentComponent?.message : message;
};
export const getOneStopMyInfo = (params = {}) => {
return uaaRequest('/UserApi/getMy', params).then((res) => {
if (res) {
if(!res.groupsId){
res.groupsId = 'pub';
}
localStorage.setItem('user', JSON.stringify(res));
}
});
};
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论