404Notice
This commit is contained in:
@@ -57,25 +57,14 @@ export default {
|
||||
this.file = this.page.attachments
|
||||
// console.log(this.file)
|
||||
this.isLoading = false
|
||||
});
|
||||
fetch('https://api8.siliconpin.com/items/scc22?filter[slug][_eq]=' + path[2])
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return response.json();
|
||||
}
|
||||
// throw new Error('Something went wrong');
|
||||
})
|
||||
.then(jsonPageData => {
|
||||
this.page = jsonPageData.data
|
||||
console.log(this.page)
|
||||
this.isLoading = false
|
||||
return jsonPageData.data[0].id
|
||||
}
|
||||
)
|
||||
return this.page.id
|
||||
})
|
||||
.then((pageID) => {
|
||||
console.log(pageID)
|
||||
fetch('https://api8.siliconpin.com/items/scc22_files_1?filter[scc22_id][_in]=' + pageID)
|
||||
.then(resp => resp.json())
|
||||
.then(file => {
|
||||
console.log(file)
|
||||
let attIDs = ''
|
||||
let t = 0
|
||||
file.data.forEach(ids => {
|
||||
@@ -84,6 +73,7 @@ export default {
|
||||
t++
|
||||
});
|
||||
if(t>0) this.fileAttached=true
|
||||
|
||||
return attIDs
|
||||
})
|
||||
.then((attIDs) => {
|
||||
@@ -91,6 +81,7 @@ export default {
|
||||
.then(resp => resp.json())
|
||||
.then(file => {
|
||||
this.files = file.data
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user