first commit
This commit is contained in:
7
resources/js/service/CountryService.js
Normal file
7
resources/js/service/CountryService.js
Normal file
@ -0,0 +1,7 @@
|
||||
export class CountryService {
|
||||
getCountries() {
|
||||
return fetch('/demo/data/countries.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
}
|
18
resources/js/service/CustomerService.js
Normal file
18
resources/js/service/CustomerService.js
Normal file
@ -0,0 +1,18 @@
|
||||
export class CustomerService {
|
||||
getCustomersSmall() {
|
||||
return fetch('/demo/data/customers-small.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
getCustomersMedium() {
|
||||
return fetch('/demo/data/customers-medium.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomersLarge() {
|
||||
return fetch('/demo/data/customers-large.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
}
|
37
resources/js/service/NodeService.js
Normal file
37
resources/js/service/NodeService.js
Normal file
@ -0,0 +1,37 @@
|
||||
export class NodeService {
|
||||
getFiles() {
|
||||
return fetch('/demo/data/files.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getLazyFiles() {
|
||||
return fetch('/demo/data/files-lazy.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getFilesystem() {
|
||||
return fetch('/demo/data/filesystem.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getLazyFilesystem() {
|
||||
return fetch('/demo/data/filesystem-lazy.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getTreeTableNodes() {
|
||||
return fetch('/demo/data/treetablenodes.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.root);
|
||||
}
|
||||
|
||||
getTreeNodes() {
|
||||
return fetch('/demo/data/treenodes.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.root);
|
||||
}
|
||||
}
|
7
resources/js/service/PhotoService.js
Normal file
7
resources/js/service/PhotoService.js
Normal file
@ -0,0 +1,7 @@
|
||||
export class PhotoService {
|
||||
getImages() {
|
||||
return fetch('/demo/data/photos.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
}
|
31
resources/js/service/ProductService.js
Normal file
31
resources/js/service/ProductService.js
Normal file
@ -0,0 +1,31 @@
|
||||
export class ProductService {
|
||||
getProductsSmall() {
|
||||
return fetch('/demo/data/products-small.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProducts() {
|
||||
return fetch('/demo/data/products.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProductsMixed() {
|
||||
return fetch('/demo/data/products-mixed.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProductsWithOrdersSmall() {
|
||||
return fetch('/demo/data/products-orders-small.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProductsWithOrdersLarge() {
|
||||
return fetch('/demo/data/products-orders.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user