feat: remodel product page
This commit is contained in:
parent
a62315641a
commit
c1513c9e78
|
@ -1,15 +1,14 @@
|
||||||
import {action, makeAutoObservable, observable} from "mobx";
|
import {makeAutoObservable} from "mobx";
|
||||||
import {http} from "../utils/http";
|
import {http} from "../utils/http";
|
||||||
|
|
||||||
export class User {
|
export class User {
|
||||||
@observable data = [];
|
data = [];
|
||||||
|
|
||||||
constructor(ctx) {
|
constructor(ctx) {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
makeAutoObservable(this);
|
makeAutoObservable(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
|
||||||
async getData() {
|
async getData() {
|
||||||
try {
|
try {
|
||||||
this.data = (await http.get('/user')).body.data;
|
this.data = (await http.get('/user')).body.data;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user