@ibiz-template/core 0.0.1-alpha.26 → 0.0.1-alpha.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register(["axios","lodash-es","qx-util","qs","pluralize"],(function(t){"use strict";var e,n,r,o,i,s;return{setters:[function(t){e=t.default},function(t){n=t.debounce},function(t){r=t.getCookie,o=t.notNilEmpty},function(t){i=t.stringify},function(t){s=t.default}],execute:function(){t({debounceAndMerge:function(t,e,r,o){var i,s=n((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return i=void 0,t.apply(void 0,v([],b(e),!1))}),r,o);return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t;return i&&(r=e(i,r)),i=r,s.apply(void 0,v([],b(r),!1))}},getToken:m,install:function(){if(window.ibiz)throw new Error("ibiz 已经存在, 无需重复安装");window.ibiz=new x,window.___fc=new E,new g},isOverlap:function(t,e){return Array.from(new Set(v(v([],b(t),!1),b(e),!1))).length!==t.length+e.length},plural:k,pluralLower:function(t){return k(t).toLowerCase()}});var a,c,u=t("CoreConst",function(){function t(){}return t.DEFAULT_MODEL_SERVICE_TAG="default",t.TOKEN="access_token",t}()),l=t("HttpStatusMessageConst",{200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"});t("LoginMode",a),function(t){t.DEFAULT="DEFAULT",t.CUSTOM="CUSTOM",t.CAS="CAS"}(a||t("LoginMode",a={})),t("MenuPermissionMode",c),function(t){t.MIXIN="MIXIN",t.RESOURCE="RESOURCE",t.RT="RT"}(c||t("MenuPermissionMode",c={}));t("IBizContext",(function(t,e){if(void 0===t&&(t={}),e){var n=this;Object.defineProperty(this,"_context",{enumerable:!1,value:{}});var r={};Object.keys(e).forEach((function(t){r[t]={enumerable:!0,set:function(e){n._context[t]=null==e?null:e},get:function(){return void 0!==n._context[t]?n._context[t]:e[t]}}})),Object.defineProperties(this,r)}Object.assign(this,t)}));var f=t("Environment",{baseUrl:"",remoteModelUrl:"/remotemodel",assetsUrl:"./assets",dcSystem:"",ExportFile:"/ibizutil/download",UploadFile:"/ibizutil/upload",casLoginUrl:"",loginMode:a.DEFAULT,menuPermissionMode:c.MIXIN,enablePermission:!0}),h=t("HttpError",(function(t){this.name="HttpError";var e=t.response;this.response=t.response,e?(e.data?this.message=e.data.message:this.message=e.statusText,this.message||(this.message=l[e.status]),this.message||(this.message="网络异常,请稍后重试!"),this.status=e.status):(this.message=t.message,this.status=500)})),p=(t("RuntimeError",(function(t){this.message=t,this.name="Runtime Error"})),function(){return p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},p.apply(this,arguments)});function d(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))}function y(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function b(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function v(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function m(){return r(u.TOKEN)}var g=t("Interceptor",function(){function t(){this.init()}return t.prototype.init=function(){e.interceptors.request.use((function(t){t.headers||(t.headers={}),t.headers.Authorization="Bearer ".concat(m());var e=ibiz.orgData;return e&&(e.systemid&&(t.headers.srfsystemid=e.systemid),e.orgid&&(t.headers.srforgid=e.orgid)),t}))},t}());function w(t,e,n,r,o){var i="".concat(t,"-").concat(e);return n&&(i+="-".concat(n)),r&&(i+="__".concat(r)),o&&(i+="--".concat(o)),i}t("Namespace",function(){function t(t,e){this.block=t,this.namespace=e||"ibiz"}return t.prototype.b=function(t){return void 0===t&&(t=""),w(this.namespace,this.block,t,"","")},t.prototype.e=function(t){return t?w(this.namespace,this.block,"",t,""):""},t.prototype.m=function(t){return t?w(this.namespace,this.block,"","",t):""},t.prototype.be=function(t,e){return t&&e?w(this.namespace,this.block,t,e,""):""},t.prototype.em=function(t,e){return t&&e?w(this.namespace,this.block,"",t,e):""},t.prototype.bm=function(t,e){return t&&e?w(this.namespace,this.block,t,"",e):""},t.prototype.bem=function(t,e,n){return t&&e&&n?w(this.namespace,this.block,t,e,n):""},t.prototype.is=function(t,e){return t&&e?"".concat("is-").concat(t):""},t.prototype.cssVar=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarName(n)]=t[n]);return e},t.prototype.cssVarBlock=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarBlockName(n)]=t[n]);return e},t.prototype.cssVarName=function(t){return"--".concat(this.namespace,"-").concat(t)},t.prototype.cssVarBlockName=function(t){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(t)},t}()),t("HttpResponse",(function(t,e,n){this.local=!0,this.ok=!1,this.headers={},this.config={},this.data=t,this.status=e||200,this.statusText=n||"",this.status>=200&&this.status<300&&(this.ok=!0)}));var P=t("Net",function(){function t(t){this._prefix="",t&&(this._prefix=t)}return Object.defineProperty(t.prototype,"prefix",{get:function(){return this._prefix||ibiz.env.baseUrl},enumerable:!1,configurable:!0}),t.prototype.post=function(t,n,r,o){return void 0===r&&(r={}),void 0===o&&(o={}),d(this,void 0,void 0,(function(){var i,s;return y(this,(function(a){switch(a.label){case 0:t=this.handleAppPresetParam(t,r),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e({method:"post",url:t,data:n,headers:p({"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"},o)})];case 2:return i=a.sent(),[2,this.doResponseResult(i)];case 3:throw s=a.sent(),new h(s);case 4:return[2]}}))}))},t.prototype.get=function(t,n,r,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),d(this,void 0,void 0,(function(){var i,s;return y(this,(function(a){switch(a.label){case 0:t=this.attachUrlParam(t,n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e.get(t,p({headers:r},o))];case 2:return i=a.sent(),[2,this.doResponseResult(i)];case 3:throw s=a.sent(),new h(s);case 4:return[2]}}))}))},t.prototype.delete=function(t,n,r){return void 0===r&&(r={}),d(this,void 0,void 0,(function(){var o,i;return y(this,(function(s){switch(s.label){case 0:t=this.handleAppPresetParam(t,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,e.delete(t,{headers:r})];case 2:return o=s.sent(),[2,this.doResponseResult(o)];case 3:throw i=s.sent(),new h(i);case 4:return[2]}}))}))},t.prototype.put=function(t,n,r,o){return void 0===r&&(r={}),void 0===o&&(o={}),d(this,void 0,void 0,(function(){var i,s;return y(this,(function(a){switch(a.label){case 0:t=this.handleAppPresetParam(t,r),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e.put(t,n,{headers:o})];case 2:return i=a.sent(),[2,this.doResponseResult(i)];case 3:throw s=a.sent(),new h(s);case 4:return[2]}}))}))},t.prototype.getModel=function(t,n){return void 0===n&&(n={}),d(this,void 0,void 0,(function(){var r,o;return y(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e.get(t,{headers:n})];case 1:return r=i.sent(),[2,this.doResponseResult(r)];case 2:throw o=i.sent(),new h(o);case 3:return[2]}}))}))},t.prototype.doResponseResult=function(t){var e=t;return e.status>=200&&e.status<=299&&(e.ok=!0),e},t.prototype.handleAppPresetParam=function(t,e){if(e){var n=Object.keys(e),r={};return n.forEach((function(t){t.startsWith("srf")&&o(e[t])&&(r[t]=e[t])})),this.attachUrlParam(t,e)}return t},t.prototype.attachUrlParam=function(t,e){t=this.attachUrl(t);var n=i(e);return o(n)&&(t=t.endsWith("?")||-1!==t.indexOf("?")&&t.endsWith("&")?"".concat(t).concat(n):-1===t.indexOf("?")||t.endsWith("&")?"".concat(t,"?").concat(n):"".concat(t,"&").concat(n)),t},t.prototype.attachUrl=function(t){return"".concat(this.prefix).concat(t)},t}());function k(t){return s(t)}t("UrlHelper",function(){function t(){}return Object.defineProperty(t,"routeBase",{get:function(){return"".concat(this.appBase,"/#")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"appBase",{get:function(){var t=window.location,e=t.origin,n=t.pathname;return"".concat(e).concat(n).replace(/\/$/,"")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"routePath",{get:function(){return window.location.hash.replace("#","")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"fullPath",{get:function(){return window.location.href},enumerable:!1,configurable:!0}),t}());var x=t("IBizSys",(function(){this.env=f,this.net=new P})),E=t("FactoryCenter",(function(){}))}}}));
1
+ System.register(["axios","lodash-es","qx-util","qs","pluralize"],(function(t){"use strict";var e,n,r,o,i,s;return{setters:[function(t){e=t.default},function(t){n=t.debounce},function(t){r=t.getCookie,o=t.notNilEmpty},function(t){i=t.stringify},function(t){s=t.default}],execute:function(){t({debounceAndMerge:function(t,e,r,o){var i,s=n((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return i=void 0,t.apply(void 0,v([],b(e),!1))}),r,o);return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t;return i&&(r=e(i,r)),i=r,s.apply(void 0,v([],b(r),!1))}},getToken:m,install:function(){if(window.ibiz)throw new Error("ibiz 已经存在, 无需重复安装");window.ibiz=new x,window.___fc=new E,new g},isOverlap:function(t,e){return Array.from(new Set(v(v([],b(t),!1),b(e),!1))).length!==t.length+e.length},plural:k,pluralLower:function(t){return k(t).toLowerCase()}});var a,c,u=t("CoreConst",function(){function t(){}return t.DEFAULT_MODEL_SERVICE_TAG="default",t.TOKEN="access_token",t}()),l=t("HttpStatusMessageConst",{200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"});t("LoginMode",a),function(t){t.DEFAULT="DEFAULT",t.CUSTOM="CUSTOM",t.CAS="CAS"}(a||t("LoginMode",a={})),t("MenuPermissionMode",c),function(t){t.MIXIN="MIXIN",t.RESOURCE="RESOURCE",t.RT="RT"}(c||t("MenuPermissionMode",c={}));t("IBizContext",(function(t,e){if(void 0===t&&(t={}),e){var n=this;Object.defineProperty(this,"_context",{enumerable:!1,value:{}});var r={};Object.keys(e).forEach((function(t){r[t]={enumerable:!0,set:function(e){n._context[t]=null==e?null:e},get:function(){return void 0!==n._context[t]?n._context[t]:e[t]}}})),Object.defineProperties(this,r)}Object.assign(this,t)}));var f=t("Environment",{dev:!1,baseUrl:"",remoteModelUrl:"/remotemodel",assetsUrl:"./assets",dcSystem:"",ExportFile:"/ibizutil/download",UploadFile:"/ibizutil/upload",casLoginUrl:"",loginMode:a.DEFAULT,menuPermissionMode:c.MIXIN,enablePermission:!0}),h=t("HttpError",(function(t){this.name="HttpError";var e=t.response;this.response=t.response,e?(e.data?this.message=e.data.message:this.message=e.statusText,this.message||(this.message=l[e.status]),this.message||(this.message="网络异常,请稍后重试!"),this.status=e.status):(this.message=t.message,this.status=500)})),p=(t("RuntimeError",(function(t){this.message=t,this.name="Runtime Error"})),function(){return p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},p.apply(this,arguments)});function d(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))}function y(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function b(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function v(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function m(){return r(u.TOKEN)}var g=t("Interceptor",function(){function t(){this.init()}return t.prototype.init=function(){e.interceptors.request.use((function(t){t.headers||(t.headers={}),t.headers.Authorization="Bearer ".concat(m());var e=ibiz.orgData;return e&&(e.systemid&&(t.headers.srfsystemid=e.systemid),e.orgid&&(t.headers.srforgid=e.orgid)),t}))},t}());function w(t,e,n,r,o){var i="".concat(t,"-").concat(e);return n&&(i+="-".concat(n)),r&&(i+="__".concat(r)),o&&(i+="--".concat(o)),i}t("Namespace",function(){function t(t,e){this.block=t,this.namespace=e||"ibiz"}return t.prototype.b=function(t){return void 0===t&&(t=""),w(this.namespace,this.block,t,"","")},t.prototype.e=function(t){return t?w(this.namespace,this.block,"",t,""):""},t.prototype.m=function(t){return t?w(this.namespace,this.block,"","",t):""},t.prototype.be=function(t,e){return t&&e?w(this.namespace,this.block,t,e,""):""},t.prototype.em=function(t,e){return t&&e?w(this.namespace,this.block,"",t,e):""},t.prototype.bm=function(t,e){return t&&e?w(this.namespace,this.block,t,"",e):""},t.prototype.bem=function(t,e,n){return t&&e&&n?w(this.namespace,this.block,t,e,n):""},t.prototype.is=function(t,e){return t&&e?"".concat("is-").concat(t):""},t.prototype.cssVar=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarName(n)]=t[n]);return e},t.prototype.cssVarBlock=function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarBlockName(n)]=t[n]);return e},t.prototype.cssVarName=function(t){return"--".concat(this.namespace,"-").concat(t)},t.prototype.cssVarBlockName=function(t){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(t)},t}()),t("HttpResponse",(function(t,e,n){this.local=!0,this.ok=!1,this.headers={},this.config={},this.data=t,this.status=e||200,this.statusText=n||"",this.status>=200&&this.status<300&&(this.ok=!0)}));var P=t("Net",function(){function t(t){this._prefix="",t&&(this._prefix=t)}return Object.defineProperty(t.prototype,"prefix",{get:function(){return this._prefix||ibiz.env.baseUrl},enumerable:!1,configurable:!0}),t.prototype.post=function(t,n,r,o){return void 0===r&&(r={}),void 0===o&&(o={}),d(this,void 0,void 0,(function(){var i,s;return y(this,(function(a){switch(a.label){case 0:t=this.handleAppPresetParam(t,r),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e({method:"post",url:t,data:n,headers:p({"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"},o)})];case 2:return i=a.sent(),[2,this.doResponseResult(i)];case 3:throw s=a.sent(),new h(s);case 4:return[2]}}))}))},t.prototype.get=function(t,n,r,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),d(this,void 0,void 0,(function(){var i,s;return y(this,(function(a){switch(a.label){case 0:t=this.attachUrlParam(t,n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e.get(t,p({headers:r},o))];case 2:return i=a.sent(),[2,this.doResponseResult(i)];case 3:throw s=a.sent(),new h(s);case 4:return[2]}}))}))},t.prototype.delete=function(t,n,r){return void 0===r&&(r={}),d(this,void 0,void 0,(function(){var o,i;return y(this,(function(s){switch(s.label){case 0:t=this.handleAppPresetParam(t,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,e.delete(t,{headers:r})];case 2:return o=s.sent(),[2,this.doResponseResult(o)];case 3:throw i=s.sent(),new h(i);case 4:return[2]}}))}))},t.prototype.put=function(t,n,r,o){return void 0===r&&(r={}),void 0===o&&(o={}),d(this,void 0,void 0,(function(){var i,s;return y(this,(function(a){switch(a.label){case 0:t=this.handleAppPresetParam(t,r),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e.put(t,n,{headers:o})];case 2:return i=a.sent(),[2,this.doResponseResult(i)];case 3:throw s=a.sent(),new h(s);case 4:return[2]}}))}))},t.prototype.getModel=function(t,n){return void 0===n&&(n={}),d(this,void 0,void 0,(function(){var r,o;return y(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e.get(t,{headers:n})];case 1:return r=i.sent(),[2,this.doResponseResult(r)];case 2:throw o=i.sent(),new h(o);case 3:return[2]}}))}))},t.prototype.doResponseResult=function(t){var e=t;return e.status>=200&&e.status<=299&&(e.ok=!0),e},t.prototype.handleAppPresetParam=function(t,e){if(e){var n=Object.keys(e),r={};return n.forEach((function(t){t.startsWith("srf")&&o(e[t])&&(r[t]=e[t])})),this.attachUrlParam(t,e)}return t},t.prototype.attachUrlParam=function(t,e){t=this.attachUrl(t);var n=i(e);return o(n)&&(t=t.endsWith("?")||-1!==t.indexOf("?")&&t.endsWith("&")?"".concat(t).concat(n):-1===t.indexOf("?")||t.endsWith("&")?"".concat(t,"?").concat(n):"".concat(t,"&").concat(n)),t},t.prototype.attachUrl=function(t){return"".concat(this.prefix).concat(t)},t}());function k(t){return s(t)}t("UrlHelper",function(){function t(){}return Object.defineProperty(t,"routeBase",{get:function(){return"".concat(this.appBase,"/#")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"appBase",{get:function(){var t=window.location,e=t.origin,n=t.pathname;return"".concat(e).concat(n).replace(/\/$/,"")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"routePath",{get:function(){return window.location.hash.replace("#","")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"fullPath",{get:function(){return window.location.href},enumerable:!1,configurable:!0}),t}());var x=t("IBizSys",(function(){this.env=f,this.net=new P})),E=t("FactoryCenter",(function(){}))}}}));
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAWzB,CAAC"}
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAYzB,CAAC"}
@@ -3,6 +3,7 @@ import { LoginMode, MenuPermissionMode } from '../constant';
3
3
  * 环境变量
4
4
  */
5
5
  export const Environment = {
6
+ dev: false,
6
7
  baseUrl: '',
7
8
  remoteModelUrl: '/remotemodel',
8
9
  assetsUrl: './assets',
@@ -16,6 +16,15 @@ export interface IEnvironment {
16
16
  * @type {string}
17
17
  */
18
18
  namespace?: string;
19
+ /**
20
+ * 是否为开发模式
21
+ *
22
+ * @default false
23
+ * @author chitanda
24
+ * @date 2022-10-21 11:10:29
25
+ * @type {boolean}
26
+ */
27
+ dev: boolean;
19
28
  /**
20
29
  * 请求根路径
21
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"i-environment.d.ts","sourceRoot":"","sources":["../../../src/interface/i-environment/i-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;;;;;OAMG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;CACxC"}
1
+ {"version":3,"file":"i-environment.d.ts","sourceRoot":"","sources":["../../../src/interface/i-environment/i-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;OAOG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;;;;;OAMG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;CACxC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/core",
3
- "version": "0.0.1-alpha.26",
3
+ "version": "0.0.1-alpha.31",
4
4
  "description": "核心包",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -42,5 +42,5 @@
42
42
  "lodash-es": "^4.17.21",
43
43
  "qx-util": "^0.4.1"
44
44
  },
45
- "gitHead": "f516fd1387cea04747beec765f3287a92bf5f39f"
45
+ "gitHead": "026a833b638e392c76e0ed7bc1442f0964b85640"
46
46
  }
@@ -5,6 +5,7 @@ import { IEnvironment } from '../interface';
5
5
  * 环境变量
6
6
  */
7
7
  export const Environment: IEnvironment = {
8
+ dev: false,
8
9
  baseUrl: '',
9
10
  remoteModelUrl: '/remotemodel',
10
11
  assetsUrl: './assets',
@@ -18,6 +18,16 @@ export interface IEnvironment {
18
18
  */
19
19
  namespace?: string;
20
20
 
21
+ /**
22
+ * 是否为开发模式
23
+ *
24
+ * @default false
25
+ * @author chitanda
26
+ * @date 2022-10-21 11:10:29
27
+ * @type {boolean}
28
+ */
29
+ dev: boolean;
30
+
21
31
  /**
22
32
  * 请求根路径
23
33
  *