import { makeAutoObservable, } from 'mobx';
import API from "@/api";

class ResStore {

    constructor() {
        makeAutoObservable(this);
    }


    info = {
      titleImg: "",
      interval: "",
      amount: 0,
      profit: 0,
      cycle: "",
      remainDrawTime: 0,
      prizeInfo: [],
    };

    async updateInfo() {
        const { success, data } = await API.drawIndex();
        if (!success) return;
        this.info = data;
    }

}

export default (new ResStore());
