2 lines
21 KiB
JavaScript
2 lines
21 KiB
JavaScript
(function(){"use strict";var e={5104:function(e,t,o){var n=o(5130),i=o(6768);const l={class:"app"},s={key:0,class:"loading"},r={key:1,class:"login-prompt"},a={class:"sidebar"},d={class:"nav-links"},c={class:"main-content"};function u(e,t,o,n,u,h){const p=(0,i.g2)("router-link"),g=(0,i.g2)("router-view");return(0,i.uX)(),(0,i.CE)("div",l,[u.isLoading?((0,i.uX)(),(0,i.CE)("div",s," 加载中... ")):u.isLoggedIn?((0,i.uX)(),(0,i.CE)(i.FK,{key:2},[(0,i.Lk)("div",a,[(0,i.Lk)("div",d,[(0,i.bF)(p,{to:"/problems",class:"nav-item"},{default:(0,i.k6)((()=>t[2]||(t[2]=[(0,i.eW)("题目列表")]))),_:1}),(0,i.bF)(p,{to:"/my",class:"nav-item"},{default:(0,i.k6)((()=>t[3]||(t[3]=[(0,i.eW)("我标记的题目")]))),_:1})]),t[4]||(t[4]=(0,i.Lk)("div",{class:"footer-info"},[(0,i.Lk)("div",{class:"version-info"},"NEU小站OJ题库 - v1.0"),(0,i.Lk)("div",{class:"source-info"},"本题库所有题目均来自东北大学OJ系统,本站仅归纳展示题目,不提供在线评测环境")],-1))]),(0,i.Lk)("div",c,[(0,i.bF)(g)])],64)):((0,i.uX)(),(0,i.CE)("div",r,[t[1]||(t[1]=(0,i.Lk)("div",{class:"login-message"},"请登录后进入NEU小站OJ题库!",-1)),(0,i.Lk)("button",{class:"login-button",onClick:t[0]||(t[0]=(...e)=>h.goToLogin&&h.goToLogin(...e))},"前往登录")]))])}var h=o(8704),p={data(){return{isLoggedIn:!1,isLoading:!0,token:h.A.get("token")||""}},methods:{async checkLoginStatus(){try{const e=await fetch("https://api.oj.东北大学.com/check_login",{headers:{Authorization:this.token}}),t=await e.json();this.isLoggedIn=t.isLoggedIn}catch(e){console.error("Error:",e),this.isLoggedIn=!1}finally{this.isLoading=!1}},goToLogin(){window.location.href="https://www.东北大学.com/submission"}},mounted(){this.checkLoginStatus()}},g=o(1241);const k=(0,g.A)(p,[["render",u]]);var m=k,b=o(1387),f=o(4232);const v={class:"problem-list"},w={class:"filters"},y={class:"knowledge-search",ref:"knowledgeSearch"},L={key:0,class:"knowledge-list"},P=["onClick"],C={class:"problems-table"},T=["onClick"],E={key:1,class:"no-knowledge"},$={class:"pagination"},_=["disabled"],K=["disabled"];function S(e,t,o,l,s,r){return(0,i.uX)(),(0,i.CE)("div",v,[(0,i.Lk)("div",w,[(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>s.title=e),placeholder:"搜索题目标题"},null,512),[[n.Jo,s.title]]),(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>s.content=e),placeholder:"搜索题目内容"},null,512),[[n.Jo,s.content]]),(0,i.bo)((0,i.Lk)("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>s.difficulty=e)},t[9]||(t[9]=[(0,i.Fv)('<option value="" data-v-8b2156d0>全部难度</option><option value="1" data-v-8b2156d0>1</option><option value="2" data-v-8b2156d0>2</option><option value="3" data-v-8b2156d0>3</option><option value="4" data-v-8b2156d0>4</option><option value="5" data-v-8b2156d0>5</option><option value="6" data-v-8b2156d0>6</option><option value="7" data-v-8b2156d0>7</option><option value="8" data-v-8b2156d0>8</option><option value="9" data-v-8b2156d0>9</option><option value="10" data-v-8b2156d0>10</option>',11)]),512),[[n.u1,s.difficulty]]),(0,i.bo)((0,i.Lk)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>s.statusFilter=e)},t[10]||(t[10]=[(0,i.Lk)("option",{value:""},"全部状态",-1),(0,i.Lk)("option",{value:"0"},"不显示已会的题",-1),(0,i.Lk)("option",{value:"1"},"不显示已会和不会的题",-1)]),512),[[n.u1,s.statusFilter]]),(0,i.Lk)("div",y,[(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=e=>s.knowledgeSearch=e),onFocus:t[5]||(t[5]=e=>r.fetchKnowledgePoints()),onInput:t[6]||(t[6]=e=>r.fetchKnowledgePoints()),placeholder:"搜索知识点"},null,544),[[n.Jo,s.knowledgeSearch]]),s.showKnowledgeList?((0,i.uX)(),(0,i.CE)("div",L,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(s.knowledgePoints,(e=>((0,i.uX)(),(0,i.CE)("div",{key:e.id,onClick:t=>r.selectKnowledge(e),class:"knowledge-item"},(0,f.v_)(e.title),9,P)))),128))])):(0,i.Q3)("",!0)],512)]),(0,i.Lk)("table",C,[t[11]||(t[11]=(0,i.Lk)("thead",null,[(0,i.Lk)("tr",null,[(0,i.Lk)("th",null,"编号"),(0,i.Lk)("th",null,"标题"),(0,i.Lk)("th",null,"难度"),(0,i.Lk)("th",null,"知识点"),(0,i.Lk)("th",null,"状态")])],-1)),(0,i.Lk)("tbody",null,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(s.problems,(e=>((0,i.uX)(),(0,i.CE)("tr",{key:e.id,onClick:t=>r.goToProblem(e.id)},[(0,i.Lk)("td",null,(0,f.v_)(e.id),1),(0,i.Lk)("td",null,(0,f.v_)(e.title),1),(0,i.Lk)("td",null,(0,f.v_)(r.getDifficultyText(e.difficulty)),1),(0,i.Lk)("td",null,[e.knowledge&&e.knowledge.length>0?((0,i.uX)(!0),(0,i.CE)(i.FK,{key:0},(0,i.pI)(e.knowledge,(e=>((0,i.uX)(),(0,i.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,i.uX)(),(0,i.CE)("span",E,"无"))]),(0,i.Lk)("td",null,[(0,i.Lk)("span",{class:(0,f.C4)(["status-tag",{unmarked:null===e.status,solved:1===e.status,unsolved:0===e.status}])},(0,f.v_)(r.getStatusText(e.status)),3)])],8,T)))),128))])]),(0,i.Lk)("div",$,[(0,i.Lk)("button",{disabled:1===s.page,onClick:t[7]||(t[7]=e=>r.changePage(s.page-1))},"上一页",8,_),(0,i.Lk)("span",null,"第 "+(0,f.v_)(s.page)+" 页 / 共 "+(0,f.v_)(s.totalPages)+" 页",1),(0,i.Lk)("button",{disabled:s.page===s.totalPages,onClick:t[8]||(t[8]=e=>r.changePage(s.page+1))},"下一页",8,K)])])}o(4114);var O={data(){return{problems:[],page:1,totalPages:1,title:"",content:"",difficulty:"",statusFilter:"",knowledgeSearch:"",knowledgePoints:[],showKnowledgeList:!1,selectedKnowledge:null,token:h.A.get("token")||""}},methods:{async fetchProblems(){try{const e=await fetch("https://api.oj.东北大学.com/problem_list",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({page:this.page,title:this.title||void 0,content:this.content||void 0,difficulty:this.difficulty?Number(this.difficulty):void 0,status_filter:this.statusFilter?Number(this.statusFilter):void 0,knowledge_id:this.selectedKnowledge?.id})}),t=await e.json();this.problems=t.problems,this.totalPages=t.pages;const o={...this.$route.query,page:this.page};this.$router.replace({query:o},{keepActiveRoute:!0})}catch(e){console.error("Error:",e)}},goToProblem(e){this.$router.push(`/problem/${e}`)},changePage(e){e<1||e>this.totalPages||(this.page=e,this.fetchProblems())},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},getStatusText(e){const t={0:"不会",1:"已会",null:"未标记"};return t[e]||"未标记"},async fetchKnowledgePoints(){try{const e=await fetch("https://api.oj.东北大学.com/knowledge",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({search:this.knowledgeSearch})}),t=await e.json();this.knowledgePoints=t,this.showKnowledgeList=!0}catch(e){console.error("Error:",e)}},selectKnowledge(e){this.selectedKnowledge=e,this.knowledgeSearch=e.title,this.showKnowledgeList=!1,this.page=1,this.fetchProblems()},goToKnowledge(e){this.$router.push({path:"/problems",query:{knowledge_id:e.id}})},handleClickOutside(e){const t=this.$refs.knowledgeSearch;t&&!t.contains(e.target)&&(this.showKnowledgeList=!1,this.selectedKnowledge||(this.knowledgeSearch=""))}},watch:{title(){this.page=1,this.fetchProblems()},difficulty(){this.page=1,this.fetchProblems()},statusFilter(){this.page=1,this.fetchProblems()},content(){this.page=1,this.fetchProblems()},knowledgeSearch(e){e||(this.selectedKnowledge=null,this.page=1,this.fetchProblems())},"$route.query.page":{immediate:!0,handler(e){const t=parseInt(e);t&&t>=1&&(this.page=t,this.fetchProblems())}}},mounted(){const e=parseInt(this.$route.query.page);e&&e>=1&&(this.page=e),document.title="题目列表 - OJ题库 - NEU小站",this.fetchProblems(),document.addEventListener("click",this.handleClickOutside)},unmounted(){document.removeEventListener("click",this.handleClickOutside)}};const X=(0,g.A)(O,[["render",S],["__scopeId","data-v-8b2156d0"]]);var j=X;const A={key:0,class:"problem-detail"},F={class:"problem-header"},x={class:"problem-meta"},I={class:"difficulty"},J={class:"knowledge-points",style:{"margin-top":"10px"}},M={key:1,class:"no-knowledge"},N={class:"problem-content"},U={class:"content-section"},V=["innerHTML"],z={class:"content-section"},D={class:"example"},q={key:0,class:"content-section"},H=["innerHTML"],Q={class:"problem-status"};function W(e,t,o,n,l,s){return l.problem?((0,i.uX)(),(0,i.CE)("div",A,[(0,i.Lk)("div",F,[(0,i.Lk)("h1",null,(0,f.v_)(l.problem.title),1),(0,i.Lk)("div",x,[(0,i.Lk)("span",I,"难度:"+(0,f.v_)(s.getDifficultyText(l.problem.difficulty)),1),(0,i.Lk)("div",J,[t[2]||(t[2]=(0,i.eW)(" 知识点: ")),l.problem.knowledge&&l.problem.knowledge.length>0?((0,i.uX)(!0),(0,i.CE)(i.FK,{key:0},(0,i.pI)(l.problem.knowledge,(e=>((0,i.uX)(),(0,i.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,i.uX)(),(0,i.CE)("span",M,"无"))])])]),(0,i.Lk)("div",N,[(0,i.Lk)("div",U,[t[3]||(t[3]=(0,i.Lk)("h2",null,"题目描述",-1)),(0,i.Lk)("div",{innerHTML:s.renderedContent},null,8,V)]),(0,i.Lk)("div",z,[t[6]||(t[6]=(0,i.Lk)("h2",null,"示例",-1)),(0,i.Lk)("div",D,[t[4]||(t[4]=(0,i.Lk)("h3",null,"输入",-1)),(0,i.Lk)("pre",null,(0,f.v_)(l.problem.example_input),1),t[5]||(t[5]=(0,i.Lk)("h3",null,"输出",-1)),(0,i.Lk)("pre",null,(0,f.v_)(l.problem.example_output),1)])]),l.problem.hint?((0,i.uX)(),(0,i.CE)("div",q,[t[7]||(t[7]=(0,i.Lk)("h2",null,"提示",-1)),(0,i.Lk)("div",{innerHTML:s.renderedHint},null,8,H)])):(0,i.Q3)("",!0)]),(0,i.Lk)("div",Q,[(0,i.Lk)("button",{onClick:t[0]||(t[0]=e=>s.markProblem(0)),class:(0,f.C4)({active:0===l.problem.status})}," 不会 ",2),(0,i.Lk)("button",{onClick:t[1]||(t[1]=e=>s.markProblem(1)),class:(0,f.C4)({active:1===l.problem.status})}," 已会 ",2)])])):(0,i.Q3)("",!0)}var R=o(642),B=o(1995),G=o.n(B),Y=o(1109),Z=(o(9351),o(437)),ee=o(8734),te=o.n(ee),oe={data(){return{problem:null,md:null,token:h.A.get("token")||""}},created(){this.md=new R.A({html:!0,breaks:!0,linkify:!0,highlight:function(e,t){if(t&&Y.A.getLanguage(t))try{return Y.A.highlight(e,{language:t}).value}catch(o){}return""}});const e=this.md.renderer.rules.text||function(e,t,o,n,i){return i.renderToken(e,t,o)};this.md.renderer.rules.text=function(t,o,n,i,l){let s=t[o].content;return s=s.replace(/(?<!\\)\$((?!\$)[^$]+?)\$/g,((e,t)=>{try{return Z.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX error:",o),e}})),s=s.replace(/(?<!\\)\$\$((?:.|\n)+?)\$\$/g,((e,t)=>{try{return Z.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX error:",o),e}})),t[o].content=s,e(t,o,n,i,l)},this.md.use(G())},computed:{renderedContent(){if(!this.problem)return"";let e=this.md.render(this.problem.content);return e=e.replace(/\$([^$\n]+?)\$/g,((e,t)=>{try{return Z.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX inline error:",o),e}})),e=e.replace(/\$\$([^$]+?)\$\$/g,((e,t)=>{try{return Z.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX display error:",o),e}})),e=te().decode(e),e},renderedHint(){if(!this.problem||!this.problem.hint)return"";let e=this.md.render(this.problem.hint);return e=e.replace(/\$([^$\n]+?)\$/g,((e,t)=>{try{return Z.Ay.renderToString(t.trim(),{displayMode:!1})}catch(o){return console.warn("KaTeX inline error:",o),e}})),e=e.replace(/\$\$([^$]+?)\$\$/g,((e,t)=>{try{return Z.Ay.renderToString(t.trim(),{displayMode:!0})}catch(o){return console.warn("KaTeX display error:",o),e}})),e=te().decode(e),e}},methods:{async fetchProblem(){try{const e=await fetch(`https://api.oj.东北大学.com/problem?problem_id=${this.$route.params.id}`,{headers:{Authorization:this.token}});this.problem=await e.json()}catch(e){console.error("Error:",e)}},async markProblem(e){try{const t=await fetch("https://api.oj.东北大学.com/mark",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({problem_id:this.problem.id,status:this.problem.status===e?2:e})});t.ok&&await this.fetchProblem()}catch(t){console.error("Error:",t)}},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},goToKnowledge(e){this.$router.push({path:"/problems",query:{knowledge_id:e.id}})},async goToNextProblem(){try{const e=this.problem.id+1,t=await fetch(`https://api.oj.东北大学.com/problem?problem_id=${e}`,{headers:{Authorization:this.token}});if(!t.ok)return void(404===t.status?alert("已经是最后一题了~"):alert("获取下一题失败"));const o=await t.json();o&&o.id&&this.$router.push(`/problem/${o.id}`)}catch(e){console.error("Error:",e),alert("获取下一题失败")}},async goToPreviousProblem(){try{const e=this.problem.id-1;if(e<1)return void alert("已经是第一题了~");const t=await fetch(`https://api.oj.东北大学.com/problem?problem_id=${e}`,{headers:{Authorization:this.token}});if(!t.ok)return void alert("获取上一题失败");const o=await t.json();o&&o.id&&this.$router.push(`/problem/${o.id}`)}catch(e){console.error("Error:",e),alert("获取上一题失败")}}},mounted(){this.fetchProblem()},watch:{"$route.params.id"(){this.fetchProblem()},"problem.title"(){this.problem&&this.problem.title&&(document.title=`${this.problem.title} - OJ题库 - NEU小站`)}}};const ne=(0,g.A)(oe,[["render",W]]);var ie=ne;const le={class:"problem-list"},se={class:"filters"},re={class:"knowledge-search",ref:"knowledgeSearch"},ae={key:0,class:"knowledge-list"},de=["onClick"],ce={class:"problems-table"},ue=["onClick"],he={key:1,class:"no-knowledge"},pe={class:"pagination"},ge=["disabled"],ke=["disabled"];function me(e,t,o,l,s,r){return(0,i.uX)(),(0,i.CE)("div",le,[(0,i.Lk)("div",se,[(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>s.title=e),placeholder:"搜索题目标题"},null,512),[[n.Jo,s.title]]),(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>s.content=e),placeholder:"搜索题目内容"},null,512),[[n.Jo,s.content]]),(0,i.bo)((0,i.Lk)("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>s.difficulty=e)},t[9]||(t[9]=[(0,i.Fv)('<option value="" data-v-131cee16>全部难度</option><option value="1" data-v-131cee16>1</option><option value="2" data-v-131cee16>2</option><option value="3" data-v-131cee16>3</option><option value="4" data-v-131cee16>4</option><option value="5" data-v-131cee16>5</option><option value="6" data-v-131cee16>6</option><option value="7" data-v-131cee16>7</option><option value="8" data-v-131cee16>8</option><option value="9" data-v-131cee16>9</option><option value="10" data-v-131cee16>10</option>',11)]),512),[[n.u1,s.difficulty]]),(0,i.bo)((0,i.Lk)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>s.statusFilter=e)},t[10]||(t[10]=[(0,i.Lk)("option",{value:""},"全部状态",-1),(0,i.Lk)("option",{value:"0"},"只看不会的题",-1),(0,i.Lk)("option",{value:"1"},"只看已会的题",-1)]),512),[[n.u1,s.statusFilter]]),(0,i.Lk)("div",re,[(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=e=>s.knowledgeSearch=e),onFocus:t[5]||(t[5]=e=>r.fetchKnowledgePoints()),onInput:t[6]||(t[6]=e=>r.fetchKnowledgePoints()),placeholder:"搜索知识点"},null,544),[[n.Jo,s.knowledgeSearch]]),s.showKnowledgeList?((0,i.uX)(),(0,i.CE)("div",ae,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(s.knowledgePoints,(e=>((0,i.uX)(),(0,i.CE)("div",{key:e.id,onClick:t=>r.selectKnowledge(e),class:"knowledge-item"},(0,f.v_)(e.title),9,de)))),128))])):(0,i.Q3)("",!0)],512)]),(0,i.Lk)("table",ce,[t[11]||(t[11]=(0,i.Lk)("thead",null,[(0,i.Lk)("tr",null,[(0,i.Lk)("th",null,"编号"),(0,i.Lk)("th",null,"标题"),(0,i.Lk)("th",null,"难度"),(0,i.Lk)("th",null,"知识点"),(0,i.Lk)("th",null,"状态")])],-1)),(0,i.Lk)("tbody",null,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(s.problems,(e=>((0,i.uX)(),(0,i.CE)("tr",{key:e.id,onClick:t=>r.goToProblem(e.id)},[(0,i.Lk)("td",null,(0,f.v_)(e.id),1),(0,i.Lk)("td",null,(0,f.v_)(e.title),1),(0,i.Lk)("td",null,(0,f.v_)(r.getDifficultyText(e.difficulty)),1),(0,i.Lk)("td",null,[e.knowledge&&e.knowledge.length>0?((0,i.uX)(!0),(0,i.CE)(i.FK,{key:0},(0,i.pI)(e.knowledge,(e=>((0,i.uX)(),(0,i.CE)("span",{key:e.id,class:"knowledge-tag"},(0,f.v_)(e.title),1)))),128)):((0,i.uX)(),(0,i.CE)("span",he,"无"))]),(0,i.Lk)("td",null,[(0,i.Lk)("span",{class:(0,f.C4)(["status-tag",{solved:1===e.status,unsolved:0===e.status}])},(0,f.v_)(r.getStatusText(e.status)),3)])],8,ue)))),128))])]),(0,i.Lk)("div",pe,[(0,i.Lk)("button",{disabled:1===s.page,onClick:t[7]||(t[7]=e=>r.changePage(s.page-1))},"上一页",8,ge),(0,i.Lk)("span",null,"第 "+(0,f.v_)(s.page)+" 页 / 共 "+(0,f.v_)(s.totalPages)+" 页",1),(0,i.Lk)("button",{disabled:s.page===s.totalPages,onClick:t[8]||(t[8]=e=>r.changePage(s.page+1))},"下一页",8,ke)])])}var be={data(){return{problems:[],page:1,totalPages:1,title:"",content:"",difficulty:"",statusFilter:"",knowledgeSearch:"",knowledgePoints:[],showKnowledgeList:!1,selectedKnowledge:null,token:h.A.get("token")||""}},methods:{async fetchProblems(){try{const e=await fetch("https://api.oj.东北大学.com/my_problem_list",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({page:this.page,title:this.title||void 0,content:this.content||void 0,difficulty:this.difficulty?Number(this.difficulty):void 0,status_filter:this.statusFilter?Number(this.statusFilter):void 0,knowledge_id:this.selectedKnowledge?.id})}),t=await e.json();this.problems=t.problems,this.totalPages=t.pages}catch(e){console.error("Error:",e)}},goToProblem(e){this.$router.push(`/problem/${e}`)},changePage(e){this.page=e,this.fetchProblems()},getDifficultyText(e){const t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10"};return t[e]||"未知"},getStatusText(e){return 1===e?"已会":"不会"},async fetchKnowledgePoints(){try{const e=await fetch("https://api.oj.东北大学.com/knowledge",{method:"POST",headers:{Authorization:this.token,"Content-Type":"application/json"},body:JSON.stringify({search:this.knowledgeSearch})}),t=await e.json();this.knowledgePoints=t,this.showKnowledgeList=!0}catch(e){console.error("Error:",e)}},selectKnowledge(e){this.selectedKnowledge=e,this.knowledgeSearch=e.title,this.showKnowledgeList=!1,this.page=1,this.fetchProblems()},handleClickOutside(e){const t=this.$refs.knowledgeSearch;t&&!t.contains(e.target)&&(this.showKnowledgeList=!1,this.selectedKnowledge||(this.knowledgeSearch=""))}},watch:{title(){this.page=1,this.fetchProblems()},difficulty(){this.page=1,this.fetchProblems()},statusFilter(){this.page=1,this.fetchProblems()},content(){this.page=1,this.fetchProblems()},knowledgeSearch(e){e||(this.selectedKnowledge=null,this.page=1,this.fetchProblems())}},mounted(){document.title="我标记的题目 - OJ题库 - NEU小站",this.fetchProblems(),document.addEventListener("click",this.handleClickOutside)},unmounted(){document.removeEventListener("click",this.handleClickOutside)}};const fe=(0,g.A)(be,[["render",me],["__scopeId","data-v-131cee16"]]);var ve=fe;const we=[{path:"/",redirect:"/problems"},{path:"/problems",name:"ProblemList",component:j},{path:"/problem/:id",name:"ProblemDetail",component:ie,meta:{title:"题目详情"}},{path:"/my",name:"MyProblemList",component:ve},{path:"/:pathMatch(.*)*",redirect:"/problems"}],ye=(0,b.aE)({history:(0,b.LA)(),routes:we});var Le=ye,Pe=o(782),Ce=(0,Pe.y$)({state:{},getters:{},mutations:{},actions:{},modules:{}});(0,n.Ef)(m).use(Ce).use(Le).mount("#app")}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var l=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(l.exports,l,l.exports,o),l.loaded=!0,l.exports}o.m=e,function(){var e=[];o.O=function(t,n,i,l){if(!n){var s=1/0;for(c=0;c<e.length;c++){n=e[c][0],i=e[c][1],l=e[c][2];for(var r=!0,a=0;a<n.length;a++)(!1&l||s>=l)&&Object.keys(o.O).every((function(e){return o.O[e](n[a])}))?n.splice(a--,1):(r=!1,l<s&&(s=l));if(r){e.splice(c--,1);var d=i();void 0!==d&&(t=d)}}return t}l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[n,i,l]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={524:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,l,s=n[0],r=n[1],a=n[2],d=0;if(s.some((function(t){return 0!==e[t]}))){for(i in r)o.o(r,i)&&(o.m[i]=r[i]);if(a)var c=a(o)}for(t&&t(n);d<s.length;d++)l=s[d],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(c)},n=self["webpackChunkfront"]=self["webpackChunkfront"]||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var n=o.O(void 0,[504],(function(){return o(5104)}));n=o.O(n)})();
|
||
//# sourceMappingURL=app.9cb02566.js.map
|