mirror of https://github.com/openspug/spug
U web update
parent
a206ee05d7
commit
e7d911393a
|
@ -1,17 +0,0 @@
|
||||||
import {observable} from "mobx";
|
|
||||||
import http from '../../libs/http';
|
|
||||||
|
|
||||||
class Store {
|
|
||||||
@observable info = {};
|
|
||||||
@observable isFetching = false;
|
|
||||||
|
|
||||||
fetchInfo =() => {
|
|
||||||
this.isFetching = true;
|
|
||||||
http.get('/api/home/')
|
|
||||||
.then(res => this.info = res)
|
|
||||||
.finally(() => this.isFetching = false)
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default new Store()
|
|
Loading…
Reference in New Issue