index-legacy.b7808b3d.js 3.2 KB

1
  1. !function(){function e(e,t,n,r,a,i,c){try{var o=e[i](c),s=o.value}catch(u){return void n(u)}o.done?t(s):Promise.resolve(s).then(r,a)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(a,i){var c=t.apply(n,r);function o(t){e(c,a,i,o,s,"next",t)}function s(t){e(c,a,i,o,s,"throw",t)}o(void 0)}))}}var n=document.createElement("style");n.innerHTML="._cashProtocol_ifi2b_1{position:relative}._cashProtocol_ifi2b_1 ._submit_ifi2b_4{width:90%;margin-left:5%;margin-bottom:.4rem;position:absolute;bottom:0;z-index:99}\n",document.head.appendChild(n),System.register(["./index-legacy.b2528a15.js","./index-legacy.0d47d1e6.js","./index-legacy.fafbdfb8.js","./index-legacy.d3645f16.js","./index-legacy.81a64bb6.js","./index-legacy.f75b8290.js","./use-height-legacy.2a153aaf.js","./index-legacy.987f23f1.js","./index-legacy.7d3d7cf1.js","./index-legacy.207dc8c2.js","./index-legacy.ab501af1.js","./use-id-legacy.4f071235.js","./icon_checkbox_default-legacy.e33240bc.js","./index-legacy.5af656e4.js"],(function(e){"use strict";var n,r,a,i,c,o,s,u,l,f;return{setters:[function(e){n=e.d,r=e.s,a=e.e,i=e.T,c=e.p,o=e.i,s=e.F,u=e.B,l=e.A},function(e){f=e.U},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var d="_cashProtocol_ifi2b_1",m="_submit_ifi2b_4";e("default",n({name:"cash-protocol",data:function(){return{realStatus:!0,url:""}},mounted:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{console.log(r.user),(n=r.user.data).realName&&n.idCardNo?e.getDetail():e.realStatus=!1}catch(a){}case 1:case"end":return t.stop()}}),t)})))()},methods:{getDetail:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.get("/api-teacher/sysUserContractRecord/queryLatestContractTemplate",{params:{contractType:"WITHDRAW"}});case 3:n=t.sent,e.url=window.location.origin+window.location.pathname+"/pdf/web/viewer.html?file="+encodeURIComponent(n.data.origanalFileUrl)+"&btn=1",t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()},onSubmit:function(){return t(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.get("/api-teacher/sysUserContractRecord/sign",{params:{contractType:"WITHDRAW"}});case 3:setTimeout((function(){i("签署成功")}),100),setTimeout((function(){c({api:"openPageSuccess",content:{page:"WITHDRAW"}})}),1e3),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})))()},onSuccess:function(){this.realStatus=!0,this.getDetail()}},render:function(){return o("div",{class:d},[this.realStatus?o(s,null,[o("iframe",{src:this.url,frameborder:"0",style:{width:"100%",height:"100vh",border:"none"}},null),o(u,{type:"primary",size:"large",block:!0,round:!0,class:m,onClick:this.onSubmit},{default:function(){return[l("我已阅读并同意")]}})]):o(f,{onSuccess:this.onSuccess},null)])}}))}}}))}();