1import{u as F,_ as V,a as L,b as Y,c as $,d as G,e as N,f as U,g as O,h as z}from"./1uTAKOxz.js";import{_ as R}from"./CbBh4sUL.js";import{_ as q}from"./sBjZkOV6.js";import{_ as J}from"./CKGOmlzf.js";import{_ as K}from"./x695gxN7.js";import{u as Q}from"./7wDI_HF0.js";import{u as W}from"./DbA58H3q.js";import{h as X,i as Z,j as ee,u as oe,c as d,f as t,F as P,b as o,a as s,w as b,l as te,m as se,o as v}from"./CBVuVATE.js";import{_ as ne}from"./DlAUqK2U.js";import"./C-s4FLFn.js";import"./DpgSet8m.js";import"./C13c8upd.js";const ae={class:"home-page"},ie={class:"discover-section"},re={class:"service-section"},ce={__name:"index-for-redirect",async setup(le){let a,g;const{isMobile:h}=Q(),l=W(),{homeBanners:i,homeActivities:m,homeProducts:r,homeVideos:c,homeServices:u,homeProductSeries:p,fetchAllHomeData:x}=F(),H=[{id:"game",image:"/product-assets/images/series-game.png",title:"æ¸¸ææ¬ç³»å",subtitle:"",link:"/series/game"},{id:"thin",image:"/product-assets/images/series-thin.png",title:"è½»èæ¬ç³»å",subtitle:"",link:"/series/thin"},{id:"desktop",image:"/product-assets/images/series-desktop.png",title:"å°å¼æºç³»å",subtitle:"",link:"/series/desktop"}],{data:n}=([a,g]=X(async()=>te("homePageData",async()=>{const{getCachedData:_}=se();return await _("cache:home:index:v2",async()=>(await x(),{banners:i.value,activities:m.value,products:r.value,videos:c.value,services:u.value,series:p.value}),3600)},{server:!0,lazy:!0})),a=await a,g(),a);n.value&&(i.value=n.value.banners||[],m.value=n.value.activities||[],r.value=n.value.products||[],c.value=n.value.videos||[],u.value=n.value.services||[],p.value=n.value.series||[]);const f=()=>{{const e=(window.scrollY||window.pageYOffset)<=0;
1l.setHeaderTransparent(e)}};return Z(()=>{h.value||(l.setHeaderTransparent(!0),window.addEventListener("scroll",f,{passive:!0}))}),ee(()=>{l.setHeaderTransparent(!1),window.removeEventListener("scroll",f)}),oe({script:[{innerHTML:` 2 // 页é¢ç¹å®çå èèæ¬ 3(function() { 4 // 1. æ£æ¥å½å页é¢è·¯å¾ 5 if (window.location.pathname !== '/') { 6 console.log('éæ ¹è·¯å¾é¡µé¢ï¼è·³è¿IPæ£æµ'); 7 return; 8 } 9 10 console.log('页é¢åå§åèæ¬ - IPå°çä½ç½®æ£æµ'); 11 12 // 2. åèµ·APIè¯·æ± 13 fetch('https://gwapi.mechrevo.com/api/v1/client/home/location', { 14 method: 'GET', 15 headers: { 16 'Content-Type': 'application/json' 17 } 18 }) 19 .then(response => { 20 // 3. æ£æ¥HTTPååºç¶æ 21 if (!response.ok) { 22 throw new Error(\`HTTPé误! ç¶æç : \${response.status}\`); 23 } 24 return response.json(); 25 }) 26 .then(data => { 27 console.log('APIååºæ°æ®:', data); 28 29 // 4. æ£æ¥APIååºç¶æ 30 if (data.status !== 'SUCCESS') { 31 console.warn('APIè¿åç¶æéSUCCESS:', data.status); 32 return; 33 } 34 35 // 5. 夿æ¯å¦ä¸ºå½å IP 36 const isDomesticIP = data.result && 37 data.result.location && 38 data.result.location.province && 39 data.result.location.province.length > 0 && 40 data.result.location.city && 41 data.result.location.city.length > 0; 42 43 // 6. æ ¹æ®IPå°åºè¿è¡è·³è½¬ 44 if (isDomesticIP) { 45 console.log('æ£æµå°å½å IPï¼è·³è½¬å° /cn'); 46 window.location.href = '/cn'; 47 } else { 48 console.log('æ£æµå°éå½å IPï¼è·³è½¬å° /en'); 49 window.location.href = '/en'; 50 } 51 }) 52 .catch(error => { 53 // 7. é误å¤ç 54 console.error('IPæ£æµå¤±è´¥:', error); 55 // å¯ä»¥æ ¹æ®éæ±æ·»å é»è®¤è·³è½¬é»è¾ï¼ä¾å¦ï¼ 56 // window.location.href = '/en'; // é»è®¤è·³è½¬å°è±æç 57 }); 58})(); 59 `,type:"text/javascript",tagPosition:"bodyClose"}]}),(_,e)=>{const S=V,y=L,I=Y,w=R,k=q,C=J,T=$,A=G,M=N,D=U,B=O,E=z,j=K;return v(),d("div",ae,[t(h)?(v(),d(P,{key:1},[o(T,{banners:t(i)},null,8,["banners"]),o(A,{activities:t(m)},null,8,["activities"]),o(M,{products:t(r)},null,8,["products"]),o(D,{videos:t(c)},null,8,["videos"]),o(B,{services:t(u)},null,8,["services"]),o(E,{series:t(p)},null,8,["series"]),o(j)],64)):(v(),d(P,{key:0},[o(S,{banners:t(i)},null,8,["banners"]),o(y,{products:t(r)},null,8,["products"]),o(I,{videos:t(c),style:{"padding-top":"180px"}},null,8,["videos"]),s("div",ie,[e[1]||(e[1]=s("h2",{class:"discover-title"},"æ¢ç´¢ç²¾å½©",-1)),e[2]||(e[2]=s("p",{class:"discover-subtitle"},"å³å»ææ¡åçææ°èµè®¯",-1)),o(w,{to:"/news",class:"discover-image-wrapper"},{default:b(()=>[...e[0]||(e[0]=[s("img",{src:"https://glbfs.mechrevo.com/website/static/images/home-discover.jpg",alt:"æ¢ç´¢ç²¾å½©",class:"discover-image"},null,-1)])]),_:1})]),o(k,{title:"äºè§£ä¸åç³»åç产å",subtitle:"æ´å年轻人åç±çä¸å½åç",items:H,style:{padding:"120px 0 0"}}),s("div",re,[e[4]||(e[4]=s("h2",{class:"service-title"},"å®åæå¡",-1)),e[5]||(e[5]=s("p",{class:"service-subtitle"},null,-1)),o(w,{to:"/service",class:"service-image-wrapper"},{default:b(()=>[...e[3]||(e[3]=[s("img",{src:"https://glbfs.mechrevo.com/website/static/images/home-service.jpg",alt:"å®åæå¡",class:"service-image"},null,-1)])]),_:1})]),o(C)],64))])}}},xe=ne(ce,[["__scopeId","data-v-faacf681"]]);export{xe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.