dialog.js 1.33 KB

var Dialog = require('../../common/dialog').Dialog;
var infoTpl = require('hbs/passport/bind-info.hbs');
var infoTpl2 = require('hbs/passport/bind-info2.hbs');

exports.showBind = function(goLoginCb, goNextCb) {
    var dia = new Dialog({
        className: 'bind-info-wrapper',
        closeIcon: true,
        content: infoTpl(),
        btns: [{
            id: 'login',
            btnClass: ['bind-btn-cancel'],
            name: '去登录',
            cb: function() {
                goLoginCb && goLoginCb();
            }
        }, {
            id: 'next',
            btnClass: ['bind-btn-ok'],
            name: '继续',
            cb: function() {
                goNextCb && goNextCb();
            }
        }]
    });

    dia.show();
};


exports.showBind2 = function(goLoginCb, goNextCb) {
    var dia2 = new Dialog({
        className: 'bind-info-wrapper',
        closeIcon: true,
        content: infoTpl2(),
        btns: [{
            id: 'login',
            btnClass: ['bind-btn-cancel'],
            name: '去登录',
            cb: function() {
                goLoginCb && goLoginCb();
            }
        }, {
            id: 'next',
            btnClass: ['bind-btn-ok'],
            name: '继续',
            cb: function() {
                goNextCb && goNextCb();
            }
        }]
    });

    dia2.show();
};