提交 f65a0019 编写于 作者: Q qiang

feat(App): uni.saveImageToPhotosAlbum 支持返回保存路径

上级 ad5fafbe
import {
getRealPath
getRealPath,
warpPlusSuccessCallback,
warpPlusErrorCallback
} from '../util'
import {
invoke
} from '../../bridge'
export function saveImageToPhotosAlbum ({
filePath
} = {}, callbackId) {
plus.gallery.save(getRealPath(filePath), e => {
invoke(callbackId, {
errMsg: 'saveImageToPhotosAlbum:ok'
})
}, e => {
invoke(callbackId, {
errMsg: 'saveImageToPhotosAlbum:fail'
})
})
const successCallback = warpPlusSuccessCallback(callbackId, 'saveImageToPhotosAlbum')
const errorCallback = warpPlusErrorCallback(callbackId, 'saveImageToPhotosAlbum')
plus.gallery.save(getRealPath(filePath), successCallback, errorCallback)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册