|
@@ -2,6 +2,7 @@
|
|
|
import {reactive, ref} from 'vue'
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
import apiReport from '@/api/report'
|
|
|
+import {apiGetWXQRCodeImg} from '@/api/common'
|
|
|
import moment from 'moment';
|
|
|
import { showToast,showDialog } from 'vant';
|
|
|
import { useWindowSize } from '@vueuse/core'
|
|
@@ -210,6 +211,23 @@ function handlePublishCancel(){
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+// 显示海报
|
|
|
+const showChapterItemPoster=ref(false)
|
|
|
+const chapterItemPosterInfo=ref(null)
|
|
|
+async function handleShowPoster(item){
|
|
|
+ if(!item.QRCodeImg){//获取二维码
|
|
|
+ const res=await apiGetWXQRCodeImg({
|
|
|
+ CodeScene:JSON.stringify({chapterId:item.ReportChapterId.toString()}),
|
|
|
+ CodePage:'pages-report/chapterDetail'
|
|
|
+ })
|
|
|
+ if(res.Ret===200){
|
|
|
+ item.QRCodeImg=res.Data
|
|
|
+ }
|
|
|
+ }
|
|
|
+ chapterItemPosterInfo.value=item
|
|
|
+ showChapterItemPoster.value=true
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -271,7 +289,7 @@ function handlePublishCancel(){
|
|
|
|
|
|
<div :class="['status',item.PublishState!=1&&'status-success']">{{item.PublishState==1?'未发布':'已发布'}}</div>
|
|
|
<img @click.stop="handleShowTrendTag(item)" class="icon icon-tag" src="@/assets/imgs/report/icon_tag.png" alt="">
|
|
|
- <img v-if="item.PublishState==2" @click.stop="handleShowTrendTag(item)" class="icon icon-wx" src="@/assets/imgs/report/icon_wx.png" alt="">
|
|
|
+ <img v-if="item.PublishState==2" @click.stop="handleShowPoster(item)" class="icon icon-wx" src="@/assets/imgs/report/icon_wx.png" alt="">
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -309,6 +327,19 @@ function handlePublishCancel(){
|
|
|
@cancel="showDate=false"
|
|
|
/>
|
|
|
</van-popup>
|
|
|
+
|
|
|
+ <!-- 海报 -->
|
|
|
+ <van-popup
|
|
|
+ v-model:show="showChapterItemPoster"
|
|
|
+ round
|
|
|
+ >
|
|
|
+ <div class="chapter-poster-box" v-screenshot="{target: '.chapter-poster-box', filename: 'my-screenshot.png'}">
|
|
|
+ <img class="bg" :src="chapterItemPosterInfo.TypeEditImg" alt="">
|
|
|
+ <h2 class="title">【第{{reportInfo.Stage}}期|{{reportInfo.ClassifyNameFirst}}|{{chapterItemPosterInfo.TypeName}}】{{chapterItemPosterInfo.Title}}</h2>
|
|
|
+ <img class="code-img" :src="chapterItemPosterInfo.QRCodeImg" alt="">
|
|
|
+ <p class="tips">长按保存图片,发送给好友</p>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -448,6 +479,30 @@ function handlePublishCancel(){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.chapter-poster-box{
|
|
|
+ width: 300PX;
|
|
|
+ border-radius: 6PX;
|
|
|
+ padding: 10PX;
|
|
|
+ .bg{
|
|
|
+ width: 280PX;
|
|
|
+ height: 280PX;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .title{
|
|
|
+ font-size: 16PX;
|
|
|
+ }
|
|
|
+ .code-img{
|
|
|
+ width: 140PX;
|
|
|
+ height: 140PX;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .tips{
|
|
|
+ color: $font-grey;
|
|
|
+ font-size: 14PX;
|
|
|
+ margin-top: 5PX;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
@media screen and (min-width:$media-width){
|
|
|
.top-form-wrap{
|
|
|
padding: 16px 30px;
|