Commit 3102d690 authored by 涂伟's avatar 涂伟

fix: 'mobile功能路径存储逻辑添加'

parent 9b0d4504
......@@ -9,6 +9,12 @@ import CheckList from './checkBox';
const { Item } = Form;
const EditForm = props => {
const { submitCallback, nodeType, info, inf, checkList, valueCallback = () => {} } = props;
// 处理pageUrl回显
if (info.product) {
info.pageUrl = '/' + info.product + info.pageUrl;
} else {
info.pageUrl = '/MobileGCK' + info.pageUrl;
}
const [form] = Form.useForm();
const [otherForm] = Form.useForm();
const [showParmarModal, setShowParmarModal] = useState(false);
......
......@@ -415,15 +415,26 @@ const MiniMenu = props => {
setAddTwoVisible(true);
setKeepType('MiniAppMenu');
};
// 处理数据
const getParams = prop => {
const typeArr = ['MobileGCK', 'civ_mobile', 'Flutter'];
let productType = prop.pageUrl.split('/')[1] || '';
if (!typeArr.includes(productType)) {
productType = ''
}
const pageUrl = productType ? prop.pageUrl.replace(`/${productType}`, '') : prop.pageUrl;
return { productType, pageUrl };
};
// 新增提交的回调
const submitCallback = (prop, item, e) => {
setSubmitLoading(true);
const productType =
prop.pageUrl.split('/')[1] === 'civ_mobile' ? prop.pageUrl.split('/')[1] : '';
const pageUrl = prop.pageUrl.includes('/civ_mobile')
? prop.pageUrl.replace('/civ_mobile', '')
: prop.pageUrl;
let obj = { ...prop, productType, pageUrl };
// const productType =
// prop.pageUrl.split('/')[1] === 'civ_mobile' ? prop.pageUrl.split('/')[1] : '';
// const pageUrl = prop.pageUrl.includes('/civ_mobile')
// ? prop.pageUrl.replace('/civ_mobile', '')
// : prop.pageUrl;
const params = getParams(prop);
let obj = { ...prop, ...params };
// if (addType === 3 || addType === 4) {
// obj.relatedRoleList = String(roleList) || '';
// }
......@@ -465,14 +476,15 @@ const MiniMenu = props => {
};
// 编辑的回调
const editSubmitCallback = prop => {
const productType =
prop.pageUrl.split('/')[1] === 'civ_mobile' ? prop.pageUrl.split('/')[1] : '';
const pageUrl = prop.pageUrl.includes('/civ_mobile')
? prop.pageUrl.replace('/civ_mobile', '')
: prop.pageUrl;
// const productType =
// prop.pageUrl.split('/')[1] === 'civ_mobile' ? prop.pageUrl.split('/')[1] : '';
// const pageUrl = prop.pageUrl.includes('/civ_mobile')
// ? prop.pageUrl.replace('/civ_mobile', '')
// : prop.pageUrl;
const params = getParams(prop);
setLoading(true);
console.log(prop);
let obj = { ...prop, productType, pageUrl };
let obj = { ...prop, ...params };
// if (nodeType === 3 || nodeType === 4) {
// obj.relatedRoleList = String(roleList) || '';
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment