Looking for a service "code" that can centrally manage the interface?!

1. At first, I wrote the interface in each component.ts

.

clipboard.png

2,server.ts

clipboard.png

Feb.28,2021

tell me what I'm doing. I don't know if it meets your requirements.
I'm writing interface url into a class:

export class ServicePath {
    public static SHOPLIST = 'xxx.xxx';
}

the http request is only made in the service, which is the same as the case on the official website:

getList(data) {
    return this.http.post(ServicePath.SHOPLIST, data)
}

then introduce service request processing data into the component:

this.service.getList(data).subscribe(res => {
    console.log(res);
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e99b28-1778.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e99b28-1778.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?