(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);