UNPKG

goldpankit

Version:

GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。

2 lines (1 loc) 2.99 kB
import{y as c,_ as h,r as o,o as _,c as f,a as t,t as r,b as a,w as d,e as g,p as v,k as C}from"./index-1a25b643.js";import{c as $}from"./form.check-189b470c.js";import{_ as D}from"./wechat-ae447c56.js";function k(e){return c.post("/usr/regis/email",e,{baseURL:"/remote-api"})}function y(e){return c.post("/usr/regis/email/otp-code",e,{baseURL:"/remote-api"})}const I={data(){return{form:{username:"",password:"",otpElement:"",otpCodeId:null,otpCode:""},sendOtpCodeData:{isWorking:!1,timeout:0,sended:!1},regisData:{isWorking:!1},priceTableData:[{dayCount:"30天(首次)",price:"免费领取"},{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)=>$(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,k(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,y({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(()=>{})}}},i=e=>(v("data-v-29457791"),e=e(),C(),e),b={class:"signup"},w={class:"wrap"},O=i(()=>t("h3",null,"GoldPanKit账号需要购买,请添加下方微信,我们的客服人员会为您开通账号!",-1)),E=i(()=>t("p",null,"首次使用可扫码免费领取30天体验账号!",-1)),R=i(()=>t("div",{class:"wechat-wrap"},[t("img",{src:D}),t("span",null,"小艺")],-1)),q={class:"price-wrap"},W=i(()=>t("h4",null,"价格套餐",-1)),S={class:"have-an-account"};function B(e,s,n,x,p,T){const l=o("el-table-column"),u=o("el-table"),m=o("router-link");return _(),f("div",b,[t("div",w,[t("h2",null,r(e.$t("common.signUp")),1),O,E,R,t("div",q,[W,a(u,{data:p.priceTableData},{default:d(()=>[a(l,{align:"center",prop:"dayCount",label:"时长"}),a(l,{align:"center",prop:"price","class-name":"price",label:"价格"})]),_:1},8,["data"])])]),t("div",S,[t("p",null,r(e.$t("user.haveAnAccount")),1),a(m,{to:{name:"SignIn"}},{default:d(()=>[g(r(e.$t("common.signIn")),1)]),_:1})])])}const V=h(I,[["render",B],["__scopeId","data-v-29457791"]]);export{V as default};