|
var dialogBox = api.require('dialogBox');
dialogBox.scene({
rect: {
w: api.winWidth,
h: api.winHeight
},
texts: {
title: '授权请求',
content: '火车售票处前的队伍蜿蜒纵横,旁边一小伙一边张望,一边将手伸向前面买票人的口袋,啊,是小偷!',
okBtnTitle: '确定'
},
styles: {
bg: '#fff',
title: {
bg: '#aaa',
h: 44,
size: 14,
color: '#000'
},
content: {
color: '#111',
size: 12
},
cell: {
bg: '#fff',
h: 48,
text: {
color: '#636363',
size: 13
},
icon: {
marginL: 15,
marginT: 9,
w: 30,
h: 30,
corner: 2
}
},
ok: { bg: '#89a', titleColor: '#f00' }
},
tapClose:true,
optionDatas: [{
icon: 'widget://image/scene1.png',
text: '1、拿出手机偷拍'
}, {
icon: 'widget://image/scene2.png',
text: '2、见义勇为抓小偷'
}, {
text: '3、大声提醒买票的人'
}]
}, function(ret, err) {
if (ret) {
if(ret.eventType=='ok'){
dialogBox.close({
dialogName: 'alert'
});
}
api.alert({
msg: JSON.stringify(ret)
});
} else {
api.alert({
msg: JSON.stringify(err)
});
}
});
|
|