index.6b20dc77.js 1.0 KB

1
  1. import{d as p,bR as r,bS as S,g as t,H as w,r as n,fi as M,f7 as a,fj as h,d4 as b,fk as c,bN as d,bU as v,ff as y,bq as _,y as k,z as T,fl as g,b as D,A,bY as I}from"./offline.ee04b43a.js";const C=p({__name:"index",setup(U){const i=r();let o;const f=async()=>{w.push(n(!1)),M.push(n("full"));let e;if("modelId"in a){const s=await h(Number(a.modelId));s.status!==b.SUCCESS&&(e=s)}else if("m"in a){const s=await c({numList:[a.m],type:d.SWSSMX}),l=await c({numList:[a.m],type:d.SWYDMX});e=[...s,...l].find(m=>m.num===a.m),console.log(e)}if(!e)return v.alert("\u6A21\u578B\u4E0D\u5B58\u5728\uFF01");if(i.value){y.value=e.title||e.modelTitle;const s=_({modelId:e.modelId,show:!0,url:e.modelGlbUrl||e.modelObjUrl,type:e.type,opacity:100,modelType:e.modelDateType});t.value.push(s),await k(T),o=g.push(n(new Map([[s,!0]]))),await new Promise(l=>{const u=D(()=>{A.value&&(l(),setTimeout(()=>u()))})}),window.__sdk=I}};return S(()=>{const e=t.value;return t.value=[],f(),()=>{t.value=e,o&&o()}}),(e,s)=>null}});export{C as default};