Page.692802d8.js 12 KB

1234567
  1. import{A as e,B as t,r as n,C as o,D as r,E as s,F as a,G as c,H as i,I as l,J as u,K as f,L as d,M as h,N as g,O as p,P as v,Q as b,R as y,S as m,T as S,U as C,V as _,W as x,X as P,Y as T,Z as w,_ as O,$ as A,s as k,a0 as j,a1 as F,a2 as N,a3 as I,a4 as $,a5 as E}from"./index-22fb332c.js";const Y=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};
  2. /*!
  3. * pinia v2.0.33
  4. * (c) 2023 Eduardo San Martin Morote
  5. * @license MIT
  6. */let M;const D=e=>M=e,L=Symbol();function R(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var U,V;(V=U||(U={})).direct="direct",V.patchObject="patch object",V.patchFunction="patch function";const B=()=>{};function J(e,t,n,o=B){e.push(t);const r=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),o())};return!n&&f()&&d(r),r}function z(e,...t){e.slice().forEach((e=>{e(...t)}))}function G(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];R(r)&&R(o)&&e.hasOwnProperty(n)&&!a(o)&&!c(o)?e[n]=G(r,o):e[n]=o}return e}const H=Symbol();const{assign:K}=Object;function Z(e,l,f={},d,h,g){let p;const v=K({actions:{}},f),b={deep:!0};let y,m,S,C=t([]),_=t([]);const x=d.state.value[e];let P;function T(t){let n;y=m=!1,"function"==typeof t?(t(d.state.value[e]),n={type:U.patchFunction,storeId:e,events:S}):(G(d.state.value[e],t),n={type:U.patchObject,payload:t,storeId:e,events:S});const o=P=Symbol();u().then((()=>{P===o&&(y=!0)})),m=!0,z(C,n,d.state.value[e])}g||x||(d.state.value[e]={}),n({});const w=g?function(){const{state:e}=f,t=e?e():{};this.$patch((e=>{K(e,t)}))}:B;function O(t,n){return function(){D(d);const o=Array.from(arguments),r=[],s=[];let a;z(_,{args:o,name:t,store:k,after:function(e){r.push(e)},onError:function(e){s.push(e)}});try{a=n.apply(this&&this.$id===e?this:k,o)}catch(c){throw z(s,c),c}return a instanceof Promise?a.then((e=>(z(r,e),e))).catch((e=>(z(s,e),Promise.reject(e)))):(z(r,a),a)}}const A={_p:d,$id:e,$onAction:J.bind(null,_),$patch:T,$reset:w,$subscribe(t,n={}){const r=J(C,t,n.detached,(()=>s())),s=p.run((()=>o((()=>d.state.value[e]),(o=>{("sync"===n.flush?m:y)&&t({storeId:e,type:U.direct,events:S},o)}),K({},b,n))));return r},$dispose:function(){p.stop(),C=[],_=[],d._s.delete(e)}},k=r(A);d._s.set(e,k);const j=d._e.run((()=>(p=s(),p.run((()=>l())))));for(const t in j){const n=j[t];if(a(n)&&(!a(N=n)||!N.effect)||c(n))g||(!x||R(F=n)&&F.hasOwnProperty(H)||(a(n)?n.value=x[t]:G(n,x[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 K(k,j),K(i(k),j),Object.defineProperty(k,"$state",{get:()=>d.state.value[e],set:e=>{T((t=>{K(t,e)}))}}),d._p.forEach((e=>{K(k,p.run((()=>e({store:k,app:d._a,pinia:d,options:v}))))})),x&&g&&f.hydrate&&f.hydrate(k.$state,x),y=!0,m=!0,k}const q=function(n,o,r){let s,a;const c="function"==typeof o;function i(n,r){const i=l();(n=n||i&&e(L,null))&&D(n),(n=M)._s.has(s)||(c?Z(s,o,a,n):function(e,n,o,r){const{state:s,actions:a,getters:c}=n,i=o.state.value[e];let l;l=Z(e,(function(){i||(o.state.value[e]=s?s():{});const n=h(o.state.value[e]);return K(n,a,Object.keys(c||{}).reduce(((n,r)=>(n[r]=t(g((()=>{D(o);const t=o._s.get(e);return c[r].call(t,t)}))),n)),{}))}),n,o,0,!0)}(s,a,n));return n._s.get(s)}return"string"==typeof n?(s=n,a=c?r:o):(a=n,s=n.id),i.$id=s,i}("scroll",{state:()=>({top:0}),actions:{setTop(e){this.top=e}}});var Q={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t,n,o,r,s,a,c,i="",l=0;for(e=Q._utf8_encode(e);l<e.length;)r=(t=e.charCodeAt(l++))>>2,s=(3&t)<<4|(n=e.charCodeAt(l++))>>4,a=(15&n)<<2|(o=e.charCodeAt(l++))>>6,c=63&o,isNaN(n)?a=c=64:isNaN(o)&&(c=64),i=i+this._keyStr.charAt(r)+this._keyStr.charAt(s)+this._keyStr.charAt(a)+this._keyStr.charAt(c);return i},decode:function(e){var t,n,o,r,s,a,c="",i=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");i<e.length;)t=this._keyStr.indexOf(e.charAt(i++))<<2|(r=this._keyStr.indexOf(e.charAt(i++)))>>4,n=(15&r)<<4|(s=this._keyStr.indexOf(e.charAt(i++)))>>2,o=(3&s)<<6|(a=this._keyStr.indexOf(e.charAt(i++))),c+=String.fromCharCode(t),64!=s&&(c+=String.fromCharCode(n)),64!=a&&(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,s=t=0;r<e.length;)(s=e.charCodeAt(r))<128?(o+=String.fromCharCode(s),r++):s>191&&s<224?(t=e.charCodeAt(r+1),o+=String.fromCharCode((31&s)<<6|63&t),r+=2):(t=e.charCodeAt(r+1),n=e.charCodeAt(r+2),o+=String.fromCharCode((15&s)<<12|(63&t)<<6|63&n),r+=3);return o}},W="",X={getPrifix:function(e){return void 0===e&&(e=2),W||(W=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",W)),W},set:function(e,t){v(this.getPrifix()+e,t)},get:function(e){return p(this.getPrifix()+e)},remove:function(e){return b(this.getPrifix()+e)},clear:function(){var e=this;y().keys.forEach((function(t){0==t.indexOf(e.getPrifix())&&b(t)}))}},ee={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 te=globalThis&&globalThis.__assign||function(){return te=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},te.apply(this,arguments)},ne=globalThis&&globalThis.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,s){function a(e){try{i(o.next(e))}catch(t){s(t)}}function c(e){try{i(o.throw(e))}catch(t){s(t)}}function i(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}i((o=o.apply(e,t||[])).next())}))},oe=globalThis&&globalThis.__generator||function(e,t){var n,o,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function c(c){return function(i){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(i){c=[6,i],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}},re={login:function(){return ne(this,void 0,void 0,(function(){return oe(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),_({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){x({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 ne(this,void 0,void 0,(function(){return oe(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 ne(this,void 0,void 0,(function(){var e,t,n;return oe(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 s&&Object.assign(e,s),[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,s}))}))},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"]),ne(this,void 0,void 0,(function(){return oe(this,(function(n){return[2,new Promise((function(n,o){S({onlyFromCamera:e,scanType:t,success:function(e){n(te({code:0},e))},fail:function(e){o(te({code:999,msg:e.errMsg},e))}})}))]}))}))}},se={getVersion:function(){return"@ycxxkj/uniapp v1.0.7"},delay:function(e){return new Promise((function(t,n){setTimeout((function(e){t(true)}),e)}))}};const ae=[{label:"公网",value:"public"},{label:"内网",value:"inner"}],ce=[{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"}],le=[{label:"汇聚资源",value:"aggregation"},{label:"专线资源",value:"dedicated"}],ue=[{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"}],fe=[{label:"拨号失败",value:"failed"},{label:"已拨通",value:"succeed"}],de=[{label:"联网失败",value:"failed"},{label:"已联网",value:"succeed"}],he={YcBase64:Q,YcReg:{phone:function(e){return/^1[3456789]\d{9}$/.test(e)}},YcStorage:X,YcStringUtil:ee,YcUniapp:re,Yc:se},ge={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:()=>!!he.YcStorage.get("token"),onPageScroll(e){q().setTop(e.scrollTop);let t=E();t[t.length-1].$vm.scrollTop=e.scrollTop},test(){console.log("onLoad yc is",he)},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(de,e)},getDialStatusText(e){return this.getText(fe,e)},getOnlineStatusText(e){return this.getText(ue,e)},getStateText(e){return this.getText(ie,e)},getResourceTypeText(e){return this.getText(le,e)},getDialTypeText(e){return this.getText(ce,e)},getNatTypeText(e){return this.getText(ae,e)},getText(e,t,n="label"){let o="";return e.forEach((e=>{e.value!==t||(o=e[n])})),o.trim()}},...he};console.log("#debug#🚀 ~ file: Page.ts:81 ~ Page.url:",ge.url),console.log("#debug#🚀 ~ file: Page.ts:81 ~ Page.url:",ge.url),console.log("#debug#🚀 ~ file: Page.ts:81 ~ Page.url:",ge.url);export{ge as P,re as U,se as Y,Y as _};