PageSourceSearch

https://eic.org.cn/_nuxt/v193/BH2ZP3ZT.js

js eic.org.cn collected 2026-10-02 07:53:25 UTC 2,133 bytes, 1 lines download raw bytes

1import{d as y,r as c,E as S,G as T,c as m,a as l,e as x,j as b,t as u,H as C,I as k,o as v,_ as M}from"./D8c3LIj3.js";const j={class:"test-stream"},w={class:"meta"},A={key:0},I=["disabled"],N={class:"output"},E="https://emsp-test.eiceducation.com.cn/zero-open/schoolOpen/matchingOpen/matching/stream",O=y({__name:"index",setup(B){const g={activity:0,paper:0,researchExperience:0,workInfo:0,gpaScore:70,gpaScoreType:"百分制",graduateSchoolId:"1006006",graduateSchoolName:"北京理工大学",graduateMajorId:"20013941",graduateMajorName:"法学",graduateMajorCategory:"人文社科",graduateMajorMiniCategory:"法学",countryIds:["1000000000000000080","1000000000000000073"],majorCategories:["商科与经济学","人文社科","理科"],majorMiniCategories:["公共关系与广告","空间科学","企业管理","人力资源","旅游与酒店管理"],sortType:"schoolSortType"},a=c(""),n=c(null),r=c(!1),o=c("未开始");let t=null;const i=async()=>{t==null||t.abort(),t=new AbortController,a.value="",n.value=null,r.value=!0,o.value="流式接收中";const d={"Content-Type":"application/json",Accept:"text/event-stream"},s=C(k());s&&(d["X-SMC"]=s);try{const e=await fetch(E,{method:"POST",headers:d,body:JSON.stringify(g),signal:t.signal,cache:"no-store"});if(n.value=e.status,!e.body){a.value=await e.text(),o.value=e.ok?"完成":"失败";return}const _=e.body.getReader(),p=new TextDecoder;for(;;){const{done:h,value:f}=await _.read();if(h)break;a.value+=p.decode(f,{stream:!0})}a.value+=p.decode(),o.value=e.ok?"完成":"失败"}catch(e){if((e==null?void 0:e.name)==="AbortError")return;a.value||(a.value=(e==null?void 0:e.message)||"请求失败"),o.value="失败"}finally{r.value=!1}};return S(()=>{i()}),T(()=>{t==null||t.abort()}),(d,s)=>(v(),m("div",j,[s[0]||(s[0]=l("h1",null,"matching/stream",-1)),l("p",w,[x(" 状态:"+u(o.value)+" ",1),n.value!=null?(v(),m("span",A," · HTTP "+u(n.value),1)):b("",!0)]),l("button",{type:"button",disabled:r.value,onClick:i},u(r.value?"请求中…":"重新请求"),9,I),l("pre",N,u(a.value||"暂无输出"),1)]))}}),H=M(O,[["__scopeId","data-v-fb515483"]]);export{H 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.