IVIEW构建个人博客(三)

IVIEW构建个人博客(三)

后台登录页


<template>
      <div class="form">
          <Icon type="md-arrow-back" @click="back" size="25"></Icon>
        <h1 style="
        text-align: center;
        color: #ffffff;
        font-weight: 300;
        margin: 0 0 40px;"
        >后台登录</h1>
        <form>
          <div class="input">
              <Input v-model="ye" placeholder="YourEmail*"/>
          </div>
          <div class="input">
              <Input v-model="pw" type="password" password placeholder="PassWord*" />
          </div>
          <p class="forgot"><a href="">忘记密码?</a></p>
          <button class="button button-block" value="post" @click="postInfo" >登陆</button>
        </form>
      </div>
</template>
<script>
  export default {
    data:{
			ye:'',
      pw:''
		},
		methods:{
      postInfo(){//发起post请求
        this.$http.post('URL', {
          ye:this.ye,
          pw:this.pw
        }, {emulateJSON:true}).then(result=>{
          console.log(result.body);
        })
      },
      back(){
        this.$router.push({ path:'./'  })
      }
		}
  }
</script>
<style >
  .form {
    background: rgba(19, 35, 47, 0.9);
    padding: 40px;
    max-width: 500px;
    margin: 40px auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px 4px rgba(19, 35, 47, 0.3);
  }
  .input{
    display: block;
    margin: 5% 15% 5% 15%;
    width: 70%;
  }
  .forgot {
    text-align: right;
  }
  .button {
    border: 0;
    outline: none;
    border-radius: 3rem;
    padding: 15px 0;
    font-size: 1.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .1em;
    background: #1ab188;
    color: #ffffff;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    -webkit-appearance: none;
  }
  .button:hover, .button:focus {
    background: #179b77;
  }
  .button-block {
    display: block;
    margin: 5% 10% 0 10%;
    width: 80%;
  }
</style>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值