Commit 1939973a authored by 邓晓峰's avatar 邓晓峰

feat: 添加AMap到沙盒中, 防止变量污染

parent 59c3897d
Pipeline #38304 passed with stages
in 12 minutes 18 seconds
......@@ -17,9 +17,9 @@ export default {
// },
{
name: 'civ_water',
entry: `//${window.location.hostname}:8082/civ_water`,
entry: `//${window.location.hostname}:8081/civ_water`,
container: '#micro-container',
activeRule: '/civbase/civ_webgis',
activeRule: '/civbase/civ_water',
},
// {
// name: 'civ_webgis',
......
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const proxyURL = 'http://192.168.12.136:8989'
const proxyURL = 'http://61.150.107.92:8200'
//'http://192.168.12.47:8081';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
......
......@@ -95,7 +95,6 @@ export const initMicroApps = (loader, store) => {
},
);
const globalStore = store.getState().toJS();
console.log("globalStore", globalStore)
const { setGlobalState } = initGlobalState({
// eslint-disable-next-line no-undef
globalConfig: createStoreage.get('globalConfig'),
......@@ -110,7 +109,7 @@ export const initMicroApps = (loader, store) => {
experimentalStyleIsolation: false,
loose: true,
},
singular: true,
singular: false,
scopedCSS: true,
prefetch: 'all',
// eslint-disable-next-line no-underscore-dangle
......@@ -119,6 +118,10 @@ export const initMicroApps = (loader, store) => {
url.indexOf('framework/highcharts') !== -1 ||
// url.indexOf('framework/amap/AMap.UI') !== -1 ||
// url.indexOf('framework/amap/init.js') !== -1 ||
url.indexOf('jquery') !== -1 ||
url.indexOf('managers/MapManager.js') !== -1 ||
url.indexOf('jquery.mCustomScrollbar.js') !== -1 ||
url.indexOf('QIAN_KUN_Platform.js') !== -1 ||
url.indexOf('configuration/js') !== -1 ||
url.indexOf('framework/three.js') !== -1 ||
url.indexOf('threedimensional/frameworkthree') !== -1 ||
......@@ -131,9 +134,9 @@ export const initMicroApps = (loader, store) => {
url.indexOf('echarts') !== -1 ||
url.indexOf('lbs.amap.com') !== -1 ||
url.indexOf('restapi.amap.com') !== -1 ||
url.indexOf('webapi.amap.com') !== -1 ||
url.indexOf('webapi.amap.com/count') !== -1 ||
url.indexOf('https://webapi.amap.com/maps') !== -1 ||
// url.indexOf('webapi.amap.com') !== -1 ||
// url.indexOf('webapi.amap.com/count') !== -1 ||
// url.indexOf('webapi.amap.com/maps') !== -1 ||
url.indexOf('restapi.amap.com/v3') !== -1 ||
url.indexOf('api.map.baidu.com') !== -1 ||
url.indexOf('map.baidu.com') !== -1 ||
......@@ -196,7 +199,8 @@ export const defaultApp = () => {
if(config && config.home) {
setDefaultMountApp(`/civbase/${config.home.path.replace(/^\//, '')}`);
} else {
setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}/${config.homepage}`)
setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}/${config.homepage}`);
createStoreage.set('init_web4', true)
}
}
......
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