赞
踩
((index) => {
wx.getImageInfo({
src: res.data.records[index].activityImg,
}).then((res1) => {
const { width, height } = res1;
console.log(width);
console.log(height);
let newWidth = ''
let newHeight = ''
newHeight = '200'
newWidth = (200 / height) * width
that.$set(res.data.records[index], 'imgWidth', newWidth + 'px');
that.$set(res.data.records[index], 'imgHeight', newHeight + 'px');
console.log('this.imgWrapWidth---',that.imgWrapWidth);
}).catch((err) => {
console.error(err);
});
})(i);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。