chunk-7c6ef186.db65771c.js 8.6 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7c6ef186"],{"1b69":function(e,t,r){"use strict";r("96cf");var n=r("1da1"),o=r("5daa"),a=r("5f87"),i={};window.ajaxTimeout=2e4,t.a=Object(n.a)(regeneratorRuntime.mark((function e(){var t,r,s,c,u,d,l,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=0<f.length&&void 0!==f[0]?f[0]:"",r=1<f.length&&void 0!==f[1]?f[1]:{},c=3<f.length&&void 0!==f[3]?f[3]:{},u=4<f.length&&void 0!==f[4]?f[4]:i,d=5<f.length?f[5]:void 0,s=(s=2<f.length&&void 0!==f[2]?f[2]:"GET").toLowerCase(),l={method:s,baseURL:"",url:o.a.baseURL+t,data:r,params:c,processData:!0,timeout:window.ajaxTimeout,headers:u,onUploadProgress:d},d&&"function"==typeof d&&(l.onUploadProgress=d),axios.interceptors.request.use((function(e){return e.data.token||(e.data.token=Object(a.d)()),e}),(function(e){return Promise.reject(new Error("服务器异常,请联系管理员!"))})),axios.interceptors.response.use(function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 200===t.status&&100<=(r=t.data.code)&&r<=104&&Object(a.h)(),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){return Promise.reject(e.response.data)})),e.abrupt("return",new Promise((function(e,t){axios(l).then((function(t){e(t.data)})).catch((function(e){e.response&&e.response.data?t(e.response.data):t(e)}))})));case 12:case"end":return e.stop()}}),e)})))},"44b4":function(e,t,r){"use strict";r.r(t),r("96cf");var n,o,a,i,s,c,u=r("1da1"),d=r("1b69"),l=function(e,t){return Object(d.a)("home/password",e,"post",t)},f=r("9f53"),h=r("61f7");u={mixins:[f.a],data:function(){return{loadding:!1,form:{mobile:"CJ1745",code:"",ncode:"",rcode:""},eye:{show1:!1,show2:!1,show3:!1}}},created:(c=Object(u.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.loadding=!1,this.form={mobile:"CJ1745",code:"",ncode:"",rcode:""};case 2:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)}),methods:{onClickLeft:function(){window.history.back(-1)},asyncmobileValidator:(s=Object(u.a)(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n,o,a,i=!0;""===t?(r.show_title("请输入卡号!"),i=!1):12!==t.length?(r.show_title("卡号不正确!"),i=!1):(n=t.slice(0,2),o=t.slice(2,6),a=t.slice(6,12),"CJ"===n&&"1745"===o&&Object(h.b)(a)||(r.show_title("卡号不正确!"),i=!1)),e(i?"ok":"error")})));case 1:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)}),changeIcon:function(e){this.eye["show".concat(e)]=!this.eye["show".concat(e)]},asyncpwodValidator1:(i=Object(u.a)(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=!0,o=r.pwdValidator(t,1),a=o.isok;o=o.msg;(n=a)||r.show_title(o),e(n?"ok":"error")})));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)}),asyncpwodValidator2:(a=Object(u.a)(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=!0,o=r.pwdValidator(t,2),a=o.isok;o=o.msg;(n=a)||r.show_title(o),e(n?"ok":"error")})));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)}),asyncpwodValidator3:(o=Object(u.a)(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=!0,o=r.pwdValidator(t,3),a=o.isok;o=o.msg;(n=a)||r.show_title(o),e(n?"ok":"error")})));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)}),pwdValidator:function(e,t){var r=1===t?"原密码":2===t?"新密码":"确认密码",n="",o=!0;return""===e?(n="请输入".concat(r,"!"),o=!1):6!==e.length?(n="".concat(r,"为2位字母+4位数字!"),o=!1):(t=e.slice(0,2),e=e.slice(2,4),Object(h.b)(e)||(n="".concat(r,"为2位字母+4位数字!"),o=!1),Object(h.c)(t)||(n="".concat(r,"为2位字母+4位数字!"),o=!1)),n={isok:o,msg:n},n},onSubmit:(n=Object(u.a)(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.loadding){e.next=41;break}return this.loadding=!0,e.next=4,this.asyncmobileValidator(this.form.mobile);case 4:if("error"===e.sent)return this.loadding=!1,e.abrupt("return");e.next=9;break;case 9:return e.next=11,this.asyncpwodValidator1(this.form.code);case 11:if("error"===e.sent)return this.loadding=!1,e.abrupt("return");e.next=16;break;case 16:return e.next=18,this.asyncpwodValidator2(this.form.ncode);case 18:if("error"===e.sent)return this.loadding=!1,e.abrupt("return");e.next=23;break;case 23:return e.next=25,this.asyncpwodValidator3(this.form.rcode);case 25:if("error"===e.sent)return this.loadding=!1,e.abrupt("return");e.next=30;break;case 30:if(this.form.ncode!==this.form.rcode)return this.loadding=!1,this.show_title("新密码与确认密码不一致!"),e.abrupt("return");e.next=34;break;case 34:return t={username:this.form.mobile,pas:this.form.code,pasword:this.form.ncode},e.next=37,l(t);case 37:r=e.sent,t=r.code,r=r.msg,0===t?(this.loadding=!1,this.show_title("密码修改成功!"),setTimeout((function(){window.history.back(-1)}),3e3)):(this.show_title(r),this.loadding=!1);case 41:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})}},r("d7e3"),r=r("2877"),u=Object(r.a)(u,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"reset",staticStyle:{"padding-top":"66px"}},[t("van-nav-bar",{staticClass:"van-nav-bar-my-fixed",attrs:{title:"修改密码",fixed:"","left-arrow":""},on:{"click-left":e.onClickLeft}}),t("div",{staticClass:"reset-box"},[t("van-cell-group",[t("van-field",{attrs:{"label-width":"62px",label:"卡号",placeholder:"卡号",rules:[{validator:e.asyncmobileValidator}]},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),t("van-cell-group",[t("van-field",{attrs:{"label-width":"62px",label:"原密码",placeholder:"原密码",type:e.eye.show1?"text":"password","right-icon":e.eye.show1?"closed-eye":"eye-o",rules:[{validator:e.asyncpwodValidator1}]},on:{"click-right-icon":function(t){return e.changeIcon(1)}},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1),t("van-cell-group",[t("van-field",{attrs:{"label-width":"62px",label:"新密码",type:e.eye.show2?"text":"password",placeholder:"新密码","right-icon":e.eye.show2?"closed-eye":"eye-o",rules:[{validator:e.asyncpwodValidator2}]},on:{"click-right-icon":function(t){return e.changeIcon(2)}},model:{value:e.form.ncode,callback:function(t){e.$set(e.form,"ncode",t)},expression:"form.ncode"}})],1),t("van-cell-group",[t("van-field",{attrs:{"label-width":"62px",label:"确认密码",type:e.eye.show3?"text":"password",placeholder:"确认密码","right-icon":e.eye.show3?"closed-eye":"eye-o",rules:[{validator:e.asyncpwodValidator3}]},on:{"click-right-icon":function(t){return e.changeIcon(3)}},model:{value:e.form.rcode,callback:function(t){e.$set(e.form,"rcode",t)},expression:"form.rcode"}})],1)],1),t("div",{staticClass:"btn-box"},[t("van-button",{attrs:{block:"",type:"info",disabled:e.loadding,loadding:e.loadding,"loadding-text":"加载中...","native-type":"submit"},on:{click:function(t){return e.onSubmit()}}},[e._v("\n 保 存\n ")])],1)],1)}),[],!1,null,"b6ac6c16",null);t.default=u.exports},"61f7":function(e,t,r){"use strict";function n(e){return/^[A-Za-z]+$/.test(e)}function o(e){return/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(e)}function a(e){return/^[0-9]*$/.test(e)}r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a})),t=r("6b54")},"8c88":function(e,t,r){},"9f53":function(e,t,r){"use strict";r("433b");var n,o=r("d399");r("96cf"),r=r("1da1");t.a={methods:{logout:(n=Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/login"!==this.$route.path)return e.next=3,this.$store.dispatch("user/logout");e.next=4;break;case 3:this.$router.push("/login");case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)}),show_title:function(e){Object(o.a)({message:e})}}}},d7e3:function(e,t,r){"use strict";r("8c88")}}]);