IOTAT任务周志

IOTAT任务周志

  • 负责人:黄越
  • 时间:2019/10/29至 2019/11/2
  • 任务基本信息:
    1.完成签到系统登陆注册
    2. 介绍相关技术

任务完成情况:

1.需要实现的登陆界面

需要实现的登陆界面

2.目前实现效果
登陆

在这里插入图片描述

注册

在这里插入图片描述

主要函数代码
register () {
      var that = this
      this.$axios({
        method: 'post',
        url: 'http://10.10.5.130:18887/register?userName=' + that.userName + '&password=' + that.passWord + '&mac=' + that.mac + '&realName=' + that.realName + '&stuId=' + that.stuId + '&userMail=' + that.userMail
      }).then(res => {
        console.log(res)
      })
    },
    checkUsername () {
      var that = this
      if (this.userName.length > that.maxlength || this.userName.length < that.minlength) {
        this.$message({
          showClose: true,
          message: '账号输入不合法',
          type: 'warning'
        });
      }

    },
    checkPassword () {
      var that = this
      if (this.passWord.length > that.maxlength || this.passWord.length < that.minlength) {
        this.$message({
          showClose: true,
          message: '密码输入不合法',
          type: 'warning'
        });
      }
    },
    checkRepassword () {
      var that = this
      if (this.rePassWord.length > that.maxlength || this.rePassWord.length < that.minlength) {
        this.$message({
          showClose: true,
          message: '密码输入不合法',
          type: 'warning'
        });
      }
      if (this.rePassWord != this.passWord) {
        this.$message({
          showClose: true,
          message: '密码输入不一致',
          type: 'warning'
        });
      }
    },
    checkRealName () {
      var realname = /^[\u4E00-\u9FA5]{2,4}$/
      if (!realname.test(this.realName)) {
        this.$message({
          showClose: true,
          message: '真实姓名输入不合法',
          type: 'warning'
        });
      }

    },
    checkStuid () {
      if (this.stuId.length != 10) {
        this.$message({
          showClose: true,
          message: '学号输入不合法',
          type: 'warning'
        });
      }
    },
    checkUserMail () {
      var usermail = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
      if (!usermail.test(this.userMail)) {      //正则表达式的使用
        this.$message({
          showClose: true,
          message: '邮箱输入不合法',
          type: 'warning'
        });
      }
    },
    checkMac () {
      var mac = /^([0-9a-fA-F]{2})(([/\s:][0-9a-fA-F]{2}){5})$/     //正则表达式的使用
      if (!mac.test(this.Mac)) {
        this.$message({
          showClose: true,
          message: 'MAC地址输入不合法',
          type: 'warning'
        });
      }

    },
    gologin () {
      this.$router.push("/")
    }
  }


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值