1234567 |
- import{x as e,y as t,r as n,z as o,A as r,B as i,C as s,D as c,E as a,F as l,G as u,H as f,I as d,J as h,K as g,L as p,M as v,N as y,O as b,P as m,Q as S,R as C,S as x,T as _,U as P,V as T,W as w,X as O,Y as A,s as k,Z as j,_ as F,$ as N,a0 as I,a1 as $,a2 as E}from"./index-9f997484.js";
- /*!
- * pinia v2.0.33
- * (c) 2023 Eduardo San Martin Morote
- * @license MIT
- */let Y;const M=e=>Y=e,D=Symbol();function L(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var R,V;(V=R||(R={})).direct="direct",V.patchObject="patch object",V.patchFunction="patch function";const z=()=>{};function B(e,t,n,o=z){e.push(t);const r=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),o())};return!n&&f()&&d(r),r}function J(e,...t){e.slice().forEach((e=>{e(...t)}))}function U(e,t){e instanceof Map&&t instanceof Map&&t.forEach(((t,n)=>e.set(n,t))),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];L(r)&&L(o)&&e.hasOwnProperty(n)&&!s(o)&&!c(o)?e[n]=U(r,o):e[n]=o}return e}const G=Symbol();const{assign:H}=Object;function K(e,l,f={},d,h,g){let p;const v=H({actions:{}},f),y={deep:!0};let b,m,S,C=t([]),x=t([]);const _=d.state.value[e];let P;function T(t){let n;b=m=!1,"function"==typeof t?(t(d.state.value[e]),n={type:R.patchFunction,storeId:e,events:S}):(U(d.state.value[e],t),n={type:R.patchObject,payload:t,storeId:e,events:S});const o=P=Symbol();u().then((()=>{P===o&&(b=!0)})),m=!0,J(C,n,d.state.value[e])}g||_||(d.state.value[e]={}),n({});const w=g?function(){const{state:e}=f,t=e?e():{};this.$patch((e=>{H(e,t)}))}:z;function O(t,n){return function(){M(d);const o=Array.from(arguments),r=[],i=[];let s;J(x,{args:o,name:t,store:k,after:function(e){r.push(e)},onError:function(e){i.push(e)}});try{s=n.apply(this&&this.$id===e?this:k,o)}catch(c){throw J(i,c),c}return s instanceof Promise?s.then((e=>(J(r,e),e))).catch((e=>(J(i,e),Promise.reject(e)))):(J(r,s),s)}}const A={_p:d,$id:e,$onAction:B.bind(null,x),$patch:T,$reset:w,$subscribe(t,n={}){const r=B(C,t,n.detached,(()=>i())),i=p.run((()=>o((()=>d.state.value[e]),(o=>{("sync"===n.flush?m:b)&&t({storeId:e,type:R.direct,events:S},o)}),H({},y,n))));return r},$dispose:function(){p.stop(),C=[],x=[],d._s.delete(e)}},k=r(A);d._s.set(e,k);const j=d._e.run((()=>(p=i(),p.run((()=>l())))));for(const t in j){const n=j[t];if(s(n)&&(!s(N=n)||!N.effect)||c(n))g||(!_||L(F=n)&&F.hasOwnProperty(G)||(s(n)?n.value=_[t]:U(n,_[t])),d.state.value[e][t]=n);else if("function"==typeof n){const e=O(t,n);j[t]=e,v.actions[t]=n}}var F,N;return H(k,j),H(a(k),j),Object.defineProperty(k,"$state",{get:()=>d.state.value[e],set:e=>{T((t=>{H(t,e)}))}}),d._p.forEach((e=>{H(k,p.run((()=>e({store:k,app:d._a,pinia:d,options:v}))))})),_&&g&&f.hydrate&&f.hydrate(k.$state,_),b=!0,m=!0,k}const Z=function(n,o,r){let i,s;const c="function"==typeof o;function a(n,r){const a=l();(n=n||a&&e(D,null))&&M(n),(n=Y)._s.has(i)||(c?K(i,o,s,n):function(e,n,o,r){const{state:i,actions:s,getters:c}=n,a=o.state.value[e];let l;l=K(e,(function(){a||(o.state.value[e]=i?i():{});const n=h(o.state.value[e]);return H(n,s,Object.keys(c||{}).reduce(((n,r)=>(n[r]=t(g((()=>{M(o);const t=o._s.get(e);return c[r].call(t,t)}))),n)),{}))}),n,o,0,!0)}(i,s,n));return n._s.get(i)}return"string"==typeof n?(i=n,s=c?r:o):(s=n,i=n.id),a.$id=i,a}("scroll",{state:()=>({top:0}),actions:{setTop(e){this.top=e}}});var q={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t,n,o,r,i,s,c,a="",l=0;for(e=q._utf8_encode(e);l<e.length;)r=(t=e.charCodeAt(l++))>>2,i=(3&t)<<4|(n=e.charCodeAt(l++))>>4,s=(15&n)<<2|(o=e.charCodeAt(l++))>>6,c=63&o,isNaN(n)?s=c=64:isNaN(o)&&(c=64),a=a+this._keyStr.charAt(r)+this._keyStr.charAt(i)+this._keyStr.charAt(s)+this._keyStr.charAt(c);return a},decode:function(e){var t,n,o,r,i,s,c="",a=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");a<e.length;)t=this._keyStr.indexOf(e.charAt(a++))<<2|(r=this._keyStr.indexOf(e.charAt(a++)))>>4,n=(15&r)<<4|(i=this._keyStr.indexOf(e.charAt(a++)))>>2,o=(3&i)<<6|(s=this._keyStr.indexOf(e.charAt(a++))),c+=String.fromCharCode(t),64!=i&&(c+=String.fromCharCode(n)),64!=s&&(c+=String.fromCharCode(o));return c=q._utf8_decode(c)},_utf8_encode:function(e){e=e.replace(/rn/g,"n");for(var t="",n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8_decode:function(e){for(var t,n,o="",r=0,i=t=0;r<e.length;)(i=e.charCodeAt(r))<128?(o+=String.fromCharCode(i),r++):i>191&&i<224?(t=e.charCodeAt(r+1),o+=String.fromCharCode((31&i)<<6|63&t),r+=2):(t=e.charCodeAt(r+1),n=e.charCodeAt(r+2),o+=String.fromCharCode((15&i)<<12|(63&t)<<6|63&n),r+=3);return o}},Q="",W={getPrifix:function(e){return void 0===e&&(e=2),Q||(Q=p("prifix")||function(e){e=e||32;for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",n="",o=0;o<e;o++)n+=t.charAt(Math.floor(48*Math.random()));return n}(e)+"_",v("prifix",Q)),Q},set:function(e,t){v(this.getPrifix()+e,t)},get:function(e){return p(this.getPrifix()+e)},remove:function(e){return y(this.getPrifix()+e)},clear:function(){var e=this;b().keys.forEach((function(t){0==t.indexOf(e.getPrifix())&&y(t)}))}},X={arrayStringVal:function(e){for(var t in e)e[t]=String(e[t]);return e},parseString:function(e){return e||void 0===e||0==e?void 0===e?"":"number"==typeof e&&isNaN(e)?"0":e.toString():""}};var ee=globalThis&&globalThis.__assign||function(){return ee=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ee.apply(this,arguments)},te=globalThis&&globalThis.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{a(o.next(e))}catch(t){i(t)}}function c(e){try{a(o.throw(e))}catch(t){i(t)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,c)}a((o=o.apply(e,t||[])).next())}))},ne=globalThis&&globalThis.__generator||function(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,o=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){s=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){s.label=c[1];break}if(6===c[0]&&s.label<r[1]){s.label=r[1],r=c;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(c);break}r[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(a){c=[6,a],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}};const oe=[{label:"公网",value:"public"},{label:"内网",value:"inner"}],re=[{label:"固定公网单IP",value:"staticNetSingle",type:"1"},{label:"固定公网多IP",value:"staticNetCouple",type:"1"},{label:"服务器拨号",value:"serverDial",type:"1"},{label:"软路由",value:"virtualRoute",type:"1"},{label:"静态单IP",value:"1",type:"2"}],ie=[{label:"待审核",value:"bound",color:"#F33535",selected:0,css:"dot_error"},{label:"交付中",value:"waitAudit",color:"#F33535",selected:0,css:"dot_error"},{label:"验收未通过",value:"auditFailed",color:"#F33535",selected:0,css:"dot_error"},{label:"服务中",value:"inService",color:"#00af51",selected:0,css:"dot_success"},{label:"已下线",value:"offline",color:"#F33535",selected:0,css:"dot_warning"},{label:"已清退",value:"repelled",color:"#F33535",selected:0,css:"dot_warning"}],se=[{label:"汇聚资源",value:"aggregation"},{label:"专线资源",value:"dedicated"}],ce=[{label:"离线",value:"outline",selected:0,color:"#F33535",css:"dot_error"},{label:"在线",value:"online",selected:0,color:"#00af51",css:"dot_success"},{label:"网络异常",value:"error",selected:0,color:"#f0ad4e",css:"dot_warning"}],ae=[{label:"拨号失败",value:"failed"},{label:"已拨通",value:"succeed"}],le=[{label:"联网失败",value:"failed"},{label:"已联网",value:"succeed"}],ue={YcBase64:q,YcReg:{phone:function(e){return/^1[3456789]\d{9}$/.test(e)}},YcStorage:W,YcStringUtil:X,YcUniapp:{login:function(){return te(this,void 0,void 0,(function(){return ne(this,(function(e){return[2,new Promise((function(e,t){m({provider:"weixin",success:function(t){console.log(t.code),e(t)},fail:function(e){t(e)}})}))]}))}))},takePhoto:function(){return new Promise((function(e,t){S({scanType:["qrcode"],success:function(t){e(t.result)}})}))},copyText:function(e){return new Promise((function(t,n){C({data:e,success:function(){console.log("success"),t(!0)}})}))},previewImage:function(e,t){void 0===t&&(t=0),console.log("previewImage",e),x({urls:e,current:t,longPressActions:{itemList:["发送给朋友","保存图片","收藏"],success:function(e){console.log("选中了第"+(e.tapIndex+1)+"个按钮,第"+(e.index+1)+"张图片")},fail:function(e){console.log(e.errMsg)}}})},toast:function(e,t,n){return void 0===t&&(t=2e3),void 0===n&&(n="none"),new Promise((function(o,r){_({title:e,duration:t,icon:n,success:function(){o(!0)}})}))},hideKeyboard:function(e){return void 0===e&&(e=200),new Promise((function(){setTimeout((function(){P()}),e)}))},loading:function(e){void 0===e&&(e="加载中..."),T({title:e,mask:!0})},hideLoading:function(){w()},alert:function(e){return new Promise((function(t,n){O({content:e,showCancel:!1,success:function(){t(!0)}})}))},confirm:function(e,t){return te(this,void 0,void 0,(function(){return ne(this,(function(n){return[2,new Promise((function(n,o){O({title:e,content:t,success:function(e){e.confirm?(console.log("用户点击确定"),n(!0)):e.cancel&&(console.log("用户点击取消"),n(!1))}})}))]}))}))},simpleChooseImage:function(){return te(this,void 0,void 0,(function(){var e,t,n;return ne(this,(function(o){switch(o.label){case 0:return[4,(r=this.chooseImage(1),r.then((function(e){return[null,e]})).catch((function(e){return i&&Object.assign(e,i),[e,void 0]})))];case 1:return e=o.sent(),t=e[0],n=e[1],console.log("simpleChooseImage",t,n),[2,n.tempFilePaths[0]]}var r,i}))}))},chooseImage:function(e,t,n){return void 0===e&&(e=9),void 0===t&&(t=["compressed"]),new Promise((function(n,o){A({count:e,sizeType:t,sourceType:["album"],success:function(e){console.log(JSON.stringify(e.tempFilePaths)),n(e)}})}))},scanCode:function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=["qrCode","barCode"]),te(this,void 0,void 0,(function(){return ne(this,(function(n){return[2,new Promise((function(n,o){S({onlyFromCamera:e,scanType:t,success:function(e){n(ee({code:0},e))},fail:function(e){o(ee({code:999,msg:e.errMsg},e))}})}))]}))}))}},Yc:{getVersion:function(){return"@ycxxkj/uniapp v1.0.7"},delay:function(e){return new Promise((function(t,n){setTimeout((function(e){t(true)}),e)}))}}},fe={SUCCESS_CODE:0,setTitle:(e="核销端")=>{k({title:e})},getVersion:()=>"copyright © 1.0.3",switch(e){j({url:e})},goBack(e=1){F({delta:e})},goto:e=>{console.log("#debug#🚀 ~ file: Page.ts:30 ~ goto url:",e),N({url:e})},relauch(e){I({url:e})},redirect(e){$({url:e})},isLogin:()=>!!ue.YcStorage.get("token"),onPageScroll(e){Z().setTop(e.scrollTop);let t=E();t[t.length-1].$vm.scrollTop=e.scrollTop},test(){console.log("onLoad yc is",ue)},showVal:(e,t="-",n="")=>e||0===e||"0"===e?e+n:t,priceFormat(e){let t=Number(e);return isNaN(t)&&(t=0),(t/100).toFixed(2)},deviceHelper:{getConnectStatusText(e){return this.getText(le,e)},getDialStatusText(e){return this.getText(ae,e)},getOnlineStatusText(e){return this.getText(ce,e)},getStateText(e){return this.getText(ie,e)},getResourceTypeText(e){return this.getText(se,e)},getDialTypeText(e){return this.getText(re,e)},getNatTypeText(e){return this.getText(oe,e)},getText(e,t,n="label"){let o="";return e.forEach((e=>{e.value!==t||(o=e[n])})),o.trim()}},...ue};console.log("#debug#🚀 ~ file: Page.ts:81 ~ Page.url:",fe.url),console.log("#debug#🚀 ~ file: Page.ts:81 ~ Page.url:",fe.url),console.log("#debug#🚀 ~ file: Page.ts:81 ~ Page.url:",fe.url);export{fe as P};
|