Files
wvp-platform/web_src/src/components/service/MediaServer.js

33 lines
683 B
JavaScript
Raw Normal View History

2021-07-16 16:34:51 +08:00
import axios from 'axios';
class MediaServer{
constructor() {
this.$axios = axios;
}
getMediaServerList(callback){
this.$axios({
method: 'get',
url:`/api/server/media_server/list`,
}).then(function (res) {
if (typeof (callback) == "function") callback(res.data)
}).catch(function (error) {
console.log(error);
});
}
getMediaServer(id, callback){
this.$axios({
method: 'get',
url:`/api/server/media_server/one/` + id,
}).then(function (res) {
if (typeof (callback) == "function") callback(res.data)
}).catch(function (error) {
console.log(error);
});
}
}
export default MediaServer;