Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/www.85520057.com/func.php:230) in /www/wwwroot/www.85520057.com/js.php on line 27
/*! * jquery-confirm v2.5.1 (http://craftpip.github.io/jquery-confirm/) * Author: Boniface Pereira * Website: www.craftpip.com * Contact: hey@craftpip.com * * Copyright 2013-2015 jquery-confirm * Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE) */ if (typeof jQuery === 'undefined') { throw new Error('jquery-confirm requires jQuery'); } let j_confirm, J_confirm,myAlert,myConfirm,mySelect,myInput; (function ($) { "use strict"; $.fn.confirm = function (options, option2) { if (typeof options === 'undefined') options = {}; if (typeof options === 'string') options = {content: options, title: (option2) ? option2 : false}; $(this).each(function () { var $this = $(this); $this.on('click', function (e) { e.preventDefault(); var jcOption = $.extend({}, options); if ($this.attr('data-title')) jcOption['title'] = $this.attr('data-title'); if ($this.attr('data-content')) jcOption['content'] = $this.attr('data-content'); jcOption['$target'] = $this; if ($this.attr('href') && !options['confirm']) jcOption['confirm'] = function () { location.href = $this.attr('href'); }; $.confirm(jcOption); }); }); return $(this); }; $.confirm = function (options, option2) { if (typeof options === 'undefined') options = {}; if (typeof options === 'string') options = {content: options, title: (option2) ? option2 : false}; return j_confirm(options); }; $.alert = function (options, option2) { if (typeof options === 'undefined') options = {}; if (typeof options === 'string') options = {content: options, title: (option2) ? option2 : false}; options.cancelButton = false; return j_confirm(options); }; $.dialog = function (options, option2) { if (typeof options === 'undefined') options = {}; if (typeof options === 'string') options = {content: options, title: (option2) ? option2 : false}; options.cancelButton = false; options.confirmButton = false; options.confirmKeys = [13]; return j_confirm(options); }; j_confirm = function (options) { if (typeof options === 'undefined') options = {}; if (j_confirm.defaults) { $.extend(j_confirm.pluginDefaults, j_confirm.defaults); } var options = $.extend({}, j_confirm.pluginDefaults, options); return new J_confirm(options); }; J_confirm = function (options) { $.extend(this, options); this._init(); }; J_confirm.prototype = { _init: function () { var that = this; this._rand = Math.round(Math.random() * 99999); this._buildHTML(); this._bindEvents(); setTimeout(function () { that.open(); that._watchContent(); }, 0); }, _buildHTML: function () { var that = this; this.animation = 'anim-' + this.animation.toLowerCase(); this.closeAnimation = 'anim-' + this.closeAnimation.toLowerCase(); this.theme = 'jconfirm-' + this.theme.toLowerCase(); if (this.animation === 'anim-none') this.animationSpeed = 0; this._lastFocused = $('body').find(':focus'); this.$el = $(this.template).appendTo(this.container).addClass(this.theme); this.$el.find('.jconfirm-box-container').addClass(this.columnClass); this.$el.find('.jconfirm-bg').css(this._getCSS(this.animationSpeed, 1)); this.$el.find('.jconfirm-bg').css('opacity', this.opacity); this.$b = this.$el.find('.jconfirm-box').css(this._getCSS(this.animationSpeed, this.animationBounce)).addClass(this.animation); this.$body = this.$b; if (this.rtl) this.$el.addClass("rtl"); this._contentReady = $.Deferred(); this._modalReady = $.Deferred(); this.$title = this.$el.find('.title'); this.contentDiv = this.$el.find('div.content'); this.$content = this.contentDiv; this.$contentPane = this.$el.find('.content-pane'); this.$icon = this.$el.find('.icon-c'); this.$closeIcon = this.$el.find('.closeIcon'); this.$contentPane.css(this._getCSS(this.animationSpeed, 1)); this.setTitle(); this.setIcon(); this._setButtons(); if (this.closeIconClass) this.$closeIcon.html(''); that._contentHash = this._hash(that.$content.html()); $.when(this._contentReady, this._modalReady).then(function () { that.setContent(); that.setTitle(); that.setIcon(); }); this._getContent(); this._imagesLoaded(); if (this.autoClose) this._startCountDown(); }, _unwatchContent: function () { clearInterval(this._timer); }, _hash: function () { return btoa((encodeURIComponent(this.$content.html()))); }, _watchContent: function () { var that = this; this._timer = setInterval(function () { var now = that._hash(that.$content.html()); if (that._contentHash != now) { that._contentHash = now; that.setDialogCenter(); that._imagesLoaded(); } }, this.watchInterval); }, _bindEvents: function () { var that = this; var boxClicked = false; this.$el.find('.jconfirm-scrollpane').click(function (e) { if (!boxClicked) { if (that.backgroundDismiss) { that.cancel(); that.close(); } else { that.$b.addClass('hilight'); setTimeout(function () { that.$b.removeClass('hilight'); }, 800); } } boxClicked = false; }); this.$el.find('.jconfirm-box').click(function (e) { boxClicked = true; }); if (this.$confirmButton) { this.$confirmButton.click(function (e) { e.preventDefault(); var r = that.confirm(that.$b); that._stopCountDown(); that.onAction('confirm'); if (typeof r === 'undefined' || r) that.close(); }); } if (this.$cancelButton) { this.$cancelButton.click(function (e) { e.preventDefault(); var r = that.cancel(that.$b); that._stopCountDown(); that.onAction('cancel'); if (typeof r === 'undefined' || r) that.close(); }); } if (this.$closeButton) { this.$closeButton.click(function (e) { e.preventDefault(); that._stopCountDown(); that.cancel(); that.onAction('close'); that.close(); }); } if (this.keyboardEnabled) { setTimeout(function () { $(window).on('keyup.' + this._rand, function (e) { that.reactOnKey(e); }); }, 500); } $(window).on('resize.' + this._rand, function () { that.setDialogCenter(true); }); }, _getCSS: function (speed, bounce) { return { '-webkit-transition-duration': speed / 1000 + 's', 'transition-duration': speed / 1000 + 's', '-webkit-transition-timing-function': 'cubic-bezier(.36,1.1,.2, ' + bounce + ')', 'transition-timing-function': 'cubic-bezier(.36,1.1,.2, ' + bounce + ')' }; }, _imagesLoaded: function () { var that = this; $.each(this.$content.find('img:not(.loaded)'), function (i, a) { var interval = setInterval(function () { var h = $(a).css('height'); if (h !== '0px') { $(a).addClass('loaded'); that.setDialogCenter(); clearInterval(interval); } }, 40); }) }, _setButtons: function () { this.$btnc = this.$el.find('.buttons'); if (this.confirmButton && $.trim(this.confirmButton) !== '') { this.$confirmButton = $('').appendTo(this.$btnc).addClass(this.confirmButtonClass); } if (this.cancelButton && $.trim(this.cancelButton) !== '') { this.$cancelButton = $('').appendTo(this.$btnc).addClass(this.cancelButtonClass); } if (!this.confirmButton && !this.cancelButton) { this.$btnc.hide(); } if (!this.confirmButton && !this.cancelButton && this.closeIcon === null) { this.$closeButton = this.$b.find('.closeIcon').show(); } if (this.closeIcon === true) { this.$closeButton = this.$b.find('.closeIcon').show(); } }, setTitle: function (string) { this.title = (typeof string !== 'undefined') ? string : this.title; this.$title.html(this.title || ''); }, setIcon: function (iconClass) { this.title = (typeof string !== 'undefined') ? iconClass : this.title; this.$icon.html(this.icon ? '' : ''); }, setContent: function (string) { var that = this; this.content = (typeof string == 'undefined') ? this.content : string; if (this.content == '') { this.$content.html(this.content); this.$contentPane.hide(); } else { this.$content.html(this.content); this.$contentPane.show(); } if (this.$content.hasClass('loading')) { this.$content.removeClass('loading'); this.$btnc.find('button').prop('disabled', false); } }, _getContent: function (string) { var that = this; string = (string) ? string : this.content; this._isAjax = false; if (!this.content) { this.content = ''; this.setContent(this.content); this._contentReady.reject(); } else if (typeof this.content === 'string') { if (this.content.substr(0, 4).toLowerCase() === 'url:') { this._isAjax = true; this.$content.addClass('loading'); this.$btnc.find('button').prop('disabled', true); var url = this.content.substring(4, this.content.length); $.get(url).done(function (html) { that.content = html; that._contentReady.resolve(); }).always(function (data, status, xhr) { if (typeof that.contentLoaded === 'function') that.contentLoaded(data, status, xhr); }); } else { this.setContent(this.content); this._contentReady.reject(); } } else if (typeof this.content === 'function') { this.$content.addClass('loading'); this.$btnc.find('button').attr('disabled', 'disabled'); var promise = this.content(this); if (typeof promise !== 'object') { console.error('The content function must return jquery promise.'); } else if (typeof promise.always !== 'function') { console.error('The object returned is not a jquery promise.'); } else { this._isAjax = true; promise.always(function (data, status) { that._contentReady.resolve(); }); } } else { console.error('Invalid option for property content, passed: ' + typeof this.content); } this.setDialogCenter(); }, _stopCountDown: function () { clearInterval(this.timerInterval); if (this.$cd) this.$cd.remove(); }, _startCountDown: function () { var opt = this.autoClose.split('|'); if (/cancel/.test(opt[0]) && this.type === 'alert') { return false; } else if (/confirm|cancel/.test(opt[0])) { this.$cd = $('').appendTo(this['$' + opt[0] + 'Button']); var that = this; that.$cd.parent().click(); var time = opt[1] / 1000; this.timerInterval = setInterval(function () { that.$cd.html(' (' + (time -= 1) + ')'); if (time === 0) { that.$cd.html(''); that.$cd.parent().trigger('click'); clearInterval(that.timerInterval); } }, 1000); } else { console.error('Invalid option ' + opt[0] + ', must be confirm/cancel'); } }, reactOnKey: function key(e) { var a = $('.jconfirm'); if (a.eq(a.length - 1)[0] !== this.$el[0]) return false; var key = e.which; if (this.contentDiv.find(':input').is(':focus') && /13|32/.test(key)) return false; if ($.inArray(key, this.cancelKeys) !== -1) { if (this.$cancelButton) { this.$cancelButton.click(); } else { this.close(); } } if ($.inArray(key, this.confirmKeys) !== -1) { if (this.$confirmButton) { this.$confirmButton.click(); } } }, setDialogCenter: function () { if (this.$contentPane.css('display') == 'none') { var contentHeight = 0; var paneHeight = 0; } else { var contentHeight = this.$content.outerHeight(); var paneHeight = this.$contentPane.height(); if (paneHeight == 0) paneHeight = contentHeight; } var off = 100; var w = this.$content.outerWidth(); this.$content.css({'clip': 'rect(0px ' + (off + w) + 'px ' + contentHeight + 'px -' + off + 'px)'}); this.$contentPane.css({'height': contentHeight}); var windowHeight = $(window).height(); var boxHeight = this.$b.outerHeight() - paneHeight + contentHeight; var topMargin = (windowHeight - boxHeight) / 2; var minMargin = 100; if (boxHeight > (windowHeight - minMargin)) { var style = {'margin-top': minMargin / 2, 'margin-bottom': minMargin / 2} $('body').addClass('jconfirm-noscroll'); } else { var style = {'margin-top': topMargin} $('body').removeClass('jconfirm-noscroll'); } this.$b.css(style); }, close: function () { var that = this; if (this.isClosed()) return false; if (typeof this.onClose === 'function') this.onClose(); this._unwatchContent(); that._lastFocused.focus(); $(window).unbind('resize.' + this._rand); if (this.keyboardEnabled) $(window).unbind('keyup.' + this._rand); that.$el.find('.jconfirm-bg').removeClass('seen'); $('body').removeClass('jconfirm-noscroll'); this.$b.addClass(this.closeAnimation); var closeTimer = (this.closeAnimation == 'anim-none') ? 0 : this.animationSpeed; setTimeout(function () { that.$el.remove(); }, closeTimer * 25 / 100); j_confirm.record.closed += 1; j_confirm.record.currentlyOpen -= 1; return true; }, open: function () { var that = this; if (this.isClosed()) return false; that.$el.find('.jconfirm-bg').addClass('seen'); this.$b.removeClass(this.animation); this.$b.find('input[autofocus]:visible:first').focus(); j_confirm.record.opened += 1; j_confirm.record.currentlyOpen += 1; if (typeof this.onOpen === 'function') this.onOpen(); var jcr = 'jconfirm-box' + this._rand; this.$b.attr('aria-labelledby', jcr).attr('tabindex', -1).focus(); if (this.$title) this.$title.attr('id', jcr); else if (this.$content) this.$content.attr('id', jcr); setTimeout(function () { that.$b.css({'transition-property': that.$b.css('transition-property') + ', margin'}); that._modalReady.resolve(); }, this.animationSpeed); return true; }, isClosed: function () { return this.$el.css('display') === ''; } }; j_confirm.pluginDefaults = { template: '
', title: 'Hello', content: 'Are you sure to continue?', contentLoaded: function () { }, icon: '', opacity: 0.2, confirmButton: 'Okay', cancelButton: 'Close', confirmButtonClass: 'btn-default', cancelButtonClass: 'btn-default', theme: 'white', animation: 'zoom', closeAnimation: 'scale', animationSpeed: 500, animationBounce: 1.2, keyboardEnabled: false, rtl: false, confirmKeys: [13], cancelKeys: [27], container: 'body', confirm: function () { }, cancel: function () { }, backgroundDismiss: false, autoClose: false, closeIcon: null, closeIconClass: false, watchInterval: 100, columnClass: 'columnClass', onOpen: function () { }, onClose: function () { }, onAction: function () { } }; j_confirm.record = {opened: 0, closed: 0, currentlyOpen: 0}; })(jQuery); // 自定义弹窗 ;(function($) { //生成Css let GenerateCss = function () { $("#mb_box").css({width: '100%', height: '100%', zIndex: '99999999991', position: 'fixed', background: 'black', top: '0', left: '0', opacity: '0.6'}); $("#mb_con").css({ zIndex: '99999999992', width: '350px',height:'200px', position: 'fixed', background: 'White',borderRadius:'5px',}); $("#mb_tit").css({ display: 'flex',position:'relative', fontSize: '14px',height: '50px', lineHeight: '30px', color: '#444', padding: '10px 15px', background: '#fff', borderRadius: '15px 15px 0 0', fontWeight: 'bold',boxSizing:"border-box"}); $("#mb_msg").css({ padding: '10px 14px',width: "100%", lineHeight: '26px', textAlign:'center', fontSize: '14px' ,color:'#4c4c4c',minHeight:'70px',maxHeight: "calc(100% - 80px)",overflow:"auto",wordBreak:"break-all",boxSizing:"border-box"}); $("#mb_input_d").css({ padding: '10px 14px', lineHeight: '26px', textAlign:'center', fontSize: '18px' ,color:'#4c4c4c'}); $("#mb_input").css({ padding: '0 10px',border:'1px solid #ccc',borderRadius:'4px', lineHeight: '26px', fontSize: '18px' ,color:'#000'}); $("#mb_ico").css({ display: 'block', position: 'absolute', right: '10px', top: '9px', border: '1px solid Gray', width: '18px', height: '18px', textAlign: 'center', lineHeight: '16px', cursor: 'pointer', borderRadius: '12px', fontFamily: '微软雅黑'}); $("#mb_btnbox").css({ margin: '15px 0px 10px 0', textAlign: 'center' }); $("#mb_btn_ok,#mb_btn_no").css({ width: '80px', height: '30px', color: 'white', border: 'none', borderRadius:'4px',fontSize:'14px'}); $("#mb_btn_close").css({ background: '#fff',borderRadius: '20px',width:'30px',height:'30px',lineHeight: '40px !important',border:'1px solid #ccc',color:'#ccc',right: '10px',textAlign:'center'}); $("#mb_btn_ok").css({ background: '#41a259' }); $("#mb_btn_no").css({ background: 'gray', marginRight: '40px' }); //右上角关闭按钮hover样式 $("#mb_ico").hover(function () { $(this).css({ background: 'Red', color: 'White' }); }, function () { $(this).css({ background: '#DDD', color: 'black' }); }); var _widht = document.documentElement.clientWidth; //屏幕宽 var _height = document.documentElement.clientHeight; //屏幕高 var boxWidth = $("#mb_con").width(); var boxHeight = $("#mb_con").height(); //让提示框居中 $("#mb_con").css({ top: (_height - boxHeight) / 2 + "px", left: (_widht - boxWidth) / 2 + "px" }); } $.alerts = { alert: function(title, message, callback) { if( title == null ) title = 'Alert'; $.alerts._show(title, message, null, 'alert', function(result) { if( callback ) callback(result); }); }, confirm: function(title, message, callback) { if( title == null ) title = 'Confirm'; $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result); }); }, select:function(title,message,callback, btns,colors){ if( title == null ) title = 'Select'; $.alerts._show(title, message, null, 'select', function(result) { if( callback ) callback(result); }, btns,colors); }, input:function(title, message, value , callback) { if( title == null ) title = 'Input'; $.alerts._show(title, message, value, 'input', function(result) { if( callback ) callback(result); }); }, _show: function(title, msg, value, type, callback,btns = null,colors = null) { var _html = ""; _html += '
' + title; //插入关闭 if (type === "select") { _html += ''; } _html += '
'; _html += '
' + msg + '
'; if (type === "input") { _html += '
'; } _html += '
'; if (type === "alert") { _html += ''; } if (type === "confirm") { _html += ''; _html += ''; } if (type === "input") { _html += ''; _html += ''; } if (type === "select") { _html += ''; _html += ''; } _html += '
'; //必须先将_html添加到body,再设置Css样式 $("body").append(_html); GenerateCss(); switch( type ) { case 'alert': $("#mb_btn_ok").click( function() { $.alerts._hide(); callback(true); }); $("#mb_btn_ok").focus().keyup( function(e) { if( e.keyCode == 13 || e.keyCode == 27 ) $("#mb_btn_ok").trigger('click'); }); break; case 'confirm': $("#mb_btn_ok").click( function() { $.alerts._hide(); if( callback ) callback(true); }); $("#mb_btn_no").click( function() { $.alerts._hide(); if( callback ) callback(false); }); // $("#mb_btn_ok").focus(); $("#mb_btn_ok, #mb_btn_no").keyup( function(e) { if( e.keyCode === 13 ) $("#mb_btn_ok").trigger('click'); if( e.keyCode === 27 ) $("#mb_btn_no").trigger('click'); }); break; case 'select': colors &&colors[0] && $("#mb_btn_no").css({ background: colors[0]}); colors &&colors[1] && $("#mb_btn_ok").css({ background: colors[1]}); $("#mb_btn_close").click( function() { $.alerts._hide(); if( callback ) callback(false); }); $("#mb_btn_ok").click( function() { $.alerts._hide(); if( callback ) callback(2); }); $("#mb_btn_no").click( function() { $.alerts._hide(); if( callback ) callback(1); }); break; case 'input': $("#mb_btn_ok").click( function() { var res = {}; res.data = $.trim($("#mb_input").val()); $.alerts._hide(); if( callback ) callback(res); }); $("#mb_btn_no").click( function() { $.alerts._hide(); if( callback ) callback(false); }); $("#mb_input").focus().select(); $("#mb_btn_ok, #mb_btn_no, #mb_input").keyup( function(e) { if( e.keyCode === 13 ) $("#mb_btn_ok").trigger('click'); if( e.keyCode === 27 ) $("#mb_btn_no").trigger('click'); }); break; } }, _hide: function() { $("#mb_box,#mb_con").remove(); } }; // Shortuct functions myAlert = function(title, message, callback) { $.alerts.alert(title, message, callback); }; // myConfirm = function(title, message, callback) { $.alerts.confirm(title, message, callback); }; // mySelect = function(title, message, callback, btns,colors){ $.alerts.select(title, message, callback, btns,colors); }; // myInput = function(title, message,value,callback) { $.alerts.input(title, message,value, callback); }; })(jQuery); // 自定义toast ;(function (e, t) { "use strict"; var n = (e(t), e(document), !1), a = function (t) { if ("string" == typeof t) var t = { content: t }; this.settings = e.extend({}, a.defaults, t), this.init() }; a.defaults = { content: "提示", lock: !1, wrapClass: null, type: null, position: "top", parentWrap: "body", time: 2300, pending: "" }, a.prototype = { init: function () { this.create(), this.settings.lock && this.lock() }, create: function () { var t = "", i = "", n = this; this.settings.type && (t = ''), i = '
' + t + this.settings.content + "
", e("#toast").length && e("#toast").remove(), this.toast = e(i).appendTo(this.settings.parentWrap), this.settings.wrapClass && this.toast.addClass(this.settings.wrapClass), this.settings.position && this.position(), this.time(), this.toast.on("click", function () {n.close()}) }, position: function () { "top" == this.settings.position && this.toast.css("top", 0), "center" == this.settings.position && this.toast.css("bottom", 0), "bottom" == this.settings.position && this.toast.css("bottom", 0) }, lock: function () { n || (e("html,body").css("overflow", "hidden"), n = !0) }, unLock: function () { this.settings.lock && n && (e("html,body").css("overflow", "visible"), n = !1) }, close: function () { var e = this; e.toast.addClass("slideup"), setTimeout(function () { e.toast.removeClass("slideup").remove() }, 500), e.unLock() }, time: function () { var e = this; this.settings.time && "loading" != this.settings.type && (this.closeTimer = setTimeout(function () { e.close() }, this.settings.time)) } }, e.toast = function (e) { new a(e) } })(jQuery, window);