;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.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(__vite_style__);System.register(['./index-legacy.1cd7b6bb.js','./vendor-legacy.031e1374.js','./index-legacy.820df6d5.js','./index-legacy.d70883d8.js','./index-legacy.637f3556.js','./index-legacy.1bb96d98.js','./index-legacy.f25f109a8.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a3.js'],function(exports){'use strict';var state,request,postMessage,defineComponent,Toast,createVNode,Fragment,Button,createTextVNode,UserAuth;return{setters:[function(module){state=module.s;request=module.r;postMessage=module.p;},function(module){defineComponent=module.d;Toast=module.T;createVNode=module.a;Fragment=module.F;Button=module.B;createTextVNode=module.j;},function(module){UserAuth=module.U;},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var cashProtocol="_cashProtocol_ifi2b_1";var submit="_submit_ifi2b_4";var styles={cashProtocol:cashProtocol,submit:submit};var index=exports('default',defineComponent({name:'cash-protocol',data:function data(){return{realStatus:true,// 是否已经实名认证
url:''};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var user;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:try{// 先实名认证
console.log(state.user);user=state.user.data;if(!user.realName||!user.idCardNo){_this.realStatus=false;}else{_this.getDetail();}}catch(_unused){}case 1:case"end":return _context.stop();}}},_callee);}))();},methods:{getDetail:function getDetail(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get('/api-teacher/sysUserContractRecord/queryLatestContractTemplate',{params:{contractType:'WITHDRAW'}});case 3:res=_context2.sent;_this2.url=window.location.origin+window.location.pathname+'/pdf/web/viewer.html?file='+// encodeURIComponent(
//   'http://daya.ks3-cn-beijing.ksyun.com/202207/TAxRhc6.pdf'
// ) +
encodeURIComponent(res.data.origanalFileUrl)+'&btn=1';_context2.next=9;break;case 7:_context2.prev=7;_context2.t0=_context2["catch"](0);case 9:case"end":return _context2.stop();}}},_callee2,null,[[0,7]]);}))();},onSubmit:function onSubmit(){return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return request.get('/api-teacher/sysUserContractRecord/sign',{params:{contractType:'WITHDRAW'}});case 3:setTimeout(function(){Toast('签署成功');},100);setTimeout(function(){postMessage({api:'openPageSuccess',content:{page:'WITHDRAW'}});},1000);_context3.next=9;break;case 7:_context3.prev=7;_context3.t0=_context3["catch"](0);case 9:case"end":return _context3.stop();}}},_callee3,null,[[0,7]]);}))();},onSuccess:function onSuccess(){// 实名成功
this.realStatus=true;this.getDetail();}},render:function render(){return createVNode("div",{"class":styles.cashProtocol},[this.realStatus?createVNode(Fragment,null,[createVNode("iframe",{"src":this.url,"frameborder":"0","style":{width:'100%',height:'100vh',border:'none'}},null),createVNode(Button,{"type":"primary","size":"large","block":true,"round":true,"class":styles.submit,"onClick":this.onSubmit},{default:function _default(){return[createTextVNode("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")];}})]):createVNode(UserAuth,{"onSuccess":this.onSuccess},null)]);}}));}};});})();
