Files
SmartParks_visitore/unpackage/resources/__UNI__B35533A/www/app-service.js

8 lines
207 KiB
JavaScript
Raw Normal View History

2025-08-21 11:23:54 +08:00
(this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"00ba":function(t,e,r){"use strict";(function(t){var n=r("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r("4ed0")),a=n(r("e92f")),o={components:{uvQrcode:a.default},data:function(){return{info:{deviceCode:"DEVICE-123456",qrCodeId:(0,i.default)(1e5,999999),userAccount:""},value:"12345",qrCodeTimestamp:0,expiryTime:3e5,remainingTime:3e5,countdownInterval:null,qrCodeStatus:"generating",connectionState:"connecting",isLoading:!1,isClosing:!1,isGenerating:!1,sseEnable:!0,clientId:"dab457a1ea14411787c240db05bb0832",showPopup:!1,popupMessage:"",popupType:"info",popupIcon:"fa-info-circle",popupTimer:null}},onLoad:function(){var t=uni.getStorageSync("userInfo")||{};this.info.userAccount=t.account||"user@example.com",this.generateQrCode()},methods:{generateQrCode:function(){var e=this;this.isLoading=!0,this.qrCodeStatus="generating",this.isGenerating=!0,this.$u.api.getcode(this.info).then((function(r){t("log","\u4e8c\u7ef4\u7801\u751f\u6210\u6210\u529f",r," at pages/sys/qrpage/qrpage.vue:249"),e.value="http://183.230.235.66:11010/visitore?code="+r.msg,e.qrCodeTimestamp=Date.now(),e.qrCodeStatus="active"})).catch((function(r){t("error","\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25",r," at pages/sys/qrpage/qrpage.vue:259"),e.showPopupMessage("\u4e8c\u7ef4\u7801\u751f\u6210\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5","error","fa-exclamation-circle"),e.qrCodeStatus="closing"})).finally((function(){e.isLoading=!1,e.isGenerating=!1}))},closeCurrentQrCode:function(){var e=this;this.isClosing||"active"!==this.qrCodeStatus||(this.qrCodeStatus="closing",this.isClosing=!0,t("log","\u5173\u95ed\u4e8c\u7ef4\u7801: ".concat(this.info.qrCodeId)," at pages/sys/qrpage/qrpage.vue:305"),setTimeout((function(){e.isClosing=!1,e.info.qrCodeId=(0,i.default)(1e5,999999),e.generateQrCode()}),1e3))},manualRefresh:function(){this.closeCurrentQrCode()},showPopupMessage:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"fa-info-circle";this.clearPopupTimer(),this.popupMessage=t,this.popupType=r,this.popupIcon=n,this.showPopup=!0,this.popupTimer=setTimeout((function(){return e.closePopup()}),3e3)},closePopup:function(){this.showPopup=!1,this.clearPopupTimer()},clearPopupTimer:function(){this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)},getStatusText:function(){switch(this.qrCodeStatus){case"generating":return"\u6b63\u5728\u751f\u6210\u4e8c\u7ef4\u7801...";case"active":return"\u4e8c\u7ef4\u7801\u6709\u6548\uff0c\u7b49\u5f85\u626b\u63cf";case"closing":return"\u4e8c\u7ef4\u7801\u5df2\u5173\u95ed\uff0c\u751f\u6210\u65b0\u7801\u4e2d...";default:return"\u672a\u77e5\u72b6\u6001"}},formatTime:function(t){if(!t)return"";var e=new Date(t);return[e.getFullYear(),this.padZero(e.getMonth()+1),this.padZero(e.getDate())].join("-")+" "+[this.padZero(e.getHours()),this.padZero(e.getMinutes()),this.padZero(e.getSeconds())].join(":")},formatCountdown:function(t){var e=Math.floor(t/1e3),r=this.padZero(Math.floor(e/60)),n=this.padZero(e%60);return"".concat(r,":").concat(n)},padZero:function(t){return t<10?"0"+t:t}}};e.default=o}).call(this,r("f3b9")["default"])},"0bdb":function(t,e,r){var n=r("d551");function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}t.exports=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports["default"]=t.exports},"0ee4":function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},"106f":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?argu
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/
function(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:n});else{var r=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,r.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(l))}d.state.get=function(){return this._vm._data.$$state},d.state.set=function(t){0},f.prototype.commit=function(t,e,r){var n=this,i=_(t,e,r),a=i.type,o=i.payload,s=(i.options,{type:a,payload:o}),u=this._mutations[a];u&&(this._withCommit((function(){u.forEach((function(t){t(o)}))})),this._subscribers.slice().forEach((function(t){return t(s,n.state)})))},f.prototype.dispatch=function(t,e){var r=this,n=_(t,e),i=n.type,a=n.payload,o={type:i,payload:a},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(o,r.state)}))}catch(c){0}var u=s.length>1?Promise.all(s.map((function(t){return t(a)}))):s[0](a);return new Promise((function(t,e){u.then((function(e){try{r._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(o,r.state)}))}catch(c){0}t(e)}),(function(t){try{r._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(o,r.state,t)}))}catch(c){0}e(t)}))}))}},f.prototype.subscribe=function(t,e){return h(t,this._subscribers,e)},f.prototype.subscribeAction=function(t,e){var r="function"===typeof t?{before:t}:t;return h(r,this._actionSubscribers,e)},f.prototype.watch=function(t,e,r){var n=this;return this._watcherVM.$watch((function(){return t(n.state,n.getters)}),e,r)},f.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},f.prototype.registerModule=function(t,e,r){void 0===r&&(r={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),g(this,this.state,t,this._modules.get(t),r.preserveState),v(this,this.state)},f.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var r=m(e.state,t.slice(0,-1));l.delete(r,t[t.length-1])})),p(this)},f.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},f.prototype[[104,111,116,85,112,100,97,116,101].map((function(t){return String.fromCharCode(t)})).join("")]=function(t){this._modules.update(t),p(this,!0)},f.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(f.prototype,d);var y=x((function(t,e){var r={};return k(e).forEach((function(e){var n=e.key,i=e.val;r[n]=function(){var e=this.$store.state,r=this.$store.getters;if(t){var n=P(this.$store,"mapState",t);if(!n)return;e=n.context.state,r=n.context.getters}return"function"===typeof i?i.call(this,e,r):e[i]},r[n].vuex=!0})),r})),w=x((function(t,e){var r={};return k(e).forEach((function(e){var n=e.key,i=e.val;r[n]=function(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];var n=this.$store.commit;if(t){var a=P(this.$store,"mapMutations",t);if(!a)return;n=a.context.commit}return"function"===typeof i?i.apply(this,[n].concat(e)):n.apply(this.$store,[i].concat(e))}})),r})),C=x((function(t,e){var r={};return k(e).forEach((function(e){var n=e.key,i=e.val;i=t+i,r[n]=function(){if(!t||P(this.$store,"mapGetters",t))return this.$store.getters[i]},r[n].vuex=!0})),r})),$=x((function(t,e){var r={};return k(e).forEach((function(e){var n=e.key,i=e.val;r[n]=function(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];var n=this.$store.dispatch;if(t){var a=P(this.$store,"mapActions",t);if(!a)return;n=a.context.dispatch}return"function"===typeof i?i.apply(this,[n].concat(e)):n.apply(this.$store,[i].concat(e))}})),r}));function k(t){return function(t){return Array.isArray(t)||o(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function x(t){return function(e,r){return"string"!==typeof e?(r=e,e=""):"/"!==e.ch
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports["default"]=t.exports;var e,r={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(e){d=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),o=new j(n||[]);return s(a,"_invoke",{value:S(t,r,o)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var v="suspendedStart",g="executing",m="completed",_={};function b(){}function y(){}function w(){}var C={};d(C,c,(function(){return this}));var $=Object.getPrototypeOf,k=$&&$($(I([])));k&&k!==a&&o.call(k,c)&&(C=k);var x=w.prototype=b.prototype=Object.create(C);function P(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(i,a,s,u){var c=p(t[i],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}})}function S(t,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=T(s,n);if(u){if(u===_)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var c=p(t,r,n);if("normal"===c.type){if(i=n.done?m:"suspendedYield",c.arg===_)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var a=p(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,_;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,_):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,_)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return y.prototype=w,s(x,"constructor",{value:w,configurable:!0}),s(w,"constructor",{value:y,configurable:!0}),y.displayName=d(w,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,d(t,f,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},P(O.prototype),d(O.prototype,l,(function(){return this})),r.AsyncIterator=O,r.async=functi