1 |
- import{s as e,r as t,n as o,o as n,c as a,a as i,w as l,F as s,i as c,b as d,t as u,d as r,I as h}from"./index-M3n0V4OD.js";import{_ as p}from"./_plugin-vue_export-helper.BCo6x5W8.js";const m=p({data:()=>({phoneNumber:"",verificationCode:"",countdown:0,timer:null,canClick:!0,codeey:null,reValue:null}),methods:{sendCode(){""!==this.phoneNumber?!this.canClick&&this.countdown>0?e({title:"已发送,请勿重复点击",icon:"none"}):(this.canClick&&(this.canClick=!1),this.countdown=60,this.timer=setInterval((()=>{this.countdown--,0===this.countdown&&clearInterval(this.timer)}),1e3),t({url:"http://api.app.cliu.cc/api/login/ban_code",method:"POST",data:{phone:this.phoneNumber},success:t=>{200===t.data.code?(e({title:"发送成功",icon:"success"}),this.codeey=t.data.data,console.log(this.codeey),console.log(t.data.data)):e({title:t.data.msg||"发送失败,请检查手机号码和验证码",icon:"none"})},fail:t=>{e({title:"网络请求失败,请稍后重试",icon:"none"})}})):e({title:"请输入手机号码",icon:"none"})},login(){""!==this.phoneNumber?""!==this.verificationCode?t({url:"http://api.app.cliu.cc/api/login/banLogin",method:"POST",data:{phone:this.phoneNumber,code:this.verificationCode,codeKey:this.codeey},success:t=>{200===t.data.code?(e({title:"登录成功",icon:"success"}),this.reValue=t.data.data,o({url:"/pages/webview/webview?url=http://zbs.jiuweiyun.cn/GetExcel?reValue="+t.data.data})):e({title:t.data.msg||"登录失败",icon:"none"})},fail:t=>{e({title:"网络请求失败,请稍后重试",icon:"none"})}}):e({title:"请输入验证码",icon:"none"}):e({title:"请输入手机号码",icon:"none"})}},destroyed(){this.timer&&clearInterval(this.timer)}},[["render",function(e,t,o,p,m,b){const f=h,C=c;return n(),a(s,null,[i(C,{class:"container"},{default:l((()=>[i(C,{class:"phone-input"},{default:l((()=>[i(f,{modelValue:m.phoneNumber,"onUpdate:modelValue":t[0]||(t[0]=e=>m.phoneNumber=e),placeholder:"请输入手机号码"},null,8,["modelValue"])])),_:1}),i(C,{class:"code-input"},{default:l((()=>[i(f,{modelValue:m.verificationCode,"onUpdate:modelValue":t[1]||(t[1]=e=>m.verificationCode=e),placeholder:"请输入验证码"},null,8,["modelValue"])])),_:1}),i(C,{class:"send-btn",onClick:b.sendCode,disabled:m.countdown>0},{default:l((()=>[d(u(m.countdown>0?m.countdown+"s后重发":"发送验证码"),1)])),_:1},8,["onClick","disabled"]),i(C,{class:"login-btn",onClick:b.login,disabled:!m.phoneNumber||!m.verificationCode},{default:l((()=>[d("登录")])),_:1},8,["onClick","disabled"])])),_:1}),i(C,{class:""},{default:l((()=>[r("span",{style:{color:"red"}},"请尽快下载保存,链接将在1月20日失效!")])),_:1})],64)}],["__scopeId","data-v-89defe43"]]);export{m as default};
|