You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
2.6 KiB
2 lines
2.6 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3862],{65768:function(C,p,n){n.r(p);var r=n(59301),h=n(32637),v=n(62957),y=n(49317),P=Object.defineProperty,D=Object.defineProperties,O=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,f=(e,u,t)=>u in e?P(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,i=(e,u)=>{for(var t in u||(u={}))g.call(u,t)&&f(e,t,u[t]);if(m)for(var t of m(u))A.call(u,t)&&f(e,t,u[t]);return e},_=(e,u)=>D(e,O(u)),w=(e,u,t)=>new Promise((a,E)=>{var l=s=>{try{o(t.next(s))}catch(d){E(d)}},c=s=>{try{o(t.throw(s))}catch(d){E(d)}},o=s=>s.done?a(s.value):Promise.resolve(s.value).then(l,c);o((t=t.apply(e,u)).next())});const B=({})=>{const e=JSON.parse(sessionStorage.getItem("errorStatus")),u=e==null?void 0:e.message,t=e==null?void 0:e.can_return_to_teacher,a=e==null?void 0:e.course_id,E=e==null?void 0:e.switch_to_teacher,l=e==null?void 0:e.switch_to_assistant,c={display:"inline-block",width:160,height:40,borderRadius:5,fontSize:14,textAlign:"center",lineHeight:"40px"};return r.createElement("div",{className:"pt60 pb60 tc"},r.createElement("img",{width:278,src:h,style:{marginTop:167}}),r.createElement("p",{className:"font16",style:{color:"#999",marginBottom:40,marginTop:20}},u||r.createElement("span",null,"\u60A8\u9047\u5230\u4E86\u6743\u9650\u95EE\u9898",r.createElement("br",null),"\u8BF7\u626B\u7801\u8054\u7CFB\u6559\u7814\u52A9\u7406\u5E2E\u60A8\u89E3\u51B3~")),r.createElement("div",{style:{marginBottom:70}},!t&&history.length>2&&r.createElement("a",{style:_(i({},c),{border:"1px solid #0152d9"}),onClick:o=>{o.preventDefault(),history.back()}},"\u8FD4\u56DE\u4E0A\u4E00\u9875"),r.createElement("a",{href:"/",style:_(i({},c),{backgroundColor:"#0152d9",color:"#fff",marginLeft:history.length>2?40:0})},"\u8FD4\u56DE\u9996\u9875"),t&&r.createElement("a",{style:_(i({},c),{border:"1px solid #0152d9",marginLeft:40}),onClick:o=>{o.preventDefault(),v.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5207\u6362\u8EAB\u4EFD",content:`\u7531\u5B66\u751F\u8EAB\u4EFD\u5207\u6362\u81F3${l?"\u52A9\u6559":"\u8001\u5E08"}\uFF0C\u62E5\u6709\u6DFB\u52A0\u6210\u5458\u3001\u53D1\u5E03\u4F5C\u4E1A\u7B49\u7BA1\u7406\u6743\u9650`,onOk:()=>w(void 0,null,function*(){(yield(0,y.ZP)(l?`/api/courses/${a}/switch_to_assistant.json`:`/api/courses/${a}/switch_to_teacher.json`,{method:"post"})).status===0&&window.location.replace(`/classrooms/${a}/`)})})}},l?"\u5207\u6362\u4E3A\u52A9\u6559":"\u5207\u6362\u4E3A\u8001\u5E08")))};p.default=B}}]);
|