// ∏import { DataManager, NetManager } from "duiba-tw";
import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import Waiting from "../../waiting/Waiting";

export default
    () => new Promise((resolve) => {
        const _callback = (data) => {
            Waiting.instance.hide();
            resolve(data);
        }
        Waiting.instance.show();
        if (DataManager.ins.getRuleData) {
            _callback(true);
        } else {
            NetManager.ins.getRule(_callback);
        }
    })

