noticeAll

pull/2/head
Kar 2022-11-05 17:13:34 +05:30
parent 937e7958e2
commit 97ba2d9034
2 changed files with 12 additions and 3 deletions

View File

@ -47,12 +47,21 @@ export default {
.then(resp => resp.json()) .then(resp => resp.json())
.then(file => { .then(file => {
this.files = file.data this.files = file.data
// this.files = file.data
this.fileAttached=true this.fileAttached=true
// attach.data.forEach(fileID=> this.files.push(fileID.directus_files_id)) // attach.data.forEach(fileID=> this.files.push(fileID.directus_files_id))
console.log(file.data) // console.log(file.data)
// this.attachments.push(attach.data[0].directus_files_id) // this.attachments.push(attach.data[0].directus_files_id)
}) })
if(fileAttached){} let attIDs = ''
let t = 0
this.files.forEach(ids => {
if (t == 0) attIDs = ids
else attIDs = attIDs + ',' + ids
t++
console.log(attIDs)
});
if(this.fileAttached){}
// console.log(Object.assign({}, this.files)) // console.log(Object.assign({}, this.files))
// console.log(this.files) // console.log(this.files)
}) })

View File

@ -27,7 +27,7 @@
} }
}, },
mounted: function () { mounted: function () {
fetch('https://api8.siliconpin.com/items/scc22?filter[type][_eq]=notice') fetch('https://api8.siliconpin.com/items/scc22?filter[type][_eq]=notice&limit=-1')
// fetch('https://api8.siliconpin.com/items/scc22?slug=about-us') // fetch('https://api8.siliconpin.com/items/scc22?slug=about-us')
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {