Commit 55a6d87c authored by 邓超's avatar 邓超

fix: web配置功能路劲限制模糊匹配修改

parent d6624232
Pipeline #73754 passed with stages
...@@ -274,7 +274,7 @@ export default props => { ...@@ -274,7 +274,7 @@ export default props => {
let arr = validate.homePage.split('/'); // 用const声明常量 let arr = validate.homePage.split('/'); // 用const声明常量
let allProList = JSON.parse(JSON.stringify(allProductList)); let allProList = JSON.parse(JSON.stringify(allProductList));
allProList.push({ PackageName: 'civ_base' }); allProList.push({ PackageName: 'civ_base' });
const product = allProList.find(item => item.PackageName.includes(arr[0])); const product = allProList.find(item => item.PackageName === arr[0]);
if (product) { if (product) {
arr.shift(); arr.shift();
validate.homePage = arr.join('/'); validate.homePage = arr.join('/');
......
...@@ -36,7 +36,7 @@ const AddForm = props => { ...@@ -36,7 +36,7 @@ const AddForm = props => {
} }
let allProList = JSON.parse(JSON.stringify(allProductList)); let allProList = JSON.parse(JSON.stringify(allProductList));
allProList.push({ PackageName: 'civ_base' }); allProList.push({ PackageName: 'civ_base' });
const product = allProList.find(item => item.PackageName.includes(arr[0])); const product = allProList.find(item => item.PackageName === arr[0]);
if (product) { if (product) {
if (arr.length > 1) { if (arr.length > 1) {
arr.shift(); arr.shift();
......
...@@ -158,7 +158,7 @@ const EditForm = props => { ...@@ -158,7 +158,7 @@ const EditForm = props => {
} }
let allProList = JSON.parse(JSON.stringify(allProductList)); let allProList = JSON.parse(JSON.stringify(allProductList));
allProList.push({ PackageName: 'civ_base' }); allProList.push({ PackageName: 'civ_base' });
const product = allProList.find(item => item.PackageName.includes(arr[0])); const product = allProList.find(item => item.PackageName === arr[0]);
console.log(product, 'product'); console.log(product, 'product');
if (product) { if (product) {
arr.shift(); arr.shift();
......
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