import{d as o,s as a,e as s,aE as i,p as c,i as t,F as n,B as u,w as l}from"./index.afa1b71c.js";import{U as m}from"./index.da06133b.js";import"./index.deee835e.js";import"./index.72f11453.js";import"./index.ceb58f38.js";import"./index.61a5e45f.js";import"./use-height.f6c2abd5.js";import"./index.42378eb4.js";import"./index.4b8ed396.js";import"./index.8fb41b14.js";import"./index.dd9b166a.js";import"./use-id.237d90a3.js";import"./icon_checkbox_default.2fe5d57e.js";import"./index.f80d8e15.js";const p="_cashProtocol_ifi2b_1",h="_submit_ifi2b_4";var r={cashProtocol:p,submit:h},_=o({name:"cash-protocol",data(){return{realStatus:!0,url:""}},async mounted(){try{console.log(a.user);const e=a.user.data;!e.realName||!e.idCardNo?this.realStatus=!1:this.getDetail()}catch{}},methods:{async getDetail(){try{const e=await s.get("/api-teacher/sysUserContractRecord/queryLatestContractTemplate",{params:{contractType:"WITHDRAW"}});this.url=window.location.origin+window.location.pathname+"/pdf/web/viewer.html?file="+encodeURIComponent(e.data.origanalFileUrl)+"&btn=1"}catch{}},async onSubmit(){try{await s.get("/api-teacher/sysUserContractRecord/sign",{params:{contractType:"WITHDRAW"}}),setTimeout(()=>{i("\u7B7E\u7F72\u6210\u529F")},100),setTimeout(()=>{c({api:"openPageSuccess",content:{page:"WITHDRAW"}})},1e3)}catch{}},onSuccess(){this.realStatus=!0,this.getDetail()}},render(){return t("div",{class:r.cashProtocol},[this.realStatus?t(n,null,[t("iframe",{src:this.url,frameborder:"0",style:{width:"100%",height:"100vh",border:"none"}},null),t(u,{type:"primary",size:"large",block:!0,round:!0,class:r.submit,onClick:this.onSubmit},{default:()=>[l("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")]})]):t(m,{onSuccess:this.onSuccess},null)])}});export{_ as default};
