index.21404bd5.js 1.7 KB

1
  1. import{d as o,g as a,w as r,T as i,n as c,j as t,F as n,E as u,B as l}from"./index.c8a33855.js";import{U as m}from"./index.1292d7a0.js";import"./index.b0b12cde.js";import"./index.057a05f7.js";import"./index.00003e8f.js";import"./index.a0b72ee6.js";import"./use-height.f274d759.js";import"./index.e3473eb6.js";import"./index.08e52374.js";import"./index.89b19a2f.js";import"./index.5792511e.js";import"./use-id.c5c54d4f.js";import"./icon_checkbox_default.2fe5d57e.js";import"./index.2c52c44d.js";const p="_cashProtocol_ifi2b_1",h="_submit_ifi2b_4";var s={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 r.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 r.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:s.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:s.submit,onClick:this.onSubmit},{default:()=>[l("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")]})]):t(m,{onSuccess:this.onSuccess},null)])}});export{_ as default};