You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
591 B
29 lines
591 B
(function($, window) {
|
|
/**
|
|
* 警告消息框
|
|
*/
|
|
$.alert = function(message, title, btnValue, callback) {
|
|
if ($.os.plus) {
|
|
if (typeof message === 'undefined') {
|
|
return;
|
|
} else {
|
|
if (typeof title === 'function') {
|
|
callback = title;
|
|
title = null;
|
|
btnValue = '确定';
|
|
} else if (typeof btnValue === 'function') {
|
|
callback = btnValue;
|
|
btnValue = null;
|
|
}
|
|
$.plusReady(function() {
|
|
plus.nativeUI.alert(message, callback, title, btnValue);
|
|
});
|
|
}
|
|
|
|
} else {
|
|
//TODO H5版本
|
|
window.alert(message);
|
|
}
|
|
};
|
|
|
|
})(mui, window); |