1 |
- import{d as o,s as a,e as s,T as i,p as c,i as t,F as n,B as u,A as l}from"./index.7994470a.js";import{U as m}from"./index.89f739a7.js";import"./index.f9e55fe3.js";import"./index.80389b79.js";import"./index.c5bf3ab5.js";import"./index.0a2aeb2c.js";import"./use-height.ffa5a0f3.js";import"./index.29eb1675.js";import"./index.c9af17c2.js";import"./index.777f4790.js";import"./index.3dd26d27.js";import"./use-id.117b75b2.js";import"./icon_checkbox_default.2fe5d57e.js";import"./index.a241f507.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};
|