Commit c82b832d authored by 李俊赕's avatar 李俊赕

资料页面t优化

parent c502a311
...@@ -111,10 +111,7 @@ ...@@ -111,10 +111,7 @@
}, },
onLoad(e) {}, onLoad(e) {},
updated() { updated() {
Object.keys(this.imgObj).map(key => { this.updateImgs()
const imgs = this.imgObj[key]
this.fileInfo[key] = imgs.length > 0 && imgs[0].key || ''
})
}, },
watch: { watch: {
"fileInfo.id_card_front"() { "fileInfo.id_card_front"() {
...@@ -145,7 +142,26 @@ ...@@ -145,7 +142,26 @@
}, },
methods: { methods: {
updateImgs(){
const uploadType = this.uploadType
const uploadImgs = this.imgObj[uploadType]
if(uploadImgs.length<1){
return
}
if(uploadType==='other_certificates'){
const otherImgs = this.imgObj['other_certificates']
let imgs = []
otherImgs.map(item=>{
const img = item.key || item.src || ''
imgs.push(img)
})
this.fileInfo[uploadType] =imgs.join(',')
return
}
this.fileInfo[uploadType] = uploadImgs[0].key || uploadImgs[0].src || ''
},
toUploadImg(item, index) { toUploadImg(item, index) {
this.uploadType = item.filedName
uni.navigateTo({ uni.navigateTo({
url: '/pages/settle/file-upload?uploadType=' + item.filedName url: '/pages/settle/file-upload?uploadType=' + item.filedName
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment