pull/1664/head
Tuğçe Küçükoğlu 2021-10-11 16:48:17 +03:00
parent f0248058ef
commit 41f9df7fb3
1 changed files with 13 additions and 13 deletions

View File

@ -3,7 +3,7 @@ const services = {
export default class CountryService {
getCountries() {
return fetch('data/countries.json').then(res => res.json())
return fetch('demo/data/countries.json').then(res => res.json())
.then(d => d.data);
}
}
@ -12,28 +12,28 @@ export default class CountryService {
export default class CustomerService {
getCustomersSmall() {
return fetch('data/customers-small.json').then(res => res.json())
return fetch('demo/data/customers-small.json').then(res => res.json())
.then(d => d.data);
}
getCustomersMedium() {
return fetch('data/customers-medium.json').then(res => res.json())
return fetch('demo/data/customers-medium.json').then(res => res.json())
.then(d => d.data);
}
getCustomersLarge() {
return fetch('data/customers-large.json').then(res => res.json())
return fetch('demo/data/customers-large.json').then(res => res.json())
.then(d => d.data);
}
getCustomersXLarge() {
return fetch('data/customers-xlarge.json').then(res => res.json())
return fetch('demo/data/customers-xlarge.json').then(res => res.json())
.then(d => d.data);
}
getCustomers(params) {
const queryParams = Object.keys(params).map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k])).join('&');
return fetch('https://www.primefaces.org/data/customers?' + queryParams).then(res => res.json())
return fetch('https://www.primefaces.org/demo/data/customers?' + queryParams).then(res => res.json())
}
}
`,
@ -41,7 +41,7 @@ export default class CustomerService {
export default class EventService {
getEvents() {
return fetch('data/events.json').then(res => res.json())
return fetch('demo/data/events.json').then(res => res.json())
.then(d => d.data);
}
}
@ -50,12 +50,12 @@ export default class EventService {
export default class NodeService {
getTreeTableNodes() {
return fetch('data/treetablenodes.json').then(res => res.json())
return fetch('demo/data/treetablenodes.json').then(res => res.json())
.then(d => d.root);
}
getTreeNodes() {
return fetch('data/treenodes.json').then(res => res.json())
return fetch('demo/data/treenodes.json').then(res => res.json())
.then(d => d.root);
}
}
@ -64,7 +64,7 @@ export default class NodeService {
export default class PhotoService {
getImages() {
return fetch('data/photos.json').then(res => res.json())
return fetch('demo/data/photos.json').then(res => res.json())
.then(d => d.data);
}
}
@ -73,15 +73,15 @@ export default class PhotoService {
export default class ProductService {
getProductsSmall() {
return fetch('data/products-small.json').then(res => res.json()).then(d => d.data);
return fetch('demo/data/products-small.json').then(res => res.json()).then(d => d.data);
}
getProducts() {
return fetch('data/products.json').then(res => res.json()).then(d => d.data);
return fetch('demo/data/products.json').then(res => res.json()).then(d => d.data);
}
getProductsWithOrdersSmall() {
return fetch('data/products-orders-small.json').then(res => res.json()).then(d => d.data);
return fetch('demo/data/products-orders-small.json').then(res => res.json()).then(d => d.data);
}
}