1 |
- import{d as s,g as a,w as r,T as i,n as c,j as t,F as n,B as l,z as u}from"./index.b4531198.js";import{U as m}from"./index.b69339b2.js";import{C as p}from"./index.ab25f43b.js";import{T as h}from"./index.c3df6f19.js";import"./index.de083047.js";import"./index.ec7e80d0.js";import"./index.a2d5e80d.js";import"./index.547b3e4f.js";import"./index.fe40bde8.js";import"./index.73f964f0.js";import"./use-id.4e73f8c4.js";import"./icon_checkbox_default.2fe5d57e.js";import"./icon_checkbox-tenant.ecfa11df.js";import"./index.fed5dbdb.js";import"./index.f05535c0.js";const d="_cashProtocol_ifi2b_1",g="_submit_ifi2b_4";var o={cashProtocol:d,submit:g},A=s({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:o.cashProtocol},[t(h,{position:"top"},{default:()=>[t(p,null,null)]}),this.realStatus?t(n,null,[t("iframe",{src:this.url,frameborder:"0",style:{width:"100%",height:"calc(100vh - var(--header-height))",border:"none"}},null),t(l,{type:"primary",size:"large",block:!0,round:!0,class:o.submit,onClick:this.onSubmit},{default:()=>[u("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")]})]):t(m,{onSuccess:this.onSuccess},null)])}});export{A as default};
|