97.00007f697e35fc586f1e.js 7.7 KB

12
  1. webpackJsonp([97],{"1VA+":function(t,e){},"1eYD":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("mvHQ"),a=i.n(s),n=i("fZjL"),o=i.n(n),d=i("TIfe"),r={name:"modifyAssetPassword",data:function(){return{makeCodeUrl:"",makeCodeShow:!1,makeCode:"",userInfo:{},username:"",originalPwd:"",originalPwdHide:"",newPwd:"",newPwdHide:"",countryCode:0,verification_code:"",countdown:this.$t("获取验证码")}},computed:{},mounted:function(){this.userInfo=Object(d.e)();var t=this.userInfo.username;this.username=t.substr(0,2)+"***"+t.substr(5,t.split("").length),this.getSetPassword();var e="en";-1!=navigator.language.toLowerCase().indexOf("zh")&&(e="zh");var i=window.global.baseUrl,s=i[o()(i)[0]];for(var a in i)a==e&&(s=i[a]);this.makeCodeUrl=s+"/api/v1/captcha/index"},methods:{getSetPassword:function(){var t=this;this.$api.auth.setAssetsPassword().then(function(e){t.userInfo.is_set_trade_password=e.data;var i=JSON.parse(localStorage.getItem("trx_member"));i.is_set_trade_password=e.data,localStorage.setItem("trx_member",a()(i))})},originalPwdInput:function(){var t=this,e=this.originalPwd,i=this.originalPwdHide;i.length>e.length?e+=i.charAt(i.length-1):e=e.substr(0,i.length),this.originalPwdHide=i.substr(0,i.length-1).replace(/./g,"*")+i.charAt(i.length-1);var s=this.originalPwdHide.length;setTimeout(function(){t.originalPwdHide.length==s&&(t.originalPwdHide=t.originalPwdHide.replace(/./g,"*"))},1e3),this.originalPwd=e},newPwdInput:function(){var t=this,e=this.newPwd,i=this.newPwdHide;i.length>e.length?e+=i.charAt(i.length-1):e=e.substr(0,i.length),this.newPwdHide=i.substr(0,i.length-1).replace(/./g,"*")+i.charAt(i.length-1);var s=this.newPwdHide.length;setTimeout(function(){t.newPwdHide.length==s&&(t.newPwdHide=t.newPwdHide.replace(/./g,"*"))},1e3),this.newPwd=e},makeCodeShowPop:function(){this.makeCodeShow=!0,this.makeCodeClick()},makeCodeClick:function(){var t="en";-1!=navigator.language.toLowerCase().indexOf("zh")&&(t="zh");var e=window.global.baseUrl;e[o()(e)[0]];for(var i in e)i==t&&e[i];var s=window.global.BASE_URL+"/api/v1/captcha/index",a=(new Date).getTime();this.makeCodeUrl=s+"?"+a},handleVerificationCode:function(){var t=this;if(t.countdown==t.$t("获取验证码")){var e=60;t.countdown=e+"s";var i=setInterval(function(){--e>0?t.countdown=e+"s":(e=60,t.countdown=t.$t("获取验证码"),clearInterval(i))},1e3),s=this.userInfo,a={group:"h5",type:s.type,username:s.username,country_code:"1"==s.type?s.country_code:"",captcha:1234};this.$api.auth.verificationCode(a).then(function(t){})}},confirm:function(){var t=this,e=!1;if(!this.originalPwd||!this.newPwd)return this.$toast(this.$t("输入密码"));if(this.userInfo.is_set_trade_password){if(!this.verification_code)return this.$toast(this.$t("输入验证码"));this.originalPwd&&this.newPwd&&this.verification_code&&(e=!0)}else this.originalPwd&&this.newPwd&&(e=!0);if(e)if(this.newPwd==this.originalPwd){var i=JSON.parse(localStorage.getItem("trx_member")),s={trade_password:this.newPwd};this.userInfo.is_set_trade_password&&(s.verification_code=this.verification_code),this.$api.auth.assetsPassword(s).then(function(e){i.is_set_trade_password=!0,localStorage.setItem("trx_member",a()(i)),t.originalPwd="",t.originalPwdHide="",t.newPwd="",t.newPwdHide="",t.verification_code="",t.userInfo=Object(d.e)(),t.$toast(t.$t("修改成功"))})}else this.$toast(this.$t("2次密码不一致"))}}},l={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"modifyAsset"},[s("app-nav",[t._v(t._s(t.$t("修改资产密码")))]),t._v(" "),s("div",{staticClass:"modifyAsset_item"},[s("div",{staticClass:"modifyAsset_item_title"},[t._v(t._s(t.$t("新密码")))]),t._v(" "),s("div",{staticClass:"modifyAsset_item_input"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.originalPwdHide,expression:"originalPwdHide"}],staticClass:"modifyAsset_item_input_i",attrs:{type:"text",placeholder:t.$t("请输入新密码")},domProps:{value:t.originalPwdHide},on:{input:[function(e){e.target.composing||(t.originalPwdHide=e.target.value)},t.originalPwdInput]}})])]),t._v(" "),s("div",{staticClass:"modifyAsset_item"},[s("div",{staticClass:"modifyAsset_item_title"},[t._v(t._s(t.$t("确认密码")))]),t._v(" "),s("div",{staticClass:"modifyAsset_item_input"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.newPwdHide,expression:"newPwdHide"}],staticClass:"modifyAsset_item_input_i",attrs:{type:"text",placeholder:t.$t("确认新密码")},domProps:{value:t.newPwdHide},on:{input:[function(e){e.target.composing||(t.newPwdHide=e.target.value)},t.newPwdInput]}})])]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:this.userInfo.is_set_trade_password,expression:"this.userInfo.is_set_trade_password"}],staticClass:"modifyAsset_item"},[s("div",{staticClass:"modifyAsset_item_title"},[s("span",[t._v(t._s(t.$t("验证码")))]),t._v(" "),s("span",{staticClass:"modifyAsset_item_title_t"},[t._v(t._s(t.username))])]),t._v(" "),s("div",{staticClass:"modifyAsset_item_in"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.verification_code,expression:"verification_code"}],staticClass:"modifyAsset_item_in_i",attrs:{type:"text",placeholder:t.$t("请输入验证码"),maxlength:"10"},domProps:{value:t.verification_code},on:{input:function(e){e.target.composing||(t.verification_code=e.target.value)}}}),t._v(" "),s("div",{staticClass:"code-btn radius-round",class:t.countdown!=t.$t("获取验证码")?"dis":"",on:{click:t.handleVerificationCode}},[t._v("\n "+t._s(t.countdown)+"\n ")])])]),t._v(" "),s("div",{staticClass:"modifyAsset_item"},[s("div",{staticClass:"modifyAsset_item_tips"},[s("div",{staticClass:"modifyAsset_item_tips_title"},[s("img",{attrs:{src:i("Uvac"),alt:""}}),t._v(" "),s("span",[t._v(t._s(t.$t("资产密码使用提示")))])]),t._v(" "),s("div",{staticClass:"modifyAsset_item_tips_text"},[s("span",{staticClass:"modifyAsset_item_tips_text_d"}),t._v(" "),s("span",[t._v(t._s(t.$t("资产密码用于转移、提取资产和交易。")))])]),t._v(" "),s("div",{staticClass:"modifyAsset_item_tips_text"},[s("span",{staticClass:"modifyAsset_item_tips_text_d"}),t._v(" "),s("span",[t._v(t._s(t.$t("创建与登录密码不同的资产密码。")))])]),t._v(" "),s("div",{staticClass:"modifyAsset_item_tips_text"},[s("span",{staticClass:"modifyAsset_item_tips_text_d"}),t._v(" "),s("span",[t._v(t._s(t.$t("定期更改您的资产密码。")))])])])]),t._v(" "),s("div",{staticClass:"modifyAsset_item"},[s("div",{staticClass:"modifyAsset_item_btn",on:{click:t.confirm}},[t._v("\n "+t._s(t.$t("确定修改"))+"\n ")])]),t._v(" "),s("van-popup",{staticClass:"makeCode",attrs:{"close-on-click-overlay":!1},model:{value:t.makeCodeShow,callback:function(e){t.makeCodeShow=e},expression:"makeCodeShow"}},[s("p",{staticClass:"makeCode_title"},[t._v(t._s(t.$t("验证码")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.makeCode,expression:"makeCode"}],staticClass:"makeCode_in",attrs:{type:"text",maxlength:"8",placeholder:t.$t("请输入验证码")},domProps:{value:t.makeCode},on:{input:function(e){e.target.composing||(t.makeCode=e.target.value)}}}),t._v(" "),s("p",{staticClass:"makeCode_tips"},[t._v("\n "+t._s(t.$t("输入下方正确的图形验证后,获取邮箱验证码进行注册"))+"\n ")]),t._v(" "),s("div",{staticClass:"makeCode_code"},[s("img",{attrs:{src:t.makeCodeUrl,alt:""}}),t._v(" "),s("span",{on:{click:t.makeCodeClick}},[t._v(t._s(t.$t("换一张")))])]),t._v(" "),s("div",{staticClass:"makeCode_btn"},[s("span",{staticClass:"makeCode_btn_t",on:{click:t.handleVerificationCode}},[t._v(t._s(t.$t("提交")))])])])],1)},staticRenderFns:[]};var _=i("VU/8")(r,l,!1,function(t){i("1VA+")},"data-v-70539c74",null);e.default=_.exports}});
  2. //# sourceMappingURL=97.00007f697e35fc586f1e.js.map