|
|
@@ -185,7 +185,11 @@
|
|
|
</view>
|
|
|
<view class="fixed-bottom">
|
|
|
<u-button type="primary" :loading="loading" style="background-color:#0052FF;"
|
|
|
- @tap="sendPayCode">发送微信</u-button>
|
|
|
+ @tap="saveImageToPhotos">保存为图片</u-button>
|
|
|
+ <!-- <u-button type="primary" :loading="loading" style="background-color:#0052FF;"
|
|
|
+ @tap="sendPayCode">发送微信</u-button> -->
|
|
|
+ <u-button type="primary" :loading="loading" style="background-color:#0052FF;"
|
|
|
+ @tap="sendPayCode">分享到微信</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -331,6 +335,26 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 保存图片到相册
|
|
|
+ saveImageToPhotos() {
|
|
|
+ uni.saveImageToPhotosAlbum({
|
|
|
+ filePath: this.payImg,
|
|
|
+ success: function () {
|
|
|
+ console.log('图片保存成功');
|
|
|
+ uni.showToast({
|
|
|
+ title:'成功'
|
|
|
+ })
|
|
|
+ // 成功处理逻辑
|
|
|
+ },
|
|
|
+ fail: function (err) {
|
|
|
+ console.log('图片保存失败', err);
|
|
|
+ uni.showToast({
|
|
|
+ title:'失败'
|
|
|
+ })
|
|
|
+ // 失败处理逻辑
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//页面截图转路径
|
|
|
receiveRenderData(val) {
|
|
|
this.posterUrl = val.replace(/[\r\n]/g, ''); // 去除base64位中的空格
|
|
|
@@ -419,6 +443,9 @@
|
|
|
padding: 16px;
|
|
|
box-shadow: 0px -4px 10px 0px #DAE3F4;
|
|
|
border-radius: 0px 0px 0px 0px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
.content {
|
|
|
@@ -658,4 +685,4 @@
|
|
|
pointer-events: none;
|
|
|
z-index: 9999;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|