dialog.js 1.39 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: ['btn-cancel'],
            name: '去登录',
            cb: function() {
                console.log('login');
                goLoginCb && goLoginCb();
            }
        }, {
            id: 'next',
            btnClass: ['btn-ok'],
            name: '继续',
            cb: function() {
                console.log('next');
                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: ['btn-cancel'],
            name: '去登录',
            cb: function() {
                goLoginCb && goLoginCb();
            }
        }, {
            id: 'next',
            btnClass: ['btn-ok'],
            name: '继续',
            cb: function() {
                goNextCb && goNextCb();
            }
        }]
    });

    dia2.show();
};