<template>
  <div class="bg flex align-center flex-end border-box pr50">
    <div class="login-wrap plr20 bg-white pb30 f">
      <ys-form :config="config" :model="model">
        <template #beforeInput> <h1>这是input框的前面的数据</h1> </template>
      </ys-form>
    </div>
  </div>
</template>
<script setup>
import YsForm from "../../components/form.vue";
import config from "./config";
import model from "./model";
import md5 from "js-md5";
import { reactive } from "vue";
import { post } from "../../utils/http";
/* const form = reactive({
  password: "gao",
  username: "13456789019",
  tenanId: "389767",
  grant_type: "password",
  scope: "all",
  type: "account",
}); */
/* const onSubmit = async(formEl)=>{
     await formEl.validate((valid, fields) => {
        if (valid) {
        console.log('submit!')
        post('/login/blade-auto/oauth/token',{
            password: md5(form.password),
            username:form.username,
            tenanId:form.tenanId,
            grant_type:"password",
            scope:"all",
            type:"account"
        }).then(res=>console.log(res)).catch(err=>console.log(err))
        } else {
        console.log('error submit!', fields)
        }
  })
 } */
</script>

<style lang="scss" scoped>
.bg {
  background: url(@/assets/images/bg.jpg) no-repeat center / cover;
  @include square(100%);
}
.login-wrap {
  width: 200px;
}
</style>
