dialog.js
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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();
};