Commit eed7bcc6 by 王志慧

fixed

1 parent 0cc139c9
...@@ -78,31 +78,33 @@ ...@@ -78,31 +78,33 @@
</glsx-dialog> </glsx-dialog>
<!-- 分享 --> <!-- 分享 -->
<GLDialog :mode="mode" title="分享" :visible.sync="shareVisible" :hasFooter="false"> <GLDialog :mode="mode" title="分享" :visible.sync="shareVisible" :hasFooter="false">
<div class="preview-wrap"> <div v-loading="loading">
<div class="share-content"> <div class="preview-wrap">
<div> <div class="share-content">
<div class="share-title">海报</div> <div>
<el-button type="primary" @click="handleSaveImg(shareData.posterUrl)">保存图片</el-button> <div class="share-title">海报</div>
<el-button type="primary" @click="handleSaveImg(shareData.posterUrl)">保存图片</el-button>
</div>
<div class="poster">
<img :src="shareData.posterUrl" />
</div>
</div> </div>
<div class="poster"> <div class="share-content">
<img :src="shareData.posterUrl" /> <div>
<div class="share-title">小程序码</div>
<el-button type="primary" @click="handleSaveImg(shareData.miniProgramCodeUrl, '小程序码')">保存图片</el-button>
</div>
<div class="qr-code">
<img :src="shareData.miniProgramCodeUrl" />
</div>
</div> </div>
</div> </div>
<div class="share-content"> <div class="share-footer">
<div> <div class="share-title">小程序页面路径</div>
<div class="share-title">小程序码</div> <div class="share-path">{{ shareData.linkUrl }}</div>
<el-button type="primary" @click="handleSaveImg(shareData.miniProgramCodeUrl, '小程序码')">保存图片</el-button> <el-button class="share-btn" type="primary" @click="handleSaveTxt(shareData.linkUrl)">复制链接</el-button>
</div>
<div class="qr-code">
<img :src="shareData.miniProgramCodeUrl" />
</div>
</div> </div>
</div> </div>
<div class="share-footer">
<div class="share-title">小程序页面路径</div>
<div class="share-path">{{ shareData.linkUrl }}</div>
<el-button class="share-btn" type="primary" @click="handleSaveTxt(shareData.linkUrl)">复制链接</el-button>
</div>
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -125,6 +127,7 @@ export default { ...@@ -125,6 +127,7 @@ export default {
}, },
data() { data() {
return { return {
loading: false,
shareVisible: false, //分享 shareVisible: false, //分享
showViewer: false, showViewer: false,
showGh: false, showGh: false,
...@@ -473,8 +476,11 @@ export default { ...@@ -473,8 +476,11 @@ export default {
}, },
//分享 //分享
handleShare(val) { handleShare(val) {
this.loading = true
this.shareData ={}
getMealShare({ id: val.id }).then(res => { getMealShare({ id: val.id }).then(res => {
this.shareData = res.data this.shareData = res.data
this.loading = false
}) })
this.shareVisible = true this.shareVisible = true
}, },
...@@ -712,34 +718,33 @@ export default { ...@@ -712,34 +718,33 @@ export default {
} }
} }
} }
} }
.share-footer { .share-footer {
width: 680px; width: 680px;
height: 90px; height: 90px;
background: #f8f8f8; background: #f8f8f8;
border-radius: 2px; border-radius: 2px;
margin-top: 10px; margin-top: 10px;
padding: 10px 20px; padding: 10px 20px;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.share-path { .share-path {
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;
max-width:400px; max-width: 400px;
white-space: wrap; white-space: wrap;
} }
.share-title { .share-title {
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
margin-bottom: 10px; margin-bottom: 10px;
}
.share-btn {
position: absolute;
right: 40px;
bottom: 29px;
}
} }
.share-btn {
position: absolute;
right: 40px;
bottom: 29px;
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!