起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2477|回复: 4

[处理中4] 分享本地图片?

[复制链接]

10

主题

24

帖子

58

积分

初级会员

Rank: 2

积分
58
QQ
发表于 2016-12-6 18:01:48 | 显示全部楼层 |阅读模式
var sharePicture0 = Model.prototype.getImageUrl('./img/sharePic0.png');
var sharePicture1 = Model.prototype.getImageUrl('./img/sharePic1.png');
var sharePicture2 = Model.prototype.getImageUrl('./img/sharePic2.png');
        plugins.socialsharing.shareVia("com.tencent.mm/com.tencent.mm.ui.tools.ShareToTimeLineUI", content, null, [sharePicture0,sharePicture1,sharePicture2], null);提示获取图片失败

1

主题

6163

帖子

2095

积分

金牌会员

Rank: 6Rank: 6

积分
2095
QQ
发表于 2016-12-6 18:14:23 | 显示全部楼层
var sharePicture0 = Model.prototype.getImageUrl('./img/sharePic0.png');
var sharePicture1 = Model.prototype.getImageUrl('./img/sharePic1.png');
var sharePicture2 = Model.prototype.getImageUrl('./img/sharePic2.png');
这三个  你确定都能获取到是吗?
回复 支持 反对

使用道具 举报

10

主题

24

帖子

58

积分

初级会员

Rank: 2

积分
58
QQ
 楼主| 发表于 2016-12-7 14:51:47 | 显示全部楼层
半导体 发表于 2016-12-6 18:14
var sharePicture0 = Model.prototype.getImageUrl('./img/sharePic0.png');
var sharePicture1 = Model.pr ...

可以
回复 支持 反对

使用道具 举报

发表于 2016-12-7 15:52:05 | 显示全部楼层
 真机调试看看
sharePicture0  sharePicture1  sharePicture2的值是多少?

如果getImageUrl 是 Model.prototype.getImageUrl 这样定义的!
调用的是时候请使用this.getImageUrl('相对路径')
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

10

主题

24

帖子

58

积分

初级会员

Rank: 2

积分
58
QQ
 楼主| 发表于 2016-12-7 15:58:32 | 显示全部楼层
liangyongfei 发表于 2016-12-7 15:52
 真机调试看看
sharePicture0  sharePicture1  sharePicture2的值是多少?

/x5/UI2/v_70997b98b131458088f3bfb4b7500608l_zh_CNs_d_m/Read/img/sharePic2.png  
这是图片路径,,,,分享还是获取不到这张图,改成this.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2025-7-21 14:55 , Processed in 0.073501 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表