- 最近脑子不好使,还是记录一下吧,
- 代码背景,拼接图片路径展示
<view class="image-content" v-for="(item,index) in station_image" >
<image :src="item"></image>
</view>
export default {
data() {
return {
station_image: []
}
},
onLoad(option) {
this.oddimage()
},
methods: {
oddimage() {
this.$http.get('/woshi/jiekou', {
station_id: this.station_id
}).then(res => {
if (res.data.result === 1) {
let imgpat = res.data.data
imgpat = Array.from(imgpat)
this.station_image = imgpat.map(item => {
return this.$url + item.picture_src
})
}
})
}
}
}