PageSourceSearch

https://www.ckeyclf.com/_next/static/chunks/app/page-4299c8c642ced7ca.js

js ckeyclf.com collected 2026-10-10 02:21:29 UTC 30,395 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{41069:function(e,t,n){Promise.resolve().then(n.bind(n,43559))},43559:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var r,a,s=n(78350),i=n(99151),o=n(73707),c=n(1397),l=n(66370),d=n(90564);let u=(0,d.Z)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var h=n(23152);let m=(0,d.Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var p=n(82099),f=n(31319),g=n(23371),x=n(96091),v=n(15894),y=n(16385);let w="https://api.classkeyin.com";async function b(e){try{let t=e?"".concat(w,"/api/v2/banners?areaCode=").concat(e):"".concat(w,"/api/v2/banners"),n=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"},cache:"no-store"});if(!n.ok)throw Error("获取推荐位失败");return n.json()}catch(e){return console.error("获取推荐位失败:",e),[]}}async function N(e){try{await fetch("".concat(w,"/api/v2/banners/").concat(e,"/view"),{method:"POST",headers:{"Content-Type":"application/json"}})}catch(e){console.error("增加浏览次数失败:",e)}}async function j(e){try{await fetch("".concat(w,"/api/v2/banners/").concat(e,"/click"),{method:"POST",headers:{"Content-Type":"application/json"}})}catch(e){console.error("增加点击次数失败:",e)}}(r=a||(a={})).EXTERNAL="EXTERNAL",r.INTERNAL="INTERNAL",r.TEACHER="TEACHER";var k=n(931),E=n(912),P=n(51164);let T={HOT:{label:"热门",bg:"bg-red-500",text:"text-white"},NEW:{label:"上新",bg:"bg-green-500",text:"text-white"},RECOMMEND:{label:"推荐",bg:"bg-blue-500",text:"text-white"},TOP:{label:"精选",bg:"bg-amber-500",text:"text-white"}},S={code:"5101",name:"成都",initial:"C"},C=[S],_=()=>{{let e=localStorage.getItem("selected_city");if(e)return e}return S.name};function I(){let e=(0,o.useRouter)(),[t,n]=(0,i.useState)([]),[r,d]=(0,i.useState)([]),[w,I]=(0,i.useState)(!0),[A,L]=(0,i.useState)(!1),[O,R]=(0,i.useState)(0),[Z,M]=(0,i.useState)(!1),[B,U]=(0,i.useState)(!1),[z,H]=(0,i.useState)(()=>_()),[q,W]=(0,i.useState)(C),[D,X]=(0,i.useState)(null),[J,G]=(0,i.useState)(1),[F,Y]=(0,i.useState)(!0),[$,Q]=(0,i.useState)(()=>({location:_(),priceRange:"",service:""})),[V,K]=(0,i.useState)([]),[ee,et]=(0,i.useState)([]),[en,er]=(0,i.useState)(""),ea=e=>{var t;return(null===(t=q.find(t=>t.name===e))||void 0===t?void 0:t.code)||S.code};(0,i.useEffect)(()=>{(async()=>{try{let e=await fetch("".concat("https://api.classkeyin.com","/api/v2/teachers/available-cities"));if(!e.ok)throw Error("获取城市列表失败");let t=await e.json();if(!Array.isArray(t)||0===t.length)return;W(t);let n=localStorage.getItem("selected_city")||z,r=t.some(e=>e.name===n)?n:t[0].name;H(r),Q(e=>({...e,location:r})),localStorage.setItem("selected_city",r)}catch(e){console.error("加载城市列表失败,使用默认城市:",e)}})()},[]),(0,i.useEffect)(()=>{(async()=>{let e=localStorage.getItem("selected_city");if(!(e&&q.some(t=>t.name===e)))try{let e=await fetch("http://ip-api.com/json/?lang=zh-CN"),n=await e.json();if("success"===n.status){var t;let e=n.city,r=(null===(t=q[0])||void 0===t?void 0:t.name)||S.name;for(let t of q.map(e=>e.name))if(e.includes(t)||t.includes(e.replace("市",""))){r=t;break}H(r),Q(e=>({...e,location:r}))}}catch(e){console.error("IP定位失败,使用默认城市:",e)}})()},[q]),(0,i.useEffect)(()=>{let e=()=>{let e=localStorage.getItem("auth_token"),t=localStorage.getItem("user")||localStorage.getItem("user_info");if(e&&t)try{X(JSON.parse(t))}catch(e){console.error("解析用户信息失败",e),X(null)}else X(null)};return e(),(0,P.QO)(e)},[]);let es=async e=>{try{let t=await fetch("".concat("https://api.classkeyin.com","/api/v2/teachers/tabs?areaCode=").concat(e));if(t.ok){let e=await t.json();et(e.map(e=>({id:e.id,tabName:e.tabName}))),e.length>0&&(er(e[0].id),n([]),ed(1,e[0].id))}}catch(e){console.error("加载栏目失败:",e)}};(0,i.useEffect)(()=>{G(1),Y(!0),n([]),er(""),et([]),es(ea($.location)),ei(),ed(1,"")},[$]),(0,i.useEffect)(()=>{let e=()=>{let e=window.pageYOffset||document.documentElement.scrollTop;document.documentElement.scrollHeight-e-window.innerHeight<300&&!A&&F&&eu()};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[A,F,J]);let ei=async()=>{try{let e=ea($.location),t=[...await b(e)].sort(()=>Math.random()-.5);d(t)}catch(e){console.error("加载推荐位失败:",e)}},eo=e=>Math.floor(e/100).toString(),ec=(e,t,n)=>{let r=[];return e&&e>0&&r.push("".concat(e,"P")),t&&t>0&&r.push("".concat(t,"PP")),n&&n>0&&r.push("".concat(n,"BY")),r.join(" ")},el=e=>{var t;let n=e.tags&&e.tags.length>0?e.tags:e.description?e.description.split(",").slice(0,3):[],r=e.cover||(e.images&&e.images.length>0?e.images[0].url:null)||e.avatar||"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=500&fit=crop",a=ec(e.firstPrice,e.secondPrice,e.multiplePrice)||(e.price>0?eo(e.price):void 0),s=e.avatar||"https://api.dicebear.com/7.x/fun-emoji/svg?seed=".concat(e.id);return{id:e.id,name:e.name||"未知老师",avatar:s,cover:r,age:e.age||void 0,height:e.height||void 0,weight:e.weight||void 0,location:(null===(t=e.area)||void 0===t?void 0:t.name)||e.address||"未知",tags:n,price:a,firstPrice:e.firstPrice||void 0,secondPrice:e.secondPrice||void 0,multiplePrice:e.multiplePrice||void 0,services:e.services||void 0,address:e.address||void 0,bookingStatus:e.bookingStatus||"RESTING",rating:e.rating||0,views:e.viewCount>0?e.viewCount:Math.floor(2e3*Math.random())+200,likes:e.likeCount>0?e.likeCount:Math.floor(150*Math.random())+10,messageCount:e.reviewCount||0,description:e.description||void 0,displayTags:e.displayTags||[]}},ed=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1?arguments[1]:void 0;try{1===e&&0===t.length&&0===ee.length&&I(!0);let a=ea($.location),s=void 0!==r?r:en,i=await (0,v.Os)({page:e,limit:20,areaCode:
1a,...s?{channelBindingId:s}:{}}),o=i.data.map(el);1===e?n(o):n(e=>[...e,...o]);let c=new Set;o.forEach(e=>{e.tags.forEach(e=>{e&&e.trim()&&c.add(e.trim())})}),K(e=>{let t=new Set([...e,...Array.from(c)]);return Array.from(t).sort()}),Y(i.pagination.hasMore),I(!1)}catch(e){console.error("加载老师列表失败:",e),I(!1)}},eu=async()=>{if(A||!F)return;L(!0);let e=J+1;try{let t=ea($.location),r=await (0,v.Os)({page:e,limit:20,areaCode:t,...en?{channelBindingId:en}:{}}),a=r.data.map(el);n(e=>[...e,...a]),G(e),Y(r.pagination.hasMore)}catch(e){console.error("加载更多老师失败:",e)}finally{L(!1)}},eh=t=>{e.push("/teachers/".concat(t.id))},em=e=>{H(e),Q(t=>({...t,location:e})),U(!1),localStorage.setItem("selected_city",e)},ep=async t=>{await j(t.id),t.linkType===a.TEACHER&&t.linkTarget?e.push("/teachers/".concat(t.linkTarget)):t.linkType===a.INTERNAL&&t.linkUrl?e.push(t.linkUrl):t.linkType===a.EXTERNAL&&t.linkUrl&&window.open(t.linkUrl,"_blank")},ef=()=>{R(e=>(e+1)%r.length)},eg=()=>{R(e=>(e-1+r.length)%r.length)};return((0,i.useEffect)(()=>{if(r.length>0){let e=setInterval(ef,5e3);return()=>clearInterval(e)}},[r.length]),(0,i.useEffect)(()=>{r.length>0&&r[O]&&N(r[O].id)},[O,r]),w)?(0,s.jsx)("div",{className:"flex items-center justify-center h-screen bg-gray-50",children:(0,s.jsx)("div",{className:"text-gray-500",children:"加载中..."})}):(0,s.jsxs)("div",{className:"min-h-screen bg-gray-50 overflow-x-hidden max-w-full pb-20",children:[(0,s.jsx)("div",{className:"sticky top-0 z-10 bg-white border-b border-gray-200 px-3 py-2.5 shadow-sm max-w-full",children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto flex items-center justify-between gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h1",{className:"text-lg sm:text-xl font-semibold bg-gradient-to-r from-pink-500 to-red-500 bg-clip-text text-transparent whitespace-nowrap",children:k.i}),(0,s.jsxs)("button",{onClick:()=>U(!0),className:"flex items-center gap-1 px-2.5 py-1 text-xs sm:text-sm bg-gray-100 hover:bg-gray-200 rounded-full transition-colors whitespace-nowrap",children:[(0,s.jsx)("span",{className:"font-medium",children:z}),(0,s.jsx)("svg",{className:"w-3 h-3 sm:w-4 sm:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{onClick:()=>M(!Z),className:"flex items-center gap-2 px-4 py-1.5 text-sm bg-gray-100 hover:bg-gray-200 rounded-full transition-colors",children:[(0,s.jsx)(l.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"筛选"})]}),(0,s.jsx)(c.default,{href:"/docs",className:"p-2 text-gray-600 hover:text-pink-600 hover:bg-pink-50 rounded-full transition-colors",title:"使用说明",children:(0,s.jsx)(u,{className:"w-5 h-5"})}),D?(0,s.jsxs)(c.default,{href:"/profile",className:"flex items-center gap-2 px-3 py-1.5 bg-gradient-to-r from-pink-50 to-purple-50 rounded-full hover:from-pink-100 hover:to-purple-100 transition-colors",children:[(0,s.jsx)(h.Z,{className:"w-4 h-4 text-pink-500"}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700 hidden sm:inline",children:D.name})]}):(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(c.default,{href:"/login",className:"px-3 sm:px-4 py-1.5 text-sm text-gray-700 hover:text-gray-900 transition-colors",children:"登录"}),(0,s.jsx)(c.default,{href:"/register",className:"px-3 sm:px-4 py-1.5 text-sm bg-gradient-to-r from-pink-500 to-purple-600 text-white rounded-full hover:from-pink-600 hover:to-purple-700 transition-all",children:"注册"})]})]})]})}),(0,s.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-6",children:[r.length>0&&(0,s.jsx)("div",{className:"mb-8 relative rounded-2xl overflow-hidden shadow-lg",children:(0,s.jsxs)("div",{className:"relative aspect-[16/7]",children:[r.map((e,t)=>(0,s.jsxs)("div",{onClick:()=>ep(e),className:"\n                    absolute inset-0 transition-opacity duration-500 cursor-pointer\n                    ".concat(t===O?"opacity-100 z-[1] pointer-events-auto":"opacity-0 z-0 pointer-events-none","\n                  "),children:[(0,s.jsx)("img",{src:(0,E.O1)(e.imageUrl),alt:e.title,className:"w-full h-full object-cover"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 via-trans
1parent to-transparent"})]},e.id)),r.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),eg()},className:"absolute left-4 top-1/2 -translate-y-1/2 p-2 bg-white/30 hover:bg-white/50 backdrop-blur-sm rounded-full transition-colors z-10",children:(0,s.jsx)(m,{className:"w-6 h-6 text-white"})}),(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),ef()},className:"absolute right-4 top-1/2 -translate-y-1/2 p-2 bg-white/30 hover:bg-white/50 backdrop-blur-sm rounded-full transition-colors z-10",children:(0,s.jsx)(p.Z,{className:"w-6 h-6 text-white"})}),(0,s.jsx)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2 z-10",children:r.map((e,t)=>(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),R(t)},className:"\n                          h-2 rounded-full transition-all\n                          ".concat(t===O?"w-8 bg-white":"w-2 bg-white/50","\n                        ")},t))})]})]})}),ee.length>0&&(0,s.jsx)("div",{className:"flex gap-2 mb-4 overflow-x-auto scrollbar-hide",children:ee.map(e=>(0,s.jsx)("button",{onClick:()=>{en!==e.id&&(er(e.id),G(1),Y(!0),n([]),ed(1,e.id))},className:"px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-colors ".concat(en===e.id?"bg-pink-500 text-white shadow-md":"bg-white text-gray-600 border border-gray-200 hover:border-pink-300"),children:e.tabName},e.id))}),Z&&(0,s.jsx)("div",{className:"mb-6 bg-white rounded-2xl p-4 shadow-md animate-fade-in",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-3",children:"价格范围"}),(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2",children:["","0-500","500-700","700-1000","1000+"].map(e=>{let t=e;if(""===e)t="全部";else if(e.includes("+")){let n=parseInt(e.replace("+",""));t="".concat(n/100,"+")}else{let[n,r]=e.split("-").map(e=>parseInt(e)/100);t="".concat(n,"-").concat(r)}return(0,s.jsx)("button",{onClick:()=>Q({...$,priceRange:e}),className:"\n                          py-3 px-4 rounded-lg text-sm font-medium transition-all\n                          ".concat($.priceRange===e?"bg-gradient-to-r from-pink-500 to-red-500 text-white shadow-md":"bg-gray-100 text-gray-700 hover:bg-gray-200","\n                        "),children:t},e)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-3",children:"服务类型"}),(0,s.jsx)("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-2",children:["",...V].map(e=>(0,s.jsx)("button",{onClick:()=>Q({...$,service:e}),className:"\n                        py-3 px-4 rounded-lg text-sm font-medium transition-all\n                        ".concat($.service===e?"bg-gradient-to-r from-pink-500 to-red-500 text-white shadow-md":"bg-gray-100 text-gray-700 hover:bg-gray-200","\n                      "),children:""===e?"全部":e},e))})]})]})}),(0,s.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:t.filter(e=>{if($.priceRange){let t=e.firstPrice;if(!t&&e.price){let n=e.price.match(/(\d+)/);n&&(t=parseInt(n[1]))}if(t){let e=100*t;if($.priceRange.includes("+")){if(e<parseInt($.priceRange.replace("+","")))return!1}else{let[t,n]=$.priceRange.split("-").map(e=>parseInt(e));if(e<t||e>n)return!1}}}return!$.service||!!e.tags.some(e=>e&&e.trim().toLowerCase().includes($.service.toLowerCase()))}).map(e=>(0,s.jsxs)("div",{onClick:()=>eh(e),className:" bg-white rounded-2xl overflow-hidden shadow-sm hover:shadow-lg transition-all duration-300 cursor-pointer group ",children:[(0,s.jsxs)("div",{className:"relative aspect-[3/4] overflow-hidden",children:[(0,s.jsx)("img",{src:(0,E.gu)(e.cover),alt:e.name,className:" w-full h-full object-cover group-hover:scale-105 transition-transform duration-300 "}),e.displayTags&&e.displayTags.length>0&&(0,s.jsx)("div",{className:"absolute top-3 left-3 flex flex-wrap gap-1.5 max-w-[80%]",children:e.displayTags.map(e=>{let t=T[e];return t?(0,s.jsx)("span",{className:"\n                            px-2.5\n                            py-1\n                            text-xs\n                            font-bold\n                            rounded-full\n                            shadow-sm\n                            ".concat(t.bg,"\n                            ").concat(t.text,"\n                          "),children:t.label},e):null})}),"AVAILABLE"===e.bookingStatus&&(0,s.jsx)("div",{className:"absolute top-3 right-3",children:(0,s.jsx)("span",{className:"px-2.5 py-1 text-xs font-bold rounded-md shadow-md bg-gradient-to-r from-green-400 to-emerald-400 text-white",children:"已开课"})}),(0,s.jsx)("div",{className:" absolute bottom-0 left-0 right-0 h-24 bg-gradient-to-t from-black/50 to-transparent "}),(0,s.jsx)("div",{className:"absolute bottom-3 left-3 right-3",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("img",{src:(0,E.gu)(e.avatar),alt:e.name,className:"w-9 h-9 rounded-full border-2 border-white shadow-md"}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("p",{className:"text-white font-bold text-sm leading-relaxed",children:[e.name,[e.height?"".concat(e.height,"cm"):null,e.weight?"".concat(e.weight,"kg"):null].filter(
1Boolean).length>0&&" ",[e.height?"".concat(e.height,"cm"):null,e.weight?"".concat(e.weight,"kg"):null].filter(Boolean).join(" \xb7 ")]})})]})})]}),(0,s.jsxs)("div",{className:"p-3 space-y-2",children:[e.price&&(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e.firstPrice&&e.firstPrice>0&&(0,s.jsxs)("span",{className:"px-2.5 py-1 bg-gradient-to-r from-pink-400 to-rose-400 text-white text-xs font-bold rounded-md shadow-sm",children:[e.firstPrice,"P"]}),e.secondPrice&&e.secondPrice>0&&(0,s.jsxs)("span",{className:"px-2.5 py-1 bg-gradient-to-r from-purple-400 to-pink-400 text-white text-xs font-bold rounded-md shadow-sm",children:[e.secondPrice,"PP"]}),e.multiplePrice&&e.multiplePrice>0&&(0,s.jsxs)("span",{className:"px-2.5 py-1 bg-gradient-to-r from-orange-400 to-amber-400 text-white text-xs font-bold rounded-md shadow-sm",children:[e.multiplePrice,"BY"]})]}),e.address&&(0,s.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.address}),!e.price&&!e.address&&e.description&&(0,s.jsx)("p",{className:"text-xs text-gray-500 line-clamp-2",children:e.description}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs text-gray-400",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(f.Z,{className:"w-3 h-3"}),e.likes]}),(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(g.Z,{className:"w-3 h-3"}),e.messageCount]})]}),(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(x.Z,{className:"w-3 h-3"}),e.views]})]})]})]},e.id))}),A&&(0,s.jsx)("div",{className:"mt-8 py-4 text-center",children:(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 text-gray-500",children:[(0,s.jsx)("div",{className:"w-4 h-4 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"}),(0,s.jsx)("span",{children:"加载中..."})]})}),!F&&t.length>0&&(0,s.jsx)("div",{className:"mt-8 py-4 text-center text-gray-400 text-sm",children:"我是有底线的~"}),!w&&!A&&0===t.length&&(0,s.jsx)("div",{className:"mt-8 text-center text-gray-400 text-sm",children:"暂无老师数据"})]}),B&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-end justify-center",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50",onClick:()=>U(!1)}),(0,s.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-t-2xl shadow-xl max-h-[78vh] flex flex-col",children:[(0,s.jsx)("div",{className:"flex-shrink-0 p-4 pb-2 border-b border-gray-100",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:"选择城市"}),(0,s.jsx)("button",{onClick:()=>U(!1),className:"text-gray-400 hover:text-gray-600",children:(0,s.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain p-4",children:(0,s.jsx)("div",{className:"grid grid-cols-3 gap-3 pb-safe",children:q.map(e=>(0,s.jsx)("button",{onClick:()=>em(e.name),className:"\n                      px-4 py-3 rounded-lg text-sm font-medium transition-all\n                      ".concat(z===e.name?"bg-gradient-to-r from-pink-500 to-red-500 text-white shadow-md":"bg-gray-100 text-gray-700 hover:bg-gray-200","\n                    "),children:e.name},e.code))})})]})]}),(0,s.jsx)(y.Z,{})]})}},16385:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(78350),a=n(1397),s=n(73707);let i=(0,n(90564).Z)("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);var o=n(23152);let c=[{label:"Class",href:"/",icon:(0,r.jsx)(i,{className:"w-6 h-6"}),activeIcon:(0,r.jsx)(i,{className:"w-6 h-6"})},{label:"我的",href:"/profile",icon:(0,r.jsx)(o.Z,{className:"w-6 h-6"}),activeIcon:(0,r.jsx)(o.Z,{className:"w-6 h-6"})}];function l(){let e=(0,s.usePathname)();return(0,r.jsxs)("nav",{className:"fixed bottom-0 left-0 right-0 z-50 bg-white border-t border-gray-200 shadow-lg",children:[(0,r.jsx)("div",{className:"max-w-lg mx-auto px-4",children:(0,r.jsx)("div",{className:"flex items-center justify-around h-16",children:c.map(t=>{let n=e===t.href;return(0,r.jsxs)(a.default,{href:t.href,className:"\n                  flex flex-col items-center justify-center\n                  w-20 h-full\n                  transition-colors duration-200\n                  ".concat(n?"text-pink-600":"text-gray-500 hover:text-gray-700","\n                "),children:[(0,r.jsx)("div",{className:"\n                  ".concat(n?"scale-110":"","\n                  transition-transform duration-200\n                "),children:n?t.activeIcon:t.icon}),(0,r.jsx)("span",{className:"\n                  text-xs mt-1 font-medium\n                  ".concat(n?"text-pink-600":"text-gray-500","\n                "),children:t.label})]},t.href)})})}),(0,r.jsx)("div",{className:"h-safe-area-inset-bottom bg-white"})]})}},21864:function(e,t,n){"use strict";n.d(t,{MS:function(){return r},x1:function(){return s}});
1class r extends Error{constructor(e,t,n){super(e),this.name="ApiError",this.status=t,this.statusText=n}}class a{async request(e,t){let n="".concat(this.baseUrl).concat(e),a=localStorage.getItem("auth_token"),s={"Content-Type":"application/json"};a&&(s.Authorization="Bearer ".concat(a)),(null==t?void 0:t.headers)&&Object.assign(s,t.headers);try{let e=await fetch(n,{...t,headers:s});if(!e.ok){let t=await e.json().catch(()=>({message:e.statusText}));throw new r(t.message||"API请求失败: ".concat(e.statusText),e.status,e.statusText)}return await e.json()}catch(e){throw console.error("API请求错误:",e),e}}async get(e,t){let n=t?"?"+new URLSearchParams(Object.entries(t).reduce((e,t)=>{let[n,r]=t;return null!=r&&""!==r&&(e[n]=String(r)),e},{})).toString():"";return this.request("".concat(e).concat(n))}async post(e,t){return this.request(e,{method:"POST",body:JSON.stringify(t)})}async put(e,t){return this.request(e,{method:"PUT",body:JSON.stringify(t)})}async delete(e){return this.request(e,{method:"DELETE"})}constructor(e){this.baseUrl=e}}let s=new a("".concat("https://api.classkeyin.com","/api/v2"))},15894:function(e,t,n){"use strict";n.d(t,{LN:function(){return o},Os:function(){return a},ad:function(){return c},jS:function(){return s},rw:function(){return i}});var r=n(21864);async function a(e){return r.x1.get("/teachers",e)}async function s(e){return r.x1.get("/teachers/".concat(e))}async function i(e){return r.x1.get("/teachers/".concat(e,"/contact/status"))}async function o(e){return r.x1.post("/teachers/".concat(e,"/contact/exchange"),{})}async function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return r.x1.get("/teachers/".concat(e,"/comments"),{page:t,limit:n})}},931:function(e,t,n){"use strict";n.d(t,{P:function(){return s},i:function(){return a}});var r=n(12026);let a=r.env.NEXT_PUBLIC_APP_H5_NAME||r.env.APP_H5_NAME||"藏楼",s=r.env.NEXT_PUBLIC_APP_H5_DESCRIPTION||r.env.APP_H5_DESCRIPTION||"解锁知识"},912:function(e,t,n){"use strict";n.d(t,{E$:function(){return l},O1:function(){return o},gu:function(){return c}});var r=n(12026);let a=r.env.NEXT_PUBLIC_OSS_CDN_DOMAIN||"cdn.ckeyclf.com",s=r.env.NEXT_PUBLIC_WELFARE_HUB_OSS_CDN_DOMAIN||"cdn.classkeyin.com";function i(e){return e.includes(a)||e.includes(s)}function o(e,t){if(!e)return"";if(!i(e)||(null==t?void 0:t.skipCompress)||e.includes("x-oss-process"))return e;let n=(null==t?void 0:t.width)||1920,r=(null==t?void 0:t.quality)||85,a="?x-oss-process=image/resize,w_".concat(n,"/quality,q_").concat(r);return"".concat(e).concat(a)}function c(e){return o(e,{width:400,quality:80})}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128;if(!e)return"";if(!i(e)||e.includes("x-oss-process"))return e;let n="?x-oss-process=image/resize,w_".concat(t,",h_").concat(t,",m_fill/quality,q_85");return"".concat(e).concat(n)}},51164:function(e,t,n){"use strict";n.d(t,{Bv:function(){return d},Ce:function(){return l},G3:function(){return i},QO:function(){return o},ns:function(){return c}});let r="classkey-auth-changed",a="skip_tg_miniapp_autologin",s=null;function i(){window.dispatchEvent(new Event(r))}function o(e){return window.addEventListener(r,e),()=>window.removeEventListener(r,e)}function c(){try{sessionStorage.setItem(a,"1")}catch(e){}}function l(){try{sessionStorage.removeItem(a)}catch(e){}}async function d(){var e,t;if((t=window.location.pathname).startsWith("/admin")||t.startsWith("/open/login")||t.startsWith("/open/group-admin-login")||"/join-verify"===t||"/dm-verify"===t||t.startsWith("/login")||t.startsWith("/register"))return!1;try{if(sessionStorage.getItem(a))return!1}catch(e){}if(localStorage.getItem("auth_token"))return!1;let n=null===(e=window.Telegram)||void 0===e?void 0:e.WebApp,r=null==n?void 0:n.initData;return!!r&&(s||(s=(async()=>{try{let e=new URLSearchParams(window.location.search),t=e.get("bot_id")||e.get("botId")||void 0,n=await fetch("".concat("https://api.classkeyin.com","/api/v2/auth/telegram-login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({initData:r,botId:t})}),a=await n.json().catch(()=>({}));if(n.ok&&a.token)return localStorage.setItem("auth_token",a.token),localStorage.setItem("user",JSON.stringify(a.user)),l(),i(),!0;return!1}catch(e){return!1}finally{s=null}})()))}},90564:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(99151);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];
1return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:l="",children:d,iconNode:u,...h}=e;return(0,r.createElement)("svg",{ref:t,...i,width:a,height:a,stroke:n,strokeWidth:c?24*Number(o)/Number(a):o,className:s("lucide",l),...h},[...u.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),c=(e,t)=>{let n=(0,r.forwardRef)((n,i)=>{let{className:c,...l}=n;return(0,r.createElement)(o,{ref:i,iconNode:t,className:s("lucide-".concat(a(e)),c),...l})});return n.displayName="".concat(e),n}},82099:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(90564).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},96091:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(90564).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},66370:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(90564).Z)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]])},31319:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(90564).Z)("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]])},23371:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(90564).Z)("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]])},23152:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(90564).Z)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},1397:function(e,t,n){"use strict";n.d(t,{default:function(){return a.a}});var r=n(40815),a=n.n(r)},73707:function(e,t,n){"use strict";var r=n(39214);n.o(r,"useParams")&&n.d(t,{useParams:function(){return r.useParams}}),n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},12026:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(85150)},85150:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var c=[],l=!1,d=-1;function u(){l&&r&&(l=!1,r.length?c=r.concat(c):d=-1,c.length&&h())}function h(){if(!l){var e=o(u);l=!0;for(var t=c.length;t;){for(r=c,c=[];++d<t;)r&&r[d].run();d=-1,t=c.length}r=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function p(){}a.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||l||o(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=p,a.addListener=p,a.once=p,a.off=p,a.removeListener=p,a.removeAllListeners=p,a.emit=p,a.prependListener=p,a.prependOnceListener=p,a.listeners=function(e){return[]},a.binding=function(e){throw Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw Error("process.chdir is not supported")},a.umask=function(){return 0}}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var s=n[e]={exports:{}},i=!0;try{t[e](s,s.exports,r),i=!1}finally{i&&delete n[e]}return s.exports}r.ab="//";var a=r(229);e.exports=a}()}},function(e){e.O(0,[815,9646,1899,1744],function(){return e(e.s=41069)}),_N_E=e.O()}]);

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.