"use strict";(self["webpackChunkexchange"]=self["webpackChunkexchange"]||[]).push([[5911],{52761:function(t,e,s){s.r(e),s.d(e,{default:function(){return v}});var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"resetVerify"},[s("assets-head",{attrs:{title:t.title}}),s("div",{staticClass:"content"},[s("div",[s("div",{staticClass:"mb-25 textColor"},[t._v(t._s(t.$t("证件照/上传护照")))]),s("div",{staticClass:"flex mt-33 mb-80 justify-between"},[s("div",{staticClass:"flex-1 flex flex-col text-center justify-center items-center"},[s("div",{staticClass:"upload-wrap"},[s("van-uploader",{attrs:{multiple:"","max-count":1,"after-read":t.afterRead},on:{"click-upload":function(e){return t.onClickUpload("frontFile")}},model:{value:t.frontFile,callback:function(e){t.frontFile=e},expression:"frontFile"}})],1),s("div",{staticClass:"mt-32 font-26 h-20 text-grey"},[t._v(t._s(t.$t("证件正面")))])]),s("div",{staticClass:"flex-1 flex flex-col text-center justify-center items-center"},[s("div",{staticClass:"upload-wrap"},[s("van-uploader",{attrs:{multiple:"","max-count":1,"after-read":t.afterRead},on:{"click-upload":function(e){return t.onClickUpload("reverseFile")}},model:{value:t.reverseFile,callback:function(e){t.reverseFile=e},expression:"reverseFile"}})],1),s("div",{staticClass:"mt-32 font-26 h-20 text-grey"},[t._v(t._s(t.$t("证件反面")))])]),s("div",{staticClass:"flex-1 flex flex-col text-center justify-center items-center"},[s("div",{staticClass:"upload-wrap"},[s("van-uploader",{attrs:{multiple:"","max-count":1,"after-read":t.afterRead},on:{"click-upload":function(e){return t.onClickUpload("fileList")}},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})],1),s("div",{staticClass:"mt-32 font-26 h-20 text-grey"},[t._v(t._s(t.$t("手持证件照")))])])])]),s("ExChecked",{staticClass:"mb-42",attrs:{list:t.list},on:{checked:t.onChecked}}),0==t.type?s("div",[s("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"}}),s("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"}})],1):t._e(),s("ExInput",{attrs:{label:t.$t("留言"),placeholderText:t.$t("请输入留言")},model:{value:t.remark,callback:function(e){t.remark=e},expression:"remark"}}),s("div",{staticClass:"btn",on:{click:t.submit}},[t._v(t._s(t.$t("确定")))])],1)],1)},i=[],r=(s(99809),s(51785)),l=(s(44114),s(3717)),n=s(47755),c=s(93886),o=s(49351),d=s(50404),p=s(94348),h={props:{},components:{[r.A.name]:r.A,assetsHead:l.A,ExInput:n.A,ExChecked:c.A},data(){return{title:"",remark:"",password:"",repassword:"",type:0,radio:0,list:[{name:this.$t("重置资金密码"),type:0},{name:this.$t("重置邮箱"),type:2},{name:this.$t("重置谷歌验证"),type:3}],frontFile:[],reverseFile:[],fileList:[],idcard_path_front:"",idcard_path_back:"",idcard_path_hold:"",curFile:"frontFile",status:""}},mounted(){let t=this.$route.query.type;this.type=t,this.init(this.type),this.getSafewordApply()},methods:{init(t){this.title=1==t?this.$t("人工重置手机号"):2==t?this.$t("人工重置邮箱"):3==t?this.$t("人工重置谷歌验证"):this.$t("人工重置资金密码")},onChecked(t){this.type=t,this.init(this.type)},afterRead(t){p.log(t),t.status="uploading",t.message=this.$t("上传中..."),(0,o.KE)(t).then((e=>{t.status="success",t.message=this.$t("上传成功"),t.resURL=e,this[this.curFile]=[t]})).catch((e=>{t.status="failed",t.message=this.$t("图片上传失败")}))},onClickUpload(t){p.log(t),this.curFile=t},getSafewordApply(){d.A.getSafewordApply({}).then((t=>{0!=t.data.length&&(this.status=t.data[0].status,this.idcard_path_front=t.data[0].idcard_path_front,this.idcard_path_back=t.data[0].idcard_path_back,this.idcard_path_hold=t.data[0].idcard_path_hold)})).catch((t=>{"ECONNABORTED"===t.code?this.$toast(this.$t("网络超时!")):void 0!==t.msg&&this.$toast(this.$t(t.msg))}))},setSafewordApply(){let t;0==this.type?t=0:1==this.type?t=2:2==this.type?t=3:3==this.type&&(t=1),d.A.setSafewordApply({idcard_path_front:this.frontFile.length&&this.frontFile[0].resURL||"",idcard_path_back:this.reverseFile.length&&this.reverseFile[0].resURL||"",idcard_path_hold:this.fileList.length&&this.fileList[0].resURL||"",operate:t,safeword:this.password,safeword_confirm:this.repassword,remark:this.remark}).then((t=>{this.$router.push({name:"resetSuccess",query:{type:this.type}})})).catch((t=>{"ECONNABORTED"===t.code?this.$toast(this.$t("网络超时!")):void 0!==t.msg&&this.$toast(this.$t(t.msg))}))},submit(){this.setSafewordApply()}}},u=h,f=s(81656),m=(0,f.A)(u,a,i,!1,null,"343fec57",null),v=m.exports},21465:function(t,e,s){function a(t,e,s){return Math.min(Math.max(t,e),s)}function i(t,e,s){var a=t.indexOf(e),i="";return-1===a?t:"-"===e&&0!==a?t.slice(0,a):("."===e&&t.match(/^(\.|-\.)/)&&(i=a?"-0":"0"),i+t.slice(0,a+1)+t.slice(a).replace(s,""))}function r(t,e,s){void 0===e&&(e=!0),void 0===s&&(s=!0),t=e?i(t,".",/\./g):t.split(".")[0],t=s?i(t,"-",/-/g):t.replace(/-/,"");var a=e?/[^-0-9.]/g:/[^-0-9]/g;return t.replace(a,"")}s.d(e,{ZV:function(){return r},y1:function(){return a}})}}]);
|