This commit is contained in:
shijingjing
2023-03-08 14:23:51 +08:00
parent b29cb84966
commit c53eb44c99
2 changed files with 35 additions and 15 deletions

View File

@@ -415,7 +415,7 @@ export default {
sizeType: ['compressed'],
sourceType: ['album'],
success: (res) => {
console.log(res);
// console.log(res);
let count = this.files?.length + (res.tempFiles?.length || res.tempFile ? 1 : 0)
if (count > 9) {
return this.$u.toast(`不能超过9个`)
@@ -535,6 +535,7 @@ export default {
},
]
this.form.contents.push(...firstContent)
// 图片
const picUrl = this.files.filter(i=> ['.jpg','.jpeg','.png'].indexOf(this.getExtension(i.name)) !== -1).map(e=>{
return {
@@ -739,9 +740,15 @@ export default {
})
})
uni.$on("fodder",()=> {
this.checkedList = uni.getStorageSync('checkedList')
this.checkedList = uni.getStorageSync('checkedList').filter(i => i.type != 0)
})
this.checkedList = uni.getStorageSync('checkedList')
this.checkedList = uni.getStorageSync('checkedList')?.filter(i=> i.type != 0) || []
let arr = uni.getStorageSync('checkedList')?.filter(e => e.type == 0) || []
if (arr.length) {
let arrStr = arr.map(i => i.content)
this.content = this.content.concat(',', arrStr.toString())
uni.setStorageSync('checkedList', this.checkedList)
}
}
}
</script>