chunk-d838fe2e.1587405080142.js
11.6 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d838fe2e"],{"0330":function(t,s,e){"use strict";var i=e("641e"),o=e.n(i);o.a},4014:function(t,s,e){"use strict";e.r(s);var i=function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",[i("modal-simple-comp",{attrs:{visible:t.modalSimpleVisiable,"show-confirm":!1,icon:t.modalIcon,content:t.modalContent,confirm:t.closeModal,overlay:t.closeModal,close:t.closeModal}}),i("modal-comp",{attrs:{visible:t.modalVisiable,"show-confirm":!1,icon:t.modalIcon,content:t.modalContent,confirm:t.modalCallback,overlay:t.modalCallback}}),i("modal2-comp",{attrs:{visible:t.showError,close:t.sessionLostModalClose,content:t.$t("glbalTips.sessionLost")}}),i("div",{staticClass:"ebg"}),i("div",{staticClass:"content"},[i("div",{staticClass:"top-space"}),i("div",{staticClass:"box"},[i("div",{staticClass:"login"},[i("auth",{on:{onLogin:t.userLogin,onLogout:t.userLogout}}),t.showForm?[i("div",{staticClass:"login-tit"},[t._v(t._s(t.$t("passwordReset.type4.title")))]),i("div",{staticClass:"login-tit-space-4"}),i("div",{staticClass:"gird-g form"},[i("div",{staticClass:"pure-u-1 form-item"},[i("div",{staticClass:"label"},[i("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.oldPwd"))+"\n\t\t\t\t\t\t\t")]),i("div",{staticClass:"ipt-wrap"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.values.oldPwd,expression:"values.oldPwd"}],staticClass:"ipt",attrs:{placeholder:t.$t("passwordReset.oldPwdPlaceholde"),type:"password"},domProps:{value:t.values.oldPwd},on:{input:function(s){s.target.composing||t.$set(t.values,"oldPwd",s.target.value)}}})]),t.step.error0.length>0?i("div",{staticClass:"validator"},[i("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error0)+"\n\t\t\t\t\t\t\t")]):t._e()]),i("div",{staticClass:"pure-u-1 form-item"},[i("div",{staticClass:"label"},[i("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.type4.t1"))+"\n\t\t\t\t\t\t\t")]),i("div",{staticClass:"ipt-wrap"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.values.pwd,expression:"values.pwd"}],staticClass:"ipt",attrs:{placeholder:t.$t("passwordReset.type4.t1Placeholder"),type:"password"},domProps:{value:t.values.pwd},on:{input:function(s){s.target.composing||t.$set(t.values,"pwd",s.target.value)}}})]),t.step.error1.length>0?i("div",{staticClass:"validator"},[i("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error1)+"\n\t\t\t\t\t\t\t")]):t._e()]),i("div",{staticClass:"pure-u-1 form-item"},[i("div",{staticClass:"label"},[i("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.type4.t2"))+"\n\t\t\t\t\t\t\t")]),i("div",{staticClass:"ipt-wrap"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.values.pwdRepeat,expression:"values.pwdRepeat"}],staticClass:"ipt",attrs:{placeholder:t.$t("passwordReset.type4.t2Placeholder"),type:"password"},domProps:{value:t.values.pwdRepeat},on:{input:function(s){s.target.composing||t.$set(t.values,"pwdRepeat",s.target.value)}}})]),t.step.error2.length>0?i("div",{staticClass:"validator"},[i("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error2)+"\n\t\t\t\t\t\t\t")]):t._e()])]),i("div",{staticClass:"login-submit pointer flex-center",class:{disabled:t.submitBtnDisabled},on:{click:function(s){return t.resetPwd()}}},[t.loading?i("van-loading"):t._e(),i("span",[t._v(t._s(t.$t("passwordReset.type4.submit")))])],1)]:t._e()],2)])])],1)},o=[],a=(e("6d57"),e("f925"),e("c2b1")),r=(e("8876"),e("4ec3")),n=e.n(r),l=e("ed0b"),c=e("f72f"),u=e("79c3"),d=e("daf4"),h=e("d192"),p=e("7d92"),v=e("0261");v["default"].use(a["a"]);var w={data:function(){return{loading:!1,showForm:!1,showError:!1,key:"value",type:1,values:{cid:"",oldPwd:"",pwd:"",pwdRepeat:""},step:{error0:"",error1:"",error2:""},times:{interval:0,remain:0,tip:""},modalSimpleVisiable:!1,modalVisiable:!1,targetPath:"",modalIcon:"succ",modalContent:""}},methods:{initData:function(){},i18n:function(){var t=this.$i18n.messages[this.$i18n.locale]||{};return t},showModal:function(t,s){s=s&&"undefined"!==typeof s?s:"succ",this.modalIcon=s,this.modalContent=t,"succ"==s?this.modalVisiable=!0:this.modalSimpleVisiable=!0},closeModal:function(){this.modalVisiable=!1,this.modalSimpleVisiable=!1},oneAccountCenterOff:function(){return window.global.oneAccountCenterOff},resetPwd:function(){var t=this;if(!this.submitBtnDisabled)if(this.values.oldPwd){var s=this.checkPassword(this.values.pwd);if(s)this.$set(this.step,"error1",s);else if(this.checkSamePassword())this.$set(this.step,"error1",this.i18n().passwordCheck.error6);else if(this.values.pwdRepeat==this.values.pwd){var e=Object(p["passwordEncrypt"])(this.values.pwd),i=Object(p["passwordEncrypt"])(this.values.oldPwd);if(!this.loading){this.loading=!0;var o=n.a.changePassword;this.oneAccountCenterOff&&(o=n.a.changePasswordV2,e=this.values.pwd,i=this.values.oldPwd),Object(l["c"])({url:o,data:{oldPwd:i,newPwd:e},sid:!0}).then((function(s){t.loading=!1,t.targetPath="";var e=t.i18n().passwordCheck.success;switch(s.returnCode){case"0":t.targetPath="/",t.showModal(e,"succ");break;case"COMMON_ERROR_E0":t.targetPath="/login?callback=/password/reset",e=t.i18n().session.sidExpire,t.step.error2=e;break;default:t.step.error0=t.i18n().passwordCheck.error5;break}})).catch((function(s){t.loading=!1,404==s.code&&(t.showError=!0)}))}}else this.step.error2=this.i18n().passwordCheck.error3}else this.step.error0=this.i18n().passwordReset.oldPwdPlaceholde},sessionLostModalClose:function(){this.targetPath="/login?callback=/password/reset",this.$router.push({path:this.targetPath})},checkPassword:function(t){if(t.length<8)return this.i18n().passwordCheck.error1;var s=/([a-z])+/.test(t),e=/([A-Z])+/.test(t),i=/([0-9])+/.test(t),o=/[^a-zA-Z0-9]+/.test(t);return(s|e)&i&o?"":this.i18n().passwordCheck.error2},checkSamePassword:function(){var t=!!this.values.oldPwd,s=!!this.values.pwd,e=!(!t||!s)&&this.values.oldPwd==this.values.pwd;return e},modalCallback:function(){this.modalVisiable=!1,this.targetPath&&this.$router.push({path:this.targetPath})},userLogout:function(){this.showForm=!1},userLogin:function(t){this.showForm=!0},showSuccessModel:function(){this.showModal("","succ")}},watch:{"values.oldPwd":function(){this.checkSamePassword()?this.$set(this.step,"error1",this.i18n().passwordCheck.error6):(this.$set(this.step,"error1",""),this.$set(this.step,"error0",""))},"values.pwd":function(){if(this.checkSamePassword())this.$set(this.step,"error1",this.i18n().passwordCheck.error6);else{var t=this.checkPassword(this.values.pwd);t?this.$set(this.step,"error1",t):this.$set(this.step,"error1","")}},"values.pwdRepeat":function(){this.values.pwdRepeat!=this.values.pwd?this.$set(this.step,"error2",this.i18n().passwordCheck.error3):this.$set(this.step,"error2","")}},computed:{submitBtnDisabled:function(){var t=!this.values.oldPwd,s=this.checkPassword(this.values.pwd),e=!!s,i=this.values.pwd!=this.values.pwdRepeat,o=this.values.oldPwd==this.values.pwd;return t||e||i||o}},mounted:function(){window.showSuccessModelTest=this.showSuccessModel},created:function(){},components:{modalComp:u["a"],modalSimpleComp:d["a"],Auth:c["a"],Modal2Comp:h["a"]}},f=w,m=(e("0330"),e("e90a")),g=Object(m["a"])(f,i,o,!1,null,"6e25a3f3",null);s["default"]=g.exports},"56c3":function(t,s,e){"use strict";var i=e("efd2"),o=e.n(i);o.a},"641e":function(t,s,e){},"7d92":function(t,s){function e(t){var s=window.global.PK,e=window.global.E,i=new RSAKey;i.setPublic(s,e);var o=i.encrypt(t);return null==o?t:o}t.exports={passwordEncrypt:e}},"7e1c":function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAQCAYAAADNo/U5AAAA+klEQVQokb3RoU4DURCF4W+bDaYkaxG4rkUQJIYXAFNUN4GkD1BQOBwYHFhQJIsC3gESQggSg7iKF6AraEC0i+mGTdMWFEdMMnfOPye5E5VlqVKRpYs4RAfLeMMVjpI8fFS+qIKKLG3iDqu4xgtWsI1nbCR5+ITYj/axhnaSh9taenu8pIcTaNSgTTzWAUjycIMnbFVvdWgJwXTd12fxxHA0jUjycFDvo36ntYNdrKOP1xlpMMRl1O+0vhDhAcUcIBkvHsVYwFmSh705ACiy9BS96iPefwPqvsZvrmn6f2jyXrMUV6VEt8jSAQZzgCa6FXQxbo7/kDTE+TdhVEJawb8vlQAAAABJRU5ErkJggg=="},efd2:function(t,s,e){},f72f:function(t,s,e){"use strict";var i=function(){var t=this,s=t.$createElement,i=t._self._c||s;return t.showPanel?i("div",[t.showUnAuth?i("div",[i("div",{staticClass:"alert"},[i("img",{staticClass:"icon",attrs:{src:e("a164"),alt:""}}),i("div",{staticClass:"txt"},[t._v("\n\t\t\t\t"+t._s(t.tips.tit)+"\n\t\t\t\t"),i("span",{staticClass:"pointer btn",on:{click:t.gotoLoginPage}},[t._v(t._s(t.$t("customService.unauth.login")))]),t._v("\n\t\t\t\t"+t._s(t.tips.or)+"\n\t\t\t\t"),i("span",{staticClass:"pointer btn",on:{click:t.gotoRegisterPage}},[t._v(t._s(t.$t("customService.unauth.register")))]),t._v("\n\t\t\t\t"+t._s(t.tips.tail)+"\n\t\t\t")]),"suggest"==t.model?i("img",{staticClass:"pointer close",attrs:{src:e("ddb8"),alt:""},on:{click:function(s){t.showSuggest=!1}}}):t._e()])]):t._e(),t.showProfileInfo?i("div",[i("div",{staticClass:"alert"},[i("img",{staticClass:"icon",attrs:{src:e("a164"),alt:""}}),i("div",{staticClass:"txt"},[t._v("\n\t\t\t\t"+t._s(t.$t("customService.unauth.baseInfoTip"))+" \n\t\t\t\t"),i("span",{staticClass:"pointer btn",on:{click:t.gotoInformationPage}},[t._v(t._s(t.$t("customService.unauth.infoBtn")))]),t._v("\n\t\t\t\t "+t._s(t.$t("customService.unauth.baseInfoTail"))+"\n\t\t\t")])])]):t._e(),"suggest"!=t.model?i("div",{staticClass:"empty-line"}):t._e()]):t._e()},o=[],a=(e("5ab2"),e("6d57"),e("e10e"),e("cc57"),e("b081")),r=e("8876");function n(t,s){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),e.push.apply(e,i)}return e}function l(t){for(var s=1;s<arguments.length;s++){var e=null!=arguments[s]?arguments[s]:{};s%2?n(Object(e),!0).forEach((function(s){Object(a["a"])(t,s,e[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):n(Object(e)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(e,s))}))}return t}var c={props:{model:{type:String,default:"auth"},checkProfile:{type:Boolean,default:!1},tipModel:{type:String,default:"m3"}},data:function(){return{key:"value",showProfileInfo:!1,showUnAuth:!1,showSuggest:!0,tips:{}}},components:{},computed:l({},Object(r["c"])({userInfo:function(t){return t.userInfo}}),{locale:function(){return this.$i18n.locale||"tc"},i18n:function(){return this.$i18n.messages&&this.$i18n.locale?this.$i18n.messages[this.$i18n.locale]:{}},showPanel:function(){var t="auth"==this.model&&(this.showProfileInfo||this.showUnAuth),s="suggest"==this.model&&this.showSuggest;return t||s}}),methods:{initData:function(){this.tips=this.i18n.customService.unauth[this.tipModel],this.userInfo&&this.userInfo.name?this.loginAction():this.logoutAction()},loginAction:function(){this.showUnAuth=!1,this.checkProfile?1==this.userInfo.hadFullInfo?this.$emit("onLogin",this.userInfo):this.showProfileInfo=!0:this.$emit("onLogin",this.userInfo)},logoutAction:function(){this.showUnAuth=!0,this.showProfileInfo=!1,this.$emit("onLogout",{})},gotoLoginPage:function(){var t=this.$route.path,s="?";for(var e in this.$route.query)t+=s+e+"="+this.$route.query[e],s="&";this.$router.push({path:"/login?callback="+t})},gotoRegisterPage:function(){this.$router.push({path:"/register"})},gotoInformationPage:function(){var t=this.$route.fullPath;this.$router.push({path:"/infomation/improve",query:{c:t,a:1}})},noAuth:function(){this.$store.commit("SET_USER_INFO",null),this.initData(),this.$emit("onLogout",{})}},mounted:function(){this.initData()},created:function(){var t=this;this.$root.eventBus.$on("langChange",(function(){try{t.tips=t.i18n.customService.unauth[t.tipModel]}catch(s){}}))},watch:{userInfo:function(t){t&&t.name?this.loginAction():this.logoutAction()}}},u=c,d=(e("56c3"),e("e90a")),h=Object(d["a"])(u,i,o,!1,null,"1633fcb9",null);s["a"]=h.exports}}]);