QRCodeViewPresenter.ts 853 Bytes
import { Presenter } from "../../../common/classbase/PresenterBase";
import CustomerServiceDataCenter from "../../../customerService/script/CustomerServiceDataCenter";
import { RegPresenter } from "../PresenterCCViewFactory";
import { QRCodeViewType, QRCodeView, QRCodeViewProps } from "../view/type/QRCodeView";

@RegPresenter(QRCodeViewType)
export default class QRCodeViewPresenter extends Presenter<undefined, QRCodeView>{
    static uuid = "QRCodeViewPresenter";

    private _viewProps: QRCodeViewProps;

    constructor() {
        super();
        this._viewProps = {
            tipLabel: CustomerServiceDataCenter.getInstance().getTipLabel(),
            qrCodePath: CustomerServiceDataCenter.getInstance().getQRCodePath(),
        };
    }

    onOpen() {
        super.onOpen(undefined);
        this.view.setProps(this._viewProps);
    }
}