You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
19 KiB
2 lines
19 KiB
|
2 days ago
|
import{h as e,S as a,r as t,i as l,g as s,s as n,a as u,b as o,c,A as i,d as r,e as d,f as v,w as f,o as m,j as p,k as _,l as h,m as y,n as g,p as w,q as k,t as b,u as S,v as C,x,y as I,z as M,B as $,F,C as j,D as P,E as T,G as V,I as z,H as L,J as U,M as A,K as q,L as N}from"./index-AX7ZPvYY.js";import{s as R}from"./search.BJnl3YRK.js";import{d as B,F as D}from"./FilterPickerSheet.hCLk5w_V.js";import{f as E}from"./activity.k1jR9V-B.js";import{h as G,f as H}from"./geo.BHVFNtB7.js";import{M as J,m as K}from"./ticketMap.By4_sH7a.js";import{v as O}from"./venueTypes.VBfNTKYP.js";import{_ as Q}from"./_plugin-vue_export-helper.BCo6x5W8.js";const W="szkp_force_loc_prompt",X="szkp_wechat_oauth_denied",Y="szkp_h5_oauth_state_ss";let Z=null;function ee(){return Z||(Z=async function(){var r,d;if(!l())return!0;const v=new URL(window.location.href),f=v.searchParams.get("code"),m=v.searchParams.get("state");if(v.searchParams.get("err")){try{window.sessionStorage.setItem(X,"1")}catch{}return v.searchParams.delete("code"),v.searchParams.delete("state"),v.searchParams.delete("err"),window.history.replaceState({},"",v.pathname+v.search+v.hash),!0}if(f){let l="";try{l=window.sessionStorage.getItem(Y)||""}catch{}l||(l=s(a.oauthState)||"");if(Boolean(m&&l&&String(m)!==String(l))){n({title:"授权状态异常,请关闭页面后重试",icon:"none"});try{window.sessionStorage.removeItem(Y)}catch{}t(a.oauthState)}else{u({title:"授权登录中…",mask:!0});try{const t=await e.post("/h5/wechat/oauth",{code:f},{withAuth:!1});if(null==t?void 0:t.token){o(a.accessToken,t.token);try{window.sessionStorage.setItem(W,"1")}catch{}}}catch(h){const e=(null==h?void 0:h.message)||(null==(d=null==(r=null==h?void 0:h.errors)?void 0:r.code)?void 0:d[0])||"微信登录失败";n({title:e,icon:"none"})}finally{c()}}try{window.sessionStorage.removeItem(Y)}catch{}return t(a.oauthState),v.searchParams.delete("code"),v.searchParams.delete("state"),window.history.replaceState({},"",v.pathname+v.search+v.hash),!0}if(s(a.accessToken))return!0;try{if("1"===window.sessionStorage.getItem(X))return!0}catch{}const p=encodeURIComponent(function(){if("undefined"==typeof window)return"";const e=new URL(window.location.href);return e.hash="",e.search="",e.toString()}()),_=`${Date.now()}-${Math.random().toString(36).slice(2,10)}`;try{window.sessionStorage.setItem(Y,_)}catch{}return o(a.oauthState,_),window.location.href=`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${i.wechatAppId}&redirect_uri=${p}&response_type=code&scope=snsapi_userinfo&state=${_}#wechat_redirect`,!1}().finally(()=>{Z=null})),Z}const ae=Q(r({__name:"index",setup(s){const u=d(!1),o=d(null),c=d(null),i=d({latitude:31.2989,longitude:120.5853}),r=d("map"),Q=d(""),X=d("全部区域"),Y=d(""),Z=d("全部分类"),ae=d(""),te=d("预约类型"),le=d(""),se=d("收费类型"),ne=d(""),ue=d(!1),oe=d(""),ce=d([]),ie=d(""),re=d(null),de=d(null),ve=d(!1),fe=d(null),me=v(()=>{var e,a;const t={};for(const l of(null==(a=null==(e=o.value)?void 0:e.venue_dicts)?void 0:a.venue_type)??[])t[l.value]=l.label;return t}),pe=v(()=>{var e,a;const t={};for(const l of(null==(a=null==(e=o.value)?void 0:e.venue_dicts)?void 0:a.ticket_type)??[])t[l.value]=l.label;return t});function _e(e){return e?me.value[e]||e:""}function he(e){return e?pe.value[e]||e:""}function ye(e){try{"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem(a.locConsent,e)}catch{}}const ge=v(()=>{var e,a;if(c.value)return c.value.total.toLocaleString();return((null==(a=null==(e=o.value)?void 0:e.stats)?void 0:a.reservation_total)??0).toLocaleString()}),we=v(()=>{var e,a;const t=[...(null==(e=c.value)?void 0:e.top3)??(null==(a=o.value)?void 0:a.top_live_venues)??[]].sort((e,a)=>Number(a.people_count??0)-Number(e.people_count??0)),l=[];for(let s=0;s<3;s++){const e=t[s];e?l.push({id:e.id,name:e.name,people_count:e.people_count,empty:!1}):l.push({id:0,name:"",people_count:0,empty:!0})}return l}),ke=v(()=>{var e,a;return[{label:"全部区域",value:""},...((null==(a=null==(e=o.value)?void 0:e.venue_dicts)?void 0:a.district)??[]).map(e
|