Files
fastbee/docker/data/nginx/vue/static/js/chunk-1b561faf.9354063a.js
2024-03-30 01:17:03 +08:00

1 line
8.7 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1b561faf"],{"3c64":function(t,e,r){"use strict";r("5347")},5347:function(t,e,r){},7803:function(t,e,r){"use strict";r.r(e);var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"register"},[r("div",{staticStyle:{padding:"20px"}},[r("el-row",{attrs:{gutter:10}},[r("el-col",{attrs:{xs:24,sm:24,md:14,lg:14,xl:14}},[r("div",{staticClass:"login-top hidden-sm-and-down"},[r("h1",[r("a",{staticStyle:{color:"#FFF"},attrs:{href:"https://wumei.live/",target:"_blank"}},[t._v("FastBee物联网平台")])]),r("h2",[r("a",{staticStyle:{color:"#FFF"},attrs:{href:"https://wumei.live/",target:"_blank"}},[t._v("FastBee")]),t._v(" open source living iot platform")]),r("div",{staticStyle:{"max-width":"330px","text-align":"left",margin:"0 auto"}},[t.bindAccount?t._e():r("div",{staticStyle:{padding:"25px 0"}},[r("span",{staticStyle:{color:"#fff","margin-right":"10px"}},[t._v("登录方式")]),r("el-button",{staticStyle:{border:"1px solid #fff"},attrs:{type:"success",title:"微信登录",size:"mini",disabled:""},on:{click:t.authLogin}},[r("svg-icon",{attrs:{"icon-class":"wechat"}}),t._v(" 微信 ")],1),r("el-button",{staticStyle:{border:"1px solid #fff"},attrs:{type:"danger",title:"QQ登录",size:"mini",disabled:""},on:{click:t.qqLogin}},[r("svg-icon",{attrs:{"icon-class":"qq"}}),t._v(" QQ ")],1),r("el-button",{staticStyle:{border:"1px solid #fff"},attrs:{type:"primary",title:"支付宝登录",size:"mini",disabled:""},on:{click:t.authLogin}},[r("svg-icon",{attrs:{"icon-class":"zhifubao"}}),t._v(" 支付宝 ")],1)],1),r("div",[r("el-button",{staticStyle:{padding:"0px"},attrs:{type:"warning"}},[r("el-link",{staticStyle:{color:"#fff",padding:"12px 18px"},attrs:{href:"https://wumei.live/",underline:!1,target:"_blank"}},[t._v("返回官网")])],1),r("el-button",{staticStyle:{padding:"0px"},attrs:{type:"danger"}},[r("el-link",{staticStyle:{color:"#fff",padding:"12px 18px"},attrs:{href:"https://wumei.live/doc",underline:!1,target:"_blank"}},[t._v("查看文档")])],1),r("el-button",{staticStyle:{padding:"0px"}},[r("router-link",{staticStyle:{color:"#666",padding:"11px 18px",display:"flex","padding-bottom":"12px"},attrs:{to:{path:"/login",query:this.$route.query}}},[t._v("账号登录 ")])],1)],1)])])]),r("el-col",{attrs:{xs:24,sm:24,md:8,lg:8,xl:8}},[r("el-form",{ref:"registerForm",staticClass:"register-form",staticStyle:{"z-index":"1000"},attrs:{model:t.registerForm,rules:t.registerRules}},[t.bindAccount?r("h3",{staticClass:"title"},[t._v("注册绑定蜂信科技账户")]):r("h3",{staticClass:"title"},[t._v("注册账号")]),r("el-form-item",{attrs:{prop:"username"}},[r("el-input",{attrs:{type:"text","auto-complete":"off",placeholder:"账号"},model:{value:t.registerForm.username,callback:function(e){t.$set(t.registerForm,"username",e)},expression:"registerForm.username"}},[r("svg-icon",{staticClass:"el-input__icon input-icon",attrs:{slot:"prefix","icon-class":"user"},slot:"prefix"})],1)],1),r("el-form-item",{attrs:{prop:"phonenumber"}},[r("el-input",{attrs:{type:"text","auto-complete":"off",placeholder:"手机号码"},model:{value:t.registerForm.phonenumber,callback:function(e){t.$set(t.registerForm,"phonenumber",e)},expression:"registerForm.phonenumber"}},[r("svg-icon",{staticClass:"el-input__icon input-icon",attrs:{slot:"prefix","icon-class":"phone"},slot:"prefix"})],1)],1),r("el-form-item",{attrs:{prop:"password"}},[r("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"密码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleRegister(e)}},model:{value:t.registerForm.password,callback:function(e){t.$set(t.registerForm,"password",e)},expression:"registerForm.password"}},[r("svg-icon",{staticClass:"el-input__icon input-icon",attrs:{slot:"prefix","icon-class":"password"},slot:"prefix"})],1)],1),r("el-form-item",{attrs:{prop:"confirmPassword"}},[r("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"确认密码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleRegister(e)}},model:{value:t.registerForm.confirmPassword,callback:function(e){t.$set(t.registerForm,"confirmPassword",e)},expression:"registerForm.confirmPassword"}},[r("svg-icon",{staticClass:"el-input__icon input-icon",attrs:{slot:"prefix","icon-class":"password"},slot:"prefix"})],1)],1),t.captchaOnOff?r("el-form-item",{attrs:{prop:"code"}},[r("el-input",{staticStyle:{width:"63%"},attrs:{"auto-complete":"off",placeholder:"验证码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleRegister(e)}},model:{value:t.registerForm.code,callback:function(e){t.$set(t.registerForm,"code",e)},expression:"registerForm.code"}},[r("svg-icon",{staticClass:"el-input__icon input-icon",attrs:{slot:"prefix","icon-class":"validCode"},slot:"prefix"})],1),r("div",{staticClass:"register-code"},[r("img",{attrs:{src:t.codeUrl},on:{click:t.getCode}})])],1):t._e(),r("el-form-item",{staticStyle:{width:"100%"}},[t.bindAccount?r("el-button",{staticStyle:{width:"100%"},attrs:{loading:t.loading,type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.handleRegister(e)}}},[t.loading?r("span",[t._v("绑 定 中...")]):r("span",[t._v("绑 定")])]):r("el-button",{staticStyle:{width:"100%"},attrs:{loading:t.loading,type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.handleRegister(e)}}},[t.loading?r("span",[t._v("注 册 中...")]):r("span",[t._v("注 册")])])],1)],1)],1)],1)],1),t._m(0)])},n=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"el-register-footer"},[r("span",[t._v("Copyright © 2021-2024 "),r("a",{attrs:{target:"_blank",href:"https://fastbee.cn/"}},[t._v("蜂信物联")]),t._v(" All Rights Reserved.")])])}],s=(r("e05f"),r("7ded")),o=r("bb86"),a={name:"Register",data:function(){var t=this,e=function(e,r,i){t.registerForm.password!==r?i(new Error("两次输入的密码不一致")):i()};return{codeUrl:"",registerForm:{username:"",phonenumber:"",password:"",confirmPassword:"",code:"",uuid:"",bindId:""},registerRules:{username:[{required:!0,trigger:"blur",message:"请输入您的账号"},{min:2,max:20,message:"用户账号长度必须介于 2 和 20 之间",trigger:"blur"}],phonenumber:[{required:!0,trigger:"blur",message:"请输入您的手机号码"},{min:11,max:11,message:"手机号码长度为11",trigger:"blur"}],password:[{required:!0,trigger:"blur",message:"请输入您的密码"},{min:5,max:20,message:"用户密码长度必须介于 5 和 20 之间",trigger:"blur"}],confirmPassword:[{required:!0,trigger:"blur",message:"请再次输入您的密码"},{required:!0,validator:e,trigger:"blur"}],code:[{required:!0,trigger:"change",message:"请输入验证码"}]},loading:!1,captchaOnOff:!0,bindAccount:!1}},created:function(){this.checkBind(),this.getCode()},methods:{checkBind:function(){var t=this,e=this.$route.query,r=e.bindId;void 0===r||null===r?this.bindAccount=!1:(this.bindAccount=!0,Object(s["c"])(r).then((function(e){t.bindAccount=void 0===e.bindAccount||e.bindAccount,t.bindAccount?t.registerForm.bindId=r:(t.registerForm.bindId="",t.$router.push({query:{}}))})))},getCode:function(){var t=this;Object(s["d"])().then((function(e){t.captchaOnOff=void 0===e.captchaOnOff||e.captchaOnOff,t.captchaOnOff&&(t.codeUrl="data:image/gif;base64,"+e.img,t.registerForm.uuid=e.uuid)}))},qqLogin:function(){window.location.href="http://localhost:8080/auth/render/qq"},authLogin:function(){var t=this;this.$alert("第三方登录正在集成中...","提示消息",{confirmButtonText:"确定",callback:function(e){t.$message({type:"info",message:"action: ".concat(e)})}})},handleRegister:function(){var t=this;this.$refs.registerForm.validate((function(e){e&&(t.loading=!0,t.bindAccount?Object(s["b"])(t.registerForm).then((function(e){t.innerRegister(e)})).catch((function(){t.loading=!1,t.captchaOnOff&&t.getCode()})):Object(o["b"])(t.registerForm).then((function(e){t.innerRegister(e)})).catch((function(){t.loading=!1,t.captchaOnOff&&t.getCode()})))}))},innerRegister:function(t){var e=this,r=this.registerForm.username;this.$alert("<font color='red'>恭喜你,您的账号 "+r+" 注册成功!</font>","系统提示",{dangerouslyUseHTMLString:!0,type:"success"}).then((function(){e.$router.push("/login")})).catch((function(){}))}}},c=a,l=(r("3c64"),r("2877")),u=Object(l["a"])(c,i,n,!1,null,null,null);e["default"]=u.exports},bb86:function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return s}));var i=r("b775");r("bc3a"),r("5c96"),r("21a6"),r("5f87"),r("c38a");function n(t){return Object(i["a"])({url:"/iot/tool/register",headers:{isToken:!1},method:"post",data:t})}function s(t){return Object(i["a"])({url:"/iot/tool/userList",method:"get",params:t})}}}]);