<template>
    <div>
        <el-form :model="loginInfo" status-icon  label-width="100px" class="demo-ruleForm">
            <el-form-item label="密码" >
                <el-input type="password" v-model="loginInfo.password" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="用户" >
                <el-input v-model.number="loginInfo.username"></el-input>
            </el-form-item>
            <el-form-item label="账号" >
                <el-input v-model.number="loginInfo.brand1"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="submitForm()">提交</el-button>
                <el-button @click="resetForm()">重置</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
export default {
    data() {
      return {
        loginInfo: {
          password:'yf6543210',
          username:'admin',
          brand1:'remember'
        },

      };
    },
    methods: {
      submitForm() {
        this.$axios.post('/api/login',this.qs.stringify(this.loginInfo)).then((res)=>{
          if(res.data == 0){
            window.sessionStorage.setItem('myuser_type',1)
            this.$router.push('/index/xycb')
          }
        })
      },
      resetForm() {
      }
    }
  }
</script>
<style lang="less" scoped>

</style>
