<template>
    <div class="number">
        <div class="imgparent">
            <van-nav-bar
                title="修改密码"
                left-arrow
                @click-left="onClickLeft"
            />
        </div>
        <div class="set_nav">
            <!-- <p><span>手机号码</span><span>138****5438</span></p> -->
            <van-form
                @submit="onSubmit"
                style="margin-top:36px;"
            >
                <van-field
                    v-model="username"
                    name="新密码"
                    label="新密码"
                    placeholder="请输入新密码"
                    :rules="[{ required: true, message: '请填写新密码' }]"
                />
                <van-field
                    v-model="username"
                    name="再次确认密码"
                    label="再次确认密码"
                    placeholder="请输入再次确认密码"
                    :rules="[{ required: true, message: '请填写再次确认密码' }]"
                />
                <div class="srt_bottm">
                    <p @click="subimt">确认</p>
                </div>
            </van-form>

        </div>

    </div>
</template>

<script>
export default {
  data() {
    return {
      model: {}
    };
  },
  methods: {
    async userData() {
      const res = await this.$http.get("/user/" + localStorage.getItem("id"));
      this.model = res.data[0];
    },
    onClickLeft() {}
  },
  created() {
    // this.userData();
  }
};
</script>

<style lang="less">
.number {
  .van-cell::after {
    border: 0;
  }
  .van-field__control {
    text-align: right;
  }
  .van-button--primary {
    background-color: #fff;
    border: 1px solid #fff;
    color: #009fe8;
    font-size: 14px;
    font-family: PingFang SC;
    font-weight: 400;
    color: #009fe8;
    border-left: 1px solid #a7a7a7;
  }
  background-color: #fff;
  height: 100vh;
  //   padding: 0 16px;
  .set_nav {
    // padding: 0 16px;
    // padding-bottom: 36px;
    p {
      font-size: 3.733vw;
      font-family: PingFang SC;
      font-weight: 500;
      color: #343434;
    //   display: flex;
    //   justify-content: space-between;
      margin-top: 35px;
      span {
        font-size: 3.733vw;
        font-family: PingFang SC;
        font-weight: 500;
        color: #343434;
      }
      span:nth-child(2) {
        font-size: 3.733vw;
        font-family: PingFang SC;
        font-weight: 400;
        color: #343434;
        img {
          width: 6px;
          height: 9px;
        }
      }
    }
  }
  .srt_bottm {
    margin-top: 70%;
    // background-color: #009fe8;
    // margin: 0 16px;
    p {
      height: 42px;
        // width: 100%;
      margin: 0 16px;
      background-color: #009fe8;
      border-radius: 3px;
      font-size: 14px;
      font-family: PingFang SC;
      font-weight: 400;
      color: #ffffff;
      line-height: 42px;
      text-align: center;
    //   margin-left: 50%;
    //   transform: translateX(-50%);
    }
  }
}
</style>