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.
1 line
2.1 KiB
1 line
2.1 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[43862],{58682:function(t,e,n){n.r(e);var s=n(7557),o=n.n(s),r=n(41498),i=n.n(r),c=n(82242),a=n.n(c),l=n(70236),d=n.n(l),u=(n(59301),n(32637)),h=n(43418),p=n(93969),f=n(37712);e.default=function(t){d()(t);var e=JSON.parse(sessionStorage.getItem("errorStatus")),n=null==e?void 0:e.message,s=null==e?void 0:e.can_return_to_teacher,r=null==e?void 0:e.course_id,c=(null==e||e.switch_to_teacher,null==e?void 0:e.switch_to_assistant),l={display:"inline-block",width:160,height:40,borderRadius:5,fontSize:14,textAlign:"center",lineHeight:"40px"};return(0,f.jsxs)("div",{className:"pt60 pb60 tc",children:[(0,f.jsx)("img",{width:278,src:u,style:{marginTop:167}}),(0,f.jsx)("p",{className:"font16",style:{color:"#999",marginBottom:40,marginTop:20},children:n||(0,f.jsxs)("span",{children:["您遇到了权限问题",(0,f.jsx)("br",{}),"请扫码联系教研助理帮您解决~"]})}),(0,f.jsxs)("div",{style:{marginBottom:70},children:[!s&&history.length>2&&(0,f.jsx)("a",{style:a()(a()({},l),{},{border:"1px solid #0152d9"}),onClick:function(t){t.preventDefault(),history.back()},children:"返回上一页"}),(0,f.jsx)("a",{href:"/",style:a()(a()({},l),{},{backgroundColor:"#0152d9",color:"#fff",marginLeft:history.length>2?40:0}),children:"返回首页"}),s&&(0,f.jsx)("a",{style:a()(a()({},l),{},{border:"1px solid #0152d9",marginLeft:40}),onClick:function(t){var e;t.preventDefault(),h.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"切换身份",content:"由学生身份切换至".concat(c?"助教":"老师",",拥有添加成员、发布作业等管理权限"),onOk:(e=i()(o()().mark((function t(){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,p.ZP)("/api/courses/".concat(r,c?"/switch_to_assistant.json":"/switch_to_teacher.json"),{method:"post"});case 2:0===t.sent.status&&window.location.replace("/classrooms/".concat(r,"/"));case 4:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})})},children:c?"切换为助教":"切换为老师"})]})]})}},32637:function(t,e,n){t.exports=n.p+"static/AssistantCode3.a8740efb.jpeg"}}]); |