//第一种 可以写this方法 {this.state.user_album.map((val,key) => ( <img src={val} style={{ width: '100%', verticalAlign: 'top' }}onLoad={this.getPicHeight(0,"hd_id",val)}/> ))} //第二种 可以写判断 {this.state.couponList.map((v,k) => { return k < 5? <li><img src={v.avatar?(v.avatar.indexOf("http")==0?v.avatar:systemApi.getValue('imageUrl') + v.avatar+"?x-oss-process=image/resize,m_lfit,h_180,w_180,image/circle,r_50/format,png"):"images/activity_pic.jpg"} /></li>:"" })} {this.state.couponList.map((v,k) => { if(k<5){ return <li onClick={this.getItem}><img src={v.avatar?(v.avatar.indexOf("http")==0?v.avatar:systemApi.getValue('imageUrl') + v.avatar+"?x-oss-process=image/resize,m_lfit,h_180,w_180,image/circle,r_50/format,png"):"images/activity_pic.jpg"} /></li> } })}
关注"都市百货" 了解南陵
微信咨询wanglf2r(不拉群 发广告者勿加)
热门评论