Commit acf0de31 authored by 涂伟's avatar 涂伟

fix: 'mobile运维功能路径逻辑优化'

parent 19e19115
Pipeline #74292 passed with stages
......@@ -11,19 +11,19 @@ const EditForm = props => {
const { submitCallback, nodeType, info, inf, checkList, valueCallback = () => {} } = props;
// 处理pageUrl回显
if (info.product) {
if(info.product === 'Flutter') {
info.pageUrl = '/' + info.product + '/' + info.pageUrl;
if(info.product === 'flutter') {
info.pageUrl = info.product + '/' + info.pageUrl;
} else {
info.pageUrl = '/' + info.product + info.pageUrl;
info.pageUrl = info.product + info.pageUrl;
}
} else {
if (!info.pageUrl?.includes('/')) {
info.pageUrl = '/Flutter/' + info.pageUrl;
info.pageUrl = 'flutter/' + info.pageUrl;
} else {
if (info.pageUrl?.split('/')[0] !== '') {
info.pageUrl = '/MobileGCK/' + info.pageUrl;
info.pageUrl = 'MobileGCK/' + info.pageUrl;
} else {
info.pageUrl = '/MobileGCK' + info.pageUrl;
info.pageUrl = 'MobileGCK' + info.pageUrl;
}
}
}
......
......@@ -417,13 +417,13 @@ const MiniMenu = props => {
};
// 处理数据
const getParams = prop => {
const typeArr = ['MobileGCK', 'civ_mobile', 'Flutter'];
let productType = prop.pageUrl.split('/')[1] || '';
const typeArr = ['MobileGCK', 'civ_mobile', 'flutter'];
let productType = prop.pageUrl?.split('/')[0] || '';
if (!typeArr.includes(productType)) {
productType = '';
}
let pageUrl = productType ? prop.pageUrl.replace(`/${productType}`, '') : prop.pageUrl;
if (productType === 'Flutter') {
let pageUrl = productType ? prop.pageUrl.replace(`${productType}`, '') : prop.pageUrl;
if (productType === 'flutter') {
pageUrl = pageUrl.replace('/', '');
}
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