|
@@ -1,16 +1,19 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <uni-popup ref="posterPopup" background-color="transparent" type="center" :animation="true" class="class-popup-style poster-popup-root">
|
|
|
|
|
|
|
+ <uni-popup ref="posterPopup" background-color="transparent" type="top" :animation="true" class="poster-popup-root">
|
|
|
<view class="poster-popup-wrap">
|
|
<view class="poster-popup-wrap">
|
|
|
<view class="poster-popup-head">
|
|
<view class="poster-popup-head">
|
|
|
- <text class="poster-popup-title">分享海报</text>
|
|
|
|
|
|
|
+ <text class="poster-popup-title">{{ title }}</text>
|
|
|
<text class="poster-close" @click="onClose">×</text>
|
|
<text class="poster-close" @click="onClose">×</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="poster-img-wrap">
|
|
|
|
|
- <image class="poster-img" :src="posterUrl" mode="widthFix" show-menu-by-longpress />
|
|
|
|
|
- </view>
|
|
|
|
|
- <text class="poster-tip">长按图片可保存,或点击下方按钮</text>
|
|
|
|
|
- <view class="poster-save-wrap">
|
|
|
|
|
- <button class="admin-button-com big blue poster-save-btn" @click="onSave">保存到相册</button>
|
|
|
|
|
|
|
+ <view class="poster-body">
|
|
|
|
|
+ <view class="poster-img-wrap">
|
|
|
|
|
+ <image class="poster-img" :src="posterUrl" mode="widthFix" show-menu-by-longpress />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="poster-tip">长按图片可保存,或点击下方按钮</text>
|
|
|
|
|
+ <view class="poster-actions">
|
|
|
|
|
+ <button class="admin-button-com big default poster-action-btn" @click="onClose">取消</button>
|
|
|
|
|
+ <button class="admin-button-com big blue poster-action-btn" @click="onSave">保存到相册</button>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
@@ -23,6 +26,10 @@ export default {
|
|
|
posterUrl: {
|
|
posterUrl: {
|
|
|
type: String,
|
|
type: String,
|
|
|
default: ''
|
|
default: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ title: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: '分享海报'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -44,18 +51,29 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
|
+.poster-popup-root {
|
|
|
|
|
+ z-index: 999999;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+::v-deep .uni-popup.top .uni-popup__wrapper {
|
|
|
|
|
+ width: 100% !important;
|
|
|
|
|
+ display: flex !important;
|
|
|
|
|
+ justify-content: center !important;
|
|
|
|
|
+ align-items: flex-start !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.poster-popup-wrap {
|
|
.poster-popup-wrap {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- width: 86vw;
|
|
|
|
|
- max-width: 640upx;
|
|
|
|
|
- padding: 28upx 28upx 36upx;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ padding: 28upx 0 36upx;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ align-items: stretch;
|
|
|
max-height: 92vh;
|
|
max-height: 92vh;
|
|
|
overflow: auto;
|
|
overflow: auto;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
- border-radius: 24upx;
|
|
|
|
|
|
|
+ border-radius: 0 0 24upx 24upx;
|
|
|
box-shadow: 0 16upx 48upx rgba(0, 0, 0, 0.18);
|
|
box-shadow: 0 16upx 48upx rgba(0, 0, 0, 0.18);
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.poster-popup-head {
|
|
.poster-popup-head {
|
|
@@ -63,7 +81,9 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
|
|
+ padding: 0 28upx;
|
|
|
margin-bottom: 8upx;
|
|
margin-bottom: 8upx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.poster-popup-title {
|
|
.poster-popup-title {
|
|
@@ -79,15 +99,25 @@ export default {
|
|
|
padding: 0 8upx;
|
|
padding: 0 8upx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.poster-body {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.poster-img-wrap {
|
|
.poster-img-wrap {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- text-align: center;
|
|
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
margin-top: 16upx;
|
|
margin-top: 16upx;
|
|
|
|
|
+ padding: 0 28upx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.poster-img {
|
|
.poster-img {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- margin: 0 auto;
|
|
|
|
|
|
|
+ max-width: 640upx;
|
|
|
border-radius: 12upx;
|
|
border-radius: 12upx;
|
|
|
box-shadow: 0 8upx 24upx rgba(0, 0, 0, 0.12);
|
|
box-shadow: 0 8upx 24upx rgba(0, 0, 0, 0.12);
|
|
|
}
|
|
}
|
|
@@ -96,15 +126,24 @@ export default {
|
|
|
margin-top: 20upx;
|
|
margin-top: 20upx;
|
|
|
font-size: 24upx;
|
|
font-size: 24upx;
|
|
|
color: #999;
|
|
color: #999;
|
|
|
|
|
+ text-align: center;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.poster-save-wrap {
|
|
|
|
|
|
|
+.poster-actions {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
margin-top: 28upx;
|
|
margin-top: 28upx;
|
|
|
- text-align: center;
|
|
|
|
|
|
|
+ padding: 0 28upx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.poster-action-btn {
|
|
|
|
|
+ flex: 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.poster-save-btn {
|
|
|
|
|
- width: 320upx;
|
|
|
|
|
|
|
+.poster-action-btn + .poster-action-btn {
|
|
|
|
|
+ margin-left: 24upx;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|