1import{_ as g,X as C,r as f,I as u,t as E,R as w,b as d,V as k,g as v,Y as M}from"./services-DMwYBTTp.js";import{m as R}from"./vendor-DZeYsp6R.js";import{m as U}from"./vendor-pinia-CkwwAs9v.js";import{t as S,M as s,K as b,S as m,Z as l,b6 as p,N as P,$ as h,ae as c,q as y}from"./vendor-vue-Cs0jG3vf.js";import"./vendor-element-plus-CnrZsLnk.js";import"./vendor-lodash-DXGp0yxs.js";const V={beforeRouteEnter(t,e,o){if(!k())return;const n=d();n.SecurityCenter().then(()=>{const r=n.hasSetSafePwd,a=n.checkSafePwd;if(!r||a)return o();u(t.query.Q)&&t.query.Q==="ResetSafePwd"?e.path==="/memberCenter/securityCenter"?window.location.href=e.path:o("/memberCenter/securityCenter"):e.path==="/verifySafePwd"?window.location.href=e.path:o("/verifySafePwd")}).catch(()=>{v().SetTurning(!1),o(!1)})},beforeRouteLeave(t,e,o){d().verifyAction="",d().verifyData={},d().checkSafePwd=!1,o()},data(){return{safePwd:"",confirmSafePwd:"",safePwdMsg:"",confirmMsg:"",Verify:"å¯ä¿é®é¢",VerifyShow:!1,safePwdError:!1,confirmError:!1,passSafePwd:!1,passConfirm:!1,keyupHandler:null,pageUrl:"",isShowPassword:!1,isShowConfirmSafePwd:!1}},computed:{...U(d)},beforeCreate(){localStorage.getItem("user.loginName")===null&&sessionStorage.getItem("isFind")===null&&f.push("/login")},beforeUnmount(){document.removeEventListener("keyup",this.keyupHandler)},created(){const t={Mail:"å¯ä¿é®ç®±",Mobile:"å¯ä¿ææº",Question:"å¯ä¿é®é¢",SafePwd:"å®å
¨å¯ç "};this.pageUrl=this.$route.query.Q;const e=this.$route.query.F;e!==void 0?(this.VerifyShow=!0,this.Verify=t[e]):this.VerifyShow=!1,this.keyupHandler=o=>{o.keyCode===13&&this.setSafePwd()},this.addKeyUp()},methods:{delKeyUp(){document.removeEventListener("keyup",this.keyupHandler)},addKeyUp(){document.addEventListener("keyup",this.keyupHandler)},checkSafePwd(){this.safePwdError=!1,this.passSafePwd=!1,this.safePwd?this.safePwd.match(w.SafePassword.Reg)?this.passSafePwd=!0:(this.safePwdMsg="请è¾å
¥4-6使°åæåæ¯ï¼åºå大å°åï¼",this.safePwdError=!0,this.passSafePwd=!1,this.passConfirm=!1,this.confirmSafePwd.length>=4&&this.safePwd!==this.confirmSafePwd&&(this.confirmMsg="两次确认å¯ç ä¸ç¸å",this.confirmError=!0,this.passSafePwd=!1,this.passConfirm=!1)):(this.safePwdMsg="å®å
¨å¯ç ä¸è½ä¸ºç©º",this.safePwdError=!0,this.passConfirm=!1,this.passSafePwd=!1),this.safePwd.length>=4&&this.safePwd.length<=16&&this.confirmSafePwd.length>=4&&this.safePwd.match(w.SafePassword.Reg)&&(this.safePwd!==this.confirmSafePwd&&(this.confirmMsg="两次确认å¯ç ä¸ç¸å",this.confirmError=!0,this.passSafePwd=!0,this.passConfirm=!1),this.safePwd===this.confirmSafePwd&&(this.passSafePwd=!0,this.passConfirm=!0,this.safePwdError=!1,this.confirmMsg=!1,this.confirmError=!1)),this.confirmSafePwd||(this.confirmMsg="确认å¯ç ä¸è½ä¸ºç©º",this.confirmError=!0)},checkConfirm(){this.confirmSafePwd?this.confirmSafePwd.match(w.SafePassword.Reg)?(this.safePwd!==this.confirmSafePwd&&(this.confirmMsg="两次确认å¯ç ä¸ç¸å",this.confirmError=!0,this.passConfirm=!1),this.safePwd===this.confirmSafePwd&&(this.confirmMsg=!1,this.confirmError=!1,this.passConfirm=!0)):(this.confirmMsg="确认å¯ç åºä¸º4-6使°åæåæ¯ï¼åºå大å°åï¼",this.confirmError=!0,this.passConfirm=!1):(this.confirmMsg="确认å¯ç ä¸è½ä¸ºç©º",this.confirmError=!0,this.passConfirm=!1)},setSafePwd(){if(this.checkSafePwd(),this.checkConfirm(),this.safePwdError){window.layer.msgWarn(this.safePwdMsg);return}else if(this.confirmError){window.layer.msgWarn(this.confirmMsg);return}if(this.delKeyUp(),u(this.userStore.loginName)&&this.$userHasSafePwd==="1")if(!this.userStore.checkSafePwd||!u(this.userStore.verifyAction)||!E(this.userStore.verifyData)){window.layer.url("ä¸åæ³æä½","/");return}else{let t=this.userStore.verifyAction,e=this.userStore.verifyData;const n={USER_CHECK_PWD:()=>this.userStore.UserCheckPwd(e),USER_CHECK_SAFEPWD:()=>this.userStore.UserCheckSafePwd(e),USER_CHECK_QUESTION:()=>this.userStore.UserCheckQuestion(e)}[t];n&&n().then(r=>{if(r.code==="error"){f.push("/login");return}else r.code==="success"&&this.toSetSafePwd()}).catch(r=>{window.layer.url("ä¸åæ³æä½","/")})}else this.toSetSafePwd()},layerOpen(t){const e="/memberCenter/",{content:o,confirmRouter:n,rejectRouter:r="securityCenter",cancelRouter:a="securityCenter"}=t;window.layer.open({content:o,shadeClose:!1,className:"layerConfirm",title:"温馨æç¤º",btn:["æ¯","å¦"],yes:function(i){window.layer.close(i),f.push(`${e}${n}`)},no:function(i){window.layer.close(i),f.push(`${e}${r}`)},cancel:function(i){f.push(`${e}${a}`)}})},toSetSafePwd(){this.userStore.UserSetSafePwd({safePwd:R(this.safePwd)}).then(t=>{if(!["bindCard","withdraw"].includes(this.pageUrl)){window.layer.url(t.msg,"/memberCenter/securityCenter");return}this.askToWithdraw()}).catch(t=>{window.layer.msgWarn(t.msg),this.addKeyUp()})},askToWithdraw(){const t=()=>{const{isAnyUsable:e,alertPayMessage:o}=M();if(e)return f.push({name:"withdraw"});o(n=>
1{console.warn("isBankAllDisabled ",n),n?this.layerOpen({content:"é¶è¡å¡è¢«ç¦ç¨ï¼æ æ³æç°ï¼</br>æ¯å¦è¦ç»å®å
¶ä»é¶è¡å¡?",confirmRouter:"setBankcard",rejectRouter:"manageBankcard",cancelRouter:"manageBankcard"}):this.layerOpen({content:"å®å
¨å¯ç 已设置æå,æ¯å¦ç«å³ç»å®é¶è¡å¡?",confirmRouter:`setBankcard?Q=${this.pageUrl}`})})};C().WithDrawInit(!1).then(()=>{window.layer.open({shadeClose:!1,className:"layerConfirm",content:"å®å
¨å¯ç 已设置æå,æ¯å¦ç«å³æç°?",title:"温馨æç¤º",btn:["æ¯","å¦"],yes:t,no(e){window.layer.close(e),f.push("/userCenter/securityCenter")}})})}}},B={class:"container notSign fix pt15",s:"[object Object]"},W={class:"userMain mgb10"},I={class:"queue"},D={key:0,class:"right"},H={class:"submitContent mglr30 mgt15"},K={class:"pwdFlex"},N=["type"],Q={class:"verifyWrong"},_={class:"verifyRight"},x={class:"pwdFlex"},T=["type"],q={class:"verifyWrong"},A={class:"verifyRight"};function F(t,e,o,n,r,a){return y(),S("div",B,[s("div",W,[s("ul",I,[r.VerifyShow?(y(),S("li",D,[s("span",null,"éªè¯"+m(r.Verify),1),e[7]||(e[7]=s("i",null,null,-1))])):b("",!0),e[8]||(e[8]=s("li",{class:"now"},[s("span",null,"设置å®å
¨å¯ç "),s("i")],-1)),e[9]||(e[9]=s("li",null,[s("span",null,"宿"),s("i")],-1))]),s("ul",H,[s("li",null,[e[12]||(e[12]=s("span",null,"å®å
¨å¯ç ï¼",-1)),s("div",K,[l(s("input",{tag:"å®å
¨å¯ç ",type:r.isShowPassword?"text":"password",autocomplete:"off",placeholder:"请è¾å
¥å®å
¨å¯ç ",class:"userInput","onUpdate:modelValue":e[0]||(e[0]=i=>r.safePwd=i),onBlur:e[1]||(e[1]=(...i)=>a.checkSafePwd&&a.checkSafePwd(...i)),maxlength:"6"},null,40,N),[[p,r.safePwd]]),s("i",{class:P(["iconfont",r.isShowPassword?"Eye":"closeEye"]),onClick:e[2]||(e[2]=i=>r.isShowPassword=!r.isShowPassword)},null,2)]),l(s("em",Q,[e[10]||(e[10]=s("i",null,null,-1)),c(m(r.safePwdMsg),1)],512),[[h,r.safePwdError]]),l(s("em",_,[...e[11]||(e[11]=[s("i",null,null,-1)])],512),[[h,r.passSafePwd]])]),s("li",null,[e[15]||(e[15]=s("span",null,"确认å¯ç ï¼",-1)),s("div",x,[l(s("input",{tag:"确认å¯ç ",type:r.isShowConfirmSafePwd?"text":"password",autocomplete:"off",placeholder:"è¯·åæ¬¡è¾å
¥å®å
¨å¯ç ",class:"userInput _no_paste","onUpdate:modelValue":e[3]||(e[3]=i=>r.confirmSafePwd=i),onBlur:e[4]||(e[4]=(...i)=>a.checkConfirm&&a.checkConfirm(...i)),maxlength:"6"},null,40,T),[[p,r.confirmSafePwd]]),s("i",{class:P(["iconfont",r.isShowConfirmSafePwd?"Eye":"closeEye"]),onClick:e[5]||(e[5]=i=>r.isShowConfirmSafePwd=!r.isShowConfirmSafePwd)},null,2)]),l(s("em",q,[e[13]||(e[13]=s("i",null,null,-1)),c(m(r.confirmMsg),1)],512),[[h,r.confirmError]]),l(s("em",A,[...e[14]||(e[14]=[s("i",null,null,-1)])],512),[[h,r.passConfirm]])]),s("li",null,[e[16]||(e[16]=s("span",null,null,-1)),e[17]||(e[17]=c()),s("a",{class:"submitBtn",onClick:e[6]||(e[6]=(...i)=>a.setSafePwd&&a.setSafePwd(...i))},"ç¡®å®")])])])])}const Z=g(V,[["render",F],["__scopeId","data-v-dd85b4f8"]]);export{Z as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.