Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
e4acb092
Commit
e4acb092
authored
Dec 13, 2022
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改预览应用
parent
4377dc17
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
34 deletions
+7
-34
base-manager-ui/admin/src/pages/basicset/appmarket/AppPreview.vue
...ager-ui/admin/src/pages/basicset/appmarket/AppPreview.vue
+7
-34
No files found.
base-manager-ui/admin/src/pages/basicset/appmarket/AppPreview.vue
View file @
e4acb092
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<iframe
<iframe
name=
"myIframe"
name=
"myIframe"
style=
"width: 100%; height: 100%"
style=
"width: 100%; height: 100%"
:src=
"preview
Info.preview
Url"
:src=
"previewUrl"
frameborder=
"0"
frameborder=
"0"
></iframe>
></iframe>
</div>
</div>
...
@@ -28,47 +28,20 @@ export default {
...
@@ -28,47 +28,20 @@ export default {
data
()
{
data
()
{
return
{
return
{
previewInfo
:
this
.
$route
.
query
,
previewInfo
:
this
.
$route
.
query
,
isReady
:
false
,
previewUrl
:
""
,
};
};
},
},
created
()
{
created
()
{
// 接收子级返回首页指令
// window.onmessage = (res) => {
// if (res.data.message === "返回首页") {
// this.$router.push("/");
// }
// };
window
.
addEventListener
(
"
message
"
,
this
.
getChildrenMsg
);
},
watch
:
{
isReady
(
newVal
)
{
if
(
newVal
)
{
this
.
sendInfo
();
this
.
sendInfo
();
}
},
},
},
methods
:
{
methods
:
{
getChildrenMsg
(
res
)
{
if
(
res
.
data
.
type
===
"
childStatus
"
)
{
this
.
isReady
=
res
.
data
.
isReady
;
}
},
sendInfo
()
{
sendInfo
()
{
let
obj
=
{
let
siteId
=
this
.
previewInfo
.
siteId
;
type
:
"
siteInfo
"
,
let
appId
=
this
.
previewInfo
.
appId
;
siteId
:
this
.
previewInfo
.
siteId
,
this
.
previewUrl
=
`
${
this
.
previewInfo
.
previewUrl
}
?siteId=
${
siteId
}
&appId=
${
appId
}
`
;
appId
:
this
.
previewInfo
.
appId
,
};
/* eslint-disable */
/* eslint-disable */
myIframe
.
window
.
postMessage
(
obj
,
"
*
"
);
// myIframe.window.postMessage(obj, "*");
},
handleBack
()
{
this
.
$router
.
back
();
},
},
},
beforeDestroy
()
{
window
.
removeEventListener
(
"
message
"
,
this
.
getChildrenMsg
);
},
},
};
};
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment