prevention/components/ImageInfo/index.js

48 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-10-31 15:25:19 +08:00
// components/ImageInfo/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
}
},
observers: {
data(value) {
if(Object.keys(this.properties.data).length) {
this.setData({dataSource: this.properties.data})
2022-10-31 17:52:23 +08:00
let list = this.properties.data.registerFlowmanVoList || []
let arr = []
if(list.length > 0) {
list.forEach(item=> {
if(item.healthUrl) {
arr.push(item.healthUrl)
}
if(item.passingUrl) {
arr.push(item.passingUrl)
}
})
}
this.setData({imageList: arr})
2022-10-31 15:25:19 +08:00
}
}
},
/**
* 组件的初始数据
*/
data: {
dataSource: {},
imageList: []
},
/**
* 组件的方法列表
*/
methods: {
}
})