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
eb104b74
Commit
eb104b74
authored
Dec 12, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
9fad306d
4377dc17
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
32 deletions
+85
-32
base-manager-ui/admin/src/pages/basicset/appmarket/AppPreview.vue
...ager-ui/admin/src/pages/basicset/appmarket/AppPreview.vue
+72
-31
base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue
...rc/pages/basicset/appmarket/components/AppDetailsPage.vue
+13
-1
No files found.
base-manager-ui/admin/src/pages/basicset/appmarket/AppPreview.vue
View file @
eb104b74
<
template
>
<
template
>
<!-- 应用预览页面 -->
<!-- 应用预览页面 -->
<div
class=
"app-preview
flex flexc jcc aic
"
>
<div
class=
"app-preview"
>
<div
class=
"header"
>
<
!--
<
div
class=
"header"
>
<span
class=
"btn"
@
click=
"handleBack"
>
<span
class=
"btn"
@
click=
"handleBack"
>
<a-icon
type=
"left"
class=
"mr10"
/>
<a-icon
type=
"left"
class=
"mr10"
/>
<span>
返回上一级
</span>
<span>
返回上一级
</span>
</span>
</span>
</div>
</div>
-->
<div
class=
"main flex1"
>
<
!--
<
div
class=
"main flex1"
>
<iframe
<iframe
style=
"width: 100%; height: 100%"
style=
"width: 100%; height: 100%"
:src=
"previewUrl"
:src=
"previewUrl"
frameborder=
"0"
frameborder=
"0"
></iframe>
></iframe>
</div>
</div>
-->
<iframe
name=
"myIframe"
style=
"width: 100%; height: 100%"
:src=
"previewInfo.previewUrl"
frameborder=
"0"
></iframe>
</div>
</div>
</
template
>
</
template
>
...
@@ -21,45 +27,80 @@
...
@@ -21,45 +27,80 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
previewUrl
:
this
.
$route
.
query
.
previewUrl
,
previewInfo
:
this
.
$route
.
query
,
isReady
:
false
,
};
};
},
},
created
()
{
// 接收子级返回首页指令
// window.onmessage = (res) => {
// if (res.data.message === "返回首页") {
// this.$router.push("/");
// }
// };
window
.
addEventListener
(
"
message
"
,
this
.
getChildrenMsg
);
},
watch
:
{
isReady
(
newVal
)
{
if
(
newVal
)
{
this
.
sendInfo
();
}
},
},
methods
:
{
methods
:
{
getChildrenMsg
(
res
)
{
if
(
res
.
data
.
type
===
"
childStatus
"
)
{
this
.
isReady
=
res
.
data
.
isReady
;
}
},
sendInfo
()
{
let
obj
=
{
type
:
"
siteInfo
"
,
siteId
:
this
.
previewInfo
.
siteId
,
appId
:
this
.
previewInfo
.
appId
,
};
/* eslint-disable */
myIframe
.
window
.
postMessage
(
obj
,
"
*
"
);
},
handleBack
()
{
handleBack
()
{
this
.
$router
.
back
();
this
.
$router
.
back
();
},
},
},
},
beforeDestroy
()
{
window
.
removeEventListener
(
"
message
"
,
this
.
getChildrenMsg
);
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.app-preview {
.app-preview {
width: 1
00%
;
width: 1
920px
;
height: 1080px;
height: 1080px;
padding-bottom: 20px;
//
padding-bottom: 20px;
background-color: #f5f5f5;
background-color: #f5f5f5;
.header {
//
.header {
width: 100%;
//
width: 100%;
height: 100px;
//
height: 100px;
line-height: 100px;
//
line-height: 100px;
height: 100px;
//
height: 100px;
padding: 0px 40px;
//
padding: 0px 40px;
margin-bottom: 10px;
//
margin-bottom: 10px;
background: url("../../../assets/img/title.jpg") no-repeat center;
//
background: url("../../../assets/img/title.jpg") no-repeat center;
background-size: 100% 100%;
//
background-size: 100% 100%;
box-shadow: 0px 2px 6px 6px #ccc;
//
box-shadow: 0px 2px 6px 6px #ccc;
.back-text {
//
.back-text {
font-size: 28px;
//
font-size: 28px;
color: #ffffff;
//
color: #ffffff;
}
//
}
.btn {
//
.btn {
font-size: 28px;
//
font-size: 28px;
color: #fff;
//
color: #fff;
cursor: pointer;
//
cursor: pointer;
}
//
}
}
//
}
.main {
//
.main {
width: 98%;
//
width: 98%;
}
//
}
}
}
</
style
>
</
style
>
\ No newline at end of file
base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue
View file @
eb104b74
...
@@ -225,12 +225,24 @@ export default {
...
@@ -225,12 +225,24 @@ export default {
let
res
=
await
previewVersion
({
appVersionId
});
let
res
=
await
previewVersion
({
appVersionId
});
let
{
code
,
data
}
=
res
.
data
;
let
{
code
,
data
}
=
res
.
data
;
if
(
code
===
1
)
{
if
(
code
===
1
)
{
this
.
$router
.
push
({
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
"
/apppreview
"
,
path
:
"
/apppreview
"
,
query
:
{
query
:
{
previewUrl
:
data
,
previewUrl
:
data
,
siteId
:
this
.
appInfo
.
siteId
,
appId
:
this
.
appId
,
},
},
});
});
window
.
open
(
routeUrl
.
href
,
"
_blank
"
);
// this.$router.push({
// path: "/apppreview",
// query: {
// previewUrl: data,
// siteId: this.appInfo.siteId,
// appId: this.appId,
// },
// });
// window.open(data);
// window.open(data);
}
}
},
},
...
...
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