1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(l){return void n(l)}c.done?t(u):Promise.resolve(u).then(r,o)}var o=document.createElement("style");o.innerHTML="._userAuth_863ih_1{min-height:100vh;background-color:#f6f8f9;overflow:hidden}._userAuth_863ih_1 ._btnGroup_863ih_6{padding:0 .37333rem .4rem}._userAuth_863ih_1 ._btnTenant_863ih_10{background:linear-gradient(270deg,#FF204B 0%,#FE5B71 100%);font-size:.42667rem;font-weight:500;color:#fff;border:none;padding:0 1.12rem!important}._userAuth_863ih_1 ._colProtocol_863ih_18{font-size:.32rem;padding:.4rem .37333rem;color:#999}._userAuth_863ih_1 ._colProtocol_863ih_18 ._protocolText_863ih_23{color:var(--van-primary);line-height:.4rem}._userAuth_863ih_1 ._colProtocol_863ih_18 ._boxStyle_863ih_27{background:transparent!important;width:.4rem;height:.4rem;border:transparent!important}._userAuth_863ih_1 ._colProtocol_863ih_18 .van-checkbox{display:inline-block;align-items:inherit;overflow:inherit}._userAuth_863ih_1 ._colProtocol_863ih_18 .van-checkbox__icon{height:.4rem;line-height:.4rem;display:inline-block;vertical-align:middle}._userAuth_863ih_1 ._colProtocol_863ih_18 .van-checkbox__label{line-height:.4rem}\n",document.head.appendChild(o),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.56fd22af.js","./index-legacy.7e687ee8.js","./index-legacy.6ac2a941.js","./index-legacy.39123961.js","./index-legacy.23131301.js","./index-legacy.c8c5bc4e.js","./index-legacy.cae55a25.js","./icon_checkbox-legacy.6421631e.js","./icon_checkbox_default-legacy.9f3738fd.js","./icon_checkbox-tenant-legacy.b4d3b7a3.js","./index-legacy.e21472a8.js","./index-legacy.b20da433.js"],(function(e){"use strict";var n,o,i,a,c,u,l,s,d,h,f,p,m,_,b,g,y,v,x,j,k,w;return{setters:[function(e){n=e.d,o=e.g,i=e.T,a=e.y,c=e.f,u=e.n,l=e.j,s=e.A,d=e.N,h=e.F,f=e.B,p=e.aS},function(e){m=e.C},function(e){_=e.C},function(e){b=e.C},function(e){g=e.C},function(){},function(){},function(e){y=e.F},function(e){v=e.a},function(e){x=e.i},function(e){j=e.a},function(e){k=e.default},function(e){w=e.F}],execute:function(){var N="_userAuth_863ih_1",O="_btnTenant_863ih_10",P="_colProtocol_863ih_18",S="_protocolText_863ih_23",T="_boxStyle_863ih_27";e("U",n({name:"UserAuth",props:{onSuccess:{type:Function,default:function(){}},exists:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1}},data:function(){return{popupShow:!1,iframeSrc:"",form:{realName:"",idCardNo:""},checked:!1}},mounted:function(){this.checked=this.checked||this.exists;var e=o.user.data;this.form.realName=null==e?void 0:e.realName},methods:{onSubmit:function(){var e,n=this;return(e=regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.checked){e.next=4;break}return i("请先阅读并同意《用户注册协议》"),e.abrupt("return");case 4:return r="STUDENT"===o.platformType?"/api-student/student/realNameAuth":"/api-teacher/teacher/realNameAuth",e.next=7,a.post(r,{data:t(t({},n.form),{},{contract:!0,save:!0})});case 7:i("实名成功"),o.user.data.realName=n.form.realName,o.user.data.idCardNo=n.form.idCardNo,setTimeout((function(){n.onSuccess()}),500),e.next=15;break;case 13:e.prev=13,e.t0=e.catch(0);case 15:case"end":return e.stop()}}),e,null,[[0,13]])})),function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(void 0)}))})()},getContractDetail:function(){var e="STUDENT"===o.platformType?"student":"teacher";c().isApp?u({api:"openWebView",content:{url:"".concat(location.origin,"/").concat(e,"/#/previewProtocol"),orientation:1,isHideTitle:!1}}):this.popupShow=!0}},render:function(){var e=this;return l(w,{class:N,onSubmit:this.onSubmit},{default:function(){return[!e.hideHeader&&l(b,{title:"实名认证"},null),l(_,{style:{marginTop:"15px"}},{default:function(){return[l(m,{title:"姓名",required:!0},{default:function(){return[l(y,{name:"lessonName",maxlength:20,modelValue:e.form.realName,"onUpdate:modelValue":function(t){return e.form.realName=t},placeholder:"请输入真实姓名",rules:[{required:!0,message:"请输入真实姓名"}]},null)]}}),l(m,{title:"证件号码",required:!0},{default:function(){return[l(y,{name:"lessonSubjectName",modelValue:e.form.idCardNo,"onUpdate:modelValue":function(t){return e.form.idCardNo=t},rules:[{required:!0,message:"请输入身份证号"},{pattern:/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:"请输入正确的身份证号"}],placeholder:"请输入身份证号"},null)]}})]}}),l("div",{class:P},[!e.exists&&l(g,{modelValue:e.checked,"onUpdate:modelValue":function(t){return e.checked=t}},{default:function(){return[s("我已阅读并同意")]},icon:function(e){return l(d,{class:T,name:e.checked?"tenant"===o.projectType?j:v:x,size:"15"},null)}}),e.exists&&l(h,null,[s("查看")]),l("span",{onClick:e.getContractDetail,class:S},[s("《用户注册协议》")])]),l("div",{class:["btnGroup"]},[l(f,{block:!0,round:!0,type:"primary","native-type":"submit",class:"tenant"===o.projectType&&O},{default:function(){return[s("确定")]}})]),l(p,{show:e.popupShow,"onUpdate:show":function(t){return e.popupShow=t},round:!0,position:"bottom",style:{height:"80vh"}},{default:function(){return[l(k,null,null)]}})]}})}}))}}}))}();
|