wxml文件
<view>
<text class='shareText'>生成海报分享至</text>
<view class='imgBox'>
<button open-type="share" class='zfbtn'><image src="{
{wechat}}" class='img'></image></button>
<button class='zfbtn m_l' bindtap='formSubmit'><image src="{
{quan}}" class='img'></image></button>
</view>
<!--生成海报 -->
<view class='imagePathBox' hidden="{
{maskHidden == false}}">
<image src="{
{imagePath}}" class='shengcheng'></image>
<button class='baocun' bindtap='baocun'>保存相册,分享到朋友圈</button>
</view>
<view hidden="{
{maskHidden == false}}" class="mask"></view>
<view class="canvas-box">
<canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas"/>
</view>
</view>
wxss文件
/* 海报 */
.shareText{
display: block;
text-align: center;
color: #333;
font-size: 34rpx;
margin-top: 50rpx;
font-weight: 700;
}
.imgBox{
text-align: center;
width: 100%;
margin-top:35rpx;
padding-bottom: 20rpx;
}
.img{
display: inline-block;
width: 70rpx;
height: 70rpx;
}
.m_l{
margin-left: 180rpx;
}
.zfbtn{
display: inline-block ;
width: 320rpx !important;
height: 150rpx;
border-radius: 50%;
background: transparent;
outline