12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f2a89e68"],{"04a7":function(e,t,r){"use strict";var n=r("d844");e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},"050d":function(e,t,r){"use strict";var n=r("d844");function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},"068e":function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},"0930":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABpElEQVQ4T41ToW5bMRQ91/YHpKCslQILCjI2qWCWnoMKFjC+fEJppYF+QvlAMza2FD9f9ZWVLaCwoGBwUlvu5E73yY6cKI320LN9fe455x4Tqm88Ho9E5CuAEQCqzwAIgAUR/WjbdlHO+iLv/cBaewPgDcCcmedbl/tl0zQTABMiGqSUpl3XvfYATdPM9l3cBitAzDwtAH+Wy+WpIu7qvL2XGT8y81EBeCSiv5nW8z4Q7/3QOXcjIofMfNoDhBA6AFcALgAMANxlw3pGIqJ7aqzPPl1rfYzRFwYLZtaC3lDnXCmuyXQppYWepZSerbVq9mgtAcC399yvUbQBgHNr7eWGBBG5JiLt/DuldL9taGb2CcAHEdE8XKwlhBAeYowfsx+q06tuIlp7kP/VK6gE59xPvVMkPBljvtQJe28SOgVr7TGA78x8Uk9hLiJDY8yvtm3vdwGEEJSZJlFHPakldLoocVUvdknI2l+zhFk9xv+OskoAcGatHa+jnB2eicgLEc1jjLd7HtNnIjrYeEylWJ/zarWaVhJechIPdAoqwRgzq83+B7OK7xHyQVspAAAAAElFTkSuQmCC"},"0bbf":function(e,t,r){"use strict";var n=r("d844"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},"11f4":function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"155b":function(e,t,r){"use strict";var n=r("068e");function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e,t=new o((function(t){e=t}));return{token:t,cancel:e}},e.exports=o},"1eb2":function(e,t,r){"use strict";var n=r("c5b9");e.exports=function(e,t,r){var o=r.config.validateStatus;!o||o(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},"2ed0":function(e,t,r){"use strict";(function(t){var n=r("d844"),o=r("9d72"),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function s(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=r("a169")),e}var c={adapter:s(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(i)})),e.exports=c}).call(this,r("4362"))},"3ca3":function(e,t,r){"use strict";var n=r("6547").charAt,o=r("69f3"),i=r("7dd0"),a="String Iterator",s=o.set,c=o.getterFor(a);i(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=c(this),r=t.string,o=t.index;return o>=r.length?{value:void 0,done:!0}:(e=n(r,o),t.index+=e.length,{value:e,done:!1})}))},4127:function(e,t,r){"use strict";var n=r("d233"),o=r("b313"),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},c=function e(t,r,o,i,a,c,u,f,l,p,d,h){var m=t;if("function"===typeof u)m=u(r,m);else if(m instanceof Date)m=p(m);else if(null===m){if(i)return c&&!h?c(r,s.encoder):r;m=""}if("string"===typeof m||"number"===typeof m||"boolean"===typeof m||n.isBuffer(m)){if(c){var y=h?r:c(r,s.encoder);return[d(y)+"="+d(c(m,s.encoder))]}return[d(r)+"="+d(String(m))]}var g,v=[];if("undefined"===typeof m)return v;if(Array.isArray(u))g=u;else{var b=Object.keys(m);g=f?b.sort(f):b}for(var w=0;w<g.length;++w){var A=g[w];a&&null===m[A]||(v=Array.isArray(m)?v.concat(e(m[A],o(r,A),o,i,a,c,u,f,l,p,d,h)):v.concat(e(m[A],r+(l?"."+A:"["+A+"]"),o,i,a,c,u,f,l,p,d,h)))}return v};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!==typeof a.encoder)throw new TypeError("Encoder has to be a function.");var u="undefined"===typeof a.delimiter?s.delimiter:a.delimiter,f="boolean"===typeof a.strictNullHandling?a.strictNullHandling:s.strictNullHandling,l="boolean"===typeof a.skipNulls?a.skipNulls:s.skipNulls,p="boolean"===typeof a.encode?a.encode:s.encode,d="function"===typeof a.encoder?a.encoder:s.encoder,h="function"===typeof a.sort?a.sort:null,m="undefined"!==typeof a.allowDots&&a.allowDots,y="function"===typeof a.serializeDate?a.serializeDate:s.serializeDate,g="boolean"===typeof a.encodeValuesOnly?a.encodeValuesOnly:s.encodeValuesOnly;if("undefined"===typeof a.format)a.format=o["default"];else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var v,b,w=o.formatters[a.format];"function"===typeof a.filter?(b=a.filter,r=b("",r)):Array.isArray(a.filter)&&(b=a.filter,v=b);var A,x=[];if("object"!==typeof r||null===r)return"";A=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var j=i[A];v||(v=Object.keys(r)),h&&v.sort(h);for(var S=0;S<v.length;++S){var O=v[S];l&&null===r[O]||(x=x.concat(c(r[O],O,j,f,l,p?d:null,b,h,m,y,w,g)))}var C=x.join(u),E=!0===a.addQueryPrefix?"?":"";return C.length>0?E+C:""}},4328:function(e,t,r){"use strict";var n=r("4127"),o=r("9e6a"),i=r("b313");e.exports={formats:i,parse:o,stringify:n}},4362:function(e,t,r){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,n="/";t.cwd=function(){return n},t.chdir=function(t){e||(e=r("df7c")),n=e.resolve(t,n)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"43d9":function(e,t,r){"use strict";var n=r("d844"),o=r("faf0"),i=r("4a67"),a=r("c9ba"),s=r("2ed0");function c(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=c(s);u.Axios=i,u.create=function(e){return c(a(u.defaults,e))},u.Cancel=r("068e"),u.CancelToken=r("155b"),u.isCancel=r("11f4"),u.all=function(e){return Promise.all(e)},u.spread=r("53f3"),e.exports=u,e.exports.default=u},"4a67":function(e,t,r){"use strict";var n=r("d844"),o=r("050d"),i=r("54b5"),a=r("c70f"),s=r("c9ba");function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=s(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],r=Promise.resolve(e);this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));while(t.length)r=r.then(t.shift(),t.shift());return r},c.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=c},"4df4":function(e,t,r){"use strict";var n=r("0366"),o=r("7b0b"),i=r("9bdd"),a=r("e95a"),s=r("50c4"),c=r("8418"),u=r("35a1");e.exports=function(e){var t,r,f,l,p,d,h=o(e),m="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,v=void 0!==g,b=u(h),w=0;if(v&&(g=n(g,y>2?arguments[2]:void 0,2)),void 0==b||m==Array&&a(b))for(t=s(h.length),r=new m(t);t>w;w++)d=v?g(h[w],w):h[w],c(r,w,d);else for(l=b.call(h),p=l.next,r=new m;!(f=p.call(l)).done;w++)d=v?i(l,g,[f.value,w],!0):f.value,c(r,w,d);return r.length=w,r}},"4f37":function(e,t,r){"use strict";var n=r("ca19"),o=r("c4e8");e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},"53f3":function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"54b5":function(e,t,r){"use strict";var n=r("d844");function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},"82ae":function(e,t,r){e.exports=r("43d9")},"83fe":function(e,t,r){"use strict";var n=r("d844");e.exports=n.isStandardBrowserEnv()?function(){return{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"9d72":function(e,t,r){"use strict";var n=r("d844");e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},"9e6a":function(e,t,r){"use strict";var n=r("d233"),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=n.split(t.delimiter,a),c=0;c<s.length;++c){var u,f,l=s[c],p=l.indexOf("]="),d=-1===p?l.indexOf("="):p+1;-1===d?(u=t.decoder(l,i.decoder),f=t.strictNullHandling?null:""):(u=t.decoder(l.slice(0,d),i.decoder),f=t.decoder(l.slice(d+1),i.decoder)),o.call(r,u)?r[u]=[].concat(r[u]).concat(f):r[u]=f}return r},s=function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a)i=[],i=i.concat(n);else{i=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(s,10);!isNaN(c)&&a!==s&&String(c)===s&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(i=[],i[c]=n):i[s]=n}n=i}return n},c=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=i.exec(n),u=c?n.slice(0,c.index):n,f=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;f.push(u)}var l=0;while(null!==(c=a.exec(n))&&l<r.depth){if(l+=1,!r.plainObjects&&o.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(c[1])}return c&&f.push("["+n.slice(c.index)+"]"),s(f,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!==typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"===typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"===typeof r.depth?r.depth:i.depth,r.arrayLimit="number"===typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"===typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"===typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"===typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"===typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"===typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"===typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var o="string"===typeof e?a(e,r):e,s=r.plainObjects?Object.create(null):{},u=Object.keys(o),f=0;f<u.length;++f){var l=u[f],p=c(l,o[l],r);s=n.merge(s,p,r)}return n.compact(s)}},a169:function(e,t,r){"use strict";var n=r("d844"),o=r("1eb2"),i=r("050d"),a=r("4f37"),s=r("0bbf"),c=r("edb4"),u=r("c5b9");e.exports=function(e){return new Promise((function(t,f){var l=e.data,p=e.headers;n.isFormData(l)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password||"";p.Authorization="Basic "+btoa(h+":"+m)}var y=a(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,n=e.responseType&&"text"!==e.responseType?d.response:d.responseText,i={data:n,status:d.status,statusText:d.statusText,headers:r,config:e,request:d};o(t,f,i),d=null}},d.onabort=function(){d&&(f(u("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){f(u("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),f(u(t,e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var g=r("83fe"),v=(e.withCredentials||c(y))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(p[e.xsrfHeaderName]=v)}if("setRequestHeader"in d&&n.forEach(p,(function(e,t){"undefined"===typeof l&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(b){if("json"!==e.responseType)throw b}"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),f(e),d=null)})),void 0===l&&(l=null),d.send(l)}))}},a417:function(e,t,r){"use strict";r("ac1f"),r("5319"),r("1276");var n=r("82ae"),o=r.n(n);t["a"]={websocket:function(e,t){var r=null;function n(){setTimeout((function(){r=null,("WebSocket"in window||"MozWebSocket"in window)&&(r=new WebSocket(e)),r.onerror=function(){n()},r.onopen=function(){r.onmessage=function(e){if(t)if(e.data)try{var n=JSON.parse(e.data);console.log(n,"=------------"),"0000"==n.status?t(n,r):(console.log(n,"=------------"),error&&error(n),1==this_.version?this_.$alert(n.msg,"System hints",{confirmButtonText:"Confirm"}):this_.$alert(n.msg,"系统提示",{confirmButtonText:"确认"})),n.data.status}catch(o){console.log(o)}else t()},window.onbeforeunload=function(){return r.close()}}}),1e3),console.log("error")}return("WebSocket"in window||"MozWebSocket"in window)&&(r=new WebSocket(e)),r.onerror=function(){n()},r.onopen=function(){r.onmessage=function(e){if(t)if(e.data)try{t(e.data,r)}catch(n){console.log(n)}else t()},window.onbeforeunload=function(){return r.close()}},r},websocket1:function(e,t,r,n){console.log(e),e="https:"==window.location.protocol?e.replace("wss","wss"):e.replace("wss","ws");var o=null;function i(){setTimeout((function(){o=null,("WebSocket"in window||"MozWebSocket"in window)&&(o=new WebSocket(e)),o.onerror=function(){i()},o.onopen=function(){o.onmessage=function(e){if(t)if(e.data)try{var i=JSON.parse(e.data);console.log(i,"=------------"),"0000"==i.status?t(i,o):(console.log(i,"=------------"),r&&r(i),1==n.version?n.$alert(i.msg,"System hints",{confirmButtonText:"Confirm"}):n.$alert(i.msg,"系统提示",{confirmButtonText:"确认"})),i.data.status}catch(a){console.log(a)}else t()},window.onbeforeunload=function(){return o.close()}}}),1e3),console.log("error")}return("WebSocket"in window||"MozWebSocket"in window)&&(o=new WebSocket(e)),o.onerror=function(){i()},o.onopen=function(){o.onmessage=function(e){if(t)if(e.data)try{var i=JSON.parse(e.data);console.log(i,"=------------"),"0000"==i.status?t(i,o):(console.log(i,"=------------"),r&&r(i),1==n.version?n.$alert(i.msg,"System hints",{confirmButtonText:"Confirm"}):n.$alert(i.msg,"系统提示",{confirmButtonText:"确认"})),i.data.status}catch(a){console.log(a)}else t()},window.onbeforeunload=function(){return o.close()}},o},ajax_get:function(e,t,r,n){t=Object.assign({version:n.version},t),o.a.get(e,{params:t}).then((function(e){var t=e.data;if(t=Object.assign({version:n.version},t),t.result){if(r)if(t.model&&JSON.stringify(t.model).length>2)try{r(t.model)}catch(o){}else r(t.model)}else n.$alert(t.message,"系统提示")}))},ajax_post:function(e,t,n,i,a,s,c){var u=r("4328");t=Object.assign({version:a.version},t),o.a.post(e,u.stringify(t),{params:n}).then((function(t){var r=t.data;if("0000"==r.status)i&&i(r,a);else if(s&&s(r,a),!c){var n=window.location.href.split("/")[2];if("localhost:8081"==n&&(n="newtest.solar-iot.com"),e!="http://"+n+"/api/device/lampcontrol/turnonoff"&&e!="http://"+n+"/api/device/lampcontrol/load_setting"&&e!="http://"+n+"/api/device/lampcontrol/set_load"&&e!="http://"+n+"/api/device/lampcontrol/battery_setting"&&e!="http://"+n+"/api/device/lampcontrol/set_battery"){if("0001"==r.status||"0002"==r.status||"0003"==r.status||"0004"==r.status||"0102"==r.status){var o=window.localStorage;o.setItem("UserInformation","false"),o.setItem("loginState","false"),window.location.href="login.html"}1==a.version?a.$alert(r.msg,"System hints",{confirmButtonText:"Confirm"}):a.$alert(r.msg,"系统提示",{confirmButtonText:"确定"})}}}))},ajax_post3:function(e,t,n,i,a,s,c){var u=r("4328");t=Object.assign({version:a.version},t),o.a.post(e,u.stringify(t),{params:n}).then((function(t){var r=t.data;if("0000"==r.status)i&&i(r,a);else if(s&&s(r,a),!c){var n=window.location.href.split("/")[2];if("localhost:8081"==n&&(n="newtest.solar-iot.com"),e!="http://"+n+"/api/device/lampcontrol/turnonoff"&&e!="http://"+n+"/api/device/lampcontrol/load_setting"&&e!="http://"+n+"/api/device/lampcontrol/set_load"&&e!="http://"+n+"/api/device/lampcontrol/battery_setting"&&e!="http://"+n+"/api/device/lampcontrol/set_battery"){if("0001"==r.status||"0002"==r.status||"0003"==r.status||"0004"==r.status||"0102"==r.status){var o=window.localStorage;o.setItem("UserInformation","false"),o.setItem("loginState","false"),window.location.href="login.html"}1==a.version?a.$alert(r.msg,"System hints",{confirmButtonText:"Confirm"}):a.$alert(r.msg,"系统提示",{confirmButtonText:"确定"})}}}))},ajax_post2:function(e,t,n,i,a){var s=r("4328");t=Object.assign({version:a.version},t),o.a.post(e,s.stringify(t),{params:n}).then((function(e){var t=e.data;if(t.result){if(i)if(t.model&&JSON.stringify(t.model).length>2)try{i(t)}catch(r){}else i(t.message,a)}else a.$alert(t.message,"系统提示")}))},ajax_postAction:function(e,t,n,i,a){var s=r("4328");t=Object.assign({version:a.version},t),o.a.post(e,s.stringify(t),{params:n}).then((function(e){var t=e.data;if(t.result)try{i(t.message)}catch(r){}else a.$alert(t.message,"系统提示")}))},ajax_post1:function(e,t,r,n,i){t=Object.assign({version:i.version},t),o.a.post(e,t,{params:r}).then((function(e){var t=e.data;if(t.result){if(n)if(t.model&&JSON.stringify(t.model).length>2)try{n(t.model)}catch(r){}else n(t.message,i)}else i.$alert(t.message,"系统提示")}))},ajax_post_ws:function(e,t,n){var i=r("4328");t=Object.assign({version:n.version},t),o.a.post(e,i.stringify(t),{params:{}}).then((function(e){console.log(e)}))},ajax_weather:function(e,t,r,n){o.a.get(e,{params:t}).then((function(e){var t=e.data;console.log(t,"----------"),"ok"==t.HeWeather6[0].status?r&&r(t.HeWeather6[0]):n.$alert("获取天气信息失败","系统提示")}))}}},a434:function(e,t,r){"use strict";var n=r("23e7"),o=r("23cb"),i=r("a691"),a=r("50c4"),s=r("7b0b"),c=r("65f0"),u=r("8418"),f=r("1dde"),l=r("ae40"),p=f("splice"),d=l("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,m=Math.min,y=9007199254740991,g="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!p||!d},{splice:function(e,t){var r,n,f,l,p,d,v=s(this),b=a(v.length),w=o(e,b),A=arguments.length;if(0===A?r=n=0:1===A?(r=0,n=b-w):(r=A-2,n=m(h(i(t),0),b-w)),b+r-n>y)throw TypeError(g);for(f=c(v,n),l=0;l<n;l++)p=w+l,p in v&&u(f,l,v[p]);if(f.length=n,r<n){for(l=w;l<b-n;l++)p=l+n,d=l+r,p in v?v[d]=v[p]:delete v[d];for(l=b;l>b-n+r;l--)delete v[l-1]}else if(r>n)for(l=b-n;l>w;l--)p=l+n-1,d=l+r-1,p in v?v[d]=v[p]:delete v[d];for(l=0;l<r;l++)v[l+w]=arguments[l+2];return v.length=b-n+r,f}})},a630:function(e,t,r){var n=r("23e7"),o=r("4df4"),i=r("1c7e"),a=!i((function(e){Array.from(e)}));n({target:"Array",stat:!0,forced:a},{from:o})},b0c0:function(e,t,r){var n=r("83ab"),o=r("9bf2").f,i=Function.prototype,a=i.toString,s=/^\s*function ([^ (]*)/,c="name";n&&!(c in i)&&o(i,c,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(error){return""}}})},b313:function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},b85c:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));r("a4d3"),r("e01a"),r("d28b"),r("e260"),r("d3b7"),r("3ca3"),r("ddb0"),r("a630"),r("fb6a"),r("b0c0"),r("25f0");function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function i(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r["return"]||r["return"]()}finally{if(c)throw a}}}}},bd2a:function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},c4e8:function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},c5b9:function(e,t,r){"use strict";var n=r("bd2a");e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},c70f:function(e,t,r){"use strict";var n=r("d844"),o=r("04a7"),i=r("11f4"),a=r("2ed0");function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},c975:function(e,t,r){"use strict";var n=r("23e7"),o=r("4d64").indexOf,i=r("a640"),a=r("ae40"),s=[].indexOf,c=!!s&&1/[1].indexOf(1,-0)<0,u=i("indexOf"),f=a("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:c||!u||!f},{indexOf:function(e){return c?s.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},c9ba:function(e,t,r){"use strict";var n=r("d844");e.exports=function(e,t){t=t||{};var r={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(o,(function(e){"undefined"!==typeof t[e]&&(r[e]=t[e])})),n.forEach(i,(function(o){n.isObject(t[o])?r[o]=n.deepMerge(e[o],t[o]):"undefined"!==typeof t[o]?r[o]=t[o]:n.isObject(e[o])?r[o]=n.deepMerge(e[o]):"undefined"!==typeof e[o]&&(r[o]=e[o])})),n.forEach(a,(function(n){"undefined"!==typeof t[n]?r[n]=t[n]:"undefined"!==typeof e[n]&&(r[n]=e[n])}));var s=o.concat(i).concat(a),c=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return n.forEach(c,(function(n){"undefined"!==typeof t[n]?r[n]=t[n]:"undefined"!==typeof e[n]&&(r[n]=e[n])})),r}},ca19:function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},d233:function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),i=function(e){var t;while(e.length){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)"undefined"!==typeof t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t},a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!==typeof e[n]&&(r[n]=e[n]);return r},s=function e(t,r,o){if(!r)return t;if("object"!==typeof r){if(Array.isArray(t))t.push(r);else{if("object"!==typeof t)return[t,r];(o.plainObjects||o.allowPrototypes||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!==typeof t)return[t].concat(r);var i=t;return Array.isArray(t)&&!Array.isArray(r)&&(i=a(t,o)),Array.isArray(t)&&Array.isArray(r)?(r.forEach((function(r,i){n.call(t,i)?t[i]&&"object"===typeof t[i]?t[i]=e(t[i],r,o):t.push(r):t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return n.call(t,i)?t[i]=e(t[i],a,o):t[i]=a,t}),i)},c=function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},u=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},f=function(e){if(0===e.length)return e;for(var t="string"===typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},l=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],f=a[u];"object"===typeof f&&null!==f&&-1===r.indexOf(f)&&(t.push({obj:a,prop:u}),r.push(f))}return i(t)},p=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},d=function(e){return null!==e&&"undefined"!==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))};e.exports={arrayToObject:a,assign:c,compact:l,decode:u,encode:f,isBuffer:d,isRegExp:p,merge:s}},d28b:function(e,t,r){var n=r("746f");n("iterator")},d81d:function(e,t,r){"use strict";var n=r("23e7"),o=r("b727").map,i=r("1dde"),a=r("ae40"),s=i("map"),c=a("map");n({target:"Array",proto:!0,forced:!s||!c},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},d844:function(e,t,r){"use strict";var n=r("faf0"),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function c(e){return"[object ArrayBuffer]"===o.call(e)}function u(e){return"undefined"!==typeof FormData&&e instanceof FormData}function f(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function l(e){return"string"===typeof e}function p(e){return"number"===typeof e}function d(e){return null!==e&&"object"===typeof e}function h(e){return"[object Date]"===o.call(e)}function m(e){return"[object File]"===o.call(e)}function y(e){return"[object Blob]"===o.call(e)}function g(e){return"[object Function]"===o.call(e)}function v(e){return d(e)&&g(e.pipe)}function b(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function A(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function x(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function j(){var e={};function t(t,r){"object"===typeof e[r]&&"object"===typeof t?e[r]=j(e[r],t):e[r]=t}for(var r=0,n=arguments.length;r<n;r++)x(arguments[r],t);return e}function S(){var e={};function t(t,r){"object"===typeof e[r]&&"object"===typeof t?e[r]=S(e[r],t):e[r]="object"===typeof t?S({},t):t}for(var r=0,n=arguments.length;r<n;r++)x(arguments[r],t);return e}function O(e,t,r){return x(t,(function(t,o){e[o]=r&&"function"===typeof t?n(t,r):t})),e}e.exports={isArray:i,isArrayBuffer:c,isBuffer:s,isFormData:u,isArrayBufferView:f,isString:l,isNumber:p,isObject:d,isUndefined:a,isDate:h,isFile:m,isBlob:y,isFunction:g,isStream:v,isURLSearchParams:b,isStandardBrowserEnv:A,forEach:x,merge:j,deepMerge:S,extend:O,trim:w}},ddb0:function(e,t,r){var n=r("da84"),o=r("fdbc"),i=r("e260"),a=r("9112"),s=r("b622"),c=s("iterator"),u=s("toStringTag"),f=i.values;for(var l in o){var p=n[l],d=p&&p.prototype;if(d){if(d[c]!==f)try{a(d,c,f)}catch(error){d[c]=f}if(d[u]||a(d,u,l),o[l])for(var h in i)if(d[h]!==i[h])try{a(d,h,i[h])}catch(error){d[h]=i[h]}}}},df7c:function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e){"string"!==typeof e&&(e+="");var t,r=0,n=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){r=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":e.slice(r,n)}function o(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}t.resolve=function(){for(var t="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,n="/"===a.charAt(0))}return t=r(o(t.split("/"),(function(e){return!!e})),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),a="/"===i(e,-1);return e=r(o(e.split("/"),(function(e){return!!e})),!n).join("/"),e||n||(e="."),e&&a&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var r=e.length-1;r>=0;r--)if(""!==e[r])break;return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var o=n(e.split("/")),i=n(r.split("/")),a=Math.min(o.length,i.length),s=a,c=0;c<a;c++)if(o[c]!==i[c]){s=c;break}var u=[];for(c=s;c<o.length;c++)u.push("..");return u=u.concat(i.slice(s)),u.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),47===t){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var r=n(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,r=0,n=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===n&&(o=!1,n=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){r=a+1;break}}return-1===t||-1===n||0===i||1===i&&t===n-1&&t===r+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r("4362"))},e01a:function(e,t,r){"use strict";var n=r("23e7"),o=r("83ab"),i=r("da84"),a=r("5135"),s=r("861d"),c=r("9bf2").f,u=r("e893"),f=i.Symbol;if(o&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var l={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new f(e):void 0===e?f():f(e);return""===e&&(l[t]=!0),t};u(p,f);var d=p.prototype=f.prototype;d.constructor=p;var h=d.toString,m="Symbol(test)"==String(f("test")),y=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(l,e))return"";var r=m?t.slice(7,-1):t.replace(y,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:p})}},edb4:function(e,t,r){"use strict";var n=r("d844");e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return function(){return!0}}()},faf0:function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},fb6a:function(e,t,r){"use strict";var n=r("23e7"),o=r("861d"),i=r("e8b5"),a=r("23cb"),s=r("50c4"),c=r("fc6a"),u=r("8418"),f=r("b622"),l=r("1dde"),p=r("ae40"),d=l("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),m=f("species"),y=[].slice,g=Math.max;n({target:"Array",proto:!0,forced:!d||!h},{slice:function(e,t){var r,n,f,l=c(this),p=s(l.length),d=a(e,p),h=a(void 0===t?p:t,p);if(i(l)&&(r=l.constructor,"function"!=typeof r||r!==Array&&!i(r.prototype)?o(r)&&(r=r[m],null===r&&(r=void 0)):r=void 0,r===Array||void 0===r))return y.call(l,d,h);for(n=new(void 0===r?Array:r)(g(h-d,0)),f=0;d<h;d++,f++)d in l&&u(n,f,l[d]);return n.length=f,n}})}}]);
- //# sourceMappingURL=chunk-f2a89e68.98dc6402.js.map
|