Commit e16cd595 by crushh

update: dist

parent da7472b9
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>qiankun</title><script src="//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/axios/0.18.0/index.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/element-ui/2.15.6/index.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script><script src="//web-1251519181.file.myqcloud.com/components/limit.1.0.65.js"></script><script src="//web-1251519181.file.myqcloud.com/components/layout.1.0.58.js"></script><script src="//web-1251519181.file.myqcloud.com/components/sub-title.1.0.8.js"></script><link rel="stylesheet" href="//web-1251519181.file.myqcloud.com/lib/element-ui/2.15.6/index-dm-blue.css"><link href="css/app.bec5e02f.css" rel="preload" as="style"><link href="js/app.2da5e625.js" rel="preload" as="script"><link href="js/chunk-vendors.c0dfc3b3.js" rel="preload" as="script"><link href="css/app.bec5e02f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but qiankun doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.c0dfc3b3.js"></script><script src="js/app.2da5e625.js"></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>qiankun</title><script src="//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/axios/0.18.0/index.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/element-ui/2.15.6/index.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script><script src="//web-1251519181.file.myqcloud.com/components/limit.1.0.65.js"></script><script src="//web-1251519181.file.myqcloud.com/components/layout.1.0.58.js"></script><link rel="stylesheet" href="//web-1251519181.file.myqcloud.com/lib/element-ui/2.15.6/index-dm-blue.css"><link href="css/app.bec5e02f.css" rel="preload" as="style"><link href="js/app.965a8c7d.js" rel="preload" as="script"><link href="js/chunk-vendors.c0dfc3b3.js" rel="preload" as="script"><link href="css/app.bec5e02f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but qiankun doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.c0dfc3b3.js"></script><script src="js/app.965a8c7d.js"></script></body></html>
\ No newline at end of file
(function(e){function t(t){for(var o,c,i=t[0],u=t[1],l=t[2],p=0,f=[];p<i.length;p++)c=i[p],Object.prototype.hasOwnProperty.call(r,c)&&r[c]&&f.push(r[c][0]),r[c]=0;for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(e[o]=u[o]);s&&s(t);while(f.length)f.shift()();return a.push.apply(a,l||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],o=!0,i=1;i<n.length;i++){var u=n[i];0!==r[u]&&(o=!1)}o&&(a.splice(t--,1),e=c(c.s=n[0]))}return e}var o={},r={app:0},a=[];function c(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.m=e,c.c=o,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)c.d(n,o,function(t){return e[t]}.bind(null,o));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var s=u;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"034f":function(e,t,n){"use strict";n("85ec")},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var o=n("8bbf"),r=n.n(o),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("dm-layout",{attrs:{projectName:e.projectName,basePath:e.basePath,isQiankun:!0}},[n("div",{attrs:{id:"container"}})])],1)},c=[],i=(n("ac1f"),n("1276"),n("7db0"),n("d3b7"),n("b0c0"),n("caad"),n("2532"),[{name:"marketing",entry:"//gicdev.demogic.com/marketing/#/",container:"#container",activeRule:"/marketing/"},{name:"report",entry:"//gicdev.demogic.com/report/#/",container:"#container",activeRule:"/report/"}]),u=i,l={name:"App",provide:function(){return{reload:this.reload}},data:function(){return{current:"",microApps:u}},created:function(){console.log(window),console.log(window.location.href.split("#"))},computed:{projectName:function(){return this.$store.state.projectName},basePath:function(){var e=this.$store.state.projectName;return console.log(e),console.log(u.find((function(t){return t.name==e}))),u.find((function(t){return t.name==e})).activeRule}},methods:{goto:function(e){e.activeRule.includes("marketing")?history.pushState(null,e.activeRule,"http://localhost:8080/marketing/#/marketing-app-list"):e.activeRule.includes("report")?history.pushState(null,e.activeRule,"http://localhost:8080/report/#/memberSummary"):e.activeRule.includes("member")&&history.pushState(null,e.activeRule,"http://localhost:8080/member/#/allCustomers"),this.current=e.name}}},s=l,p=(n("034f"),n("2877")),f=Object(p["a"])(s,a,c,!1,null,null,null),m=f.exports,d=n("6389"),b=n.n(d),h=n("cebe"),g=n.n(h),v=n("5880"),y=n.n(v);r.a.use(y.a);var j=new y.a.Store({state:{projectName:"report"},mutations:{changeMicoApplication:function(e,t){console.log(t);var n=t.name;e.projectName=n}}}),w=j,O=n("34ac9"),x=n("548a"),k=n("07ec");console.log(w),Object(O["b"])(u,{beforeLoad:function(e){console.log("before load app.name====>>>>>",e.name),w.commit("changeMicoApplication",e)},beforeMount:[function(e){console.log("[LifeCycle] before mount %c%s","color: green;",e.name)}],afterMount:[function(e){console.log("[LifeCycle] after mount %c%s","color: green;",e.name)}],afterUnmount:[function(e){console.log("[LifeCycle] after unmount %c%s","color: green;",e.name)}]}),Object(x["a"])((function(e){return console.log(e)})),Object(k["a"])("/report/"),Object(O["c"])();n("d671");r.a.prototype.axios=g.a,r.a.prototype.axios.defaults.withCredentials=!0,r.a.use(b.a),r.a.config.productionTip=!1;var P="/",R=[],S=new b.a({base:P,routes:R});new r.a({router:S,store:w,render:function(e){return e(m)}}).$mount("#app")},5880:function(e,t){e.exports=Vuex},6389:function(e,t){e.exports=VueRouter},"85ec":function(e,t,n){},"8bbf":function(e,t){e.exports=Vue},cebe:function(e,t){e.exports=axios},d671:function(e,t,n){}});
//# sourceMappingURL=app.2da5e625.js.map
\ No newline at end of file
(function(e){function t(t){for(var o,c,i=t[0],u=t[1],l=t[2],p=0,f=[];p<i.length;p++)c=i[p],Object.prototype.hasOwnProperty.call(r,c)&&r[c]&&f.push(r[c][0]),r[c]=0;for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(e[o]=u[o]);s&&s(t);while(f.length)f.shift()();return a.push.apply(a,l||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],o=!0,i=1;i<n.length;i++){var u=n[i];0!==r[u]&&(o=!1)}o&&(a.splice(t--,1),e=c(c.s=n[0]))}return e}var o={},r={app:0},a=[];function c(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.m=e,c.c=o,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)c.d(n,o,function(t){return e[t]}.bind(null,o));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var s=u;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"034f":function(e,t,n){"use strict";n("85ec")},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var o=n("8bbf"),r=n.n(o),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("dm-layout",{ref:"layout",attrs:{projectName:e.projectName,basePath:e.basePath,isQiankun:!0}},[n("div",{attrs:{id:"container"}})])],1)},c=[],i=(n("7db0"),n("d3b7"),n("b0c0"),n("caad"),n("2532"),[{name:"marketing",entry:"//gicdev.demogic.com/marketing/#/",container:"#container",activeRule:"/marketing/"},{name:"report",entry:"//gicdev.demogic.com/report/#/",container:"#container",activeRule:"/report/"}]),u=i,l={name:"App",provide:function(){return{reload:this.reload}},data:function(){return{current:"",microApps:u,pageUrl:this.$store.state.projectUrl}},computed:{projectName:function(){return this.$store.state.projectName},basePath:function(){var e=this.$store.state.projectName;return u.find((function(t){return t.name==e})).activeRule},pageUrls:function(){return this.$store.state.projectUrl}},watch:{pageUrls:function(e){this.$refs.layout.getActiveData(e)}},methods:{goto:function(e){e.activeRule.includes("marketing")?history.pushState(null,e.activeRule,"http://localhost:8080/marketing/#/marketing-app-list"):e.activeRule.includes("report")?history.pushState(null,e.activeRule,"http://localhost:8080/report/#/memberSummary"):e.activeRule.includes("member")&&history.pushState(null,e.activeRule,"http://localhost:8080/member/#/allCustomers"),this.current=e.name}}},s=l,p=(n("034f"),n("2877")),f=Object(p["a"])(s,a,c,!1,null,null,null),m=f.exports,d=n("6389"),h=n.n(d),b=n("cebe"),g=n.n(b),v=n("5880"),y=n.n(v);r.a.use(y.a);var j=new y.a.Store({state:{projectName:"report",projectUrl:"/memberSummary"},mutations:{changeMicoApplication:function(e,t){console.log(t);var n=t.name;e.projectName=n},changePageUrl:function(e,t){console.log(t),e.projectUrl=t}}}),w=j,O=(n("ac1f"),n("1276"),n("34ac9")),x=n("548a"),P=n("07ec");console.log(w),Object(O["b"])(u,{beforeLoad:function(e){console.log("[LifeCycle] before Load %c%s","color: green;",e.name),w.commit("changeMicoApplication",e)},beforeMount:[function(e){console.log("[LifeCycle] before mount %c%s","color: green;",e.name);var t=window.location.href.split("#")[1].split("/")[1];w.commit("changePageUrl",t)}],afterMount:[function(e){console.log("[LifeCycle] after mount %c%s","color: green;",e.name)}],afterUnmount:[function(e){console.log("[LifeCycle] after unmount %c%s","color: green;",e.name)}]}),Object(x["a"])((function(e){return console.log(e)})),Object(P["a"])("/report/"),Object(O["c"])();n("d671");r.a.prototype.axios=g.a,r.a.prototype.axios.defaults.withCredentials=!0,r.a.use(h.a),r.a.config.productionTip=!1;var S="/",k=[],R=new h.a({base:S,routes:k});new r.a({router:R,store:w,render:function(e){return e(m)}}).$mount("#app")},5880:function(e,t){e.exports=Vuex},6389:function(e,t){e.exports=VueRouter},"85ec":function(e,t,n){},"8bbf":function(e,t){e.exports=Vue},cebe:function(e,t){e.exports=axios},d671:function(e,t,n){}});
//# sourceMappingURL=app.965a8c7d.js.map
\ No newline at end of file
......@@ -13,8 +13,12 @@
<script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/limit.1.0.65.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/layout.1.0.58.js"></script>
<script src= "//web-1251519181.file.myqcloud.com/components/sub-title.1.0.8.js"></script>
<link rel="stylesheet" href="//web-1251519181.file.myqcloud.com/lib/element-ui/2.15.6/index-dm-blue.css">
<!-- <script>
let sc = document.createElement('script');
sc.setAttribute('src', '//localhost:8090/static/import-component-append.js');
document.head.appendChild(sc);
</script> -->
</head>
<body>
<noscript>
......
<template>
<div>
<dm-layout :projectName="projectName" :basePath="basePath" :isQiankun="true">
<dm-layout :projectName="projectName" :basePath="basePath" :isQiankun="true" ref="layout">
<div id="container"></div>
</dm-layout>
</div>
......@@ -19,22 +19,24 @@ export default {
return {
current:'',
microApps,
pageUrl:this.$store.state.projectUrl
};
},
created(){
console.log(window)
console.log( window.location.href.split('#'))
},
computed:{
projectName(){
return this.$store.state.projectName
},
basePath(){
let appName = this.$store.state.projectName
console.log(appName)
console.log(microApps.find(item=>item.name==appName))
return microApps.find(item=>item.name==appName).activeRule
},
pageUrls(){
return this.$store.state.projectUrl
}
},
watch:{
pageUrls(val){
this.$refs.layout.getActiveData(val)
}
},
methods: {
......
......@@ -5,12 +5,14 @@ import { registerMicroApps, start, addGlobalUncaughtErrorHandler,setDefaultMount
console.log(store)
registerMicroApps(microApps, {
beforeLoad: app => {
console.log('before load app.name====>>>>>', app.name);
store.commit('changeMicoApplication',app)
console.log('[LifeCycle] before Load %c%s', 'color: green;', app.name);
store.commit('changeMicoApplication',app);
},
beforeMount: [
app => {
console.log('[LifeCycle] before mount %c%s', 'color: green;', app.name);
let url = window.location.href.split('#')[1].split('/')[1]
store.commit('changePageUrl',url);
},
],
afterMount: [
......
......@@ -6,12 +6,17 @@ Vue.use(Vuex)
const store = new Vuex.Store({
state: {
projectName: 'report',
projectUrl:'/memberSummary'
},
mutations: {
changeMicoApplication (state,obj) {
console.log(obj)
console.log(obj)
const {name } = obj;
state.projectName = name;
},
changePageUrl(state,url){
console.log(url)
state.projectUrl = url;
}
}
})
......
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