precell-dia.js 794 Bytes
import $ from 'yoho-jquery';
import Page from 'yoho-page';
import dialog from 'plugin/dialog';

class PrecellDia extends Page {
    constructor() {
        super();
        this.selector = {
            $precellDia: $('.precell-dia')
        };
        this.init();
    }

    init() {
        this.bindEvents();
    }

    bindEvents() {
        $(document).on('click', '.precell-dia', this.precellDia.bind(this));
    }

    precellDia() {
        dialog.showDialog({
            dialogText: '由于商品上市期不同,先到的将先发货。预售商品不参加活动,不可使用优惠券。',
            fast: true,
            hasFooter: {
                centerBtnText: '我知道了'
            }
        });
        return false;
    }
}

$(() => {
    new PrecellDia();
});