auth.96229d68.js 8.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["auth"],{"049d":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"studentAuth"},[a("div",{staticClass:"containerAuth"},[a("p",{staticClass:"input-label"},[t._v("真实姓名")]),a("div",{staticClass:"input-group van-hairline--bottom"},[a("van-field",{attrs:{placeholder:"请输入姓名"},model:{value:t.parentsName,callback:function(e){t.parentsName=e},expression:"parentsName"}})],1),a("p",{staticClass:"input-label"},[t._v("证件号码")]),a("div",{staticClass:"input-group van-hairline--bottom"},[a("van-field",{attrs:{placeholder:"请输入证件号码"},model:{value:t.idCardNo,callback:function(e){t.idCardNo=e},expression:"idCardNo"}})],1),a("van-button",{attrs:{round:"",size:"large",disabled:t.codeDisable},on:{click:t.onSubmit}},[t._v("确定")]),t._m(0),a("van-action-sheet",{attrs:{actions:t.actions,"cancel-text":"取消","close-on-click-action":""},on:{select:t.select},model:{value:t.showSheet,callback:function(e){t.showSheet=e},expression:"showSheet"}})],1)])},r=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("p",{staticClass:"tips"},[t._v("\n 根据"),a("span",{staticStyle:{color:"red"}},[t._v("《合同法》、《电子签名法》")]),t._v("要求,请您据实填写相关身份信息,确保所签署文件真实有效,以保证您的合法权益。\n ")])}],i=a("a34a"),s=a.n(i),o=a("ddf4"),c=a("6e6e"),u=a("2b7c"),l=function(t){return Object(u["a"])({url:"/teacher/queryUserInfo",method:"get",params:t})},d=function(t){return Object(u["a"])({url:"/teacher/realNameAuthentication",method:"post",data:t,requestType:"form"})},h=a("ff51");function p(t){var e=!0,a=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;return!1===a.test(t)&&(e=!1),e}function f(t,e,a,n,r,i,s){try{var o=t[i](s),c=o.value}catch(u){return void a(u)}o.done?e(c):Promise.resolve(c).then(n,r)}function v(t){return function(){var e=this,a=arguments;return new Promise(function(n,r){var i=t.apply(e,a);function s(t){f(i,n,r,s,o,"next",t)}function o(t){f(i,n,r,s,o,"throw",t)}s(void 0)})}}var m={name:"studentAuth",components:{MHeader:c["a"]},data:function(){return{headerStatus:!1,parentsName:null,cardType:"身份证",cardName:"IDENTITY",idCardNo:null,showSheet:!1,actions:[{name:"身份证",index:"IDENTITY"},{name:"港澳居民往来内地通行证",index:"HK_MAC"},{name:"台湾居民往来内地通行证",index:"TAIWAN"},{name:"外国护照",index:"FOREIGN_PASSPORT"}]}},mounted:function(){var t=v(s.a.mark(function t(){var e,a;return s.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e=this.$route.query,e.Authorization&&(localStorage.setItem("Authorization",decodeURI(e.Authorization)),localStorage.setItem("userInfo",decodeURI(e.Authorization))),Object(h["b"])().android||Object(h["b"])().iPhone||(this.headerStatus=!0),document.title="实名认证",t.prev=4,t.next=7,l();case 7:a=t.sent,this.parentsName=a.data.realName,this.idCardNo=a.data.idCardNo,t.next=14;break;case 12:t.prev=12,t.t0=t["catch"](4);case 14:case"end":return t.stop()}},t,this,[[4,12]])}));function e(){return t.apply(this,arguments)}return e}(),computed:{codeDisable:function(){return!this.idCardNo||!this.parentsName}},methods:{select:function(t){this.cardType=t.name,this.cardName=t.index},onSubmit:function(){var t=v(s.a.mark(function t(){var e;return s.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(!this.codeDisable){t.next=2;break}return t.abrupt("return");case 2:if(e=/^[\u4E00-\u9FA5]+$/,e.test(this.parentsName)){t.next=8;break}return this.$toast("真实姓名必须为中文"),t.abrupt("return");case 8:if(!(this.parentsName.length<2||this.parentsName.length>15)){t.next=11;break}return this.$toast("真实姓名必须为2~15个字"),t.abrupt("return");case 11:if("身份证"!=this.cardType){t.next=15;break}if(p(this.idCardNo)){t.next=15;break}return this.$toast("身份证号输入有误"),t.abrupt("return");case 15:return t.prev=15,t.next=18,d({realName:this.parentsName,idcardNo:this.idCardNo});case 18:this.$toast("实名成功"),setTimeout(function(){Object(o["a"])({api:"authToBack",content:{}})},1e3),t.next=24;break;case 22:t.prev=22,t.t0=t["catch"](15);case 24:case"end":return t.stop()}},t,this,[[15,22]])}));function e(){return t.apply(this,arguments)}return e}()}},b=m,y=(a("e834"),a("2877")),g=Object(y["a"])(b,n,r,!1,null,"40dfbc54",null);e["default"]=g.exports},"38f0":function(t,e,a){"use strict";var n=a("5b7e"),r=a.n(n);r.a},5436:function(t,e,a){},"5b7e":function(t,e,a){},"6e6e":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mheader",style:{height:"calc("+t.titleHeight+"px + "+t.navBarHeight+"px)"}},[a("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""],style:[t.headStyle]},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[a("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),a("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),a("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},r=[],i=a("a34a"),s=a.n(i),o=a("ddf4");function c(t,e,a,n,r,i,s){try{var o=t[i](s),c=o.value}catch(u){return void a(u)}o.done?e(c):Promise.resolve(c).then(n,r)}function u(t){return function(){var e=this,a=arguments;return new Promise(function(n,r){var i=t.apply(e,a);function s(t){c(i,n,r,s,o,"next",t)}function o(t){c(i,n,r,s,o,"throw",t)}s(void 0)})}}var l={name:"mheader",props:{name:String,isNative:{type:Boolean,default:!0},isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},data:function(){return{navBarHeight:0,headStyle:{},titleHeight:44}},mounted:function(){this.isNative||(Object(o["a"])({api:"setBarStatus",content:{status:0}}),this.getNav(),this.isBack=!1)},methods:{getNav:function(){var t=u(s.a.mark(function t(){var e,a,n=this;return s.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e=sessionStorage.getItem("navHeight"),a=sessionStorage.getItem("titleHeight"),!e||!a){t.next=7;break}this.navBarHeight=e,this.headStyle={paddingTop:e+"px",height:a+"px",lineHeight:a+"px"},t.next=9;break;case 7:return t.next=9,Object(o["a"])({api:"getNavHeight"},function(t){var e=t.content,a={},r=e.dpi||2;if(e.navHeight){var i=e.navHeight/r;sessionStorage.setItem("navHeight",i),n.navBarHeight=i,a={paddingTop:i+"px"}}if(e.titleHeight){var s=e.titleHeight/r;sessionStorage.setItem("titleHeight",s),n.titleHeight=s,a.height=s+"px",a.lineHeight=s+"px"}n.headStyle=a});case 9:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}},beforeDestroy:function(){this.isNative||(Object(o["a"])({api:"setBarStatus",content:{status:1}}),this.isBack=!0)}},d=l,h=(a("38f0"),a("2877")),p=Object(h["a"])(d,n,r,!1,null,"6a74717c",null);e["a"]=p.exports},ddf4:function(t,e,a){"use strict";a.d(e,"a",function(){return h});var n=a("ff51");function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,n)}return a}function i(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?r(Object(a),!0).forEach(function(e){s(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var c=function(){},u={},l=Object(n["b"])();l.isApp&&window.addEventListener("message",function(t){try{var e=t.data?"object"===o(t.data)?t.data:JSON.parse(t.data):{},a=e.content.uuid||e.uuid;try{e.content&&(e.content=JSON.parse(e.content))}catch(v){}if(!a){var n=Object.keys(u).filter(function(t){return 0===t.indexOf(e.api)}),r=!0,i=!1,s=void 0;try{for(var l,d=n[Symbol.iterator]();!(r=(l=d.next()).done);r=!0){var h=l.value,p=u[h]||c;p(e)}}catch(m){i=!0,s=m}finally{try{r||null==d.return||d.return()}finally{if(i)throw s}}return}var f=u[e.content.uuid||e.uuid||e.api+e.uuid]||c;f(e)}catch(v){console.error("通信消息解析错误",v)}});var d=window.DAYA||window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.DAYA,h=function(t,e){if(l.isApp){var a=Object(n["g"])();u[a]=e||c,t.content=t.content?i({},t.content,{uuid:a}):{uuid:a},d.postMessage(JSON.stringify(t))}}},e834:function(t,e,a){"use strict";var n=a("5436"),r=a.n(n);r.a}}]);