yuminge-app/yun-min-program-plugin-master/packageA/mycomponent/goodsComponent/plugin/goodSwipe/goodSwipe.js

42 lines
854 B
JavaScript

// packageA/mycomponent/goodsComponent/plugin/goodSwipe/goodSwipe.js
Component({
/**
* 组件的属性列表
*/
properties: {
goodsInfo: {
type: null
},
broadcast_data: {
type: null
},
is_goodsType: {
type: null
}
},
observers: {
// "broadcast_data,is_goodsType": function (_data,type) {
// console.log(_data,type, "broad11111111111");
// },
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
previewImg(e){
let ind;
ind = e.currentTarget.dataset.key;
wx.previewImage({
current: ind?this.data.goodsInfo.thumb_url[ind]:this.data.goodsInfo.thumb_url, // 当前显示图片的http链接
urls: this.data.goodsInfo.thumb_url // 需要预览的图片http链接列表
});
}
}
});