diff --git a/docker-compose.yml b/docker-compose.yml
index 69ee9365a..bb8179551 100755
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -96,7 +96,7 @@ services:
appstore:
container_name: "dootask-appstore-${APP_ID}"
privileged: true
- image: "dootask/appstore:0.1.0"
+ image: "dootask/appstore:0.1.1"
volumes:
- shared_data:/usr/share/dootask
- /var/run/docker.sock:/var/run/docker.sock
diff --git a/resources/assets/js/components/MicroApps/iframe.vue b/resources/assets/js/components/MicroApps/iframe.vue
new file mode 100644
index 000000000..c9a8ae75d
--- /dev/null
+++ b/resources/assets/js/components/MicroApps/iframe.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/assets/js/components/MicroApps/index.vue b/resources/assets/js/components/MicroApps/index.vue
index adea4f688..4958c20a8 100644
--- a/resources/assets/js/components/MicroApps/index.vue
+++ b/resources/assets/js/components/MicroApps/index.vue
@@ -9,17 +9,20 @@
:transparent="app.transparent"
:autoDarkTheme="app.auto_dark_theme"
:beforeClose="async () => { await onBeforeClose(app.name) }">
+
@@ -86,11 +89,12 @@ import emitter from "../../store/events";
import TransferDom from "../../directives/transfer-dom";
import store from "../../store";
import MicroModal from "./modal.vue";
+import MicroIFrame from "./iframe.vue";
export default {
name: "MicroApps",
directives: {TransferDom},
- components: {MicroModal, UserSelect},
+ components: {MicroModal, UserSelect, MicroIFrame},
props: {
windowType: {
@@ -149,26 +153,14 @@ export default {
},
methods: {
- // 元素被创建
- created() {
- },
-
- // 即将渲染
- beforemount() {
- },
-
// 已经渲染完成
mounted(e) {
- this.finish(e)
- },
-
- // 已经卸载
- unmount() {
+ this.finish(e.detail.name)
},
// 加载出错
error(e) {
- this.finish(e)
+ this.finish(e.detail.name)
$A.modalError({
language: false,
title: this.$L('应用加载失败'),
@@ -180,8 +172,8 @@ export default {
},
// 加载结束
- finish(e) {
- const app = this.apps.find(({name}) => name == e.detail.name);
+ finish(name) {
+ const app = this.apps.find(app => app.name == name);
if (app) {
app.isLoading = false
}
diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js
index eb7ce11b9..224cdc968 100644
--- a/resources/assets/js/store/actions.js
+++ b/resources/assets/js/store/actions.js
@@ -4675,11 +4675,15 @@ export default {
if (!data.id || !data.name || !data.url) {
return
}
- data.url = data.url.replace(/\{window[._]location[._](\w+)}/ig, (match, property) => {
- if (property in window.location) {
- return window.location[property];
- }
- })
+ data.url = data.url
+ .replace(/^\:(\d+)/ig, (_, port) => {
+ return window.location.protocol + '//' + window.location.hostname + ':' + port;
+ })
+ .replace(/\{window[._]location[._](\w+)}/ig, (_, property) => {
+ if (property in window.location) {
+ return window.location[property];
+ }
+ })
const config = {
id: data.id,
name: data.name,