Browse Source

上传图片回显修改

wyx
fp 1 month ago
parent
commit
12f17e1666
  1. 4
      .gitignore
  2. 2
      pages/tabBar/sdPage/sfReport.vue
  3. 12
      pages/tabBar/xjPage/xj.vue

4
.gitignore

@ -1,2 +1,4 @@
/unpackage/
.history
.history
uni_modules/
node_modules/

2
pages/tabBar/sdPage/sfReport.vue

@ -136,14 +136,12 @@ export default {
padding-bottom: 40rpx;
}
.bg-box {
/* padding-top: 40rpx; */
width: 100vw;
height: 280rpx;
object-fit: cover;
display: block;
position: relative;
display: flex;
/* align-items: center; */
}
.bg-img{
position: absolute;

12
pages/tabBar/xjPage/xj.vue

@ -116,11 +116,11 @@ export default {
},
methods: {
afterRead(event) {
let files = Array.isArray(event) ? event.file : [event.file]
this.fileList = this.fileList.concat(files)
// let files = Array.isArray(event) ? event : [event]
this.fileList = this.fileList.concat(event.file)
// console.log(this.fileList);
this.fileList.forEach( item => {
this.uploadFile(item[0])
this.fileList.forEach( file => {
this.uploadFile(file)
});
},
onDelete(event) {
@ -175,10 +175,10 @@ export default {
},
success(res) {
let data = JSON.parse(res.data)
console.log(data);
// console.log(data);
if (data.url) {
that.form.imageList.push({
url:data.url,
url: data.url,
name: '',
format: file.type
})

Loading…
Cancel
Save