chunk-4894a57a.1590300041939.js
13.1 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4894a57a"],{"0330":function(t,s,e){"use strict";var o=e("fad0"),i=e.n(o);i.a},"3c62":function(t,s,e){"use strict";var o=e("5cb5"),i=e.n(o);i.a},4014:function(t,s,e){"use strict";e.r(s);var o=function(){var t=this,s=t.$createElement,o=t._self._c||s;return o("div",[o("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}}),o("modal-comp",{attrs:{visible:t.modalVisiable,"show-confirm":!1,icon:t.modalIcon,content:t.modalContent,confirm:t.modalCallback,overlay:t.modalCallback}}),o("modal2-comp",{attrs:{visible:t.showError,close:t.sessionLostModalClose,content:t.$t("glbalTips.sessionLost")}}),o("div",{staticClass:"ebg"}),o("div",{staticClass:"content"},[o("div",{staticClass:"top-space"}),o("div",{staticClass:"box"},[o("div",{staticClass:"login"},[o("auth",{on:{onLogin:t.userLogin,onLogout:t.userLogout}}),t.showForm?[o("div",{staticClass:"login-tit"},[t._v(t._s(t.$t("passwordReset.type4.title")))]),o("div",{staticClass:"login-tit-space-4"}),o("div",{staticClass:"gird-g form"},[o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.oldPwd"))+"\n\t\t\t\t\t\t\t")]),o("div",{staticClass:"ipt-wrap"},[o("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?o("div",{staticClass:"validator"},[o("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error0)+"\n\t\t\t\t\t\t\t")]):t._e()]),o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.type4.t1"))+"\n\t\t\t\t\t\t\t")]),o("div",{staticClass:"ipt-wrap"},[o("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?o("div",{staticClass:"validator"},[o("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error1)+"\n\t\t\t\t\t\t\t")]):t._e()]),o("div",{staticClass:"pure-u-1 form-item"},[o("div",{staticClass:"label"},[o("img",{attrs:{src:e("7e1c")}}),t._v(" "+t._s(t.$t("passwordReset.type4.t2"))+"\n\t\t\t\t\t\t\t")]),o("div",{staticClass:"ipt-wrap"},[o("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?o("div",{staticClass:"validator"},[o("img",{attrs:{src:e("b98c"),alt:""}}),t._v(" "+t._s(t.step.error2)+"\n\t\t\t\t\t\t\t")]):t._e()])]),o("div",{staticClass:"login-submit pointer flex-center",class:{disabled:t.submitBtnDisabled},on:{click:function(s){return t.resetPwd()}}},[t.loading?o("van-loading"):t._e(),o("span",[t._v(t._s(t.$t("passwordReset.type4.submit")))])],1)]:t._e()],2)])])],1)},i=[],a=(e("6d57"),e("1a6c"),e("f166")),n=(e("8876"),e("4ec3")),r=e.n(n),l=e("ed0b"),c=e("f72f"),u=e("79c3"),d=e("daf4"),h=e("d192"),p=e("7d92"),f=e("0261");f["default"].use(a["a"]);var v={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),o=Object(p["passwordEncrypt"])(this.values.oldPwd);if(!this.loading){this.loading=!0;var i=r.a.changePassword;this.oneAccountCenterOff&&(i=r.a.changePasswordV2,e=this.values.pwd,o=this.values.oldPwd),Object(l["c"])({url:i,data:{oldPwd:o,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),o=/([0-9])+/.test(t),i=/[^a-zA-Z0-9]+/.test(t);return(s|e)&o&i?"":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,o=this.values.pwd!=this.values.pwdRepeat,i=this.values.oldPwd==this.values.pwd;return t||e||o||i}},mounted:function(){window.showSuccessModelTest=this.showSuccessModel},created:function(){},components:{modalComp:u["a"],modalSimpleComp:d["a"],Auth:c["a"],Modal2Comp:h["a"]}},w=v,m=(e("0330"),e("623f")),g=Object(m["a"])(w,o,i,!1,null,"6e25a3f3",null);s["default"]=g.exports},"56c3":function(t,s,e){"use strict";var o=e("bae7"),i=e.n(o);i.a},"5cb5":function(t,s,e){},"7d92":function(t,s){function e(t){var s=window.global.PK,e=window.global.E,o=new RSAKey;o.setPublic(s,e);var i=o.encrypt(t);return null==i?t:i}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=="},bae7:function(t,s,e){},daf4:function(t,s,e){"use strict";var o=function(){var t=this,s=t.$createElement,o=t._self._c||s;return o("div",{staticClass:"comp",class:{hide:!t.visible}},[t.overlayShow?o("div",{staticClass:"overlay",on:{click:function(s){return t.onOverLayHandler()}}}):t._e(),o("div",{staticClass:"modal"},[o("div",{staticClass:"modal-title"},[t._v("\n\t\t\t"+t._s(t.title)+"\n\t\t\t"),o("img",{staticClass:"close-btn pointer",attrs:{src:e("ec03")},on:{click:function(s){return t.onCloseHandler()}}})]),o("div",{staticClass:"modal-content"},[t._v(t._s(t.content))])])])},i=[],a={props:{visible:{type:Boolean,default:!0},icon:{type:String,default:"succ"},title:{type:String,default:""},content:{type:String,default:""},confirmText:{type:String,default:"確認"},cancelText:{type:String,default:"取消"},showConfirm:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!1},overlayShow:{type:Boolean,default:!0},confirm:{type:Function,default:null},cancel:{type:Function,default:null},close:{type:Function,default:null},overlay:{type:Function,default:null}},data:function(){return{key:"value"}},components:{},methods:{onConfirmHandler:function(){this.confirm&&this.confirm()},onCancelHandler:function(){this.cancel&&this.cancel()},onCloseHandler:function(){this.close&&this.close()},onOverLayHandler:function(){this.overlay&&this.overlay()},initData:function(){}},mounted:function(){},created:function(){}},n=a,r=(e("3c62"),e("623f")),l=Object(r["a"])(n,o,i,!1,null,"5b29ed92",null);s["a"]=l.exports},f72f:function(t,s,e){"use strict";var o=function(){var t=this,s=t.$createElement,o=t._self._c||s;return t.showPanel?o("div",[t.showUnAuth?o("div",[o("div",{staticClass:"alert"},[o("img",{staticClass:"icon",attrs:{src:e("a164"),alt:""}}),o("div",{staticClass:"txt"},[t._v("\n\t\t\t\t"+t._s(t.tips.tit)+"\n\t\t\t\t"),o("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"),o("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?o("img",{staticClass:"pointer close",attrs:{src:e("ddb8"),alt:""},on:{click:function(s){t.showSuggest=!1}}}):t._e()])]):t._e(),t.showProfileInfo?o("div",[o("div",{staticClass:"alert"},[o("img",{staticClass:"icon",attrs:{src:e("a164"),alt:""}}),o("div",{staticClass:"txt"},[t._v("\n\t\t\t\t"+t._s(t.$t("customService.unauth.baseInfoTip"))+" \n\t\t\t\t"),o("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?o("div",{staticClass:"empty-line"}):t._e()]):t._e()},i=[],a=(e("5ab2"),e("6d57"),e("e10e"),e("cc57"),e("ac9f")),n=e("8876");function r(t,s){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);s&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),e.push.apply(e,o)}return e}function l(t){for(var s=1;s<arguments.length;s++){var e=null!=arguments[s]?arguments[s]:{};s%2?r(Object(e),!0).forEach((function(s){Object(a["a"])(t,s,e[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):r(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(n["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("623f")),h=Object(d["a"])(u,o,i,!1,null,"1633fcb9",null);s["a"]=h.exports},fad0:function(t,s,e){}}]);