|
本帖最后由 Jax11 于 2017-5-10 16:27 编辑
- showConfirm: function (c, ob, cb, of,cf,h) {
- /*var a = c.length < 25 ? 'center':'left';*/
- if(undefined == h) h = 180;
- var dialogBox = api.require('dialogBox');
- dialogBox.confirm({
- tapClose: false,
- msg: {
- content: c,
- leftBtnTitle: cb,
- rightBtnTitle: ob
- },
- styles: {
- bg: '#fff',
- maskBg: 'rgba(0,0,0,0.5)',
- h: h,
- msg: {
- color: '#767676',
- size: 14,
- align:'center',
- maginLR: 10,
- maginT: 30
- },
- border: {
- left: '10 #fff',
- right: '10 #fff',
- top: '10 #cd1b34',
- bottom: '10 #fff'
- },
- leftBtn: {
- borderColor: '#999999',
- bg: '#e2e2e2',
- color: '#999999',
- highlightBg: '#e7e7e7',
- size: 12
- },
- rightBtn: {
- bg: '#cd1b34',
- highlightBg: '#d7495d',
- color: '#fff',
- size: 16
- }
- }
- }, function (ret) {
- if (ret && ret.eventType == "ok" && of){
- of();
- var dialogBox = api.require('dialogBox');
- dialogBox.close({
- dialogName: 'confirm'
- });
- }else{
- if(cf){
- cf();
- }else{
- var dialogBox = api.require('dialogBox');
- dialogBox.close({
- dialogName: 'confirm'
- });
- }
- }
- });
- }
复制代码 |
|