diff --git a/components/MapComponent.vue b/components/MapComponent.vue new file mode 100644 index 0000000..9f99f82 --- /dev/null +++ b/components/MapComponent.vue @@ -0,0 +1,420 @@ + + + + + \ No newline at end of file diff --git a/constants/help.js b/constants/help.js index 4aab95d..73e99c6 100644 --- a/constants/help.js +++ b/constants/help.js @@ -8,7 +8,7 @@ export const HELP_CONTENT = { }, { question: '收费标准是怎样的?', - answer: '使用费用为2元/小时,不足1小时按1小时计算。押金99元,归还后自动退还。' + answer: '本产品租界风扇采用免押金租借形式,无需支付押金,具体计费方式以场地机柜扫码提示为准。' }, { question: '如何归还风扇?', @@ -29,7 +29,7 @@ export const HELP_CONTENT = { TITLE: '联系客服', PHONE: { LABEL: '客服电话', - VALUE: '400-888-8888' + VALUE: '400-077-6018' }, SERVICE_TIME: { LABEL: '服务时间', diff --git a/manifest.json b/manifest.json index 3b03061..8018b6a 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,6 @@ "versionName" : "1.0.0", "versionCode" : "100", "transformPx" : false, - /* 5+App特有相关 */ "app-plus" : { "usingComponents" : true, "nvueStyleCompiler" : "uni-app", @@ -16,11 +15,10 @@ "autoclose" : true, "delay" : 0 }, - /* 模块配置 */ - "modules" : {}, - /* 应用发布信息 */ + "modules" : { + "Maps" : {} + }, "distribute" : { - /* android打包配置 */ "android" : { "permissions" : [ "", @@ -37,30 +35,38 @@ "", "", "", - "" + "", + "", + "" ] }, - /* ios打包配置 */ "ios" : {}, - /* SDK配置 */ - "sdkConfigs" : {} + "sdkConfigs" : { + "maps" : { + "amap" : { + "appkey_ios" : "4c513a688938fd89b88b296e867f66ec", + "appkey_android" : "4c513a688938fd89b88b296e867f66ec" + } + } + } } }, - /* 快应用特有相关 */ "quickapp" : {}, - /* 小程序特有相关 */ "mp-weixin" : { "appid" : "wx2165f0be356ae7a9", "setting" : { "urlCheck" : false }, "usingComponents" : true, - // "requiredPrivateInfos" : [ "getPhoneNumber" ], "permission" : { "scope.getPhoneNumber" : { "desc" : "您的手机号将用于登录和订单服务" + }, + "scope.userLocation" : { + "desc" : "您的位置信息将用于获取附近的设备" } - } + }, + "requiredPrivateInfos" : [ "getLocation" ] }, "mp-alipay" : { "usingComponents" : true diff --git a/pages.json b/pages.json index 9ecdd9f..b4cd391 100644 --- a/pages.json +++ b/pages.json @@ -5,7 +5,7 @@ "pages": [{ "path": "pages/index/index", "style": { - "navigationBarTitleText": "共享风扇" + "navigationBarTitleText": "附近场地" } }, { diff --git a/pages/device/detail.vue b/pages/device/detail.vue index 11e810f..62a9861 100644 --- a/pages/device/detail.vue +++ b/pages/device/detail.vue @@ -29,7 +29,7 @@ {{ deviceLocation }} - + @@ -158,7 +158,8 @@ onMounted } from 'vue' import { - onLoad + onLoad, + onShow } from '@dcloudio/uni-app' import { getDeviceInfo, @@ -195,14 +196,22 @@ // 生命周期 onLoad 钩子 onLoad((options) => { - deviceId.value = options.deviceNo + if (options.deviceNo != uni.getStorageSync('deviceId') || !uni.getStorageSync('deviceId')) { + deviceId.value = options.deviceNo + uni.setStorageSync('deviceId', options.deviceNo) + } else { + deviceId.value = uni.getStorageSync('deviceId') + // uni.removeStorageSync('deviceId') + } checkOrderStatus() - console.log(options.deviceNo) - fetchDeviceInfo() }) - onMounted(() => { - checkUserPhone() + onMounted(async () => { + await checkUserPhone() + }) + + onShow(async () => { + await fetchDeviceInfo() }) const checkUserPhone = async () => { @@ -334,8 +343,8 @@ deviceStatus.class = 'offline' } } - console.log('feeconfig',deviceInfo.value.feeConfig); - + console.log('feeconfig', deviceInfo.value.feeConfig); + deviceFeeConfig.value = JSON.parse(deviceInfo.value.feeConfig)[0] || {} } } diff --git a/pages/index/index.vue b/pages/index/index.vue index dd776c9..196fb06 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,110 +1,106 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/app.json b/unpackage/dist/build/mp-weixin/app.json index a54a622..f9ad795 100644 --- a/unpackage/dist/build/mp-weixin/app.json +++ b/unpackage/dist/build/mp-weixin/app.json @@ -42,7 +42,13 @@ "permission": { "scope.getPhoneNumber": { "desc": "您的手机号将用于登录和订单服务" + }, + "scope.userLocation": { + "desc": "您的位置信息将用于获取附近的设备" } }, + "requiredPrivateInfos": [ + "getLocation" + ], "usingComponents": {} } \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/common/assets.js b/unpackage/dist/build/mp-weixin/common/assets.js index f800c2f..cf58306 100644 --- a/unpackage/dist/build/mp-weixin/common/assets.js +++ b/unpackage/dist/build/mp-weixin/common/assets.js @@ -1 +1 @@ -"use strict";exports._imports_0="/static/logo.png",exports._imports_0$1="/static/user-active.png",exports._imports_0$2="/static/images/wxpayflag.png",exports._imports_0$3="/static/images/location-map.svg",exports._imports_1="/static/scan-icon.png",exports._imports_1$1="/static/jl.png",exports._imports_1$2="/static/images/Electricity.svg",exports._imports_2="/static/complaint.png",exports._imports_3="/static/hlep.png"; +"use strict";exports._imports_0="/static/scan-icon.png",exports._imports_0$1="/static/user-active.png",exports._imports_0$2="/static/images/wxpayflag.png",exports._imports_0$3="/static/images/location-map.svg",exports._imports_1="/static/jl.png",exports._imports_2="/static/complaint.png",exports._imports_3="/static/hlep.png"; diff --git a/unpackage/dist/build/mp-weixin/common/vendor.js b/unpackage/dist/build/mp-weixin/common/vendor.js index b882f8f..2fd84e1 100644 --- a/unpackage/dist/build/mp-weixin/common/vendor.js +++ b/unpackage/dist/build/mp-weixin/common/vendor.js @@ -4,4 +4,4 @@ * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ -function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],o=()=>{},r=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,l=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>"[object Map]"===b(e),d=e=>"[object Set]"===b(e),h=e=>"function"==typeof e,g=e=>"string"==typeof e,m=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,v=e=>(y(e)||h(e))&&h(e.then)&&h(e.catch),_=Object.prototype.toString,b=e=>_.call(e),x=e=>"[object Object]"===b(e),w=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,$=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),S=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},k=/-(\w)/g,O=S((e=>e.replace(k,((e,t)=>t?t.toUpperCase():"")))),P=/\B([A-Z])/g,A=S((e=>e.replace(P,"-$1").toLowerCase())),E=S((e=>e.charAt(0).toUpperCase()+e.slice(1))),C=S((e=>e?`on${E(e)}`:"")),I=(e,t)=>!Object.is(e,t),j=(e,t)=>{for(let n=0;n{const t=parseFloat(e);return isNaN(t)?e:t};function R(e){let t="";if(g(e))t=e;else if(f(e))for(let n=0;nt&&t.__v_isRef?L(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[M(t,o)+" =>"]=n,e)),{})}:d(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>M(e)))}:m(t)?M(t):!y(t)||f(t)||x(t)?t:String(t),M=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};function D(e,t=null){let n;return(...o)=>(e&&(n=e.apply(t,o),e=null),n)}function N(e,t){if(!g(t))return;const n=(t=t.replace(/\[(\d+)\]/g,".$1")).split(".");let o=n[0];return e||(e={}),1===n.length?e[o]:N(e[o],n.slice(1).join("."))}function H(e){let t={};return x(e)&&Object.keys(e).sort().forEach((n=>{const o=n;t[o]=e[o]})),Object.keys(t)?t:e}const V=/:/g;const B=encodeURIComponent;function U(e,t=B){const n=e?Object.keys(e).map((n=>{let o=e[n];return void 0===typeof o||null===o?o="":x(o)&&(o=JSON.stringify(o)),t(n)+"="+t(o)})).filter((e=>e.length>0)).join("&"):null;return n?`?${n}`:""}const W=["onInit","onLoad","onShow","onHide","onUnload","onBackPress","onPageScroll","onTabItemTap","onReachBottom","onPullDownRefresh","onShareTimeline","onShareAppMessage","onShareChat","onAddToFavorites","onSaveExitState","onNavigationBarButtonTap","onNavigationBarSearchInputClicked","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputFocusChanged"];const z=["onShow","onHide","onLaunch","onError","onThemeChange","onPageNotFound","onUnhandledRejection","onExit","onInit","onLoad","onReady","onUnload","onResize","onBackPress","onPageScroll","onTabItemTap","onReachBottom","onPullDownRefresh","onShareTimeline","onAddToFavorites","onShareAppMessage","onShareChat","onSaveExitState","onNavigationBarButtonTap","onNavigationBarSearchInputClicked","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputFocusChanged"],F=(()=>({onPageScroll:1,onShareAppMessage:2,onShareTimeline:4}))();function q(e,t,n=!0){return!(n&&!h(t))&&(z.indexOf(e)>-1||0===e.indexOf("on"))}let K;const Z=[];const G=D(((e,t)=>t(e))),J=function(){};J.prototype={_id:1,on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n,_id:this._id}),this._id++},once:function(e,t,n){var o=this;function r(){o.off(e,r),t.apply(n,arguments)}return r._=t,this.on(e,r,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,r=n.length;o=0;i--)if(o[i].fn===t||o[i].fn._===t||o[i]._id===t){o.splice(i,1);break}r=o}return r.length?n[e]=r:delete n[e],this}};var Q=J;function X(e,t){if(!e)return;if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if("chinese"===(e=e.toLowerCase()))return"zh-Hans";if(0===e.indexOf("zh"))return e.indexOf("-hans")>-1?"zh-Hans":e.indexOf("-hant")>-1?"zh-Hant":(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?"zh-Hant":"zh-Hans");var n;let o=["en","fr","es"];t&&Object.keys(t).length>0&&(o=Object.keys(t));const r=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return r||void 0}function Y(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}let ee=1;const te={};function ne(e,t,n){if("number"==typeof e){const o=te[e];if(o)return o.keepAlive||delete te[e],o.callback(t,n)}return t}const oe="success",re="fail",ie="complete";function se(e,t={},{beforeAll:n,beforeSuccess:o}={}){x(t)||(t={});const{success:r,fail:i,complete:s}=function(e){const t={};for(const n in e){const o=e[n];h(o)&&(t[n]=Y(o),delete e[n])}return t}(t),c=h(r),a=h(i),u=h(s),l=ee++;return function(e,t,n,o=!1){te[e]={name:t,keepAlive:o,callback:n}}(l,e,(l=>{(l=l||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(l.errMsg,e),h(n)&&n(l),l.errMsg===e+":ok"?(h(o)&&o(l,t),c&&r(l)):a&&i(l),u&&s(l)})),l}const ce="success",ae="fail",ue="complete",le={},fe={};function pe(e,t){return function(n){return e(n,t)||n}}function de(e,t,n){let o=!1;for(let r=0;re(t),catch(){}}}function he(e,t={}){return[ce,ae,ue].forEach((n=>{const o=e[n];if(!f(o))return;const r=t[n];t[n]=function(e){de(o,e,t).then((e=>h(r)&&r(e)||e))}})),t}function ge(e,t){const n=[];f(le.returnValue)&&n.push(...le.returnValue);const o=fe[e];return o&&f(o.returnValue)&&n.push(...o.returnValue),n.forEach((e=>{t=e(t)||t})),t}function me(e){const t=Object.create(null);Object.keys(le).forEach((e=>{"returnValue"!==e&&(t[e]=le[e].slice())}));const n=fe[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function ye(e,t,n,o){const r=me(e);if(r&&Object.keys(r).length){if(f(r.invoke)){return de(r.invoke,n).then((n=>t(he(me(e),n),...o)))}return t(he(r,n),...o)}return t(n,...o)}function ve(e,t){return(n={},...o)=>function(e){return!(!x(e)||![oe,re,ie].find((t=>h(e[t]))))}(n)?ge(e,ye(e,t,n,o)):ge(e,new Promise(((r,i)=>{ye(e,t,c(n,{success:r,fail:i}),o)})))}function _e(e,t,n,o={}){const r=t+":fail";let i="";return i=n?0===n.indexOf(r)?n:r+" "+n:r,delete o.errCode,ne(e,c({errMsg:i},o))}function be(e,t,n,o){const r=function(e,t){e[0]}(t);if(r)return r}function xe(e,t,n,o){return n=>{const r=se(e,n,o),i=be(0,[n]);return i?_e(r,e,i):t(n,{resolve:t=>function(e,t,n){return ne(e,c(n||{},{errMsg:t+":ok"}))}(r,e,t),reject:(t,n)=>_e(r,e,function(e){return!e||g(e)?e:e.stack?("undefined"!=typeof globalThis&&globalThis.harmonyChannel||console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function we(e,t,n,o){return function(e,t,n,o){return(...e)=>{const n=be(0,e);if(n)throw new Error(n);return t.apply(null,e)}}(0,t)}let $e=!1,Se=0,ke=0;const Oe=we(0,((e,t)=>{if(0===Se&&function(){var e,t;let n,o,r;{const i=(null===(e=wx.getWindowInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync(),s=(null===(t=wx.getDeviceInfo)||void 0===t?void 0:t.call(wx))||wx.getSystemInfoSync();n=i.windowWidth,o=i.pixelRatio,r=s.platform}Se=n,ke=o,$e="ios"===r}(),0===(e=Number(e)))return 0;let n=e/750*(t||Se);return n<0&&(n=-n),n=Math.floor(n+1e-4),0===n&&(n=1!==ke&&$e?.5:1),e<0?-n:n}));function Pe(e,t){Object.keys(t).forEach((n=>{h(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):f(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n{const o=e[n],r=t[n];f(o)&&h(r)&&a(o,r)}))}const Ee=we(0,((e,t)=>{g(e)&&x(t)?Pe(fe[e]||(fe[e]={}),t):x(e)&&Pe(le,e)})),Ce=we(0,((e,t)=>{g(e)?x(t)?Ae(fe[e],t):delete fe[e]:x(e)&&Ae(le,e)}));const Ie=new class{constructor(){this.$emitter=new Q}on(e,t){return this.$emitter.on(e,t)}once(e,t){return this.$emitter.once(e,t)}off(e,t){e?this.$emitter.off(e,t):this.$emitter.e={}}emit(e,...t){this.$emitter.emit(e,...t)}},je=we(0,((e,t)=>(Ie.on(e,t),()=>Ie.off(e,t)))),Te=we(0,((e,t)=>(Ie.once(e,t),()=>Ie.off(e,t)))),Re=we(0,((e,t)=>{f(e)||(e=e?[e]:[]),e.forEach((e=>{Ie.off(e,t)}))})),Le=we(0,((e,...t)=>{Ie.emit(e,...t)}));let Me,De,Ne;function He(e){try{return JSON.parse(e)}catch(t){}return e}const Ve=[];function Be(e,t){Ve.forEach((n=>{n(e,t)})),Ve.length=0}const Ue=ve(We="getPushClientId",function(e,t,n,o){return xe(e,t,0,o)}(We,((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{void 0===Ne&&(Ne=!1,Me="",De="uniPush is not enabled"),Ve.push(((e,o)=>{e?t({cid:e}):n(o)})),void 0!==Me&&Be(Me,De)}))}),0,ze));var We,ze;const Fe=[],qe=/^\$|__f__|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|rpx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/,Ke=/^create|Manager$/,Ze=["createBLEConnection"],Ge=["request","downloadFile","uploadFile","connectSocket"],Je=["createBLEConnection"],Qe=/^on|^off/;function Xe(e){return Ke.test(e)&&-1===Ze.indexOf(e)}function Ye(e){return qe.test(e)&&-1===Je.indexOf(e)}function et(e){return-1!==Ge.indexOf(e)}function tt(e){return!(Xe(e)||Ye(e)||function(e){return Qe.test(e)&&"onPush"!==e}(e))}function nt(e,t){return tt(e)&&h(t)?function(n={},...o){return h(n.success)||h(n.fail)||h(n.complete)?ge(e,ye(e,t,n,o)):ge(e,new Promise(((r,i)=>{ye(e,t,c({},n,{success:r,fail:i}),o)})))}:t}Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e&&e()).then((()=>n))),(n=>t.resolve(e&&e()).then((()=>{throw n}))))});const ot=["success","fail","cancel","complete"];const rt=()=>{const e=h(getApp)&&getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=X(n&&n.language?n.language:"en")||"en"}return t}()},it=[];"undefined"!=typeof global&&(global.getLocale=rt);let st;function ct(e=wx){return function(t,n){st=st||e.getStorageSync("__DC_STAT_UUID"),st||(st=Date.now()+""+Math.floor(1e7*Math.random()),wx.setStorage({key:"__DC_STAT_UUID",data:st})),n.deviceId=st}}function at(e,t){if(e.safeArea){const n=e.safeArea;t.safeAreaInsets={top:n.top,left:n.left,right:e.windowWidth-n.right,bottom:e.screenHeight-n.bottom}}}function ut(e,t){let n="",o="";switch(n=e.split(" ")[0]||t,o=e.split(" ")[1]||"",n=n.toLocaleLowerCase(),n){case"harmony":case"ohos":case"openharmony":n="harmonyos";break;case"iphone os":n="ios";break;case"mac":case"darwin":n="macos";break;case"windows_nt":n="windows"}return{osName:n,osVersion:o}}function lt(e,t){let n=e.deviceType||"phone";{const e={ipad:"pad",windows:"pc",mac:"pc"},o=Object.keys(e),r=t.toLocaleLowerCase();for(let t=0;t{at(e,t),ct()(e,t),function(e,t){const{brand:n="",model:o="",system:r="",language:i="",theme:s,version:a,platform:u,fontSizeSetting:l,SDKVersion:f,pixelRatio:p,deviceOrientation:d}=e,{osName:h,osVersion:g}=ut(r,u);let m=a,y=lt(e,o),v=ft(n),_=dt(e),b=d,x=p,w=f;const $=(i||"").replace(/_/g,"-"),S={appId:"__UNI__A871B6B",appName:"uni-fans-score",appVersion:"1.0.0",appVersionCode:"100",appLanguage:pt($),uniCompileVersion:"4.66",uniCompilerVersion:"4.66",uniRuntimeVersion:"4.66",uniPlatform:"mp-weixin",deviceBrand:v,deviceModel:o,deviceType:y,devicePixelRatio:x,deviceOrientation:b,osName:h,osVersion:g,hostTheme:s,hostVersion:m,hostLanguage:$,hostName:_,hostSDKVersion:w,hostFontSizeSetting:l,windowTop:0,windowBottom:0,osLanguage:void 0,osTheme:void 0,ua:void 0,hostPackageName:void 0,browserName:void 0,browserVersion:void 0,isUniAppX:!1};c(t,S)}(e,t)}},gt=ht,mt={args(e,t){let n=parseInt(e.current);if(isNaN(n))return;const o=e.urls;if(!f(o))return;const r=o.length;return r?(n<0?n=0:n>=r&&(n=r-1),n>0?(t.current=o[n],t.urls=o.filter(((e,t)=>!(t{const{brand:n,model:o,system:r="",platform:i=""}=e;let s=lt(e,o),a=ft(n);ct()(e,t);const{osName:u,osVersion:l}=ut(r,i);t=H(c(t,{deviceType:s,deviceBrand:a,deviceModel:o,osName:u,osVersion:l}))}},_t={returnValue:(e,t)=>{const{version:n,language:o,SDKVersion:r,theme:i}=e;let s=dt(e),a=(o||"").replace(/_/g,"-");const u={hostVersion:n,hostLanguage:a,hostName:s,hostSDKVersion:r,hostTheme:i,appId:"__UNI__A871B6B",appName:"uni-fans-score",appVersion:"1.0.0",appVersionCode:"100",appLanguage:pt(a),isUniAppX:!1,uniPlatform:"mp-weixin",uniCompileVersion:"4.66",uniCompilerVersion:"4.66",uniRuntimeVersion:"4.66"};c(t,u)}},bt={returnValue:(e,t)=>{at(e,t),t=H(c(t,{windowTop:0,windowBottom:0}))}},xt={args(e){const t=getApp({allowDefault:!0})||{};t.$vm?or("onError",e,t.$vm.$):(wx.$onErrorHandlers||(wx.$onErrorHandlers=[]),wx.$onErrorHandlers.push(e))}},wt={args(e){const t=getApp({allowDefault:!0})||{};if(t.$vm){if(e.__weh){const n=t.$vm.$.onError;if(n){const t=n.indexOf(e.__weh);t>-1&&n.splice(t,1)}}}else{if(!wx.$onErrorHandlers)return;const t=wx.$onErrorHandlers.findIndex((t=>t===e));-1!==t&&wx.$onErrorHandlers.splice(t,1)}}},$t={args(){if(wx.__uni_console__){if(wx.__uni_console_warned__)return;wx.__uni_console_warned__=!0,console.warn("开发模式下小程序日志回显会使用 socket 连接,为了避免冲突,建议使用 SocketTask 的方式去管理 WebSocket 或手动关闭日志回显功能。[详情](https://uniapp.dcloud.net.cn/tutorial/run/mp-log.html)")}}},St=$t,kt={$on:je,$off:Re,$once:Te,$emit:Le,upx2px:Oe,rpx2px:Oe,interceptors:{},addInterceptor:Ee,removeInterceptor:Ce,onCreateVueApp:function(e){if(K)return e(K);Z.push(e)},invokeCreateVueAppHook:function(e){K=e,Z.forEach((t=>t(e)))},getLocale:rt,setLocale:e=>{const t=h(getApp)&&getApp();if(!t)return!1;return t.$vm.$locale!==e&&(t.$vm.$locale=e,it.forEach((t=>t({locale:e}))),!0)},onLocaleChange:e=>{-1===it.indexOf(e)&&it.push(e)},getPushClientId:Ue,onPushMessage:e=>{-1===Fe.indexOf(e)&&Fe.push(e)},offPushMessage:e=>{if(e){const t=Fe.indexOf(e);t>-1&&Fe.splice(t,1)}else Fe.length=0},invokePushCallback:function(e){if("enabled"===e.type)Ne=!0;else if("clientId"===e.type)Me=e.cid,De=e.errMsg,Be(Me,e.errMsg);else if("pushMsg"===e.type){const t={type:"receive",data:He(e.message)};for(let e=0;e{t({type:"click",data:He(e.message)})}))},__f__:function(e,t,...n){t&&n.push(t),console[e].apply(console,n)}};const Ot=["qy","env","error","version","lanDebug","cloud","serviceMarket","router","worklet","__webpack_require_UNI_MP_PLUGIN__"],Pt=["lanDebug","router","worklet"],At=wx.getLaunchOptionsSync?wx.getLaunchOptionsSync():null;function Et(e){return(!At||1154!==At.scene||!Pt.includes(e))&&(Ot.indexOf(e)>-1||"function"==typeof wx[e])}function Ct(){const e={};for(const t in wx)Et(t)&&(e[t]=wx[t]);return"undefined"!=typeof globalThis&&"undefined"==typeof requireMiniProgram&&(globalThis.wx=e),e}const It=["__route__","__wxExparserNodeId__","__wxWebviewId__"],jt=(Tt={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]},function({service:e,success:t,fail:n,complete:o}){let r;Tt[e]?(r={errMsg:"getProvider:ok",service:e,provider:Tt[e]},h(t)&&t(r)):(r={errMsg:"getProvider:fail:服务["+e+"]不存在"},h(n)&&n(r)),h(o)&&o(r)});var Tt;const Rt=Ct();Rt.canIUse("getAppBaseInfo")||(Rt.getAppBaseInfo=Rt.getSystemInfoSync),Rt.canIUse("getWindowInfo")||(Rt.getWindowInfo=Rt.getSystemInfoSync),Rt.canIUse("getDeviceInfo")||(Rt.getDeviceInfo=Rt.getSystemInfoSync);let Lt=Rt.getAppBaseInfo&&Rt.getAppBaseInfo();Lt||(Lt=Rt.getSystemInfoSync());const Mt=Lt?Lt.host:null,Dt=Mt&&"SAAASDK"===Mt.env?Rt.miniapp.shareVideoMessage:Rt.shareVideoMessage;var Nt=Object.freeze({__proto__:null,createSelectorQuery:function(){const e=Rt.createSelectorQuery(),t=e.in;return e.in=function(e){return e.$scope?t.call(this,e.$scope):t.call(this,function(e){const t=Object.create(null);return It.forEach((n=>{t[n]=e[n]})),t}(e))},e},getProvider:jt,shareVideoMessage:Dt});const Ht={args(e,t){e.compressedHeight&&!t.compressHeight&&(t.compressHeight=e.compressedHeight),e.compressedWidth&&!t.compressWidth&&(t.compressWidth=e.compressedWidth)}};var Vt=Object.freeze({__proto__:null,compressImage:Ht,getAppAuthorizeSetting:{returnValue:function(e,t){const{locationReducedAccuracy:n}=e;t.locationAccuracy="unsupported",!0===n?t.locationAccuracy="reduced":!1===n&&(t.locationAccuracy="full")}},getAppBaseInfo:_t,getDeviceInfo:vt,getSystemInfo:ht,getSystemInfoSync:gt,getWindowInfo:bt,offError:wt,onError:xt,onSocketMessage:St,onSocketOpen:$t,previewImage:mt,redirectTo:{},showActionSheet:yt});const Bt=Ct();var Ut=function(e,t,n=wx){const o=function(e){function t(e,t,n){return function(r){return t(o(e,r,n))}}function n(e,n,o={},r={},i=!1){if(x(n)){const s=!0===i?n:{};h(o)&&(o=o(n,s)||{});for(const c in n)if(l(o,c)){let t=o[c];h(t)&&(t=t(n[c],n,s)),t?g(t)?s[t]=n[c]:x(t)&&(s[t.name?t.name:c]=t.value):console.warn(`微信小程序 ${e} 暂不支持 ${c}`)}else if(-1!==ot.indexOf(c)){const o=n[c];h(o)&&(s[c]=t(e,o,r))}else i||l(s,c)||(s[c]=n[c]);return s}return h(n)&&(h(o)&&o(n,{}),n=t(e,n,r)),n}function o(t,o,r,i=!1){return h(e.returnValue)&&(o=e.returnValue(t,o)),n(t,o,r,{},i||!1)}return function(t,r){const i=l(e,t);if(!i&&"function"!=typeof wx[t])return r;const s=i||h(e.returnValue)||Xe(t)||et(t),c=i||h(r);if(!i&&!r)return function(){console.error(`微信小程序 暂不支持${t}`)};if(!s||!c)return r;const a=e[t];return function(e,r){let i=a||{};h(a)&&(i=a(e));const s=[e=n(t,e,i.args,i.returnValue)];void 0!==r&&s.push(r);const c=wx[i.name||t].apply(wx,s);return(Xe(t)||et(t))&&c&&!c.__v_skip&&(c.__v_skip=!0),Ye(t)?o(t,c,i.returnValue,Xe(t)):c}}}(t);return new Proxy({},{get:(t,r)=>l(t,r)?t[r]:l(e,r)?nt(r,e[r]):l(kt,r)?nt(r,kt[r]):nt(r,o(r,n[r]))})}(Nt,Vt,Bt);let Wt,zt;class Ft{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Wt,!e&&Wt&&(this.index=(Wt.scopes||(Wt.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Wt;try{return Wt=this,e()}finally{Wt=t}}}on(){Wt=this}off(){Wt=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),en()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Jt,t=zt;try{return Jt=!0,zt=this,this._runnings++,Kt(this),this.fn()}finally{Zt(this),this._runnings--,zt=t,Jt=e}}stop(){var e;this.active&&(Kt(this),Zt(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function Kt(e){e._trackId++,e._depsLength=0}function Zt(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},an=new WeakMap,un=Symbol(""),ln=Symbol("");function fn(e,t,n){if(Jt&&zt){let t=an.get(e);t||an.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=cn((()=>t.delete(n)))),on(zt,o)}}function pn(e,t,n,o,r,i){const s=an.get(e);if(!s)return;let c=[];if("clear"===t)c=[...s.values()];else if("length"===n&&f(e)){const e=Number(o);s.forEach(((t,n)=>{("length"===n||!m(n)&&n>=e)&&c.push(t)}))}else switch(void 0!==n&&c.push(s.get(n)),t){case"add":f(e)?w(n)&&c.push(s.get("length")):(c.push(s.get(un)),p(e)&&c.push(s.get(ln)));break;case"delete":f(e)||(c.push(s.get(un)),p(e)&&c.push(s.get(ln)));break;case"set":p(e)&&c.push(s.get(un))}tn();for(const a of c)a&&sn(a,4);nn()}const dn=e("__proto__,__v_isRef,__isVue"),hn=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(m)),gn=mn();function mn(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=no(this);for(let t=0,r=this.length;t{e[t]=function(...e){Yt(),tn();const n=no(this)[t].apply(this,e);return nn(),en(),n}})),e}function yn(e){const t=no(this);return fn(t,0,e),t.hasOwnProperty(e)}class vn{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?Zn:Kn:r?qn:Fn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const i=f(e);if(!o){if(i&&l(gn,t))return Reflect.get(gn,t,n);if("hasOwnProperty"===t)return yn}const s=Reflect.get(e,t,n);return(m(t)?hn.has(t):dn(t))?s:(o||fn(e,0,t),r?s:uo(s)?i&&w(t)?s:s.value:y(s)?o?Qn(s):Jn(s):s)}}class _n extends vn{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=eo(r);if(to(n)||eo(n)||(r=no(r),n=no(n)),!f(e)&&uo(r)&&!uo(n))return!t&&(r.value=n,!0)}const i=f(e)&&w(t)?Number(t)e,kn=e=>Reflect.getPrototypeOf(e);function On(e,t,n=!1,o=!1){const r=no(e=e.__v_raw),i=no(t);n||(I(t,i)&&fn(r,0,t),fn(r,0,i));const{has:s}=kn(r),c=o?Sn:n?io:ro;return s.call(r,t)?c(e.get(t)):s.call(r,i)?c(e.get(i)):void(e!==r&&e.get(t))}function Pn(e,t=!1){const n=this.__v_raw,o=no(n),r=no(e);return t||(I(e,r)&&fn(o,0,e),fn(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function An(e,t=!1){return e=e.__v_raw,!t&&fn(no(e),0,un),Reflect.get(e,"size",e)}function En(e){e=no(e);const t=no(this);return kn(t).has.call(t,e)||(t.add(e),pn(t,"add",e,e)),this}function Cn(e,t){t=no(t);const n=no(this),{has:o,get:r}=kn(n);let i=o.call(n,e);i||(e=no(e),i=o.call(n,e));const s=r.call(n,e);return n.set(e,t),i?I(t,s)&&pn(n,"set",e,t):pn(n,"add",e,t),this}function In(e){const t=no(this),{has:n,get:o}=kn(t);let r=n.call(t,e);r||(e=no(e),r=n.call(t,e)),o&&o.call(t,e);const i=t.delete(e);return r&&pn(t,"delete",e,void 0),i}function jn(){const e=no(this),t=0!==e.size,n=e.clear();return t&&pn(e,"clear",void 0,void 0),n}function Tn(e,t){return function(n,o){const r=this,i=r.__v_raw,s=no(i),c=t?Sn:e?io:ro;return!e&&fn(s,0,un),i.forEach(((e,t)=>n.call(o,c(e),c(t),r)))}}function Rn(e,t,n){return function(...o){const r=this.__v_raw,i=no(r),s=p(i),c="entries"===e||e===Symbol.iterator&&s,a="keys"===e&&s,u=r[e](...o),l=n?Sn:t?io:ro;return!t&&fn(i,0,a?ln:un),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Ln(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Mn(){const e={get(e){return On(this,e)},get size(){return An(this)},has:Pn,add:En,set:Cn,delete:In,clear:jn,forEach:Tn(!1,!1)},t={get(e){return On(this,e,!1,!0)},get size(){return An(this)},has:Pn,add:En,set:Cn,delete:In,clear:jn,forEach:Tn(!1,!0)},n={get(e){return On(this,e,!0)},get size(){return An(this,!0)},has(e){return Pn.call(this,e,!0)},add:Ln("add"),set:Ln("set"),delete:Ln("delete"),clear:Ln("clear"),forEach:Tn(!0,!1)},o={get(e){return On(this,e,!0,!0)},get size(){return An(this,!0)},has(e){return Pn.call(this,e,!0)},add:Ln("add"),set:Ln("set"),delete:Ln("delete"),clear:Ln("clear"),forEach:Tn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Rn(r,!1,!1),n[r]=Rn(r,!0,!1),t[r]=Rn(r,!1,!0),o[r]=Rn(r,!0,!0)})),[e,n,t,o]}const[Dn,Nn,Hn,Vn]=Mn();function Bn(e,t){const n=t?e?Vn:Hn:e?Nn:Dn;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(l(n,o)&&o in t?n:t,o,r)}const Un={get:Bn(!1,!1)},Wn={get:Bn(!1,!0)},zn={get:Bn(!0,!1)},Fn=new WeakMap,qn=new WeakMap,Kn=new WeakMap,Zn=new WeakMap;function Gn(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>b(e).slice(8,-1))(e))}function Jn(e){return eo(e)?e:Xn(e,!1,xn,Un,Fn)}function Qn(e){return Xn(e,!0,wn,zn,Kn)}function Xn(e,t,n,o,r){if(!y(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const s=Gn(e);if(0===s)return e;const c=new Proxy(e,2===s?o:n);return r.set(e,c),c}function Yn(e){return eo(e)?Yn(e.__v_raw):!(!e||!e.__v_isReactive)}function eo(e){return!(!e||!e.__v_isReadonly)}function to(e){return!(!e||!e.__v_isShallow)}function no(e){const t=e&&e.__v_raw;return t?no(t):e}function oo(e){return Object.isExtensible(e)&&((e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})})(e,"__v_skip",!0),e}const ro=e=>y(e)?Jn(e):e,io=e=>y(e)?Qn(e):e;class so{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new qt((()=>e(this._value)),(()=>ao(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=no(this);return e._cacheable&&!e.effect.dirty||!I(e._value,e._value=e.effect.run())||ao(e,4),co(e),e.effect._dirtyLevel>=2&&ao(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function co(e){var t;Jt&&zt&&(e=no(e),on(zt,null!=(t=e.dep)?t:e.dep=cn((()=>e.dep=void 0),e instanceof so?e:void 0)))}function ao(e,t=4,n){const o=(e=no(e)).dep;o&&sn(o,t)}function uo(e){return!(!e||!0!==e.__v_isRef)}function lo(e){return function(e,t){if(uo(e))return e;return new fo(e,t)}(e,!1)}class fo{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:no(e),this._value=t?e:ro(e)}get value(){return co(this),this._value}set value(e){const t=this.__v_isShallow||to(e)||eo(e);e=t?e:no(e),I(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:ro(e),ao(this,4))}}function po(e){return uo(e)?e.value:e}const ho={get:(e,t,n)=>po(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return uo(r)&&!uo(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function go(e){return Yn(e)?e:new Proxy(e,ho)}function mo(e,t,n,o){try{return o?e(...o):e()}catch(r){vo(r,t,n)}}function yo(e,t,n,o){if(h(e)){const r=mo(e,t,n,o);return r&&v(r)&&r.catch((e=>{vo(e,t,n)})),r}const r=[];for(let i=0;i>>1,r=wo[o],i=Ro(r);inull==e.id?1/0:e.id,Lo=(e,t)=>{const n=Ro(e)-Ro(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Mo(e){xo=!1,bo=!0,wo.sort(Lo);try{for($o=0;$oRo(e)-Ro(t)));if(So.length=0,ko)return void ko.push(...e);for(ko=e,Oo=0;Oog(e)?e.trim():e))),n&&(i=o.map(T))}let a,u=r[a=C(n)]||r[a=C(O(n))];!u&&s&&(u=r[a=C(A(n))]),u&&yo(u,e,6,i);const l=r[a+"Once"];if(l){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,yo(l,e,6,i)}}function No(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const i=e.emits;let s={},a=!1;if(!h(e)){const o=e=>{const n=No(e,t,!0);n&&(a=!0,c(s,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return i||a?(f(i)?i.forEach((e=>s[e]=null)):c(s,i),y(e)&&o.set(e,s),s):(y(e)&&o.set(e,null),null)}function Ho(e,t){return!(!e||!i(t))&&(t=t.slice(2).replace(/Once$/,""),l(e,t[0].toLowerCase()+t.slice(1))||l(e,A(t))||l(e,t))}let Vo=null;function Bo(e){const t=Vo;return Vo=e,e&&e.type.__scopeId,t}function Uo(e,t){return e&&(e[t]||e[O(t)]||e[E(O(t))])}const Wo={};function zo(e,t,n){return Fo(e,t,n)}function Fo(e,n,{immediate:r,deep:i,flush:s,once:c,onTrack:u,onTrigger:l}=t){if(n&&c){const e=n;n=(...t)=>{e(...t),k()}}const p=Fr,d=e=>!0===i?e:Zo(e,!1===i?1:void 0);let g,m,y=!1,v=!1;if(uo(e)?(g=()=>e.value,y=to(e)):Yn(e)?(g=()=>d(e),y=!0):f(e)?(v=!0,y=e.some((e=>Yn(e)||to(e))),g=()=>e.map((e=>uo(e)?e.value:Yn(e)?d(e):h(e)?mo(e,p,2):void 0))):g=h(e)?n?()=>mo(e,p,2):()=>(m&&m(),yo(e,p,3,[_])):o,n&&i){const e=g;g=()=>Zo(e())}let _=e=>{m=$.onStop=()=>{mo(e,p,4),m=$.onStop=void 0}},b=v?new Array(e.length).fill(Wo):Wo;const x=()=>{if($.active&&$.dirty)if(n){const e=$.run();(i||y||(v?e.some(((e,t)=>I(e,b[t]))):I(e,b)))&&(m&&m(),yo(n,p,3,[e,b===Wo?void 0:v&&b[0]===Wo?[]:b,_]),b=e)}else $.run()};let w;x.allowRecurse=!!n,"sync"===s?w=x:"post"===s?w=()=>Vr(x,p&&p.suspense):(x.pre=!0,p&&(x.id=p.uid),w=()=>Co(x));const $=new qt(g,o,w),S=Wt,k=()=>{$.stop(),S&&a(S.effects,$)};return n?r?x():b=$.run():"post"===s?Vr($.run.bind($),p&&p.suspense):$.run(),k}function qo(e,t,n){const o=this.proxy,r=g(e)?e.includes(".")?Ko(o,e):()=>o[e]:e.bind(o,o);let i;h(t)?i=t:(i=t.handler,n=t);const s=Gr(this),c=Fo(r,i.bind(o),n);return s(),c}function Ko(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),uo(e))Zo(e.value,t,n,o);else if(f(e))for(let r=0;r{Zo(e,t,n,o)}));else if(x(e))for(const r in e)Zo(e[r],t,n,o);return e}function Go(){return{app:null,config:{isNativeTag:r,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Jo=0;let Qo=null;function Xo(e,t,n=!1){const o=Fr||Vo;if(o||Qo){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:Qo._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&h(t)?t.call(o&&o.proxy):t}}function Yo(e,t){tr(e,"a",t)}function er(e,t){tr(e,"da",t)}function tr(e,t,n=Fr){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(or(t,o,n),n){let e=n.parent;for(;e&&e.parent;)e.parent.vnode.type.__isKeepAlive&&nr(o,t,n,e),e=e.parent}}function nr(e,t,n,o){const r=or(t,e,o,!0);lr((()=>{a(o[t],r)}),n)}function or(e,t,n=Fr,o=!1){if(n){(function(e){return W.indexOf(e)>-1})(e)&&(n=n.root);const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Yt();const r=Gr(n),i=yo(t,n,e,o);return r(),en(),i});return o?r.unshift(i):r.push(i),i}}const rr=e=>(t,n=Fr)=>(!Xr||"sp"===e)&&or(e,((...e)=>t(...e)),n),ir=rr("bm"),sr=rr("m"),cr=rr("bu"),ar=rr("u"),ur=rr("bum"),lr=rr("um"),fr=rr("sp"),pr=rr("rtg"),dr=rr("rtc");function hr(e,t=Fr){or("ec",e,t)}const gr=e=>e?Qr(e)?ti(e)||e.proxy:gr(e.parent):null,mr=c(Object.create(null),{$:e=>e,$el:e=>e.__$el||(e.__$el={}),$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>gr(e.parent),$root:e=>gr(e.root),$emit:e=>e.emit,$options:e=>Sr(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Co(e.update)}),$watch:e=>qo.bind(e)}),yr=(e,n)=>e!==t&&!e.__isScriptSetup&&l(e,n),vr={get({_:e},n){const{ctx:o,setupState:r,data:i,props:s,accessCache:c,type:a,appContext:u}=e;let f;if("$"!==n[0]){const a=c[n];if(void 0!==a)switch(a){case 1:return r[n];case 2:return i[n];case 4:return o[n];case 3:return s[n]}else{if(yr(r,n))return c[n]=1,r[n];if(i!==t&&l(i,n))return c[n]=2,i[n];if((f=e.propsOptions[0])&&l(f,n))return c[n]=3,s[n];if(o!==t&&l(o,n))return c[n]=4,o[n];br&&(c[n]=0)}}const p=mr[n];let d,h;return p?("$attrs"===n&&fn(e,0,n),p(e)):(d=a.__cssModules)&&(d=d[n])?d:o!==t&&l(o,n)?(c[n]=4,o[n]):(h=u.config.globalProperties,l(h,n)?h[n]:void 0)},set({_:e},n,o){const{data:r,setupState:i,ctx:s}=e;return yr(i,n)?(i[n]=o,!0):r!==t&&l(r,n)?(r[n]=o,!0):!l(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(s[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:r,appContext:i,propsOptions:s}},c){let a;return!!o[c]||e!==t&&l(e,c)||yr(n,c)||(a=s[0])&&l(a,c)||l(r,c)||l(mr,c)||l(i.config.globalProperties,c)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:l(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function _r(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let br=!0;function xr(e){const t=Sr(e),n=e.proxy,r=e.ctx;br=!1,t.beforeCreate&&wr(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:c,watch:a,provide:u,inject:l,created:p,beforeMount:d,mounted:g,beforeUpdate:m,updated:v,activated:_,deactivated:b,beforeDestroy:x,beforeUnmount:w,destroyed:$,unmounted:S,render:k,renderTracked:O,renderTriggered:P,errorCaptured:A,serverPrefetch:E,expose:C,inheritAttrs:I,components:j,directives:T,filters:R}=t;if(l&&function(e,t,n=o){f(e)&&(e=Ar(e));for(const o in e){const n=e[o];let r;r=y(n)?"default"in n?Xo(n.from||o,n.default,!0):Xo(n.from||o):Xo(n),uo(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(l,r,null),c)for(const o in c){const e=c[o];h(e)&&(r[o]=e.bind(n))}if(i){const t=i.call(n,n);y(t)&&(e.data=Jn(t))}if(br=!0,s)for(const f in s){const e=s[f],t=h(e)?e.bind(n,n):h(e.get)?e.get.bind(n,n):o,i=!h(e)&&h(e.set)?e.set.bind(n):o,c=ni({get:t,set:i});Object.defineProperty(r,f,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(a)for(const o in a)$r(a[o],r,n,o);function L(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(function(){if(u){const e=h(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(Fr){let n=Fr.provides;const o=Fr.parent&&Fr.parent.provides;o===n&&(n=Fr.provides=Object.create(o)),n[e]=t,"app"===Fr.type.mpType&&Fr.appContext.app.provide(e,t)}}(t,e[t])}))}}(),p&&wr(p,e,"c"),L(ir,d),L(sr,g),L(cr,m),L(ar,v),L(Yo,_),L(er,b),L(hr,A),L(dr,O),L(pr,P),L(ur,w),L(lr,S),L(fr,E),f(C))if(C.length){const t=e.exposed||(e.exposed={});C.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});k&&e.render===o&&(e.render=k),null!=I&&(e.inheritAttrs=I),j&&(e.components=j),T&&(e.directives=T),e.ctx.$onApplyOptions&&e.ctx.$onApplyOptions(t,e,n)}function wr(e,t,n){yo(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function $r(e,t,n,o){const r=o.includes(".")?Ko(n,o):()=>n[o];if(g(e)){const n=t[e];h(n)&&zo(r,n)}else if(h(e))zo(r,e.bind(n));else if(y(e))if(f(e))e.forEach((e=>$r(e,t,n,o)));else{const o=h(e.handler)?e.handler.bind(n):t[e.handler];h(o)&&zo(r,o,e)}}function Sr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,c=i.get(t);let a;return c?a=c:r.length||n||o?(a={},r.length&&r.forEach((e=>kr(a,e,s,!0))),kr(a,t,s)):a=t,y(t)&&i.set(t,a),a}function kr(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&kr(e,i,n,!0),r&&r.forEach((t=>kr(e,t,n,!0)));for(const s in t)if(o&&"expose"===s);else{const o=Or[s]||n&&n[s];e[s]=o?o(e[s],t[s]):t[s]}return e}const Or={data:Pr,props:Ir,emits:Ir,methods:Cr,computed:Cr,beforeCreate:Er,created:Er,beforeMount:Er,mounted:Er,beforeUpdate:Er,updated:Er,beforeDestroy:Er,beforeUnmount:Er,destroyed:Er,unmounted:Er,activated:Er,deactivated:Er,errorCaptured:Er,serverPrefetch:Er,components:Cr,directives:Cr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const o in t)n[o]=Er(e[o],t[o]);return n},provide:Pr,inject:function(e,t){return Cr(Ar(e),Ar(t))}};function Pr(e,t){return t?e?function(){return c(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Ar(e){if(f(e)){const t={};for(let n=0;n{d=!0;const[t,n]=Lr(e,o,!0);c(u,t),n&&p.push(...n)};!r&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!a&&!d)return y(e)&&i.set(e,n),n;if(f(a))for(let n=0;n-1,o[1]=n<0||t-1||l(o,"default"))&&p.push(e)}}}const g=[u,p];return y(e)&&i.set(e,g),g}function Mr(e){return"$"!==e[0]&&!$(e)}function Dr(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function Nr(e,t){return Dr(e)===Dr(t)}function Hr(e,t){return f(t)?t.findIndex((t=>Nr(t,e))):h(t)&&Nr(t,e)?0:-1}const Vr=jo;function Br(e){return e?Yn(t=e)||eo(t)||"__vInternal"in e?c({},e):e:null;var t}const Ur=Go();let Wr=0;function zr(e,n,o){const r=e.type,i=(n?n.appContext:e.appContext)||Ur,s={uid:Wr++,vnode:e,type:r,parent:n,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Ft(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Lr(r,i),emitsOptions:No(r,i),emit:null,emitted:null,propsDefaults:t,inheritAttrs:r.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null,$uniElements:new Map,$templateUniElementRefs:[],$templateUniElementStyles:{},$eS:{},$eA:{}};return s.ctx={_:s},s.root=n?n.root:s,s.emit=Do.bind(null,s),e.ce&&e.ce(s),s}let Fr=null;const qr=()=>Fr||Vo;let Kr,Zr;Kr=e=>{Fr=e},Zr=e=>{Xr=e};const Gr=e=>{const t=Fr;return Kr(e),e.scope.on(),()=>{e.scope.off(),Kr(t)}},Jr=()=>{Fr&&Fr.scope.off(),Kr(null)};function Qr(e){return 4&e.vnode.shapeFlag}let Xr=!1;function Yr(e,t=!1){t&&Zr(t);const{props:n}=e.vnode,o=Qr(e);jr(e,n,o,t);const r=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=oo(new Proxy(e.ctx,vr));const{setup:o}=n;if(o){const t=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(fn(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,n=Gr(e);Yt();const r=mo(o,e,0,[e.props,t]);en(),n(),v(r)?r.then(Jr,Jr):function(e,t,n){h(t)?e.render=t:y(t)&&(e.setupState=go(t));ei(e)}(e,r)}else ei(e)}(e):void 0;return t&&Zr(!1),r}function ei(e,t,n){const r=e.type;e.render||(e.render=r.render||o);{const t=Gr(e);Yt();try{xr(e)}finally{en(),t()}}}function ti(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(go(oo(e.exposed)),{get:(t,n)=>n in t?t[n]:e.proxy[n],has:(e,t)=>t in e||t in mr}))}const ni=(e,t)=>{const n=function(e,t,n=!1){let r,i;const s=h(e);return s?(r=e,i=o):(r=e.get,i=e.set),new so(r,i,s||!i,n)}(e,0,Xr);return n},oi="3.4.21";function ri(e){return po(e)}const ii="[object Array]",si="[object Object]";function ci(e,t){const n={};return ai(e,t),ui(e,t,"",n),n}function ai(e,t){if((e=ri(e))===t)return;const n=b(e),o=b(t);if(n==si&&o==si)for(let r in t){const n=e[r];void 0===n?e[r]=null:ai(n,t[r])}else n==ii&&o==ii&&e.length>=t.length&&t.forEach(((t,n)=>{ai(e[n],t)}))}function ui(e,t,n,o){if((e=ri(e))===t)return;const r=b(e),i=b(t);if(r==si)if(i!=si||Object.keys(e).length{ui(e,i[t],(""==n?"":n+".")+s+"["+t+"]",o)}));else if(c==si)if(a!=si||Object.keys(r).length{ui(e,t[r],n+"["+r+"]",o)})):li(o,n,e)}function li(e,t,n){e[t]=n}function fi(e){const t=e.ctx.__next_tick_callbacks;if(t&&t.length){const e=t.slice(0);t.length=0;for(let t=0;t{t?mo(t.bind(e.proxy),e,14):o&&o(e.proxy)})),new Promise((e=>{o=e}))}function di(e,t){const n=typeof(e=ri(e));if("object"===n&&null!==e){let n=t.get(e);if(void 0!==n)return n;if(f(e)){const o=e.length;n=new Array(o),t.set(e,n);for(let r=0;r{o[e]=n[e]})),o}(r,i));Object.keys(s).length?(o.__next_tick_pending=!0,r.setData(s,(()=>{o.__next_tick_pending=!1,fi(e)})),To()):fi(e)}}function mi(e,t,n){t.appContext.config.globalProperties.$applyOptions(e,t,n);const o=e.computed;if(o){const e=Object.keys(o);if(e.length){const n=t.ctx;n.$computedKeys||(n.$computedKeys=[]),n.$computedKeys.push(...e)}}delete t.ctx.$onApplyOptions}function yi(e,t=!1){const{setupState:n,$templateRefs:o,$templateUniElementRefs:r,ctx:{$scope:i,$mpPlatform:s}}=e;if("mp-alipay"===s)return;if(!i||!o&&!r)return;if(t)return o&&o.forEach((e=>vi(e,null,n))),void(r&&r.forEach((e=>vi(e,null,n))));const c="mp-baidu"===s||"mp-toutiao"===s,a=e=>{if(0===e.length)return[];const t=(i.selectAllComponents(".r")||[]).concat(i.selectAllComponents(".r-i-f")||[]);return e.filter((e=>{const o=function(e,t){const n=e.find((e=>e&&(e.properties||e.props).uI===t));if(n){const e=n.$vm;return e?ti(e.$)||e:function(e){y(e)&&oo(e);return e}(n)}return null}(t,e.i);return!(!c||null!==o)||(vi(e,o,n),!1)}))},u=()=>{if(o){const t=a(o);t.length&&e.proxy&&e.proxy.$scope&&e.proxy.$scope.setData({r1:1},(()=>{a(t)}))}};r&&r.length&&pi(e,(()=>{r.forEach((e=>{f(e.v)?e.v.forEach((t=>{vi(e,t,n)})):vi(e,e.v,n)}))})),i._$setRef?i._$setRef(u):pi(e,u)}function vi({r:e,f:t},n,o){if(h(e))e(n,{});else{const r=g(e),i=uo(e);if(r||i)if(t){if(!i)return;f(e.value)||(e.value=[]);const t=e.value;if(-1===t.indexOf(n)){if(t.push(n),!n)return;n.$&&ur((()=>a(t,n)),n.$)}}else r?l(o,e)&&(o[e]=n):uo(e)&&(e.value=n)}}const _i=jo;function bi(e,t){const n=e.component=zr(e,t.parentComponent,null);return n.ctx.$onApplyOptions=mi,n.ctx.$children=[],"app"===t.mpType&&(n.render=o),t.onBeforeSetup&&t.onBeforeSetup(n,t),Yr(n),t.parentComponent&&n.proxy&&t.parentComponent.ctx.$children.push(ti(n)||n.proxy),function(e){const t=$i.bind(e);e.$updateScopedSlots=()=>Eo((()=>Co(t)));const n=()=>{if(e.isMounted){const{next:t,bu:n,u:o}=e;Si(e,!1),Yt(),To(),en(),n&&j(n),Si(e,!0),gi(e,xi(e)),o&&_i(o)}else ur((()=>{yi(e,!0)}),e),gi(e,xi(e))},r=e.effect=new qt(n,o,(()=>Co(i)),e.scope),i=e.update=()=>{r.dirty&&r.run()};i.id=e.uid,Si(e,!0),i()}(n),n.proxy}function xi(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[c],slots:a,attrs:u,emit:l,render:f,renderCache:p,data:d,setupState:h,ctx:g,uid:m,appContext:{app:{config:{globalProperties:{pruneComponentPropsCache:y}}}},inheritAttrs:v}=e;let _;e.$uniElementIds=new Map,e.$templateRefs=[],e.$templateUniElementRefs=[],e.$templateUniElementStyles={},e.$ei=0,y(m),e.__counter=0===e.__counter?1:0;const b=Bo(e);try{if(4&n.shapeFlag){wi(v,s,c,u);const e=r||o;_=f.call(e,e,p,s,h,d,g)}else{wi(v,s,c,t.props?u:(e=>{let t;for(const n in e)("class"===n||"style"===n||i(n))&&((t||(t={}))[n]=e[n]);return t})(u));const e=t;_=e.length>1?e(s,{attrs:u,slots:a,emit:l}):e(s,null)}}catch(x){vo(x,e,1),_=!1}return yi(e),Bo(b),_}function wi(e,t,n,o){if(t&&o&&!1!==e){const e=Object.keys(o).filter((e=>"class"!==e&&"style"!==e));if(!e.length)return;n&&e.some(s)?e.forEach((e=>{s(e)&&e.slice(9)in n||(t[e]=o[e])})):e.forEach((e=>t[e]=o[e]))}}function $i(){const e=this.$scopedSlotsData;if(!e||0===e.length)return;const t=this.ctx.$scope,n=t.data,o=Object.create(null);e.forEach((({path:e,index:t,data:r})=>{const i=N(n,e),s=g(t)?`${e}.${t}`:`${e}[${t}]`;if(void 0===i||void 0===i[t])o[s]=r;else{const e=ci(r,i[t]);Object.keys(e).forEach((t=>{o[s+"."+t]=e[t]}))}})),e.length=0,Object.keys(o).length&&t.setData(o)}function Si({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}const ki=function(e,t=null){h(e)||(e=c({},e)),null==t||y(t)||(t=null);const n=Go(),o=new WeakSet,r=n.app={_uid:Jo++,_component:e,_props:t,_container:null,_context:n,_instance:null,version:oi,get config(){return n.config},set config(e){},use:(e,...t)=>(o.has(e)||(e&&h(e.install)?(o.add(e),e.install(r,...t)):h(e)&&(o.add(e),e(r,...t))),r),mixin:e=>(n.mixins.includes(e)||n.mixins.push(e),r),component:(e,t)=>t?(n.components[e]=t,r):n.components[e],directive:(e,t)=>t?(n.directives[e]=t,r):n.directives[e],mount(){},unmount(){},provide:(e,t)=>(n.provides[e]=t,r),runWithContext(e){const t=Qo;Qo=r;try{return e()}finally{Qo=t}}};return r};function Oi(e,t=null){("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof my?my:void 0).__VUE__=!0;const n=ki(e,t),r=n._context;r.config.globalProperties.$nextTick=function(e){return pi(this.$,e)};const i=e=>(e.appContext=r,e.shapeFlag=6,e),s=function(e,t){return bi(i(e),t)},c=function(e){return e&&function(e){const{bum:t,scope:n,update:o,um:r}=e;t&&j(t);{const t=e.parent;if(t){const n=t.ctx.$children,o=ti(e)||e.proxy,r=n.indexOf(o);r>-1&&n.splice(r,1)}}n.stop(),o&&(o.active=!1),r&&_i(r),_i((()=>{e.isUnmounted=!0}))}(e.$)};return n.mount=function(){e.render=o;const t=bi(i({type:e}),{mpType:"app",mpInstance:null,parentComponent:null,slots:[],props:null});return n._instance=t.$,t.$app=n,t.$createComponent=s,t.$destroyComponent=c,r.$appInstance=t,t},n.unmount=function(){},n}function Pi(e,t,n,o){h(t)&&or(e,t.bind(n),o)}function Ai(e,t,n){!function(e,t,n){const o=e.mpType||n.$mpType;o&&"component"!==o&&Object.keys(e).forEach((o=>{if(q(o,e[o],!1)){const r=e[o];f(r)?r.forEach((e=>Pi(o,e,n,t))):Pi(o,r,n,t)}}))}(e,t,n)}function Ei(e,t,n){return e[t]=n}function Ci(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function Ii(e){const t=e.config.errorHandler;return function(n,o,r){t&&t(n,o,r);const i=e._instance;if(!i||!i.proxy)throw n;i.onError?i.proxy.$callHook("onError",n):_o(n,0,o&&o.$.vnode,!1)}}function ji(e,t){return e?[...new Set([].concat(e,t))]:t}let Ti;const Ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Li=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Mi(){const e=Ut.getStorageSync("uni_id_token")||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((o=t[1],decodeURIComponent(Ti(o).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(r){throw new Error("获取当前用户信息出错,详细错误信息为:"+r.message)}var o;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}function Di(e){const t=e.config;var n;t.errorHandler=G(e,Ii),n=t.optionMergeStrategies,z.forEach((e=>{n[e]=ji}));const o=t.globalProperties;!function(e){e.uniIDHasRole=function(e){const{role:t}=Mi();return t.indexOf(e)>-1},e.uniIDHasPermission=function(e){const{permission:t}=Mi();return this.uniIDHasRole("admin")||t.indexOf(e)>-1},e.uniIDTokenValid=function(){const{tokenExpired:e}=Mi();return e>Date.now()}}(o),o.$set=Ei,o.$applyOptions=Ai,o.$callMethod=Ci,Ut.invokeCreateVueAppHook(e)}Ti="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Li.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,o,r="",i=0;i>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}:atob;const Ni=Object.create(null);function Hi(e){delete Ni[e]}function Vi(e){if(!e)return;const[t,n]=e.split(",");return Ni[t]?Ni[t][parseInt(n)]:void 0}var Bi={install(e){Di(e),e.config.globalProperties.pruneComponentPropsCache=Hi;const t=e.mount;e.mount=function(n){const o=t.call(e,n),r=function(){const e="createApp";if("undefined"!=typeof global&&void 0!==global[e])return global[e];if("undefined"!=typeof my)return my[e]}();return r?r(o):"undefined"!=typeof createMiniProgramApp&&createMiniProgramApp(o),o}}};function Ui(e,t){const n=qr(),r=n.ctx,i=void 0===t||"mp-weixin"!==r.$mpPlatform&&"mp-qq"!==r.$mpPlatform&&"mp-xhs"!==r.$mpPlatform||!g(t)&&"number"!=typeof t?"":"_"+t,s="e"+n.$ei+++i,a=r.$scope;if(!e)return delete a[s],s;const u=a[s];return u?u.value=e:a[s]=function(e,t){const n=e=>{var r;(r=e).type&&r.target&&(r.preventDefault=o,r.stopPropagation=o,r.stopImmediatePropagation=o,l(r,"detail")||(r.detail={}),l(r,"markerId")&&(r.detail="object"==typeof r.detail?r.detail:{},r.detail.markerId=r.markerId),x(r.detail)&&l(r.detail,"checked")&&!l(r.detail,"value")&&(r.detail.value=r.detail.checked),x(r.detail)&&(r.target=c({},r.target,r.detail)));let i=[e];t&&t.ctx.$getTriggerEventDetail&&"number"==typeof e.detail&&(e.detail=t.ctx.$getTriggerEventDetail(e.detail)),e.detail&&e.detail.__args__&&(i=e.detail.__args__);const s=n.value,a=()=>yo(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n&&n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,s),t,5,i),u=e.target,p=!!u&&(!!u.dataset&&"true"===String(u.dataset.eventsync));if(!Wi.includes(e.type)||p){const t=a();if("input"===e.type&&(f(t)||v(t)))return;return t}setTimeout(a)};return n.value=e,n}(e,n),s}const Wi=["tap","longpress","longtap","transitionend","animationstart","animationiteration","animationend","touchforcechange"];const zi=function(e,t=null){return e&&(e.mpType="app"),Oi(e,t).use(Bi)};const Fi=["externalClasses"];const qi=/_(.*)_worklet_factory_/;function Ki(e,t){const n=e.$children;for(let r=n.length-1;r>=0;r--){const e=n[r];if(e.$scope._$vueId===t)return e}let o;for(let r=n.length-1;r>=0;r--)if(o=Ki(n[r],t),o)return o}const Zi=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function Gi(e,t){const n=e.ctx;n.mpType=t.mpType,n.$mpType=t.mpType,n.$mpPlatform="mp-weixin",n.$scope=t.mpInstance,Object.defineProperties(n,{virtualHostId:{get(){const e=this.$scope.data.virtualHostId;return void 0===e?"":e}}}),n.$mp={},n._self={},e.slots={},f(t.slots)&&t.slots.length&&(t.slots.forEach((t=>{e.slots[t]=!0})),e.slots.d&&(e.slots.default=!0)),n.getOpenerEventChannel=function(){return t.mpInstance.getOpenerEventChannel()},n.$hasHook=Ji,n.$callHook=Qi,e.emit=function(e,t){return function(n,...o){const r=t.$scope;if(r&&n){const e={__args__:o};r.triggerEvent(n,e)}return e.apply(this,[n,...o])}}(e.emit,n)}function Ji(e){const t=this.$[e];return!(!t||!t.length)}function Qi(e,t){"mounted"===e&&(Qi.call(this,"bm"),this.$.isMounted=!0,e="m");const n=this.$[e];return n&&((e,t)=>{let n;for(let o=0;o{q(n,e[n])&&t.add(n)}));{const{extends:n,mixins:o}=e;o&&o.forEach((e=>Yi(e,t))),n&&Yi(n,t)}}return t}function es(e,t,n){-1!==n.indexOf(t)||l(e,t)||(e[t]=function(e){return this.$vm&&this.$vm.$callHook(t,e)})}const ts=["onReady"];function ns(e,t,n=ts){t.forEach((t=>es(e,t,n)))}function os(e,t,n=ts){Yi(t).forEach((t=>es(e,t,n)))}const rs=D((()=>{const e=[],t=h(getApp)&&getApp({allowDefault:!0});if(t&&t.$vm&&t.$vm.$){const n=t.$vm.$.appContext.mixins;if(f(n)){const t=Object.keys(F);n.forEach((n=>{t.forEach((t=>{l(n,t)&&!e.includes(t)&&e.push(t)}))}))}}return e}));const is=["onShow","onHide","onError","onThemeChange","onPageNotFound","onUnhandledRejection"];function ss(e,t){const n=e.$,o={globalData:e.$options&&e.$options.globalData||{},$vm:e,onLaunch(t){this.$vm=e;const o=n.ctx;this.$vm&&o.$scope&&o.$callHook||(Gi(n,{mpType:"app",mpInstance:this,slots:[]}),o.globalData=this.globalData,e.$callHook("onLaunch",t))}},r=wx.$onErrorHandlers;r&&(r.forEach((e=>{or("onError",e,n)})),r.length=0),function(e){const t=lo(function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=X(n&&n.language?n.language:"en")||"en"}return t}());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(e);const i=e.$.type;ns(o,is),os(o,i);{const e=i.methods;e&&c(o,e)}return o}function cs(e,t){if(h(e.onLaunch)){const t=wx.getLaunchOptionsSync&&wx.getLaunchOptionsSync();e.onLaunch(t)}h(e.onShow)&&wx.onAppShow&&wx.onAppShow((e=>{t.$callHook("onShow",e)})),h(e.onHide)&&wx.onAppHide&&wx.onAppHide((e=>{t.$callHook("onHide",e)}))}const as=["eO","uR","uRIF","uI","uT","uP","uS"];function us(e){e.properties||(e.properties={}),c(e.properties,function(e,t=!1){const n={};if(!t){let e=function(e){const t=Object.create(null);e&&e.forEach((e=>{t[e]=!0})),this.setData({$slots:t})};as.forEach((e=>{n[e]={type:null,value:""}})),n.uS={type:null,value:[]},n.uS.observer=e}return e.behaviors&&e.behaviors.includes("wx://form-field")&&(e.properties&&e.properties.name||(n.name={type:null,value:""}),e.properties&&e.properties.value||(n.value={type:null,value:""})),n}(e),function(e){const t={};return e&&e.virtualHost&&(t.virtualHostStyle={type:null,value:""},t.virtualHostClass={type:null,value:""},t.virtualHostHidden={type:null,value:""},t.virtualHostId={type:null,value:""}),t}(e.options))}const ls=[String,Number,Boolean,Object,Array,null];function fs(e,t){const n=function(e,t){return f(e)&&1===e.length?e[0]:e}(e);return-1!==ls.indexOf(n)?n:null}function ps(e,t){return(t?function(e){const t={};x(e)&&Object.keys(e).forEach((n=>{-1===as.indexOf(n)&&(t[n]=e[n])}));return t}(e):Vi(e.uP))||{}}function ds(e){const t=function(){const e=this.properties.uP;e&&(this.$vm?function(e,t){const n=no(t.props),o=Vi(e)||{};hs(n,o)&&(!function(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,c=no(r),[a]=e.propsOptions;let u=!1;if(!(o||s>0)||16&s){let o;Tr(e,t,r,i)&&(u=!0);for(const i in c)t&&(l(t,i)||(o=A(i))!==i&&l(t,o))||(a?!n||void 0===n[i]&&void 0===n[o]||(r[i]=Rr(a,c,i,void 0,e,!0)):delete r[i]);if(i!==c)for(const e in i)t&&l(t,e)||(delete i[e],u=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o-1&&function(e){const t=wo.indexOf(e);t>$o&&wo.splice(t,1)}(t.update),t.update());var r}(e,this.$vm.$):"m"===this.properties.uT&&function(e,t){const n=t.properties,o=Vi(e)||{};hs(n,o,!1)&&t.setData(o)}(e,this))};e.observers||(e.observers={}),e.observers.uP=t}function hs(e,t,n=!0){const o=Object.keys(t);if(n&&o.length!==Object.keys(e).length)return!0;for(let r=0;r{o.push(e.replace("uni://","wx://")),"uni://form-field"===e&&(f(n)?(n.push("name"),n.push("modelValue")):(n.name={type:String,default:""},n.modelValue={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),o}(t)}function ms(e,{parse:t,mocks:n,isPage:o,isPageInProject:r,initRelation:i,handleLink:s,initLifetimes:a}){e=e.default||e;const u={multipleSlots:!0,addGlobalClass:!0,pureDataPattern:/^uP$/};f(e.mixins)&&e.mixins.forEach((e=>{y(e.options)&&c(u,e.options)})),e.options&&c(u,e.options);const p={options:u,lifetimes:a({mocks:n,isPage:o,initRelation:i,vueOptions:e}),pageLifetimes:{show(){this.$vm&&this.$vm.$callHook("onPageShow")},hide(){this.$vm&&this.$vm.$callHook("onPageHide")},resize(e){this.$vm&&this.$vm.$callHook("onPageResize",e)}},methods:{__l:s}};var d,h,g,m;return gs(p,e),us(p),ds(p),function(e,t){Fi.forEach((n=>{l(t,n)&&(e[n]=t[n])}))}(p,e),d=p.methods,h=e.wxsCallMethods,f(h)&&h.forEach((e=>{d[e]=function(t){return this.$vm[e](t)}})),g=p.methods,(m=e.methods)&&Object.keys(m).forEach((e=>{const t=e.match(qi);if(t){const n=t[1];g[e]=m[e],g[n]=m[n]}})),t&&t(p,{handleLink:s}),p}let ys,vs;function _s(){return getApp().$vm}function bs(e,t){const{parse:n,mocks:o,isPage:r,initRelation:i,handleLink:s,initLifetimes:c}=t,a=ms(e,{mocks:o,isPage:r,isPageInProject:!0,initRelation:i,handleLink:s,initLifetimes:c});!function({properties:e},t){f(t)?t.forEach((t=>{e[t]={type:String,value:""}})):x(t)&&Object.keys(t).forEach((n=>{const o=t[n];if(x(o)){let t=o.default;h(t)&&(t=t());const r=o.type;o.type=fs(r),e[n]={type:o.type,value:t}}else e[n]={type:fs(o)}}))}(a,(e.default||e).props);const u=a.methods;return u.onLoad=function(e){var t;return this.options=e,this.$page={fullPath:(t=this.route+U(e),function(e){return 0===e.indexOf("/")}(t)?t:"/"+t)},this.$vm&&this.$vm.$callHook("onLoad",e)},ns(u,Xi),os(u,e),function(e,t){if(!t)return;Object.keys(F).forEach((n=>{t&F[n]&&es(e,n,[])}))}(u,e.__runtimeHooks),ns(u,rs()),n&&n(a,{handleLink:s}),a}const xs=Page,ws=Component;function $s(e){const t=e.triggerEvent,n=function(n,...o){return t.apply(e,[(r=n,O(r.replace(V,"-"))),...o]);var r};try{e.triggerEvent=n}catch(o){e._triggerEvent=n}}function Ss(e,t,n){const o=t[e];t[e]=o?function(...e){return $s(this),o.apply(this,e)}:function(){$s(this)}}Page=function(e){return Ss("onLoad",e),xs(e)},Component=function(e){Ss("created",e);return e.properties&&e.properties.uP||(us(e),ds(e)),ws(e)};var ks=Object.freeze({__proto__:null,handleLink:function(e){const t=e.detail||e.value,n=t.vuePid;let o;n&&(o=Ki(this.$vm,n)),o||(o=this.$vm),t.parent=o},initLifetimes:function({mocks:e,isPage:t,initRelation:n,vueOptions:o}){return{attached(){let r=this.properties;!function(e,t){if(!e)return;const n=e.split(","),o=n.length;1===o?t._$vueId=n[0]:2===o&&(t._$vueId=n[0],t._$vuePid=n[1])}(r.uI,this);const i={vuePid:this._$vuePid};n(this,i);const s=this,c=t(s);let a=r;this.$vm=function(e,t){ys||(ys=_s().$createComponent);const n=ys(e,t);return ti(n.$)||n}({type:o,props:ps(a,c)},{mpType:c?"page":"component",mpInstance:s,slots:r.uS||{},parentComponent:i.parent&&i.parent.$,onBeforeSetup(t,n){!function(e,t){Object.defineProperty(e,"refs",{get(){const e={};return function(e,t,n){e.selectAllComponents(t).forEach((e=>{const t=e.properties.uR;n[t]=e.$vm||e}))}(t,".r",e),t.selectAllComponents(".r-i-f").forEach((t=>{const n=t.properties.uR;n&&(e[n]||(e[n]=[]),e[n].push(t.$vm||t))})),e}})}(t,s),function(e,t,n){const o=e.ctx;n.forEach((n=>{l(t,n)&&(e[n]=o[n]=t[n])}))}(t,s,e),function(e,t){Gi(e,t);const n=e.ctx;Zi.forEach((e=>{n[e]=function(...t){const o=n.$scope;if(o&&o[e])return o[e].apply(o,t)}}))}(t,n)}}),c||function(e){const t=e.$options;f(t.behaviors)&&t.behaviors.includes("uni://form-field")&&e.$watch("modelValue",(()=>{e.$scope&&e.$scope.setData({name:e.name,value:e.modelValue})}),{immediate:!0})}(this.$vm)},ready(){this.$vm&&(this.$vm.$callHook("mounted"),this.$vm.$callHook("onReady"))},detached(){var e;this.$vm&&(Hi(this.$vm.$.uid),e=this.$vm,vs||(vs=_s().$destroyComponent),vs(e))}}},initRelation:function(e,t){e.triggerEvent("__l",t)},isPage:function(e){return!!e.route},mocks:["__route__","__wxExparserNodeId__","__wxWebviewId__"]});const Os=function(e){return App(ss(e))},Ps=(As=ks,function(e){return Component(bs(e,As))});var As;const Es=function(e){return function(t){return Component(ms(t,e))}}(ks),Cs=function(e){cs(ss(e),e)},Is=function(e){const t=ss(e),n=h(getApp)&&getApp({allowDefault:!0});if(!n)return;e.$.ctx.$scope=n;const o=n.globalData;o&&Object.keys(t.globalData).forEach((e=>{l(o,e)||(o[e]=t.globalData[e])})),Object.keys(t).forEach((e=>{l(n,e)||(n[e]=t[e])})),cs(t,e)};function js(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime());else if(e instanceof RegExp)n=new RegExp(e);else if(e instanceof Map)n=new Map(Array.from(e,(([e,n])=>[e,js(n,t)])));else if(e instanceof Set)n=new Set(Array.from(e,(e=>js(e,t))));else if(Array.isArray(e))n=e.map((e=>js(e,t)));else if("[object Object]"===Object.prototype.toString.call(e)){n=Object.create(Object.getPrototypeOf(e)),t.set(e,n);for(const[o,r]of Object.entries(e))n[o]=js(r,t)}else n=Object.assign({},e);return t.set(e,n),n}function Ts(e={},t={}){if("object"!=typeof(e=js(e))||null===e||"object"!=typeof t||null===t)return e;const n=Array.isArray(e)?e.slice():Object.assign({},e);for(const o in t){if(!t.hasOwnProperty(o))continue;const e=t[o],r=n[o];e instanceof Date?n[o]=new Date(e):e instanceof RegExp?n[o]=new RegExp(e):e instanceof Map?n[o]=new Map(e):e instanceof Set?n[o]=new Set(e):n[o]="object"==typeof e&&null!==e?Ts(r,e):e}return n}function Rs(e){switch(typeof e){case"undefined":return!0;case"string":if(0==e.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"").length)return!0;break;case"boolean":if(!e)return!0;break;case"number":if(0===e||isNaN(e))return!0;break;case"object":if(null===e||0===e.length)return!0;for(var t in e)return!1;return!0}return!1}wx.createApp=global.createApp=Os,wx.createPage=Ps,wx.createComponent=Es,wx.createPluginApp=global.createPluginApp=Cs,wx.createSubpackageApp=global.createSubpackageApp=Is;const Ls={email:function(e){return/[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(e)},mobile:function(e){return/^1[3-9]\d{9}$/.test(e)},url:function(e){return/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(e)},date:function(e){return!/Invalid|NaN/.test(new Date(e).toString())},dateISO:function(e){return/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},number:function(e){return/^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(e)},digits:function(e){return/^\d+$/.test(e)},idCard:function(e){return/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e)},carNo:function(e){const t=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/,n=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;return 7===e.length?n.test(e):8===e.length&&t.test(e)},amount:function(e){return/^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(e)},chinese:function(e){return/^[\u4e00-\u9fa5]+$/gi.test(e)},letter:function(e){return/^[a-zA-Z]*$/.test(e)},enOrNum:function(e){return/^[0-9a-zA-Z]*$/g.test(e)},contains:function(e,t){return e.indexOf(t)>=0},range:function(e,t){return e>=t[0]&&e<=t[1]},rangeLength:function(e,t){return e.length>=t[0]&&e.length<=t[1]},empty:Rs,isEmpty:Rs,jsonString:function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(n){return!1}return!1},landline:function(e){return/^\d{3,4}-\d{7,8}(-\d{3,4})?$/.test(e)},object:function(e){return"[object Object]"===Object.prototype.toString.call(e)},array:function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},code:function(e,t=6){return new RegExp(`^\\d{${t}}$`).test(e)}};const Ms=new class{setConfig(e){this.config=Ts(this.config,e)}request(e={}){if(this.interceptor.request&&"function"==typeof this.interceptor.request){let t=this.interceptor.request(e);if(!1===t)return new Promise((()=>{}));this.options=t}return e.dataType=e.dataType||this.config.dataType,e.responseType=e.responseType||this.config.responseType,e.url=e.url||"",e.params=e.params||{},e.header=Object.assign({},this.config.header,e.header),e.method=e.method||this.config.method,new Promise(((t,n)=>{e.complete=e=>{if(Ut.hideLoading(),clearTimeout(this.config.timer),this.config.timer=null,this.config.originalData)if(this.interceptor.response&&"function"==typeof this.interceptor.response){let o=this.interceptor.response(e);!1!==o?t(o):n(e)}else t(e);else if(200==e.statusCode)if(this.interceptor.response&&"function"==typeof this.interceptor.response){let o=this.interceptor.response(e.data);!1!==o?t(o):n(e.data)}else t(e.data);else n(e)},e.url=Ls.url(e.url)?e.url:this.config.baseUrl+(0==e.url.indexOf("/")?e.url:"/"+e.url),this.config.showLoading&&!this.config.timer&&(this.config.timer=setTimeout((()=>{Ut.showLoading({title:this.config.loadingText,mask:this.config.loadingMask}),this.config.timer=null}),this.config.loadingTime)),Ut.request(e)}))}constructor(){this.config={baseUrl:"",header:{},method:"POST",dataType:"json",responseType:"text",showLoading:!0,loadingText:"请求中...",loadingTime:800,timer:null,originalData:!1,loadingMask:!0},this.interceptor={request:null,response:null},this.get=(e,t={},n={})=>this.request({method:"GET",url:e,header:n,data:t}),this.post=(e,t={},n={})=>this.request({url:e,method:"POST",header:n,data:t}),this.put=(e,t={},n={})=>this.request({url:e,method:"PUT",header:n,data:t}),this.delete=(e,t={},n={})=>this.request({url:e,method:"DELETE",header:n,data:t})}};const Ds=(new class{constructor(){this.config={type:"navigateTo",url:"",delta:1,params:{},animationType:"pop-in",animationDuration:300,intercept:!1},this.route=this.route.bind(this)}addRootPath(e){return"/"===e[0]?e:`/${e}`}mixinParam(e,t){e=e&&this.addRootPath(e);let n="";return/.*\/.*\?.*=.*/.test(e)?(n=Ut.$u.queryParams(t,!1),e+"&"+n):(n=Ut.$u.queryParams(t),e+n)}async route(e={},t={}){let n={};if("string"==typeof e?(n.url=this.mixinParam(e,t),n.type="navigateTo"):(n=Ut.$u.deepMerge(this.config,e),n.url=this.mixinParam(e.url,e.params)),t.intercept&&(this.config.intercept=t.intercept),n.params=t,n=Ut.$u.deepMerge(this.config,n),"function"==typeof Ut.$u.routeIntercept){await new Promise(((e,t)=>{Ut.$u.routeIntercept(n,e)}))&&this.openPage(n)}else this.openPage(n)}openPage(e){const{url:t,type:n,delta:o,animationType:r,animationDuration:i}=e;"navigateTo"!=e.type&&"to"!=e.type||Ut.navigateTo({url:t,animationType:r,animationDuration:i}),"redirectTo"!=e.type&&"redirect"!=e.type||Ut.redirectTo({url:t}),"switchTab"!=e.type&&"tab"!=e.type||Ut.switchTab({url:t}),"reLaunch"!=e.type&&"launch"!=e.type||Ut.reLaunch({url:t}),"navigateBack"!=e.type&&"back"!=e.type||Ut.navigateBack({delta:o})}}).route;function Ns(e=null,t="yyyy-mm-dd"){e||(e=Number(new Date)),10==e.toString().length&&(e*=1e3);let n,o=new Date(e),r={"y+":o.getFullYear().toString(),"m+":(o.getMonth()+1).toString(),"d+":o.getDate().toString(),"h+":o.getHours().toString(),"M+":o.getMinutes().toString(),"s+":o.getSeconds().toString()};for(let i in r)n=new RegExp("("+i+")").exec(t),n&&(t=t.replace(n[1],1==n[1].length?r[i]:r[i].padStart(n[1].length,"0")));return t}function Hs(e,t=!0){if((e=e.toLowerCase())&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)){if(4===e.length){let t="#";for(let n=1;n<4;n+=1)t+=e.slice(n,n+1).concat(e.slice(n,n+1));e=t}let n=[];for(let t=1;t<7;t+=2)n.push(parseInt("0x"+e.slice(t,t+2)));return t?`rgb(${n[0]},${n[1]},${n[2]})`:n}if(/^(rgb|RGB)/.test(e)){return e.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)))}return e}function Vs(e){let t=e;if(/^(rgb|RGB)/.test(t)){let e=t.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(","),n="#";for(let t=0;t=e)return String(n);let o=e-n.length,r=Math.ceil(o/t.length);for(;r>>=1;)t+=t,1===r&&(t+=t);return t.slice(0,o)+n});const Bs={colorGradient:function(e="rgb(0, 0, 0)",t="rgb(255, 255, 255)",n=10){let o=Hs(e,!1),r=o[0],i=o[1],s=o[2],c=Hs(t,!1),a=(c[0]-r)/n,u=(c[1]-i)/n,l=(c[2]-s)/n,f=[];for(let p=0;p=0))if(t.constructor===Array)switch(n){case"indices":for(let n=0;n{r.push(i+"[]="+e)}));break;case"repeat":t.forEach((e=>{r.push(i+"="+e)}));break;case"comma":let e="";t.forEach((t=>{e+=(e?",":"")+t})),r.push(i+"="+e)}else r.push(i+"="+t)}return r.length?o+r.join("&"):""},route:Ds,timeFormat:Ns,date:Ns,timeFrom:function(e=null,t="yyyy-mm-dd"){e||(e=Number(new Date)),10==e.toString().length&&(e*=1e3);let n=+new Date(Number(e)),o=(Number(new Date)-n)/1e3,r="";switch(!0){case o<300:r="刚刚";break;case o>=300&&o<3600:r=parseInt(o/60)+"分钟前";break;case o>=3600&&o<86400:r=parseInt(o/3600)+"小时前";break;case o>=86400&&o<2592e3:r=parseInt(o/86400)+"天前";break;default:r=!1===t?o>=2592e3&&o<31536e3?parseInt(o/2592e3)+"个月前":parseInt(o/31536e3)+"年前":Ns(n,t)}return r},colorGradient:Bs.colorGradient,colorToRgba:Bs.colorToRgba,guid:function(e=32,t=!0,n=null){let o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),r=[];if(n=n||o.length,e)for(let i=0;iMath.random()-.5))},wranning:function(e){},get:Ms.get,post:Ms.post,put:Ms.put,delete:Ms.delete,hexToRgb:Bs.hexToRgb,rgbToHex:Bs.rgbToHex,test:Ls,random:function(e,t){if(e>=0&&t>0&&t>=e){let n=t-e+1;return Math.floor(Math.random()*n+e)}return 0},deepClone:js,deepMerge:Ts,getParent:function(e,t){let n=this.$parent;for(;n;){if(n.$options.name===e){let e={};if(Array.isArray(t))t.map((t=>{e[t]=n[t]?n[t]:""}));else for(let o in t)Array.isArray(t[o])?t[o].length?e[o]=t[o]:e[o]=n[o]:t[o].constructor===Object?Object.keys(t[o]).length?e[o]=t[o]:e[o]=n[o]:e[o]=t[o]||!1===t[o]?t[o]:n[o];return e}n=n.$parent}return{}},$parent:function(e){let t=this.$parent;for(;t;){if(!t.$options||t.$options.name===e)return t;t=t.$parent}return!1},addUnit:function(e="auto",t="rpx"){return e=String(e),Ls.number(e)?`${e}${t}`:e},trim:function(e,t="both"){return"both"==t?e.replace(/^\s+|\s+$/g,""):"left"==t?e.replace(/^\s*/,""):"right"==t?e.replace(/(\s*$)/g,""):"all"==t?e.replace(/\s+/g,""):e},type:["primary","success","error","warning","info"],http:Ms,toast:function(e,t=1500){Ut.showToast({title:e,icon:"none",duration:t})},config:zs,zIndex:{toast:10090,noNetwork:10080,popup:10075,mask:10070,navbar:980,topTips:975,sticky:970,indexListSticky:965},debounce:function(e,t=500,n=!1){if(null!==Ws&&clearTimeout(Ws),n){var o=!Ws;Ws=setTimeout((function(){Ws=null}),t),o&&"function"==typeof e&&e()}else Ws=setTimeout((function(){"function"==typeof e&&e()}),t)},throttle:function(e,t=500,n=!0){n?Us||(Us=!0,"function"==typeof e&&e(),setTimeout((()=>{Us=!1}),t)):Us||(Us=!0,setTimeout((()=>{Us=!1,"function"==typeof e&&e()}),t))}};Ut.$u=Fs;const qs=(e=>(t,n=qr())=>{!Xr&&or(e,t,n)})("onLoad");exports._export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},exports.computed=ni,exports.createSSRApp=zi,exports.e=(e,...t)=>c(e,...t),exports.f=(e,t)=>function(e,t){let n;if(f(e)||g(e)){n=new Array(e.length);for(let o=0,r=e.length;ot(e,n,n)));else{const o=Object.keys(e);n=new Array(o.length);for(let r=0,i=o.length;rR(e),exports.o=(e,t)=>Ui(e,t),exports.onLoad=qs,exports.onMounted=sr,exports.p=e=>function(e){const{uid:t,__counter:n}=qr();return t+","+((Ni[t]||(Ni[t]=[])).push(Br(e))-1)+","+n}(e),exports.reactive=Jn,exports.ref=lo,exports.resolveComponent=function(e,t){return function(e,t,n=!0,o=!1){const r=Vo||Fr;if(r){const n=r.type;if("components"===e){const e=function(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===O(t)||e===E(O(t))))return n}const i=Uo(r[e]||n[e],t)||Uo(r.appContext[e],t);return!i&&o?n:i}}("components",e,!0,t)||e},exports.t=e=>(e=>g(e)?e:null==e?"":f(e)||y(e)&&(e.toString===_||!h(e.toString))?JSON.stringify(e,L,2):String(e))(e),exports.wx$1=Bt; +function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],o=()=>{},r=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,l=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>"[object Map]"===b(e),d=e=>"[object Set]"===b(e),h=e=>"function"==typeof e,g=e=>"string"==typeof e,m=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,v=e=>(y(e)||h(e))&&h(e.then)&&h(e.catch),_=Object.prototype.toString,b=e=>_.call(e),x=e=>"[object Object]"===b(e),w=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,$=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),S=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},k=/-(\w)/g,O=S((e=>e.replace(k,((e,t)=>t?t.toUpperCase():"")))),P=/\B([A-Z])/g,A=S((e=>e.replace(P,"-$1").toLowerCase())),E=S((e=>e.charAt(0).toUpperCase()+e.slice(1))),C=S((e=>e?`on${E(e)}`:"")),I=(e,t)=>!Object.is(e,t),j=(e,t)=>{for(let n=0;n{const t=parseFloat(e);return isNaN(t)?e:t};function R(e){let t="";if(g(e))t=e;else if(f(e))for(let n=0;nt&&t.__v_isRef?L(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[M(t,o)+" =>"]=n,e)),{})}:d(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>M(e)))}:m(t)?M(t):!y(t)||f(t)||x(t)?t:String(t),M=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};function D(e,t=null){let n;return(...o)=>(e&&(n=e.apply(t,o),e=null),n)}function N(e,t){if(!g(t))return;const n=(t=t.replace(/\[(\d+)\]/g,".$1")).split(".");let o=n[0];return e||(e={}),1===n.length?e[o]:N(e[o],n.slice(1).join("."))}function H(e){let t={};return x(e)&&Object.keys(e).sort().forEach((n=>{const o=n;t[o]=e[o]})),Object.keys(t)?t:e}const V=/:/g;const B=encodeURIComponent;function U(e,t=B){const n=e?Object.keys(e).map((n=>{let o=e[n];return void 0===typeof o||null===o?o="":x(o)&&(o=JSON.stringify(o)),t(n)+"="+t(o)})).filter((e=>e.length>0)).join("&"):null;return n?`?${n}`:""}const W=["onInit","onLoad","onShow","onHide","onUnload","onBackPress","onPageScroll","onTabItemTap","onReachBottom","onPullDownRefresh","onShareTimeline","onShareAppMessage","onShareChat","onAddToFavorites","onSaveExitState","onNavigationBarButtonTap","onNavigationBarSearchInputClicked","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputFocusChanged"];const z=["onShow","onHide","onLaunch","onError","onThemeChange","onPageNotFound","onUnhandledRejection","onExit","onInit","onLoad","onReady","onUnload","onResize","onBackPress","onPageScroll","onTabItemTap","onReachBottom","onPullDownRefresh","onShareTimeline","onAddToFavorites","onShareAppMessage","onShareChat","onSaveExitState","onNavigationBarButtonTap","onNavigationBarSearchInputClicked","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputFocusChanged"],F=(()=>({onPageScroll:1,onShareAppMessage:2,onShareTimeline:4}))();function q(e,t,n=!0){return!(n&&!h(t))&&(z.indexOf(e)>-1||0===e.indexOf("on"))}let K;const Z=[];const G=D(((e,t)=>t(e))),J=function(){};J.prototype={_id:1,on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n,_id:this._id}),this._id++},once:function(e,t,n){var o=this;function r(){o.off(e,r),t.apply(n,arguments)}return r._=t,this.on(e,r,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,r=n.length;o=0;i--)if(o[i].fn===t||o[i].fn._===t||o[i]._id===t){o.splice(i,1);break}r=o}return r.length?n[e]=r:delete n[e],this}};var Q=J;function X(e,t){if(!e)return;if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if("chinese"===(e=e.toLowerCase()))return"zh-Hans";if(0===e.indexOf("zh"))return e.indexOf("-hans")>-1?"zh-Hans":e.indexOf("-hant")>-1?"zh-Hant":(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?"zh-Hant":"zh-Hans");var n;let o=["en","fr","es"];t&&Object.keys(t).length>0&&(o=Object.keys(t));const r=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return r||void 0}function Y(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}let ee=1;const te={};function ne(e,t,n){if("number"==typeof e){const o=te[e];if(o)return o.keepAlive||delete te[e],o.callback(t,n)}return t}const oe="success",re="fail",ie="complete";function se(e,t={},{beforeAll:n,beforeSuccess:o}={}){x(t)||(t={});const{success:r,fail:i,complete:s}=function(e){const t={};for(const n in e){const o=e[n];h(o)&&(t[n]=Y(o),delete e[n])}return t}(t),c=h(r),a=h(i),u=h(s),l=ee++;return function(e,t,n,o=!1){te[e]={name:t,keepAlive:o,callback:n}}(l,e,(l=>{(l=l||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(l.errMsg,e),h(n)&&n(l),l.errMsg===e+":ok"?(h(o)&&o(l,t),c&&r(l)):a&&i(l),u&&s(l)})),l}const ce="success",ae="fail",ue="complete",le={},fe={};function pe(e,t){return function(n){return e(n,t)||n}}function de(e,t,n){let o=!1;for(let r=0;re(t),catch(){}}}function he(e,t={}){return[ce,ae,ue].forEach((n=>{const o=e[n];if(!f(o))return;const r=t[n];t[n]=function(e){de(o,e,t).then((e=>h(r)&&r(e)||e))}})),t}function ge(e,t){const n=[];f(le.returnValue)&&n.push(...le.returnValue);const o=fe[e];return o&&f(o.returnValue)&&n.push(...o.returnValue),n.forEach((e=>{t=e(t)||t})),t}function me(e){const t=Object.create(null);Object.keys(le).forEach((e=>{"returnValue"!==e&&(t[e]=le[e].slice())}));const n=fe[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function ye(e,t,n,o){const r=me(e);if(r&&Object.keys(r).length){if(f(r.invoke)){return de(r.invoke,n).then((n=>t(he(me(e),n),...o)))}return t(he(r,n),...o)}return t(n,...o)}function ve(e,t){return(n={},...o)=>function(e){return!(!x(e)||![oe,re,ie].find((t=>h(e[t]))))}(n)?ge(e,ye(e,t,n,o)):ge(e,new Promise(((r,i)=>{ye(e,t,c(n,{success:r,fail:i}),o)})))}function _e(e,t,n,o={}){const r=t+":fail";let i="";return i=n?0===n.indexOf(r)?n:r+" "+n:r,delete o.errCode,ne(e,c({errMsg:i},o))}function be(e,t,n,o){const r=function(e,t){e[0]}(t);if(r)return r}function xe(e,t,n,o){return n=>{const r=se(e,n,o),i=be(0,[n]);return i?_e(r,e,i):t(n,{resolve:t=>function(e,t,n){return ne(e,c(n||{},{errMsg:t+":ok"}))}(r,e,t),reject:(t,n)=>_e(r,e,function(e){return!e||g(e)?e:e.stack?("undefined"!=typeof globalThis&&globalThis.harmonyChannel||console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function we(e,t,n,o){return function(e,t,n,o){return(...e)=>{const n=be(0,e);if(n)throw new Error(n);return t.apply(null,e)}}(0,t)}let $e=!1,Se=0,ke=0;const Oe=we(0,((e,t)=>{if(0===Se&&function(){var e,t;let n,o,r;{const i=(null===(e=wx.getWindowInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync(),s=(null===(t=wx.getDeviceInfo)||void 0===t?void 0:t.call(wx))||wx.getSystemInfoSync();n=i.windowWidth,o=i.pixelRatio,r=s.platform}Se=n,ke=o,$e="ios"===r}(),0===(e=Number(e)))return 0;let n=e/750*(t||Se);return n<0&&(n=-n),n=Math.floor(n+1e-4),0===n&&(n=1!==ke&&$e?.5:1),e<0?-n:n}));function Pe(e,t){Object.keys(t).forEach((n=>{h(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):f(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n{const o=e[n],r=t[n];f(o)&&h(r)&&a(o,r)}))}const Ee=we(0,((e,t)=>{g(e)&&x(t)?Pe(fe[e]||(fe[e]={}),t):x(e)&&Pe(le,e)})),Ce=we(0,((e,t)=>{g(e)?x(t)?Ae(fe[e],t):delete fe[e]:x(e)&&Ae(le,e)}));const Ie=new class{constructor(){this.$emitter=new Q}on(e,t){return this.$emitter.on(e,t)}once(e,t){return this.$emitter.once(e,t)}off(e,t){e?this.$emitter.off(e,t):this.$emitter.e={}}emit(e,...t){this.$emitter.emit(e,...t)}},je=we(0,((e,t)=>(Ie.on(e,t),()=>Ie.off(e,t)))),Te=we(0,((e,t)=>(Ie.once(e,t),()=>Ie.off(e,t)))),Re=we(0,((e,t)=>{f(e)||(e=e?[e]:[]),e.forEach((e=>{Ie.off(e,t)}))})),Le=we(0,((e,...t)=>{Ie.emit(e,...t)}));let Me,De,Ne;function He(e){try{return JSON.parse(e)}catch(t){}return e}const Ve=[];function Be(e,t){Ve.forEach((n=>{n(e,t)})),Ve.length=0}const Ue=ve(We="getPushClientId",function(e,t,n,o){return xe(e,t,0,o)}(We,((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{void 0===Ne&&(Ne=!1,Me="",De="uniPush is not enabled"),Ve.push(((e,o)=>{e?t({cid:e}):n(o)})),void 0!==Me&&Be(Me,De)}))}),0,ze));var We,ze;const Fe=[],qe=/^\$|__f__|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|rpx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/,Ke=/^create|Manager$/,Ze=["createBLEConnection"],Ge=["request","downloadFile","uploadFile","connectSocket"],Je=["createBLEConnection"],Qe=/^on|^off/;function Xe(e){return Ke.test(e)&&-1===Ze.indexOf(e)}function Ye(e){return qe.test(e)&&-1===Je.indexOf(e)}function et(e){return-1!==Ge.indexOf(e)}function tt(e){return!(Xe(e)||Ye(e)||function(e){return Qe.test(e)&&"onPush"!==e}(e))}function nt(e,t){return tt(e)&&h(t)?function(n={},...o){return h(n.success)||h(n.fail)||h(n.complete)?ge(e,ye(e,t,n,o)):ge(e,new Promise(((r,i)=>{ye(e,t,c({},n,{success:r,fail:i}),o)})))}:t}Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e&&e()).then((()=>n))),(n=>t.resolve(e&&e()).then((()=>{throw n}))))});const ot=["success","fail","cancel","complete"];const rt=()=>{const e=h(getApp)&&getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=X(n&&n.language?n.language:"en")||"en"}return t}()},it=[];"undefined"!=typeof global&&(global.getLocale=rt);let st;function ct(e=wx){return function(t,n){st=st||e.getStorageSync("__DC_STAT_UUID"),st||(st=Date.now()+""+Math.floor(1e7*Math.random()),wx.setStorage({key:"__DC_STAT_UUID",data:st})),n.deviceId=st}}function at(e,t){if(e.safeArea){const n=e.safeArea;t.safeAreaInsets={top:n.top,left:n.left,right:e.windowWidth-n.right,bottom:e.screenHeight-n.bottom}}}function ut(e,t){let n="",o="";switch(n=e.split(" ")[0]||t,o=e.split(" ")[1]||"",n=n.toLocaleLowerCase(),n){case"harmony":case"ohos":case"openharmony":n="harmonyos";break;case"iphone os":n="ios";break;case"mac":case"darwin":n="macos";break;case"windows_nt":n="windows"}return{osName:n,osVersion:o}}function lt(e,t){let n=e.deviceType||"phone";{const e={ipad:"pad",windows:"pc",mac:"pc"},o=Object.keys(e),r=t.toLocaleLowerCase();for(let t=0;t{at(e,t),ct()(e,t),function(e,t){const{brand:n="",model:o="",system:r="",language:i="",theme:s,version:a,platform:u,fontSizeSetting:l,SDKVersion:f,pixelRatio:p,deviceOrientation:d}=e,{osName:h,osVersion:g}=ut(r,u);let m=a,y=lt(e,o),v=ft(n),_=dt(e),b=d,x=p,w=f;const $=(i||"").replace(/_/g,"-"),S={appId:"__UNI__A871B6B",appName:"uni-fans-score",appVersion:"1.0.0",appVersionCode:"100",appLanguage:pt($),uniCompileVersion:"4.66",uniCompilerVersion:"4.66",uniRuntimeVersion:"4.66",uniPlatform:"mp-weixin",deviceBrand:v,deviceModel:o,deviceType:y,devicePixelRatio:x,deviceOrientation:b,osName:h,osVersion:g,hostTheme:s,hostVersion:m,hostLanguage:$,hostName:_,hostSDKVersion:w,hostFontSizeSetting:l,windowTop:0,windowBottom:0,osLanguage:void 0,osTheme:void 0,ua:void 0,hostPackageName:void 0,browserName:void 0,browserVersion:void 0,isUniAppX:!1};c(t,S)}(e,t)}},gt=ht,mt={args(e,t){let n=parseInt(e.current);if(isNaN(n))return;const o=e.urls;if(!f(o))return;const r=o.length;return r?(n<0?n=0:n>=r&&(n=r-1),n>0?(t.current=o[n],t.urls=o.filter(((e,t)=>!(t{const{brand:n,model:o,system:r="",platform:i=""}=e;let s=lt(e,o),a=ft(n);ct()(e,t);const{osName:u,osVersion:l}=ut(r,i);t=H(c(t,{deviceType:s,deviceBrand:a,deviceModel:o,osName:u,osVersion:l}))}},_t={returnValue:(e,t)=>{const{version:n,language:o,SDKVersion:r,theme:i}=e;let s=dt(e),a=(o||"").replace(/_/g,"-");const u={hostVersion:n,hostLanguage:a,hostName:s,hostSDKVersion:r,hostTheme:i,appId:"__UNI__A871B6B",appName:"uni-fans-score",appVersion:"1.0.0",appVersionCode:"100",appLanguage:pt(a),isUniAppX:!1,uniPlatform:"mp-weixin",uniCompileVersion:"4.66",uniCompilerVersion:"4.66",uniRuntimeVersion:"4.66"};c(t,u)}},bt={returnValue:(e,t)=>{at(e,t),t=H(c(t,{windowTop:0,windowBottom:0}))}},xt={args(e){const t=getApp({allowDefault:!0})||{};t.$vm?or("onError",e,t.$vm.$):(wx.$onErrorHandlers||(wx.$onErrorHandlers=[]),wx.$onErrorHandlers.push(e))}},wt={args(e){const t=getApp({allowDefault:!0})||{};if(t.$vm){if(e.__weh){const n=t.$vm.$.onError;if(n){const t=n.indexOf(e.__weh);t>-1&&n.splice(t,1)}}}else{if(!wx.$onErrorHandlers)return;const t=wx.$onErrorHandlers.findIndex((t=>t===e));-1!==t&&wx.$onErrorHandlers.splice(t,1)}}},$t={args(){if(wx.__uni_console__){if(wx.__uni_console_warned__)return;wx.__uni_console_warned__=!0,console.warn("开发模式下小程序日志回显会使用 socket 连接,为了避免冲突,建议使用 SocketTask 的方式去管理 WebSocket 或手动关闭日志回显功能。[详情](https://uniapp.dcloud.net.cn/tutorial/run/mp-log.html)")}}},St=$t,kt={$on:je,$off:Re,$once:Te,$emit:Le,upx2px:Oe,rpx2px:Oe,interceptors:{},addInterceptor:Ee,removeInterceptor:Ce,onCreateVueApp:function(e){if(K)return e(K);Z.push(e)},invokeCreateVueAppHook:function(e){K=e,Z.forEach((t=>t(e)))},getLocale:rt,setLocale:e=>{const t=h(getApp)&&getApp();if(!t)return!1;return t.$vm.$locale!==e&&(t.$vm.$locale=e,it.forEach((t=>t({locale:e}))),!0)},onLocaleChange:e=>{-1===it.indexOf(e)&&it.push(e)},getPushClientId:Ue,onPushMessage:e=>{-1===Fe.indexOf(e)&&Fe.push(e)},offPushMessage:e=>{if(e){const t=Fe.indexOf(e);t>-1&&Fe.splice(t,1)}else Fe.length=0},invokePushCallback:function(e){if("enabled"===e.type)Ne=!0;else if("clientId"===e.type)Me=e.cid,De=e.errMsg,Be(Me,e.errMsg);else if("pushMsg"===e.type){const t={type:"receive",data:He(e.message)};for(let e=0;e{t({type:"click",data:He(e.message)})}))},__f__:function(e,t,...n){t&&n.push(t),console[e].apply(console,n)}};const Ot=["qy","env","error","version","lanDebug","cloud","serviceMarket","router","worklet","__webpack_require_UNI_MP_PLUGIN__"],Pt=["lanDebug","router","worklet"],At=wx.getLaunchOptionsSync?wx.getLaunchOptionsSync():null;function Et(e){return(!At||1154!==At.scene||!Pt.includes(e))&&(Ot.indexOf(e)>-1||"function"==typeof wx[e])}function Ct(){const e={};for(const t in wx)Et(t)&&(e[t]=wx[t]);return"undefined"!=typeof globalThis&&"undefined"==typeof requireMiniProgram&&(globalThis.wx=e),e}const It=["__route__","__wxExparserNodeId__","__wxWebviewId__"],jt=(Tt={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]},function({service:e,success:t,fail:n,complete:o}){let r;Tt[e]?(r={errMsg:"getProvider:ok",service:e,provider:Tt[e]},h(t)&&t(r)):(r={errMsg:"getProvider:fail:服务["+e+"]不存在"},h(n)&&n(r)),h(o)&&o(r)});var Tt;const Rt=Ct();Rt.canIUse("getAppBaseInfo")||(Rt.getAppBaseInfo=Rt.getSystemInfoSync),Rt.canIUse("getWindowInfo")||(Rt.getWindowInfo=Rt.getSystemInfoSync),Rt.canIUse("getDeviceInfo")||(Rt.getDeviceInfo=Rt.getSystemInfoSync);let Lt=Rt.getAppBaseInfo&&Rt.getAppBaseInfo();Lt||(Lt=Rt.getSystemInfoSync());const Mt=Lt?Lt.host:null,Dt=Mt&&"SAAASDK"===Mt.env?Rt.miniapp.shareVideoMessage:Rt.shareVideoMessage;var Nt=Object.freeze({__proto__:null,createSelectorQuery:function(){const e=Rt.createSelectorQuery(),t=e.in;return e.in=function(e){return e.$scope?t.call(this,e.$scope):t.call(this,function(e){const t=Object.create(null);return It.forEach((n=>{t[n]=e[n]})),t}(e))},e},getProvider:jt,shareVideoMessage:Dt});const Ht={args(e,t){e.compressedHeight&&!t.compressHeight&&(t.compressHeight=e.compressedHeight),e.compressedWidth&&!t.compressWidth&&(t.compressWidth=e.compressedWidth)}};var Vt=Object.freeze({__proto__:null,compressImage:Ht,getAppAuthorizeSetting:{returnValue:function(e,t){const{locationReducedAccuracy:n}=e;t.locationAccuracy="unsupported",!0===n?t.locationAccuracy="reduced":!1===n&&(t.locationAccuracy="full")}},getAppBaseInfo:_t,getDeviceInfo:vt,getSystemInfo:ht,getSystemInfoSync:gt,getWindowInfo:bt,offError:wt,onError:xt,onSocketMessage:St,onSocketOpen:$t,previewImage:mt,redirectTo:{},showActionSheet:yt});const Bt=Ct();var Ut=function(e,t,n=wx){const o=function(e){function t(e,t,n){return function(r){return t(o(e,r,n))}}function n(e,n,o={},r={},i=!1){if(x(n)){const s=!0===i?n:{};h(o)&&(o=o(n,s)||{});for(const c in n)if(l(o,c)){let t=o[c];h(t)&&(t=t(n[c],n,s)),t?g(t)?s[t]=n[c]:x(t)&&(s[t.name?t.name:c]=t.value):console.warn(`微信小程序 ${e} 暂不支持 ${c}`)}else if(-1!==ot.indexOf(c)){const o=n[c];h(o)&&(s[c]=t(e,o,r))}else i||l(s,c)||(s[c]=n[c]);return s}return h(n)&&(h(o)&&o(n,{}),n=t(e,n,r)),n}function o(t,o,r,i=!1){return h(e.returnValue)&&(o=e.returnValue(t,o)),n(t,o,r,{},i||!1)}return function(t,r){const i=l(e,t);if(!i&&"function"!=typeof wx[t])return r;const s=i||h(e.returnValue)||Xe(t)||et(t),c=i||h(r);if(!i&&!r)return function(){console.error(`微信小程序 暂不支持${t}`)};if(!s||!c)return r;const a=e[t];return function(e,r){let i=a||{};h(a)&&(i=a(e));const s=[e=n(t,e,i.args,i.returnValue)];void 0!==r&&s.push(r);const c=wx[i.name||t].apply(wx,s);return(Xe(t)||et(t))&&c&&!c.__v_skip&&(c.__v_skip=!0),Ye(t)?o(t,c,i.returnValue,Xe(t)):c}}}(t);return new Proxy({},{get:(t,r)=>l(t,r)?t[r]:l(e,r)?nt(r,e[r]):l(kt,r)?nt(r,kt[r]):nt(r,o(r,n[r]))})}(Nt,Vt,Bt);let Wt,zt;class Ft{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Wt,!e&&Wt&&(this.index=(Wt.scopes||(Wt.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Wt;try{return Wt=this,e()}finally{Wt=t}}}on(){Wt=this}off(){Wt=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),en()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Jt,t=zt;try{return Jt=!0,zt=this,this._runnings++,Kt(this),this.fn()}finally{Zt(this),this._runnings--,zt=t,Jt=e}}stop(){var e;this.active&&(Kt(this),Zt(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function Kt(e){e._trackId++,e._depsLength=0}function Zt(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},an=new WeakMap,un=Symbol(""),ln=Symbol("");function fn(e,t,n){if(Jt&&zt){let t=an.get(e);t||an.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=cn((()=>t.delete(n)))),on(zt,o)}}function pn(e,t,n,o,r,i){const s=an.get(e);if(!s)return;let c=[];if("clear"===t)c=[...s.values()];else if("length"===n&&f(e)){const e=Number(o);s.forEach(((t,n)=>{("length"===n||!m(n)&&n>=e)&&c.push(t)}))}else switch(void 0!==n&&c.push(s.get(n)),t){case"add":f(e)?w(n)&&c.push(s.get("length")):(c.push(s.get(un)),p(e)&&c.push(s.get(ln)));break;case"delete":f(e)||(c.push(s.get(un)),p(e)&&c.push(s.get(ln)));break;case"set":p(e)&&c.push(s.get(un))}tn();for(const a of c)a&&sn(a,4);nn()}const dn=e("__proto__,__v_isRef,__isVue"),hn=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(m)),gn=mn();function mn(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=no(this);for(let t=0,r=this.length;t{e[t]=function(...e){Yt(),tn();const n=no(this)[t].apply(this,e);return nn(),en(),n}})),e}function yn(e){const t=no(this);return fn(t,0,e),t.hasOwnProperty(e)}class vn{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?Zn:Kn:r?qn:Fn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const i=f(e);if(!o){if(i&&l(gn,t))return Reflect.get(gn,t,n);if("hasOwnProperty"===t)return yn}const s=Reflect.get(e,t,n);return(m(t)?hn.has(t):dn(t))?s:(o||fn(e,0,t),r?s:uo(s)?i&&w(t)?s:s.value:y(s)?o?Qn(s):Jn(s):s)}}class _n extends vn{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=eo(r);if(to(n)||eo(n)||(r=no(r),n=no(n)),!f(e)&&uo(r)&&!uo(n))return!t&&(r.value=n,!0)}const i=f(e)&&w(t)?Number(t)e,kn=e=>Reflect.getPrototypeOf(e);function On(e,t,n=!1,o=!1){const r=no(e=e.__v_raw),i=no(t);n||(I(t,i)&&fn(r,0,t),fn(r,0,i));const{has:s}=kn(r),c=o?Sn:n?io:ro;return s.call(r,t)?c(e.get(t)):s.call(r,i)?c(e.get(i)):void(e!==r&&e.get(t))}function Pn(e,t=!1){const n=this.__v_raw,o=no(n),r=no(e);return t||(I(e,r)&&fn(o,0,e),fn(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function An(e,t=!1){return e=e.__v_raw,!t&&fn(no(e),0,un),Reflect.get(e,"size",e)}function En(e){e=no(e);const t=no(this);return kn(t).has.call(t,e)||(t.add(e),pn(t,"add",e,e)),this}function Cn(e,t){t=no(t);const n=no(this),{has:o,get:r}=kn(n);let i=o.call(n,e);i||(e=no(e),i=o.call(n,e));const s=r.call(n,e);return n.set(e,t),i?I(t,s)&&pn(n,"set",e,t):pn(n,"add",e,t),this}function In(e){const t=no(this),{has:n,get:o}=kn(t);let r=n.call(t,e);r||(e=no(e),r=n.call(t,e)),o&&o.call(t,e);const i=t.delete(e);return r&&pn(t,"delete",e,void 0),i}function jn(){const e=no(this),t=0!==e.size,n=e.clear();return t&&pn(e,"clear",void 0,void 0),n}function Tn(e,t){return function(n,o){const r=this,i=r.__v_raw,s=no(i),c=t?Sn:e?io:ro;return!e&&fn(s,0,un),i.forEach(((e,t)=>n.call(o,c(e),c(t),r)))}}function Rn(e,t,n){return function(...o){const r=this.__v_raw,i=no(r),s=p(i),c="entries"===e||e===Symbol.iterator&&s,a="keys"===e&&s,u=r[e](...o),l=n?Sn:t?io:ro;return!t&&fn(i,0,a?ln:un),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Ln(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Mn(){const e={get(e){return On(this,e)},get size(){return An(this)},has:Pn,add:En,set:Cn,delete:In,clear:jn,forEach:Tn(!1,!1)},t={get(e){return On(this,e,!1,!0)},get size(){return An(this)},has:Pn,add:En,set:Cn,delete:In,clear:jn,forEach:Tn(!1,!0)},n={get(e){return On(this,e,!0)},get size(){return An(this,!0)},has(e){return Pn.call(this,e,!0)},add:Ln("add"),set:Ln("set"),delete:Ln("delete"),clear:Ln("clear"),forEach:Tn(!0,!1)},o={get(e){return On(this,e,!0,!0)},get size(){return An(this,!0)},has(e){return Pn.call(this,e,!0)},add:Ln("add"),set:Ln("set"),delete:Ln("delete"),clear:Ln("clear"),forEach:Tn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Rn(r,!1,!1),n[r]=Rn(r,!0,!1),t[r]=Rn(r,!1,!0),o[r]=Rn(r,!0,!0)})),[e,n,t,o]}const[Dn,Nn,Hn,Vn]=Mn();function Bn(e,t){const n=t?e?Vn:Hn:e?Nn:Dn;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(l(n,o)&&o in t?n:t,o,r)}const Un={get:Bn(!1,!1)},Wn={get:Bn(!1,!0)},zn={get:Bn(!0,!1)},Fn=new WeakMap,qn=new WeakMap,Kn=new WeakMap,Zn=new WeakMap;function Gn(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>b(e).slice(8,-1))(e))}function Jn(e){return eo(e)?e:Xn(e,!1,xn,Un,Fn)}function Qn(e){return Xn(e,!0,wn,zn,Kn)}function Xn(e,t,n,o,r){if(!y(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const s=Gn(e);if(0===s)return e;const c=new Proxy(e,2===s?o:n);return r.set(e,c),c}function Yn(e){return eo(e)?Yn(e.__v_raw):!(!e||!e.__v_isReactive)}function eo(e){return!(!e||!e.__v_isReadonly)}function to(e){return!(!e||!e.__v_isShallow)}function no(e){const t=e&&e.__v_raw;return t?no(t):e}function oo(e){return Object.isExtensible(e)&&((e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})})(e,"__v_skip",!0),e}const ro=e=>y(e)?Jn(e):e,io=e=>y(e)?Qn(e):e;class so{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new qt((()=>e(this._value)),(()=>ao(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=no(this);return e._cacheable&&!e.effect.dirty||!I(e._value,e._value=e.effect.run())||ao(e,4),co(e),e.effect._dirtyLevel>=2&&ao(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function co(e){var t;Jt&&zt&&(e=no(e),on(zt,null!=(t=e.dep)?t:e.dep=cn((()=>e.dep=void 0),e instanceof so?e:void 0)))}function ao(e,t=4,n){const o=(e=no(e)).dep;o&&sn(o,t)}function uo(e){return!(!e||!0!==e.__v_isRef)}function lo(e){return function(e,t){if(uo(e))return e;return new fo(e,t)}(e,!1)}class fo{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:no(e),this._value=t?e:ro(e)}get value(){return co(this),this._value}set value(e){const t=this.__v_isShallow||to(e)||eo(e);e=t?e:no(e),I(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:ro(e),ao(this,4))}}function po(e){return uo(e)?e.value:e}const ho={get:(e,t,n)=>po(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return uo(r)&&!uo(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function go(e){return Yn(e)?e:new Proxy(e,ho)}function mo(e,t,n,o){try{return o?e(...o):e()}catch(r){vo(r,t,n)}}function yo(e,t,n,o){if(h(e)){const r=mo(e,t,n,o);return r&&v(r)&&r.catch((e=>{vo(e,t,n)})),r}const r=[];for(let i=0;i>>1,r=wo[o],i=Ro(r);inull==e.id?1/0:e.id,Lo=(e,t)=>{const n=Ro(e)-Ro(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Mo(e){xo=!1,bo=!0,wo.sort(Lo);try{for($o=0;$oRo(e)-Ro(t)));if(So.length=0,ko)return void ko.push(...e);for(ko=e,Oo=0;Oog(e)?e.trim():e))),n&&(i=o.map(T))}let a,u=r[a=C(n)]||r[a=C(O(n))];!u&&s&&(u=r[a=C(A(n))]),u&&yo(u,e,6,i);const l=r[a+"Once"];if(l){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,yo(l,e,6,i)}}function No(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const i=e.emits;let s={},a=!1;if(!h(e)){const o=e=>{const n=No(e,t,!0);n&&(a=!0,c(s,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return i||a?(f(i)?i.forEach((e=>s[e]=null)):c(s,i),y(e)&&o.set(e,s),s):(y(e)&&o.set(e,null),null)}function Ho(e,t){return!(!e||!i(t))&&(t=t.slice(2).replace(/Once$/,""),l(e,t[0].toLowerCase()+t.slice(1))||l(e,A(t))||l(e,t))}let Vo=null;function Bo(e){const t=Vo;return Vo=e,e&&e.type.__scopeId,t}function Uo(e,t){return e&&(e[t]||e[O(t)]||e[E(O(t))])}const Wo={};function zo(e,t,n){return Fo(e,t,n)}function Fo(e,n,{immediate:r,deep:i,flush:s,once:c,onTrack:u,onTrigger:l}=t){if(n&&c){const e=n;n=(...t)=>{e(...t),k()}}const p=Fr,d=e=>!0===i?e:Zo(e,!1===i?1:void 0);let g,m,y=!1,v=!1;if(uo(e)?(g=()=>e.value,y=to(e)):Yn(e)?(g=()=>d(e),y=!0):f(e)?(v=!0,y=e.some((e=>Yn(e)||to(e))),g=()=>e.map((e=>uo(e)?e.value:Yn(e)?d(e):h(e)?mo(e,p,2):void 0))):g=h(e)?n?()=>mo(e,p,2):()=>(m&&m(),yo(e,p,3,[_])):o,n&&i){const e=g;g=()=>Zo(e())}let _=e=>{m=$.onStop=()=>{mo(e,p,4),m=$.onStop=void 0}},b=v?new Array(e.length).fill(Wo):Wo;const x=()=>{if($.active&&$.dirty)if(n){const e=$.run();(i||y||(v?e.some(((e,t)=>I(e,b[t]))):I(e,b)))&&(m&&m(),yo(n,p,3,[e,b===Wo?void 0:v&&b[0]===Wo?[]:b,_]),b=e)}else $.run()};let w;x.allowRecurse=!!n,"sync"===s?w=x:"post"===s?w=()=>Vr(x,p&&p.suspense):(x.pre=!0,p&&(x.id=p.uid),w=()=>Co(x));const $=new qt(g,o,w),S=Wt,k=()=>{$.stop(),S&&a(S.effects,$)};return n?r?x():b=$.run():"post"===s?Vr($.run.bind($),p&&p.suspense):$.run(),k}function qo(e,t,n){const o=this.proxy,r=g(e)?e.includes(".")?Ko(o,e):()=>o[e]:e.bind(o,o);let i;h(t)?i=t:(i=t.handler,n=t);const s=Gr(this),c=Fo(r,i.bind(o),n);return s(),c}function Ko(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),uo(e))Zo(e.value,t,n,o);else if(f(e))for(let r=0;r{Zo(e,t,n,o)}));else if(x(e))for(const r in e)Zo(e[r],t,n,o);return e}function Go(){return{app:null,config:{isNativeTag:r,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Jo=0;let Qo=null;function Xo(e,t,n=!1){const o=Fr||Vo;if(o||Qo){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:Qo._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&h(t)?t.call(o&&o.proxy):t}}function Yo(e,t){tr(e,"a",t)}function er(e,t){tr(e,"da",t)}function tr(e,t,n=Fr){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(or(t,o,n),n){let e=n.parent;for(;e&&e.parent;)e.parent.vnode.type.__isKeepAlive&&nr(o,t,n,e),e=e.parent}}function nr(e,t,n,o){const r=or(t,e,o,!0);lr((()=>{a(o[t],r)}),n)}function or(e,t,n=Fr,o=!1){if(n){(function(e){return W.indexOf(e)>-1})(e)&&(n=n.root);const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Yt();const r=Gr(n),i=yo(t,n,e,o);return r(),en(),i});return o?r.unshift(i):r.push(i),i}}const rr=e=>(t,n=Fr)=>(!Xr||"sp"===e)&&or(e,((...e)=>t(...e)),n),ir=rr("bm"),sr=rr("m"),cr=rr("bu"),ar=rr("u"),ur=rr("bum"),lr=rr("um"),fr=rr("sp"),pr=rr("rtg"),dr=rr("rtc");function hr(e,t=Fr){or("ec",e,t)}const gr=e=>e?Qr(e)?ti(e)||e.proxy:gr(e.parent):null,mr=c(Object.create(null),{$:e=>e,$el:e=>e.__$el||(e.__$el={}),$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>gr(e.parent),$root:e=>gr(e.root),$emit:e=>e.emit,$options:e=>Sr(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Co(e.update)}),$watch:e=>qo.bind(e)}),yr=(e,n)=>e!==t&&!e.__isScriptSetup&&l(e,n),vr={get({_:e},n){const{ctx:o,setupState:r,data:i,props:s,accessCache:c,type:a,appContext:u}=e;let f;if("$"!==n[0]){const a=c[n];if(void 0!==a)switch(a){case 1:return r[n];case 2:return i[n];case 4:return o[n];case 3:return s[n]}else{if(yr(r,n))return c[n]=1,r[n];if(i!==t&&l(i,n))return c[n]=2,i[n];if((f=e.propsOptions[0])&&l(f,n))return c[n]=3,s[n];if(o!==t&&l(o,n))return c[n]=4,o[n];br&&(c[n]=0)}}const p=mr[n];let d,h;return p?("$attrs"===n&&fn(e,0,n),p(e)):(d=a.__cssModules)&&(d=d[n])?d:o!==t&&l(o,n)?(c[n]=4,o[n]):(h=u.config.globalProperties,l(h,n)?h[n]:void 0)},set({_:e},n,o){const{data:r,setupState:i,ctx:s}=e;return yr(i,n)?(i[n]=o,!0):r!==t&&l(r,n)?(r[n]=o,!0):!l(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(s[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:r,appContext:i,propsOptions:s}},c){let a;return!!o[c]||e!==t&&l(e,c)||yr(n,c)||(a=s[0])&&l(a,c)||l(r,c)||l(mr,c)||l(i.config.globalProperties,c)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:l(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function _r(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let br=!0;function xr(e){const t=Sr(e),n=e.proxy,r=e.ctx;br=!1,t.beforeCreate&&wr(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:c,watch:a,provide:u,inject:l,created:p,beforeMount:d,mounted:g,beforeUpdate:m,updated:v,activated:_,deactivated:b,beforeDestroy:x,beforeUnmount:w,destroyed:$,unmounted:S,render:k,renderTracked:O,renderTriggered:P,errorCaptured:A,serverPrefetch:E,expose:C,inheritAttrs:I,components:j,directives:T,filters:R}=t;if(l&&function(e,t,n=o){f(e)&&(e=Ar(e));for(const o in e){const n=e[o];let r;r=y(n)?"default"in n?Xo(n.from||o,n.default,!0):Xo(n.from||o):Xo(n),uo(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(l,r,null),c)for(const o in c){const e=c[o];h(e)&&(r[o]=e.bind(n))}if(i){const t=i.call(n,n);y(t)&&(e.data=Jn(t))}if(br=!0,s)for(const f in s){const e=s[f],t=h(e)?e.bind(n,n):h(e.get)?e.get.bind(n,n):o,i=!h(e)&&h(e.set)?e.set.bind(n):o,c=ni({get:t,set:i});Object.defineProperty(r,f,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(a)for(const o in a)$r(a[o],r,n,o);function L(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(function(){if(u){const e=h(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(Fr){let n=Fr.provides;const o=Fr.parent&&Fr.parent.provides;o===n&&(n=Fr.provides=Object.create(o)),n[e]=t,"app"===Fr.type.mpType&&Fr.appContext.app.provide(e,t)}}(t,e[t])}))}}(),p&&wr(p,e,"c"),L(ir,d),L(sr,g),L(cr,m),L(ar,v),L(Yo,_),L(er,b),L(hr,A),L(dr,O),L(pr,P),L(ur,w),L(lr,S),L(fr,E),f(C))if(C.length){const t=e.exposed||(e.exposed={});C.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});k&&e.render===o&&(e.render=k),null!=I&&(e.inheritAttrs=I),j&&(e.components=j),T&&(e.directives=T),e.ctx.$onApplyOptions&&e.ctx.$onApplyOptions(t,e,n)}function wr(e,t,n){yo(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function $r(e,t,n,o){const r=o.includes(".")?Ko(n,o):()=>n[o];if(g(e)){const n=t[e];h(n)&&zo(r,n)}else if(h(e))zo(r,e.bind(n));else if(y(e))if(f(e))e.forEach((e=>$r(e,t,n,o)));else{const o=h(e.handler)?e.handler.bind(n):t[e.handler];h(o)&&zo(r,o,e)}}function Sr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,c=i.get(t);let a;return c?a=c:r.length||n||o?(a={},r.length&&r.forEach((e=>kr(a,e,s,!0))),kr(a,t,s)):a=t,y(t)&&i.set(t,a),a}function kr(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&kr(e,i,n,!0),r&&r.forEach((t=>kr(e,t,n,!0)));for(const s in t)if(o&&"expose"===s);else{const o=Or[s]||n&&n[s];e[s]=o?o(e[s],t[s]):t[s]}return e}const Or={data:Pr,props:Ir,emits:Ir,methods:Cr,computed:Cr,beforeCreate:Er,created:Er,beforeMount:Er,mounted:Er,beforeUpdate:Er,updated:Er,beforeDestroy:Er,beforeUnmount:Er,destroyed:Er,unmounted:Er,activated:Er,deactivated:Er,errorCaptured:Er,serverPrefetch:Er,components:Cr,directives:Cr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const o in t)n[o]=Er(e[o],t[o]);return n},provide:Pr,inject:function(e,t){return Cr(Ar(e),Ar(t))}};function Pr(e,t){return t?e?function(){return c(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Ar(e){if(f(e)){const t={};for(let n=0;n{d=!0;const[t,n]=Lr(e,o,!0);c(u,t),n&&p.push(...n)};!r&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!a&&!d)return y(e)&&i.set(e,n),n;if(f(a))for(let n=0;n-1,o[1]=n<0||t-1||l(o,"default"))&&p.push(e)}}}const g=[u,p];return y(e)&&i.set(e,g),g}function Mr(e){return"$"!==e[0]&&!$(e)}function Dr(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function Nr(e,t){return Dr(e)===Dr(t)}function Hr(e,t){return f(t)?t.findIndex((t=>Nr(t,e))):h(t)&&Nr(t,e)?0:-1}const Vr=jo;function Br(e){return e?Yn(t=e)||eo(t)||"__vInternal"in e?c({},e):e:null;var t}const Ur=Go();let Wr=0;function zr(e,n,o){const r=e.type,i=(n?n.appContext:e.appContext)||Ur,s={uid:Wr++,vnode:e,type:r,parent:n,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Ft(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Lr(r,i),emitsOptions:No(r,i),emit:null,emitted:null,propsDefaults:t,inheritAttrs:r.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null,$uniElements:new Map,$templateUniElementRefs:[],$templateUniElementStyles:{},$eS:{},$eA:{}};return s.ctx={_:s},s.root=n?n.root:s,s.emit=Do.bind(null,s),e.ce&&e.ce(s),s}let Fr=null;const qr=()=>Fr||Vo;let Kr,Zr;Kr=e=>{Fr=e},Zr=e=>{Xr=e};const Gr=e=>{const t=Fr;return Kr(e),e.scope.on(),()=>{e.scope.off(),Kr(t)}},Jr=()=>{Fr&&Fr.scope.off(),Kr(null)};function Qr(e){return 4&e.vnode.shapeFlag}let Xr=!1;function Yr(e,t=!1){t&&Zr(t);const{props:n}=e.vnode,o=Qr(e);jr(e,n,o,t);const r=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=oo(new Proxy(e.ctx,vr));const{setup:o}=n;if(o){const t=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(fn(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,n=Gr(e);Yt();const r=mo(o,e,0,[e.props,t]);en(),n(),v(r)?r.then(Jr,Jr):function(e,t,n){h(t)?e.render=t:y(t)&&(e.setupState=go(t));ei(e)}(e,r)}else ei(e)}(e):void 0;return t&&Zr(!1),r}function ei(e,t,n){const r=e.type;e.render||(e.render=r.render||o);{const t=Gr(e);Yt();try{xr(e)}finally{en(),t()}}}function ti(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(go(oo(e.exposed)),{get:(t,n)=>n in t?t[n]:e.proxy[n],has:(e,t)=>t in e||t in mr}))}const ni=(e,t)=>{const n=function(e,t,n=!1){let r,i;const s=h(e);return s?(r=e,i=o):(r=e.get,i=e.set),new so(r,i,s||!i,n)}(e,0,Xr);return n},oi="3.4.21";function ri(e){return po(e)}const ii="[object Array]",si="[object Object]";function ci(e,t){const n={};return ai(e,t),ui(e,t,"",n),n}function ai(e,t){if((e=ri(e))===t)return;const n=b(e),o=b(t);if(n==si&&o==si)for(let r in t){const n=e[r];void 0===n?e[r]=null:ai(n,t[r])}else n==ii&&o==ii&&e.length>=t.length&&t.forEach(((t,n)=>{ai(e[n],t)}))}function ui(e,t,n,o){if((e=ri(e))===t)return;const r=b(e),i=b(t);if(r==si)if(i!=si||Object.keys(e).length{ui(e,i[t],(""==n?"":n+".")+s+"["+t+"]",o)}));else if(c==si)if(a!=si||Object.keys(r).length{ui(e,t[r],n+"["+r+"]",o)})):li(o,n,e)}function li(e,t,n){e[t]=n}function fi(e){const t=e.ctx.__next_tick_callbacks;if(t&&t.length){const e=t.slice(0);t.length=0;for(let t=0;t{t?mo(t.bind(e.proxy),e,14):o&&o(e.proxy)})),new Promise((e=>{o=e}))}function di(e,t){const n=typeof(e=ri(e));if("object"===n&&null!==e){let n=t.get(e);if(void 0!==n)return n;if(f(e)){const o=e.length;n=new Array(o),t.set(e,n);for(let r=0;r{o[e]=n[e]})),o}(r,i));Object.keys(s).length?(o.__next_tick_pending=!0,r.setData(s,(()=>{o.__next_tick_pending=!1,fi(e)})),To()):fi(e)}}function mi(e,t,n){t.appContext.config.globalProperties.$applyOptions(e,t,n);const o=e.computed;if(o){const e=Object.keys(o);if(e.length){const n=t.ctx;n.$computedKeys||(n.$computedKeys=[]),n.$computedKeys.push(...e)}}delete t.ctx.$onApplyOptions}function yi(e,t=!1){const{setupState:n,$templateRefs:o,$templateUniElementRefs:r,ctx:{$scope:i,$mpPlatform:s}}=e;if("mp-alipay"===s)return;if(!i||!o&&!r)return;if(t)return o&&o.forEach((e=>vi(e,null,n))),void(r&&r.forEach((e=>vi(e,null,n))));const c="mp-baidu"===s||"mp-toutiao"===s,a=e=>{if(0===e.length)return[];const t=(i.selectAllComponents(".r")||[]).concat(i.selectAllComponents(".r-i-f")||[]);return e.filter((e=>{const o=function(e,t){const n=e.find((e=>e&&(e.properties||e.props).uI===t));if(n){const e=n.$vm;return e?ti(e.$)||e:function(e){y(e)&&oo(e);return e}(n)}return null}(t,e.i);return!(!c||null!==o)||(vi(e,o,n),!1)}))},u=()=>{if(o){const t=a(o);t.length&&e.proxy&&e.proxy.$scope&&e.proxy.$scope.setData({r1:1},(()=>{a(t)}))}};r&&r.length&&pi(e,(()=>{r.forEach((e=>{f(e.v)?e.v.forEach((t=>{vi(e,t,n)})):vi(e,e.v,n)}))})),i._$setRef?i._$setRef(u):pi(e,u)}function vi({r:e,f:t},n,o){if(h(e))e(n,{});else{const r=g(e),i=uo(e);if(r||i)if(t){if(!i)return;f(e.value)||(e.value=[]);const t=e.value;if(-1===t.indexOf(n)){if(t.push(n),!n)return;n.$&&ur((()=>a(t,n)),n.$)}}else r?l(o,e)&&(o[e]=n):uo(e)&&(e.value=n)}}const _i=jo;function bi(e,t){const n=e.component=zr(e,t.parentComponent,null);return n.ctx.$onApplyOptions=mi,n.ctx.$children=[],"app"===t.mpType&&(n.render=o),t.onBeforeSetup&&t.onBeforeSetup(n,t),Yr(n),t.parentComponent&&n.proxy&&t.parentComponent.ctx.$children.push(ti(n)||n.proxy),function(e){const t=$i.bind(e);e.$updateScopedSlots=()=>Eo((()=>Co(t)));const n=()=>{if(e.isMounted){const{next:t,bu:n,u:o}=e;Si(e,!1),Yt(),To(),en(),n&&j(n),Si(e,!0),gi(e,xi(e)),o&&_i(o)}else ur((()=>{yi(e,!0)}),e),gi(e,xi(e))},r=e.effect=new qt(n,o,(()=>Co(i)),e.scope),i=e.update=()=>{r.dirty&&r.run()};i.id=e.uid,Si(e,!0),i()}(n),n.proxy}function xi(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[c],slots:a,attrs:u,emit:l,render:f,renderCache:p,data:d,setupState:h,ctx:g,uid:m,appContext:{app:{config:{globalProperties:{pruneComponentPropsCache:y}}}},inheritAttrs:v}=e;let _;e.$uniElementIds=new Map,e.$templateRefs=[],e.$templateUniElementRefs=[],e.$templateUniElementStyles={},e.$ei=0,y(m),e.__counter=0===e.__counter?1:0;const b=Bo(e);try{if(4&n.shapeFlag){wi(v,s,c,u);const e=r||o;_=f.call(e,e,p,s,h,d,g)}else{wi(v,s,c,t.props?u:(e=>{let t;for(const n in e)("class"===n||"style"===n||i(n))&&((t||(t={}))[n]=e[n]);return t})(u));const e=t;_=e.length>1?e(s,{attrs:u,slots:a,emit:l}):e(s,null)}}catch(x){vo(x,e,1),_=!1}return yi(e),Bo(b),_}function wi(e,t,n,o){if(t&&o&&!1!==e){const e=Object.keys(o).filter((e=>"class"!==e&&"style"!==e));if(!e.length)return;n&&e.some(s)?e.forEach((e=>{s(e)&&e.slice(9)in n||(t[e]=o[e])})):e.forEach((e=>t[e]=o[e]))}}function $i(){const e=this.$scopedSlotsData;if(!e||0===e.length)return;const t=this.ctx.$scope,n=t.data,o=Object.create(null);e.forEach((({path:e,index:t,data:r})=>{const i=N(n,e),s=g(t)?`${e}.${t}`:`${e}[${t}]`;if(void 0===i||void 0===i[t])o[s]=r;else{const e=ci(r,i[t]);Object.keys(e).forEach((t=>{o[s+"."+t]=e[t]}))}})),e.length=0,Object.keys(o).length&&t.setData(o)}function Si({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}const ki=function(e,t=null){h(e)||(e=c({},e)),null==t||y(t)||(t=null);const n=Go(),o=new WeakSet,r=n.app={_uid:Jo++,_component:e,_props:t,_container:null,_context:n,_instance:null,version:oi,get config(){return n.config},set config(e){},use:(e,...t)=>(o.has(e)||(e&&h(e.install)?(o.add(e),e.install(r,...t)):h(e)&&(o.add(e),e(r,...t))),r),mixin:e=>(n.mixins.includes(e)||n.mixins.push(e),r),component:(e,t)=>t?(n.components[e]=t,r):n.components[e],directive:(e,t)=>t?(n.directives[e]=t,r):n.directives[e],mount(){},unmount(){},provide:(e,t)=>(n.provides[e]=t,r),runWithContext(e){const t=Qo;Qo=r;try{return e()}finally{Qo=t}}};return r};function Oi(e,t=null){("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof my?my:void 0).__VUE__=!0;const n=ki(e,t),r=n._context;r.config.globalProperties.$nextTick=function(e){return pi(this.$,e)};const i=e=>(e.appContext=r,e.shapeFlag=6,e),s=function(e,t){return bi(i(e),t)},c=function(e){return e&&function(e){const{bum:t,scope:n,update:o,um:r}=e;t&&j(t);{const t=e.parent;if(t){const n=t.ctx.$children,o=ti(e)||e.proxy,r=n.indexOf(o);r>-1&&n.splice(r,1)}}n.stop(),o&&(o.active=!1),r&&_i(r),_i((()=>{e.isUnmounted=!0}))}(e.$)};return n.mount=function(){e.render=o;const t=bi(i({type:e}),{mpType:"app",mpInstance:null,parentComponent:null,slots:[],props:null});return n._instance=t.$,t.$app=n,t.$createComponent=s,t.$destroyComponent=c,r.$appInstance=t,t},n.unmount=function(){},n}function Pi(e,t,n,o){h(t)&&or(e,t.bind(n),o)}function Ai(e,t,n){!function(e,t,n){const o=e.mpType||n.$mpType;o&&"component"!==o&&Object.keys(e).forEach((o=>{if(q(o,e[o],!1)){const r=e[o];f(r)?r.forEach((e=>Pi(o,e,n,t))):Pi(o,r,n,t)}}))}(e,t,n)}function Ei(e,t,n){return e[t]=n}function Ci(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function Ii(e){const t=e.config.errorHandler;return function(n,o,r){t&&t(n,o,r);const i=e._instance;if(!i||!i.proxy)throw n;i.onError?i.proxy.$callHook("onError",n):_o(n,0,o&&o.$.vnode,!1)}}function ji(e,t){return e?[...new Set([].concat(e,t))]:t}let Ti;const Ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Li=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Mi(){const e=Ut.getStorageSync("uni_id_token")||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((o=t[1],decodeURIComponent(Ti(o).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(r){throw new Error("获取当前用户信息出错,详细错误信息为:"+r.message)}var o;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}function Di(e){const t=e.config;var n;t.errorHandler=G(e,Ii),n=t.optionMergeStrategies,z.forEach((e=>{n[e]=ji}));const o=t.globalProperties;!function(e){e.uniIDHasRole=function(e){const{role:t}=Mi();return t.indexOf(e)>-1},e.uniIDHasPermission=function(e){const{permission:t}=Mi();return this.uniIDHasRole("admin")||t.indexOf(e)>-1},e.uniIDTokenValid=function(){const{tokenExpired:e}=Mi();return e>Date.now()}}(o),o.$set=Ei,o.$applyOptions=Ai,o.$callMethod=Ci,Ut.invokeCreateVueAppHook(e)}Ti="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Li.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,o,r="",i=0;i>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}:atob;const Ni=Object.create(null);function Hi(e){delete Ni[e]}function Vi(e){if(!e)return;const[t,n]=e.split(",");return Ni[t]?Ni[t][parseInt(n)]:void 0}var Bi={install(e){Di(e),e.config.globalProperties.pruneComponentPropsCache=Hi;const t=e.mount;e.mount=function(n){const o=t.call(e,n),r=function(){const e="createApp";if("undefined"!=typeof global&&void 0!==global[e])return global[e];if("undefined"!=typeof my)return my[e]}();return r?r(o):"undefined"!=typeof createMiniProgramApp&&createMiniProgramApp(o),o}}};function Ui(e,t){const n=qr(),r=n.ctx,i=void 0===t||"mp-weixin"!==r.$mpPlatform&&"mp-qq"!==r.$mpPlatform&&"mp-xhs"!==r.$mpPlatform||!g(t)&&"number"!=typeof t?"":"_"+t,s="e"+n.$ei+++i,a=r.$scope;if(!e)return delete a[s],s;const u=a[s];return u?u.value=e:a[s]=function(e,t){const n=e=>{var r;(r=e).type&&r.target&&(r.preventDefault=o,r.stopPropagation=o,r.stopImmediatePropagation=o,l(r,"detail")||(r.detail={}),l(r,"markerId")&&(r.detail="object"==typeof r.detail?r.detail:{},r.detail.markerId=r.markerId),x(r.detail)&&l(r.detail,"checked")&&!l(r.detail,"value")&&(r.detail.value=r.detail.checked),x(r.detail)&&(r.target=c({},r.target,r.detail)));let i=[e];t&&t.ctx.$getTriggerEventDetail&&"number"==typeof e.detail&&(e.detail=t.ctx.$getTriggerEventDetail(e.detail)),e.detail&&e.detail.__args__&&(i=e.detail.__args__);const s=n.value,a=()=>yo(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n&&n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,s),t,5,i),u=e.target,p=!!u&&(!!u.dataset&&"true"===String(u.dataset.eventsync));if(!Wi.includes(e.type)||p){const t=a();if("input"===e.type&&(f(t)||v(t)))return;return t}setTimeout(a)};return n.value=e,n}(e,n),s}const Wi=["tap","longpress","longtap","transitionend","animationstart","animationiteration","animationend","touchforcechange"];const zi=function(e,t=null){return e&&(e.mpType="app"),Oi(e,t).use(Bi)};const Fi=["externalClasses"];const qi=/_(.*)_worklet_factory_/;function Ki(e,t){const n=e.$children;for(let r=n.length-1;r>=0;r--){const e=n[r];if(e.$scope._$vueId===t)return e}let o;for(let r=n.length-1;r>=0;r--)if(o=Ki(n[r],t),o)return o}const Zi=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function Gi(e,t){const n=e.ctx;n.mpType=t.mpType,n.$mpType=t.mpType,n.$mpPlatform="mp-weixin",n.$scope=t.mpInstance,Object.defineProperties(n,{virtualHostId:{get(){const e=this.$scope.data.virtualHostId;return void 0===e?"":e}}}),n.$mp={},n._self={},e.slots={},f(t.slots)&&t.slots.length&&(t.slots.forEach((t=>{e.slots[t]=!0})),e.slots.d&&(e.slots.default=!0)),n.getOpenerEventChannel=function(){return t.mpInstance.getOpenerEventChannel()},n.$hasHook=Ji,n.$callHook=Qi,e.emit=function(e,t){return function(n,...o){const r=t.$scope;if(r&&n){const e={__args__:o};r.triggerEvent(n,e)}return e.apply(this,[n,...o])}}(e.emit,n)}function Ji(e){const t=this.$[e];return!(!t||!t.length)}function Qi(e,t){"mounted"===e&&(Qi.call(this,"bm"),this.$.isMounted=!0,e="m");const n=this.$[e];return n&&((e,t)=>{let n;for(let o=0;o{q(n,e[n])&&t.add(n)}));{const{extends:n,mixins:o}=e;o&&o.forEach((e=>Yi(e,t))),n&&Yi(n,t)}}return t}function es(e,t,n){-1!==n.indexOf(t)||l(e,t)||(e[t]=function(e){return this.$vm&&this.$vm.$callHook(t,e)})}const ts=["onReady"];function ns(e,t,n=ts){t.forEach((t=>es(e,t,n)))}function os(e,t,n=ts){Yi(t).forEach((t=>es(e,t,n)))}const rs=D((()=>{const e=[],t=h(getApp)&&getApp({allowDefault:!0});if(t&&t.$vm&&t.$vm.$){const n=t.$vm.$.appContext.mixins;if(f(n)){const t=Object.keys(F);n.forEach((n=>{t.forEach((t=>{l(n,t)&&!e.includes(t)&&e.push(t)}))}))}}return e}));const is=["onShow","onHide","onError","onThemeChange","onPageNotFound","onUnhandledRejection"];function ss(e,t){const n=e.$,o={globalData:e.$options&&e.$options.globalData||{},$vm:e,onLaunch(t){this.$vm=e;const o=n.ctx;this.$vm&&o.$scope&&o.$callHook||(Gi(n,{mpType:"app",mpInstance:this,slots:[]}),o.globalData=this.globalData,e.$callHook("onLaunch",t))}},r=wx.$onErrorHandlers;r&&(r.forEach((e=>{or("onError",e,n)})),r.length=0),function(e){const t=lo(function(){var e;let t="";{const n=(null===(e=wx.getAppBaseInfo)||void 0===e?void 0:e.call(wx))||wx.getSystemInfoSync();t=X(n&&n.language?n.language:"en")||"en"}return t}());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(e);const i=e.$.type;ns(o,is),os(o,i);{const e=i.methods;e&&c(o,e)}return o}function cs(e,t){if(h(e.onLaunch)){const t=wx.getLaunchOptionsSync&&wx.getLaunchOptionsSync();e.onLaunch(t)}h(e.onShow)&&wx.onAppShow&&wx.onAppShow((e=>{t.$callHook("onShow",e)})),h(e.onHide)&&wx.onAppHide&&wx.onAppHide((e=>{t.$callHook("onHide",e)}))}const as=["eO","uR","uRIF","uI","uT","uP","uS"];function us(e){e.properties||(e.properties={}),c(e.properties,function(e,t=!1){const n={};if(!t){let e=function(e){const t=Object.create(null);e&&e.forEach((e=>{t[e]=!0})),this.setData({$slots:t})};as.forEach((e=>{n[e]={type:null,value:""}})),n.uS={type:null,value:[]},n.uS.observer=e}return e.behaviors&&e.behaviors.includes("wx://form-field")&&(e.properties&&e.properties.name||(n.name={type:null,value:""}),e.properties&&e.properties.value||(n.value={type:null,value:""})),n}(e),function(e){const t={};return e&&e.virtualHost&&(t.virtualHostStyle={type:null,value:""},t.virtualHostClass={type:null,value:""},t.virtualHostHidden={type:null,value:""},t.virtualHostId={type:null,value:""}),t}(e.options))}const ls=[String,Number,Boolean,Object,Array,null];function fs(e,t){const n=function(e,t){return f(e)&&1===e.length?e[0]:e}(e);return-1!==ls.indexOf(n)?n:null}function ps(e,t){return(t?function(e){const t={};x(e)&&Object.keys(e).forEach((n=>{-1===as.indexOf(n)&&(t[n]=e[n])}));return t}(e):Vi(e.uP))||{}}function ds(e){const t=function(){const e=this.properties.uP;e&&(this.$vm?function(e,t){const n=no(t.props),o=Vi(e)||{};hs(n,o)&&(!function(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,c=no(r),[a]=e.propsOptions;let u=!1;if(!(o||s>0)||16&s){let o;Tr(e,t,r,i)&&(u=!0);for(const i in c)t&&(l(t,i)||(o=A(i))!==i&&l(t,o))||(a?!n||void 0===n[i]&&void 0===n[o]||(r[i]=Rr(a,c,i,void 0,e,!0)):delete r[i]);if(i!==c)for(const e in i)t&&l(t,e)||(delete i[e],u=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o-1&&function(e){const t=wo.indexOf(e);t>$o&&wo.splice(t,1)}(t.update),t.update());var r}(e,this.$vm.$):"m"===this.properties.uT&&function(e,t){const n=t.properties,o=Vi(e)||{};hs(n,o,!1)&&t.setData(o)}(e,this))};e.observers||(e.observers={}),e.observers.uP=t}function hs(e,t,n=!0){const o=Object.keys(t);if(n&&o.length!==Object.keys(e).length)return!0;for(let r=0;r{o.push(e.replace("uni://","wx://")),"uni://form-field"===e&&(f(n)?(n.push("name"),n.push("modelValue")):(n.name={type:String,default:""},n.modelValue={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),o}(t)}function ms(e,{parse:t,mocks:n,isPage:o,isPageInProject:r,initRelation:i,handleLink:s,initLifetimes:a}){e=e.default||e;const u={multipleSlots:!0,addGlobalClass:!0,pureDataPattern:/^uP$/};f(e.mixins)&&e.mixins.forEach((e=>{y(e.options)&&c(u,e.options)})),e.options&&c(u,e.options);const p={options:u,lifetimes:a({mocks:n,isPage:o,initRelation:i,vueOptions:e}),pageLifetimes:{show(){this.$vm&&this.$vm.$callHook("onPageShow")},hide(){this.$vm&&this.$vm.$callHook("onPageHide")},resize(e){this.$vm&&this.$vm.$callHook("onPageResize",e)}},methods:{__l:s}};var d,h,g,m;return gs(p,e),us(p),ds(p),function(e,t){Fi.forEach((n=>{l(t,n)&&(e[n]=t[n])}))}(p,e),d=p.methods,h=e.wxsCallMethods,f(h)&&h.forEach((e=>{d[e]=function(t){return this.$vm[e](t)}})),g=p.methods,(m=e.methods)&&Object.keys(m).forEach((e=>{const t=e.match(qi);if(t){const n=t[1];g[e]=m[e],g[n]=m[n]}})),t&&t(p,{handleLink:s}),p}let ys,vs;function _s(){return getApp().$vm}function bs(e,t){const{parse:n,mocks:o,isPage:r,initRelation:i,handleLink:s,initLifetimes:c}=t,a=ms(e,{mocks:o,isPage:r,isPageInProject:!0,initRelation:i,handleLink:s,initLifetimes:c});!function({properties:e},t){f(t)?t.forEach((t=>{e[t]={type:String,value:""}})):x(t)&&Object.keys(t).forEach((n=>{const o=t[n];if(x(o)){let t=o.default;h(t)&&(t=t());const r=o.type;o.type=fs(r),e[n]={type:o.type,value:t}}else e[n]={type:fs(o)}}))}(a,(e.default||e).props);const u=a.methods;return u.onLoad=function(e){var t;return this.options=e,this.$page={fullPath:(t=this.route+U(e),function(e){return 0===e.indexOf("/")}(t)?t:"/"+t)},this.$vm&&this.$vm.$callHook("onLoad",e)},ns(u,Xi),os(u,e),function(e,t){if(!t)return;Object.keys(F).forEach((n=>{t&F[n]&&es(e,n,[])}))}(u,e.__runtimeHooks),ns(u,rs()),n&&n(a,{handleLink:s}),a}const xs=Page,ws=Component;function $s(e){const t=e.triggerEvent,n=function(n,...o){return t.apply(e,[(r=n,O(r.replace(V,"-"))),...o]);var r};try{e.triggerEvent=n}catch(o){e._triggerEvent=n}}function Ss(e,t,n){const o=t[e];t[e]=o?function(...e){return $s(this),o.apply(this,e)}:function(){$s(this)}}Page=function(e){return Ss("onLoad",e),xs(e)},Component=function(e){Ss("created",e);return e.properties&&e.properties.uP||(us(e),ds(e)),ws(e)};var ks=Object.freeze({__proto__:null,handleLink:function(e){const t=e.detail||e.value,n=t.vuePid;let o;n&&(o=Ki(this.$vm,n)),o||(o=this.$vm),t.parent=o},initLifetimes:function({mocks:e,isPage:t,initRelation:n,vueOptions:o}){return{attached(){let r=this.properties;!function(e,t){if(!e)return;const n=e.split(","),o=n.length;1===o?t._$vueId=n[0]:2===o&&(t._$vueId=n[0],t._$vuePid=n[1])}(r.uI,this);const i={vuePid:this._$vuePid};n(this,i);const s=this,c=t(s);let a=r;this.$vm=function(e,t){ys||(ys=_s().$createComponent);const n=ys(e,t);return ti(n.$)||n}({type:o,props:ps(a,c)},{mpType:c?"page":"component",mpInstance:s,slots:r.uS||{},parentComponent:i.parent&&i.parent.$,onBeforeSetup(t,n){!function(e,t){Object.defineProperty(e,"refs",{get(){const e={};return function(e,t,n){e.selectAllComponents(t).forEach((e=>{const t=e.properties.uR;n[t]=e.$vm||e}))}(t,".r",e),t.selectAllComponents(".r-i-f").forEach((t=>{const n=t.properties.uR;n&&(e[n]||(e[n]=[]),e[n].push(t.$vm||t))})),e}})}(t,s),function(e,t,n){const o=e.ctx;n.forEach((n=>{l(t,n)&&(e[n]=o[n]=t[n])}))}(t,s,e),function(e,t){Gi(e,t);const n=e.ctx;Zi.forEach((e=>{n[e]=function(...t){const o=n.$scope;if(o&&o[e])return o[e].apply(o,t)}}))}(t,n)}}),c||function(e){const t=e.$options;f(t.behaviors)&&t.behaviors.includes("uni://form-field")&&e.$watch("modelValue",(()=>{e.$scope&&e.$scope.setData({name:e.name,value:e.modelValue})}),{immediate:!0})}(this.$vm)},ready(){this.$vm&&(this.$vm.$callHook("mounted"),this.$vm.$callHook("onReady"))},detached(){var e;this.$vm&&(Hi(this.$vm.$.uid),e=this.$vm,vs||(vs=_s().$destroyComponent),vs(e))}}},initRelation:function(e,t){e.triggerEvent("__l",t)},isPage:function(e){return!!e.route},mocks:["__route__","__wxExparserNodeId__","__wxWebviewId__"]});const Os=function(e){return App(ss(e))},Ps=(As=ks,function(e){return Component(bs(e,As))});var As;const Es=function(e){return function(t){return Component(ms(t,e))}}(ks),Cs=function(e){cs(ss(e),e)},Is=function(e){const t=ss(e),n=h(getApp)&&getApp({allowDefault:!0});if(!n)return;e.$.ctx.$scope=n;const o=n.globalData;o&&Object.keys(t.globalData).forEach((e=>{l(o,e)||(o[e]=t.globalData[e])})),Object.keys(t).forEach((e=>{l(n,e)||(n[e]=t[e])})),cs(t,e)};function js(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime());else if(e instanceof RegExp)n=new RegExp(e);else if(e instanceof Map)n=new Map(Array.from(e,(([e,n])=>[e,js(n,t)])));else if(e instanceof Set)n=new Set(Array.from(e,(e=>js(e,t))));else if(Array.isArray(e))n=e.map((e=>js(e,t)));else if("[object Object]"===Object.prototype.toString.call(e)){n=Object.create(Object.getPrototypeOf(e)),t.set(e,n);for(const[o,r]of Object.entries(e))n[o]=js(r,t)}else n=Object.assign({},e);return t.set(e,n),n}function Ts(e={},t={}){if("object"!=typeof(e=js(e))||null===e||"object"!=typeof t||null===t)return e;const n=Array.isArray(e)?e.slice():Object.assign({},e);for(const o in t){if(!t.hasOwnProperty(o))continue;const e=t[o],r=n[o];e instanceof Date?n[o]=new Date(e):e instanceof RegExp?n[o]=new RegExp(e):e instanceof Map?n[o]=new Map(e):e instanceof Set?n[o]=new Set(e):n[o]="object"==typeof e&&null!==e?Ts(r,e):e}return n}function Rs(e){switch(typeof e){case"undefined":return!0;case"string":if(0==e.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"").length)return!0;break;case"boolean":if(!e)return!0;break;case"number":if(0===e||isNaN(e))return!0;break;case"object":if(null===e||0===e.length)return!0;for(var t in e)return!1;return!0}return!1}wx.createApp=global.createApp=Os,wx.createPage=Ps,wx.createComponent=Es,wx.createPluginApp=global.createPluginApp=Cs,wx.createSubpackageApp=global.createSubpackageApp=Is;const Ls={email:function(e){return/[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(e)},mobile:function(e){return/^1[3-9]\d{9}$/.test(e)},url:function(e){return/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(e)},date:function(e){return!/Invalid|NaN/.test(new Date(e).toString())},dateISO:function(e){return/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},number:function(e){return/^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(e)},digits:function(e){return/^\d+$/.test(e)},idCard:function(e){return/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e)},carNo:function(e){const t=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/,n=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;return 7===e.length?n.test(e):8===e.length&&t.test(e)},amount:function(e){return/^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(e)},chinese:function(e){return/^[\u4e00-\u9fa5]+$/gi.test(e)},letter:function(e){return/^[a-zA-Z]*$/.test(e)},enOrNum:function(e){return/^[0-9a-zA-Z]*$/g.test(e)},contains:function(e,t){return e.indexOf(t)>=0},range:function(e,t){return e>=t[0]&&e<=t[1]},rangeLength:function(e,t){return e.length>=t[0]&&e.length<=t[1]},empty:Rs,isEmpty:Rs,jsonString:function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(n){return!1}return!1},landline:function(e){return/^\d{3,4}-\d{7,8}(-\d{3,4})?$/.test(e)},object:function(e){return"[object Object]"===Object.prototype.toString.call(e)},array:function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},code:function(e,t=6){return new RegExp(`^\\d{${t}}$`).test(e)}};const Ms=new class{setConfig(e){this.config=Ts(this.config,e)}request(e={}){if(this.interceptor.request&&"function"==typeof this.interceptor.request){let t=this.interceptor.request(e);if(!1===t)return new Promise((()=>{}));this.options=t}return e.dataType=e.dataType||this.config.dataType,e.responseType=e.responseType||this.config.responseType,e.url=e.url||"",e.params=e.params||{},e.header=Object.assign({},this.config.header,e.header),e.method=e.method||this.config.method,new Promise(((t,n)=>{e.complete=e=>{if(Ut.hideLoading(),clearTimeout(this.config.timer),this.config.timer=null,this.config.originalData)if(this.interceptor.response&&"function"==typeof this.interceptor.response){let o=this.interceptor.response(e);!1!==o?t(o):n(e)}else t(e);else if(200==e.statusCode)if(this.interceptor.response&&"function"==typeof this.interceptor.response){let o=this.interceptor.response(e.data);!1!==o?t(o):n(e.data)}else t(e.data);else n(e)},e.url=Ls.url(e.url)?e.url:this.config.baseUrl+(0==e.url.indexOf("/")?e.url:"/"+e.url),this.config.showLoading&&!this.config.timer&&(this.config.timer=setTimeout((()=>{Ut.showLoading({title:this.config.loadingText,mask:this.config.loadingMask}),this.config.timer=null}),this.config.loadingTime)),Ut.request(e)}))}constructor(){this.config={baseUrl:"",header:{},method:"POST",dataType:"json",responseType:"text",showLoading:!0,loadingText:"请求中...",loadingTime:800,timer:null,originalData:!1,loadingMask:!0},this.interceptor={request:null,response:null},this.get=(e,t={},n={})=>this.request({method:"GET",url:e,header:n,data:t}),this.post=(e,t={},n={})=>this.request({url:e,method:"POST",header:n,data:t}),this.put=(e,t={},n={})=>this.request({url:e,method:"PUT",header:n,data:t}),this.delete=(e,t={},n={})=>this.request({url:e,method:"DELETE",header:n,data:t})}};const Ds=(new class{constructor(){this.config={type:"navigateTo",url:"",delta:1,params:{},animationType:"pop-in",animationDuration:300,intercept:!1},this.route=this.route.bind(this)}addRootPath(e){return"/"===e[0]?e:`/${e}`}mixinParam(e,t){e=e&&this.addRootPath(e);let n="";return/.*\/.*\?.*=.*/.test(e)?(n=Ut.$u.queryParams(t,!1),e+"&"+n):(n=Ut.$u.queryParams(t),e+n)}async route(e={},t={}){let n={};if("string"==typeof e?(n.url=this.mixinParam(e,t),n.type="navigateTo"):(n=Ut.$u.deepMerge(this.config,e),n.url=this.mixinParam(e.url,e.params)),t.intercept&&(this.config.intercept=t.intercept),n.params=t,n=Ut.$u.deepMerge(this.config,n),"function"==typeof Ut.$u.routeIntercept){await new Promise(((e,t)=>{Ut.$u.routeIntercept(n,e)}))&&this.openPage(n)}else this.openPage(n)}openPage(e){const{url:t,type:n,delta:o,animationType:r,animationDuration:i}=e;"navigateTo"!=e.type&&"to"!=e.type||Ut.navigateTo({url:t,animationType:r,animationDuration:i}),"redirectTo"!=e.type&&"redirect"!=e.type||Ut.redirectTo({url:t}),"switchTab"!=e.type&&"tab"!=e.type||Ut.switchTab({url:t}),"reLaunch"!=e.type&&"launch"!=e.type||Ut.reLaunch({url:t}),"navigateBack"!=e.type&&"back"!=e.type||Ut.navigateBack({delta:o})}}).route;function Ns(e=null,t="yyyy-mm-dd"){e||(e=Number(new Date)),10==e.toString().length&&(e*=1e3);let n,o=new Date(e),r={"y+":o.getFullYear().toString(),"m+":(o.getMonth()+1).toString(),"d+":o.getDate().toString(),"h+":o.getHours().toString(),"M+":o.getMinutes().toString(),"s+":o.getSeconds().toString()};for(let i in r)n=new RegExp("("+i+")").exec(t),n&&(t=t.replace(n[1],1==n[1].length?r[i]:r[i].padStart(n[1].length,"0")));return t}function Hs(e,t=!0){if((e=e.toLowerCase())&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)){if(4===e.length){let t="#";for(let n=1;n<4;n+=1)t+=e.slice(n,n+1).concat(e.slice(n,n+1));e=t}let n=[];for(let t=1;t<7;t+=2)n.push(parseInt("0x"+e.slice(t,t+2)));return t?`rgb(${n[0]},${n[1]},${n[2]})`:n}if(/^(rgb|RGB)/.test(e)){return e.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)))}return e}function Vs(e){let t=e;if(/^(rgb|RGB)/.test(t)){let e=t.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(","),n="#";for(let t=0;t=e)return String(n);let o=e-n.length,r=Math.ceil(o/t.length);for(;r>>=1;)t+=t,1===r&&(t+=t);return t.slice(0,o)+n});const Bs={colorGradient:function(e="rgb(0, 0, 0)",t="rgb(255, 255, 255)",n=10){let o=Hs(e,!1),r=o[0],i=o[1],s=o[2],c=Hs(t,!1),a=(c[0]-r)/n,u=(c[1]-i)/n,l=(c[2]-s)/n,f=[];for(let p=0;p=0))if(t.constructor===Array)switch(n){case"indices":for(let n=0;n{r.push(i+"[]="+e)}));break;case"repeat":t.forEach((e=>{r.push(i+"="+e)}));break;case"comma":let e="";t.forEach((t=>{e+=(e?",":"")+t})),r.push(i+"="+e)}else r.push(i+"="+t)}return r.length?o+r.join("&"):""},route:Ds,timeFormat:Ns,date:Ns,timeFrom:function(e=null,t="yyyy-mm-dd"){e||(e=Number(new Date)),10==e.toString().length&&(e*=1e3);let n=+new Date(Number(e)),o=(Number(new Date)-n)/1e3,r="";switch(!0){case o<300:r="刚刚";break;case o>=300&&o<3600:r=parseInt(o/60)+"分钟前";break;case o>=3600&&o<86400:r=parseInt(o/3600)+"小时前";break;case o>=86400&&o<2592e3:r=parseInt(o/86400)+"天前";break;default:r=!1===t?o>=2592e3&&o<31536e3?parseInt(o/2592e3)+"个月前":parseInt(o/31536e3)+"年前":Ns(n,t)}return r},colorGradient:Bs.colorGradient,colorToRgba:Bs.colorToRgba,guid:function(e=32,t=!0,n=null){let o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),r=[];if(n=n||o.length,e)for(let i=0;iMath.random()-.5))},wranning:function(e){},get:Ms.get,post:Ms.post,put:Ms.put,delete:Ms.delete,hexToRgb:Bs.hexToRgb,rgbToHex:Bs.rgbToHex,test:Ls,random:function(e,t){if(e>=0&&t>0&&t>=e){let n=t-e+1;return Math.floor(Math.random()*n+e)}return 0},deepClone:js,deepMerge:Ts,getParent:function(e,t){let n=this.$parent;for(;n;){if(n.$options.name===e){let e={};if(Array.isArray(t))t.map((t=>{e[t]=n[t]?n[t]:""}));else for(let o in t)Array.isArray(t[o])?t[o].length?e[o]=t[o]:e[o]=n[o]:t[o].constructor===Object?Object.keys(t[o]).length?e[o]=t[o]:e[o]=n[o]:e[o]=t[o]||!1===t[o]?t[o]:n[o];return e}n=n.$parent}return{}},$parent:function(e){let t=this.$parent;for(;t;){if(!t.$options||t.$options.name===e)return t;t=t.$parent}return!1},addUnit:function(e="auto",t="rpx"){return e=String(e),Ls.number(e)?`${e}${t}`:e},trim:function(e,t="both"){return"both"==t?e.replace(/^\s+|\s+$/g,""):"left"==t?e.replace(/^\s*/,""):"right"==t?e.replace(/(\s*$)/g,""):"all"==t?e.replace(/\s+/g,""):e},type:["primary","success","error","warning","info"],http:Ms,toast:function(e,t=1500){Ut.showToast({title:e,icon:"none",duration:t})},config:zs,zIndex:{toast:10090,noNetwork:10080,popup:10075,mask:10070,navbar:980,topTips:975,sticky:970,indexListSticky:965},debounce:function(e,t=500,n=!1){if(null!==Ws&&clearTimeout(Ws),n){var o=!Ws;Ws=setTimeout((function(){Ws=null}),t),o&&"function"==typeof e&&e()}else Ws=setTimeout((function(){"function"==typeof e&&e()}),t)},throttle:function(e,t=500,n=!0){n?Us||(Us=!0,"function"==typeof e&&e(),setTimeout((()=>{Us=!1}),t)):Us||(Us=!0,setTimeout((()=>{Us=!1,"function"==typeof e&&e()}),t))}};Ut.$u=Fs;const qs=e=>(t,n=qr())=>{!Xr&&or(e,t,n)},Ks=qs("onShow"),Zs=qs("onLoad");exports._export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},exports.computed=ni,exports.createSSRApp=zi,exports.e=(e,...t)=>c(e,...t),exports.f=(e,t)=>function(e,t){let n;if(f(e)||g(e)){n=new Array(e.length);for(let o=0,r=e.length;ot(e,n,n)));else{const o=Object.keys(e);n=new Array(o.length);for(let r=0,i=o.length;rR(e),exports.nextTick$1=Eo,exports.o=(e,t)=>Ui(e,t),exports.onLoad=Zs,exports.onMounted=sr,exports.onShow=Ks,exports.onUnmounted=lr,exports.p=e=>function(e){const{uid:t,__counter:n}=qr();return t+","+((Ni[t]||(Ni[t]=[])).push(Br(e))-1)+","+n}(e),exports.reactive=Jn,exports.ref=lo,exports.resolveComponent=function(e,t){return function(e,t,n=!0,o=!1){const r=Vo||Fr;if(r){const n=r.type;if("components"===e){const e=function(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===O(t)||e===E(O(t))))return n}const i=Uo(r[e]||n[e],t)||Uo(r.appContext[e],t);return!i&&o?n:i}}("components",e,!0,t)||e},exports.sr=(e,t,n)=>function(e,t,n={}){const{$templateRefs:o}=qr();o.push({i:t,r:e,k:n.k,f:n.f})}(e,t,n),exports.t=e=>(e=>g(e)?e:null==e?"":f(e)||y(e)&&(e.toString===_||!h(e.toString))?JSON.stringify(e,L,2):String(e))(e),exports.watch=zo,exports.wx$1=Bt; diff --git a/unpackage/dist/build/mp-weixin/components/MapComponent.js b/unpackage/dist/build/mp-weixin/components/MapComponent.js new file mode 100644 index 0000000..3b73b0b --- /dev/null +++ b/unpackage/dist/build/mp-weixin/components/MapComponent.js @@ -0,0 +1 @@ +"use strict";const e=require("../common/vendor.js"),t=require("../common/assets.js"),i={__name:"MapComponent",props:{userLocation:{type:Object,default:null},positionList:{type:Array,default:()=>[]},filteredPositions:{type:Array,default:()=>[]},searchKeyword:{type:String,default:""}},emits:["relocate","scan","showList","markerTap","mapCenterChange"],setup(i,{expose:o,emit:a}){const n=i,l=a,u=e.ref(0),d=e.ref(16),r=e.ref({longitude:116.397128,latitude:39.916527}),s=e.ref(null),c=e.ref(!1),p=()=>{l("relocate")},f=()=>{l("scan")},m=()=>{l("showList")},g=t=>{if(!t.detail||void 0===t.detail.markerId)return;const i=t.detail.markerId;if(9999===i)return void e.index.showToast({title:"这是您的位置",icon:"none"});const o=n.filteredPositions[i];o&&l("markerTap",o)},v=e=>{if("end"===e.detail.type){const{center:t}=e.detail;if(!t||void 0===t.longitude||void 0===t.latitude)return;r.value={longitude:t.longitude,latitude:t.latitude},d.value=16,s.value&&clearTimeout(s.value),s.value=setTimeout((()=>{l("mapCenterChange",r.value)}),500)}},h=e.computed((()=>{const e=[];return n.filteredPositions.forEach(((t,i)=>{t.longitude&&t.latitude&&e.push({id:i,longitude:parseFloat(t.longitude),latitude:parseFloat(t.latitude),title:t.name,iconPath:"/static/scan-icon.png",width:30,height:30,callout:{content:t.name,fontSize:14,borderRadius:8,bgColor:"#ffffff",padding:10,display:"BYCLICK"}})})),n.userLocation&&e.push({id:9999,longitude:n.userLocation.longitude,latitude:n.userLocation.latitude,title:"我的位置",iconPath:"/static/scan-icon.png",width:32,height:32,callout:{content:"我的位置",fontSize:14,borderRadius:8,bgColor:"#2196F3",color:"#ffffff",padding:10,display:"BYCLICK"}}),e}));return e.watch((()=>n.userLocation),(t=>{var i,o;t&&t.longitude&&t.latitude&&!c.value&&(i=t.longitude,o=t.latitude,r.value.longitude===i&&r.value.latitude===o||(r.value={longitude:i,latitude:o},d.value=16,e.nextTick$1((()=>{setTimeout((()=>{const t=e.index.createMapContext("mainMap");t&&t.setCenterOffset({longitude:i,latitude:o,success:()=>{},fail:()=>{t.includePoints({points:[{longitude:i,latitude:o}],padding:[0,0,0,0]})}})}),200)}))),c.value=!0)}),{immediate:!0,deep:!0}),e.onMounted((()=>{})),e.onUnmounted((()=>{s.value&&clearTimeout(s.value)})),o({mapCenter:e.computed((()=>r.value))}),(i,o)=>e.e({a:u.value,b:r.value.longitude,c:r.value.latitude,d:d.value,e:h.value,f:e.o(g),g:e.o(v),h:!r.value.longitude},(r.value.longitude,{}),{i:t._imports_0,j:e.o(p),k:t._imports_0,l:e.o(f),m:t._imports_0,n:e.o(m)})}},o=e._export_sfc(i,[["__scopeId","data-v-65e2cece"]]);wx.createComponent(o); diff --git a/unpackage/dist/build/mp-weixin/components/MapComponent.json b/unpackage/dist/build/mp-weixin/components/MapComponent.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/build/mp-weixin/components/MapComponent.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/components/MapComponent.wxml b/unpackage/dist/build/mp-weixin/components/MapComponent.wxml new file mode 100644 index 0000000..41cd47b --- /dev/null +++ b/unpackage/dist/build/mp-weixin/components/MapComponent.wxml @@ -0,0 +1 @@ +地图加载中...我的位置扫码使用附近场地 \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/components/MapComponent.wxss b/unpackage/dist/build/mp-weixin/components/MapComponent.wxss new file mode 100644 index 0000000..d8ee23a --- /dev/null +++ b/unpackage/dist/build/mp-weixin/components/MapComponent.wxss @@ -0,0 +1 @@ +.map-container.data-v-65e2cece{flex:1;position:relative;height:100vh;width:100%}.map-container .map.data-v-65e2cece{width:100%;height:100%}.map-container .map-loading.data-v-65e2cece{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,.8);display:flex;justify-content:center;align-items:center;z-index:10}.map-container .map-loading .loading-content.data-v-65e2cece{display:flex;flex-direction:column;align-items:center;justify-content:center}.map-container .map-loading .loading-content .loading-spinner.data-v-65e2cece{width:60rpx;height:60rpx;border:8rpx solid #f3f3f3;border-top:8rpx solid #3498db;border-radius:50%;animation:spin-65e2cece 1s linear infinite;margin-bottom:20rpx}.map-container .map-loading .loading-content text.data-v-65e2cece{font-size:32rpx;color:#333;font-weight:500}.map-container .map-controls.data-v-65e2cece{position:absolute;right:30rpx;bottom:20rpx;left:30rpx;display:flex;justify-content:center;align-items:center;gap:30rpx}.map-container .map-controls .control-btn.data-v-65e2cece{min-width:140rpx;height:80rpx;background:#fff;border-radius:40rpx;display:flex;flex-direction:row;align-items:center;justify-content:center;box-shadow:0 4rpx 12rpx rgba(0,0,0,.1);transition:all .2s ease;padding:0 20rpx}.map-container .map-controls .control-btn.data-v-65e2cece:active{transform:scale(.95)}.map-container .map-controls .control-btn .control-icon.data-v-65e2cece{width:32rpx;height:32rpx;margin-right:12rpx}.map-container .map-controls .control-btn text.data-v-65e2cece{font-size:26rpx;color:#333;white-space:nowrap;font-weight:500}.map-container .map-controls .control-btn.main-btn.data-v-65e2cece{min-width:160rpx;height:90rpx;box-shadow:0 6rpx 20rpx rgba(33,150,243,.4);transform:translateY(-5rpx)}.map-container .map-controls .control-btn.main-btn .control-icon.data-v-65e2cece{width:36rpx;height:36rpx;margin-right:16rpx}.map-container .map-controls .control-btn.main-btn text.data-v-65e2cece{font-size:28rpx;font-weight:600}.map-container .map-controls .control-btn.main-btn.data-v-65e2cece:active{transform:translateY(-5rpx) scale(.95)}.map-container .map-controls .scan-control.data-v-65e2cece{background:#2196f3}.map-container .map-controls .scan-control .control-icon.data-v-65e2cece{filter:brightness(0) invert(1)}.map-container .map-controls .scan-control text.data-v-65e2cece{color:#fff}.map-container .map-controls .list-control.data-v-65e2cece{background:#4caf50}.map-container .map-controls .list-control .control-icon.data-v-65e2cece{filter:brightness(0) invert(1)}.map-container .map-controls .list-control text.data-v-65e2cece{color:#fff}.map-container .map-controls .location-control.data-v-65e2cece{background:#fff;border:2rpx solid #e0e0e0}.map-container .map-controls .location-control .control-icon.data-v-65e2cece{filter:none}.map-container .map-controls .location-control text.data-v-65e2cece{color:#333}@keyframes spin-65e2cece{0%{transform:rotate(0)}to{transform:rotate(360deg)}} diff --git a/unpackage/dist/build/mp-weixin/constants/help.js b/unpackage/dist/build/mp-weixin/constants/help.js index 0883091..a315807 100644 --- a/unpackage/dist/build/mp-weixin/constants/help.js +++ b/unpackage/dist/build/mp-weixin/constants/help.js @@ -1 +1 @@ -"use strict";exports.HELP_CONTENT={FAQ_LIST:[{question:"如何租借风扇?",answer:'点击首页"扫码租借"按钮,使用微信扫描设备上的二维码,按提示完成支付即可使用。'},{question:"收费标准是怎样的?",answer:"使用费用为2元/小时,不足1小时按1小时计算。押金99元,归还后自动退还。"},{question:"如何归还风扇?",answer:'将风扇带到任意归还点,点击首页"扫码归还"按钮,扫描归还点二维码即可完成归还。'},{question:"押金多久能退还?",answer:"归还设备后押金将自动发起退款,预计0-7个工作日到账。"},{question:"设备无法正常使用怎么办?",answer:'您可以通过"我的-投诉与建议"提交故障反馈,或直接拨打客服电话处理。'}],CONTACT:{TITLE:"联系客服",PHONE:{LABEL:"客服电话",VALUE:"400-888-8888"},SERVICE_TIME:{LABEL:"服务时间",VALUE:"周一至周日 09:00-22:00"}}}; +"use strict";exports.HELP_CONTENT={FAQ_LIST:[{question:"如何租借风扇?",answer:'点击首页"扫码租借"按钮,使用微信扫描设备上的二维码,按提示完成支付即可使用。'},{question:"收费标准是怎样的?",answer:"本产品租界风扇采用免押金租借形式,无需支付押金,具体计费方式以场地机柜扫码提示为准。"},{question:"如何归还风扇?",answer:'将风扇带到任意归还点,点击首页"扫码归还"按钮,扫描归还点二维码即可完成归还。'},{question:"押金多久能退还?",answer:"归还设备后押金将自动发起退款,预计0-7个工作日到账。"},{question:"设备无法正常使用怎么办?",answer:'您可以通过"我的-投诉与建议"提交故障反馈,或直接拨打客服电话处理。'}],CONTACT:{TITLE:"联系客服",PHONE:{LABEL:"客服电话",VALUE:"400-077-6018"},SERVICE_TIME:{LABEL:"服务时间",VALUE:"周一至周日 09:00-22:00"}}}; diff --git a/unpackage/dist/build/mp-weixin/pages/device/detail.js b/unpackage/dist/build/mp-weixin/pages/device/detail.js index 5c16dfd..99cb084 100644 --- a/unpackage/dist/build/mp-weixin/pages/device/detail.js +++ b/unpackage/dist/build/mp-weixin/pages/device/detail.js @@ -1 +1 @@ -"use strict";const e=require("../../common/vendor.js"),o=require("../../common/assets.js"),t=require("../../config/user.js"),a=require("../../util/index.js"),n={__name:"detail",setup(n){const i=e.ref({}),r=e.ref(""),d=e.ref({}),s=e.ref("一号教学楼大厅"),c=e.ref(95),l=e.ref(!1),u=e.reactive({text:"可使用",class:"available"}),g=e.ref(!0),v=e.ref(""),h=e.ref(!1);e.onLoad((e=>{r.value=e.deviceNo,m(),console.log(e.deviceNo),x()})),e.onMounted((()=>{p()}));const p=async()=>{try{const e=await a.getUserInfo();console.log(e.data.phone,"getUserInfoPhone"),200==e.code&&e.data&&e.data.phone?v.value=e.data.phone:h.value=!0}catch(e){console.error("获取用户信息失败:",e)}},f=o=>{if(console.log("getPhoneNumber event:",o.detail),o.detail.errMsg&&o.detail.errMsg.includes("deny"))e.index.showToast({title:"需要授权手机号才能使用设备",icon:"none"});else if(o.detail.code){e.index.showLoading({title:"获取中..."}),console.log("获取到的授权code:",o.detail.code);try{a.getUserPhoneNumber(o.detail.code).then((o=>{if(console.log("获取手机号API响应原始数据:",JSON.stringify(o)),e.index.hideLoading(),!o)return console.error("API返回数据为空"),void e.index.showModal({title:"数据异常",content:"API返回为空",showCancel:!1});console.log("响应code:",o.code,"响应类型:",typeof o.code),console.log("是否有data:",!!o.data,"是否有phone:",o.data&&!!o.data.phone),200==o.code&&o.data&&o.data.phoneNumber?(v.value=o.data.phoneNumber,h.value=!1,e.index.showToast({title:"手机号获取成功",icon:"success"})):(console.warn("获取手机号响应异常:",o.msg||"未知错误"),e.index.showModal({title:"获取手机号异常",content:`状态码: ${o.code}, 消息: ${o.msg||"无"}`,showCancel:!1}))})).catch((o=>{e.index.hideLoading(),console.error("获取手机号码失败(catch):",o);let t=o.message||o.toString();e.index.showModal({title:"获取手机号失败",content:"错误信息: "+t,showCancel:!1})}))}catch(t){e.index.hideLoading(),console.error("获取手机号外部错误:",t),e.index.showModal({title:"意外错误",content:"处理过程发生异常: "+(t.message||t),showCancel:!1})}}else e.index.showToast({title:"获取授权码失败",icon:"none"})},x=async()=>{const e=await t.getDeviceInfo(r.value);200==e.code&&(i.value=e.data.device||{},i.value.deviceLocation?s.value=i.value.deviceLocation:e.data.position&&e.data.position.name&&(s.value=e.data.position.name),i.value.status&&("online"===i.value.status?(u.text="可使用",u.class="available"):"offline"===i.value.status&&(u.text="离线",u.class="offline")),console.log("feeconfig",i.value.feeConfig),d.value=JSON.parse(i.value.feeConfig)[0]||{})},m=async()=>{try{const o=await e.index.$api.checkActiveOrder();if(o.hasOrder){const t=o.order;"waiting_for_payment"===t.status?e.index.redirectTo({url:`/pages/order/payment?orderId=${t.orderId}&deviceId=${r.value}`}):"in_used"===t.status&&e.index.redirectTo({url:`/pages/device/return?deviceId=${r.value}`})}}catch(o){e.index.showToast({title:"订单状态查询失败",icon:"none"})}},w=o=>{g.value?v.value?T(o):h.value=!0:e.index.showModal({title:"提示",content:"请先登录后再操作",confirmText:"去登录",success:o=>{o.confirm&&e.index.navigateTo({url:"/pages/login/index"})}})},y=e.reactive({time:"1小时",price:"5.00"}),I=e.ref("99.00"),T=async o=>{try{e.index.showLoading({title:"处理中"});const s=await t.rentPowerBank(r.value,v.value);if(200!==s.code)throw new Error(s.msg||"设备租借失败");const c=s.data;try{let e=0;e=y.time.includes("小时")?60*parseInt(y.time):y.time.includes("分钟")?parseInt(y.time):60*parseInt(y.time);const o=await t.updateOrderPackage({orderId:c.orderId,packageTime:e,packagePrice:parseFloat(y.price)});200!==o.code?console.warn("更新订单套餐信息失败:",o.msg):console.log("订单套餐信息已提前更新")}catch(n){console.error("更新订单套餐信息时出错:",n)}if("wx-pay"==o){e.index.hideLoading();const o=await t.getOrderByOrderNo(c.orderNo);console.log(o);const a=parseFloat(i.value.depositAmount),n=(a+parseFloat(y.price)).toFixed(2);e.index.hideLoading(),e.index.redirectTo({url:`/pages/order/payment?orderId=${c.orderId}&packageTimeHours=${y.time.replace("小时","")}&packagePrice=${y.price}&totalAmount=${n}&depositAmount=${I.value}${i.value&&i.value.feeConfig?"&feeConfig="+encodeURIComponent(i.value.feeConfig):""}`})}else if("wx-score-pay"==o){e.index.hideLoading();const o=await t.getOrderByOrderNoScore(c.orderNo);if(e.index.hideLoading(),o&&200===o.code)try{if("0"==(await a.initiateWeChatScorePayment(o)).errCode){const o=await t.getOrderByOrderNoScorePayStatus(c.orderNo);console.log(o.data.orderStatus),"in_used"==o.data.orderStatus?(e.index.showToast({title:"设备租借成功",icon:"success"}),setTimeout((()=>{e.index.redirectTo({url:"/pages/order/index"})}),1500)):"waiting_for_payment"==o.data.orderStatus&&(e.index.showToast({title:"设备租借失败,订单已取消",icon:"error"}),await t.cancelOrder({orderId:c.orderNo}),setTimeout((()=>{e.index.switchTab({url:"/pages/index/index"})}),1500))}}catch(d){e.index.showToast({title:"支付分调用失败,请重试",icon:"none"})}else e.index.showToast({title:(null==o?void 0:o.msg)||"获取支付参数失败",icon:"none"})}}catch(s){e.index.hideLoading(),e.index.showToast({title:s.message||"租借失败,请重试",icon:"none"})}};return(t,a)=>e.e({a:e.t(u.text),b:e.n(u.class),c:e.t(r.value),d:o._imports_0$3,e:e.t(s.value),f:o._imports_1$2,g:c.value<20?1:"",h:e.t(c.value),i:e.t(d.value.maxHourPrice),j:e.t(i.value.depositAmount),k:e.t(l.value?"归还设备":"免押租借"),l:l.value?1:"",m:e.o((e=>w("wx-score-pay"))),n:o._imports_0$2,o:h.value},h.value?{p:e.o((()=>{})),q:e.o(f),r:e.o((e=>h.value=!1))}:{})}},i=e._export_sfc(n,[["__scopeId","data-v-f7bf7b27"]]);wx.createPage(i); +"use strict";const e=require("../../common/vendor.js"),o=require("../../common/assets.js"),t=require("../../config/user.js"),a=require("../../util/index.js"),n={__name:"detail",setup(n){const i=e.ref({}),d=e.ref(""),r=e.ref({}),s=e.ref("一号教学楼大厅");e.ref(95);const c=e.ref(!1),l=e.reactive({text:"可使用",class:"available"}),u=e.ref(!0),g=e.ref(""),v=e.ref(!1);e.onLoad((o=>{o.deviceNo==e.index.getStorageSync("deviceId")&&e.index.getStorageSync("deviceId")?d.value=e.index.getStorageSync("deviceId"):(d.value=o.deviceNo,e.index.setStorageSync("deviceId",o.deviceNo)),f()})),e.onMounted((async()=>{await h()})),e.onShow((async()=>{await p()}));const h=async()=>{try{const e=await a.getUserInfo();console.log(e.data.phone,"getUserInfoPhone"),200==e.code&&e.data&&e.data.phone?g.value=e.data.phone:v.value=!0}catch(e){console.error("获取用户信息失败:",e)}},x=o=>{if(console.log("getPhoneNumber event:",o.detail),o.detail.errMsg&&o.detail.errMsg.includes("deny"))e.index.showToast({title:"需要授权手机号才能使用设备",icon:"none"});else if(o.detail.code){e.index.showLoading({title:"获取中..."}),console.log("获取到的授权code:",o.detail.code);try{a.getUserPhoneNumber(o.detail.code).then((o=>{if(console.log("获取手机号API响应原始数据:",JSON.stringify(o)),e.index.hideLoading(),!o)return console.error("API返回数据为空"),void e.index.showModal({title:"数据异常",content:"API返回为空",showCancel:!1});console.log("响应code:",o.code,"响应类型:",typeof o.code),console.log("是否有data:",!!o.data,"是否有phone:",o.data&&!!o.data.phone),200==o.code&&o.data&&o.data.phoneNumber?(g.value=o.data.phoneNumber,v.value=!1,e.index.showToast({title:"手机号获取成功",icon:"success"})):(console.warn("获取手机号响应异常:",o.msg||"未知错误"),e.index.showModal({title:"获取手机号异常",content:`状态码: ${o.code}, 消息: ${o.msg||"无"}`,showCancel:!1}))})).catch((o=>{e.index.hideLoading(),console.error("获取手机号码失败(catch):",o);let t=o.message||o.toString();e.index.showModal({title:"获取手机号失败",content:"错误信息: "+t,showCancel:!1})}))}catch(t){e.index.hideLoading(),console.error("获取手机号外部错误:",t),e.index.showModal({title:"意外错误",content:"处理过程发生异常: "+(t.message||t),showCancel:!1})}}else e.index.showToast({title:"获取授权码失败",icon:"none"})},p=async()=>{const e=await t.getDeviceInfo(d.value);200==e.code&&(i.value=e.data.device||{},i.value.deviceLocation?s.value=i.value.deviceLocation:e.data.position&&e.data.position.name&&(s.value=e.data.position.name),i.value.status&&("online"===i.value.status?(l.text="可使用",l.class="available"):"offline"===i.value.status&&(l.text="离线",l.class="offline")),console.log("feeconfig",i.value.feeConfig),r.value=JSON.parse(i.value.feeConfig)[0]||{})},f=async()=>{try{const o=await e.index.$api.checkActiveOrder();if(o.hasOrder){const t=o.order;"waiting_for_payment"===t.status?e.index.redirectTo({url:`/pages/order/payment?orderId=${t.orderId}&deviceId=${d.value}`}):"in_used"===t.status&&e.index.redirectTo({url:`/pages/device/return?deviceId=${d.value}`})}}catch(o){e.index.showToast({title:"订单状态查询失败",icon:"none"})}},m=o=>{u.value?g.value?I(o):v.value=!0:e.index.showModal({title:"提示",content:"请先登录后再操作",confirmText:"去登录",success:o=>{o.confirm&&e.index.navigateTo({url:"/pages/login/index"})}})},w=e.reactive({time:"1小时",price:"5.00"}),y=e.ref("99.00"),I=async o=>{try{e.index.showLoading({title:"处理中"});const s=await t.rentPowerBank(d.value,g.value);if(200!==s.code)throw new Error(s.msg||"设备租借失败");const c=s.data;try{let e=0;e=w.time.includes("小时")?60*parseInt(w.time):w.time.includes("分钟")?parseInt(w.time):60*parseInt(w.time);const o=await t.updateOrderPackage({orderId:c.orderId,packageTime:e,packagePrice:parseFloat(w.price)});200!==o.code?console.warn("更新订单套餐信息失败:",o.msg):console.log("订单套餐信息已提前更新")}catch(n){console.error("更新订单套餐信息时出错:",n)}if("wx-pay"==o){e.index.hideLoading();const o=await t.getOrderByOrderNo(c.orderNo);console.log(o);const a=parseFloat(i.value.depositAmount),n=(a+parseFloat(w.price)).toFixed(2);e.index.hideLoading(),e.index.redirectTo({url:`/pages/order/payment?orderId=${c.orderId}&packageTimeHours=${w.time.replace("小时","")}&packagePrice=${w.price}&totalAmount=${n}&depositAmount=${y.value}${i.value&&i.value.feeConfig?"&feeConfig="+encodeURIComponent(i.value.feeConfig):""}`})}else if("wx-score-pay"==o){e.index.hideLoading();const o=await t.getOrderByOrderNoScore(c.orderNo);if(e.index.hideLoading(),o&&200===o.code)try{if("0"==(await a.initiateWeChatScorePayment(o)).errCode){const o=await t.getOrderByOrderNoScorePayStatus(c.orderNo);console.log(o.data.orderStatus),"in_used"==o.data.orderStatus?(e.index.showToast({title:"设备租借成功",icon:"success"}),setTimeout((()=>{e.index.redirectTo({url:"/pages/order/index"})}),1500)):"waiting_for_payment"==o.data.orderStatus&&(e.index.showToast({title:"设备租借失败,订单已取消",icon:"error"}),await t.cancelOrder({orderId:c.orderNo}),setTimeout((()=>{e.index.switchTab({url:"/pages/index/index"})}),1500))}}catch(r){e.index.showToast({title:"支付分调用失败,请重试",icon:"none"})}else e.index.showToast({title:(null==o?void 0:o.msg)||"获取支付参数失败",icon:"none"})}}catch(s){e.index.hideLoading(),e.index.showToast({title:s.message||"租借失败,请重试",icon:"none"})}};return(t,a)=>e.e({a:e.t(l.text),b:e.n(l.class),c:e.t(d.value),d:o._imports_0$3,e:e.t(s.value),f:e.t(r.value.maxHourPrice),g:e.t(i.value.depositAmount),h:e.t(c.value?"归还设备":"免押租借"),i:c.value?1:"",j:e.o((e=>m("wx-score-pay"))),k:o._imports_0$2,l:v.value},v.value?{m:e.o((()=>{})),n:e.o(x),o:e.o((e=>v.value=!1))}:{})}},i=e._export_sfc(n,[["__scopeId","data-v-f998093e"]]);wx.createPage(i); diff --git a/unpackage/dist/build/mp-weixin/pages/device/detail.wxml b/unpackage/dist/build/mp-weixin/pages/device/detail.wxml index 7fc16b0..7356ee5 100644 --- a/unpackage/dist/build/mp-weixin/pages/device/detail.wxml +++ b/unpackage/dist/build/mp-weixin/pages/device/detail.wxml @@ -1 +1 @@ -{{a}}共享风扇设备号:{{c}}当前位置{{e}}电池电量{{h}}%计费规则¥{{i}}/小时封顶 ¥{{j}}不足60分钟按60分钟计费持续计费至99元视为买断使用须知请在使用前检查设备是否完好请在指定区域内使用设备归还时请确保设备完好,避免损坏微信支付分|550分及以上优享授权获取手机号为了提供更好的服务,需要授权获取您的手机号暂不授权 \ No newline at end of file +{{a}}共享风扇设备号:{{c}}当前位置{{e}}计费规则¥{{f}}/小时封顶 ¥{{g}}不足60分钟按60分钟计费持续计费至99元视为买断使用须知请在使用前检查设备是否完好请在指定区域内使用设备归还时请确保设备完好,避免损坏微信支付分|550分及以上优享授权获取手机号为了提供更好的服务,需要授权获取您的手机号暂不授权 \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/device/detail.wxss b/unpackage/dist/build/mp-weixin/pages/device/detail.wxss index a20d480..a0f964f 100644 --- a/unpackage/dist/build/mp-weixin/pages/device/detail.wxss +++ b/unpackage/dist/build/mp-weixin/pages/device/detail.wxss @@ -1 +1 @@ -.container.data-v-f7bf7b27{min-height:100vh;background-color:#f5f7fa;padding:30rpx 30rpx 300rpx;box-sizing:border-box}.device-header.data-v-f7bf7b27{display:flex;flex-direction:column;margin-bottom:30rpx}.device-header .device-status-card.data-v-f7bf7b27{display:flex;align-items:center;margin-bottom:20rpx}.device-header .device-status-card .status-indicator.data-v-f7bf7b27{width:20rpx;height:20rpx;border-radius:50%;margin-right:10rpx}.device-header .device-status-card.available .status-indicator.data-v-f7bf7b27{background-color:#10c469;box-shadow:0 0 10rpx rgba(16,196,105,.5)}.device-header .device-status-card.available .status-text.data-v-f7bf7b27{color:#10c469}.device-header .device-status-card.offline .status-indicator.data-v-f7bf7b27{background-color:#9a9a9a}.device-header .device-status-card.offline .status-text.data-v-f7bf7b27{color:#9a9a9a}.device-header .device-status-card .status-text.data-v-f7bf7b27{font-size:28rpx;font-weight:500}.device-header .device-title .name.data-v-f7bf7b27{font-size:48rpx;font-weight:700;color:#333}.device-header .device-title .device-meta.data-v-f7bf7b27{margin-top:10rpx;display:flex;align-items:center}.device-header .device-title .device-meta .id-label.data-v-f7bf7b27{font-size:26rpx;color:#999}.device-header .device-title .device-meta .id-value.data-v-f7bf7b27{font-size:26rpx;color:#666}.card.data-v-f7bf7b27{background-color:#fff;border-radius:24rpx;box-shadow:0 4rpx 24rpx rgba(0,0,0,.03);padding:30rpx;margin-bottom:30rpx}.card .card-header.data-v-f7bf7b27{display:flex;align-items:center;justify-content:space-between;margin-bottom:24rpx}.card .card-header .card-title.data-v-f7bf7b27{font-size:32rpx;font-weight:600;color:#333}.device-info-card .card-row.data-v-f7bf7b27{display:flex;justify-content:space-between}.device-info-card .card-item.data-v-f7bf7b27{display:flex;align-items:center;flex:1}.device-info-card .card-item .item-icon.data-v-f7bf7b27{width:60rpx;height:60rpx;border-radius:12rpx;margin-right:20rpx;display:flex;align-items:center;justify-content:center;font-size:30rpx;color:#fff}.device-info-card .card-item .item-icon.location-icon.data-v-f7bf7b27{background:linear-gradient(135deg,#40c9ff,#32a5ff)}.device-info-card .card-item .item-icon.battery-icon.data-v-f7bf7b27{background:linear-gradient(135deg,#33db92,#10c469)}.device-info-card .card-item .item-icon.battery-icon.battery-low.data-v-f7bf7b27{background:linear-gradient(135deg,#ff7676,#f54f4f)}.device-info-card .card-item .item-content.data-v-f7bf7b27{display:flex;flex-direction:column}.device-info-card .card-item .item-content .item-label.data-v-f7bf7b27{font-size:26rpx;color:#999;margin-bottom:4rpx}.device-info-card .card-item .item-content .item-value.data-v-f7bf7b27{font-size:30rpx;color:#333;font-weight:500}.pricing-card .pricing-banner.data-v-f7bf7b27{background:linear-gradient(to right,#f8f9ff,#e8f0ff);border-radius:16rpx;padding:30rpx;margin-bottom:30rpx;display:flex;flex-direction:column;align-items:center}.pricing-card .pricing-banner .pricing-main.data-v-f7bf7b27{display:flex;align-items:flex-end}.pricing-card .pricing-banner .pricing-main .price.data-v-f7bf7b27{font-size:60rpx;font-weight:700;color:#ff6b6b}.pricing-card .pricing-banner .pricing-main .unit.data-v-f7bf7b27{font-size:28rpx;color:#999;margin-left:4rpx;margin-bottom:10rpx}.pricing-card .pricing-banner .cap-price.data-v-f7bf7b27{margin-top:10rpx;font-size:26rpx;color:#666;background-color:rgba(255,107,107,.1);padding:6rpx 20rpx;border-radius:20rpx}.pricing-card .pricing-rules .rule-item.data-v-f7bf7b27{display:flex;align-items:center;margin-bottom:16rpx}.pricing-card .pricing-rules .rule-item.data-v-f7bf7b27:last-child{margin-bottom:0}.pricing-card .pricing-rules .rule-item .rule-dot.data-v-f7bf7b27{width:10rpx;height:10rpx;border-radius:50%;background-color:#ff6b6b;margin-right:16rpx}.pricing-card .pricing-rules .rule-item .rule-text.data-v-f7bf7b27{font-size:28rpx;color:#666}.pricing-card .pricing-rules .rule-item .rule-text .highlight.data-v-f7bf7b27{color:#ff6b6b;font-weight:700}.phone-card .phone-input-container .input-wrapper.data-v-f7bf7b27{display:flex;align-items:center;height:88rpx;background-color:#f5f7fa;border-radius:16rpx;padding:0 24rpx}.phone-card .phone-input-container .input-wrapper .prefix.data-v-f7bf7b27{font-size:28rpx;color:#666;margin-right:16rpx;padding-right:16rpx;border-right:1px solid #e0e0e0}.phone-card .phone-input-container .input-wrapper .phone-input.data-v-f7bf7b27{flex:1;height:88rpx;font-size:28rpx;color:#333;padding-left:10rpx}.phone-card .phone-input-container .phone-tip.data-v-f7bf7b27{font-size:24rpx;color:#999;margin-top:16rpx;display:block}.notice-card .notice-items .notice-item.data-v-f7bf7b27{display:flex;align-items:flex-start;margin-bottom:20rpx}.notice-card .notice-items .notice-item.data-v-f7bf7b27:last-child{margin-bottom:0}.notice-card .notice-items .notice-item .notice-dot.data-v-f7bf7b27{width:10rpx;height:10rpx;border-radius:50%;background-color:#32a5ff;margin-right:16rpx;margin-top:12rpx}.notice-card .notice-items .notice-item .notice-text.data-v-f7bf7b27{font-size:28rpx;color:#666;line-height:1.6}.footer.data-v-f7bf7b27{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:20rpx 30rpx;padding-bottom:calc(20rpx + env(safe-area-inset-bottom));box-shadow:0 -2rpx 20rpx rgba(0,0,0,.05);z-index:100;display:flex;flex-direction:column;--footer-height: 180rpx}.footer .wechat-credit.data-v-f7bf7b27{display:flex;align-items:center;justify-content:center;margin-top:10rpx}.footer .wechat-credit .wx-icon.data-v-f7bf7b27{width:50rpx;height:40rpx;margin-right:10rpx}.footer .wechat-credit .credit-text.data-v-f7bf7b27{font-size:24rpx;color:#07c160;display:flex;align-items:center}.footer .wechat-credit .credit-text .credit-divider.data-v-f7bf7b27{margin:0 10rpx}.footer .wechat-credit .credit-text .credit-score.data-v-f7bf7b27{font-weight:500}.footer .rent-button.data-v-f7bf7b27{height:92rpx;border-radius:46rpx;background:linear-gradient(135deg,#07c160,#10d673);color:#fff;font-size:32rpx;font-weight:600;display:flex;align-items:center;justify-content:center;border:none;width:90%}.footer .rent-button.return-button.data-v-f7bf7b27{background:linear-gradient(135deg,#ff9800,#ffb74d)}.footer .rent-button.data-v-f7bf7b27:active{transform:scale(.98);opacity:.9}.phone-auth-popup.data-v-f7bf7b27{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.5)}.popup-mask.data-v-f7bf7b27{position:absolute;top:0;left:0;right:0;bottom:0}.popup-content.data-v-f7bf7b27{background-color:#fff;border-radius:24rpx;box-shadow:0 8rpx 32rpx rgba(0,0,0,.15);width:90%;max-width:500rpx;padding:40rpx 30rpx;position:relative;z-index:1001;display:flex;flex-direction:column;align-items:center}.popup-header.data-v-f7bf7b27{margin-bottom:30rpx;text-align:center}.popup-title.data-v-f7bf7b27{font-size:36rpx;font-weight:700;color:#333}.popup-body.data-v-f7bf7b27{width:100%;display:flex;flex-direction:column;align-items:center;margin-bottom:30rpx}.auth-desc.data-v-f7bf7b27{font-size:28rpx;color:#666;text-align:center;margin-bottom:30rpx;line-height:1.6}.auth-btn.data-v-f7bf7b27{width:100%;height:92rpx;border-radius:46rpx;background:linear-gradient(135deg,#07c160,#10d673);color:#fff;font-size:32rpx;font-weight:600;display:flex;align-items:center;justify-content:center;border:none;margin-bottom:20rpx}.auth-btn.data-v-f7bf7b27:active{transform:scale(.98);opacity:.9}.auth-cancel.data-v-f7bf7b27{width:100%;height:92rpx;border-radius:46rpx;background-color:#f5f7fa;color:#333;font-size:32rpx;font-weight:600;display:flex;align-items:center;justify-content:center;border:none}.auth-cancel.data-v-f7bf7b27:active{transform:scale(.98);opacity:.9} +.container.data-v-f998093e{min-height:100vh;background-color:#f5f7fa;padding:30rpx 30rpx 300rpx;box-sizing:border-box}.device-header.data-v-f998093e{display:flex;flex-direction:column;margin-bottom:30rpx}.device-header .device-status-card.data-v-f998093e{display:flex;align-items:center;margin-bottom:20rpx}.device-header .device-status-card .status-indicator.data-v-f998093e{width:20rpx;height:20rpx;border-radius:50%;margin-right:10rpx}.device-header .device-status-card.available .status-indicator.data-v-f998093e{background-color:#10c469;box-shadow:0 0 10rpx rgba(16,196,105,.5)}.device-header .device-status-card.available .status-text.data-v-f998093e{color:#10c469}.device-header .device-status-card.offline .status-indicator.data-v-f998093e{background-color:#9a9a9a}.device-header .device-status-card.offline .status-text.data-v-f998093e{color:#9a9a9a}.device-header .device-status-card .status-text.data-v-f998093e{font-size:28rpx;font-weight:500}.device-header .device-title .name.data-v-f998093e{font-size:48rpx;font-weight:700;color:#333}.device-header .device-title .device-meta.data-v-f998093e{margin-top:10rpx;display:flex;align-items:center}.device-header .device-title .device-meta .id-label.data-v-f998093e{font-size:26rpx;color:#999}.device-header .device-title .device-meta .id-value.data-v-f998093e{font-size:26rpx;color:#666}.card.data-v-f998093e{background-color:#fff;border-radius:24rpx;box-shadow:0 4rpx 24rpx rgba(0,0,0,.03);padding:30rpx;margin-bottom:30rpx}.card .card-header.data-v-f998093e{display:flex;align-items:center;justify-content:space-between;margin-bottom:24rpx}.card .card-header .card-title.data-v-f998093e{font-size:32rpx;font-weight:600;color:#333}.device-info-card .card-row.data-v-f998093e{display:flex;justify-content:space-between}.device-info-card .card-item.data-v-f998093e{display:flex;align-items:center;flex:1}.device-info-card .card-item .item-icon.data-v-f998093e{width:60rpx;height:60rpx;border-radius:12rpx;margin-right:20rpx;display:flex;align-items:center;justify-content:center;font-size:30rpx;color:#fff}.device-info-card .card-item .item-icon.location-icon.data-v-f998093e{background:linear-gradient(135deg,#40c9ff,#32a5ff)}.device-info-card .card-item .item-icon.battery-icon.data-v-f998093e{background:linear-gradient(135deg,#33db92,#10c469)}.device-info-card .card-item .item-icon.battery-icon.battery-low.data-v-f998093e{background:linear-gradient(135deg,#ff7676,#f54f4f)}.device-info-card .card-item .item-content.data-v-f998093e{display:flex;flex-direction:column}.device-info-card .card-item .item-content .item-label.data-v-f998093e{font-size:26rpx;color:#999;margin-bottom:4rpx}.device-info-card .card-item .item-content .item-value.data-v-f998093e{font-size:30rpx;color:#333;font-weight:500}.pricing-card .pricing-banner.data-v-f998093e{background:linear-gradient(to right,#f8f9ff,#e8f0ff);border-radius:16rpx;padding:30rpx;margin-bottom:30rpx;display:flex;flex-direction:column;align-items:center}.pricing-card .pricing-banner .pricing-main.data-v-f998093e{display:flex;align-items:flex-end}.pricing-card .pricing-banner .pricing-main .price.data-v-f998093e{font-size:60rpx;font-weight:700;color:#ff6b6b}.pricing-card .pricing-banner .pricing-main .unit.data-v-f998093e{font-size:28rpx;color:#999;margin-left:4rpx;margin-bottom:10rpx}.pricing-card .pricing-banner .cap-price.data-v-f998093e{margin-top:10rpx;font-size:26rpx;color:#666;background-color:rgba(255,107,107,.1);padding:6rpx 20rpx;border-radius:20rpx}.pricing-card .pricing-rules .rule-item.data-v-f998093e{display:flex;align-items:center;margin-bottom:16rpx}.pricing-card .pricing-rules .rule-item.data-v-f998093e:last-child{margin-bottom:0}.pricing-card .pricing-rules .rule-item .rule-dot.data-v-f998093e{width:10rpx;height:10rpx;border-radius:50%;background-color:#ff6b6b;margin-right:16rpx}.pricing-card .pricing-rules .rule-item .rule-text.data-v-f998093e{font-size:28rpx;color:#666}.pricing-card .pricing-rules .rule-item .rule-text .highlight.data-v-f998093e{color:#ff6b6b;font-weight:700}.phone-card .phone-input-container .input-wrapper.data-v-f998093e{display:flex;align-items:center;height:88rpx;background-color:#f5f7fa;border-radius:16rpx;padding:0 24rpx}.phone-card .phone-input-container .input-wrapper .prefix.data-v-f998093e{font-size:28rpx;color:#666;margin-right:16rpx;padding-right:16rpx;border-right:1px solid #e0e0e0}.phone-card .phone-input-container .input-wrapper .phone-input.data-v-f998093e{flex:1;height:88rpx;font-size:28rpx;color:#333;padding-left:10rpx}.phone-card .phone-input-container .phone-tip.data-v-f998093e{font-size:24rpx;color:#999;margin-top:16rpx;display:block}.notice-card .notice-items .notice-item.data-v-f998093e{display:flex;align-items:flex-start;margin-bottom:20rpx}.notice-card .notice-items .notice-item.data-v-f998093e:last-child{margin-bottom:0}.notice-card .notice-items .notice-item .notice-dot.data-v-f998093e{width:10rpx;height:10rpx;border-radius:50%;background-color:#32a5ff;margin-right:16rpx;margin-top:12rpx}.notice-card .notice-items .notice-item .notice-text.data-v-f998093e{font-size:28rpx;color:#666;line-height:1.6}.footer.data-v-f998093e{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:20rpx 30rpx;padding-bottom:calc(20rpx + env(safe-area-inset-bottom));box-shadow:0 -2rpx 20rpx rgba(0,0,0,.05);z-index:100;display:flex;flex-direction:column;--footer-height: 180rpx}.footer .wechat-credit.data-v-f998093e{display:flex;align-items:center;justify-content:center;margin-top:10rpx}.footer .wechat-credit .wx-icon.data-v-f998093e{width:50rpx;height:40rpx;margin-right:10rpx}.footer .wechat-credit .credit-text.data-v-f998093e{font-size:24rpx;color:#07c160;display:flex;align-items:center}.footer .wechat-credit .credit-text .credit-divider.data-v-f998093e{margin:0 10rpx}.footer .wechat-credit .credit-text .credit-score.data-v-f998093e{font-weight:500}.footer .rent-button.data-v-f998093e{height:92rpx;border-radius:46rpx;background:linear-gradient(135deg,#07c160,#10d673);color:#fff;font-size:32rpx;font-weight:600;display:flex;align-items:center;justify-content:center;border:none;width:90%}.footer .rent-button.return-button.data-v-f998093e{background:linear-gradient(135deg,#ff9800,#ffb74d)}.footer .rent-button.data-v-f998093e:active{transform:scale(.98);opacity:.9}.phone-auth-popup.data-v-f998093e{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.5)}.popup-mask.data-v-f998093e{position:absolute;top:0;left:0;right:0;bottom:0}.popup-content.data-v-f998093e{background-color:#fff;border-radius:24rpx;box-shadow:0 8rpx 32rpx rgba(0,0,0,.15);width:90%;max-width:500rpx;padding:40rpx 30rpx;position:relative;z-index:1001;display:flex;flex-direction:column;align-items:center}.popup-header.data-v-f998093e{margin-bottom:30rpx;text-align:center}.popup-title.data-v-f998093e{font-size:36rpx;font-weight:700;color:#333}.popup-body.data-v-f998093e{width:100%;display:flex;flex-direction:column;align-items:center;margin-bottom:30rpx}.auth-desc.data-v-f998093e{font-size:28rpx;color:#666;text-align:center;margin-bottom:30rpx;line-height:1.6}.auth-btn.data-v-f998093e{width:100%;height:92rpx;border-radius:46rpx;background:linear-gradient(135deg,#07c160,#10d673);color:#fff;font-size:32rpx;font-weight:600;display:flex;align-items:center;justify-content:center;border:none;margin-bottom:20rpx}.auth-btn.data-v-f998093e:active{transform:scale(.98);opacity:.9}.auth-cancel.data-v-f998093e{width:100%;height:92rpx;border-radius:46rpx;background-color:#f5f7fa;color:#333;font-size:32rpx;font-weight:600;display:flex;align-items:center;justify-content:center;border:none}.auth-cancel.data-v-f998093e:active{transform:scale(.98);opacity:.9} diff --git a/unpackage/dist/build/mp-weixin/pages/index/index.js b/unpackage/dist/build/mp-weixin/pages/index/index.js index d39eedf..a39444a 100644 --- a/unpackage/dist/build/mp-weixin/pages/index/index.js +++ b/unpackage/dist/build/mp-weixin/pages/index/index.js @@ -1 +1 @@ -"use strict";const e=require("../../common/vendor.js"),o=require("../../util/index.js"),t=require("../../config/url.js"),n=require("../../config/user.js"),i=require("../../common/assets.js"),a={methods:{async handleScan(){try{const d=await new Promise(((o,t)=>{e.index.scanCode({success:o,fail:t})}));console.log(d.path);let r=o.getQueryString(d.path,"deviceNo");if(!r)return void e.index.showToast({title:"无效的设备二维码",icon:"none"});e.index.getStorageSync("token")||await o.wxLogin();const c=await e.index.request({url:`${t.URL||"http://127.0.0.1:8080"}/app/order/inUse`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200==c.statusCode&&200==c.data.code&&c.data.data){const o=c.data.data;return e.index.reLaunch({url:`/pages/return/index?orderId=${o.orderId}&deviceId=${r||o.deviceNo}`}),void console.log("已发起页面跳转")}const s=await e.index.request({url:`${t.URL||"http://127.0.0.1:8080"}/app/order/unpaid`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(console.log("待支付订单检查结果:",JSON.stringify(s)),200==s.statusCode&&200==s.data.code&&s.data.data){const o=s.data.data;e.index.navigateTo({url:`/pages/order/payment?orderId=${o.orderId}`})}else try{const o=await n.getDeviceInfo(r);if(200==o.code&&o.data&&o.data.device){const t=o.data.device;if(t.feeConfig){console.log("获取到设备feeConfig信息:",t.feeConfig);try{JSON.parse(t.feeConfig);e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}&feeConfig=${encodeURIComponent(t.feeConfig)}`})}catch(i){console.error("解析feeConfig失败:",i),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}}else e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}else console.error("获取设备信息失败:",o.msg||"未知错误"),e.index.showToast({title:"获取设备信息失败",icon:"none"}),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}catch(a){console.error("获取设备信息异常:",a),e.index.showToast({title:"获取设备信息失败",icon:"none"}),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}}catch(a){console.error("扫码处理失败:",a),e.index.showToast({title:"扫码失败",icon:"none"})}}}};const d=e._export_sfc(a,[["render",function(o,t,n,a,d,r){return e.e({a:i._imports_0,b:i._imports_1,c:e.o(((...e)=>r.handleScan&&r.handleScan(...e))),d:o.showPhoneAuthPopup},o.showPhoneAuthPopup?{e:e.o((e=>o.showPhoneAuthPopup=!1)),f:e.o(((...e)=>o.onGetPhoneNumber&&o.onGetPhoneNumber(...e))),g:e.o((e=>o.showPhoneAuthPopup=!1))}:{})}],["__scopeId","data-v-cb03dff0"]]);wx.createPage(d); +"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),a=require("../../util/index.js"),o=require("../../config/url.js"),i=require("../../config/user.js"),n=require("../../utils/amap.js");Math||d();const d=()=>"../../components/MapComponent.js",r={__name:"index",setup(d){const r=e.ref(""),s=e.ref(null),l=e.ref([]),c=e.ref([]),u=e.ref(!1),v=e.ref(!1),g=e.ref(!1),p=e.ref(!1),x=e.ref(!1),f=e.ref(null);e.computed((()=>s.value&&s.value.address?`${s.value.district||"当前位置"} - 搜索附近场地`:"搜索附近场地")),e.onMounted((()=>{h()})),e.onUnmounted((()=>{}));const h=async()=>{v.value=!0;try{await m(),await w()}catch(e){console.error("初始化失败:",e),await w()}finally{v.value=!1}},m=async()=>{try{const a=await new Promise(((t,a)=>{e.index.getLocation({type:"gcj02",success:t,fail:a})}));s.value={longitude:a.longitude,latitude:a.latitude},p.value||(p.value=!0);try{const e=await n.AmapUtil.regeocode(a.longitude,a.latitude);if(e.success){const t=e.data;s.value.address=t.formatted_address,s.value.city=t.addressComponent.city,s.value.district=t.addressComponent.district}}catch(t){}setTimeout((async()=>{await w(),e.index.hideLoading(),e.index.showToast({title:"定位成功",icon:"success"})}),800)}catch(t){console.error("获取位置失败:",t),e.index.showToast({title:"获取位置失败,显示默认地图",icon:"none"})}},w=async()=>{try{e.index.getStorageSync("token")||await a.wxLogin();const t=await e.index.request({url:`${o.URL}/device/position/list`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});200===t.statusCode&&200===t.data.code?(l.value=t.data.rows||[],y(),c.value=[...l.value]):console.error("获取场地列表失败:",t.data.msg)}catch(t){console.error("获取场地列表异常:",t)}},y=(e=null)=>{var t;const a=e||s.value||(null==(t=f.value)?void 0:t.mapCenter);a&&void 0!==a.longitude&&void 0!==a.latitude&&(l.value.forEach((e=>{if(e.longitude&&e.latitude)try{const t=n.AmapUtil.calculateDistance(a.latitude,a.longitude,parseFloat(e.latitude),parseFloat(e.longitude));e.distance=t.toFixed(1)}catch(t){console.error("计算距离异常:",t,e),e.distance="999.0"}})),l.value.sort(((e,t)=>(parseFloat(e.distance)||999)-(parseFloat(t.distance)||999))))},S=async()=>{e.index.showLoading({title:"定位中..."}),e.index.reLaunch({url:"/pages/index/index"})},T=t=>{(async t=>{try{e.index.getStorageSync("token")||await a.wxLogin();const i=await e.index.request({url:`${o.URL}/device/position/list`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200===i.statusCode&&200===i.data.code){l.value=i.data.rows||[],y(t);const e=10;c.value=l.value.filter((t=>!t.distance||parseFloat(t.distance)<=e))}else console.error("根据地图中心加载场地失败:",i.data.msg),l.value=[],c.value=[]}catch(i){console.error("根据地图中心加载场地异常:",i)}})(t)},C=t=>{e.index.showActionSheet({itemList:["扫码使用","导航前往"],success:e=>{switch(e.tapIndex){case 0:L();break;case 1:k(t)}}})},k=t=>{const a=parseFloat(t.latitude),o=parseFloat(t.longitude);e.index.openLocation({latitude:a,longitude:o,name:t.name,address:t.location})},_=()=>{u.value=!u.value},L=async()=>{try{const d=await new Promise(((t,a)=>{e.index.scanCode({success:t,fail:a})}));let r=a.getQueryString(d.path,"deviceNo");if(!r)return void e.index.showToast({title:"无效的设备二维码",icon:"none"});e.index.getStorageSync("token")||await a.wxLogin();const s=await e.index.request({url:`${o.URL}/app/order/inUse`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200==s.statusCode&&200==s.data.code&&s.data.data){const t=s.data.data;return void e.index.reLaunch({url:`/pages/return/index?orderId=${t.orderId}&deviceId=${r||t.deviceNo}`})}const l=await e.index.request({url:`${o.URL}/app/order/unpaid`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200==l.statusCode&&200==l.data.code&&l.data.data){const t=l.data.data;e.index.navigateTo({url:`/pages/order/payment?orderId=${t.orderId}`})}else try{const a=await i.getDeviceInfo(r);if(200==a.code&&a.data&&a.data.device){const o=a.data.device;if(o.feeConfig)try{JSON.parse(o.feeConfig);e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}&feeConfig=${encodeURIComponent(o.feeConfig)}`})}catch(t){e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}else e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}else e.index.showToast({title:"获取设备信息失败",icon:"none"}),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}catch(n){console.error("获取设备信息异常:",n),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}}catch(n){console.error("扫码处理失败:",n),e.index.showToast({title:"扫码失败",icon:"none"})}},$=()=>{x.value=!0},I=()=>{x.value=!1},q=e=>{"getPhoneNumber:ok"===e.detail.errMsg&&(g.value=!1)};return(a,o)=>e.e({a:!v.value&&s.value},!v.value&&s.value?{b:e.sr(f,"ef66b09a-0",{k:"mapRef"}),c:e.o(S),d:e.o(L),e:e.o($),f:e.o(C),g:e.o(T),h:e.p({userLocation:s.value,positionList:l.value,filteredPositions:c.value,searchKeyword:r.value})}:{},{i:v.value||!s.value},(v.value||s.value,{}),{j:x.value},x.value?e.e({k:e.o(I),l:e.o(_),m:e.t(c.value.length),n:t._imports_0,o:e.o(I),p:e.f(c.value,((t,a,o)=>e.e({a:e.t(t.name),b:e.t(t.describe),c:e.t(t.location),d:t.workTime&&"0"!==t.workTime},t.workTime&&"0"!==t.workTime?{e:e.t(t.workTime)}:{},{f:t.distance},t.distance?{g:e.t(t.distance)}:{},{h:e.t("online"===t.status?"营业中":"暂停服务"),i:e.n(t.status),j:e.o((e=>k(t)),t.positionId),k:t.positionId,l:e.o((e=>{return a=t,I(),void setTimeout((()=>{C(a)}),200);var a}),t.positionId)}))),q:t._imports_0,r:0===c.value.length&&!v.value},0!==c.value.length||v.value?{}:{s:t._imports_0},{t:u.value?1:""}):{},{v:v.value},(v.value,{}),{w:g.value},g.value?{x:e.o((e=>g.value=!1)),y:e.o(q),z:e.o((e=>g.value=!1))}:{})}},s=e._export_sfc(r,[["__scopeId","data-v-ef66b09a"]]);wx.createPage(s); diff --git a/unpackage/dist/build/mp-weixin/pages/index/index.json b/unpackage/dist/build/mp-weixin/pages/index/index.json index 6038722..e11491c 100644 --- a/unpackage/dist/build/mp-weixin/pages/index/index.json +++ b/unpackage/dist/build/mp-weixin/pages/index/index.json @@ -1,4 +1,6 @@ { - "navigationBarTitleText": "共享风扇", - "usingComponents": {} + "navigationBarTitleText": "附近场地", + "usingComponents": { + "map-component": "../../components/MapComponent" + } } \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/index/index.wxml b/unpackage/dist/build/mp-weixin/pages/index/index.wxml index a7c2a91..a7520d5 100644 --- a/unpackage/dist/build/mp-weixin/pages/index/index.wxml +++ b/unpackage/dist/build/mp-weixin/pages/index/index.wxml @@ -1 +1 @@ -共享风扇随时随地,享受清凉便捷租赁·品质保障扫码使用扫描设备二维码即可使用或归还收费规则5.0元/小时不足1小时按1小时计费封顶99元,计费达99元视为买断使用流程1扫码弹出2使用风扇3插入归还4结束订单授权获取手机号为了提供更好的服务和紧急联系,需要授权获取您的手机号暂不授权 \ No newline at end of file +正在获取位置信息...附近场地 ({{m}}){{item.a}}{{item.b}}{{item.c}}营业时间:{{item.e}}{{item.g}}km{{item.h}}导航暂无附近场地正在获取场地信息...授权获取手机号为了提供更好的服务和紧急联系,需要授权获取您的手机号暂不授权 \ No newline at end of file diff --git a/unpackage/dist/build/mp-weixin/pages/index/index.wxss b/unpackage/dist/build/mp-weixin/pages/index/index.wxss index a95c9c1..2385f7e 100644 --- a/unpackage/dist/build/mp-weixin/pages/index/index.wxss +++ b/unpackage/dist/build/mp-weixin/pages/index/index.wxss @@ -1 +1 @@ -.container.data-v-cb03dff0{min-height:100vh;background-color:#f6f7fb;padding-bottom:40rpx}.header.data-v-cb03dff0{height:300rpx;background:linear-gradient(135deg,#1e88e5,#29b6f6);position:relative;overflow:hidden}.header .header-bg.data-v-cb03dff0{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1}.header .header-bg .circle-decoration.data-v-cb03dff0{position:absolute;border-radius:50%;background:rgba(255,255,255,.1)}.header .header-bg .circle-1.data-v-cb03dff0{width:240rpx;height:240rpx;right:-60rpx;top:-90rpx}.header .header-bg .circle-2.data-v-cb03dff0{width:160rpx;height:160rpx;left:-40rpx;bottom:30rpx;background:rgba(255,255,255,.08)}.header .header-bg .wave-decoration.data-v-cb03dff0{position:absolute;left:0;bottom:0;width:100%;height:40rpx;background-size:auto 100%;opacity:.6}.header .header-content.data-v-cb03dff0{position:relative;z-index:2;padding:40rpx 40rpx 0;height:100%;display:flex;flex-direction:column;justify-content:space-between}.header .header-content .brand-area.data-v-cb03dff0{display:flex;align-items:center}.header .header-content .brand-area .brand-logo.data-v-cb03dff0{width:90rpx;height:90rpx;margin-right:20rpx}.header .header-content .brand-area .brand-text.data-v-cb03dff0{display:flex;flex-direction:column}.header .header-content .brand-area .brand-text .title.data-v-cb03dff0{font-size:48rpx;color:#fff;font-weight:700;line-height:1.2;text-shadow:0 2rpx 4rpx rgba(0,0,0,.1)}.header .header-content .brand-area .brand-text .subtitle.data-v-cb03dff0{font-size:28rpx;color:rgba(255,255,255,.9)}.header .header-content .header-info.data-v-cb03dff0{display:flex;flex-wrap:wrap;gap:20rpx;margin-bottom:30rpx}.header .header-content .header-info .service-tag.data-v-cb03dff0{display:flex;align-items:center;background:rgba(255,255,255,.2);border-radius:40rpx;padding:10rpx 20rpx}.header .header-content .header-info .service-tag text.data-v-cb03dff0{font-size:24rpx;color:#fff}.header .header-content .header-info .service-tag .dot.data-v-cb03dff0{margin:0 8rpx;font-weight:700}.scan-section.data-v-cb03dff0{padding:0 30rpx}.scan-section .scan-card.data-v-cb03dff0{background:#fff;border-radius:16rpx;box-shadow:0 10rpx 30rpx rgba(0,0,0,.05);padding:36rpx 0;display:flex;flex-direction:column;align-items:center}.scan-section .scan-card .scan-btn.data-v-cb03dff0{width:220rpx;height:220rpx;background:linear-gradient(135deg,#00b0ff,#0091ea);border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:24rpx;box-shadow:0 10rpx 20rpx rgba(0,176,255,.2);position:relative;transition:all .2s ease}.scan-section .scan-card .scan-btn.data-v-cb03dff0:active{transform:scale(.96)}.scan-section .scan-card .scan-btn .scan-icon.data-v-cb03dff0{width:80rpx;height:80rpx;margin-bottom:12rpx}.scan-section .scan-card .scan-btn .scan-text.data-v-cb03dff0{font-size:36rpx;color:#fff;font-weight:500}.scan-section .scan-card .scan-desc.data-v-cb03dff0{font-size:28rpx;color:#666}.price-card.data-v-cb03dff0{margin:30rpx;background:#fff;border-radius:16rpx;overflow:hidden;box-shadow:0 6rpx 20rpx rgba(0,0,0,.04)}.price-card .card-header.data-v-cb03dff0{padding:24rpx 30rpx;background:linear-gradient(to right,#f5f9ff,#fff);border-bottom:2rpx solid #f0f0f0}.price-card .card-header .card-title.data-v-cb03dff0{font-size:32rpx;font-weight:600;color:#333;position:relative;padding-left:20rpx}.price-card .card-header .card-title.data-v-cb03dff0:before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:6rpx;height:28rpx;background:#2196f3;border-radius:3rpx}.price-card .deposit-free.data-v-cb03dff0{margin:20rpx 30rpx 0;padding:12rpx 16rpx;background:#f0f9ff;border-radius:8rpx;border-left:4rpx solid #03A9F4;display:flex;align-items:center}.price-card .deposit-free .deposit-icon.data-v-cb03dff0{width:40rpx;height:40rpx;margin-right:16rpx}.price-card .deposit-free .deposit-text.data-v-cb03dff0{font-size:26rpx;color:#03a9f4;font-weight:500}.price-card .price-rules.data-v-cb03dff0{padding:20rpx 30rpx 30rpx}.price-card .price-rules .price-item.data-v-cb03dff0{display:flex;flex-direction:column;align-items:center;margin-bottom:20rpx}.price-card .price-rules .price-item .price-tag.data-v-cb03dff0{font-size:60rpx;color:#ff6e00;font-weight:700;line-height:1}.price-card .price-rules .price-item .price-tag .unit.data-v-cb03dff0{font-size:32rpx;font-weight:400;margin-left:4rpx}.price-card .price-rules .price-item .price-desc.data-v-cb03dff0{font-size:28rpx;color:#666;margin-top:10rpx}.price-card .price-rules .divider.data-v-cb03dff0{height:2rpx;background-color:#f0f0f0;margin:20rpx 0 30rpx}.price-card .price-rules .rule-list .rule-item.data-v-cb03dff0{display:flex;align-items:flex-start;margin-bottom:20rpx}.price-card .price-rules .rule-list .rule-item.data-v-cb03dff0:last-child{margin-bottom:0}.price-card .price-rules .rule-list .rule-item .rule-dot.data-v-cb03dff0{width:12rpx;height:12rpx;background:#2196f3;border-radius:50%;margin:12rpx 16rpx 0 0;flex-shrink:0}.price-card .price-rules .rule-list .rule-item text.data-v-cb03dff0{font-size:28rpx;color:#666;line-height:1.5}.usage-steps.data-v-cb03dff0{margin:0 30rpx;background:#fff;border-radius:16rpx;box-shadow:0 6rpx 20rpx rgba(0,0,0,.04);overflow:hidden}.usage-steps .steps-header.data-v-cb03dff0{padding:24rpx 30rpx;background:linear-gradient(to right,#f5f9ff,#fff);border-bottom:2rpx solid #f0f0f0}.usage-steps .steps-header .steps-title.data-v-cb03dff0{font-size:32rpx;font-weight:600;color:#333;position:relative;padding-left:20rpx}.usage-steps .steps-header .steps-title.data-v-cb03dff0:before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:6rpx;height:28rpx;background:#2196f3;border-radius:3rpx}.usage-steps .steps-container.data-v-cb03dff0{padding:40rpx 30rpx;display:flex;align-items:center;justify-content:space-between}.usage-steps .steps-container .step-item.data-v-cb03dff0{display:flex;flex-direction:column;align-items:center;flex:1}.usage-steps .steps-container .step-item .step-icon.data-v-cb03dff0{width:80rpx;height:80rpx;background:#f0f9ff;border:2rpx solid #e1f5fe;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:16rpx}.usage-steps .steps-container .step-item .step-icon .step-number.data-v-cb03dff0{font-size:36rpx;color:#2196f3;font-weight:600}.usage-steps .steps-container .step-item .step-text.data-v-cb03dff0{font-size:26rpx;color:#666}.usage-steps .steps-container .step-arrow.data-v-cb03dff0{width:40rpx;height:4rpx;background:#e1f5fe;position:relative}.usage-steps .steps-container .step-arrow.data-v-cb03dff0:after{content:"";position:absolute;right:0;top:50%;margin-top:-8rpx;border-left:12rpx solid #e1f5fe;border-top:8rpx solid transparent;border-bottom:8rpx solid transparent} +.container.data-v-ef66b09a{height:100%;width:100%;background-color:#f6f7fb;display:flex;flex-direction:column}.header-search.data-v-ef66b09a{padding:20rpx 30rpx;background:#fff;border-bottom:1px solid #f0f0f0;z-index:10}.header-search .search-box.data-v-ef66b09a{display:flex;align-items:center;background:#f8f9fa;border-radius:50rpx;padding:0 20rpx;height:80rpx}.header-search .search-box .search-icon.data-v-ef66b09a{width:32rpx;height:32rpx;margin-right:16rpx}.header-search .search-box .search-input.data-v-ef66b09a{flex:1;font-size:28rpx;color:#333}.header-search .search-box .location-btn.data-v-ef66b09a{width:60rpx;height:60rpx;display:flex;align-items:center;justify-content:center;background:#2196f3;border-radius:50%;margin-left:16rpx}.header-search .search-box .location-btn .location-icon.data-v-ef66b09a{width:24rpx;height:24rpx}.location-popup.data-v-ef66b09a{position:fixed;top:0;left:0;right:0;bottom:0;z-index:2000;display:flex;align-items:flex-end;justify-content:center}.location-popup .popup-mask.data-v-ef66b09a{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}.location-popup .location-sheet.data-v-ef66b09a{background:#fff;border-radius:32rpx 32rpx 0 0;box-shadow:0 -4rpx 20rpx rgba(0,0,0,.1);max-height:70vh;transition:all .3s ease;z-index:1;position:relative;width:100%;display:flex;flex-direction:column;animation:slideUp-ef66b09a .3s ease-out}.location-popup .location-sheet.expanded.data-v-ef66b09a{max-height:85vh}.location-popup .location-sheet .sheet-handle.data-v-ef66b09a{display:flex;justify-content:center;padding:20rpx 0;cursor:pointer}.location-popup .location-sheet .sheet-handle .handle-bar.data-v-ef66b09a{width:80rpx;height:8rpx;background:#e0e0e0;border-radius:4rpx}.location-popup .location-sheet .sheet-header.data-v-ef66b09a{padding:0 30rpx 20rpx;border-bottom:1px solid #f0f0f0;display:flex;justify-content:space-between;align-items:center}.location-popup .location-sheet .sheet-header .sheet-title.data-v-ef66b09a{font-size:32rpx;font-weight:600;color:#333}.location-popup .location-sheet .sheet-header .close-btn.data-v-ef66b09a{width:60rpx;height:60rpx;display:flex;align-items:center;justify-content:center;background:#f0f0f0;border-radius:50%;transition:all .2s ease}.location-popup .location-sheet .sheet-header .close-btn.data-v-ef66b09a:active{background:#e0e0e0;transform:scale(.95)}.location-popup .location-sheet .sheet-header .close-btn .close-icon.data-v-ef66b09a{width:24rpx;height:24rpx}.location-popup .location-sheet .sheet-content.data-v-ef66b09a{flex:1;padding:20rpx 0;overflow:hidden}@keyframes slideUp-ef66b09a{0%{transform:translateY(100%)}to{transform:translateY(0)}}.position-item.data-v-ef66b09a{display:flex;align-items:center;padding:24rpx 30rpx;border-bottom:1px solid #f8f9fa}.position-item .position-info.data-v-ef66b09a{flex:1}.position-item .position-info .position-name.data-v-ef66b09a{font-size:32rpx;font-weight:500;color:#333;margin-bottom:8rpx}.position-item .position-info .position-desc.data-v-ef66b09a{font-size:26rpx;color:#666;margin-bottom:8rpx}.position-item .position-info .position-location.data-v-ef66b09a{display:flex;align-items:center;margin-bottom:8rpx}.position-item .position-info .position-location .location-icon-small.data-v-ef66b09a{width:24rpx;height:24rpx;margin-right:8rpx}.position-item .position-info .position-location text.data-v-ef66b09a{font-size:24rpx;color:#999}.position-item .position-info .position-time.data-v-ef66b09a{font-size:24rpx;color:#999}.position-item .position-actions.data-v-ef66b09a{display:flex;flex-direction:column;align-items:flex-end;gap:8rpx}.position-item .position-actions .distance-info.data-v-ef66b09a{font-size:24rpx;color:#2196f3;font-weight:500}.position-item .position-actions .status-tag.data-v-ef66b09a{padding:8rpx 16rpx;border-radius:20rpx;font-size:22rpx}.position-item .position-actions .status-tag.online.data-v-ef66b09a{background:#e8f5e8;color:#4caf50}.position-item .position-actions .status-tag.offline.data-v-ef66b09a{background:#ffeaea;color:#f44336}.position-item .position-actions .nav-btn.data-v-ef66b09a{padding:12rpx 20rpx;background:#2196f3;border-radius:20rpx;font-size:24rpx;color:#fff}.empty-state.data-v-ef66b09a{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80rpx 0}.empty-state .empty-icon.data-v-ef66b09a{width:120rpx;height:120rpx;margin-bottom:24rpx;opacity:.5}.empty-state .empty-text.data-v-ef66b09a{font-size:28rpx;color:#999}.loading-overlay.data-v-ef66b09a{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:1000}.loading-overlay .loading-content.data-v-ef66b09a{background:#fff;border-radius:16rpx;padding:40rpx;display:flex;flex-direction:column;align-items:center}.loading-overlay .loading-content .loading-spinner.data-v-ef66b09a{width:60rpx;height:60rpx;border:4rpx solid #f0f0f0;border-top:4rpx solid #2196F3;border-radius:50%;animation:spin-ef66b09a 1s linear infinite;margin-bottom:24rpx}.loading-overlay .loading-content text.data-v-ef66b09a{font-size:28rpx;color:#666}@keyframes spin-ef66b09a{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.map-loading-placeholder.data-v-ef66b09a{position:absolute;top:0;left:0;right:0;bottom:0;background:#f6f7fb;display:flex;align-items:center;justify-content:center;z-index:100}.map-loading-placeholder .loading-content.data-v-ef66b09a{background:#fff;border-radius:16rpx;padding:40rpx;display:flex;flex-direction:column;align-items:center}.map-loading-placeholder .loading-content .loading-spinner.data-v-ef66b09a{width:60rpx;height:60rpx;border:4rpx solid #f0f0f0;border-top:4rpx solid #2196F3;border-radius:50%;animation:spin-ef66b09a 1s linear infinite;margin-bottom:24rpx}.map-loading-placeholder .loading-content text.data-v-ef66b09a{font-size:28rpx;color:#666}.phone-auth-popup.data-v-ef66b09a{position:fixed;top:0;left:0;right:0;bottom:0;z-index:2000;display:flex;align-items:center;justify-content:center}.phone-auth-popup .popup-mask.data-v-ef66b09a{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}.phone-auth-popup .popup-content.data-v-ef66b09a{background:#fff;border-radius:24rpx;margin:0 60rpx;padding:40rpx;position:relative;z-index:1}.phone-auth-popup .popup-content .popup-header.data-v-ef66b09a{text-align:center;margin-bottom:30rpx}.phone-auth-popup .popup-content .popup-header .popup-title.data-v-ef66b09a{font-size:36rpx;font-weight:600;color:#333}.phone-auth-popup .popup-content .popup-body .auth-desc.data-v-ef66b09a{text-align:center;margin-bottom:40rpx}.phone-auth-popup .popup-content .popup-body .auth-desc text.data-v-ef66b09a{font-size:28rpx;color:#666;line-height:1.6}.phone-auth-popup .popup-content .popup-body .auth-btn.data-v-ef66b09a{width:100%;height:88rpx;background:#2196f3;border-radius:44rpx;border:none;color:#fff;font-size:32rpx;display:flex;align-items:center;justify-content:center;margin-bottom:20rpx}.phone-auth-popup .popup-content .popup-body .auth-cancel.data-v-ef66b09a{text-align:center;padding:20rpx}.phone-auth-popup .popup-content .popup-body .auth-cancel text.data-v-ef66b09a{font-size:28rpx;color:#999} diff --git a/unpackage/dist/build/mp-weixin/pages/my/index.js b/unpackage/dist/build/mp-weixin/pages/my/index.js index 3388a11..12e99b8 100644 --- a/unpackage/dist/build/mp-weixin/pages/my/index.js +++ b/unpackage/dist/build/mp-weixin/pages/my/index.js @@ -1 +1 @@ -"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),o=require("../../util/index.js");if(!Array){e.resolveComponent("uni-icons")()}const n={__name:"index",setup(n){const t=e.ref({}),r=e.ref("0.00"),i=e.ref(""),s=e.ref(null),d=e.ref(!1);e.onMounted((()=>{l()}));const l=async()=>{try{if(!e.index.getStorageSync("token"))return void(await o.wxLogin());const a=await o.getUserInfo();console.log("User info response:",a),200==a.code&&(a.data.openId&&(i.value=a.data.openId,e.index.setStorageSync("openId",a.data.openId)),t.value={nickName:a.data.nickname,phone:a.data.phone,avatar:a.data.iconUrl,isAdmin:a.data.isAdmin},e.index.setStorageSync("userInfo",t.value),r.value=a.data.balanceAmount||"0.00")}catch(a){console.error("获取用户信息失败:",a),e.index.showToast({title:"获取用户信息失败",icon:"none"})}},c=a=>{e.index.navigateTo({url:a})},p=()=>{c("/pages/deposit/index")},u=()=>{t.value||v()},v=()=>{s.value&&(s.value.open(),d.value=!0)};return(o,n)=>{return e.e({a:t.value.avatar},t.value.avatar?{b:t.value.avatar}:{c:a._imports_0$1},{d:t.value.isAdmin},(t.value.isAdmin,{}),{e:t.value},t.value?{f:e.t(t.value.nickName),g:e.t(t.value.phone?(i=t.value.phone,i?i.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2"):""):"未绑定手机号")}:{},{h:e.p({type:"right",size:"16",color:"#999"}),i:e.o(u),j:e.t(r.value),k:e.o(p),l:a._imports_1$1,m:e.p({type:"right",size:"16",color:"#999"}),n:e.o((e=>c("/pages/order/index"))),o:a._imports_2,p:e.p({type:"right",size:"16",color:"#999"}),q:e.o((e=>c("/pages/feedback/index"))),r:a._imports_3,s:e.p({type:"right",size:"16",color:"#999"}),t:e.o((e=>c("/pages/help/index")))});var i}}},t=e._export_sfc(n,[["__scopeId","data-v-6fbc3933"]]);wx.createPage(t); +"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),o=require("../../util/index.js");if(!Array){e.resolveComponent("uni-icons")()}const n={__name:"index",setup(n){const t=e.ref({}),r=e.ref("0.00"),i=e.ref(""),s=e.ref(null),d=e.ref(!1);e.onMounted((()=>{l()}));const l=async()=>{try{if(!e.index.getStorageSync("token"))return void(await o.wxLogin());const a=await o.getUserInfo();console.log("User info response:",a),200==a.code&&(a.data.openId&&(i.value=a.data.openId,e.index.setStorageSync("openId",a.data.openId)),t.value={nickName:a.data.nickname,phone:a.data.phone,avatar:a.data.iconUrl,isAdmin:a.data.isAdmin},e.index.setStorageSync("userInfo",t.value),r.value=a.data.balanceAmount||"0.00")}catch(a){console.error("获取用户信息失败:",a),e.index.showToast({title:"获取用户信息失败",icon:"none"})}},c=a=>{e.index.navigateTo({url:a})},p=()=>{c("/pages/deposit/index")},u=()=>{t.value||v()},v=()=>{s.value&&(s.value.open(),d.value=!0)};return(o,n)=>{return e.e({a:t.value.avatar},t.value.avatar?{b:t.value.avatar}:{c:a._imports_0$1},{d:t.value.isAdmin},(t.value.isAdmin,{}),{e:t.value},t.value?{f:e.t(t.value.nickName),g:e.t(t.value.phone?(i=t.value.phone,i?i.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2"):""):"未绑定手机号")}:{},{h:e.p({type:"right",size:"16",color:"#999"}),i:e.o(u),j:e.t(r.value),k:e.o(p),l:a._imports_1,m:e.p({type:"right",size:"16",color:"#999"}),n:e.o((e=>c("/pages/order/index"))),o:a._imports_2,p:e.p({type:"right",size:"16",color:"#999"}),q:e.o((e=>c("/pages/feedback/index"))),r:a._imports_3,s:e.p({type:"right",size:"16",color:"#999"}),t:e.o((e=>c("/pages/help/index")))});var i}}},t=e._export_sfc(n,[["__scopeId","data-v-6fbc3933"]]);wx.createPage(t); diff --git a/unpackage/dist/build/mp-weixin/utils/amap.js b/unpackage/dist/build/mp-weixin/utils/amap.js new file mode 100644 index 0000000..996116c --- /dev/null +++ b/unpackage/dist/build/mp-weixin/utils/amap.js @@ -0,0 +1 @@ +"use strict";const t=require("../common/vendor.js");const e=new class{constructor(){this.key="4c513a688938fd89b88b296e867f66ec"}async regeocode(e,s){try{const a=await t.index.request({url:"https://restapi.amap.com/v3/geocode/regeo",method:"GET",data:{key:this.key,location:`${e},${s}`,poitype:"",radius:1e3,extensions:"base",batch:!1,roadlevel:0}});return 200===a.statusCode&&"1"===a.data.status?{success:!0,data:a.data.regeocode}:{success:!1,message:a.data.info||"逆地理编码失败"}}catch(a){return console.error("逆地理编码异常:",a),{success:!1,message:"网络异常"}}}async geocode(e,s=""){try{const a=await t.index.request({url:"https://restapi.amap.com/v3/geocode/geo",method:"GET",data:{key:this.key,address:e,city:s}});return 200===a.statusCode&&"1"===a.data.status&&a.data.geocodes.length>0?{success:!0,data:a.data.geocodes[0]}:{success:!1,message:a.data.info||"地理编码失败"}}catch(a){return console.error("地理编码异常:",a),{success:!1,message:"网络异常"}}}async searchPOI(e,s="",a=3e3,c=""){try{const o=await t.index.request({url:"https://restapi.amap.com/v3/place/text",method:"GET",data:{key:this.key,keywords:e,location:s,radius:a,city:c,citylimit:!0}});return 200===o.statusCode&&"1"===o.data.status?{success:!0,data:o.data.pois||[]}:{success:!1,message:o.data.info||"搜索失败"}}catch(o){return console.error("POI搜索异常:",o),{success:!1,message:"网络异常"}}}async getRoute(e,s,a=0){try{const c=await t.index.request({url:"https://restapi.amap.com/v3/direction/driving",method:"GET",data:{key:this.key,origin:e,destination:s,strategy:a,extensions:"base"}});return 200===c.statusCode&&"1"===c.data.status?{success:!0,data:c.data.route}:{success:!1,message:c.data.info||"路径规划失败"}}catch(c){return console.error("路径规划异常:",c),{success:!1,message:"网络异常"}}}calculateDistance(t,e,s,a){const c=t*Math.PI/180,o=s*Math.PI/180,r=c-o,n=e*Math.PI/180-a*Math.PI/180;let d=2*Math.asin(Math.sqrt(Math.pow(Math.sin(r/2),2)+Math.cos(c)*Math.cos(o)*Math.pow(Math.sin(n/2),2)));return d*=6378.137,d=Math.round(1e4*d)/1e4,d}};exports.AmapUtil=e; diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map index 6a1374b..4623d9c 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map @@ -1 +1 @@ -{"version":3,"file":"assets.js","sources":["static/logo.png","static/scan-icon.png","static/user-active.png","static/jl.png","static/complaint.png","static/hlep.png","static/images/wxpayflag.png","static/images/location-map.svg","static/images/Electricity.svg"],"sourcesContent":["export default \"__VITE_ASSET__fcf1191c__\"","export default \"__VITE_ASSET__b9d91c1a__\"","export default \"__VITE_ASSET__e217d500__\"","export default \"__VITE_ASSET__44ff4dfa__\"","export default \"__VITE_ASSET__d1c6bbb6__\"","export default \"__VITE_ASSET__f0ed8f64__\"","export default \"__VITE_ASSET__9081434a__\"","export default \"__VITE_ASSET__52e4836e__\"","export default \"__VITE_ASSET__f8b20b4b__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"assets.js","sources":["static/scan-icon.png","static/user-active.png","static/jl.png","static/complaint.png","static/hlep.png","static/images/wxpayflag.png","static/images/location-map.svg"],"sourcesContent":["export default \"__VITE_ASSET__b9d91c1a__\"","export default \"__VITE_ASSET__e217d500__\"","export default \"__VITE_ASSET__44ff4dfa__\"","export default \"__VITE_ASSET__d1c6bbb6__\"","export default \"__VITE_ASSET__f0ed8f64__\"","export default \"__VITE_ASSET__9081434a__\"","export default \"__VITE_ASSET__52e4836e__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;;;;;;;;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map index ad20ba4..4e3ca51 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map @@ -1 +1 @@ -{"version":3,"file":"vendor.js","sources":["E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@vue/shared/dist/shared.esm-bundler.js","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-shared/dist/uni-shared.es.js","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-weixin/dist/uni.api.esm.js","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-console/dist/mp.esm.js","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-weixin/dist/uni.mp.esm.js","node_modules/uview-ui/libs/function/deepClone.js","node_modules/uview-ui/libs/function/deepMerge.js","node_modules/uview-ui/libs/function/test.js","node_modules/uview-ui/libs/request/index.js","node_modules/uview-ui/libs/function/queryParams.js","node_modules/uview-ui/libs/function/route.js","node_modules/uview-ui/libs/function/timeFormat.js","node_modules/uview-ui/libs/function/timeFrom.js","node_modules/uview-ui/libs/function/colorGradient.js","node_modules/uview-ui/libs/function/guid.js","node_modules/uview-ui/libs/function/color.js","node_modules/uview-ui/libs/function/type2icon.js","node_modules/uview-ui/libs/function/randomArray.js","node_modules/uview-ui/libs/function/addUnit.js","node_modules/uview-ui/libs/function/random.js","node_modules/uview-ui/libs/function/trim.js","node_modules/uview-ui/libs/function/toast.js","node_modules/uview-ui/libs/function/getParent.js","node_modules/uview-ui/libs/function/$parent.js","node_modules/uview-ui/libs/function/sys.js","node_modules/uview-ui/libs/function/debounce.js","node_modules/uview-ui/libs/function/throttle.js","node_modules/uview-ui/libs/config/config.js","node_modules/uview-ui/libs/config/zIndex.js","node_modules/uview-ui/index.js","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-app/dist/uni-app.es.js"],"sourcesContent":["/**\n* @vue/shared v3.4.21\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nfunction makeMap(str, expectsLowerCase) {\n const set = new Set(str.split(\",\"));\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"HOISTED\": -1,\n \"-1\": \"HOISTED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === \"number\") {\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nfunction isRenderableAttrValue(value) {\n if (value == null) {\n return false;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","const isObject = (val) => val !== null && typeof val === 'object';\nconst defaultDelimiters = ['{', '}'];\nclass BaseFormatter {\n constructor() {\n this._caches = Object.create(null);\n }\n interpolate(message, values, delimiters = defaultDelimiters) {\n if (!values) {\n return [message];\n }\n let tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message, delimiters);\n this._caches[message] = tokens;\n }\n return compile(tokens, values);\n }\n}\nconst RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nconst RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\nfunction parse(format, [startDelimiter, endDelimiter]) {\n const tokens = [];\n let position = 0;\n let text = '';\n while (position < format.length) {\n let char = format[position++];\n if (char === startDelimiter) {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n text = '';\n let sub = '';\n char = format[position++];\n while (char !== undefined && char !== endDelimiter) {\n sub += char;\n char = format[position++];\n }\n const isClosed = char === endDelimiter;\n const type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type });\n }\n // else if (char === '%') {\n // // when found rails i18n syntax, skip text capture\n // if (format[position] !== '{') {\n // text += char\n // }\n // }\n else {\n text += char;\n }\n }\n text && tokens.push({ type: 'text', value: text });\n return tokens;\n}\nfunction compile(tokens, values) {\n const compiled = [];\n let index = 0;\n const mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') {\n return compiled;\n }\n while (index < tokens.length) {\n const token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break;\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break;\n case 'named':\n if (mode === 'named') {\n compiled.push(values[token.value]);\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);\n }\n }\n break;\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`Detect 'unknown' type of token!`);\n }\n break;\n }\n index++;\n }\n return compiled;\n}\n\nconst LOCALE_ZH_HANS = 'zh-Hans';\nconst LOCALE_ZH_HANT = 'zh-Hant';\nconst LOCALE_EN = 'en';\nconst LOCALE_FR = 'fr';\nconst LOCALE_ES = 'es';\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst defaultFormatter = new BaseFormatter();\nfunction include(str, parts) {\n return !!parts.find((part) => str.indexOf(part) !== -1);\n}\nfunction startsWith(str, parts) {\n return parts.find((part) => str.indexOf(part) === 0);\n}\nfunction normalizeLocale(locale, messages) {\n if (!locale) {\n return;\n }\n locale = locale.trim().replace(/_/g, '-');\n if (messages && messages[locale]) {\n return locale;\n }\n locale = locale.toLowerCase();\n if (locale === 'chinese') {\n // 支付宝\n return LOCALE_ZH_HANS;\n }\n if (locale.indexOf('zh') === 0) {\n if (locale.indexOf('-hans') > -1) {\n return LOCALE_ZH_HANS;\n }\n if (locale.indexOf('-hant') > -1) {\n return LOCALE_ZH_HANT;\n }\n if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {\n return LOCALE_ZH_HANT;\n }\n return LOCALE_ZH_HANS;\n }\n let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];\n if (messages && Object.keys(messages).length > 0) {\n locales = Object.keys(messages);\n }\n const lang = startsWith(locale, locales);\n if (lang) {\n return lang;\n }\n}\nclass I18n {\n constructor({ locale, fallbackLocale, messages, watcher, formater, }) {\n this.locale = LOCALE_EN;\n this.fallbackLocale = LOCALE_EN;\n this.message = {};\n this.messages = {};\n this.watchers = [];\n if (fallbackLocale) {\n this.fallbackLocale = fallbackLocale;\n }\n this.formater = formater || defaultFormatter;\n this.messages = messages || {};\n this.setLocale(locale || LOCALE_EN);\n if (watcher) {\n this.watchLocale(watcher);\n }\n }\n setLocale(locale) {\n const oldLocale = this.locale;\n this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;\n if (!this.messages[this.locale]) {\n // 可能初始化时不存在\n this.messages[this.locale] = {};\n }\n this.message = this.messages[this.locale];\n // 仅发生变化时,通知\n if (oldLocale !== this.locale) {\n this.watchers.forEach((watcher) => {\n watcher(this.locale, oldLocale);\n });\n }\n }\n getLocale() {\n return this.locale;\n }\n watchLocale(fn) {\n const index = this.watchers.push(fn) - 1;\n return () => {\n this.watchers.splice(index, 1);\n };\n }\n add(locale, message, override = true) {\n const curMessages = this.messages[locale];\n if (curMessages) {\n if (override) {\n Object.assign(curMessages, message);\n }\n else {\n Object.keys(message).forEach((key) => {\n if (!hasOwn(curMessages, key)) {\n curMessages[key] = message[key];\n }\n });\n }\n }\n else {\n this.messages[locale] = message;\n }\n }\n f(message, values, delimiters) {\n return this.formater.interpolate(message, values, delimiters).join('');\n }\n t(key, locale, values) {\n let message = this.message;\n if (typeof locale === 'string') {\n locale = normalizeLocale(locale, this.messages);\n locale && (message = this.messages[locale]);\n }\n else {\n values = locale;\n }\n if (!hasOwn(message, key)) {\n console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);\n return key;\n }\n return this.formater.interpolate(message[key], values).join('');\n }\n}\n\nfunction watchAppLocale(appVm, i18n) {\n // 需要保证 watch 的触发在组件渲染之前\n if (appVm.$watchLocale) {\n // vue2\n appVm.$watchLocale((newLocale) => {\n i18n.setLocale(newLocale);\n });\n }\n else {\n appVm.$watch(() => appVm.$locale, (newLocale) => {\n i18n.setLocale(newLocale);\n });\n }\n}\nfunction getDefaultLocale() {\n if (typeof uni !== 'undefined' && uni.getLocale) {\n return uni.getLocale();\n }\n // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale\n if (typeof global !== 'undefined' && global.getLocale) {\n return global.getLocale();\n }\n return LOCALE_EN;\n}\nfunction initVueI18n(locale, messages = {}, fallbackLocale, watcher) {\n // 兼容旧版本入参\n if (typeof locale !== 'string') {\n // ;[locale, messages] = [\n // messages as unknown as string,\n // locale as unknown as LocaleMessages,\n // ]\n // 暂不使用数组解构,uts编译器暂未支持。\n const options = [\n messages,\n locale,\n ];\n locale = options[0];\n messages = options[1];\n }\n if (typeof locale !== 'string') {\n // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined\n locale = getDefaultLocale();\n }\n if (typeof fallbackLocale !== 'string') {\n fallbackLocale =\n (typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale) ||\n LOCALE_EN;\n }\n const i18n = new I18n({\n locale,\n fallbackLocale,\n messages,\n watcher,\n });\n let t = (key, values) => {\n if (typeof getApp !== 'function') {\n // app view\n /* eslint-disable no-func-assign */\n t = function (key, values) {\n return i18n.t(key, values);\n };\n }\n else {\n let isWatchedAppLocale = false;\n t = function (key, values) {\n const appVm = getApp().$vm;\n // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化\n // options: {\n // \ttype: Array,\n // \tdefault () {\n // \t\treturn [{\n // \t\t\ticon: 'shop',\n // \t\t\ttext: t(\"uni-goods-nav.options.shop\"),\n // \t\t}, {\n // \t\t\ticon: 'cart',\n // \t\t\ttext: t(\"uni-goods-nav.options.cart\")\n // \t\t}]\n // \t}\n // },\n if (appVm) {\n // 触发响应式\n appVm.$locale;\n if (!isWatchedAppLocale) {\n isWatchedAppLocale = true;\n watchAppLocale(appVm, i18n);\n }\n }\n return i18n.t(key, values);\n };\n }\n return t(key, values);\n };\n return {\n i18n,\n f(message, values, delimiters) {\n return i18n.f(message, values, delimiters);\n },\n t(key, values) {\n return t(key, values);\n },\n add(locale, message, override = true) {\n return i18n.add(locale, message, override);\n },\n watch(fn) {\n return i18n.watchLocale(fn);\n },\n getLocale() {\n return i18n.getLocale();\n },\n setLocale(newLocale) {\n return i18n.setLocale(newLocale);\n },\n };\n}\n\nconst isString = (val) => typeof val === 'string';\nlet formater;\nfunction hasI18nJson(jsonObj, delimiters) {\n if (!formater) {\n formater = new BaseFormatter();\n }\n return walkJsonObj(jsonObj, (jsonObj, key) => {\n const value = jsonObj[key];\n if (isString(value)) {\n if (isI18nStr(value, delimiters)) {\n return true;\n }\n }\n else {\n return hasI18nJson(value, delimiters);\n }\n });\n}\nfunction parseI18nJson(jsonObj, values, delimiters) {\n if (!formater) {\n formater = new BaseFormatter();\n }\n walkJsonObj(jsonObj, (jsonObj, key) => {\n const value = jsonObj[key];\n if (isString(value)) {\n if (isI18nStr(value, delimiters)) {\n jsonObj[key] = compileStr(value, values, delimiters);\n }\n }\n else {\n parseI18nJson(value, values, delimiters);\n }\n });\n return jsonObj;\n}\nfunction compileI18nJsonStr(jsonStr, { locale, locales, delimiters, }) {\n if (!isI18nStr(jsonStr, delimiters)) {\n return jsonStr;\n }\n if (!formater) {\n formater = new BaseFormatter();\n }\n const localeValues = [];\n Object.keys(locales).forEach((name) => {\n if (name !== locale) {\n localeValues.push({\n locale: name,\n values: locales[name],\n });\n }\n });\n localeValues.unshift({ locale, values: locales[locale] });\n try {\n return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);\n }\n catch (e) { }\n return jsonStr;\n}\nfunction isI18nStr(value, delimiters) {\n return value.indexOf(delimiters[0]) > -1;\n}\nfunction compileStr(value, values, delimiters) {\n return formater.interpolate(value, values, delimiters).join('');\n}\nfunction compileValue(jsonObj, key, localeValues, delimiters) {\n const value = jsonObj[key];\n if (isString(value)) {\n // 存在国际化\n if (isI18nStr(value, delimiters)) {\n jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);\n if (localeValues.length > 1) {\n // 格式化国际化语言\n const valueLocales = (jsonObj[key + 'Locales'] = {});\n localeValues.forEach((localValue) => {\n valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);\n });\n }\n }\n }\n else {\n compileJsonObj(value, localeValues, delimiters);\n }\n}\nfunction compileJsonObj(jsonObj, localeValues, delimiters) {\n walkJsonObj(jsonObj, (jsonObj, key) => {\n compileValue(jsonObj, key, localeValues, delimiters);\n });\n return jsonObj;\n}\nfunction walkJsonObj(jsonObj, walk) {\n if (Array.isArray(jsonObj)) {\n for (let i = 0; i < jsonObj.length; i++) {\n if (walk(jsonObj, i)) {\n return true;\n }\n }\n }\n else if (isObject(jsonObj)) {\n for (const key in jsonObj) {\n if (walk(jsonObj, key)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction resolveLocale(locales) {\n return (locale) => {\n if (!locale) {\n return locale;\n }\n locale = normalizeLocale(locale) || locale;\n return resolveLocaleChain(locale).find((locale) => locales.indexOf(locale) > -1);\n };\n}\nfunction resolveLocaleChain(locale) {\n const chain = [];\n const tokens = locale.split('-');\n while (tokens.length) {\n chain.push(tokens.join('-'));\n tokens.pop();\n }\n return chain;\n}\n\nexport { BaseFormatter as Formatter, I18n, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT, compileI18nJsonStr, hasI18nJson, initVueI18n, isI18nStr, isString, normalizeLocale, parseI18nJson, resolveLocale };\n","import { isHTMLTag, isSVGTag, isVoidTag, isString, isFunction, isPlainObject, hyphenate, camelize, normalizeStyle as normalizeStyle$1, parseStringStyle, isArray, normalizeClass as normalizeClass$1, extend, capitalize } from '@vue/shared';\n\nconst BUILT_IN_TAG_NAMES = [\n 'ad',\n 'ad-content-page',\n 'ad-draw',\n 'audio',\n 'button',\n 'camera',\n 'canvas',\n 'checkbox',\n 'checkbox-group',\n 'cover-image',\n 'cover-view',\n 'editor',\n 'form',\n 'functional-page-navigator',\n 'icon',\n 'image',\n 'input',\n 'label',\n 'live-player',\n 'live-pusher',\n 'map',\n 'movable-area',\n 'movable-view',\n 'navigator',\n 'official-account',\n 'open-data',\n 'picker',\n 'picker-view',\n 'picker-view-column',\n 'progress',\n 'radio',\n 'radio-group',\n 'rich-text',\n 'scroll-view',\n 'slider',\n 'swiper',\n 'swiper-item',\n 'switch',\n 'text',\n 'textarea',\n 'video',\n 'view',\n 'web-view',\n 'location-picker',\n 'location-view',\n];\nconst BUILT_IN_TAGS = BUILT_IN_TAG_NAMES.map((tag) => 'uni-' + tag);\nconst TAGS = [\n 'app',\n 'layout',\n 'content',\n 'main',\n 'top-window',\n 'left-window',\n 'right-window',\n 'tabbar',\n 'page',\n 'page-head',\n 'page-wrapper',\n 'page-body',\n 'page-refresh',\n 'actionsheet',\n 'modal',\n 'toast',\n 'resize-sensor',\n 'shadow-root',\n].map((tag) => 'uni-' + tag);\nconst NVUE_BUILT_IN_TAGS = [\n 'svg',\n 'view',\n 'a',\n 'div',\n 'img',\n 'image',\n 'text',\n 'span',\n 'input',\n 'textarea',\n 'spinner',\n 'select',\n // slider 被自定义 u-slider 替代\n // 'slider',\n 'slider-neighbor',\n 'indicator',\n 'canvas',\n 'list',\n 'cell',\n 'header',\n 'loading',\n 'loading-indicator',\n 'refresh',\n 'scrollable',\n 'scroller',\n 'video',\n 'web',\n 'embed',\n 'tabbar',\n 'tabheader',\n 'datepicker',\n 'timepicker',\n 'marquee',\n 'countdown',\n 'dc-switch',\n 'waterfall',\n 'richtext',\n 'recycle-list',\n 'u-scalable',\n 'barcode',\n 'gcanvas',\n];\nconst UVUE_BUILT_IN_TAGS = [\n 'ad',\n 'ad-content-page',\n 'ad-draw',\n 'native-view',\n 'loading-indicator',\n 'list-view',\n 'list-item',\n 'swiper',\n 'swiper-item',\n 'rich-text',\n 'sticky-view',\n 'sticky-header',\n 'sticky-section',\n // 自定义\n 'uni-slider',\n // 原生实现\n 'button',\n 'nested-scroll-header',\n 'nested-scroll-body',\n 'waterflow',\n 'flow-item',\n 'share-element',\n 'cover-view',\n 'cover-image',\n];\nconst UVUE_WEB_BUILT_IN_TAGS = [\n 'list-view',\n 'list-item',\n 'sticky-section',\n 'sticky-header',\n 'cloud-db-element',\n].map((tag) => 'uni-' + tag);\nconst UVUE_IOS_BUILT_IN_TAGS = [\n 'scroll-view',\n 'web-view',\n 'slider',\n 'form',\n 'switch',\n];\nconst UVUE_HARMONY_BUILT_IN_TAGS = [\n // TODO 列出完整列表\n ...BUILT_IN_TAG_NAMES,\n 'volume-panel',\n];\nconst NVUE_U_BUILT_IN_TAGS = [\n 'u-text',\n 'u-image',\n 'u-input',\n 'u-textarea',\n 'u-video',\n 'u-web-view',\n 'u-slider',\n 'u-ad',\n 'u-ad-draw',\n 'u-rich-text',\n];\nconst UNI_UI_CONFLICT_TAGS = ['list-item'].map((tag) => 'uni-' + tag);\nfunction isBuiltInComponent(tag) {\n if (UNI_UI_CONFLICT_TAGS.indexOf(tag) !== -1) {\n return false;\n }\n // h5 平台会被转换为 v-uni-\n const realTag = 'uni-' + tag.replace('v-uni-', '');\n // TODO 区分x和非x\n return (BUILT_IN_TAGS.indexOf(realTag) !== -1 ||\n UVUE_WEB_BUILT_IN_TAGS.indexOf(realTag) !== -1);\n}\nfunction isH5CustomElement(tag, isX = false) {\n if (isX && UVUE_WEB_BUILT_IN_TAGS.indexOf(tag) !== -1) {\n return true;\n }\n return TAGS.indexOf(tag) !== -1 || BUILT_IN_TAGS.indexOf(tag) !== -1;\n}\nfunction isUniXElement(name) {\n return /^I?Uni.*Element(?:Impl)?$/.test(name);\n}\nfunction isH5NativeTag(tag) {\n return (tag !== 'head' &&\n (isHTMLTag(tag) || isSVGTag(tag)) &&\n !isBuiltInComponent(tag));\n}\nfunction isAppNativeTag(tag) {\n return isHTMLTag(tag) || isSVGTag(tag) || isBuiltInComponent(tag);\n}\nconst NVUE_CUSTOM_COMPONENTS = [\n 'ad',\n 'ad-draw',\n 'button',\n 'checkbox-group',\n 'checkbox',\n 'form',\n 'icon',\n 'label',\n 'movable-area',\n 'movable-view',\n 'navigator',\n 'picker',\n 'progress',\n 'radio-group',\n 'radio',\n 'rich-text',\n 'swiper-item',\n 'swiper',\n 'switch',\n 'slider',\n 'picker-view',\n 'picker-view-column',\n];\n// 内置的easycom组件\nconst UVUE_BUILT_IN_EASY_COMPONENTS = ['map', 'camera'];\nfunction isAppUVueBuiltInEasyComponent(tag) {\n return UVUE_BUILT_IN_EASY_COMPONENTS.includes(tag);\n}\n// 主要是指前端实现的组件列表\nconst UVUE_CUSTOM_COMPONENTS = [\n ...NVUE_CUSTOM_COMPONENTS,\n ...UVUE_BUILT_IN_EASY_COMPONENTS,\n];\nfunction isAppUVueNativeTag(tag) {\n // 前端实现的内置组件都会注册一个根组件\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_CUSTOM_COMPONENTS.includes(tag)) {\n return false;\n }\n if (isBuiltInComponent(tag)) {\n return true;\n }\n // u-text,u-video...\n if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isAppIOSUVueNativeTag(tag) {\n // 前端实现的内置组件都会注册一个根组件\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_IOS_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isAppHarmonyUVueNativeTag(tag) {\n // video 目前是easycom实现的\n if (tag === 'video' || tag === 'map') {\n return false;\n }\n // 前端实现的内置组件都会注册一个根组件\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (UVUE_HARMONY_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isAppNVueNativeTag(tag) {\n if (NVUE_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n if (NVUE_CUSTOM_COMPONENTS.includes(tag)) {\n return false;\n }\n if (isBuiltInComponent(tag)) {\n return true;\n }\n // u-text,u-video...\n if (NVUE_U_BUILT_IN_TAGS.includes(tag)) {\n return true;\n }\n return false;\n}\nfunction isMiniProgramNativeTag(tag) {\n return isBuiltInComponent(tag);\n}\nfunction isMiniProgramUVueNativeTag(tag) {\n // 小程序平台内置的自定义元素,会被转换为 view\n if (tag.startsWith('uni-') && tag.endsWith('-element')) {\n return true;\n }\n return isBuiltInComponent(tag);\n}\nfunction createIsCustomElement(tags = []) {\n return function isCustomElement(tag) {\n return tags.includes(tag);\n };\n}\nfunction isComponentTag(tag) {\n return tag[0].toLowerCase() + tag.slice(1) === 'component';\n}\nconst COMPONENT_SELECTOR_PREFIX = 'uni-';\nconst COMPONENT_PREFIX = 'v-' + COMPONENT_SELECTOR_PREFIX;\n// TODO 是否还存在其他需要特殊处理的 void 标签?\nconst APP_VOID_TAGS = ['textarea'];\nfunction isAppVoidTag(tag) {\n return APP_VOID_TAGS.includes(tag) || isVoidTag(tag);\n}\n\nconst LINEFEED = '\\n';\nconst NAVBAR_HEIGHT = 44;\nconst TABBAR_HEIGHT = 50;\nconst ON_REACH_BOTTOM_DISTANCE = 50;\nconst RESPONSIVE_MIN_WIDTH = 768;\nconst UNI_STORAGE_LOCALE = 'UNI_LOCALE';\n// quickapp-webview 不能使用 default 作为插槽名称\nconst SLOT_DEFAULT_NAME = 'd';\nconst COMPONENT_NAME_PREFIX = 'VUni';\nconst I18N_JSON_DELIMITERS = ['%', '%'];\nconst PRIMARY_COLOR = '#007aff';\nconst SELECTED_COLOR = '#0062cc'; // 选中的颜色,如选项卡默认的选中颜色\nconst BACKGROUND_COLOR = '#f7f7f7'; // 背景色,如标题栏默认背景色\nconst UNI_SSR = '__uniSSR';\nconst UNI_SSR_TITLE = 'title';\nconst UNI_SSR_STORE = 'store';\nconst UNI_SSR_DATA = 'data';\nconst UNI_SSR_GLOBAL_DATA = 'globalData';\nconst SCHEME_RE = /^([a-z-]+:)?\\/\\//i;\nconst DATA_RE = /^data:.*,.*/;\nconst WEB_INVOKE_APPSERVICE = 'WEB_INVOKE_APPSERVICE';\nconst WXS_PROTOCOL = 'wxs://';\nconst JSON_PROTOCOL = 'json://';\nconst WXS_MODULES = 'wxsModules';\nconst RENDERJS_MODULES = 'renderjsModules';\n// lifecycle\n// App and Page\nconst ON_SHOW = 'onShow';\nconst ON_HIDE = 'onHide';\n//App\nconst ON_LAUNCH = 'onLaunch';\nconst ON_ERROR = 'onError';\nconst ON_THEME_CHANGE = 'onThemeChange';\nconst OFF_THEME_CHANGE = 'offThemeChange';\nconst ON_HOST_THEME_CHANGE = 'onHostThemeChange';\nconst OFF_HOST_THEME_CHANGE = 'offHostThemeChange';\nconst ON_KEYBOARD_HEIGHT_CHANGE = 'onKeyboardHeightChange';\nconst ON_PAGE_NOT_FOUND = 'onPageNotFound';\nconst ON_UNHANDLE_REJECTION = 'onUnhandledRejection';\nconst ON_EXIT = 'onExit';\n//Page\nconst ON_LOAD = 'onLoad';\nconst ON_READY = 'onReady';\nconst ON_UNLOAD = 'onUnload';\n// 百度特有\nconst ON_INIT = 'onInit';\n// 微信特有\nconst ON_SAVE_EXIT_STATE = 'onSaveExitState';\nconst ON_RESIZE = 'onResize';\nconst ON_BACK_PRESS = 'onBackPress';\nconst ON_PAGE_SCROLL = 'onPageScroll';\nconst ON_TAB_ITEM_TAP = 'onTabItemTap';\nconst ON_REACH_BOTTOM = 'onReachBottom';\nconst ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';\nconst ON_SHARE_TIMELINE = 'onShareTimeline';\nconst ON_SHARE_CHAT = 'onShareChat'; // xhs-share\nconst ON_ADD_TO_FAVORITES = 'onAddToFavorites';\nconst ON_SHARE_APP_MESSAGE = 'onShareAppMessage';\n// navigationBar\nconst ON_NAVIGATION_BAR_BUTTON_TAP = 'onNavigationBarButtonTap';\nconst ON_NAVIGATION_BAR_CHANGE = 'onNavigationBarChange';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = 'onNavigationBarSearchInputClicked';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = 'onNavigationBarSearchInputChanged';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = 'onNavigationBarSearchInputConfirmed';\nconst ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = 'onNavigationBarSearchInputFocusChanged';\n// framework\nconst ON_APP_ENTER_FOREGROUND = 'onAppEnterForeground';\nconst ON_APP_ENTER_BACKGROUND = 'onAppEnterBackground';\nconst ON_WEB_INVOKE_APP_SERVICE = 'onWebInvokeAppService';\nconst ON_WXS_INVOKE_CALL_METHOD = 'onWxsInvokeCallMethod';\n// mergeVirtualHostAttributes\nconst VIRTUAL_HOST_STYLE = 'virtualHostStyle';\nconst VIRTUAL_HOST_CLASS = 'virtualHostClass';\nconst VIRTUAL_HOST_HIDDEN = 'virtualHostHidden';\nconst VIRTUAL_HOST_ID = 'virtualHostId';\n\nfunction cache(fn) {\n const cache = Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nfunction cacheStringFunction(fn) {\n return cache(fn);\n}\nfunction getLen(str = '') {\n return ('' + str).replace(/[^\\x00-\\xff]/g, '**').length;\n}\nfunction hasLeadingSlash(str) {\n return str.indexOf('/') === 0;\n}\nfunction addLeadingSlash(str) {\n return hasLeadingSlash(str) ? str : '/' + str;\n}\nfunction removeLeadingSlash(str) {\n return hasLeadingSlash(str) ? str.slice(1) : str;\n}\nconst invokeArrayFns = (fns, arg) => {\n let ret;\n for (let i = 0; i < fns.length; i++) {\n ret = fns[i](arg);\n }\n return ret;\n};\nfunction updateElementStyle(element, styles) {\n for (const attrName in styles) {\n element.style[attrName] = styles[attrName];\n }\n}\nfunction once(fn, ctx = null) {\n let res;\n return ((...args) => {\n if (fn) {\n res = fn.apply(ctx, args);\n fn = null;\n }\n return res;\n });\n}\nconst sanitise = (val) => (val && JSON.parse(JSON.stringify(val))) || val;\nconst _completeValue = (value) => (value > 9 ? value : '0' + value);\nfunction formatDateTime({ date = new Date(), mode = 'date' }) {\n if (mode === 'time') {\n return (_completeValue(date.getHours()) + ':' + _completeValue(date.getMinutes()));\n }\n else {\n return (date.getFullYear() +\n '-' +\n _completeValue(date.getMonth() + 1) +\n '-' +\n _completeValue(date.getDate()));\n }\n}\nfunction callOptions(options, data) {\n options = options || {};\n if (isString(data)) {\n data = {\n errMsg: data,\n };\n }\n if (/:ok$/.test(data.errMsg)) {\n if (isFunction(options.success)) {\n options.success(data);\n }\n }\n else {\n if (isFunction(options.fail)) {\n options.fail(data);\n }\n }\n if (isFunction(options.complete)) {\n options.complete(data);\n }\n}\nfunction getValueByDataPath(obj, path) {\n if (!isString(path)) {\n return;\n }\n path = path.replace(/\\[(\\d+)\\]/g, '.$1');\n const parts = path.split('.');\n let key = parts[0];\n if (!obj) {\n obj = {};\n }\n if (parts.length === 1) {\n return obj[key];\n }\n return getValueByDataPath(obj[key], parts.slice(1).join('.'));\n}\nfunction sortObject(obj) {\n let sortObj = {};\n if (isPlainObject(obj)) {\n Object.keys(obj)\n .sort()\n .forEach((key) => {\n const _key = key;\n sortObj[_key] = obj[_key];\n });\n }\n return !Object.keys(sortObj) ? obj : sortObj;\n}\nfunction getGlobalOnce() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n // worker\n if (typeof self !== 'undefined') {\n return self;\n }\n // browser\n if (typeof window !== 'undefined') {\n return window;\n }\n // nodejs\n // if (typeof global !== 'undefined') {\n // return global\n // }\n function g() {\n return this;\n }\n if (typeof g() !== 'undefined') {\n return g();\n }\n return (function () {\n return new Function('return this')();\n })();\n}\nlet g = undefined;\nfunction getGlobal() {\n if (g) {\n return g;\n }\n g = getGlobalOnce();\n return g;\n}\n\nfunction isComponentInternalInstance(vm) {\n return !!vm.appContext;\n}\nfunction resolveComponentInstance(instance) {\n return (instance &&\n (isComponentInternalInstance(instance) ? instance.proxy : instance));\n}\nfunction resolveOwnerVm(vm) {\n if (!vm) {\n return;\n }\n let componentName = vm.type.name;\n while (componentName && isBuiltInComponent(hyphenate(componentName))) {\n // ownerInstance 内置组件需要使用父 vm\n vm = vm.parent;\n componentName = vm.type.name;\n }\n return vm.proxy;\n}\nfunction isElement(el) {\n // Element\n return el.nodeType === 1;\n}\nfunction resolveOwnerEl(instance, multi = false) {\n const { vnode } = instance;\n if (isElement(vnode.el)) {\n return multi ? (vnode.el ? [vnode.el] : []) : vnode.el;\n }\n const { subTree } = instance;\n // ShapeFlags.ARRAY_CHILDREN = 1<<4\n if (subTree.shapeFlag & 16) {\n const elemVNodes = subTree.children.filter((vnode) => vnode.el && isElement(vnode.el));\n if (elemVNodes.length > 0) {\n if (multi) {\n return elemVNodes.map((node) => node.el);\n }\n return elemVNodes[0].el;\n }\n }\n return multi ? (vnode.el ? [vnode.el] : []) : vnode.el;\n}\nfunction dynamicSlotName(name) {\n return name === 'default' ? SLOT_DEFAULT_NAME : name;\n}\nconst customizeRE = /:/g;\nfunction customizeEvent(str) {\n return camelize(str.replace(customizeRE, '-'));\n}\nfunction normalizeStyle(value) {\n const g = getGlobal();\n if (g && g.UTSJSONObject && value instanceof g.UTSJSONObject) {\n const styleObject = {};\n g.UTSJSONObject.keys(value).forEach((key) => {\n styleObject[key] = value[key];\n });\n return normalizeStyle$1(styleObject);\n }\n else if (value instanceof Map) {\n const styleObject = {};\n value.forEach((value, key) => {\n styleObject[key] = value;\n });\n return normalizeStyle$1(styleObject);\n }\n else if (isString(value)) {\n return parseStringStyle(value);\n }\n else if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item)\n ? parseStringStyle(item)\n : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n }\n else {\n return normalizeStyle$1(value);\n }\n}\nfunction normalizeClass(value) {\n let res = '';\n const g = getGlobal();\n if (g && g.UTSJSONObject && value instanceof g.UTSJSONObject) {\n g.UTSJSONObject.keys(value).forEach((key) => {\n if (value[key]) {\n res += key + ' ';\n }\n });\n }\n else if (value instanceof Map) {\n value.forEach((value, key) => {\n if (value) {\n res += key + ' ';\n }\n });\n }\n else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + ' ';\n }\n }\n }\n else {\n res = normalizeClass$1(value);\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nlet lastLogTime = 0;\nfunction formatLog(module, ...args) {\n const now = Date.now();\n const diff = lastLogTime ? now - lastLogTime : 0;\n lastLogTime = now;\n return `[${now}][${diff}ms][${module}]:${args\n .map((arg) => JSON.stringify(arg))\n .join(' ')}`;\n}\n\nfunction formatKey(key) {\n return camelize(key.substring(5));\n}\n// question/139181,增加副作用,避免 initCustomDataset 在 build 下被 tree-shaking\nconst initCustomDatasetOnce = /*#__PURE__*/ once((isBuiltInElement) => {\n isBuiltInElement =\n isBuiltInElement || ((el) => el.tagName.startsWith('UNI-'));\n const prototype = HTMLElement.prototype;\n const setAttribute = prototype.setAttribute;\n prototype.setAttribute = function (key, value) {\n if (key.startsWith('data-') && isBuiltInElement(this)) {\n const dataset = this.__uniDataset ||\n (this.__uniDataset = {});\n dataset[formatKey(key)] = value;\n }\n setAttribute.call(this, key, value);\n };\n const removeAttribute = prototype.removeAttribute;\n prototype.removeAttribute = function (key) {\n if (this.__uniDataset &&\n key.startsWith('data-') &&\n isBuiltInElement(this)) {\n delete this.__uniDataset[formatKey(key)];\n }\n removeAttribute.call(this, key);\n };\n});\nfunction getCustomDataset(el) {\n return extend({}, el.dataset, el.__uniDataset);\n}\n\nconst unitRE = new RegExp(`\"[^\"]+\"|'[^']+'|url\\\\([^)]+\\\\)|(\\\\d*\\\\.?\\\\d+)[r|u]px`, 'g');\nfunction toFixed(number, precision) {\n const multiplier = Math.pow(10, precision + 1);\n const wholeNumber = Math.floor(number * multiplier);\n return (Math.round(wholeNumber / 10) * 10) / multiplier;\n}\nconst defaultRpx2Unit = {\n unit: 'rem',\n unitRatio: 10 / 320,\n unitPrecision: 5,\n};\nconst defaultMiniProgramRpx2Unit = {\n unit: 'rpx',\n unitRatio: 1,\n unitPrecision: 1,\n};\nconst defaultNVueRpx2Unit = defaultMiniProgramRpx2Unit;\nfunction createRpx2Unit(unit, unitRatio, unitPrecision) {\n // ignore: rpxCalcIncludeWidth\n return (val) => val.replace(unitRE, (m, $1) => {\n if (!$1) {\n return m;\n }\n if (unitRatio === 1) {\n return `${$1}${unit}`;\n }\n const value = toFixed(parseFloat($1) * unitRatio, unitPrecision);\n return value === 0 ? '0' : `${value}${unit}`;\n });\n}\n\nfunction passive(passive) {\n return { passive };\n}\nfunction normalizeDataset(el) {\n // TODO\n return JSON.parse(JSON.stringify(el.dataset || {}));\n}\nfunction normalizeTarget(el) {\n const { id, offsetTop, offsetLeft } = el;\n return {\n id,\n dataset: getCustomDataset(el),\n offsetTop,\n offsetLeft,\n };\n}\nfunction addFont(family, source, desc) {\n const fonts = document.fonts;\n if (fonts) {\n const fontFace = new FontFace(family, source, desc);\n return fontFace.load().then(() => {\n fonts.add && fonts.add(fontFace);\n });\n }\n return new Promise((resolve) => {\n const style = document.createElement('style');\n const values = [];\n if (desc) {\n const { style, weight, stretch, unicodeRange, variant, featureSettings } = desc;\n style && values.push(`font-style:${style}`);\n weight && values.push(`font-weight:${weight}`);\n stretch && values.push(`font-stretch:${stretch}`);\n unicodeRange && values.push(`unicode-range:${unicodeRange}`);\n variant && values.push(`font-variant:${variant}`);\n featureSettings && values.push(`font-feature-settings:${featureSettings}`);\n }\n style.innerText = `@font-face{font-family:\"${family}\";src:${source};${values.join(';')}}`;\n document.head.appendChild(style);\n resolve();\n });\n}\nfunction scrollTo(scrollTop, duration, isH5) {\n if (isString(scrollTop)) {\n const el = document.querySelector(scrollTop);\n if (el) {\n const { top } = el.getBoundingClientRect();\n scrollTop = top + window.pageYOffset;\n // 如果存在,减去 高度\n const pageHeader = document.querySelector('uni-page-head');\n if (pageHeader) {\n scrollTop -= pageHeader.offsetHeight;\n }\n }\n }\n if (scrollTop < 0) {\n scrollTop = 0;\n }\n const documentElement = document.documentElement;\n const { clientHeight, scrollHeight } = documentElement;\n scrollTop = Math.min(scrollTop, scrollHeight - clientHeight);\n if (duration === 0) {\n // 部分浏览器(比如微信)中 scrollTop 的值需要通过 document.body 来控制\n documentElement.scrollTop = document.body.scrollTop = scrollTop;\n return;\n }\n if (window.scrollY === scrollTop) {\n return;\n }\n const scrollTo = (duration) => {\n if (duration <= 0) {\n window.scrollTo(0, scrollTop);\n return;\n }\n const distaince = scrollTop - window.scrollY;\n requestAnimationFrame(function () {\n window.scrollTo(0, window.scrollY + (distaince / duration) * 10);\n scrollTo(duration - 10);\n });\n };\n scrollTo(duration);\n}\n\nconst encode = encodeURIComponent;\nfunction stringifyQuery(obj, encodeStr = encode) {\n const res = obj\n ? Object.keys(obj)\n .map((key) => {\n let val = obj[key];\n if (typeof val === undefined || val === null) {\n val = '';\n }\n else if (isPlainObject(val)) {\n val = JSON.stringify(val);\n }\n return encodeStr(key) + '=' + encodeStr(val);\n })\n .filter((x) => x.length > 0)\n .join('&')\n : null;\n return res ? `?${res}` : '';\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n try {\n return decodeURIComponent('' + text);\n }\n catch (err) { }\n return '' + text;\n}\nfunction decodedQuery(query = {}) {\n const decodedQuery = {};\n Object.keys(query).forEach((name) => {\n try {\n decodedQuery[name] = decode(query[name]);\n }\n catch (e) {\n decodedQuery[name] = query[name];\n }\n });\n return decodedQuery;\n}\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * https://github.com/vuejs/vue-router-next/blob/master/src/query.ts\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n const query = {};\n // avoid creating an object with an empty key and empty value\n // because of split('&')\n if (search === '' || search === '?')\n return query;\n const hasLeadingIM = search[0] === '?';\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n for (let i = 0; i < searchParams.length; ++i) {\n // pre decode the + into space\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n // allow the = character\n let eqPos = searchParam.indexOf('=');\n let key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n let value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n // an extra variable for ts types\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n }\n else {\n query[key] = value;\n }\n }\n return query;\n}\n\nfunction parseUrl(url) {\n const [path, querystring] = url.split('?', 2);\n return {\n path,\n query: parseQuery(querystring || ''),\n };\n}\n\nfunction parseNVueDataset(attr) {\n const dataset = {};\n if (attr) {\n Object.keys(attr).forEach((key) => {\n if (key.indexOf('data-') === 0) {\n dataset[key.replace('data-', '')] = attr[key];\n }\n });\n }\n return dataset;\n}\n\nfunction plusReady(callback) {\n if (!isFunction(callback)) {\n return;\n }\n if (window.plus) {\n return callback();\n }\n document.addEventListener('plusready', callback);\n}\n\nclass DOMException extends Error {\n constructor(message) {\n super(message);\n this.name = 'DOMException';\n }\n}\n\nfunction normalizeEventType(type, options) {\n if (options) {\n if (options.capture) {\n type += 'Capture';\n }\n if (options.once) {\n type += 'Once';\n }\n if (options.passive) {\n type += 'Passive';\n }\n }\n return `on${capitalize(camelize(type))}`;\n}\nclass UniEvent {\n constructor(type, opts) {\n this.defaultPrevented = false;\n this.timeStamp = Date.now();\n this._stop = false;\n this._end = false;\n this.type = type;\n this.bubbles = !!opts.bubbles;\n this.cancelable = !!opts.cancelable;\n }\n preventDefault() {\n this.defaultPrevented = true;\n }\n stopImmediatePropagation() {\n this._end = this._stop = true;\n }\n stopPropagation() {\n this._stop = true;\n }\n}\nfunction createUniEvent(evt) {\n if (evt instanceof UniEvent) {\n return evt;\n }\n const [type] = parseEventName(evt.type);\n const uniEvent = new UniEvent(type, {\n bubbles: false,\n cancelable: false,\n });\n extend(uniEvent, evt);\n return uniEvent;\n}\nclass UniEventTarget {\n constructor() {\n this.listeners = Object.create(null);\n }\n dispatchEvent(evt) {\n const listeners = this.listeners[evt.type];\n if (!listeners) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error(formatLog('dispatchEvent', this.nodeId), evt.type, 'not found');\n }\n return false;\n }\n // 格式化事件类型\n const event = createUniEvent(evt);\n const len = listeners.length;\n for (let i = 0; i < len; i++) {\n listeners[i].call(this, event);\n if (event._end) {\n break;\n }\n }\n return event.cancelable && event.defaultPrevented;\n }\n addEventListener(type, listener, options) {\n type = normalizeEventType(type, options);\n (this.listeners[type] || (this.listeners[type] = [])).push(listener);\n }\n removeEventListener(type, callback, options) {\n type = normalizeEventType(type, options);\n const listeners = this.listeners[type];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(callback);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n}\nconst optionsModifierRE = /(?:Once|Passive|Capture)$/;\nfunction parseEventName(name) {\n let options;\n if (optionsModifierRE.test(name)) {\n options = {};\n let m;\n while ((m = name.match(optionsModifierRE))) {\n name = name.slice(0, name.length - m[0].length);\n options[m[0].toLowerCase()] = true;\n }\n }\n return [hyphenate(name.slice(2)), options];\n}\n\nconst EventModifierFlags = /*#__PURE__*/ (() => {\n return {\n stop: 1,\n prevent: 1 << 1,\n self: 1 << 2,\n };\n})();\nfunction encodeModifier(modifiers) {\n let flag = 0;\n if (modifiers.includes('stop')) {\n flag |= EventModifierFlags.stop;\n }\n if (modifiers.includes('prevent')) {\n flag |= EventModifierFlags.prevent;\n }\n if (modifiers.includes('self')) {\n flag |= EventModifierFlags.self;\n }\n return flag;\n}\n\nconst NODE_TYPE_PAGE = 0;\nconst NODE_TYPE_ELEMENT = 1;\nconst NODE_TYPE_TEXT = 3;\nconst NODE_TYPE_COMMENT = 8;\nfunction sibling(node, type) {\n const { parentNode } = node;\n if (!parentNode) {\n return null;\n }\n const { childNodes } = parentNode;\n return childNodes[childNodes.indexOf(node) + (type === 'n' ? 1 : -1)] || null;\n}\nfunction removeNode(node) {\n const { parentNode } = node;\n if (parentNode) {\n const { childNodes } = parentNode;\n const index = childNodes.indexOf(node);\n if (index > -1) {\n node.parentNode = null;\n childNodes.splice(index, 1);\n }\n }\n}\nfunction checkNodeId(node) {\n if (!node.nodeId && node.pageNode) {\n node.nodeId = node.pageNode.genId();\n }\n}\n// 为优化性能,各平台不使用proxy来实现node的操作拦截,而是直接通过pageNode定制\nclass UniNode extends UniEventTarget {\n constructor(nodeType, nodeName, container) {\n super();\n this.pageNode = null;\n this.parentNode = null;\n this._text = null;\n if (container) {\n const { pageNode } = container;\n if (pageNode) {\n this.pageNode = pageNode;\n this.nodeId = pageNode.genId();\n !pageNode.isUnmounted && pageNode.onCreate(this, nodeName);\n }\n }\n this.nodeType = nodeType;\n this.nodeName = nodeName;\n this.childNodes = [];\n }\n get firstChild() {\n return this.childNodes[0] || null;\n }\n get lastChild() {\n const { childNodes } = this;\n const length = childNodes.length;\n return length ? childNodes[length - 1] : null;\n }\n get nextSibling() {\n return sibling(this, 'n');\n }\n get nodeValue() {\n return null;\n }\n set nodeValue(_val) { }\n get textContent() {\n return this._text || '';\n }\n set textContent(text) {\n this._text = text;\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onTextContent(this, text);\n }\n }\n get parentElement() {\n const { parentNode } = this;\n if (parentNode && parentNode.nodeType === NODE_TYPE_ELEMENT) {\n return parentNode;\n }\n return null;\n }\n get previousSibling() {\n return sibling(this, 'p');\n }\n appendChild(newChild) {\n return this.insertBefore(newChild, null);\n }\n cloneNode(deep) {\n const cloned = extend(Object.create(Object.getPrototypeOf(this)), this);\n const { attributes } = cloned;\n if (attributes) {\n cloned.attributes = extend({}, attributes);\n }\n if (deep) {\n cloned.childNodes = cloned.childNodes.map((childNode) => childNode.cloneNode(true));\n }\n return cloned;\n }\n insertBefore(newChild, refChild) {\n // 先从现在的父节点移除(注意:不能触发onRemoveChild,否则会生成先remove该 id,再 insert)\n removeNode(newChild);\n newChild.pageNode = this.pageNode;\n newChild.parentNode = this;\n checkNodeId(newChild);\n const { childNodes } = this;\n if (refChild) {\n const index = childNodes.indexOf(refChild);\n if (index === -1) {\n throw new DOMException(`Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.`);\n }\n childNodes.splice(index, 0, newChild);\n }\n else {\n childNodes.push(newChild);\n }\n return this.pageNode && !this.pageNode.isUnmounted\n ? this.pageNode.onInsertBefore(this, newChild, refChild)\n : newChild;\n }\n removeChild(oldChild) {\n const { childNodes } = this;\n const index = childNodes.indexOf(oldChild);\n if (index === -1) {\n throw new DOMException(`Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.`);\n }\n oldChild.parentNode = null;\n childNodes.splice(index, 1);\n return this.pageNode && !this.pageNode.isUnmounted\n ? this.pageNode.onRemoveChild(oldChild)\n : oldChild;\n }\n}\nconst ATTR_CLASS = 'class';\nconst ATTR_STYLE = 'style';\nconst ATTR_INNER_HTML = 'innerHTML';\nconst ATTR_TEXT_CONTENT = 'textContent';\nconst ATTR_V_SHOW = '.vShow';\nconst ATTR_V_OWNER_ID = '.vOwnerId';\nconst ATTR_V_RENDERJS = '.vRenderjs';\nconst ATTR_CHANGE_PREFIX = 'change:';\nclass UniBaseNode extends UniNode {\n constructor(nodeType, nodeName, container) {\n super(nodeType, nodeName, container);\n this.attributes = Object.create(null);\n this.style = null;\n this.vShow = null;\n this._html = null;\n }\n get className() {\n return (this.attributes[ATTR_CLASS] || '');\n }\n set className(val) {\n this.setAttribute(ATTR_CLASS, val);\n }\n get innerHTML() {\n return '';\n }\n set innerHTML(html) {\n this._html = html;\n }\n addEventListener(type, listener, options) {\n super.addEventListener(type, listener, options);\n if (this.pageNode && !this.pageNode.isUnmounted) {\n if (listener.wxsEvent) {\n this.pageNode.onAddWxsEvent(this, normalizeEventType(type, options), listener.wxsEvent, encodeModifier(listener.modifiers || []));\n }\n else {\n this.pageNode.onAddEvent(this, normalizeEventType(type, options), encodeModifier(listener.modifiers || []));\n }\n }\n }\n removeEventListener(type, callback, options) {\n super.removeEventListener(type, callback, options);\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onRemoveEvent(this, normalizeEventType(type, options));\n }\n }\n getAttribute(qualifiedName) {\n if (qualifiedName === ATTR_STYLE) {\n return this.style;\n }\n return this.attributes[qualifiedName];\n }\n removeAttribute(qualifiedName) {\n if (qualifiedName == ATTR_STYLE) {\n this.style = null;\n }\n else {\n delete this.attributes[qualifiedName];\n }\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onRemoveAttribute(this, qualifiedName);\n }\n }\n setAttribute(qualifiedName, value) {\n if (qualifiedName === ATTR_STYLE) {\n this.style = value;\n }\n else {\n this.attributes[qualifiedName] = value;\n }\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onSetAttribute(this, qualifiedName, value);\n }\n }\n toJSON({ attr, normalize, } = {}) {\n const { attributes, style, listeners, _text } = this;\n const res = {};\n if (Object.keys(attributes).length) {\n res.a = normalize ? normalize(attributes) : attributes;\n }\n const events = Object.keys(listeners);\n if (events.length) {\n let w = undefined;\n const e = {};\n events.forEach((name) => {\n const handlers = listeners[name];\n if (handlers.length) {\n // 可能存在多个 handler 且不同 modifiers 吗?\n const { wxsEvent, modifiers } = handlers[0];\n const modifier = encodeModifier(modifiers || []);\n if (!wxsEvent) {\n e[name] = modifier;\n }\n else {\n if (!w) {\n w = {};\n }\n w[name] = [normalize ? normalize(wxsEvent) : wxsEvent, modifier];\n }\n }\n });\n res.e = normalize ? normalize(e, false) : e;\n if (w) {\n res.w = normalize ? normalize(w, false) : w;\n }\n }\n if (style !== null) {\n res.s = normalize ? normalize(style) : style;\n }\n if (!attr) {\n res.i = this.nodeId;\n res.n = this.nodeName;\n }\n if (_text !== null) {\n res.t = normalize ? normalize(_text) : _text;\n }\n return res;\n }\n}\n\nclass UniCommentNode extends UniNode {\n constructor(text, container) {\n super(NODE_TYPE_COMMENT, '#comment', container);\n this._text = (process.env.NODE_ENV !== 'production') ? text : '';\n }\n toJSON(opts = {}) {\n // 暂时不传递 text 到 view 层,没啥意义,节省点数据量\n return opts.attr\n ? {}\n : {\n i: this.nodeId,\n };\n // return opts.attr\n // ? { t: this._text as string }\n // : {\n // i: this.nodeId!,\n // t: this._text as string,\n // }\n }\n}\n\nclass UniElement extends UniBaseNode {\n constructor(nodeName, container) {\n super(NODE_TYPE_ELEMENT, nodeName.toUpperCase(), container);\n this.tagName = this.nodeName;\n }\n}\nclass UniInputElement extends UniElement {\n get value() {\n return this.getAttribute('value');\n }\n set value(val) {\n this.setAttribute('value', val);\n }\n}\nclass UniTextAreaElement extends UniInputElement {\n}\n\nclass UniTextNode extends UniBaseNode {\n constructor(text, container) {\n super(NODE_TYPE_TEXT, '#text', container);\n this._text = text;\n }\n get nodeValue() {\n return this._text || '';\n }\n set nodeValue(text) {\n this._text = text;\n if (this.pageNode && !this.pageNode.isUnmounted) {\n this.pageNode.onNodeValue(this, text);\n }\n }\n}\n\nconst forcePatchProps = {\n AD: ['data'],\n 'AD-DRAW': ['data'],\n 'LIVE-PLAYER': ['picture-in-picture-mode'],\n MAP: [\n 'markers',\n 'polyline',\n 'circles',\n 'controls',\n 'include-points',\n 'polygons',\n ],\n PICKER: ['range', 'value'],\n 'PICKER-VIEW': ['value'],\n 'RICH-TEXT': ['nodes'],\n VIDEO: ['danmu-list', 'header'],\n 'WEB-VIEW': ['webview-styles'],\n};\nconst forcePatchPropKeys = ['animation'];\n\nconst forcePatchProp = (el, key) => {\n if (forcePatchPropKeys.indexOf(key) > -1) {\n return true;\n }\n const keys = forcePatchProps[el.nodeName];\n if (keys && keys.indexOf(key) > -1) {\n return true;\n }\n return false;\n};\n\nconst ACTION_TYPE_PAGE_CREATE = 1;\nconst ACTION_TYPE_PAGE_CREATED = 2;\nconst ACTION_TYPE_CREATE = 3;\nconst ACTION_TYPE_INSERT = 4;\nconst ACTION_TYPE_REMOVE = 5;\nconst ACTION_TYPE_SET_ATTRIBUTE = 6;\nconst ACTION_TYPE_REMOVE_ATTRIBUTE = 7;\nconst ACTION_TYPE_ADD_EVENT = 8;\nconst ACTION_TYPE_REMOVE_EVENT = 9;\nconst ACTION_TYPE_SET_TEXT = 10;\nconst ACTION_TYPE_ADD_WXS_EVENT = 12;\nconst ACTION_TYPE_PAGE_SCROLL = 15;\nconst ACTION_TYPE_EVENT = 20;\n\n/**\n * 需要手动传入 timer,主要是解决 App 平台的定制 timer\n */\nfunction debounce(fn, delay, { clearTimeout, setTimeout }) {\n let timeout;\n const newFn = function () {\n clearTimeout(timeout);\n const timerFn = () => fn.apply(this, arguments);\n timeout = setTimeout(timerFn, delay);\n };\n newFn.cancel = function () {\n clearTimeout(timeout);\n };\n return newFn;\n}\n\nclass EventChannel {\n constructor(id, events) {\n this.id = id;\n this.listener = {};\n this.emitCache = [];\n if (events) {\n Object.keys(events).forEach((name) => {\n this.on(name, events[name]);\n });\n }\n }\n emit(eventName, ...args) {\n const fns = this.listener[eventName];\n if (!fns) {\n return this.emitCache.push({\n eventName,\n args,\n });\n }\n fns.forEach((opt) => {\n opt.fn.apply(opt.fn, args);\n });\n this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');\n }\n on(eventName, fn) {\n this._addListener(eventName, 'on', fn);\n this._clearCache(eventName);\n }\n once(eventName, fn) {\n this._addListener(eventName, 'once', fn);\n this._clearCache(eventName);\n }\n off(eventName, fn) {\n const fns = this.listener[eventName];\n if (!fns) {\n return;\n }\n if (fn) {\n for (let i = 0; i < fns.length;) {\n if (fns[i].fn === fn) {\n fns.splice(i, 1);\n i--;\n }\n i++;\n }\n }\n else {\n delete this.listener[eventName];\n }\n }\n _clearCache(eventName) {\n for (let index = 0; index < this.emitCache.length; index++) {\n const cache = this.emitCache[index];\n const _name = eventName\n ? cache.eventName === eventName\n ? eventName\n : null\n : cache.eventName;\n if (!_name)\n continue;\n const location = this.emit.apply(this, [_name, ...cache.args]);\n if (typeof location === 'number') {\n this.emitCache.pop();\n continue;\n }\n this.emitCache.splice(index, 1);\n index--;\n }\n }\n _addListener(eventName, type, fn) {\n (this.listener[eventName] || (this.listener[eventName] = [])).push({\n fn,\n type,\n });\n }\n}\n\nconst PAGE_HOOKS = [\n ON_INIT,\n ON_LOAD,\n ON_SHOW,\n ON_HIDE,\n ON_UNLOAD,\n ON_BACK_PRESS,\n ON_PAGE_SCROLL,\n ON_TAB_ITEM_TAP,\n ON_REACH_BOTTOM,\n ON_PULL_DOWN_REFRESH,\n ON_SHARE_TIMELINE,\n ON_SHARE_APP_MESSAGE,\n ON_SHARE_CHAT,\n ON_ADD_TO_FAVORITES,\n ON_SAVE_EXIT_STATE,\n ON_NAVIGATION_BAR_BUTTON_TAP,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED,\n];\nfunction isRootImmediateHook(name) {\n const PAGE_SYNC_HOOKS = [ON_LOAD, ON_SHOW];\n return PAGE_SYNC_HOOKS.indexOf(name) > -1;\n}\n// isRootImmediateHookX deprecated\nfunction isRootHook(name) {\n return PAGE_HOOKS.indexOf(name) > -1;\n}\nconst UniLifecycleHooks = [\n ON_SHOW,\n ON_HIDE,\n ON_LAUNCH,\n ON_ERROR,\n ON_THEME_CHANGE,\n ON_PAGE_NOT_FOUND,\n ON_UNHANDLE_REJECTION,\n ON_EXIT,\n ON_INIT,\n ON_LOAD,\n ON_READY,\n ON_UNLOAD,\n ON_RESIZE,\n ON_BACK_PRESS,\n ON_PAGE_SCROLL,\n ON_TAB_ITEM_TAP,\n ON_REACH_BOTTOM,\n ON_PULL_DOWN_REFRESH,\n ON_SHARE_TIMELINE,\n ON_ADD_TO_FAVORITES,\n ON_SHARE_APP_MESSAGE,\n ON_SHARE_CHAT,\n ON_SAVE_EXIT_STATE,\n ON_NAVIGATION_BAR_BUTTON_TAP,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,\n ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED,\n];\nconst MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {\n return {\n onPageScroll: 1,\n onShareAppMessage: 1 << 1,\n onShareTimeline: 1 << 2,\n };\n})();\nfunction isUniLifecycleHook(name, value, checkType = true) {\n // 检查类型\n if (checkType && !isFunction(value)) {\n return false;\n }\n if (UniLifecycleHooks.indexOf(name) > -1) {\n // 已预定义\n return true;\n }\n else if (name.indexOf('on') === 0) {\n // 以 on 开头\n return true;\n }\n return false;\n}\n\nlet vueApp;\nconst createVueAppHooks = [];\n/**\n * 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑\n */\nfunction onCreateVueApp(hook) {\n // TODO 每个 nvue 页面都会触发\n if (vueApp) {\n return hook(vueApp);\n }\n createVueAppHooks.push(hook);\n}\nfunction invokeCreateVueAppHook(app) {\n vueApp = app;\n createVueAppHooks.forEach((hook) => hook(app));\n}\nconst invokeCreateErrorHandler = once((app, createErrorHandler) => {\n // 不再判断开发者是否监听了onError,直接返回 createErrorHandler,内部 errorHandler 会调用开发者自定义的 errorHandler,以及判断开发者是否监听了onError\n return createErrorHandler(app);\n});\n\nconst E = function () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n};\nE.prototype = {\n _id: 1,\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx,\n _id: this._id,\n });\n return this._id++;\n },\n once: function (name, callback, ctx) {\n var self = this;\n function listener() {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n }\n listener._ = callback;\n return this.on(name, listener, ctx);\n },\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n return this;\n },\n off: function (name, event) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n if (evts && event) {\n for (var i = evts.length - 1; i >= 0; i--) {\n if (evts[i].fn === event ||\n evts[i].fn._ === event ||\n evts[i]._id === event) {\n evts.splice(i, 1);\n break;\n }\n }\n liveEvents = evts;\n }\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n liveEvents.length ? (e[name] = liveEvents) : delete e[name];\n return this;\n },\n};\nvar E$1 = E;\n\nconst borderStyles = {\n black: 'rgba(0,0,0,0.4)',\n white: 'rgba(255,255,255,0.4)',\n};\nfunction normalizeTabBarStyles(borderStyle) {\n if (borderStyle && borderStyle in borderStyles) {\n return borderStyles[borderStyle];\n }\n return borderStyle;\n}\nfunction normalizeTitleColor(titleColor) {\n return titleColor === 'black' ? '#000000' : '#ffffff';\n}\nfunction resolveStringStyleItem(modeStyle, styleItem, key) {\n if (isString(styleItem) && styleItem.startsWith('@')) {\n const _key = styleItem.replace('@', '');\n let _styleItem = modeStyle[_key] || styleItem;\n switch (key) {\n case 'titleColor':\n _styleItem = normalizeTitleColor(_styleItem);\n break;\n case 'borderStyle':\n _styleItem = normalizeTabBarStyles(_styleItem);\n break;\n }\n return _styleItem;\n }\n return styleItem;\n}\nfunction normalizeStyles(pageStyle, themeConfig = {}, mode = 'light') {\n const modeStyle = themeConfig[mode];\n const styles = {};\n if (typeof modeStyle === 'undefined' || !pageStyle)\n return pageStyle;\n Object.keys(pageStyle).forEach((key) => {\n const styleItem = pageStyle[key]; // Object Array String\n const parseStyleItem = () => {\n if (isPlainObject(styleItem))\n return normalizeStyles(styleItem, themeConfig, mode);\n if (isArray(styleItem))\n return styleItem.map((item) => {\n if (isPlainObject(item))\n return normalizeStyles(item, themeConfig, mode);\n return resolveStringStyleItem(modeStyle, item);\n });\n return resolveStringStyleItem(modeStyle, styleItem, key);\n };\n styles[key] = parseStyleItem();\n });\n return styles;\n}\n\nfunction getEnvLocale() {\n const { env } = process;\n const lang = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE;\n return (lang && lang.replace(/[.:].*/, '')) || 'en';\n}\n\nconst isStringIntegerKey = (key) => typeof key === 'string' &&\n key !== 'NaN' &&\n key[0] !== '-' &&\n '' + parseInt(key, 10) === key;\nconst isNumberIntegerKey = (key) => typeof key === 'number' &&\n !isNaN(key) &&\n key >= 0 &&\n parseInt(key + '', 10) === key;\n/**\n * 用于替代@vue/shared的isIntegerKey,原始方法在鸿蒙arkts中会引发bug。根本原因是arkts的数组的key是数字而不是字符串。\n * 目前这个方法使用的地方都和数组有关,切记不能挪作他用。\n * @param key\n * @returns\n */\nconst isIntegerKey = (key) => isNumberIntegerKey(key) || isStringIntegerKey(key);\n\nexport { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_EVENT, ACTION_TYPE_CREATE, ACTION_TYPE_EVENT, ACTION_TYPE_INSERT, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_REMOVE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ATTR_CHANGE_PREFIX, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, BUILT_IN_TAG_NAMES, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, E$1 as Emitter, EventChannel, EventModifierFlags, I18N_JSON_DELIMITERS, JSON_PROTOCOL, LINEFEED, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, NVUE_BUILT_IN_TAGS, NVUE_U_BUILT_IN_TAGS, OFF_HOST_THEME_CHANGE, OFF_THEME_CHANGE, ON_ADD_TO_FAVORITES, ON_APP_ENTER_BACKGROUND, ON_APP_ENTER_FOREGROUND, ON_BACK_PRESS, ON_ERROR, ON_EXIT, ON_HIDE, ON_HOST_THEME_CHANGE, ON_INIT, ON_KEYBOARD_HEIGHT_CHANGE, ON_LAUNCH, ON_LOAD, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_CHANGE, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_PAGE_NOT_FOUND, ON_PAGE_SCROLL, ON_PULL_DOWN_REFRESH, ON_REACH_BOTTOM, ON_REACH_BOTTOM_DISTANCE, ON_READY, ON_RESIZE, ON_SAVE_EXIT_STATE, ON_SHARE_APP_MESSAGE, ON_SHARE_CHAT, ON_SHARE_TIMELINE, ON_SHOW, ON_TAB_ITEM_TAP, ON_THEME_CHANGE, ON_UNHANDLE_REJECTION, ON_UNLOAD, ON_WEB_INVOKE_APP_SERVICE, ON_WXS_INVOKE_CALL_METHOD, PLUS_RE, PRIMARY_COLOR, RENDERJS_MODULES, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, SLOT_DEFAULT_NAME, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UNI_STORAGE_LOCALE, UNI_UI_CONFLICT_TAGS, UVUE_BUILT_IN_TAGS, UVUE_HARMONY_BUILT_IN_TAGS, UVUE_IOS_BUILT_IN_TAGS, UVUE_WEB_BUILT_IN_TAGS, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniLifecycleHooks, UniNode, UniTextAreaElement, UniTextNode, VIRTUAL_HOST_CLASS, VIRTUAL_HOST_HIDDEN, VIRTUAL_HOST_ID, VIRTUAL_HOST_STYLE, WEB_INVOKE_APPSERVICE, WXS_MODULES, WXS_PROTOCOL, addFont, addLeadingSlash, borderStyles, cache, cacheStringFunction, callOptions, createIsCustomElement, createRpx2Unit, createUniEvent, customizeEvent, debounce, decode, decodedQuery, defaultMiniProgramRpx2Unit, defaultNVueRpx2Unit, defaultRpx2Unit, dynamicSlotName, forcePatchProp, formatDateTime, formatLog, getCustomDataset, getEnvLocale, getGlobal, getLen, getValueByDataPath, initCustomDatasetOnce, invokeArrayFns, invokeCreateErrorHandler, invokeCreateVueAppHook, isAppHarmonyUVueNativeTag, isAppIOSUVueNativeTag, isAppNVueNativeTag, isAppNativeTag, isAppUVueBuiltInEasyComponent, isAppUVueNativeTag, isAppVoidTag, isBuiltInComponent, isComponentInternalInstance, isComponentTag, isH5CustomElement, isH5NativeTag, isIntegerKey, isMiniProgramNativeTag, isMiniProgramUVueNativeTag, isRootHook, isRootImmediateHook, isUniLifecycleHook, isUniXElement, normalizeClass, normalizeDataset, normalizeEventType, normalizeProps, normalizeStyle, normalizeStyles, normalizeTabBarStyles, normalizeTarget, normalizeTitleColor, onCreateVueApp, once, parseEventName, parseNVueDataset, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, resolveComponentInstance, resolveOwnerEl, resolveOwnerVm, sanitise, scrollTo, sortObject, stringifyQuery, updateElementStyle };\n","import { isRootHook, getValueByDataPath, isUniLifecycleHook, ON_ERROR, UniLifecycleHooks, invokeCreateErrorHandler, dynamicSlotName } from '@dcloudio/uni-shared';\nimport { NOOP, extend, isSymbol, isObject, def, hasChanged, isFunction, isArray, isPromise, camelize, capitalize, EMPTY_OBJ, remove, toHandlerKey, hasOwn, hyphenate, isReservedProp, toRawType, isString, normalizeClass, normalizeStyle, isOn, toTypeString, isMap, isIntegerKey, isSet, isPlainObject, makeMap, invokeArrayFns, isBuiltInDirective, looseToNumber, NO, EMPTY_ARR, isModelListener, toNumber, toDisplayString } from '@vue/shared';\nexport { EMPTY_OBJ, camelize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\n/**\n* @dcloudio/uni-mp-vue v3.4.21\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n\nfunction warn$2(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeEffect;\nclass ReactiveEffect {\n constructor(fn, trigger, scheduler, scope) {\n this.fn = fn;\n this.trigger = trigger;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n /**\n * @internal\n */\n this._dirtyLevel = 4;\n /**\n * @internal\n */\n this._trackId = 0;\n /**\n * @internal\n */\n this._runnings = 0;\n /**\n * @internal\n */\n this._shouldSchedule = false;\n /**\n * @internal\n */\n this._depsLength = 0;\n recordEffectScope(this, scope);\n }\n get dirty() {\n if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {\n this._dirtyLevel = 1;\n pauseTracking();\n for (let i = 0; i < this._depsLength; i++) {\n const dep = this.deps[i];\n if (dep.computed) {\n triggerComputed(dep.computed);\n if (this._dirtyLevel >= 4) {\n break;\n }\n }\n }\n if (this._dirtyLevel === 1) {\n this._dirtyLevel = 0;\n }\n resetTracking();\n }\n return this._dirtyLevel >= 4;\n }\n set dirty(v) {\n this._dirtyLevel = v ? 4 : 0;\n }\n run() {\n this._dirtyLevel = 0;\n if (!this.active) {\n return this.fn();\n }\n let lastShouldTrack = shouldTrack;\n let lastEffect = activeEffect;\n try {\n shouldTrack = true;\n activeEffect = this;\n this._runnings++;\n preCleanupEffect(this);\n return this.fn();\n } finally {\n postCleanupEffect(this);\n this._runnings--;\n activeEffect = lastEffect;\n shouldTrack = lastShouldTrack;\n }\n }\n stop() {\n var _a;\n if (this.active) {\n preCleanupEffect(this);\n postCleanupEffect(this);\n (_a = this.onStop) == null ? void 0 : _a.call(this);\n this.active = false;\n }\n }\n}\nfunction triggerComputed(computed) {\n return computed.value;\n}\nfunction preCleanupEffect(effect2) {\n effect2._trackId++;\n effect2._depsLength = 0;\n}\nfunction postCleanupEffect(effect2) {\n if (effect2.deps.length > effect2._depsLength) {\n for (let i = effect2._depsLength; i < effect2.deps.length; i++) {\n cleanupDepEffect(effect2.deps[i], effect2);\n }\n effect2.deps.length = effect2._depsLength;\n }\n}\nfunction cleanupDepEffect(dep, effect2) {\n const trackId = dep.get(effect2);\n if (trackId !== void 0 && effect2._trackId !== trackId) {\n dep.delete(effect2);\n if (dep.size === 0) {\n dep.cleanup();\n }\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn, NOOP, () => {\n if (_effect.dirty) {\n _effect.run();\n }\n });\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nlet pauseScheduleStack = 0;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction pauseScheduling() {\n pauseScheduleStack++;\n}\nfunction resetScheduling() {\n pauseScheduleStack--;\n while (!pauseScheduleStack && queueEffectSchedulers.length) {\n queueEffectSchedulers.shift()();\n }\n}\nfunction trackEffect(effect2, dep, debuggerEventExtraInfo) {\n var _a;\n if (dep.get(effect2) !== effect2._trackId) {\n dep.set(effect2, effect2._trackId);\n const oldDep = effect2.deps[effect2._depsLength];\n if (oldDep !== dep) {\n if (oldDep) {\n cleanupDepEffect(oldDep, effect2);\n }\n effect2.deps[effect2._depsLength++] = dep;\n } else {\n effect2._depsLength++;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n }\n}\nconst queueEffectSchedulers = [];\nfunction triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {\n var _a;\n pauseScheduling();\n for (const effect2 of dep.keys()) {\n let tracking;\n if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);\n effect2._dirtyLevel = dirtyLevel;\n }\n if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n effect2.trigger();\n if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {\n effect2._shouldSchedule = false;\n if (effect2.scheduler) {\n queueEffectSchedulers.push(effect2.scheduler);\n }\n }\n }\n }\n resetScheduling();\n}\n\nconst createDep = (cleanup, computed) => {\n const dep = /* @__PURE__ */ new Map();\n dep.cleanup = cleanup;\n dep.computed = computed;\n return dep;\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep(() => depsMap.delete(key)));\n }\n trackEffect(\n activeEffect,\n dep,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key\n } : void 0\n );\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n pauseScheduling();\n for (const dep of deps) {\n if (dep) {\n triggerEffects(\n dep,\n 4,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n } : void 0\n );\n }\n }\n resetScheduling();\n}\nfunction getDepFromReactive(object, key) {\n var _a;\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n pauseScheduling();\n const res = toRaw(this)[key].apply(this, args);\n resetScheduling();\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _isShallow = false) {\n this._isReadonly = _isReadonly;\n this._isShallow = _isShallow;\n }\n get(target, key, receiver) {\n const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return isShallow2;\n } else if (key === \"__v_raw\") {\n if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n // this means the reciever is a user proxy of the reactive proxy\n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n return target;\n }\n return;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (isShallow2) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(false, isShallow2);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (!this._isShallow) {\n const isOldValueReadonly = isReadonly(oldValue);\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n if (isOldValueReadonly) {\n return false;\n } else {\n oldValue.value = value;\n return true;\n }\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(true, isShallow2);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\n true\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set$1(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n warn$2(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(method, false, false);\n readonlyInstrumentations2[method] = createIterableMethod(method, true, false);\n shallowInstrumentations2[method] = createIterableMethod(method, false, true);\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n warn$2(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$2(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n if (Object.isExtensible(value)) {\n def(value, \"__v_skip\", true);\n }\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nconst COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this.getter = getter;\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this.effect = new ReactiveEffect(\n () => getter(this._value),\n () => triggerRefValue(\n this,\n this.effect._dirtyLevel === 2 ? 2 : 3\n )\n );\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {\n triggerRefValue(self, 4);\n }\n trackRefValue(self);\n if (self.effect._dirtyLevel >= 2) {\n if (!!(process.env.NODE_ENV !== \"production\") && this._warnRecursive) {\n warn$2(COMPUTED_SIDE_EFFECT_WARN, `\n\ngetter: `, this.getter);\n }\n triggerRefValue(self, 2);\n }\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x\n get _dirty() {\n return this.effect.dirty;\n }\n set _dirty(v) {\n this.effect.dirty = v;\n }\n // #endregion\n}\nfunction computed$1(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n warn$2(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nfunction trackRefValue(ref2) {\n var _a;\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n trackEffect(\n activeEffect,\n (_a = ref2.dep) != null ? _a : ref2.dep = createDep(\n () => ref2.dep = void 0,\n ref2 instanceof ComputedRefImpl ? ref2 : void 0\n ),\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"get\",\n key: \"value\"\n } : void 0\n );\n }\n}\nfunction triggerRefValue(ref2, dirtyLevel = 4, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n triggerEffects(\n dep,\n dirtyLevel,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n } : void 0\n );\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, 4, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n warn$2(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn$1(msg, ...args) {\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.map((a) => {\n var _a, _b;\n return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\n }).join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\n\nconst ErrorTypeStrings = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n try {\n return args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings[type] || type : `https://vuejs.org/error-reference/#runtime-${type}`;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings[type] || type;\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n console.error(err);\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick$1(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.pre) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction hasQueueJob(job) {\n return queue.indexOf(job) > -1;\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)].sort(\n (a, b) => getId(a) - getId(b)\n );\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n handleError(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n null,\n 10\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet devtools;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools) {\n devtools.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook(hook, target) {\n var _a, _b;\n devtools = hook;\n if (devtools) {\n devtools.enabled = true;\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook(newHook, target);\n });\n setTimeout(() => {\n if (!devtools) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools && typeof devtools.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n // fixed by xxxxxx\n // 为 0 是 App,无 parent 是 Page 指向 App\n component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn$1(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn$1(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn$1(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\n event\n )}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nfunction markAttrsAccessed() {\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n {\n const ctx = inject(ssrContextKey);\n if (!ctx) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\n );\n }\n return ctx;\n }\n};\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn$1(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, {\n immediate,\n deep,\n flush,\n once,\n onTrack,\n onTrigger\n} = EMPTY_OBJ) {\n if (cb && once) {\n const _cb = cb;\n cb = (...args) => {\n _cb(...args);\n unwatch();\n };\n }\n if (!!(process.env.NODE_ENV !== \"production\") && deep !== void 0 && typeof deep === \"number\") {\n warn$1(\n `watch() \"deep\" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`\n );\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn$1(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn$1(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (once !== void 0) {\n warn$1(\n `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn$1(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = currentInstance;\n const reactiveGetter = (source2) => deep === true ? source2 : (\n // for deep: false, only traverse root-level properties\n traverse(source2, deep === false ? 1 : void 0)\n );\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow(source);\n } else if (isReactive(source)) {\n getter = () => reactiveGetter(source);\n forceTrigger = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return reactiveGetter(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n cleanup = effect.onStop = void 0;\n };\n };\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active || !effect.dirty) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect$1(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, NOOP, scheduler);\n const scope = getCurrentScope();\n const unwatch = () => {\n effect.stop();\n if (scope) {\n remove(scope.effects, effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect$1(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const reset = setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n reset();\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, depth, currentDepth = 0, seen) {\n if (!isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n if (depth && depth > 0) {\n if (currentDepth >= depth) {\n return value;\n }\n currentDepth++;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n if (isRef(value)) {\n traverse(value.value, depth, currentDepth, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], depth, currentDepth, seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, depth, currentDepth, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], depth, currentDepth, seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n if (currentRenderingInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\n\nfunction createAppContext() {\n return {\n app: null,\n config: {\n isNativeTag: NO,\n performance: false,\n globalProperties: {},\n optionMergeStrategies: {},\n errorHandler: void 0,\n warnHandler: void 0,\n compilerOptions: {}\n },\n mixins: [],\n components: {},\n directives: {},\n provides: /* @__PURE__ */ Object.create(null),\n optionsCache: /* @__PURE__ */ new WeakMap(),\n propsCache: /* @__PURE__ */ new WeakMap(),\n emitsCache: /* @__PURE__ */ new WeakMap()\n };\n}\nlet uid$1 = 0;\nfunction createAppAPI(render, hydrate) {\n return function createApp(rootComponent, rootProps = null) {\n if (!isFunction(rootComponent)) {\n rootComponent = extend({}, rootComponent);\n }\n if (rootProps != null && !isObject(rootProps)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`root props passed to app.mount() must be an object.`);\n rootProps = null;\n }\n const context = createAppContext();\n const installedPlugins = /* @__PURE__ */ new WeakSet();\n const app = context.app = {\n _uid: uid$1++,\n _component: rootComponent,\n _props: rootProps,\n _container: null,\n _context: context,\n _instance: null,\n version,\n get config() {\n return context.config;\n },\n set config(v) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `app.config cannot be replaced. Modify individual options instead.`\n );\n }\n },\n use(plugin, ...options) {\n if (installedPlugins.has(plugin)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`Plugin has already been applied to target app.`);\n } else if (plugin && isFunction(plugin.install)) {\n installedPlugins.add(plugin);\n plugin.install(app, ...options);\n } else if (isFunction(plugin)) {\n installedPlugins.add(plugin);\n plugin(app, ...options);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `A plugin must either be a function or an object with an \"install\" function.`\n );\n }\n return app;\n },\n mixin(mixin) {\n if (__VUE_OPTIONS_API__) {\n if (!context.mixins.includes(mixin)) {\n context.mixins.push(mixin);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n \"Mixin has already been applied to target app\" + (mixin.name ? `: ${mixin.name}` : \"\")\n );\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Mixins are only available in builds supporting Options API\");\n }\n return app;\n },\n component(name, component) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateComponentName(name, context.config);\n }\n if (!component) {\n return context.components[name];\n }\n if (!!(process.env.NODE_ENV !== \"production\") && context.components[name]) {\n warn$1(`Component \"${name}\" has already been registered in target app.`);\n }\n context.components[name] = component;\n return app;\n },\n directive(name, directive) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateDirectiveName(name);\n }\n if (!directive) {\n return context.directives[name];\n }\n if (!!(process.env.NODE_ENV !== \"production\") && context.directives[name]) {\n warn$1(`Directive \"${name}\" has already been registered in target app.`);\n }\n context.directives[name] = directive;\n return app;\n },\n // fixed by xxxxxx\n mount() {\n },\n // fixed by xxxxxx\n unmount() {\n },\n provide(key, value) {\n if (!!(process.env.NODE_ENV !== \"production\") && key in context.provides) {\n warn$1(\n `App already provides property with key \"${String(key)}\". It will be overwritten with the new value.`\n );\n }\n context.provides[key] = value;\n return app;\n },\n runWithContext(fn) {\n const lastApp = currentApp;\n currentApp = app;\n try {\n return fn();\n } finally {\n currentApp = lastApp;\n }\n }\n };\n return app;\n };\n}\nlet currentApp = null;\n\nfunction provide(key, value) {\n if (!currentInstance) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`provide() can only be used inside setup().`);\n }\n } else {\n let provides = currentInstance.provides;\n const parentProvides = currentInstance.parent && currentInstance.parent.provides;\n if (parentProvides === provides) {\n provides = currentInstance.provides = Object.create(parentProvides);\n }\n provides[key] = value;\n if (currentInstance.type.mpType === \"app\") {\n currentInstance.appContext.app.provide(key, value);\n }\n }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n const instance = currentInstance || currentRenderingInstance;\n if (instance || currentApp) {\n const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;\n if (provides && key in provides) {\n return provides[key];\n } else if (arguments.length > 1) {\n return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`injection \"${String(key)}\" not found.`);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`inject() can only be used inside setup() or functional components.`);\n }\n}\nfunction hasInjectionContext() {\n return !!(currentInstance || currentRenderingInstance || currentApp);\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n if (isRootHook(type)) {\n target = target.root;\n }\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n const reset = setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n reset();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(\n (ErrorTypeStrings[type] || type.replace(/^on/, \"\")).replace(/ hook$/, \"\")\n );\n warn$1(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (``)\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn$1(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的\n // $el: i => i.vnode.el,\n $el: (i) => i.__$el || (i.__$el = {}),\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => {\n i.effect.dirty = true;\n queueJob(i.update);\n }),\n // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance, \"get\", key);\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn$1(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn$1(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn$1(`Cannot mutate \r\n\r\n ","import Component from 'D:/uni-fans-score/components/MapComponent.vue'\nwx.createComponent(Component)"],"names":["ref","nextTick","uni","computed","watch","onMounted","onUnmounted"],"mappings":"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"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/constants/help.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/constants/help.js.map index 74d0599..d3f6c55 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/constants/help.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/constants/help.js.map @@ -1 +1 @@ -{"version":3,"file":"help.js","sources":["constants/help.js"],"sourcesContent":["// 帮助中心文案配置\r\nexport const HELP_CONTENT = {\r\n // FAQ列表\r\n FAQ_LIST: [\r\n {\r\n question: '如何租借风扇?',\r\n answer: '点击首页\"扫码租借\"按钮,使用微信扫描设备上的二维码,按提示完成支付即可使用。'\r\n },\r\n {\r\n question: '收费标准是怎样的?',\r\n answer: '使用费用为2元/小时,不足1小时按1小时计算。押金99元,归还后自动退还。'\r\n },\r\n {\r\n question: '如何归还风扇?',\r\n answer: '将风扇带到任意归还点,点击首页\"扫码归还\"按钮,扫描归还点二维码即可完成归还。'\r\n },\r\n {\r\n question: '押金多久能退还?',\r\n answer: '归还设备后押金将自动发起退款,预计0-7个工作日到账。'\r\n },\r\n {\r\n question: '设备无法正常使用怎么办?',\r\n answer: '您可以通过\"我的-投诉与建议\"提交故障反馈,或直接拨打客服电话处理。'\r\n }\r\n ],\r\n\r\n // 联系方式\r\n CONTACT: {\r\n TITLE: '联系客服',\r\n PHONE: {\r\n LABEL: '客服电话',\r\n VALUE: '400-888-8888'\r\n },\r\n SERVICE_TIME: {\r\n LABEL: '服务时间',\r\n VALUE: '周一至周日 09:00-22:00'\r\n }\r\n }\r\n} "],"names":[],"mappings":";AACY,MAAC,eAAe;AAAA;AAAA,EAE1B,UAAU;AAAA,IACR;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,EACF;AAAA;AAAA,EAGD,SAAS;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACD,cAAc;AAAA,MACZ,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,EACF;AACH;;"} \ No newline at end of file +{"version":3,"file":"help.js","sources":["constants/help.js"],"sourcesContent":["// 帮助中心文案配置\r\nexport const HELP_CONTENT = {\r\n // FAQ列表\r\n FAQ_LIST: [\r\n {\r\n question: '如何租借风扇?',\r\n answer: '点击首页\"扫码租借\"按钮,使用微信扫描设备上的二维码,按提示完成支付即可使用。'\r\n },\r\n {\r\n question: '收费标准是怎样的?',\r\n answer: '本产品租界风扇采用免押金租借形式,无需支付押金,具体计费方式以场地机柜扫码提示为准。'\r\n },\r\n {\r\n question: '如何归还风扇?',\r\n answer: '将风扇带到任意归还点,点击首页\"扫码归还\"按钮,扫描归还点二维码即可完成归还。'\r\n },\r\n {\r\n question: '押金多久能退还?',\r\n answer: '归还设备后押金将自动发起退款,预计0-7个工作日到账。'\r\n },\r\n {\r\n question: '设备无法正常使用怎么办?',\r\n answer: '您可以通过\"我的-投诉与建议\"提交故障反馈,或直接拨打客服电话处理。'\r\n }\r\n ],\r\n\r\n // 联系方式\r\n CONTACT: {\r\n TITLE: '联系客服',\r\n PHONE: {\r\n LABEL: '客服电话',\r\n VALUE: '400-077-6018'\r\n },\r\n SERVICE_TIME: {\r\n LABEL: '服务时间',\r\n VALUE: '周一至周日 09:00-22:00'\r\n }\r\n }\r\n} "],"names":[],"mappings":";AACY,MAAC,eAAe;AAAA;AAAA,EAE1B,UAAU;AAAA,IACR;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACD;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,EACF;AAAA;AAAA,EAGD,SAAS;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACD,cAAc;AAAA,MACZ,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,EACF;AACH;;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/device/detail.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/device/detail.js.map index 3018abc..539c6f9 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/device/detail.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/device/detail.js.map @@ -1 +1 @@ -{"version":3,"file":"detail.js","sources":["pages/device/detail.vue","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvZGV2aWNlL2RldGFpbC52dWU"],"sourcesContent":["\n\n\n\n","import MiniProgramPage from 'D:/uni-fans-score/pages/device/detail.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","reactive","onLoad","uni","onMounted","getUserInfo","getUserPhoneNumber","getDeviceInfo","rentPowerBank","updateOrderPackage","getOrderByOrderNo","getOrderByOrderNoScore","initiateWeChatScorePayment","res","getOrderByOrderNoScorePayStatus","cancelOrder"],"mappings":"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"} \ No newline at end of file +{"version":3,"file":"detail.js","sources":["pages/device/detail.vue","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvZGV2aWNlL2RldGFpbC52dWU"],"sourcesContent":["\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/uni-fans-score/pages/device/detail.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","reactive","onLoad","uni","onMounted","onShow","getUserInfo","getUserPhoneNumber","getDeviceInfo","rentPowerBank","updateOrderPackage","getOrderByOrderNo","getOrderByOrderNoScore","initiateWeChatScorePayment","res","getOrderByOrderNoScorePayStatus","cancelOrder"],"mappings":"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"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map index 152638b..a563a18 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["pages/index/index.vue","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["\r\n\r\n\r\n\r\n","import MiniProgramPage from 'D:/uni-fans-score/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","getQueryString","wxLogin","URL","getDeviceInfo"],"mappings":"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"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["pages/index/index.vue","E:/HBuilderX.4.24.2024072208/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["\r\n\r\n\r\n\r\n\t","import MiniProgramPage from 'D:/uni-fans-score/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","computed","onMounted","onUnmounted","uni","AmapUtil","wxLogin","URL","getQueryString","getDeviceInfo"],"mappings":"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"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/utils/amap.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/utils/amap.js.map new file mode 100644 index 0000000..9fef055 --- /dev/null +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/utils/amap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"amap.js","sources":["utils/amap.js"],"sourcesContent":["// 高德地图工具类\r\nconst AMAP_KEY = '4c513a688938fd89b88b296e867f66ec'\r\n\r\nclass AmapUtil {\r\n constructor() {\r\n this.key = AMAP_KEY\r\n }\r\n\r\n // 逆地理编码 - 根据经纬度获取地址信息\r\n async regeocode(longitude, latitude) {\r\n try {\r\n const res = await uni.request({\r\n url: 'https://restapi.amap.com/v3/geocode/regeo',\r\n method: 'GET',\r\n data: {\r\n key: this.key,\r\n location: `${longitude},${latitude}`,\r\n poitype: '',\r\n radius: 1000,\r\n extensions: 'base',\r\n batch: false,\r\n roadlevel: 0\r\n }\r\n })\r\n \r\n if (res.statusCode === 200 && res.data.status === '1') {\r\n return {\r\n success: true,\r\n data: res.data.regeocode\r\n }\r\n } else {\r\n return {\r\n success: false,\r\n message: res.data.info || '逆地理编码失败'\r\n }\r\n }\r\n } catch (error) {\r\n console.error('逆地理编码异常:', error)\r\n return {\r\n success: false,\r\n message: '网络异常'\r\n }\r\n }\r\n }\r\n\r\n // 地理编码 - 根据地址获取经纬度\r\n async geocode(address, city = '') {\r\n try {\r\n const res = await uni.request({\r\n url: 'https://restapi.amap.com/v3/geocode/geo',\r\n method: 'GET',\r\n data: {\r\n key: this.key,\r\n address: address,\r\n city: city\r\n }\r\n })\r\n \r\n if (res.statusCode === 200 && res.data.status === '1' && res.data.geocodes.length > 0) {\r\n return {\r\n success: true,\r\n data: res.data.geocodes[0]\r\n }\r\n } else {\r\n return {\r\n success: false,\r\n message: res.data.info || '地理编码失败'\r\n }\r\n }\r\n } catch (error) {\r\n console.error('地理编码异常:', error)\r\n return {\r\n success: false,\r\n message: '网络异常'\r\n }\r\n }\r\n }\r\n\r\n // 搜索POI\r\n async searchPOI(keywords, location = '', radius = 3000, city = '') {\r\n try {\r\n const res = await uni.request({\r\n url: 'https://restapi.amap.com/v3/place/text',\r\n method: 'GET',\r\n data: {\r\n key: this.key,\r\n keywords: keywords,\r\n location: location,\r\n radius: radius,\r\n city: city,\r\n citylimit: true\r\n }\r\n })\r\n \r\n if (res.statusCode === 200 && res.data.status === '1') {\r\n return {\r\n success: true,\r\n data: res.data.pois || []\r\n }\r\n } else {\r\n return {\r\n success: false,\r\n message: res.data.info || '搜索失败'\r\n }\r\n }\r\n } catch (error) {\r\n console.error('POI搜索异常:', error)\r\n return {\r\n success: false,\r\n message: '网络异常'\r\n }\r\n }\r\n }\r\n\r\n // 路径规划\r\n async getRoute(origin, destination, strategy = 0) {\r\n try {\r\n const res = await uni.request({\r\n url: 'https://restapi.amap.com/v3/direction/driving',\r\n method: 'GET',\r\n data: {\r\n key: this.key,\r\n origin: origin,\r\n destination: destination,\r\n strategy: strategy,\r\n extensions: 'base'\r\n }\r\n })\r\n \r\n if (res.statusCode === 200 && res.data.status === '1') {\r\n return {\r\n success: true,\r\n data: res.data.route\r\n }\r\n } else {\r\n return {\r\n success: false,\r\n message: res.data.info || '路径规划失败'\r\n }\r\n }\r\n } catch (error) {\r\n console.error('路径规划异常:', error)\r\n return {\r\n success: false,\r\n message: '网络异常'\r\n }\r\n }\r\n }\r\n\r\n // 计算两点间距离\r\n calculateDistance(lat1, lng1, lat2, lng2) {\r\n const radLat1 = lat1 * Math.PI / 180.0\r\n const radLat2 = lat2 * Math.PI / 180.0\r\n const a = radLat1 - radLat2\r\n const b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0\r\n let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)))\r\n s = s * 6378.137\r\n s = Math.round(s * 10000) / 10000\r\n return s\r\n }\r\n}\r\n\r\nexport default new AmapUtil() "],"names":["uni"],"mappings":"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"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/utils/staticMap.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/utils/staticMap.js.map new file mode 100644 index 0000000..8f46d6e --- /dev/null +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/utils/staticMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"staticMap.js","sources":["utils/staticMap.js"],"sourcesContent":["// 高德静态地图API工具类\r\nconst AMAP_KEY = '4c513a688938fd89b88b296e867f66ec'\r\n\r\nclass StaticMapUtil {\r\n constructor() {\r\n this.key = AMAP_KEY\r\n this.baseUrl = 'https://restapi.amap.com/v3/staticmap'\r\n }\r\n\r\n /**\r\n * 生成静态地图URL\r\n * @param {Object} options 地图配置选项\r\n * @returns {String} 静态地图URL\r\n */\r\n generateMapUrl(options = {}) {\r\n const defaultOptions = {\r\n location: '116.397128,39.916527', // 默认中心点(北京)\r\n zoom: 13, // 缩放级别\r\n size: '750*500', // 图片尺寸\r\n scale: 2, // 高清显示\r\n markers: [], // 标记点\r\n labels: [], // 文字标注\r\n paths: [], // 路径\r\n traffic: 0, // 交通路况 0-不显示 1-显示\r\n format: 'png' // 图片格式\r\n }\r\n\r\n const config = { ...defaultOptions, ...options }\r\n \r\n let url = `${this.baseUrl}?key=${this.key}`\r\n url += `&location=${config.location}`\r\n url += `&zoom=${config.zoom}`\r\n url += `&size=${config.size}`\r\n url += `&scale=${config.scale}`\r\n url += `&traffic=${config.traffic}`\r\n url += `&format=${config.format}`\r\n\r\n // 添加标记点\r\n if (config.markers && config.markers.length > 0) {\r\n const markersStr = config.markers.map(marker => {\r\n let markerStr = ''\r\n if (marker.size) markerStr += `size:${marker.size}|`\r\n if (marker.color) markerStr += `color:${marker.color}|`\r\n if (marker.label) markerStr += `label:${marker.label}|`\r\n markerStr += `${marker.longitude},${marker.latitude}`\r\n return markerStr\r\n }).join('|')\r\n url += `&markers=${encodeURIComponent(markersStr)}`\r\n }\r\n\r\n // 添加文字标注\r\n if (config.labels && config.labels.length > 0) {\r\n const labelsStr = config.labels.map(label => {\r\n let labelStr = ''\r\n if (label.content) labelStr += `content:${label.content}|`\r\n if (label.font) labelStr += `font:${label.font}|`\r\n if (label.bold) labelStr += `bold:${label.bold}|`\r\n if (label.fontSize) labelStr += `fontSize:${label.fontSize}|`\r\n if (label.fontColor) labelStr += `fontColor:${label.fontColor}|`\r\n if (label.background) labelStr += `background:${label.background}|`\r\n labelStr += `${label.longitude},${label.latitude}`\r\n return labelStr\r\n }).join('|')\r\n url += `&labels=${encodeURIComponent(labelsStr)}`\r\n }\r\n\r\n return url\r\n }\r\n\r\n /**\r\n * 为场地列表生成静态地图URL\r\n * @param {Array} positions 场地列表\r\n * @param {Object} options 额外选项\r\n * @returns {String} 静态地图URL\r\n */\r\n generatePositionsMapUrl(positions = [], options = {}) {\r\n if (!positions || positions.length === 0) {\r\n return this.generateMapUrl(options)\r\n }\r\n\r\n // 计算地图中心点和缩放级别\r\n const center = this.calculateCenter(positions)\r\n const zoom = this.calculateOptimalZoom(positions, center)\r\n\r\n // 生成标记点\r\n const markers = positions.map((position, index) => ({\r\n longitude: parseFloat(position.longitude),\r\n latitude: parseFloat(position.latitude),\r\n size: 'mid',\r\n color: position.status === 'online' ? 'green' : 'red',\r\n label: String.fromCharCode(65 + (index % 26)) // A, B, C...\r\n }))\r\n\r\n return this.generateMapUrl({\r\n location: `${center.longitude},${center.latitude}`,\r\n zoom: zoom,\r\n markers: markers,\r\n ...options\r\n })\r\n }\r\n\r\n /**\r\n * 计算多个点的中心位置\r\n * @param {Array} positions 位置数组\r\n * @returns {Object} 中心点坐标\r\n */\r\n calculateCenter(positions) {\r\n if (positions.length === 0) {\r\n return { longitude: 116.397128, latitude: 39.916527 }\r\n }\r\n\r\n const validPositions = positions.filter(p => p.longitude && p.latitude)\r\n if (validPositions.length === 0) {\r\n return { longitude: 116.397128, latitude: 39.916527 }\r\n }\r\n\r\n const sum = validPositions.reduce((acc, pos) => ({\r\n longitude: acc.longitude + parseFloat(pos.longitude),\r\n latitude: acc.latitude + parseFloat(pos.latitude)\r\n }), { longitude: 0, latitude: 0 })\r\n\r\n return {\r\n longitude: (sum.longitude / validPositions.length).toFixed(6),\r\n latitude: (sum.latitude / validPositions.length).toFixed(6)\r\n }\r\n }\r\n\r\n /**\r\n * 计算最佳缩放级别\r\n * @param {Array} positions 位置数组\r\n * @param {Object} center 中心点\r\n * @returns {Number} 缩放级别\r\n */\r\n calculateOptimalZoom(positions, center) {\r\n if (positions.length <= 1) return 15\r\n\r\n const validPositions = positions.filter(p => p.longitude && p.latitude)\r\n if (validPositions.length <= 1) return 15\r\n\r\n // 计算最大距离\r\n let maxDistance = 0\r\n validPositions.forEach(pos => {\r\n const distance = this.getDistance(\r\n center.latitude, center.longitude,\r\n parseFloat(pos.latitude), parseFloat(pos.longitude)\r\n )\r\n maxDistance = Math.max(maxDistance, distance)\r\n })\r\n\r\n // 根据最大距离确定缩放级别\r\n if (maxDistance < 1) return 16 // 1km内\r\n if (maxDistance < 2) return 15 // 2km内\r\n if (maxDistance < 5) return 14 // 5km内\r\n if (maxDistance < 10) return 13 // 10km内\r\n if (maxDistance < 20) return 12 // 20km内\r\n if (maxDistance < 50) return 11 // 50km内\r\n return 10 // 50km以上\r\n }\r\n\r\n /**\r\n * 计算两点间距离(公里)\r\n * @param {Number} lat1 纬度1\r\n * @param {Number} lng1 经度1\r\n * @param {Number} lat2 纬度2\r\n * @param {Number} lng2 经度2\r\n * @returns {Number} 距离(公里)\r\n */\r\n getDistance(lat1, lng1, lat2, lng2) {\r\n const radLat1 = lat1 * Math.PI / 180.0\r\n const radLat2 = lat2 * Math.PI / 180.0\r\n const a = radLat1 - radLat2\r\n const b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0\r\n let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)))\r\n s = s * 6378.137\r\n s = Math.round(s * 10000) / 10000\r\n return s\r\n }\r\n\r\n /**\r\n * 预加载地图图片\r\n * @param {String} mapUrl 地图URL\r\n * @returns {Promise} 图片加载Promise\r\n */\r\n preloadMapImage(mapUrl) {\r\n return new Promise((resolve, reject) => {\r\n const img = new Image()\r\n img.onload = () => resolve(mapUrl)\r\n img.onerror = reject\r\n img.src = mapUrl\r\n })\r\n }\r\n}\r\n\r\nexport default new StaticMapUtil() "],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/app.json b/unpackage/dist/dev/mp-weixin/app.json index a54a622..f9ad795 100644 --- a/unpackage/dist/dev/mp-weixin/app.json +++ b/unpackage/dist/dev/mp-weixin/app.json @@ -42,7 +42,13 @@ "permission": { "scope.getPhoneNumber": { "desc": "您的手机号将用于登录和订单服务" + }, + "scope.userLocation": { + "desc": "您的位置信息将用于获取附近的设备" } }, + "requiredPrivateInfos": [ + "getLocation" + ], "usingComponents": {} } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/common/assets.js b/unpackage/dist/dev/mp-weixin/common/assets.js index 1b4aedc..95dfa25 100644 --- a/unpackage/dist/dev/mp-weixin/common/assets.js +++ b/unpackage/dist/dev/mp-weixin/common/assets.js @@ -1,20 +1,16 @@ "use strict"; -const _imports_0$3 = "/static/logo.png"; -const _imports_1$2 = "/static/scan-icon.png"; +const _imports_0$3 = "/static/scan-icon.png"; const _imports_0$2 = "/static/user-active.png"; -const _imports_1$1 = "/static/jl.png"; +const _imports_1 = "/static/jl.png"; const _imports_2 = "/static/complaint.png"; const _imports_3 = "/static/hlep.png"; const _imports_0$1 = "/static/images/wxpayflag.png"; const _imports_0 = "/static/images/location-map.svg"; -const _imports_1 = "/static/images/Electricity.svg"; exports._imports_0 = _imports_0$3; exports._imports_0$1 = _imports_0$2; exports._imports_0$2 = _imports_0$1; exports._imports_0$3 = _imports_0; -exports._imports_1 = _imports_1$2; -exports._imports_1$1 = _imports_1$1; -exports._imports_1$2 = _imports_1; +exports._imports_1 = _imports_1; exports._imports_2 = _imports_2; exports._imports_3 = _imports_3; //# sourceMappingURL=../../.sourcemap/mp-weixin/common/assets.js.map diff --git a/unpackage/dist/dev/mp-weixin/common/vendor.js b/unpackage/dist/dev/mp-weixin/common/vendor.js index ddc87bc..4902521 100644 --- a/unpackage/dist/dev/mp-weixin/common/vendor.js +++ b/unpackage/dist/dev/mp-weixin/common/vendor.js @@ -5163,12 +5163,17 @@ function vFor(source, renderItem) { } return ret; } +function setRef(ref2, id, opts = {}) { + const { $templateRefs } = getCurrentInstance(); + $templateRefs.push({ i: id, r: ref2, k: opts.k, f: opts.f }); +} const o = (value, key) => vOn(value, key); const f = (source, renderItem) => vFor(source, renderItem); const e = (target, ...sources) => extend(target, ...sources); const n = (value) => normalizeClass(value); const t = (val) => toDisplayString(val); const p = (props) => renderProps(props); +const sr = (ref2, id, opts) => setRef(ref2, id, opts); function createApp$1(rootComponent, rootProps = null) { rootComponent && (rootComponent.mpType = "app"); return createVueApp(rootComponent, rootProps).use(plugin); @@ -6988,9 +6993,9 @@ function isConsoleWritable() { return isWritable; } function initRuntimeSocketService() { - const hosts = "192.168.10.30,127.0.0.1"; + const hosts = "198.18.0.1,192.168.1.8,127.0.0.1"; const port = "8090"; - const id = "mp-weixin_wcZ9WZ"; + const id = "mp-weixin_RTBzKu"; const lazy = typeof swan !== "undefined"; let restoreError = lazy ? () => { } : initOnError(); @@ -8871,6 +8876,7 @@ index.$u = $u; const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => { !isInSSRComponentSetup && injectHook(lifecycle, hook, target); }; +const onShow = /* @__PURE__ */ createHook(ON_SHOW); const onLoad = /* @__PURE__ */ createHook(ON_LOAD); exports._export_sfc = _export_sfc; exports.computed = computed; @@ -8879,13 +8885,18 @@ exports.e = e; exports.f = f; exports.index = index; exports.n = n; +exports.nextTick$1 = nextTick$1; exports.o = o; exports.onLoad = onLoad; exports.onMounted = onMounted; +exports.onShow = onShow; +exports.onUnmounted = onUnmounted; exports.p = p; exports.reactive = reactive; exports.ref = ref; exports.resolveComponent = resolveComponent; +exports.sr = sr; exports.t = t; +exports.watch = watch; exports.wx$1 = wx$1; //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map diff --git a/unpackage/dist/dev/mp-weixin/components/MapComponent.js b/unpackage/dist/dev/mp-weixin/components/MapComponent.js new file mode 100644 index 0000000..45acffc --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/MapComponent.js @@ -0,0 +1,198 @@ +"use strict"; +const common_vendor = require("../common/vendor.js"); +const common_assets = require("../common/assets.js"); +const _sfc_main = { + __name: "MapComponent", + props: { + userLocation: { + type: Object, + default: null + }, + positionList: { + type: Array, + default: () => [] + }, + filteredPositions: { + type: Array, + default: () => [] + }, + searchKeyword: { + type: String, + default: "" + } + }, + emits: [ + "relocate", + "scan", + "showList", + "markerTap", + "mapCenterChange" + ], + setup(__props, { expose: __expose, emit: __emit }) { + const props = __props; + const emit = __emit; + const mapKey = common_vendor.ref(0); + const mapZoom = common_vendor.ref(16); + const mapCenter = common_vendor.ref({ + longitude: 116.397128, + latitude: 39.916527 + }); + const loadPositionsTimer = common_vendor.ref(null); + const isMapInitialized = common_vendor.ref(false); + const updateMapCenter = (longitude, latitude) => { + if (mapCenter.value.longitude === longitude && mapCenter.value.latitude === latitude) { + return; + } + mapCenter.value = { longitude, latitude }; + mapZoom.value = 16; + common_vendor.nextTick$1(() => { + setTimeout(() => { + const mapContext = common_vendor.index.createMapContext("mainMap"); + if (mapContext) { + mapContext.setCenterOffset({ + longitude, + latitude, + success: () => { + }, + fail: () => { + mapContext.includePoints({ + points: [{ longitude, latitude }], + padding: [0, 0, 0, 0] + }); + } + }); + } + }, 200); + }); + }; + const handleRelocate = () => { + emit("relocate"); + }; + const handleScan = () => { + emit("scan"); + }; + const handleShowList = () => { + emit("showList"); + }; + const handleMarkerTap = (e) => { + if (!e.detail || typeof e.detail.markerId === "undefined") { + return; + } + const markerId = e.detail.markerId; + if (markerId === 9999) { + common_vendor.index.showToast({ + title: "这是您的位置", + icon: "none" + }); + return; + } + const position = props.filteredPositions[markerId]; + if (position) { + emit("markerTap", position); + } + }; + const handleRegionChange = (e) => { + if (e.detail.type === "end") { + const { center } = e.detail; + if (!center || typeof center.longitude === "undefined" || typeof center.latitude === "undefined") { + return; + } + mapCenter.value = { + longitude: center.longitude, + latitude: center.latitude + }; + mapZoom.value = 16; + if (loadPositionsTimer.value) { + clearTimeout(loadPositionsTimer.value); + } + loadPositionsTimer.value = setTimeout(() => { + emit("mapCenterChange", mapCenter.value); + }, 500); + } + }; + const mapMarkers = common_vendor.computed(() => { + const markers = []; + props.filteredPositions.forEach((item, index) => { + if (item.longitude && item.latitude) { + markers.push({ + id: index, + longitude: parseFloat(item.longitude), + latitude: parseFloat(item.latitude), + title: item.name, + iconPath: "/static/scan-icon.png", + width: 30, + height: 30, + callout: { + content: item.name, + fontSize: 14, + borderRadius: 8, + bgColor: "#ffffff", + padding: 10, + display: "BYCLICK" + } + }); + } + }); + if (props.userLocation) { + markers.push({ + id: 9999, + // 特殊ID标识用户位置 + longitude: props.userLocation.longitude, + latitude: props.userLocation.latitude, + title: "我的位置", + iconPath: "/static/scan-icon.png", + width: 32, + height: 32, + callout: { + content: "我的位置", + fontSize: 14, + borderRadius: 8, + bgColor: "#2196F3", + color: "#ffffff", + padding: 10, + display: "BYCLICK" + } + }); + } + return markers; + }); + common_vendor.watch(() => props.userLocation, (newLocation) => { + if (newLocation && newLocation.longitude && newLocation.latitude && !isMapInitialized.value) { + updateMapCenter(newLocation.longitude, newLocation.latitude); + isMapInitialized.value = true; + } + }, { immediate: true, deep: true }); + common_vendor.onMounted(() => { + }); + common_vendor.onUnmounted(() => { + if (loadPositionsTimer.value) { + clearTimeout(loadPositionsTimer.value); + } + }); + __expose({ + mapCenter: common_vendor.computed(() => mapCenter.value) + }); + return (_ctx, _cache) => { + return common_vendor.e({ + a: mapKey.value, + b: mapCenter.value.longitude, + c: mapCenter.value.latitude, + d: mapZoom.value, + e: mapMarkers.value, + f: common_vendor.o(handleMarkerTap), + g: common_vendor.o(handleRegionChange), + h: !mapCenter.value.longitude + }, !mapCenter.value.longitude ? {} : {}, { + i: common_assets._imports_0, + j: common_vendor.o(handleRelocate), + k: common_assets._imports_0, + l: common_vendor.o(handleScan), + m: common_assets._imports_0, + n: common_vendor.o(handleShowList) + }); + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-651a9dc3"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../.sourcemap/mp-weixin/components/MapComponent.js.map diff --git a/unpackage/dist/dev/mp-weixin/components/MapComponent.json b/unpackage/dist/dev/mp-weixin/components/MapComponent.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/MapComponent.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/MapComponent.wxml b/unpackage/dist/dev/mp-weixin/components/MapComponent.wxml new file mode 100644 index 0000000..dc0c61d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/MapComponent.wxml @@ -0,0 +1 @@ +地图加载中...我的位置扫码使用附近场地 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/MapComponent.wxss b/unpackage/dist/dev/mp-weixin/components/MapComponent.wxss new file mode 100644 index 0000000..d7c9770 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/MapComponent.wxss @@ -0,0 +1,159 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +/* 地图容器 */ +.map-container.data-v-651a9dc3 { + flex: 1; + position: relative; + height: 100vh; + width: 100%; +} +.map-container .map.data-v-651a9dc3 { + width: 100%; + height: 100%; +} +.map-container .map-loading.data-v-651a9dc3 { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.8); + display: flex; + justify-content: center; + align-items: center; + z-index: 10; +} +.map-container .map-loading .loading-content.data-v-651a9dc3 { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} +.map-container .map-loading .loading-content .loading-spinner.data-v-651a9dc3 { + width: 60rpx; + height: 60rpx; + border: 8rpx solid #f3f3f3; + border-top: 8rpx solid #3498db; + border-radius: 50%; + animation: spin-651a9dc3 1s linear infinite; + margin-bottom: 20rpx; +} +.map-container .map-loading .loading-content text.data-v-651a9dc3 { + font-size: 32rpx; + color: #333; + font-weight: 500; +} +.map-container .map-controls.data-v-651a9dc3 { + position: absolute; + right: 30rpx; + bottom: 20rpx; + left: 30rpx; + display: flex; + justify-content: center; + align-items: center; + gap: 30rpx; +} +.map-container .map-controls .control-btn.data-v-651a9dc3 { + min-width: 140rpx; + height: 80rpx; + background: #ffffff; + border-radius: 40rpx; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); + transition: all 0.2s ease; + padding: 0 20rpx; +} +.map-container .map-controls .control-btn.data-v-651a9dc3:active { + transform: scale(0.95); +} +.map-container .map-controls .control-btn .control-icon.data-v-651a9dc3 { + width: 32rpx; + height: 32rpx; + margin-right: 12rpx; +} +.map-container .map-controls .control-btn text.data-v-651a9dc3 { + font-size: 26rpx; + color: #333; + white-space: nowrap; + font-weight: 500; +} +.map-container .map-controls .control-btn.main-btn.data-v-651a9dc3 { + min-width: 160rpx; + height: 90rpx; + box-shadow: 0 6rpx 20rpx rgba(33, 150, 243, 0.4); + transform: translateY(-5rpx); +} +.map-container .map-controls .control-btn.main-btn .control-icon.data-v-651a9dc3 { + width: 36rpx; + height: 36rpx; + margin-right: 16rpx; +} +.map-container .map-controls .control-btn.main-btn text.data-v-651a9dc3 { + font-size: 28rpx; + font-weight: 600; +} +.map-container .map-controls .control-btn.main-btn.data-v-651a9dc3:active { + transform: translateY(-5rpx) scale(0.95); +} +.map-container .map-controls .scan-control.data-v-651a9dc3 { + background: #2196F3; +} +.map-container .map-controls .scan-control .control-icon.data-v-651a9dc3 { + filter: brightness(0) invert(1); +} +.map-container .map-controls .scan-control text.data-v-651a9dc3 { + color: #ffffff; +} +.map-container .map-controls .list-control.data-v-651a9dc3 { + background: #4CAF50; +} +.map-container .map-controls .list-control .control-icon.data-v-651a9dc3 { + filter: brightness(0) invert(1); +} +.map-container .map-controls .list-control text.data-v-651a9dc3 { + color: #ffffff; +} +.map-container .map-controls .location-control.data-v-651a9dc3 { + background: #ffffff; + border: 2rpx solid #e0e0e0; +} +.map-container .map-controls .location-control .control-icon.data-v-651a9dc3 { + filter: none; +} +.map-container .map-controls .location-control text.data-v-651a9dc3 { + color: #333; +} +@keyframes spin-651a9dc3 { +0% { + transform: rotate(0deg); +} +100% { + transform: rotate(360deg); +} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/constants/help.js b/unpackage/dist/dev/mp-weixin/constants/help.js index 72e9345..cc859b5 100644 --- a/unpackage/dist/dev/mp-weixin/constants/help.js +++ b/unpackage/dist/dev/mp-weixin/constants/help.js @@ -8,7 +8,7 @@ const HELP_CONTENT = { }, { question: "收费标准是怎样的?", - answer: "使用费用为2元/小时,不足1小时按1小时计算。押金99元,归还后自动退还。" + answer: "本产品租界风扇采用免押金租借形式,无需支付押金,具体计费方式以场地机柜扫码提示为准。" }, { question: "如何归还风扇?", @@ -28,7 +28,7 @@ const HELP_CONTENT = { TITLE: "联系客服", PHONE: { LABEL: "客服电话", - VALUE: "400-888-8888" + VALUE: "400-077-6018" }, SERVICE_TIME: { LABEL: "服务时间", diff --git a/unpackage/dist/dev/mp-weixin/pages/device/detail.js b/unpackage/dist/dev/mp-weixin/pages/device/detail.js index 8edd8da..a00d26a 100644 --- a/unpackage/dist/dev/mp-weixin/pages/device/detail.js +++ b/unpackage/dist/dev/mp-weixin/pages/device/detail.js @@ -10,7 +10,7 @@ const _sfc_main = { const deviceId = common_vendor.ref(""); const deviceFeeConfig = common_vendor.ref({}); const deviceLocation = common_vendor.ref("一号教学楼大厅"); - const batteryLevel = common_vendor.ref(95); + common_vendor.ref(95); const hasActiveOrder = common_vendor.ref(false); const deviceStatus = common_vendor.reactive({ text: "可使用", @@ -20,29 +20,35 @@ const _sfc_main = { const phoneNumber = common_vendor.ref(""); const showPhoneAuthPopup = common_vendor.ref(false); common_vendor.onLoad((options) => { - deviceId.value = options.deviceNo; + if (options.deviceNo != common_vendor.index.getStorageSync("deviceId") || !common_vendor.index.getStorageSync("deviceId")) { + deviceId.value = options.deviceNo; + common_vendor.index.setStorageSync("deviceId", options.deviceNo); + } else { + deviceId.value = common_vendor.index.getStorageSync("deviceId"); + } checkOrderStatus(); - common_vendor.index.__f__("log", "at pages/device/detail.vue:200", options.deviceNo); - fetchDeviceInfo(); }); - common_vendor.onMounted(() => { - checkUserPhone(); + common_vendor.onMounted(async () => { + await checkUserPhone(); + }); + common_vendor.onShow(async () => { + await fetchDeviceInfo(); }); const checkUserPhone = async () => { try { const userInfoRes = await util_index.getUserInfo(); - common_vendor.index.__f__("log", "at pages/device/detail.vue:211", userInfoRes.data.phone, "getUserInfoPhone"); + common_vendor.index.__f__("log", "at pages/device/detail.vue:220", userInfoRes.data.phone, "getUserInfoPhone"); if (userInfoRes.code == 200 && userInfoRes.data && userInfoRes.data.phone) { phoneNumber.value = userInfoRes.data.phone; } else { showPhoneAuthPopup.value = true; } } catch (error) { - common_vendor.index.__f__("error", "at pages/device/detail.vue:220", "获取用户信息失败:", error); + common_vendor.index.__f__("error", "at pages/device/detail.vue:229", "获取用户信息失败:", error); } }; const onGetPhoneNumber = (e) => { - common_vendor.index.__f__("log", "at pages/device/detail.vue:226", "getPhoneNumber event:", e.detail); + common_vendor.index.__f__("log", "at pages/device/detail.vue:235", "getPhoneNumber event:", e.detail); if (e.detail.errMsg && e.detail.errMsg.includes("deny")) { common_vendor.index.showToast({ title: "需要授权手机号才能使用设备", @@ -54,13 +60,13 @@ const _sfc_main = { common_vendor.index.showLoading({ title: "获取中..." }); - common_vendor.index.__f__("log", "at pages/device/detail.vue:243", "获取到的授权code:", e.detail.code); + common_vendor.index.__f__("log", "at pages/device/detail.vue:252", "获取到的授权code:", e.detail.code); try { util_index.getUserPhoneNumber(e.detail.code).then((res) => { - common_vendor.index.__f__("log", "at pages/device/detail.vue:249", "获取手机号API响应原始数据:", JSON.stringify(res)); + common_vendor.index.__f__("log", "at pages/device/detail.vue:258", "获取手机号API响应原始数据:", JSON.stringify(res)); common_vendor.index.hideLoading(); if (!res) { - common_vendor.index.__f__("error", "at pages/device/detail.vue:254", "API返回数据为空"); + common_vendor.index.__f__("error", "at pages/device/detail.vue:263", "API返回数据为空"); common_vendor.index.showModal({ title: "数据异常", content: "API返回为空", @@ -68,8 +74,8 @@ const _sfc_main = { }); return; } - common_vendor.index.__f__("log", "at pages/device/detail.vue:264", "响应code:", res.code, "响应类型:", typeof res.code); - common_vendor.index.__f__("log", "at pages/device/detail.vue:265", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone); + common_vendor.index.__f__("log", "at pages/device/detail.vue:273", "响应code:", res.code, "响应类型:", typeof res.code); + common_vendor.index.__f__("log", "at pages/device/detail.vue:274", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone); if (res.code == 200 && res.data && res.data.phoneNumber) { phoneNumber.value = res.data.phoneNumber; showPhoneAuthPopup.value = false; @@ -78,7 +84,7 @@ const _sfc_main = { icon: "success" }); } else { - common_vendor.index.__f__("warn", "at pages/device/detail.vue:277", "获取手机号响应异常:", res.msg || "未知错误"); + common_vendor.index.__f__("warn", "at pages/device/detail.vue:286", "获取手机号响应异常:", res.msg || "未知错误"); common_vendor.index.showModal({ title: "获取手机号异常", content: `状态码: ${res.code}, 消息: ${res.msg || "无"}`, @@ -87,7 +93,7 @@ const _sfc_main = { } }).catch((err) => { common_vendor.index.hideLoading(); - common_vendor.index.__f__("error", "at pages/device/detail.vue:287", "获取手机号码失败(catch):", err); + common_vendor.index.__f__("error", "at pages/device/detail.vue:296", "获取手机号码失败(catch):", err); let errMsg = err.message || err.toString(); common_vendor.index.showModal({ title: "获取手机号失败", @@ -97,7 +103,7 @@ const _sfc_main = { }); } catch (outerError) { common_vendor.index.hideLoading(); - common_vendor.index.__f__("error", "at pages/device/detail.vue:299", "获取手机号外部错误:", outerError); + common_vendor.index.__f__("error", "at pages/device/detail.vue:308", "获取手机号外部错误:", outerError); common_vendor.index.showModal({ title: "意外错误", content: "处理过程发生异常: " + (outerError.message || outerError), @@ -129,7 +135,7 @@ const _sfc_main = { deviceStatus.class = "offline"; } } - common_vendor.index.__f__("log", "at pages/device/detail.vue:337", "feeconfig", deviceInfo.value.feeConfig); + common_vendor.index.__f__("log", "at pages/device/detail.vue:346", "feeconfig", deviceInfo.value.feeConfig); deviceFeeConfig.value = JSON.parse(deviceInfo.value.feeConfig)[0] || {}; } }; @@ -210,17 +216,17 @@ const _sfc_main = { packagePrice: parseFloat(selectedPkg.price) }); if (updateRes.code !== 200) { - common_vendor.index.__f__("warn", "at pages/device/detail.vue:445", "更新订单套餐信息失败:", updateRes.msg); + common_vendor.index.__f__("warn", "at pages/device/detail.vue:454", "更新订单套餐信息失败:", updateRes.msg); } else { - common_vendor.index.__f__("log", "at pages/device/detail.vue:448", "订单套餐信息已提前更新"); + common_vendor.index.__f__("log", "at pages/device/detail.vue:457", "订单套餐信息已提前更新"); } } catch (updateError) { - common_vendor.index.__f__("error", "at pages/device/detail.vue:451", "更新订单套餐信息时出错:", updateError); + common_vendor.index.__f__("error", "at pages/device/detail.vue:460", "更新订单套餐信息时出错:", updateError); } if (payWay == "wx-pay") { common_vendor.index.hideLoading(); const res = await config_user.getOrderByOrderNo(order.orderNo); - common_vendor.index.__f__("log", "at pages/device/detail.vue:460", res); + common_vendor.index.__f__("log", "at pages/device/detail.vue:469", res); const deposit = parseFloat(deviceInfo.value.depositAmount); const packagePrice = parseFloat(selectedPkg.price); const totalAmount = (deposit + packagePrice).toFixed(2); @@ -237,7 +243,7 @@ const _sfc_main = { const payResult = await util_index.initiateWeChatScorePayment(res); if (payResult.errCode == "0") { const res2 = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo); - common_vendor.index.__f__("log", "at pages/device/detail.vue:488", res2.data.orderStatus); + common_vendor.index.__f__("log", "at pages/device/detail.vue:497", res2.data.orderStatus); if (res2.data.orderStatus == "in_used") { common_vendor.index.showToast({ title: "设备租借成功", @@ -291,21 +297,18 @@ const _sfc_main = { c: common_vendor.t(deviceId.value), d: common_assets._imports_0$3, e: common_vendor.t(deviceLocation.value), - f: common_assets._imports_1$2, - g: batteryLevel.value < 20 ? 1 : "", - h: common_vendor.t(batteryLevel.value), - i: common_vendor.t(deviceFeeConfig.value.maxHourPrice), - j: common_vendor.t(deviceInfo.value.depositAmount), - k: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押租借"), - l: hasActiveOrder.value ? 1 : "", - m: common_vendor.o(($event) => handleRent("wx-score-pay")), - n: common_assets._imports_0$2, - o: showPhoneAuthPopup.value + f: common_vendor.t(deviceFeeConfig.value.maxHourPrice), + g: common_vendor.t(deviceInfo.value.depositAmount), + h: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押租借"), + i: hasActiveOrder.value ? 1 : "", + j: common_vendor.o(($event) => handleRent("wx-score-pay")), + k: common_assets._imports_0$2, + l: showPhoneAuthPopup.value }, showPhoneAuthPopup.value ? { - p: common_vendor.o(() => { + m: common_vendor.o(() => { }), - q: common_vendor.o(onGetPhoneNumber), - r: common_vendor.o(($event) => showPhoneAuthPopup.value = false) + n: common_vendor.o(onGetPhoneNumber), + o: common_vendor.o(($event) => showPhoneAuthPopup.value = false) } : {}); }; } diff --git a/unpackage/dist/dev/mp-weixin/pages/device/detail.wxml b/unpackage/dist/dev/mp-weixin/pages/device/detail.wxml index 83f1305..3bf6fa2 100644 --- a/unpackage/dist/dev/mp-weixin/pages/device/detail.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/device/detail.wxml @@ -1 +1 @@ -{{a}}共享风扇设备号:{{c}}当前位置{{e}}电池电量{{h}}%计费规则¥{{i}}/小时封顶 ¥{{j}}不足60分钟按60分钟计费持续计费至99元视为买断使用须知请在使用前检查设备是否完好请在指定区域内使用设备归还时请确保设备完好,避免损坏微信支付分|550分及以上优享授权获取手机号为了提供更好的服务,需要授权获取您的手机号暂不授权 \ No newline at end of file +{{a}}共享风扇设备号:{{c}}当前位置{{e}}计费规则¥{{f}}/小时封顶 ¥{{g}}不足60分钟按60分钟计费持续计费至99元视为买断使用须知请在使用前检查设备是否完好请在指定区域内使用设备归还时请确保设备完好,避免损坏微信支付分|550分及以上优享授权获取手机号为了提供更好的服务,需要授权获取您的手机号暂不授权 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.js b/unpackage/dist/dev/mp-weixin/pages/index/index.js index 9672966..0fdff84 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.js +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.js @@ -1,12 +1,215 @@ "use strict"; const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); const util_index = require("../../util/index.js"); const config_url = require("../../config/url.js"); const config_user = require("../../config/user.js"); -const common_assets = require("../../common/assets.js"); +const utils_amap = require("../../utils/amap.js"); +if (!Math) { + MapComponent(); +} +const MapComponent = () => "../../components/MapComponent.js"; const _sfc_main = { - methods: { - async handleScan() { + __name: "index", + setup(__props) { + const searchKeyword = common_vendor.ref(""); + const userLocation = common_vendor.ref(null); + const positionList = common_vendor.ref([]); + const filteredPositions = common_vendor.ref([]); + const isExpanded = common_vendor.ref(false); + const isLoading = common_vendor.ref(false); + const showPhoneAuthPopup = common_vendor.ref(false); + const isLocationInitialized = common_vendor.ref(false); + const showLocationPopup = common_vendor.ref(false); + const mapRef = common_vendor.ref(null); + common_vendor.computed(() => { + if (userLocation.value && userLocation.value.address) { + return `${userLocation.value.district || "当前位置"} - 搜索附近场地`; + } + return "搜索附近场地"; + }); + common_vendor.onMounted(() => { + init(); + }); + common_vendor.onUnmounted(() => { + }); + const init = async () => { + isLoading.value = true; + try { + await getUserLocation(); + await loadPositions(); + } catch (error) { + common_vendor.index.__f__("error", "at pages/index/index.vue:177", "初始化失败:", error); + await loadPositions(); + } finally { + isLoading.value = false; + } + }; + const getUserLocation = async () => { + try { + const location = await new Promise((resolve, reject) => { + common_vendor.index.getLocation({ + type: "gcj02", + success: resolve, + fail: reject + }); + }); + userLocation.value = { + longitude: location.longitude, + latitude: location.latitude + }; + if (!isLocationInitialized.value) { + isLocationInitialized.value = true; + } + try { + const addressResult = await utils_amap.AmapUtil.regeocode(location.longitude, location.latitude); + if (addressResult.success) { + const addressInfo = addressResult.data; + userLocation.value.address = addressInfo.formatted_address; + userLocation.value.city = addressInfo.addressComponent.city; + userLocation.value.district = addressInfo.addressComponent.district; + } + } catch (error) { + } + setTimeout(async () => { + await loadPositions(); + common_vendor.index.hideLoading(); + common_vendor.index.showToast({ + title: "定位成功", + icon: "success" + }); + }, 800); + } catch (error) { + common_vendor.index.__f__("error", "at pages/index/index.vue:231", "获取位置失败:", error); + common_vendor.index.showToast({ + title: "获取位置失败,显示默认地图", + icon: "none" + }); + } + }; + const loadPositions = async () => { + try { + if (!common_vendor.index.getStorageSync("token")) { + await util_index.wxLogin(); + } + const res = await common_vendor.index.request({ + url: `${config_url.URL}/device/position/list`, + method: "GET", + header: { + "Authorization": "Bearer " + common_vendor.index.getStorageSync("token"), + "Clientid": common_vendor.index.getStorageSync("client_id") + } + }); + if (res.statusCode === 200 && res.data.code === 200) { + positionList.value = res.data.rows || []; + calculateDistances(); + filteredPositions.value = [...positionList.value]; + } else { + common_vendor.index.__f__("error", "at pages/index/index.vue:259", "获取场地列表失败:", res.data.msg); + } + } catch (error) { + common_vendor.index.__f__("error", "at pages/index/index.vue:262", "获取场地列表异常:", error); + } + }; + const calculateDistances = (centerPoint = null) => { + var _a; + const center = centerPoint || userLocation.value || ((_a = mapRef.value) == null ? void 0 : _a.mapCenter); + if (!center || typeof center.longitude === "undefined" || typeof center.latitude === "undefined") { + return; + } + positionList.value.forEach((item) => { + if (item.longitude && item.latitude) { + try { + const distance = utils_amap.AmapUtil.calculateDistance( + center.latitude, + center.longitude, + parseFloat(item.latitude), + parseFloat(item.longitude) + ); + item.distance = distance.toFixed(1); + } catch (error) { + common_vendor.index.__f__("error", "at pages/index/index.vue:286", "计算距离异常:", error, item); + item.distance = "999.0"; + } + } + }); + positionList.value.sort((a, b) => { + return (parseFloat(a.distance) || 999) - (parseFloat(b.distance) || 999); + }); + }; + const loadPositionsByCenter = async (center) => { + try { + if (!common_vendor.index.getStorageSync("token")) { + await util_index.wxLogin(); + } + const res = await common_vendor.index.request({ + url: `${config_url.URL}/device/position/list`, + method: "GET", + header: { + "Authorization": "Bearer " + common_vendor.index.getStorageSync("token"), + "Clientid": common_vendor.index.getStorageSync("client_id") + } + }); + if (res.statusCode === 200 && res.data.code === 200) { + positionList.value = res.data.rows || []; + calculateDistances(center); + const maxDistance = 10; + filteredPositions.value = positionList.value.filter((item) => { + return !item.distance || parseFloat(item.distance) <= maxDistance; + }); + } else { + common_vendor.index.__f__("error", "at pages/index/index.vue:326", "根据地图中心加载场地失败:", res.data.msg); + positionList.value = []; + filteredPositions.value = []; + } + } catch (error) { + common_vendor.index.__f__("error", "at pages/index/index.vue:331", "根据地图中心加载场地异常:", error); + } + }; + const handleRelocate = async () => { + common_vendor.index.showLoading({ title: "定位中..." }); + common_vendor.index.reLaunch({ + url: "/pages/index/index" + }); + }; + const onMapCenterChange = (center) => { + loadPositionsByCenter(center); + }; + const selectPosition = (position) => { + common_vendor.index.showActionSheet({ + itemList: ["扫码使用", "导航前往"], + success: (res) => { + switch (res.tapIndex) { + case 0: + handleScan(); + break; + case 1: + navigateToPosition(position); + break; + } + } + }); + }; + const selectPositionFromPopup = (position) => { + hideLocationList(); + setTimeout(() => { + selectPosition(position); + }, 200); + }; + const navigateToPosition = (position) => { + const latitude = parseFloat(position.latitude); + const longitude = parseFloat(position.longitude); + common_vendor.index.openLocation({ + latitude, + longitude, + name: position.name, + address: position.location + }); + }; + const toggleSheet = () => { + isExpanded.value = !isExpanded.value; + }; + const handleScan = async () => { try { const scanResult = await new Promise((resolve, reject) => { common_vendor.index.scanCode({ @@ -14,7 +217,6 @@ const _sfc_main = { fail: reject }); }); - common_vendor.index.__f__("log", "at pages/index/index.vue:152", scanResult.path); let deviceNo = util_index.getQueryString(scanResult.path, "deviceNo"); if (!deviceNo) { common_vendor.index.showToast({ @@ -27,7 +229,7 @@ const _sfc_main = { await util_index.wxLogin(); } const inUseRes = await common_vendor.index.request({ - url: `${config_url.URL || "http://127.0.0.1:8080"}/app/order/inUse`, + url: `${config_url.URL}/app/order/inUse`, method: "GET", header: { "Authorization": "Bearer " + common_vendor.index.getStorageSync("token"), @@ -39,18 +241,16 @@ const _sfc_main = { common_vendor.index.reLaunch({ url: `/pages/return/index?orderId=${inUseOrder.orderId}&deviceId=${deviceNo || inUseOrder.deviceNo}` }); - common_vendor.index.__f__("log", "at pages/index/index.vue:187", "已发起页面跳转"); return; } const orderRes = await common_vendor.index.request({ - url: `${config_url.URL || "http://127.0.0.1:8080"}/app/order/unpaid`, + url: `${config_url.URL}/app/order/unpaid`, method: "GET", header: { "Authorization": "Bearer " + common_vendor.index.getStorageSync("token"), "Clientid": common_vendor.index.getStorageSync("client_id") } }); - common_vendor.index.__f__("log", "at pages/index/index.vue:201", "待支付订单检查结果:", JSON.stringify(orderRes)); if (orderRes.statusCode == 200 && orderRes.data.code == 200 && orderRes.data.data) { const unpaidOrder = orderRes.data.data; common_vendor.index.navigateTo({ @@ -62,14 +262,12 @@ const _sfc_main = { if (deviceInfoRes.code == 200 && deviceInfoRes.data && deviceInfoRes.data.device) { const deviceInfo = deviceInfoRes.data.device; if (deviceInfo.feeConfig) { - common_vendor.index.__f__("log", "at pages/index/index.vue:219", "获取到设备feeConfig信息:", deviceInfo.feeConfig); try { const feeConfig = JSON.parse(deviceInfo.feeConfig); common_vendor.index.navigateTo({ url: `/pages/device/detail?deviceNo=${deviceNo}&feeConfig=${encodeURIComponent(deviceInfo.feeConfig)}` }); } catch (e) { - common_vendor.index.__f__("error", "at pages/index/index.vue:230", "解析feeConfig失败:", e); common_vendor.index.navigateTo({ url: `/pages/device/detail?deviceNo=${deviceNo}` }); @@ -80,7 +278,6 @@ const _sfc_main = { }); } } else { - common_vendor.index.__f__("error", "at pages/index/index.vue:244", "获取设备信息失败:", deviceInfoRes.msg || "未知错误"); common_vendor.index.showToast({ title: "获取设备信息失败", icon: "none" @@ -90,38 +287,97 @@ const _sfc_main = { }); } } catch (error) { - common_vendor.index.__f__("error", "at pages/index/index.vue:256", "获取设备信息异常:", error); - common_vendor.index.showToast({ - title: "获取设备信息失败", - icon: "none" - }); + common_vendor.index.__f__("error", "at pages/index/index.vue:492", "获取设备信息异常:", error); common_vendor.index.navigateTo({ url: `/pages/device/detail?deviceNo=${deviceNo}` }); } } } catch (error) { - common_vendor.index.__f__("error", "at pages/index/index.vue:269", "扫码处理失败:", error); + common_vendor.index.__f__("error", "at pages/index/index.vue:499", "扫码处理失败:", error); common_vendor.index.showToast({ title: "扫码失败", icon: "none" }); } - } + }; + const showLocationList = () => { + showLocationPopup.value = true; + }; + const hideLocationList = () => { + showLocationPopup.value = false; + }; + const onGetPhoneNumber = (e) => { + if (e.detail.errMsg === "getPhoneNumber:ok") { + showPhoneAuthPopup.value = false; + } + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: !isLoading.value && userLocation.value + }, !isLoading.value && userLocation.value ? { + b: common_vendor.sr(mapRef, "1cf27b2a-0", { + "k": "mapRef" + }), + c: common_vendor.o(handleRelocate), + d: common_vendor.o(handleScan), + e: common_vendor.o(showLocationList), + f: common_vendor.o(selectPosition), + g: common_vendor.o(onMapCenterChange), + h: common_vendor.p({ + userLocation: userLocation.value, + positionList: positionList.value, + filteredPositions: filteredPositions.value, + searchKeyword: searchKeyword.value + }) + } : {}, { + i: isLoading.value || !userLocation.value + }, isLoading.value || !userLocation.value ? {} : {}, { + j: showLocationPopup.value + }, showLocationPopup.value ? common_vendor.e({ + k: common_vendor.o(hideLocationList), + l: common_vendor.o(toggleSheet), + m: common_vendor.t(filteredPositions.value.length), + n: common_assets._imports_0, + o: common_vendor.o(hideLocationList), + p: common_vendor.f(filteredPositions.value, (item, index, i0) => { + return common_vendor.e({ + a: common_vendor.t(item.name), + b: common_vendor.t(item.describe), + c: common_vendor.t(item.location), + d: item.workTime && item.workTime !== "0" + }, item.workTime && item.workTime !== "0" ? { + e: common_vendor.t(item.workTime) + } : {}, { + f: item.distance + }, item.distance ? { + g: common_vendor.t(item.distance) + } : {}, { + h: common_vendor.t(item.status === "online" ? "营业中" : "暂停服务"), + i: common_vendor.n(item.status), + j: common_vendor.o(($event) => navigateToPosition(item), item.positionId), + k: item.positionId, + l: common_vendor.o(($event) => selectPositionFromPopup(item), item.positionId) + }); + }), + q: common_assets._imports_0, + r: filteredPositions.value.length === 0 && !isLoading.value + }, filteredPositions.value.length === 0 && !isLoading.value ? { + s: common_assets._imports_0 + } : {}, { + t: isExpanded.value ? 1 : "" + }) : {}, { + v: isLoading.value + }, isLoading.value ? {} : {}, { + w: showPhoneAuthPopup.value + }, showPhoneAuthPopup.value ? { + x: common_vendor.o(($event) => showPhoneAuthPopup.value = false), + y: common_vendor.o(onGetPhoneNumber), + z: common_vendor.o(($event) => showPhoneAuthPopup.value = false) + } : {}); + }; } }; -function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return common_vendor.e({ - a: common_assets._imports_0, - b: common_assets._imports_1, - c: common_vendor.o((...args) => $options.handleScan && $options.handleScan(...args)), - d: _ctx.showPhoneAuthPopup - }, _ctx.showPhoneAuthPopup ? { - e: common_vendor.o(($event) => _ctx.showPhoneAuthPopup = false), - f: common_vendor.o((...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)), - g: common_vendor.o(($event) => _ctx.showPhoneAuthPopup = false) - } : {}); -} -const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]); +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.json b/unpackage/dist/dev/mp-weixin/pages/index/index.json index 6038722..e11491c 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.json +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.json @@ -1,4 +1,6 @@ { - "navigationBarTitleText": "共享风扇", - "usingComponents": {} + "navigationBarTitleText": "附近场地", + "usingComponents": { + "map-component": "../../components/MapComponent" + } } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.wxml b/unpackage/dist/dev/mp-weixin/pages/index/index.wxml index 7e91b28..4698d63 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.wxml @@ -1 +1 @@ -共享风扇随时随地,享受清凉便捷租赁·品质保障扫码使用扫描设备二维码即可使用或归还收费规则5.0元/小时不足1小时按1小时计费封顶99元,计费达99元视为买断使用流程1扫码弹出2使用风扇3插入归还4结束订单授权获取手机号为了提供更好的服务和紧急联系,需要授权获取您的手机号暂不授权 \ No newline at end of file +正在获取位置信息...附近场地 ({{m}}){{item.a}}{{item.b}}{{item.c}}营业时间:{{item.e}}{{item.g}}km{{item.h}}导航暂无附近场地正在获取场地信息...授权获取手机号为了提供更好的服务和紧急联系,需要授权获取您的手机号暂不授权 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.wxss b/unpackage/dist/dev/mp-weixin/pages/index/index.wxss index 90979dd..ce0a62f 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.wxss @@ -24,332 +24,375 @@ /* 透明度 */ /* 文章场景相关 */ .container.data-v-1cf27b2a { - min-height: 100vh; + height: 100%; + width: 100%; background-color: #f6f7fb; - padding-bottom: 40rpx; + display: flex; + flex-direction: column; } -/* 顶部区域 */ -.header.data-v-1cf27b2a { - height: 300rpx; - background: linear-gradient(135deg, #1E88E5, #29B6F6); +/* 顶部搜索栏 */ +.header-search.data-v-1cf27b2a { + padding: 20rpx 30rpx; + background: #ffffff; + border-bottom: 1px solid #f0f0f0; + z-index: 10; +} +.header-search .search-box.data-v-1cf27b2a { + display: flex; + align-items: center; + background: #f8f9fa; + border-radius: 50rpx; + padding: 0 20rpx; + height: 80rpx; +} +.header-search .search-box .search-icon.data-v-1cf27b2a { + width: 32rpx; + height: 32rpx; + margin-right: 16rpx; +} +.header-search .search-box .search-input.data-v-1cf27b2a { + flex: 1; + font-size: 28rpx; + color: #333; +} +.header-search .search-box .location-btn.data-v-1cf27b2a { + width: 60rpx; + height: 60rpx; + display: flex; + align-items: center; + justify-content: center; + background: #2196F3; + border-radius: 50%; + margin-left: 16rpx; +} +.header-search .search-box .location-btn .location-icon.data-v-1cf27b2a { + width: 24rpx; + height: 24rpx; +} + +/* 场地列表弹窗 */ +.location-popup.data-v-1cf27b2a { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 2000; + display: flex; + align-items: flex-end; + justify-content: center; +} +.location-popup .popup-mask.data-v-1cf27b2a { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); +} +.location-popup .location-sheet.data-v-1cf27b2a { + background: #ffffff; + border-radius: 32rpx 32rpx 0 0; + box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1); + max-height: 70vh; + transition: all 0.3s ease; + z-index: 1; position: relative; + width: 100%; + display: flex; + flex-direction: column; + animation: slideUp-1cf27b2a 0.3s ease-out; +} +.location-popup .location-sheet.expanded.data-v-1cf27b2a { + max-height: 85vh; +} +.location-popup .location-sheet .sheet-handle.data-v-1cf27b2a { + display: flex; + justify-content: center; + padding: 20rpx 0; + cursor: pointer; +} +.location-popup .location-sheet .sheet-handle .handle-bar.data-v-1cf27b2a { + width: 80rpx; + height: 8rpx; + background: #e0e0e0; + border-radius: 4rpx; +} +.location-popup .location-sheet .sheet-header.data-v-1cf27b2a { + padding: 0 30rpx 20rpx; + border-bottom: 1px solid #f0f0f0; + display: flex; + justify-content: space-between; + align-items: center; +} +.location-popup .location-sheet .sheet-header .sheet-title.data-v-1cf27b2a { + font-size: 32rpx; + font-weight: 600; + color: #333; +} +.location-popup .location-sheet .sheet-header .close-btn.data-v-1cf27b2a { + width: 60rpx; + height: 60rpx; + display: flex; + align-items: center; + justify-content: center; + background: #f0f0f0; + border-radius: 50%; + transition: all 0.2s ease; +} +.location-popup .location-sheet .sheet-header .close-btn.data-v-1cf27b2a:active { + background: #e0e0e0; + transform: scale(0.95); +} +.location-popup .location-sheet .sheet-header .close-btn .close-icon.data-v-1cf27b2a { + width: 24rpx; + height: 24rpx; +} +.location-popup .location-sheet .sheet-content.data-v-1cf27b2a { + flex: 1; + padding: 20rpx 0; overflow: hidden; } -.header .header-bg.data-v-1cf27b2a { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - z-index: 1; +@keyframes slideUp-1cf27b2a { +from { + transform: translateY(100%); } -.header .header-bg .circle-decoration.data-v-1cf27b2a { - position: absolute; - border-radius: 50%; - background: rgba(255, 255, 255, 0.1); +to { + transform: translateY(0); } -.header .header-bg .circle-1.data-v-1cf27b2a { - width: 240rpx; - height: 240rpx; - right: -60rpx; - top: -90rpx; } -.header .header-bg .circle-2.data-v-1cf27b2a { - width: 160rpx; - height: 160rpx; - left: -40rpx; - bottom: 30rpx; - background: rgba(255, 255, 255, 0.08); -} -.header .header-bg .wave-decoration.data-v-1cf27b2a { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 40rpx; - background-size: auto 100%; - opacity: 0.6; -} -.header .header-content.data-v-1cf27b2a { - position: relative; - z-index: 2; - padding: 40rpx 40rpx 0; - height: 100%; - display: flex; - flex-direction: column; - justify-content: space-between; -} -.header .header-content .brand-area.data-v-1cf27b2a { +/* 场地列表项 */ +.position-item.data-v-1cf27b2a { display: flex; align-items: center; + padding: 24rpx 30rpx; + border-bottom: 1px solid #f8f9fa; } -.header .header-content .brand-area .brand-logo.data-v-1cf27b2a { - width: 90rpx; - height: 90rpx; - margin-right: 20rpx; +.position-item .position-info.data-v-1cf27b2a { + flex: 1; } -.header .header-content .brand-area .brand-text.data-v-1cf27b2a { - display: flex; - flex-direction: column; +.position-item .position-info .position-name.data-v-1cf27b2a { + font-size: 32rpx; + font-weight: 500; + color: #333; + margin-bottom: 8rpx; } -.header .header-content .brand-area .brand-text .title.data-v-1cf27b2a { - font-size: 48rpx; - color: #ffffff; - font-weight: bold; - line-height: 1.2; - text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1); +.position-item .position-info .position-desc.data-v-1cf27b2a { + font-size: 26rpx; + color: #666; + margin-bottom: 8rpx; } -.header .header-content .brand-area .brand-text .subtitle.data-v-1cf27b2a { - font-size: 28rpx; - color: rgba(255, 255, 255, 0.9); -} -.header .header-content .header-info.data-v-1cf27b2a { - display: flex; - flex-wrap: wrap; - gap: 20rpx; - margin-bottom: 30rpx; -} -.header .header-content .header-info .service-tag.data-v-1cf27b2a { +.position-item .position-info .position-location.data-v-1cf27b2a { display: flex; align-items: center; - background: rgba(255, 255, 255, 0.2); - border-radius: 40rpx; - padding: 10rpx 20rpx; + margin-bottom: 8rpx; } -.header .header-content .header-info .service-tag text.data-v-1cf27b2a { +.position-item .position-info .position-location .location-icon-small.data-v-1cf27b2a { + width: 24rpx; + height: 24rpx; + margin-right: 8rpx; +} +.position-item .position-info .position-location text.data-v-1cf27b2a { + font-size: 24rpx; + color: #999; +} +.position-item .position-info .position-time.data-v-1cf27b2a { + font-size: 24rpx; + color: #999; +} +.position-item .position-actions.data-v-1cf27b2a { + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 8rpx; +} +.position-item .position-actions .distance-info.data-v-1cf27b2a { + font-size: 24rpx; + color: #2196F3; + font-weight: 500; +} +.position-item .position-actions .status-tag.data-v-1cf27b2a { + padding: 8rpx 16rpx; + border-radius: 20rpx; + font-size: 22rpx; +} +.position-item .position-actions .status-tag.online.data-v-1cf27b2a { + background: #e8f5e8; + color: #4caf50; +} +.position-item .position-actions .status-tag.offline.data-v-1cf27b2a { + background: #ffeaea; + color: #f44336; +} +.position-item .position-actions .nav-btn.data-v-1cf27b2a { + padding: 12rpx 20rpx; + background: #2196F3; + border-radius: 20rpx; font-size: 24rpx; color: #ffffff; } -.header .header-content .header-info .service-tag .dot.data-v-1cf27b2a { - margin: 0 8rpx; - font-weight: bold; -} -/* 扫码区域 */ -.scan-section.data-v-1cf27b2a { - padding: 0 30rpx; -} -.scan-section .scan-card.data-v-1cf27b2a { - background: #ffffff; - border-radius: 16rpx; - box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05); - padding: 36rpx 0; - display: flex; - flex-direction: column; - align-items: center; -} -.scan-section .scan-card .scan-btn.data-v-1cf27b2a { - width: 220rpx; - height: 220rpx; - background: linear-gradient(135deg, #00B0FF, #0091EA); - border-radius: 50%; +/* 空状态 */ +.empty-state.data-v-1cf27b2a { display: flex; flex-direction: column; align-items: center; justify-content: center; + padding: 80rpx 0; +} +.empty-state .empty-icon.data-v-1cf27b2a { + width: 120rpx; + height: 120rpx; margin-bottom: 24rpx; - box-shadow: 0 10rpx 20rpx rgba(0, 176, 255, 0.2); - position: relative; - transition: all 0.2s ease; + opacity: 0.5; } -.scan-section .scan-card .scan-btn.data-v-1cf27b2a:active { - transform: scale(0.96); -} -.scan-section .scan-card .scan-btn .scan-icon.data-v-1cf27b2a { - width: 80rpx; - height: 80rpx; - margin-bottom: 12rpx; -} -.scan-section .scan-card .scan-btn .scan-text.data-v-1cf27b2a { - font-size: 36rpx; - color: #ffffff; - font-weight: 500; -} -.scan-section .scan-card .scan-desc.data-v-1cf27b2a { +.empty-state .empty-text.data-v-1cf27b2a { font-size: 28rpx; - color: #666; + color: #999; } -/* 收费规则卡片 */ -.price-card.data-v-1cf27b2a { - margin: 30rpx; - background: #ffffff; - border-radius: 16rpx; - overflow: hidden; - box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.04); - /* 微信免押金区域 */ -} -.price-card .card-header.data-v-1cf27b2a { - padding: 24rpx 30rpx; - background: linear-gradient(to right, #f5f9ff, #ffffff); - border-bottom: 2rpx solid #f0f0f0; -} -.price-card .card-header .card-title.data-v-1cf27b2a { - font-size: 32rpx; - font-weight: 600; - color: #333; - position: relative; - padding-left: 20rpx; -} -.price-card .card-header .card-title.data-v-1cf27b2a::before { - content: ""; - position: absolute; +/* 加载状态 */ +.loading-overlay.data-v-1cf27b2a { + position: fixed; + top: 0; left: 0; - top: 50%; - transform: translateY(-50%); - width: 6rpx; - height: 28rpx; - background: #2196F3; - border-radius: 3rpx; -} -.price-card .deposit-free.data-v-1cf27b2a { - margin: 20rpx 30rpx 0; - padding: 12rpx 16rpx; - background: #f0f9ff; - border-radius: 8rpx; - border-left: 4rpx solid #03A9F4; - display: flex; - align-items: center; -} -.price-card .deposit-free .deposit-icon.data-v-1cf27b2a { - width: 40rpx; - height: 40rpx; - margin-right: 16rpx; -} -.price-card .deposit-free .deposit-text.data-v-1cf27b2a { - font-size: 26rpx; - color: #03A9F4; - font-weight: 500; -} -.price-card .price-rules.data-v-1cf27b2a { - padding: 20rpx 30rpx 30rpx; -} -.price-card .price-rules .price-item.data-v-1cf27b2a { - display: flex; - flex-direction: column; - align-items: center; - margin-bottom: 20rpx; -} -.price-card .price-rules .price-item .price-tag.data-v-1cf27b2a { - font-size: 60rpx; - color: #FF6E00; - font-weight: bold; - line-height: 1; -} -.price-card .price-rules .price-item .price-tag .unit.data-v-1cf27b2a { - font-size: 32rpx; - font-weight: normal; - margin-left: 4rpx; -} -.price-card .price-rules .price-item .price-desc.data-v-1cf27b2a { - font-size: 28rpx; - color: #666; - margin-top: 10rpx; -} -.price-card .price-rules .divider.data-v-1cf27b2a { - height: 2rpx; - background-color: #f0f0f0; - margin: 20rpx 0 30rpx; -} -.price-card .price-rules .rule-list .rule-item.data-v-1cf27b2a { - display: flex; - align-items: flex-start; - margin-bottom: 20rpx; -} -.price-card .price-rules .rule-list .rule-item.data-v-1cf27b2a:last-child { - margin-bottom: 0; -} -.price-card .price-rules .rule-list .rule-item .rule-dot.data-v-1cf27b2a { - width: 12rpx; - height: 12rpx; - background: #2196F3; - border-radius: 50%; - margin: 12rpx 16rpx 0 0; - flex-shrink: 0; -} -.price-card .price-rules .rule-list .rule-item text.data-v-1cf27b2a { - font-size: 28rpx; - color: #666; - line-height: 1.5; -} - -/* 使用流程 */ -.usage-steps.data-v-1cf27b2a { - margin: 0 30rpx; - background: #ffffff; - border-radius: 16rpx; - box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.04); - overflow: hidden; -} -.usage-steps .steps-header.data-v-1cf27b2a { - padding: 24rpx 30rpx; - background: linear-gradient(to right, #f5f9ff, #ffffff); - border-bottom: 2rpx solid #f0f0f0; -} -.usage-steps .steps-header .steps-title.data-v-1cf27b2a { - font-size: 32rpx; - font-weight: 600; - color: #333; - position: relative; - padding-left: 20rpx; -} -.usage-steps .steps-header .steps-title.data-v-1cf27b2a::before { - content: ""; - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - width: 6rpx; - height: 28rpx; - background: #2196F3; - border-radius: 3rpx; -} -.usage-steps .steps-container.data-v-1cf27b2a { - padding: 40rpx 30rpx; - display: flex; - align-items: center; - justify-content: space-between; -} -.usage-steps .steps-container .step-item.data-v-1cf27b2a { - display: flex; - flex-direction: column; - align-items: center; - flex: 1; -} -.usage-steps .steps-container .step-item .step-icon.data-v-1cf27b2a { - width: 80rpx; - height: 80rpx; - background: #f0f9ff; - border: 2rpx solid #e1f5fe; - border-radius: 50%; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; - margin-bottom: 16rpx; + z-index: 1000; } -.usage-steps .steps-container .step-item .step-icon .step-number.data-v-1cf27b2a { - font-size: 36rpx; - color: #2196F3; - font-weight: 600; +.loading-overlay .loading-content.data-v-1cf27b2a { + background: #ffffff; + border-radius: 16rpx; + padding: 40rpx; + display: flex; + flex-direction: column; + align-items: center; } -.usage-steps .steps-container .step-item .step-text.data-v-1cf27b2a { - font-size: 26rpx; +.loading-overlay .loading-content .loading-spinner.data-v-1cf27b2a { + width: 60rpx; + height: 60rpx; + border: 4rpx solid #f0f0f0; + border-top: 4rpx solid #2196F3; + border-radius: 50%; + animation: spin-1cf27b2a 1s linear infinite; + margin-bottom: 24rpx; +} +.loading-overlay .loading-content text.data-v-1cf27b2a { + font-size: 28rpx; color: #666; } -.usage-steps .steps-container .step-arrow.data-v-1cf27b2a { - width: 40rpx; - height: 4rpx; - background: #e1f5fe; - position: relative; +@keyframes spin-1cf27b2a { +0% { + transform: rotate(0deg); } -.usage-steps .steps-container .step-arrow.data-v-1cf27b2a::after { - content: ""; +100% { + transform: rotate(360deg); +} +} +/* 地图加载状态 */ +.map-loading-placeholder.data-v-1cf27b2a { position: absolute; + top: 0; + left: 0; right: 0; - top: 50%; - margin-top: -8rpx; - border-left: 12rpx solid #e1f5fe; - border-top: 8rpx solid transparent; - border-bottom: 8rpx solid transparent; + bottom: 0; + background: #f6f7fb; + display: flex; + align-items: center; + justify-content: center; + z-index: 100; +} +.map-loading-placeholder .loading-content.data-v-1cf27b2a { + background: #ffffff; + border-radius: 16rpx; + padding: 40rpx; + display: flex; + flex-direction: column; + align-items: center; +} +.map-loading-placeholder .loading-content .loading-spinner.data-v-1cf27b2a { + width: 60rpx; + height: 60rpx; + border: 4rpx solid #f0f0f0; + border-top: 4rpx solid #2196F3; + border-radius: 50%; + animation: spin-1cf27b2a 1s linear infinite; + margin-bottom: 24rpx; +} +.map-loading-placeholder .loading-content text.data-v-1cf27b2a { + font-size: 28rpx; + color: #666; +} + +/* 手机号授权弹窗 */ +.phone-auth-popup.data-v-1cf27b2a { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 2000; + display: flex; + align-items: center; + justify-content: center; +} +.phone-auth-popup .popup-mask.data-v-1cf27b2a { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); +} +.phone-auth-popup .popup-content.data-v-1cf27b2a { + background: #ffffff; + border-radius: 24rpx; + margin: 0 60rpx; + padding: 40rpx; + position: relative; + z-index: 1; +} +.phone-auth-popup .popup-content .popup-header.data-v-1cf27b2a { + text-align: center; + margin-bottom: 30rpx; +} +.phone-auth-popup .popup-content .popup-header .popup-title.data-v-1cf27b2a { + font-size: 36rpx; + font-weight: 600; + color: #333; +} +.phone-auth-popup .popup-content .popup-body .auth-desc.data-v-1cf27b2a { + text-align: center; + margin-bottom: 40rpx; +} +.phone-auth-popup .popup-content .popup-body .auth-desc text.data-v-1cf27b2a { + font-size: 28rpx; + color: #666; + line-height: 1.6; +} +.phone-auth-popup .popup-content .popup-body .auth-btn.data-v-1cf27b2a { + width: 100%; + height: 88rpx; + background: #2196F3; + border-radius: 44rpx; + border: none; + color: #ffffff; + font-size: 32rpx; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 20rpx; +} +.phone-auth-popup .popup-content .popup-body .auth-cancel.data-v-1cf27b2a { + text-align: center; + padding: 20rpx; +} +.phone-auth-popup .popup-content .popup-body .auth-cancel text.data-v-1cf27b2a { + font-size: 28rpx; + color: #999; } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/my/index.js b/unpackage/dist/dev/mp-weixin/pages/my/index.js index 6c83fee..d88a107 100644 --- a/unpackage/dist/dev/mp-weixin/pages/my/index.js +++ b/unpackage/dist/dev/mp-weixin/pages/my/index.js @@ -95,7 +95,7 @@ const _sfc_main = { i: common_vendor.o(handleUserProfileClick), j: common_vendor.t(deposit.value), k: common_vendor.o(handleWithdraw), - l: common_assets._imports_1$1, + l: common_assets._imports_1, m: common_vendor.p({ type: "right", size: "16", diff --git a/unpackage/dist/dev/mp-weixin/utils/amap.js b/unpackage/dist/dev/mp-weixin/utils/amap.js new file mode 100644 index 0000000..06f7c03 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/utils/amap.js @@ -0,0 +1,155 @@ +"use strict"; +const common_vendor = require("../common/vendor.js"); +const AMAP_KEY = "4c513a688938fd89b88b296e867f66ec"; +class AmapUtil { + constructor() { + this.key = AMAP_KEY; + } + // 逆地理编码 - 根据经纬度获取地址信息 + async regeocode(longitude, latitude) { + try { + const res = await common_vendor.index.request({ + url: "https://restapi.amap.com/v3/geocode/regeo", + method: "GET", + data: { + key: this.key, + location: `${longitude},${latitude}`, + poitype: "", + radius: 1e3, + extensions: "base", + batch: false, + roadlevel: 0 + } + }); + if (res.statusCode === 200 && res.data.status === "1") { + return { + success: true, + data: res.data.regeocode + }; + } else { + return { + success: false, + message: res.data.info || "逆地理编码失败" + }; + } + } catch (error) { + common_vendor.index.__f__("error", "at utils/amap.js:38", "逆地理编码异常:", error); + return { + success: false, + message: "网络异常" + }; + } + } + // 地理编码 - 根据地址获取经纬度 + async geocode(address, city = "") { + try { + const res = await common_vendor.index.request({ + url: "https://restapi.amap.com/v3/geocode/geo", + method: "GET", + data: { + key: this.key, + address, + city + } + }); + if (res.statusCode === 200 && res.data.status === "1" && res.data.geocodes.length > 0) { + return { + success: true, + data: res.data.geocodes[0] + }; + } else { + return { + success: false, + message: res.data.info || "地理编码失败" + }; + } + } catch (error) { + common_vendor.index.__f__("error", "at utils/amap.js:71", "地理编码异常:", error); + return { + success: false, + message: "网络异常" + }; + } + } + // 搜索POI + async searchPOI(keywords, location = "", radius = 3e3, city = "") { + try { + const res = await common_vendor.index.request({ + url: "https://restapi.amap.com/v3/place/text", + method: "GET", + data: { + key: this.key, + keywords, + location, + radius, + city, + citylimit: true + } + }); + if (res.statusCode === 200 && res.data.status === "1") { + return { + success: true, + data: res.data.pois || [] + }; + } else { + return { + success: false, + message: res.data.info || "搜索失败" + }; + } + } catch (error) { + common_vendor.index.__f__("error", "at utils/amap.js:107", "POI搜索异常:", error); + return { + success: false, + message: "网络异常" + }; + } + } + // 路径规划 + async getRoute(origin, destination, strategy = 0) { + try { + const res = await common_vendor.index.request({ + url: "https://restapi.amap.com/v3/direction/driving", + method: "GET", + data: { + key: this.key, + origin, + destination, + strategy, + extensions: "base" + } + }); + if (res.statusCode === 200 && res.data.status === "1") { + return { + success: true, + data: res.data.route + }; + } else { + return { + success: false, + message: res.data.info || "路径规划失败" + }; + } + } catch (error) { + common_vendor.index.__f__("error", "at utils/amap.js:142", "路径规划异常:", error); + return { + success: false, + message: "网络异常" + }; + } + } + // 计算两点间距离 + calculateDistance(lat1, lng1, lat2, lng2) { + const radLat1 = lat1 * Math.PI / 180; + const radLat2 = lat2 * Math.PI / 180; + const a = radLat1 - radLat2; + const b = lng1 * Math.PI / 180 - lng2 * Math.PI / 180; + let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2))); + s = s * 6378.137; + s = Math.round(s * 1e4) / 1e4; + return s; + } +} +const AmapUtil$1 = new AmapUtil(); +exports.AmapUtil = AmapUtil$1; +//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/amap.js.map diff --git a/utils/amap.js b/utils/amap.js new file mode 100644 index 0000000..83102a0 --- /dev/null +++ b/utils/amap.js @@ -0,0 +1,163 @@ +// 高德地图工具类 +const AMAP_KEY = '4c513a688938fd89b88b296e867f66ec' + +class AmapUtil { + constructor() { + this.key = AMAP_KEY + } + + // 逆地理编码 - 根据经纬度获取地址信息 + async regeocode(longitude, latitude) { + try { + const res = await uni.request({ + url: 'https://restapi.amap.com/v3/geocode/regeo', + method: 'GET', + data: { + key: this.key, + location: `${longitude},${latitude}`, + poitype: '', + radius: 1000, + extensions: 'base', + batch: false, + roadlevel: 0 + } + }) + + if (res.statusCode === 200 && res.data.status === '1') { + return { + success: true, + data: res.data.regeocode + } + } else { + return { + success: false, + message: res.data.info || '逆地理编码失败' + } + } + } catch (error) { + console.error('逆地理编码异常:', error) + return { + success: false, + message: '网络异常' + } + } + } + + // 地理编码 - 根据地址获取经纬度 + async geocode(address, city = '') { + try { + const res = await uni.request({ + url: 'https://restapi.amap.com/v3/geocode/geo', + method: 'GET', + data: { + key: this.key, + address: address, + city: city + } + }) + + if (res.statusCode === 200 && res.data.status === '1' && res.data.geocodes.length > 0) { + return { + success: true, + data: res.data.geocodes[0] + } + } else { + return { + success: false, + message: res.data.info || '地理编码失败' + } + } + } catch (error) { + console.error('地理编码异常:', error) + return { + success: false, + message: '网络异常' + } + } + } + + // 搜索POI + async searchPOI(keywords, location = '', radius = 3000, city = '') { + try { + const res = await uni.request({ + url: 'https://restapi.amap.com/v3/place/text', + method: 'GET', + data: { + key: this.key, + keywords: keywords, + location: location, + radius: radius, + city: city, + citylimit: true + } + }) + + if (res.statusCode === 200 && res.data.status === '1') { + return { + success: true, + data: res.data.pois || [] + } + } else { + return { + success: false, + message: res.data.info || '搜索失败' + } + } + } catch (error) { + console.error('POI搜索异常:', error) + return { + success: false, + message: '网络异常' + } + } + } + + // 路径规划 + async getRoute(origin, destination, strategy = 0) { + try { + const res = await uni.request({ + url: 'https://restapi.amap.com/v3/direction/driving', + method: 'GET', + data: { + key: this.key, + origin: origin, + destination: destination, + strategy: strategy, + extensions: 'base' + } + }) + + if (res.statusCode === 200 && res.data.status === '1') { + return { + success: true, + data: res.data.route + } + } else { + return { + success: false, + message: res.data.info || '路径规划失败' + } + } + } catch (error) { + console.error('路径规划异常:', error) + return { + success: false, + message: '网络异常' + } + } + } + + // 计算两点间距离 + calculateDistance(lat1, lng1, lat2, lng2) { + const radLat1 = lat1 * Math.PI / 180.0 + const radLat2 = lat2 * Math.PI / 180.0 + const a = radLat1 - radLat2 + const b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0 + let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2))) + s = s * 6378.137 + s = Math.round(s * 10000) / 10000 + return s + } +} + +export default new AmapUtil() \ No newline at end of file diff --git a/utils/staticMap.js b/utils/staticMap.js new file mode 100644 index 0000000..621a31b --- /dev/null +++ b/utils/staticMap.js @@ -0,0 +1,194 @@ +// 高德静态地图API工具类 +const AMAP_KEY = '4c513a688938fd89b88b296e867f66ec' + +class StaticMapUtil { + constructor() { + this.key = AMAP_KEY + this.baseUrl = 'https://restapi.amap.com/v3/staticmap' + } + + /** + * 生成静态地图URL + * @param {Object} options 地图配置选项 + * @returns {String} 静态地图URL + */ + generateMapUrl(options = {}) { + const defaultOptions = { + location: '116.397128,39.916527', // 默认中心点(北京) + zoom: 13, // 缩放级别 + size: '750*500', // 图片尺寸 + scale: 2, // 高清显示 + markers: [], // 标记点 + labels: [], // 文字标注 + paths: [], // 路径 + traffic: 0, // 交通路况 0-不显示 1-显示 + format: 'png' // 图片格式 + } + + const config = { ...defaultOptions, ...options } + + let url = `${this.baseUrl}?key=${this.key}` + url += `&location=${config.location}` + url += `&zoom=${config.zoom}` + url += `&size=${config.size}` + url += `&scale=${config.scale}` + url += `&traffic=${config.traffic}` + url += `&format=${config.format}` + + // 添加标记点 + if (config.markers && config.markers.length > 0) { + const markersStr = config.markers.map(marker => { + let markerStr = '' + if (marker.size) markerStr += `size:${marker.size}|` + if (marker.color) markerStr += `color:${marker.color}|` + if (marker.label) markerStr += `label:${marker.label}|` + markerStr += `${marker.longitude},${marker.latitude}` + return markerStr + }).join('|') + url += `&markers=${encodeURIComponent(markersStr)}` + } + + // 添加文字标注 + if (config.labels && config.labels.length > 0) { + const labelsStr = config.labels.map(label => { + let labelStr = '' + if (label.content) labelStr += `content:${label.content}|` + if (label.font) labelStr += `font:${label.font}|` + if (label.bold) labelStr += `bold:${label.bold}|` + if (label.fontSize) labelStr += `fontSize:${label.fontSize}|` + if (label.fontColor) labelStr += `fontColor:${label.fontColor}|` + if (label.background) labelStr += `background:${label.background}|` + labelStr += `${label.longitude},${label.latitude}` + return labelStr + }).join('|') + url += `&labels=${encodeURIComponent(labelsStr)}` + } + + return url + } + + /** + * 为场地列表生成静态地图URL + * @param {Array} positions 场地列表 + * @param {Object} options 额外选项 + * @returns {String} 静态地图URL + */ + generatePositionsMapUrl(positions = [], options = {}) { + if (!positions || positions.length === 0) { + return this.generateMapUrl(options) + } + + // 计算地图中心点和缩放级别 + const center = this.calculateCenter(positions) + const zoom = this.calculateOptimalZoom(positions, center) + + // 生成标记点 + const markers = positions.map((position, index) => ({ + longitude: parseFloat(position.longitude), + latitude: parseFloat(position.latitude), + size: 'mid', + color: position.status === 'online' ? 'green' : 'red', + label: String.fromCharCode(65 + (index % 26)) // A, B, C... + })) + + return this.generateMapUrl({ + location: `${center.longitude},${center.latitude}`, + zoom: zoom, + markers: markers, + ...options + }) + } + + /** + * 计算多个点的中心位置 + * @param {Array} positions 位置数组 + * @returns {Object} 中心点坐标 + */ + calculateCenter(positions) { + if (positions.length === 0) { + return { longitude: 116.397128, latitude: 39.916527 } + } + + const validPositions = positions.filter(p => p.longitude && p.latitude) + if (validPositions.length === 0) { + return { longitude: 116.397128, latitude: 39.916527 } + } + + const sum = validPositions.reduce((acc, pos) => ({ + longitude: acc.longitude + parseFloat(pos.longitude), + latitude: acc.latitude + parseFloat(pos.latitude) + }), { longitude: 0, latitude: 0 }) + + return { + longitude: (sum.longitude / validPositions.length).toFixed(6), + latitude: (sum.latitude / validPositions.length).toFixed(6) + } + } + + /** + * 计算最佳缩放级别 + * @param {Array} positions 位置数组 + * @param {Object} center 中心点 + * @returns {Number} 缩放级别 + */ + calculateOptimalZoom(positions, center) { + if (positions.length <= 1) return 15 + + const validPositions = positions.filter(p => p.longitude && p.latitude) + if (validPositions.length <= 1) return 15 + + // 计算最大距离 + let maxDistance = 0 + validPositions.forEach(pos => { + const distance = this.getDistance( + center.latitude, center.longitude, + parseFloat(pos.latitude), parseFloat(pos.longitude) + ) + maxDistance = Math.max(maxDistance, distance) + }) + + // 根据最大距离确定缩放级别 + if (maxDistance < 1) return 16 // 1km内 + if (maxDistance < 2) return 15 // 2km内 + if (maxDistance < 5) return 14 // 5km内 + if (maxDistance < 10) return 13 // 10km内 + if (maxDistance < 20) return 12 // 20km内 + if (maxDistance < 50) return 11 // 50km内 + return 10 // 50km以上 + } + + /** + * 计算两点间距离(公里) + * @param {Number} lat1 纬度1 + * @param {Number} lng1 经度1 + * @param {Number} lat2 纬度2 + * @param {Number} lng2 经度2 + * @returns {Number} 距离(公里) + */ + getDistance(lat1, lng1, lat2, lng2) { + const radLat1 = lat1 * Math.PI / 180.0 + const radLat2 = lat2 * Math.PI / 180.0 + const a = radLat1 - radLat2 + const b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0 + let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2))) + s = s * 6378.137 + s = Math.round(s * 10000) / 10000 + return s + } + + /** + * 预加载地图图片 + * @param {String} mapUrl 地图URL + * @returns {Promise} 图片加载Promise + */ + preloadMapImage(mapUrl) { + return new Promise((resolve, reject) => { + const img = new Image() + img.onload = () => resolve(mapUrl) + img.onerror = reject + img.src = mapUrl + }) + } +} + +export default new StaticMapUtil() \ No newline at end of file