mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:53:25 +08:00
uniapp【修复】: 修复app中保存图片不成功
This commit is contained in:
@@ -53,9 +53,11 @@
|
|||||||
</lpainterView>
|
</lpainterView>
|
||||||
</lpainterView>
|
</lpainterView>
|
||||||
</LPainter>
|
</LPainter>
|
||||||
|
<!-- #ifdef MP -->
|
||||||
<view class="tip-box" v-if="state.imgSrc">
|
<view class="tip-box" v-if="state.imgSrc">
|
||||||
注:如果您下载失败,或者以前拒绝过弹出的授权相册提醒,请点击右上角三个点,进入【设置】页面,开启【添加到相册】功能。
|
注:如果您下载失败,或者以前拒绝过弹出的授权相册提醒,请点击右上角三个点,进入【设置】页面,开启【添加到相册】功能。
|
||||||
</view>
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
<view class="btn-box">
|
<view class="btn-box">
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<view class="back" @click="handlenNavigateBack">返回上一页</view>
|
<view class="back" @click="handlenNavigateBack">返回上一页</view>
|
||||||
@@ -328,11 +330,11 @@
|
|||||||
/** 保存到本地 */
|
/** 保存到本地 */
|
||||||
const handlesavePoster = async () => {
|
const handlesavePoster = async () => {
|
||||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||||
uni.downloadFile({
|
uni.getImageInfo({
|
||||||
url: state.imgSrc,
|
src: state.imgSrc,
|
||||||
success(res : any) {
|
success(res : any) {
|
||||||
uni.saveImageToPhotosAlbum({
|
uni.saveImageToPhotosAlbum({
|
||||||
filePath: res.tempFilePath,
|
filePath: res.path,
|
||||||
success() {
|
success() {
|
||||||
handleShowToast('保存成功', 'success');
|
handleShowToast('保存成功', 'success');
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user