<script>
export default {
  name: "convert-index",
  components: {},
  data() {
    return {
      input: '',
      usdtNum:'',
      iconNum:'',
      type:1,
      toNum:'',
      formNUm:''
    };
  },
  mounted() {
  },
  methods: {
    setType(){
      this.type=(this.type===1?2:1)
      console.log(' this.type', this.type)
    }
  },
}
</script>

<template>
  <view class="bgc-f p-40 box-sizing-border b-rad-20">
    <view>
      <view class="bgc-F6F7FA b-rad-20 mb-20 p-20 box-sizing-border mb-20" v-if="type===1">
        <view class="align-items-start flex-justify-space mb-20">
          <view class="align-items-center">
            <image
                class="t-img mr-8"
                :src="require('@/static/img/index/index/usdt.png')"
            ></image>
            <view class="fs-28">USDT</view>
          </view>
          <view class="max-box b-rad-20 fs-28">
            Max 0.01
          </view>
        </view>
        <view>
          <input v-model="formNUm" placeholder="输入要兑换的USDT数量" placeholder-class="fs-28"></input>
        </view>
      </view>
      <view class="bgc-F6F7FA b-rad-20 mb-20 p-20 box-sizing-border mb-20" v-else>
        <view class="align-items-start flex-justify-space mb-20">
          <view class="align-items-center">
            <image
                class="t-img mr-8"
                :src="require('@/static/img/logo/logo.png')"
            ></image>
            <view class="fs-28">DAO</view>
          </view>
          <view class="max-box b-rad-20 fs-28">
            Max 0.01
          </view>
        </view>
        <view>
          <input v-model="formNUm" placeholder="输入要兑换的DAO数量" placeholder-class="fs-28"></input>
        </view>
      </view>
    </view>

    <view class="flex-direction-column align-items-center flex-justify-center mb-20" @click="setType">
      <view class="fs-28">
        FORM
      </view>
      <image
          class="jh-img"
          :src="require('@/static/img/index/index/jiaohuan.png')"
          ></image>
      <view class="fs-28">
        TO
      </view>
    </view>
    <view>
      <view class="bgc-F6F7FA b-rad-20 mb-20 p-20 box-sizing-border mb-50" v-if="type===1">
        <view class="align-items-start flex-justify-space mb-20">
          <view class="align-items-center">
            <image
                class="logo-img mr-8"
                :src="require('@/static/img/logo/logo.png')"
            ></image>
            <view class="fs-28">DAO</view>
          </view>
        </view>
        <view class="fs-28">
         {{toNum?toNum:'请输入需要兑换的USDT数量'}}
        </view>
      </view>
      <view class="bgc-F6F7FA b-rad-20 mb-20 p-20 box-sizing-border mb-50" v-else>
        <view class="align-items-start flex-justify-space mb-20">
          <view class="align-items-center">
            <image
                class="logo-img mr-8"
                :src="require('@/static/img/index/index/usdt.png')"
            ></image>
            <view class="fs-28">USDT</view>
          </view>
        </view>
        <view class="fs-28">
          {{toNum?toNum:'请输入需要兑换的DAO数量'}}
        </view>
      </view>
    </view>

    <view class="convent-but b-rad-20 text-align-center fs-28 fc-f">
      兑换
    </view>
  </view>
</template>

<style scoped lang="scss">
.t-img{
  width: 70rpx;
  height: 60rpx;
}
.max-box{
  color: #0d81cf;
  border: 2rpx solid #0d81cf;
  padding: 6rpx 20rpx;
}
::v-deep .el-input__inner{
  background-color: transparent;
  border: none;
  padding: 0;
}
.jh-img{
  width: 60rpx;
  height: 60rpx;
}
.logo-img{
  width: 66rpx;
  height: 50rpx;
}
.convent-but{
  height: 80rpx;
  background: #0d81cf;
  color: #fff;
  line-height: 80rpx;
}
</style>
