auth.162a6f49.js 9.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["auth"],{"049d":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"studentAuth"},[n("div",{staticClass:"containerAuth"},[n("p",{staticClass:"input-label"},[t._v("真实姓名")]),n("div",{staticClass:"input-group van-hairline--bottom"},[n("van-field",{attrs:{placeholder:"请输入姓名"},model:{value:t.parentsName,callback:function(e){t.parentsName=e},expression:"parentsName"}})],1),n("p",{staticClass:"input-label"},[t._v("证件号码")]),n("div",{staticClass:"input-group van-hairline--bottom"},[n("van-field",{attrs:{placeholder:"请输入证件号码"},model:{value:t.idCardNo,callback:function(e){t.idCardNo=e},expression:"idCardNo"}})],1),n("van-button",{attrs:{round:"",size:"large",disabled:t.codeDisable},on:{click:t.onSubmit}},[t._v("确定")]),t._m(0),n("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,n=t._self._c||e;return n("p",{staticClass:"tips"},[t._v("\n 根据"),n("span",{staticStyle:{color:"red"}},[t._v("《合同法》、《电子签名法》")]),t._v("要求,请您据实填写相关身份信息,确保所签署文件真实有效,以保证您的合法权益。\n ")])}],i=n("a34a"),o=n.n(i),s=n("ddf4"),c=n("6e6e"),u=n("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=n("ff51");function p(t){var e=!0,n=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;return!1===n.test(t)&&(e=!1),e}function f(t,e,n,a,r,i,o){try{var s=t[i](o),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(a,r)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(a,r){var i=t.apply(e,n);function o(t){f(i,a,r,o,s,"next",t)}function s(t){f(i,a,r,o,s,"throw",t)}o(void 0)})}}var b={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(o.a.mark(function t(){var e,n;return o.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:n=t.sent,this.parentsName=n.data.realName,this.idCardNo=n.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(o.a.mark(function t(){var e;return o.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(s["b"])({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}()}},m=b,y=(n("e834"),n("2877")),g=Object(y["a"])(m,a,r,!1,null,"40dfbc54",null);e["default"]=g.exports},"38f0":function(t,e,n){"use strict";var a=n("5b7e"),r=n.n(a);r.a},5436:function(t,e,n){},"5b7e":function(t,e,n){},"6e6e":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mheader",style:{height:"calc("+t.titleHeight+"px + "+t.navBarHeight+"px)"}},[n("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""],style:[t.headStyle]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[n("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),n("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},r=[],i=n("a34a"),o=n.n(i),s=n("ddf4");function c(t,e,n,a,r,i,o){try{var s=t[i](o),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(a,r)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(a,r){var i=t.apply(e,n);function o(t){c(i,a,r,o,s,"next",t)}function s(t){c(i,a,r,o,s,"throw",t)}o(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(s["b"])({api:"setBarStatus",content:{status:0}}),this.getNav(),this.isBack=!1)},methods:{getNav:function(){var t=u(o.a.mark(function t(){var e,n,a=this;return o.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e=sessionStorage.getItem("navHeight"),n=sessionStorage.getItem("titleHeight"),!e||!n){t.next=7;break}this.navBarHeight=e,this.headStyle={paddingTop:e+"px",height:n+"px",lineHeight:n+"px"},t.next=9;break;case 7:return t.next=9,Object(s["b"])({api:"getNavHeight"},function(t){var e=t.content,n={},r=e.dpi||2;if(e.navHeight){var i=e.navHeight/r;sessionStorage.setItem("navHeight",i),a.navBarHeight=i,n={paddingTop:i+"px"}}if(e.titleHeight){var o=e.titleHeight/r;sessionStorage.setItem("titleHeight",o),a.titleHeight=o,n.height=o+"px",n.lineHeight=o+"px"}a.headStyle=n});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(s["b"])({api:"setBarStatus",content:{status:1}}),this.isBack=!0)}},d=l,h=(n("38f0"),n("2877")),p=Object(h["a"])(d,a,r,!1,null,"6a74717c",null);e["a"]=p.exports},ddf4:function(t,e,n){"use strict";n.d(e,"b",function(){return h}),n.d(e,"a",function(){return p});var a=n("ff51");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="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},s(t)}var c=function(){},u={},l=Object(a["b"])();l.isApp&&window.addEventListener("message",function(t){try{var e=t.data?"object"===s(t.data)?t.data:JSON.parse(t.data):{},n=e.content.uuid||e.uuid;try{e.content&&(e.content=JSON.parse(e.content))}catch(v){}if(!n){var a=Object.keys(u).filter(function(t){return 0===t.indexOf(e.api)}),r=!0,i=!1,o=void 0;try{for(var l,d=a[Symbol.iterator]();!(r=(l=d.next()).done);r=!0){var h=l.value,p=u[h]||c;p(e)}}catch(b){i=!0,o=b}finally{try{r||null==d.return||d.return()}finally{if(i)throw o}}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 n=Object(a["g"])();u[n]=e||c,t.content=t.content?i({},t.content,{uuid:n}):{uuid:n},d.postMessage(JSON.stringify(t))}},p=function(t,e){if(l.isApp){var n=t+Object(a["g"])();u[n]=e||c}}},e834:function(t,e,n){"use strict";var a=n("5436"),r=n.n(a);r.a}}]);