"use strict";(self["webpackChunkexchange"]=self["webpackChunkexchange"]||[]).push([[4130],{82546:function(t,e,i){i.r(e),i.d(e,{default:function(){return g}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"changePassword"},[i("assets-head",{attrs:{title:t.$t("修改资金密码")}}),i("div",{staticClass:"line"}),i("div",{staticClass:"content"},[i("ExInput",{attrs:{label:t.$t("新密码"),placeholderText:t.$t("请输入密码"),tips:t.$t("请输入6位数字"),typeText:"password"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}}),i("ExInput",{attrs:{label:t.$t("确认新密码"),placeholderText:t.$t("请输入密码"),tips:t.$t("请输入6位数字"),typeText:"password"},model:{value:t.rePassword,callback:function(e){t.rePassword=e},expression:"rePassword"}}),i("ExChecked",{staticClass:"mb-42",attrs:{list:t.list},on:{checked:t.onChecked}}),i("p",{staticClass:"label mt-14 textColor"},[t._v(t._s(t.$t("验证码")))]),i("div",{staticClass:"iptbox inputBackground"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.verifyCode,expression:"verifyCode"}],staticClass:"inputBackground textColor",attrs:{type:"text",placeholder:t.$t("请输入验证码")},domProps:{value:t.verifyCode},on:{input:function(e){e.target.composing||(t.verifyCode=e.target.value)}}}),3!=t.type?i("span",{on:{click:t.senCode}},[t._v(t._s(t.$t("发送验证码"))),t.time?[t._v(" ("+t._s(t.time)+")s")]:t._e()],2):t._e()]),i("div",{staticClass:"btn",on:{click:t.submit}},[t._v(t._s(t.$t("确定")))])],1)],1)},a=[],o=(i(44114),i(3717)),r=i(47755),h=i(93886),n=i(50404),c=i(10861),d={props:{},components:{assetsHead:o.A,ExInput:r.A,ExChecked:h.A},data(){return{password:"",rePassword:"",verifcode_type:"",verifyCode:"",type:2,list:[{name:this.$t("邮箱验证"),type:2},{name:this.$t("谷歌验证"),type:3}],email_authority:!1,google_auth_bind:!1,phone_authority:!1,email:"",phone:"",google_auth_secret:"",account:"",timer:"",time:0}},mounted(){this.getVerifTarget(),clearInterval(this.timer)},methods:{onChecked(t){this.type=t,3!=this.type||this.google_auth_bind||this.$toast(this.$t("请绑定谷歌验证器")),1==this.type?this.account=this.phone:2==this.type?this.account=this.email:3==this.type&&(this.account=this.google_auth_secret)},submit(){if(this.password.length<6)return this.$toast(this.$t("资金密码(6位数字)")),!1;n.A.setSafeword({safeword:this.password,verifcode_type:this.type,verifcode:this.verifyCode}).then((t=>{this.$toast(this.$t("修改成功")),setTimeout((()=>{this.$router.push("/home")}),1e3)})).catch((t=>{"ECONNABORTED"===t.code?this.$toast(this.$t("网络超时!")):void 0!==t.msg&&this.$toast(this.$t(t.msg))}))},async getVerifTarget(){n.A.getVerifTarget({}).then((t=>{this.email_authority=t.data.email_authority,this.google_auth_bind=t.data.google_auth_bind,this.phone_authority=t.data.phone_authority,this.email=t.data.email,this.phone=t.data.phone,this.google_auth_secret=t.data.google_auth_secret})).catch((t=>{"ECONNABORTED"===t.code?this.$toast(this.$t("网络超时!")):void 0!==t.msg&&this.$toast(this.$t(t.msg))}))},senCode(){return 1!=this.type||this.phone_authority?2!=this.type||this.email_authority?(this.onChecked(this.type),!(this.time>0)&&void c.A.sendVerifyCode({target:this.account}).then((t=>{this.$toast(this.$t("发送成功")),this.time=30,this.timer=setInterval((()=>{this.time>0?this.time=this.time-1:(this.time=0,clearInterval(this.timer))}),1e3)})).catch((t=>{"ECONNABORTED"===t.code?this.$toast(this.$t("网络超时!")):void 0!==t.msg&&this.$toast(this.$t(t.msg))}))):(this.$toast(this.$t("请绑定邮箱")),!1):(this.$toast(this.$t("请绑定手机")),!1)}},beforeDestroy(){clearInterval(this.timer)}},l=d,u=i(81656),p=(0,u.A)(l,s,a,!1,null,"5553c22c",null),g=p.exports},77965:function(t,e,i){i.d(e,{Y:function(){return s}});var s={inject:{vanField:{default:null}},watch:{value:function(){var t=this.vanField;t&&(t.resetValidation(),t.validateWithTrigger("onChange"))}},created:function(){var t=this.vanField;t&&!t.children&&(t.children=this)}}},10861:function(t,e,i){var s=i(60783);const a=t=>(0,s.zi)({url:"projectInfoApp/getCurrentProjectInfo",method:"get",isLoading:!0},t),o=t=>(0,s.zi)({url:"/api/localuser!registerNoVerifcode.action",method:"get",isLoading:!0},t),r=t=>(0,s.zi)({url:"/api/user!login.action",method:"get",isLoading:!0},t),h=t=>(0,s.zi)({url:"/api/idcode!execute.action",method:"get",isLoading:!1},t),n=t=>(0,s.zi)({url:"/api/cms!list.action",method:"get",isLoading:!1},t),c=t=>(0,s.zi)({url:"/api/localuser!registerTest.action",method:"get",isLoading:!0},t),d={getCurrentProjectInfo:a,registerUser:o,sendVerifyCode:h,loginUser:r,helpCenter:n,registerTest:c};e.A=d}}]);