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