2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
webpackJsonp([2],{"2NXm":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("mvHQ"),i=n.n(o),a=n("woOf"),r=n.n(a),s=n("bOdI"),c=n.n(s),u={data:function(){return{userData:{},token:"",projectDetail:{}}},created:function(){this.httpUrl=rootURL;var t=window.location.href,e=t.split("?")[1];console.log(t);var n=e.split("&"),o={};n.forEach(function(t,e){if(console.log(t),e==n.length-1){var i=t.split("=")[0],a=t.split("=")[1].split("#")[0],s=c()({},i,a);r()(o,s)}else{var u=t.split("=")[0],l=t.split("=")[1],d=c()({},u,l);r()(o,d)}}),console.log(o,777888),localStorage.setItem("userData",i()(o)),this.userData=o,this.getToken()},methods:{getProjectInfoBySn:function(){var t=this,e=this.httpUrl+"xmgl/project/getProjectInfoBySn",n={projectSn:this.userData.projectSn};this.$axios.post(e,n,{headers:{Authorization:this.token}}).then(function(e){200==e.data.code&&(t.projectDetail=e.data.result,document.title=t.projectDetail.projectName)})},getToken:function(){var t=this,e=this.httpUrl+"xmgl/base/getToken",n={userId:this.userData.userId};this.$axios.post(e,n).then(function(e){t.showLoading=!1,200==e.data.code?(t.token="Bearer "+e.data.result.token,t.getProjectInfoBySn()):t.$toast(e.message)})},memberRegister:function(){this.$router.push({path:"/infoInput"})},educationEnter:function(){window.open(window.location.origin+"#/authentication?eduId="+this.userData.educationId+"&projectSn="+this.userData.projectSn)},entryCodeEnter:function(){window.open(window.location.origin+"#/entryCode?projectSn="+this.userData.projectSn)}}},l={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"home"},[n("div",{staticClass:"content-part"},[n("div",{staticClass:"part-title"},[t._v("人员登记考试系统")]),t._v(" "),n("div",{staticClass:"part-alarm"},[t._v("请先进行人员登记,再进行考试")]),t._v(" "),n("div",{staticClass:"btn member",on:{click:t.memberRegister}},[t._v("人员登记")]),t._v(" "),n("div",{staticClass:"btn education",on:{click:t.educationEnter}},[t._v("教育培训")]),t._v(" "),n("div",{staticClass:"btn entry",on:{click:t.entryCodeEnter}},[t._v("准入二维码")])])])},staticRenderFns:[]};var d=n("VU/8")(u,l,!1,function(t){n("FGve")},"data-v-39ca7183",null);e.default=d.exports},"9bBU":function(t,e,n){n("mClu");var o=n("FeBl").Object;t.exports=function(t,e,n){return o.defineProperty(t,e,n)}},C4MV:function(t,e,n){t.exports={default:n("9bBU"),__esModule:!0}},FGve:function(t,e){},bOdI:function(t,e,n){"use strict";e.__esModule=!0;var o,i=n("C4MV"),a=(o=i)&&o.__esModule?o:{default:o};e.default=function(t,e,n){return e in t?(0,a.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},mClu:function(t,e,n){var o=n("kM2E");o(o.S+o.F*!n("+E39"),"Object",{defineProperty:n("evD5").f})}});
|
|
//# sourceMappingURL=2.aa30495a4cb3ad3341ed.js.map
|