{"version":3,"file":"/pc/common/js/gAlert.js.map","sources":["/pc/common/js/gAlert.js"],"sourcesContent":["/*\n * @Date: 2019-02-20 14:32:01\n * @Author: caixiaohua@gmm01.com\n * @LastEditors: caixiaohua@gmm01.com\n * @LastEditTime: 2022-03-04 18:12:36\n * @FilePath: /gmm_pc/pc/common/js/gAlert.js\n */\n/**\n * Created by luojianguo on 2016/6/29.\n *\n * 重置window一些默认行为,谨慎使用\n *\n */\n\ndefine([\"jquery\"], function ($) {\n \"use strict\";\n $(document).on('click','.page-common-alert .clsAlert',function () {\n $(\".page-common-alert\").modal('hide');\n });\n \n return new function(){\n var self = this;\n\n //声明接口的参数\n var DivAlert = function(msg,okFunction){\n return new DivAlert.fn.init(msg,okFunction);\n };\n\n\n DivAlert.fn = DivAlert.prototype = {\n init : function(msg,okFunction){\n var my = this;\n this.ok(okFunction);\n //事件回调\n $('.page-common-alert').on('hide.bs.modal', function () {\n my.okFunction && my.okFunction();\n });\n\n //根据接口参数设置界面值\n $(\".page-common-alert .modal-body span.megtext\").text(msg);\n\n $(\".page-common-alert\").modal('show').css({\n //\"margin-top\": \"-\" + 149 +\"px\"\n\n\n // \"margin-top\": function () {\n // return - ( $(this). height() / 2);\n //}\n });\n\n return this; //返回自己,便于链式调用\n\n\n },\n\n\n okFunction: null,\n\n //根据页面的按钮,定义处理函数,并保存到变量中\n ok : function(f){\n typeof f == 'function' && (this.okFunction = f);\n }\n };\n\n //上下文设置\n DivAlert.fn.init.prototype = DivAlert.fn;\n \n return DivAlert;\n\n\n\n\n\n}})"],"names":["define","$","document","on","modal","DivAlert","msg","okFunction","fn","init","prototype","my","this","ok","text","css","f"],"mappings":"AAcAA,QAAQ,UAAW,SAAUC,GACzB,YAKA,OAJAA,GAAEC,UAAUC,GAAG,QAAQ,+BAA+B,WAClDF,EAAE,sBAAsBG,MAAM,UAG3B,GAAI,YACP,GAGGC,GAAW,SAASC,EAAIC,GACvB,MAAO,IAAIF,GAASG,GAAGC,KAAKH,EAAIC,GA0CpC,OAtCAF,GAASG,GAAKH,EAASK,WACnBD,KAAO,SAASH,EAAIC,GACZ,GAAII,GAAKC,IAmBT,OAlBAA,MAAKC,GAAGN,GAERN,EAAE,sBAAsBE,GAAG,gBAAiB,WACxCQ,EAAGJ,YAAcI,EAAGJ,eAIxBN,EAAE,+CAA+Ca,KAAKR,GAEtDL,EAAE,sBAAsBG,MAAM,QAAQW,QAS/BH,MAMfL,WAAY,KAGZM,GAAK,SAASG,GACE,kBAALA,KAAoBJ,KAAKL,WAAaS,KAKrDX,EAASG,GAAGC,KAAKC,UAAYL,EAASG,GAE/BH"}