小程序
小游戏
企业微信
微信支付
扫描小程序码分享
wx.previewImage 图片不显示。开发工具显示、1加手机 显示 、苹果手机显示 荣耀 6X EMUI 8.0.0 版本系统 图片不显示 显示为加载中
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
正式环境我的也没出来
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
/**
* 图片预览
*/
imgYu: function(event) {
var src = event.currentTarget.dataset.src; //获取data-src
var arrayList = new Array();
arrayList.push(src);
for (var i in this.data.shopImage) {
if (src != this.data.imageUrl + this.data.shopImage[i]) {
arrayList.push(this.data.imageUrl + this.data.shopImage[i]);
}
//图片预览
wx.previewImage({
urls: arrayList, // 当前显示图片的http链接
success:function(res){
console.log(res);
},
fali: function (res) {
})
["https://qysw.yibiyihua.top/memberPro/shopImage/201…HehhrKPBM2gnc5ac4b479473db028bc57b8fe53ca5c8.jpeg", "https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//111.jpeg", "https://qysw.yibiyihua.top/memberPro/shopImage/201….VtRTPSMv3y0faee711a3c5cd099fb64dd287a30f5f14.jpg", "https://qysw.yibiyihua.top/memberPro/shopImage/201….VcXo8MVQNjAw83e5711aece9662a859ba1595b851985.png", "https://qysw.yibiyihua.top/memberPro/shopImage/201….R44mJSswJe6sf6ba2c8b942718f385973be0affe37e5.png"]
“https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000/wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.HehhrKPBM2gnc5ac4b479473db028bc57b8fe53ca5c8.jpeg"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//111.jpeg"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.VtRTPSMv3y0faee711a3c5cd099fb64dd287a30f5f14.jpg"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000/wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.VcXo8MVQNjAw83e5711aece9662a859ba1595b851985.png"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.R44mJSswJe6sf6ba2c8b942718f385973be0affe37e5.png
贴代码~~
贴了
你预览里面的current呢
不填不是 默认第一张吗? 关键是 用了苹果手机 和 1加 手机测试都正常。。。就荣耀 6X 没出来
是呀,但是不加你点击其他图片不是显示第一张吗??
看看你arrayList数据格式
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
正式环境我的也没出来
/**
* 图片预览
*/
imgYu: function(event) {
var src = event.currentTarget.dataset.src; //获取data-src
var arrayList = new Array();
arrayList.push(src);
for (var i in this.data.shopImage) {
if (src != this.data.imageUrl + this.data.shopImage[i]) {
arrayList.push(this.data.imageUrl + this.data.shopImage[i]);
}
}
//图片预览
wx.previewImage({
urls: arrayList, // 当前显示图片的http链接
success:function(res){
console.log(res);
},
fali: function (res) {
console.log(res);
}
})
}
["https://qysw.yibiyihua.top/memberPro/shopImage/201…HehhrKPBM2gnc5ac4b479473db028bc57b8fe53ca5c8.jpeg", "https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//111.jpeg", "https://qysw.yibiyihua.top/memberPro/shopImage/201….VtRTPSMv3y0faee711a3c5cd099fb64dd287a30f5f14.jpg", "https://qysw.yibiyihua.top/memberPro/shopImage/201….VcXo8MVQNjAw83e5711aece9662a859ba1595b851985.png", "https://qysw.yibiyihua.top/memberPro/shopImage/201….R44mJSswJe6sf6ba2c8b942718f385973be0affe37e5.png"]
“https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000/wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.HehhrKPBM2gnc5ac4b479473db028bc57b8fe53ca5c8.jpeg"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//111.jpeg"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.VtRTPSMv3y0faee711a3c5cd099fb64dd287a30f5f14.jpg"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000/wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.VcXo8MVQNjAw83e5711aece9662a859ba1595b851985.png"
"https://qysw.yibiyihua.top/memberPro/shopImage/2018/11/18/402881e666a5e6ad0166a5e6cf060000//wx8f838588cee49b7c.o6zAJs_a5zIgatcsHl9blcTjObww.R44mJSswJe6sf6ba2c8b942718f385973be0affe37e5.png
贴代码~~
贴了
你预览里面的current呢
不填不是 默认第一张吗? 关键是 用了苹果手机 和 1加 手机测试都正常。。。就荣耀 6X 没出来
是呀,但是不加你点击其他图片不是显示第一张吗??
看看你arrayList数据格式