uniapp【修复】: 修复app中保存图片不成功

This commit is contained in:
15093570141
2024-11-11 16:51:16 +08:00
parent 6113df717d
commit 8852b73576

View File

@@ -53,9 +53,11 @@
</lpainterView>
</lpainterView>
</LPainter>
<!-- #ifdef MP -->
<view class="tip-box" v-if="state.imgSrc">
如果您下载失败或者以前拒绝过弹出的授权相册提醒请点击右上角三个点进入设置页面开启添加到相册功能
</view>
<!-- #endif -->
<view class="btn-box">
<view class="btn">
<view class="back" @click="handlenNavigateBack">返回上一页</view>
@@ -328,11 +330,11 @@
/** 保存到本地 */
const handlesavePoster = async () => {
// #ifdef APP-PLUS || APP-PLUS-NVUE
uni.downloadFile({
url: state.imgSrc,
uni.getImageInfo({
src: state.imgSrc,
success(res : any) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
filePath: res.path,
success() {
handleShowToast('保存成功', 'success');
},