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

在登录时调用户信息接口查询用户的 一站式信息

上级 24a766a6
...@@ -14,6 +14,7 @@ import styles from './styles.less'; ...@@ -14,6 +14,7 @@ import styles from './styles.less';
import ModalDiy from '@/baseComponent/ModalDiy'; import ModalDiy from '@/baseComponent/ModalDiy';
import { callbackSubmitData } from '@/webPublic/one_stop_public/models/callbackExamineProcess'; import { callbackSubmitData } from '@/webPublic/one_stop_public/models/callbackExamineProcess';
import { getToken } from '@/utils/authority'; import { getToken } from '@/utils/authority';
import { isJSON } from '@/webPublic/zyd_public/utils/utils';
function AuditButton(props) { function AuditButton(props) {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
...@@ -42,7 +43,7 @@ function AuditButton(props) { ...@@ -42,7 +43,7 @@ function AuditButton(props) {
taskForm: JSON.stringify(values), // 审批表单的参数值 taskForm: JSON.stringify(values), // 审批表单的参数值
apiData: data, apiData: data,
taskFormKey: data?.taskFormKey, taskFormKey: data?.taskFormKey,
userNowInfo: {}, // 学工里面没有这个. 只有一站式有 userNowInfo: (isJSON(localStorage.getItem('user')) && JSON.parse(localStorage.getItem('user'))) || {},
buttonInfo: buttonInfo:
data?.btns && data?.btns.length ? data?.btns.find((x) => x.value === btnValue) : {}, data?.btns && data?.btns.length ? data?.btns.find((x) => x.value === btnValue) : {},
token: getToken(), token: getToken(),
......
...@@ -124,7 +124,18 @@ export const getListByTreeList = (params = {}) => { ...@@ -124,7 +124,18 @@ export const getListByTreeList = (params = {}) => {
return uaaRequest('/UnifiedAppApi/getListByTree', params); return uaaRequest('/UnifiedAppApi/getListByTree', params);
}; };
export const getOneStopMyInfo = (params = {}) => {
return uaaRequest('/UserApi/getMy', params);
};
export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value_list') { export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value_list') {
getOneStopMyInfo({}).then((res) => {
if(res){
localStorage.setItem('user', JSON.stringify(res));
}
});
return fetchTableData({ return fetchTableData({
dataObjId: config.onestopConfigDataObjId || '1248169933162938368', dataObjId: config.onestopConfigDataObjId || '1248169933162938368',
pageNo: 1, pageNo: 1,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论