Commit 2c711627 authored by 邓晓峰's avatar 邓晓峰

fix: gitlab-ci.yml

parent 4bfa0ce4
Pipeline #22188 passed with stages
in 27 minutes 50 seconds
...@@ -13,7 +13,7 @@ stages: ...@@ -13,7 +13,7 @@ stages:
install: install:
stage: install stage: install
script: script:
- npm install - npm run init
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
......
...@@ -25,11 +25,5 @@ export default { ...@@ -25,11 +25,5 @@ export default {
activeRule: genActiveRule('/civbase/civweb4'), activeRule: genActiveRule('/civbase/civweb4'),
props: {}, props: {},
}, },
// {
// name: 'civweb5',
// entry: `//${window.location.host}/civweb5`,
// container: '#micro-container',
// activeRule: genActiveRule('/civbase/civweb5'),
// },
], ],
}; };
...@@ -34,6 +34,20 @@ module.exports = { ...@@ -34,6 +34,20 @@ module.exports = {
'/cityinterface': '/cityinterface', '/cityinterface': '/cityinterface',
}, },
}, },
'/cityjson': {
target: 'https://pv.sohu.com',
// target: 'http://192.168.19.102:8055',
// target: 'https://panda-water.com',
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
pathRewrite: {
'/cityjson': '/cityjson',
},
},
'/Publish': { '/Publish': {
// target: 'http://192.168.12.8:8098', // target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888', // target: 'http://192.168.10.20:8888',
......
...@@ -231,9 +231,9 @@ ...@@ -231,9 +231,9 @@
} }
}, },
"@ant-design/react-slick": { "@ant-design/react-slick": {
"version": "0.27.14", "version": "0.28.1",
"resolved": "https://g.civnet.cn:4873/@ant-design%2freact-slick/-/react-slick-0.27.14.tgz", "resolved": "https://g.civnet.cn:4873/@ant-design%2freact-slick/-/react-slick-0.28.1.tgz",
"integrity": "sha1-oQgsRzTlfHupxB0DU3X1v1d/O14=", "integrity": "sha1-Lgcgg4y1eriBg4TcyWsqjGH80B4=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.4", "@babel/runtime": "^7.10.4",
...@@ -7151,14 +7151,29 @@ ...@@ -7151,14 +7151,29 @@
} }
}, },
"@wisdom-utils/components": { "@wisdom-utils/components": {
"version": "0.0.4", "version": "0.0.6",
"resolved": "https://g.civnet.cn:4873/@wisdom-utils%2fcomponents/-/components-0.0.4.tgz", "resolved": "https://g.civnet.cn:4873/@wisdom-utils%2fcomponents/-/components-0.0.6.tgz",
"integrity": "sha512-+G/0eSHsney5VePzjAPmXcW8xKclUnac+h+Xi7xxXAfHGYn8ruYj4a3eT9XcnvqDSHvEHSIRH23a8weTdIDjzw==" "integrity": "sha512-OX62BwTK3LGDxOz+H2eX/HbOs6ALDdZA6LDGkSMHGShbVPQvXl/RyGwn9nGIV3cHMI0dDc5MF/2mNaLDs1A6WQ==",
"requires": {
"react": "^16.14.0"
},
"dependencies": {
"react": {
"version": "16.14.0",
"resolved": "https://g.civnet.cn:4873/react/-/react-16.14.0.tgz",
"integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2"
}
}
}
}, },
"@wisdom-utils/utils": { "@wisdom-utils/utils": {
"version": "0.0.19", "version": "0.0.23",
"resolved": "https://g.civnet.cn:4873/@wisdom-utils%2futils/-/utils-0.0.19.tgz", "resolved": "https://g.civnet.cn:4873/@wisdom-utils%2futils/-/utils-0.0.23.tgz",
"integrity": "sha512-Y8zEIaDfZ/D0M8sb0KJoikRoT/x7rUKrbxC8UZkNwmrQqm+yyALPV2GqfTXYHHYCvgQ+zpD/E3uP3leKCAJ97Q==", "integrity": "sha512-NhRZIySKvS8ooVuuFsPtYJi+hsmu3r5UAT1rFyPZYxjmegva/taSK4viRQs1BarUpBIMwF0vIZakkhoXRlbz/w==",
"requires": { "requires": {
"axios": "^0.21.1", "axios": "^0.21.1",
"cookie": "^0.4.1", "cookie": "^0.4.1",
...@@ -7171,24 +7186,11 @@ ...@@ -7171,24 +7186,11 @@
"query-string": "^6.13.8" "query-string": "^6.13.8"
}, },
"dependencies": { "dependencies": {
"axios": {
"version": "0.21.1",
"resolved": "https://g.civnet.cn:4873/axios/-/axios-0.21.1.tgz",
"integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=",
"requires": {
"follow-redirects": "^1.10.0"
}
},
"cookie": { "cookie": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://g.civnet.cn:4873/cookie/-/cookie-0.4.1.tgz", "resolved": "https://g.civnet.cn:4873/cookie/-/cookie-0.4.1.tgz",
"integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA=="
}, },
"follow-redirects": {
"version": "1.13.1",
"resolved": "https://g.civnet.cn:4873/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha1-X2m4Ezds7k/QR0o6uoNd8Eq3Y7c="
},
"query-string": { "query-string": {
"version": "6.13.8", "version": "6.13.8",
"resolved": "https://g.civnet.cn:4873/query-string/-/query-string-6.13.8.tgz", "resolved": "https://g.civnet.cn:4873/query-string/-/query-string-6.13.8.tgz",
...@@ -7542,14 +7544,14 @@ ...@@ -7542,14 +7544,14 @@
"dev": true "dev": true
}, },
"antd": { "antd": {
"version": "4.9.4", "version": "4.10.1",
"resolved": "https://g.civnet.cn:4873/antd/-/antd-4.9.4.tgz", "resolved": "https://g.civnet.cn:4873/antd/-/antd-4.10.1.tgz",
"integrity": "sha1-EpCSvEpnx3QUXLJFDkBG0noay7E=", "integrity": "sha1-rTkPU11D5+HULTFrPULZ4PbkJiY=",
"dev": true, "dev": true,
"requires": { "requires": {
"@ant-design/colors": "^5.0.0", "@ant-design/colors": "^5.0.0",
"@ant-design/icons": "^4.3.0", "@ant-design/icons": "^4.3.0",
"@ant-design/react-slick": "~0.27.0", "@ant-design/react-slick": "~0.28.1",
"@babel/runtime": "^7.11.2", "@babel/runtime": "^7.11.2",
"array-tree-filter": "^2.1.0", "array-tree-filter": "^2.1.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
...@@ -7560,33 +7562,33 @@ ...@@ -7560,33 +7562,33 @@
"rc-cascader": "~1.4.0", "rc-cascader": "~1.4.0",
"rc-checkbox": "~2.3.0", "rc-checkbox": "~2.3.0",
"rc-collapse": "~3.1.0", "rc-collapse": "~3.1.0",
"rc-dialog": "~8.4.0", "rc-dialog": "~8.5.1",
"rc-drawer": "~4.1.0", "rc-drawer": "~4.2.0",
"rc-dropdown": "~3.2.0", "rc-dropdown": "~3.2.0",
"rc-field-form": "~1.17.0", "rc-field-form": "~1.17.3",
"rc-image": "~4.2.0", "rc-image": "~5.0.2",
"rc-input-number": "~6.1.0", "rc-input-number": "~6.1.0",
"rc-mentions": "~1.5.0", "rc-mentions": "~1.5.0",
"rc-menu": "~8.10.0", "rc-menu": "~8.10.0",
"rc-motion": "^2.4.0", "rc-motion": "^2.4.0",
"rc-notification": "~4.5.2", "rc-notification": "~4.5.2",
"rc-pagination": "~3.1.2", "rc-pagination": "~3.1.2",
"rc-picker": "~2.4.1", "rc-picker": "~2.5.1",
"rc-progress": "~3.1.0", "rc-progress": "~3.1.0",
"rc-rate": "~2.9.0", "rc-rate": "~2.9.0",
"rc-resize-observer": "^0.2.3", "rc-resize-observer": "^1.0.0",
"rc-select": "~11.5.3", "rc-select": "~12.1.0",
"rc-slider": "~9.6.1", "rc-slider": "~9.7.1",
"rc-steps": "~4.1.0", "rc-steps": "~4.1.0",
"rc-switch": "~3.2.0", "rc-switch": "~3.2.0",
"rc-table": "~7.11.0", "rc-table": "~7.12.0",
"rc-tabs": "~11.7.0", "rc-tabs": "~11.7.0",
"rc-textarea": "~0.3.0", "rc-textarea": "~0.3.0",
"rc-tooltip": "~5.0.0", "rc-tooltip": "~5.0.0",
"rc-tree": "~4.0.0", "rc-tree": "~4.1.0",
"rc-tree-select": "~4.2.0", "rc-tree-select": "~4.3.0",
"rc-upload": "~3.3.1", "rc-upload": "~3.3.4",
"rc-util": "^5.1.0", "rc-util": "^5.6.6",
"scroll-into-view-if-needed": "^2.2.25", "scroll-into-view-if-needed": "^2.2.25",
"warning": "^4.0.3" "warning": "^4.0.3"
}, },
...@@ -7596,6 +7598,29 @@ ...@@ -7596,6 +7598,29 @@
"resolved": "https://g.civnet.cn:4873/lodash/-/lodash-4.17.20.tgz", "resolved": "https://g.civnet.cn:4873/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true "dev": true
},
"rc-resize-observer": {
"version": "1.0.0",
"resolved": "https://g.civnet.cn:4873/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz",
"integrity": "sha1-l/uJhW9i/sMqtuQJM5Nc9Y4uEC0=",
"dev": true,
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1",
"rc-util": "^5.0.0",
"resize-observer-polyfill": "^1.5.1"
}
},
"rc-util": {
"version": "5.6.6",
"resolved": "https://g.civnet.cn:4873/rc-util/-/rc-util-5.6.6.tgz",
"integrity": "sha1-YmMqirMdzEdNKO/5qlw/8kBeEUY=",
"dev": true,
"requires": {
"@babel/runtime": "^7.12.5",
"react-is": "^16.12.0",
"shallowequal": "^1.1.0"
}
} }
} }
}, },
...@@ -7994,12 +8019,18 @@ ...@@ -7994,12 +8019,18 @@
"dev": true "dev": true
}, },
"axios": { "axios": {
"version": "0.19.2", "version": "0.21.1",
"resolved": "https://g.civnet.cn:4873/axios/-/axios-0.19.2.tgz", "resolved": "https://g.civnet.cn:4873/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", "integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=",
"dev": true,
"requires": { "requires": {
"follow-redirects": "1.5.10" "follow-redirects": "^1.10.0"
},
"dependencies": {
"follow-redirects": {
"version": "1.13.1",
"resolved": "https://g.civnet.cn:4873/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha1-X2m4Ezds7k/QR0o6uoNd8Eq3Y7c="
}
} }
}, },
"axobject-query": { "axobject-query": {
...@@ -11291,9 +11322,9 @@ ...@@ -11291,9 +11322,9 @@
"dev": true "dev": true
}, },
"dayjs": { "dayjs": {
"version": "1.9.7", "version": "1.10.3",
"resolved": "https://g.civnet.cn:4873/dayjs/-/dayjs-1.9.7.tgz", "resolved": "https://g.civnet.cn:4873/dayjs/-/dayjs-1.10.3.tgz",
"integrity": "sha1-SyYLsX3O7S1fKQON/uA8ZaZ4b8A=", "integrity": "sha1-zzNXyOf1CEMoJjcWcuvzdst9YZs=",
"dev": true "dev": true
}, },
"debug": { "debug": {
...@@ -18658,13 +18689,15 @@ ...@@ -18658,13 +18689,15 @@
"dev": true "dev": true
}, },
"kit_global_config": { "kit_global_config": {
"version": "1.0.12", "version": "1.0.19",
"resolved": "https://g.civnet.cn:4873/kit_global_config/-/kit_global_config-1.0.12.tgz", "resolved": "https://g.civnet.cn:4873/kit_global_config/-/kit_global_config-1.0.19.tgz",
"integrity": "sha512-gFp7NhmlLsNE2V8QC7b1NKVUeWmPSDH8EUlbfEH5/9Y6Zzydsyy2bJEdbXmHf3N8/6Yb7W0IpdOZqdtB7KEf6A==", "integrity": "sha512-6BtvJHZV3B7DWPmiKkZXpvtel5BLgn8XC4ruBVTvZpHIUammkJLubYyNk7oA00TXZITJ1SD9AkuZNvNC2lOayg==",
"requires": { "requires": {
"@babel/runtime": "^7.10.5", "@babel/runtime": "^7.10.5",
"js-base64": "^3.5.2", "js-base64": "^3.5.2",
"kit_utils": "^1.3.6" "kit_utils": "^1.3.6",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2"
} }
}, },
"kit_logger": { "kit_logger": {
...@@ -19438,8 +19471,7 @@ ...@@ -19438,8 +19471,7 @@
"lodash.get": { "lodash.get": {
"version": "4.4.2", "version": "4.4.2",
"resolved": "https://g.civnet.cn:4873/lodash.get/-/lodash.get-4.4.2.tgz", "resolved": "https://g.civnet.cn:4873/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
"dev": true
}, },
"lodash.isequal": { "lodash.isequal": {
"version": "4.5.0", "version": "4.5.0",
...@@ -19464,6 +19496,11 @@ ...@@ -19464,6 +19496,11 @@
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
"dev": true "dev": true
}, },
"lodash.set": {
"version": "4.3.2",
"resolved": "https://g.civnet.cn:4873/lodash.set/-/lodash.set-4.3.2.tgz",
"integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM="
},
"lodash.snakecase": { "lodash.snakecase": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://g.civnet.cn:4873/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "resolved": "https://g.civnet.cn:4873/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
...@@ -24711,11 +24748,12 @@ ...@@ -24711,11 +24748,12 @@
} }
}, },
"rc-cascader": { "rc-cascader": {
"version": "1.4.0", "version": "1.4.2",
"resolved": "https://g.civnet.cn:4873/rc-cascader/-/rc-cascader-1.4.0.tgz", "resolved": "https://g.civnet.cn:4873/rc-cascader/-/rc-cascader-1.4.2.tgz",
"integrity": "sha512-6kgQljDQEKjVAVRkZtvvoi+2qv4u42M6oLuvt4ZDBa16r3X9ZN8TAq3atVyC840ivbGKlHT50OcdVx/iwiHc1w==", "integrity": "sha1-yqgQmOPvTV+CP5FW9tjW29YyGvo=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.12.5",
"array-tree-filter": "^2.1.0", "array-tree-filter": "^2.1.0",
"rc-trigger": "^5.0.4", "rc-trigger": "^5.0.4",
"rc-util": "^5.0.1", "rc-util": "^5.0.1",
...@@ -24746,26 +24784,26 @@ ...@@ -24746,26 +24784,26 @@
} }
}, },
"rc-dialog": { "rc-dialog": {
"version": "8.4.6", "version": "8.5.1",
"resolved": "https://g.civnet.cn:4873/rc-dialog/-/rc-dialog-8.4.6.tgz", "resolved": "https://g.civnet.cn:4873/rc-dialog/-/rc-dialog-8.5.1.tgz",
"integrity": "sha1-ag/4FVObaOcFy50vyUCjgQOdET8=", "integrity": "sha1-3zFt2T4WhdffH15BZO41y6Spr4g=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"rc-motion": "^2.3.0", "rc-motion": "^2.3.0",
"rc-util": "^5.0.1" "rc-util": "^5.6.1"
} }
}, },
"rc-drawer": { "rc-drawer": {
"version": "4.1.0", "version": "4.2.0",
"resolved": "https://g.civnet.cn:4873/rc-drawer/-/rc-drawer-4.1.0.tgz", "resolved": "https://g.civnet.cn:4873/rc-drawer/-/rc-drawer-4.2.0.tgz",
"integrity": "sha512-kjeQFngPjdzAFahNIV0EvEBoIKMOnvUsAxpkSPELoD/1DuR4nLafom5ryma+TIxGwkFJ92W6yjsMi1U9aiOTeQ==", "integrity": "sha1-AqYrXwF3/URf+2QZFn4vZ8yegvM=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"rc-util": "^5.0.1" "rc-util": "^5.6.2"
} }
}, },
"rc-dropdown": { "rc-dropdown": {
...@@ -24791,15 +24829,14 @@ ...@@ -24791,15 +24829,14 @@
} }
}, },
"rc-image": { "rc-image": {
"version": "4.2.0", "version": "5.0.2",
"resolved": "https://g.civnet.cn:4873/rc-image/-/rc-image-4.2.0.tgz", "resolved": "https://g.civnet.cn:4873/rc-image/-/rc-image-5.0.2.tgz",
"integrity": "sha1-O3qXf57PusBGKWwpCNmcsfh5XGU=", "integrity": "sha1-WwCzIB70u5748Ypv/mByQBHzy6M=",
"dev": true, "dev": true,
"requires": { "requires": {
"@ant-design/icons": "^4.2.2",
"@babel/runtime": "^7.11.2", "@babel/runtime": "^7.11.2",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"rc-dialog": "~8.4.0", "rc-dialog": "~8.5.1",
"rc-util": "^5.0.6" "rc-util": "^5.0.6"
} }
}, },
...@@ -24868,10 +24905,36 @@ ...@@ -24868,10 +24905,36 @@
"rc-util": "^5.0.1" "rc-util": "^5.0.1"
} }
}, },
"rc-overflow": {
"version": "1.0.2",
"resolved": "https://g.civnet.cn:4873/rc-overflow/-/rc-overflow-1.0.2.tgz",
"integrity": "sha1-9WvNkgApl5mJ9XbVUIS4H5YywZw=",
"dev": true,
"requires": {
"@babel/runtime": "^7.11.1",
"classnames": "^2.2.1",
"rc-resize-observer": "^1.0.0",
"rc-util": "^5.5.1"
},
"dependencies": {
"rc-resize-observer": {
"version": "1.0.0",
"resolved": "https://g.civnet.cn:4873/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz",
"integrity": "sha1-l/uJhW9i/sMqtuQJM5Nc9Y4uEC0=",
"dev": true,
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1",
"rc-util": "^5.0.0",
"resize-observer-polyfill": "^1.5.1"
}
}
}
},
"rc-pagination": { "rc-pagination": {
"version": "3.1.2", "version": "3.1.3",
"resolved": "https://g.civnet.cn:4873/rc-pagination/-/rc-pagination-3.1.2.tgz", "resolved": "https://g.civnet.cn:4873/rc-pagination/-/rc-pagination-3.1.3.tgz",
"integrity": "sha1-q16s2cUfhp41DSJFBkur6RvB8EY=", "integrity": "sha1-r9d5g5/vqyyxQkjV57dAJ5YLtIs=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
...@@ -24879,9 +24942,9 @@ ...@@ -24879,9 +24942,9 @@
} }
}, },
"rc-picker": { "rc-picker": {
"version": "2.4.3", "version": "2.5.2",
"resolved": "https://g.civnet.cn:4873/rc-picker/-/rc-picker-2.4.3.tgz", "resolved": "https://g.civnet.cn:4873/rc-picker/-/rc-picker-2.5.2.tgz",
"integrity": "sha1-rRXuHYXks+IT7GYhXs055qCb6ZU=", "integrity": "sha1-NtkbjN3b+LJHSvKcKFO3dQKn+wE=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
...@@ -24895,9 +24958,9 @@ ...@@ -24895,9 +24958,9 @@
} }
}, },
"rc-progress": { "rc-progress": {
"version": "3.1.1", "version": "3.1.3",
"resolved": "https://g.civnet.cn:4873/rc-progress/-/rc-progress-3.1.1.tgz", "resolved": "https://g.civnet.cn:4873/rc-progress/-/rc-progress-3.1.3.tgz",
"integrity": "sha512-1ns3pW7ll9bHfdXtlVLF+vngdvlxiCDtiqwXnZFEdurst11JTiPxVdeqnCNbhWx5hP4kCKkAPqG1N0FVfTSUGA==", "integrity": "sha1-132P0m2dlI1ywqKLZLcabobfJCY=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
...@@ -24928,24 +24991,24 @@ ...@@ -24928,24 +24991,24 @@
} }
}, },
"rc-select": { "rc-select": {
"version": "11.5.3", "version": "12.1.0",
"resolved": "https://g.civnet.cn:4873/rc-select/-/rc-select-11.5.3.tgz", "resolved": "https://g.civnet.cn:4873/rc-select/-/rc-select-12.1.0.tgz",
"integrity": "sha1-aCkT82aVlvt5TitKXGGZdMWrRdE=", "integrity": "sha1-jaiVKOpBMscSCPlTp+deoc1Pi98=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
"classnames": "2.x", "classnames": "2.x",
"rc-motion": "^2.0.1", "rc-motion": "^2.0.1",
"rc-overflow": "^1.0.0",
"rc-trigger": "^5.0.4", "rc-trigger": "^5.0.4",
"rc-util": "^5.0.1", "rc-util": "^5.0.1",
"rc-virtual-list": "^3.2.0", "rc-virtual-list": "^3.2.0"
"warning": "^4.0.3"
} }
}, },
"rc-slider": { "rc-slider": {
"version": "9.6.5", "version": "9.7.1",
"resolved": "https://g.civnet.cn:4873/rc-slider/-/rc-slider-9.6.5.tgz", "resolved": "https://g.civnet.cn:4873/rc-slider/-/rc-slider-9.7.1.tgz",
"integrity": "sha1-gmzXumnYfEiyWLqjQiolt/jFYgw=", "integrity": "sha1-Y1NRd6dKPuRPCQkJ6Mb5hCbrnbo=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
...@@ -24978,16 +25041,30 @@ ...@@ -24978,16 +25041,30 @@
} }
}, },
"rc-table": { "rc-table": {
"version": "7.11.3", "version": "7.12.3",
"resolved": "https://g.civnet.cn:4873/rc-table/-/rc-table-7.11.3.tgz", "resolved": "https://g.civnet.cn:4873/rc-table/-/rc-table-7.12.3.tgz",
"integrity": "sha1-o1KiImZLG3Rvhy+zXGemeTTXPqs=", "integrity": "sha1-yG6TtA3D4riq6eVK16paZP99Jh4=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
"classnames": "^2.2.5", "classnames": "^2.2.5",
"rc-resize-observer": "^0.2.0", "rc-resize-observer": "^1.0.0",
"rc-util": "^5.4.0", "rc-util": "^5.4.0",
"shallowequal": "^1.1.0" "shallowequal": "^1.1.0"
},
"dependencies": {
"rc-resize-observer": {
"version": "1.0.0",
"resolved": "https://g.civnet.cn:4873/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz",
"integrity": "sha1-l/uJhW9i/sMqtuQJM5Nc9Y4uEC0=",
"dev": true,
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1",
"rc-util": "^5.0.0",
"resize-observer-polyfill": "^1.5.1"
}
}
} }
}, },
"rc-tabs": { "rc-tabs": {
...@@ -25055,9 +25132,9 @@ ...@@ -25055,9 +25132,9 @@
} }
}, },
"rc-tree": { "rc-tree": {
"version": "4.0.0", "version": "4.1.1",
"resolved": "https://g.civnet.cn:4873/rc-tree/-/rc-tree-4.0.0.tgz", "resolved": "https://g.civnet.cn:4873/rc-tree/-/rc-tree-4.1.1.tgz",
"integrity": "sha1-L5crSl4j6hffBeyffsQ941C+o78=", "integrity": "sha1-1A9BizG3XmGIbjlpSB3xREIyyYs=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
...@@ -25068,14 +25145,14 @@ ...@@ -25068,14 +25145,14 @@
} }
}, },
"rc-tree-select": { "rc-tree-select": {
"version": "4.2.0", "version": "4.3.0",
"resolved": "https://g.civnet.cn:4873/rc-tree-select/-/rc-tree-select-4.2.0.tgz", "resolved": "https://g.civnet.cn:4873/rc-tree-select/-/rc-tree-select-4.3.0.tgz",
"integrity": "sha1-yhkWOyzP4Hcv17gUgmbd3Rl9D+E=", "integrity": "sha1-cUpP5liqc/KnsKpL1uQ75jGUps4=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/runtime": "^7.10.1", "@babel/runtime": "^7.10.1",
"classnames": "2.x", "classnames": "2.x",
"rc-select": "^11.1.1", "rc-select": "^12.0.0",
"rc-tree": "^4.0.0", "rc-tree": "^4.0.0",
"rc-util": "^5.0.5" "rc-util": "^5.0.5"
} }
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"author": "dengxiaofeng", "author": "dengxiaofeng",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"init": "npm install --registry=https://g.civnet.cn:4873",
"analyze:clean": "rimraf stats.json", "analyze:clean": "rimraf stats.json",
"preanalyze": "npm run analyze:clean", "preanalyze": "npm run analyze:clean",
"analyze": "node ./internals/scripts/analyze.js", "analyze": "node ./internals/scripts/analyze.js",
...@@ -84,8 +85,8 @@ ...@@ -84,8 +85,8 @@
"dependencies": { "dependencies": {
"@babel/polyfill": "7.4.3", "@babel/polyfill": "7.4.3",
"@babel/runtime": "^7.10.5", "@babel/runtime": "^7.10.5",
"@wisdom-utils/components": "0.0.4", "@wisdom-utils/components": "0.0.6",
"@wisdom-utils/utils": "0.0.19", "@wisdom-utils/utils": "0.0.23",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"chalk": "2.4.2", "chalk": "2.4.2",
"compression": "1.7.4", "compression": "1.7.4",
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
"ip": "1.1.5", "ip": "1.1.5",
"js-base64": "^3.5.2", "js-base64": "^3.5.2",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"kit_global_config": "^1.0.12", "kit_global_config": "^1.0.19",
"kit_logger": "^1.0.2", "kit_logger": "^1.0.2",
"kit_utils": "^1.3.6", "kit_utils": "^1.3.6",
"lodash": "4.17.11", "lodash": "4.17.11",
...@@ -149,8 +150,7 @@ ...@@ -149,8 +150,7 @@
"@umijs/fabric": "^2.2.0", "@umijs/fabric": "^2.2.0",
"@umijs/hooks": "^1.9.3", "@umijs/hooks": "^1.9.3",
"add-asset-html-webpack-plugin": "3.1.3", "add-asset-html-webpack-plugin": "3.1.3",
"antd": "^4.9.4", "antd": "^4.10.1",
"axios": "^0.19.2",
"babel-core": "7.0.0-bridge.0", "babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1", "babel-eslint": "10.0.1",
"babel-loader": "8.0.5", "babel-loader": "8.0.5",
......
import baseService from './service/base';
import notificationService from './service/notification';
export { baseService, notificationService };
...@@ -11,7 +11,8 @@ export const API = { ...@@ -11,7 +11,8 @@ export const API = {
GET_USER_INFO: '/CityInterface/rest/services.svc/getUserInfo', GET_USER_INFO: '/CityInterface/rest/services.svc/getUserInfo',
GET_OA: '/CityInterface/rest/services/OA.svc/getLoginInfo', GET_OA: '/CityInterface/rest/services/OA.svc/getLoginInfo',
GET_LOGS: '/CityInterface/rest/services/portal.svc/OMMonitor/SaveLoginInfo', GET_LOGS: '/CityInterface/rest/services/portal.svc/OMMonitor/SaveLoginInfo',
GET_CITY: 'https://pv.sohu.com/cityjson?ie=utf-8', //https://pv.sohu.com
GET_CITY: '/cityjson?ie=utf-8',
GET_ALL_GROUPS_INFO_FORUSER: GET_ALL_GROUPS_INFO_FORUSER:
'CityInterface/rest/Services/Portal.svc/AuthorityManage/GetAllGroupsInfoForUser', 'CityInterface/rest/Services/Portal.svc/AuthorityManage/GetAllGroupsInfoForUser',
GET_WEATHER: '/CityInterface/rest/services/CountyProduct.svc/GetWeather', GET_WEATHER: '/CityInterface/rest/services/CountyProduct.svc/GetWeather',
......
...@@ -94,6 +94,9 @@ const initGlobalConfig = () => { ...@@ -94,6 +94,9 @@ const initGlobalConfig = () => {
actionCreators.getConfig( actionCreators.getConfig(
Object.assign({}, data, { Object.assign({}, data, {
hasGateWay, hasGateWay,
apiGatewayDomain: `${
window.location.origin
}/Publish/GateWay`,
}), }),
), ),
); );
......
...@@ -139,16 +139,22 @@ const GlobalHeaderRight = props => { ...@@ -139,16 +139,22 @@ const GlobalHeaderRight = props => {
const goHome = event => { const goHome = event => {
event.stopPropagation(); event.stopPropagation();
const url = _.isString(props.global.homepage) const url = _.isString(props.global.get('homepage'))
? props.global.homepage ? props.global.get('homepage')
: props.global.homepage.url; : props.global.get('homepage.url');
props.global.homepage ? props.history.replace(`/civweb4/${url}`) : null; // // props.history.replace(`/civweb4/${url}`)
url ? (
window.share.event.emit('listenerMointer', {
label: '首页',
url: url,
})
) : null;
}; };
const handleOrder = event => { const handleOrder = event => {
event.stopPropagation(); event.stopPropagation();
const widgetConfig = getConfig( const widgetConfig = getConfig(
props.global.widgets.concat(props.global.uiwidgets), props.global.get('widgets').concat(props.global.get('uiwidgets')),
MESSAGE_BOX_URL, MESSAGE_BOX_URL,
'url', 'url',
); );
......
...@@ -146,18 +146,10 @@ const SearchPanel = props => { ...@@ -146,18 +146,10 @@ const SearchPanel = props => {
const handlerMore = event => { const handlerMore = event => {
event.persist && event.persist(); event.persist && event.persist();
event && event.nativeEvent.stopImmediatePropagation(); event && event.nativeEvent.stopImmediatePropagation();
setVisible(true); setVisible(!visible);
props.onClose && props.onClose(event); props.onClose && props.onClose(event);
}; };
// const historyProduct = (event, item) => {
// event.persist && event.persist()
// event && event.stopPropagation();
// const findIndex = props.menu.findIndex(k => k.name === item.name);
// props.updateCurrentIndex && props.updateCurrentIndex(findIndex);
// }
const handlerDelHistory = () => { const handlerDelHistory = () => {
props.clearRecentProduct && props.clearRecentProduct(); props.clearRecentProduct && props.clearRecentProduct();
}; };
...@@ -353,16 +345,14 @@ const SearchPanel = props => { ...@@ -353,16 +345,14 @@ const SearchPanel = props => {
</> </>
)} )}
</div> </div>
{visible ? ( <Modal
<Modal visible={visible}
visible={visible} triggerElRef={props.target}
triggerElRef={props.target} {...props}
{...props} matchValue={matchValue}
matchValue={matchValue} goFeature={goFeature}
goFeature={goFeature} goProduct={goProduct}
goProduct={goProduct} />
/>
) : null}
</div> </div>
); );
}; };
......
...@@ -22,6 +22,7 @@ import { ...@@ -22,6 +22,7 @@ import {
} from './constants'; } from './constants';
import createMessage from './message'; import createMessage from './message';
import service from '../../api/service/notification'; import service from '../../api/service/notification';
import { isJSON } from '../../utils/utils';
/* eslint-disable */ /* eslint-disable */
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const Logger = logger('mqtt'); const Logger = logger('mqtt');
...@@ -627,7 +628,7 @@ class Notifier { ...@@ -627,7 +628,7 @@ class Notifier {
: '刚刚'; : '刚刚';
const message = { const message = {
id: hisMessage.HisID, id: hisMessage.HisID,
infoContent: this._siteConfig.MessageLevel === DEFAULT_PARSE_LEVEL ? hisMessage.InfoContent: JSON.parse(hisMessage.InfoContent), infoContent: this._siteConfig.MessageLevel === DEFAULT_PARSE_LEVEL ? hisMessage.InfoContent: isJSON(hisMessage.InfoContent) ? JSON.parse(hisMessage.InfoContent): hisMessage.InfoContent,
time: `${timeMss}`, time: `${timeMss}`,
infoType: this.getMessageType(hisMessage.InfoType), infoType: this.getMessageType(hisMessage.InfoType),
dateTime: hisMessage.HisCreateTime, dateTime: hisMessage.HisCreateTime,
......
import { Tabs } from 'antd'; import React, { useState, useRef, useCallback } from 'react';
import { Sticky } from 'react-sticky'; import { useHistory, useLocation } from 'react-router-dom';
import React from 'react'; const TabPanes = props => {
const [activeKey, setActiveKey] = useState('');
const [panes, setPanes] = useState([
{
title: '首页',
key: 'home',
closable: false,
path: '/',
},
]);
const { TabPane } = Tabs; const [isReload, setIsReload] = useState(false);
const [selectedPanel, setSelectedPanel] = useState({});
const pathRef = useRef(null);
const renderTabBar = (props, DefaultTabBar) => ( const {
<Sticky bottomOffset={80}> storeData: { curTab, reloadPath },
{({ stylle }) => <DefaultTabBar {...props} style={{ ...stylle }} />} setStoreData,
</Sticky> defaultActiveKey,
); panesItem,
tabActiveKey,
} = props;
const TabRoute = () => {}; const history = useHistory();
const { pathnname, search } = useLocation();
const fullPath = pathnname + search;
const storeTabs = useCallback(
ps => {
const pathArr = ps.reduce((prev, next) => [...prev, next.path], []);
// setStoreData('SET_CURTAB', pathArr)
},
[setStoreData],
);
const resetTabs = useCallback(() => {
const initPanes = curTab.reduce((prev, next) => {});
});
};
...@@ -13,8 +13,8 @@ import Icon, { ...@@ -13,8 +13,8 @@ import Icon, {
import Draggable from './draggable'; import Draggable from './draggable';
import styles from './index.less'; import styles from './index.less';
//
const { TabPane } = Tabs; // const { TabPane } = Tabs;
const HistorySvg = () => ( const HistorySvg = () => (
<svg <svg
className="icon" className="icon"
...@@ -54,7 +54,7 @@ function itemRender(current, type, originalElement) { ...@@ -54,7 +54,7 @@ function itemRender(current, type, originalElement) {
} }
const Modal = props => { const Modal = props => {
const dragRef = useRef(null); const dragRef = useRef(null);
const [isWidgetShow, setIsWidgetShow] = useState(false); const [isWidgetShow, setIsWidgetShow] = useState(props.visible);
const [keyword, setKeyWord] = useState(props.value); const [keyword, setKeyWord] = useState(props.value);
const [searchProduct, setSearchProduct] = useState([]); const [searchProduct, setSearchProduct] = useState([]);
// const [tabIndex] // const [tabIndex]
...@@ -97,6 +97,10 @@ const Modal = props => { ...@@ -97,6 +97,10 @@ const Modal = props => {
}); });
setFasts(searchResult); setFasts(searchResult);
}, [keyword]); }, [keyword]);
useEffect(() => {
setIsWidgetShow(props.visible);
}, [props.visible]);
const transformSearchHistory = () => { const transformSearchHistory = () => {
const label = keyword !== '' ? '你是不是想搜:' : '搜索历史:'; const label = keyword !== '' ? '你是不是想搜:' : '搜索历史:';
const data = keyword !== '' ? searchProduct : recentKeywords; const data = keyword !== '' ? searchProduct : recentKeywords;
...@@ -243,60 +247,61 @@ const Modal = props => { ...@@ -243,60 +247,61 @@ const Modal = props => {
setKeyWord(value); setKeyWord(value);
}; };
const onClose = () => { const onClose = () => {
setIsWidgetShow(true); setIsWidgetShow(false);
}; };
if (isWidgetShow) { if (!isWidgetShow) {
return null; return null;
} }
const children = ( if (props.visible) {
<Draggable const children = (
dragHandleClassName={styles.header} <Draggable
default={Object.assign( dragHandleClassName={styles.header}
Object.assign({}, target), default={Object.assign(
{}, Object.assign({}, target),
{ {},
width: 420, {
height: 680, width: 420,
}, height: 680,
)} },
bounds="window" )}
minHeight={400} bounds="window"
minWidth={360} minHeight={400}
enableUserSelectHack={false} minWidth={360}
> enableUserSelectHack={false}
<div className={styles['base-wedget']} ref={dragRef}> >
<div className={styles.header}> <div className={styles['base-wedget']} ref={dragRef}>
搜索更多 <div className={styles.header}>
{/* eslint-disable-next-line react/button-has-type */} 搜索更多
<button {/* eslint-disable-next-line react/button-has-type */}
className={classNames(styles.btn, styles.close)} <button
onClick={onClose} className={classNames(styles.btn, styles.close)}
> onClick={onClose}
<CloseOutlined />
</button>
</div>
<div className={styles.body}>
<div className={styles.search}>
<AutoComplete
options={transformSearchHistory()}
dropdownClassName={styles.searchList}
value={keyword}
onSelect={onSelect}
onSearch={handleSearch}
onChange={handleChange}
onFocus={handleFocus}
> >
<Input <CloseOutlined />
size="middle" </button>
placeholder="请输入"
allowClear
suffix={<SearchOutlined className="site-form-item-icon" />}
/>
</AutoComplete>
</div> </div>
<div className={styles.result}> <div className={styles.body}>
{transformSearchFasts()} <div className={styles.search}>
{/* <Tabs defaultActiveKey="1" size="small"> <AutoComplete
options={transformSearchHistory()}
dropdownClassName={styles.searchList}
value={keyword}
onSelect={onSelect}
onSearch={handleSearch}
onChange={handleChange}
onFocus={handleFocus}
>
<Input
size="middle"
placeholder="请输入"
allowClear
suffix={<SearchOutlined className="site-form-item-icon" />}
/>
</AutoComplete>
</div>
<div className={styles.result}>
{transformSearchFasts()}
{/* <Tabs defaultActiveKey="1" size="small">
<TabPane tab="产品功能入口" key="1"> <TabPane tab="产品功能入口" key="1">
{ {
transformSeachProductList() transformSeachProductList()
...@@ -310,12 +315,13 @@ const Modal = props => { ...@@ -310,12 +315,13 @@ const Modal = props => {
</TabPane> </TabPane>
</Tabs> */} </Tabs> */}
</div>
</div> </div>
</div> </div>
</div> </Draggable>
</Draggable> );
); return ReactDOM.createPortal(children, document.body);
return ReactDOM.createPortal(children, document.body); }
}; };
export default Modal; export default Modal;
...@@ -74,10 +74,6 @@ const appReducer = (state = initialState, action) => { ...@@ -74,10 +74,6 @@ const appReducer = (state = initialState, action) => {
action.data, action.data,
{ {
allWidgets: action.data.widgets || [], allWidgets: action.data.widgets || [],
baseURL: {
dev: window.location.origin,
prod: window.location.origin,
},
env: process.env.NODE_ENV === 'development' ? 'daily' : 'prod', env: process.env.NODE_ENV === 'development' ? 'daily' : 'prod',
}, },
); );
......
...@@ -359,8 +359,8 @@ const BasicLayout = props => { ...@@ -359,8 +359,8 @@ const BasicLayout = props => {
}, [props.currentMenuIndex]); }, [props.currentMenuIndex]);
useEffect(() => { useEffect(() => {
if (_.isEmpty(props.global.token)) { if (_.isEmpty(props.global.get('token'))) {
history.replace(`/user/login?client=${props.global.client}`); history.replace(`/user/login?client=${props.global.get('client')}`);
return; return;
} }
siteAction.getCityStationsForUser().then(res => { siteAction.getCityStationsForUser().then(res => {
...@@ -370,9 +370,9 @@ const BasicLayout = props => { ...@@ -370,9 +370,9 @@ const BasicLayout = props => {
useMemo(() => { useMemo(() => {
window.share.event.on('listenerRemoveTab', () => { window.share.event.on('listenerRemoveTab', () => {
props.updateSelectedKeys(`/civweb4/?client=${props.global.client}`); props.updateSelectedKeys(`/civweb4/?client=${props.global.get('client')}`);
props.updatePathname(`/civweb4/?client=${props.global.client}`); props.updatePathname(`/civweb4/?client=${props.global.get('client')}`);
history.push(`/civweb4/?client=${props.global.client}`); history.push(`/civweb4/?client=${props.global.get('client')}`);
}); });
window.share.event.removeAllListeners('listenerRemoveSigleTab'); window.share.event.removeAllListeners('listenerRemoveSigleTab');
}, [props.pathname]); }, [props.pathname]);
...@@ -426,7 +426,7 @@ const BasicLayout = props => { ...@@ -426,7 +426,7 @@ const BasicLayout = props => {
}; };
const handleLogo = event => { const handleLogo = event => {
props.global.userInfo.site ? history.replace(`/industry`) : null; props.global.get('userInfo.site') ? history.replace(`/industry`) : null;
}; };
const transformPopupMenu = useCallback(key => { const transformPopupMenu = useCallback(key => {
...@@ -449,7 +449,7 @@ const BasicLayout = props => { ...@@ -449,7 +449,7 @@ const BasicLayout = props => {
collapsed: collapse, collapsed: collapse,
}; };
const headerContentRender = renderTitle( const headerContentRender = renderTitle(
props.global.title, props.global.get('title'),
siteAction, siteAction,
cityData, cityData,
siteLoading, siteLoading,
...@@ -506,7 +506,7 @@ const BasicLayout = props => { ...@@ -506,7 +506,7 @@ const BasicLayout = props => {
return ( return (
<ProLayout <ProLayout
logo={false} logo={false}
title={props.global && props.global.title} title={props.global && props.global.get('title')}
headerRender={false} headerRender={false}
rightContentRender={() => null} rightContentRender={() => null}
collapsedButtonRender={false} collapsedButtonRender={false}
...@@ -620,12 +620,12 @@ const BasicLayout = props => { ...@@ -620,12 +620,12 @@ const BasicLayout = props => {
<SecurityLayout loading updateCurrentIndex={props.updateCurrentIndex}> <SecurityLayout loading updateCurrentIndex={props.updateCurrentIndex}>
<ProLayout <ProLayout
logo={`http://panda-water.cn/web4/${ logo={`http://panda-water.cn/web4/${
props.global.bannerLogo props.global.get('bannerLogo')
? props.global.bannerLogo ? props.global.get('bannerLogo')
: 'assets/images/logo/单独图案-白色.svg' : 'assets/images/logo/单独图案-白色.svg'
}`} }`}
siderWidth="145px" siderWidth="145px"
title={props.global && props.global.title} title={props.global && props.global.get('title')}
onCollapse={collapse => handlerCollapsed(collapse)} onCollapse={collapse => handlerCollapsed(collapse)}
onMenuHeaderClick={event => handleLogo(event)} onMenuHeaderClick={event => handleLogo(event)}
menuExtraRender={props.menu.length > 0 ? extraRender.render : null} menuExtraRender={props.menu.length > 0 ? extraRender.render : null}
......
...@@ -353,6 +353,7 @@ class Site { ...@@ -353,6 +353,7 @@ class Site {
ignoreSite: true, ignoreSite: true,
}) })
.then(res => { .then(res => {
// eslint-disable-next-line no-debugger
const { token } = res; const { token } = res;
if (token) { if (token) {
this.beforeChangeCheck(token, site); this.beforeChangeCheck(token, site);
...@@ -364,6 +365,7 @@ class Site { ...@@ -364,6 +365,7 @@ class Site {
} }
beforeChangeCheck(token, site) { beforeChangeCheck(token, site) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
services services
.getUserInfo({ .getUserInfo({
......
...@@ -135,6 +135,7 @@ export const defaultApp = () => { ...@@ -135,6 +135,7 @@ export const defaultApp = () => {
const config = createStoreage.get('globalConfig'); const config = createStoreage.get('globalConfig');
if (config && config.token) { if (config && config.token) {
// const startWith = config.homepage ? config.homepage.split('/') : []; // const startWith = config.homepage ? config.homepage.split('/') : [];
// console.log(findPathByLeafId(config.homepage, '', 'url'))
const basePath = const basePath =
config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage) config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage)
? 'civweb4' ? 'civweb4'
......
...@@ -70,6 +70,7 @@ class Login { ...@@ -70,6 +70,7 @@ class Login {
subOID: 'subOID', subOID: 'subOID',
site: this.getLocalSiteBytoken(token), site: this.getLocalSiteBytoken(token),
'request.preventCache': Date.now(), 'request.preventCache': Date.now(),
ignoreSite: true,
}) })
.then(response => { .then(response => {
if (response && !response.errMsg) { if (response && !response.errMsg) {
...@@ -434,6 +435,7 @@ class Login { ...@@ -434,6 +435,7 @@ class Login {
referer: self.globalConfig.client, referer: self.globalConfig.client,
skipMenuTest: 1, skipMenuTest: 1,
qrcode: code, qrcode: code,
cacheBust: true,
}) })
.then(response => { .then(response => {
if (response.token) { if (response.token) {
......
...@@ -13,7 +13,7 @@ export const guid = function(prefix) { ...@@ -13,7 +13,7 @@ export const guid = function(prefix) {
) { ) {
const r = (date + Math.random() * 16) % 16 | 0; const r = (date + Math.random() * 16) % 16 | 0;
date = Math.floor(date / 16); date = Math.floor(date / 16);
return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16); return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
}); });
return prefix + uuid.replace(/-/g, '.'); return prefix + uuid.replace(/-/g, '.');
}; };
...@@ -58,11 +58,8 @@ const generRotes = (widgets, parent, level = 0) => { ...@@ -58,11 +58,8 @@ const generRotes = (widgets, parent, level = 0) => {
}, },
}); });
} else { } else {
const baseURL = FILTER_FOLER_REG.test(item.url) const baseURL = item.product || 'civweb4';
? 'civweb4' //item.product ? item.product : item.url.replace(/\s/g, '') === '' ? '' : 'civweb5';
: item.url.replace(/\s/g, '') === ''
? ''
: 'civweb5';
let url = let url =
item.hasOwnProperty('url') && !isUrl(url) && baseURL !== '' item.hasOwnProperty('url') && !isUrl(url) && baseURL !== ''
? `/${baseURL}/${item.url.replace(/\s*/g, '')}` ? `/${baseURL}/${item.url.replace(/\s*/g, '')}`
...@@ -84,6 +81,7 @@ const generRotes = (widgets, parent, level = 0) => { ...@@ -84,6 +81,7 @@ const generRotes = (widgets, parent, level = 0) => {
target: isUrl(url) ? '_blank' : '', target: isUrl(url) ? '_blank' : '',
key: guid('panda'), key: guid('panda'),
hideInMenu: l > 3, hideInMenu: l > 3,
application: item.product,
extData: { extData: {
...item, ...item,
icon: (item && item.icon.replace(/\s*/g, '')) || '_', icon: (item && item.icon.replace(/\s*/g, '')) || '_',
......
...@@ -131,3 +131,26 @@ export function isJSON(str) { ...@@ -131,3 +131,26 @@ export function isJSON(str) {
export function isString(str) { export function isString(str) {
return toString.call(str) === '[object String]'; return toString.call(str) === '[object String]';
} }
export const getKeyName = path => {
const truePath = path.split('?')[0];
const curRoute = [].filter(item => item.path.includes(truePath));
if (!curRoute[0]) {
return {
title: '暂无权限',
tabKey: '403',
};
}
const { name, key, component } = curRoute[0];
return { title: name, tabKey: key, component };
};
export const asyncAction = action => {
const wait = new Promise(resolve => resolve(action));
return callback => {
wait.then(() => setTimeout(() => callback()));
};
};
export const closeTabAction = (history, returnUrl, callback) => {};
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