var b = new plus.nativeObj.Bitmap('bitblmap');
b.loadBase64Data(that.sImg, function() {
var fileName = '_doc/' + randomString(10) + '.jpg';
b.save(fileName, {
overwrite: true
}, function(object) {
plus.gallery.save(fileName, function(obj) {
** vue.shareImgSrc = obj.file || obj.path;**
// mui.toast('已保存到手机相册中');
vue.showTips = false;
mui('#sheet1').popover('toggle');
shareImage()
}, function() {
mui.toast('save fail');
vue.showTips = false;
mui('#sheet1').popover('toggle');
});
}, function() {
mui.toast('fail');
vue.showTips = false;
mui('#sheet1').popover('toggle');
});
}, function() {
mui.toast('图片创建失败');
vue.showTips = false;
mui('#sheet1').popover('toggle');
});
主要是IOS保存图片后返回的字段为path,安卓下为file.设置正确后,微信好友和朋友圈均可以分享
0 个评论
要回复文章请先登录或注册