Commit 02550961 authored by 涂伟's avatar 涂伟

fix: 'mobile功能路径保存逻辑优化'

parent 98d8654a
Pipeline #74153 passed with stages
...@@ -11,9 +11,21 @@ const EditForm = props => { ...@@ -11,9 +11,21 @@ const EditForm = props => {
const { submitCallback, nodeType, info, inf, checkList, valueCallback = () => {} } = props; const { submitCallback, nodeType, info, inf, checkList, valueCallback = () => {} } = props;
// 处理pageUrl回显 // 处理pageUrl回显
if (info.product) { if (info.product) {
info.pageUrl = '/' + info.product + info.pageUrl; if(info.product === 'Flutter') {
info.pageUrl = '/' + info.product + '/' + info.pageUrl;
} else {
info.pageUrl = '/' + info.product + info.pageUrl;
}
} else { } else {
info.pageUrl = '/MobileGCK' + info.pageUrl; if (!info.pageUrl.includes('/')) {
info.pageUrl = '/Flutter/' + info.pageUrl;
} else {
if (info.pageUrl.split('/')[0] !== '') {
info.pageUrl = '/MobileGCK/' + info.pageUrl;
} else {
info.pageUrl = '/MobileGCK' + info.pageUrl;
}
}
} }
const [form] = Form.useForm(); const [form] = Form.useForm();
const [otherForm] = Form.useForm(); const [otherForm] = Form.useForm();
......
...@@ -420,9 +420,12 @@ const MiniMenu = props => { ...@@ -420,9 +420,12 @@ const MiniMenu = props => {
const typeArr = ['MobileGCK', 'civ_mobile', 'Flutter']; const typeArr = ['MobileGCK', 'civ_mobile', 'Flutter'];
let productType = prop.pageUrl.split('/')[1] || ''; let productType = prop.pageUrl.split('/')[1] || '';
if (!typeArr.includes(productType)) { if (!typeArr.includes(productType)) {
productType = '' productType = '';
}
let pageUrl = productType ? prop.pageUrl.replace(`/${productType}`, '') : prop.pageUrl;
if (productType === 'Flutter') {
pageUrl = pageUrl.replace('/', '');
} }
const pageUrl = productType ? prop.pageUrl.replace(`/${productType}`, '') : prop.pageUrl;
return { productType, pageUrl }; return { productType, pageUrl };
}; };
// 新增提交的回调 // 新增提交的回调
......
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