1 |
- !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(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 r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,o,a,c){try{var i=e[a](c),u=i.value}catch(l){return void r(l)}i.done?t(u):Promise.resolve(u).then(n,o)}var o=document.createElement("style");o.innerHTML="._userAuth_1egg3_1{min-height:100vh;background-color:#f6f8f9;overflow:hidden}._userAuth_1egg3_1 ._btnGroup_1egg3_6{padding:0 .37333rem .4rem}._userAuth_1egg3_1 ._colProtocol_1egg3_10{font-size:.32rem;padding:.4rem .37333rem;color:#999}._userAuth_1egg3_1 ._colProtocol_1egg3_10 ._protocolText_1egg3_15{color:var(--van-primary);line-height:.4rem}._userAuth_1egg3_1 ._colProtocol_1egg3_10 ._boxStyle_1egg3_19{background:transparent!important;width:.4rem;height:.4rem;border:transparent!important}._userAuth_1egg3_1 ._colProtocol_1egg3_10 .van-checkbox{display:inline-block;align-items:inherit;overflow:inherit}._userAuth_1egg3_1 ._colProtocol_1egg3_10 .van-checkbox__icon{height:.4rem;line-height:.4rem;display:inline-block;vertical-align:middle}._userAuth_1egg3_1 ._colProtocol_1egg3_10 .van-checkbox__label{line-height:.4rem}\n",document.head.appendChild(o),System.register(["./index-legacy.fafbdfb8.js","./index-legacy.81a64bb6.js","./index-legacy.b2528a15.js","./index-legacy.987f23f1.js","./index-legacy.7d3d7cf1.js","./index-legacy.207dc8c2.js","./index-legacy.ab501af1.js","./icon_checkbox_default-legacy.e33240bc.js","./index-legacy.5af656e4.js"],(function(e){"use strict";var r,o,a,c,i,u,l,s,d,f,g,m,_,h,p,b,y,v;return{setters:[function(e){r=e.C,o=e.a},function(e){a=e.C},function(e){c=e.d,i=e.s,u=e.T,l=e.e,s=e.p,d=e.i,f=e.A,g=e.N,m=e.F,_=e.B},function(e){h=e.C},function(){},function(){},function(e){p=e.F},function(e){b=e.a,y=e.i},function(e){v=e.F}],execute:function(){var x="_userAuth_1egg3_1",j="_colProtocol_1egg3_10",k="_protocolText_1egg3_15",N="_boxStyle_1egg3_19";e("U",c({name:"UserAuth",props:{onSuccess:{type:Function,default:function(){}},exists:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1}},data:function(){return{form:{realName:"",idCardNo:""},checked:!1}},mounted:function(){this.checked=this.checked||this.exists;var e=i.user.data;this.form.realName=null==e?void 0:e.realName},methods:{onSubmit:function(){var e,r=this;return(e=regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r.checked){e.next=4;break}return u("请先阅读并同意《用户注册协议》"),e.abrupt("return");case 4:return n="STUDENT"===i.platformType?"/api-student/student/realNameAuth":"/api-teacher/teacher/realNameAuth",e.next=7,l.post(n,{data:t(t({},r.form),{},{contract:!0,save:!0})});case 7:u("实名成功"),i.user.data.realName=r.form.realName,i.user.data.idCardNo=r.form.idCardNo,setTimeout((function(){r.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,r=arguments;return new Promise((function(o,a){var c=e.apply(t,r);function i(e){n(c,o,a,i,u,"next",e)}function u(e){n(c,o,a,i,u,"throw",e)}i(void 0)}))})()},getContractDetail:function(){var e="STUDENT"===i.platformType?"student":"teacher";s({api:"openWebView",content:{url:"".concat(location.origin,"/").concat(e,"/#/previewProtocol"),orientation:1,isHideTitle:!1}})}},render:function(){var e=this;return d(v,{class:x,onSubmit:this.onSubmit},{default:function(){return[!e.hideHeader&&d(a,{title:"实名认证"},null),d(r,{style:{marginTop:"15px"}},{default:function(){return[d(o,{title:"姓名",required:!0},{default:function(){return[d(p,{name:"lessonName",maxlength:20,modelValue:e.form.realName,"onUpdate:modelValue":function(t){return e.form.realName=t},placeholder:"请输入真实姓名",rules:[{required:!0,message:"请输入真实姓名"}]},null)]}}),d(o,{title:"证件号码",required:!0},{default:function(){return[d(p,{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)]}})]}}),d("div",{class:j},[!e.exists&&d(h,{modelValue:e.checked,"onUpdate:modelValue":function(t){return e.checked=t}},{default:function(){return[f("我已阅读并同意")]},icon:function(e){return d(g,{class:N,name:e.checked?b:y,size:"15"},null)}}),e.exists&&d(m,null,[f("查看")]),d("span",{onClick:e.getContractDetail,class:k},[f("《用户注册协议》")])]),d("div",{class:["btnGroup"]},[d(_,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:function(){return[f("确定")]}})])]}})}}))}}}))}();
|