<template>
  <div class="sms-three-box">
    <div class="content-left">
      <div class="card-textarea" v-if="twoData.index == 0">
        <div class="title">推送标题</div>
        <textarea :maxlength="10" v-model="data.title" placeholder="请输入"></textarea>
      </div>
      <div class="card-textarea">
        <div class="title">推送内容</div>
        <textarea :maxlength="50" v-model="data.content" placeholder="请输入"></textarea>
      </div>
    </div>
    <div class="content-right">
      <div class="right-box">
        <div class="card-msg" v-if="twoData.index == 0">
          <div class="top">
            <div class="title">用户登录提醒</div>
            <div class="content">
              <div class="lable">标题：</div>
              <div class="value">{{ data.title}}</div>
            </div>
            <div class="content">
              <div class="lable">内容：</div>
              <div class="value">{{data.content  }}</div>
            </div>
          </div>
          <div class="btn">
            <div class="text">详情</div>
            <div class="el-icon-arrow-right"></div>
          </div>
        </div>
        <div class="card-money" v-else>
          <img src="https://webapp-pub.ezijing.com/x-training-new/wx-fk.png">
          <div class="bz">
            <div class="label">备注：</div>
            <div class="con-txt">{{ data.content }}</div>
            <div class="el-icon-arrow-right"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object
    },
    twoData: {
      type: Object
    }
  },
  mounted() {
    console.log(this.twoData, '123')
  },
  methods: {
    handleStepThree() {
      if (!parseInt(this.twoData.index)) {
        if (this.data.title === '' || this.data.content === '') {
          this.$message.warning('请完善改步骤后才能进入下一步')
          return false
        }
      } else {
        if (this.data.content === '') {
          this.$message.warning('请完善改步骤后才能进入下一步')
          return false
        }
      }
      return true
    }
  }
}
</script>

<style lang="scss" scoped>
.sms-three-box {
  margin-bottom: 20px;
  display: flex;
  .content-left {
    border-left: 1px solid #dedede;
    border-right: 1px solid #dedede;
    padding: 30px 30px 0;
    .card-textarea {
      width: 320px;
      background: rgba(248, 248, 248, 0.39);
      border-radius: 16px;
      padding: 23px;
      margin-bottom: 30px;
      .title {
        text-align: center;
        margin-bottom: 23px;
        font-size: 18px;
        font-weight: bold;
        line-height: 100%;
        color: #333333;
      }
      textarea {
        width: 100%;
        height: 91px;
        background: rgba(255, 255, 255, 0.39);
        border: 1px solid #efefef;
        border-radius: 6px;
        padding: 10px 15px;
        color: #333333;
        font-size: 14px;
        resize: none;
      }
    }
  }
  .content-right {
    width: 588px;
    padding: 55px 0;
    box-sizing: border-box;
    .right-box {
      margin: 0 auto;
      width: 236px;
      height: 474px;
      background: url(https://webapp-pub.ezijing.com/x-training-new/phone-wxgzh.png);
      background-size: 100% 100%;
      position: relative;
      .card-money{
        background: #fff;
        width: 188px;
        position: absolute;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        padding-top: 8px;
        .bz{
          padding: 8px 10px;
          border-top: 1px solid #ccc;
          display: flex;
          align-items: center;
          .label{
            font-size: 12px;
            color: #333333;
          }
          .con-txt{
            font-size: 12px;
            color: #333333;
            width: 100px;
            margin-right: 15px;
          }
        }
      }
      .card-msg{
        position: absolute;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        width: 188px;
        background: rgba(255, 255, 255, .4);
        opacity: 1;
        border-radius: 2px;
        .btn{
          height: 26px;
          border-top: 1px solid #EAEAEA;
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 0 10px;
          .text{
            font-size: 10px;
            color: #333333;
            line-height: 100%;
          }
        }
        .top{
          padding: 10px;
        }
        .title{
          font-size: 12px;
          line-height: 100%;
          color: #333333;
        }
        .content{
          display: flex;
          margin-top: 5px;
          .lable{
            min-width: 38px;
            font-size: 10px;
            color: #999999;
          }
          .value{
            font-size: 10px;
            color: #333333;
          }
        }
      }
    }
  }
}
</style>
