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"),o=a.n(i),s=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"})},p=a("ff51");function f(t){var e=!0,a=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;return!1===a.test(t)&&(e=!1),e}function h(t,e,a,n,r,i,o){try{var s=t[i](o),c=s.value}catch(u){return void a(u)}s.done?e(c):Promise.resolve(c).then(n,r)}function b(t){return function(){var e=this,a=arguments;return new Promise(function(n,r){var i=t.apply(e,a);function o(t){h(i,n,r,o,s,"next",t)}function s(t){h(i,n,r,o,s,"throw",t)}o(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=b(o.a.mark(function t(){var e,a;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(p["b"])().android||Object(p["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=b(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(f(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["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}()}},v=m,y=(a("e834"),a("2877")),w=Object(y["a"])(v,n,r,!1,null,"40dfbc54",null);e["default"]=w.exports},5436: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"},[a("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[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={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{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)}}},o=i,s=(a("d133"),a("2877")),c=Object(s["a"])(o,n,r,!1,null,"0e835508",null);e["a"]=c.exports},bb2c:function(t,e,a){},d133:function(t,e,a){"use strict";var n=a("bb2c"),r=a.n(n);r.a},ddf4:function(t,e,a){"use strict";a.d(e,"a",function(){return p});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(a,!0).forEach(function(e){o(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):r(a).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function o(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,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(n["b"])();l.isApp&&window.addEventListener("message",function(t){try{var e=t.data?"object"===s(t.data)?t.data:JSON.parse(t.data):{},a=e.content.uuid||e.uuid;try{e.content&&(e.content=JSON.parse(e.content))}catch(b){}if(!a){var n=Object.keys(u).filter(function(t){return 0===t.indexOf(e.api)}),r=!0,i=!1,o=void 0;try{for(var l,d=n[Symbol.iterator]();!(r=(l=d.next()).done);r=!0){var p=l.value,f=u[p]||c;f(e)}}catch(m){i=!0,o=m}finally{try{r||null==d.return||d.return()}finally{if(i)throw o}}return}var h=u[e.content.uuid||e.uuid||e.api+e.uuid]||c;h(e)}catch(b){console.error("通信消息解析错误",b)}});var d=window.DAYA||window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.DAYA,p=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}}]);
|