goldpankit
Version:
GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。
2 lines (1 loc) • 2.85 kB
JavaScript
import{y as c,_ as h,r as i,o as _,c as g,a as t,t as o,b as a,w as l,e as f,p as v,l as $}from"./index-99dec0ae.js";import{c as C}from"./form.check-189b470c.js";function D(e){return c.post("/usr/regis/email",e,{baseURL:"/remote-api"})}function b(e){return c.post("/usr/regis/email/otp-code",e,{baseURL:"/remote-api"})}const k="/images/wechat.png";const I={data(){return{form:{username:"",password:"",otpElement:"",otpCodeId:null,otpCode:""},sendOtpCodeData:{isWorking:!1,timeout:0,sended:!1},regisData:{isWorking:!1},priceTableData:[{dayCount:"90天",price:"299元"},{dayCount:"365天",price:"799元"}]}},methods:{getRules(){return{username:[{required:!0,message:this.$t("form.isRequired",{value:this.$t("user.username")})}],password:[{required:!0,message:this.$t("form.isRequired",{value:this.$t("user.password")})}],otpElement:[{required:!0,message:this.$t("form.isRequired",{value:this.$t("user.email")})},{validator:(e,s,n)=>C(e,s,n,this.$t("form.correctEmailTip"))}],otpCode:[{required:!0,message:this.$t("form.isRequired",{value:this.$t("user.otpCode")})}]}},regis(){this.$refs.form.validate().then(()=>{this.regisData.isWorking||(this.regisData.isWorking=!0,D(this.form).then(()=>{this.$message.success("Register successful."),this.$router.push({name:"SignIn"})}).catch(e=>{this.$tip.apiFailed(e)}).finally(()=>{this.regisData.isWorking=!1}))}).catch(()=>{})},sendOtpCode(){this.$refs.form.validateField("otpElement").then(()=>{this.sendOtpCodeData.isWorking||(this.sendOtpCodeData.isWorking=!0,b({email:this.form.otpElement,username:this.form.username}).then(e=>{this.form.otpCodeId=e,this.sendOtpCodeData.timeout=60,this.sendOtpCodeData.sended=!0;const s=setInterval(()=>{this.sendOtpCodeData.timeout--,this.sendOtpCodeData.timeout===0&&clearInterval(s)},1e3)}).catch(e=>{this.$tip.apiFailed(e)}).finally(()=>{this.sendOtpCodeData.isWorking=!1}))}).catch(()=>{})}}},r=e=>(v("data-v-db90143e"),e=e(),$(),e),w={class:"signup"},y={class:"wrap"},O=r(()=>t("h3",null,"GoldPanKit账号需要购买,请添加下方微信,我们的客服人员会为您开通账号!",-1)),E=r(()=>t("div",{class:"wechat-wrap"},[t("img",{src:k}),t("span",null,"小艺")],-1)),R={class:"price-wrap"},q=r(()=>t("h4",null,"价格套餐",-1)),W={class:"have-an-account"};function S(e,s,n,B,p,x){const d=i("el-table-column"),u=i("el-table"),m=i("router-link");return _(),g("div",w,[t("div",y,[t("h2",null,o(e.$t("common.signUp")),1),O,E,t("div",R,[q,a(u,{data:p.priceTableData},{default:l(()=>[a(d,{align:"center",prop:"dayCount",label:"时长"}),a(d,{align:"center",prop:"price","class-name":"price",label:"价格"})]),_:1},8,["data"])])]),t("div",W,[t("p",null,o(e.$t("user.haveAnAccount")),1),a(m,{to:{name:"SignIn"}},{default:l(()=>[f(o(e.$t("common.signIn")),1)]),_:1})])])}const N=h(I,[["render",S],["__scopeId","data-v-db90143e"]]);export{N as default};