@uni/loading
Version:
1 lines • 5.91 kB
JavaScript
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.uni_loading=t():n.uni_loading=t()}(window,(function(){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=10)}([function(n,t,e){"use strict";e.d(t,"a",(function(){return r}));var r={WECHAT:"wechatMiniProgram",ALIPAY:"aliMiniApp",BYTE:"bytedanceMicroApp",WEB:"web",BAIDU:"baiduSmartProgram",KWAI:"kuaishouMiniProgram"}},function(n,t,e){"use strict";e.d(t,"b",(function(){return a})),e.d(t,"a",(function(){return s}));var r=e(2);function o(){return(o=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n}).apply(this,arguments)}function i(n){return function(t){return new Promise((function(e,r){var i=t;n(o({},i,{success:function(n){i&&"function"==typeof i.success&&i.success(n),e(n)},onSuccess:function(n){i&&"function"==typeof i.onSuccess&&i.onSuccess(n),e(n)},fail:function(n){i&&"function"==typeof i.fail&&i.fail(n),r(n)},onFail:function(n){i&&"function"==typeof i.onFail&&i.onFail(n),r(n)},complete:function(n){i&&"function"==typeof i.complete&&i.complete(n)},onComplete:function(n){i&&"function"==typeof i.onComplete&&i.onComplete(n)}}))}))}}var u=["_ext"];function c(){return(c=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n}).apply(this,arguments)}var f=function(n,t){var e=n||{},r=e._ext,o=void 0===r?{}:r;return c({},function(n,t){if(null==n)return{};var e,r,o={},i=Object.keys(n);for(r=0;r<i.length;r++)e=i[r],t.indexOf(e)>=0||(o[e]=n[e]);return o}(e,u),o[t]||{})};function a(n,t){return function(e){return i(n)(((o=f(e,t))||(o={}),(r.e||r.b||r.a||r.c)&&(o.title=o.content||"",delete o.content),o));var o}}function s(n,t){return function(e){return i(n)(f(e,t))}}},function(n,t,e){"use strict";(function(n,r){e.d(t,"f",(function(){return o})),e.d(t,"d",(function(){return u})),e.d(t,"b",(function(){return c})),e.d(t,"a",(function(){return f})),e.d(t,"c",(function(){return a})),e.d(t,"e",(function(){return s}));var o="undefined"!=typeof window&&"onload"in window,i=(void 0!==n&&(!n.versions||n.versions.node),"undefined"!=typeof WXEnvironment&&"Web"!==WXEnvironment.platform),u="undefined"!=typeof my&&null!==my&&void 0!==my.alert,c="undefined"!=typeof tt&&null!==tt&&void 0!==tt.showToast,f="undefined"!=typeof swan&&null!==swan&&void 0!==swan.showToast,a="undefined"!=typeof ks&&null!==ks&&void 0!==ks.showToast,s=!c&&"undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);null!=r&&r.callNative}).call(this,e(3),e(4))},function(n,t){var e,r,o=n.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(n){if(e===setTimeout)return setTimeout(n,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(n,0);try{return e(n,0)}catch(t){try{return e.call(null,n,0)}catch(t){return e.call(this,n,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(n){e=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(n){r=u}}();var f,a=[],s=!1,l=-1;function d(){s&&f&&(s=!1,f.length?a=f.concat(a):l=-1,a.length&&p())}function p(){if(!s){var n=c(d);s=!0;for(var t=a.length;t;){for(f=a,a=[];++l<t;)f&&f[l].run();l=-1,t=a.length}f=null,s=!1,function(n){if(r===clearTimeout)return clearTimeout(n);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(n);try{r(n)}catch(t){try{return r.call(null,n)}catch(t){return r.call(this,n)}}}(n)}}function y(n,t){this.fun=n,this.array=t}function h(){}o.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];a.push(new y(n,t)),1!==a.length||s||c(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(){return[]},o.binding=function(){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(n,t){var e=function(){return this}();try{e=e||new Function("return this")()}catch(n){"object"==typeof window&&(e=window)}n.exports=e},function(n,t,e){"use strict";function r(n){return"undefined"===n}e.r(t),e.d(t,"showLoading",(function(){return c})),e.d(t,"hideLoading",(function(){return f}));var o=!r(typeof dd)&&null!==dd&&!r(typeof dd.alert),i=e(1),u=e(0),c=Object(i.b)((function(n){return o?dd.showLoading(n):my.showLoading(n)}),u.a.ALIPAY),f=Object(i.a)((function(n){return o?dd.hideLoading(n):my.hideLoading(n)}),u.a.ALIPAY);t.default={showLoading:c,hideLoading:f}},,,,,function(n,t,e){n.exports=e(5)}])}));