<template>
  <div class="signIn">
    <div class="card">
      <div class="imgs">
        <img src="https://cdn.cunwuyun.cn/fengdu/img-qiandaochenggong.png" alt="">
      </div>
      <p class="status">今日已完成签到</p>
      <h4>积分<span v-if="data.changeIntegral">+{{ data.changeIntegral || 0}}</span></h4>
      <div class="times">
        <div>时间</div>
        <div class="value">{{ data.createTime.slice(0,16) }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'signIn',
  appName: '签到',
  data() {
    return {
      showPage: false,
      data: {},
    }
  },
  methods: {
    sign() {
      this.$instance.post(`/app/appwechatsigninfo/sign`,{}).then(res=> {
        if(res?.data) {
          this.data = res.data
        }
      })
    }
  },
  onShow() {
    this.sign()
  }
}
</script>

<style lang="scss" scoped>
.signIn {
  width: 100vw;
  height: 100vh;
  padding: 32px;
  box-sizing: border-box;
  .card {
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    border-radius: 16px;
    padding-top: 120px;
    box-sizing: border-box;

    .imgs {
      margin: 0 auto;
      width: 238px;
      height: 238px;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .status {
      margin-top: 72px;
      text-align: center;
      font-size: 36px;
      font-weight: 500;
    }
    h4 {
      text-align: center;
      margin-top: 24px;
      color: #666666;
      font-size: 28px;
      font-weight: 400;
      span {
        font-size: 52rpx;
        font-weight: 600;
        color: #5AAD6A;
      }
    }
    .times {
      width: 70%;
      border-top: 2px solid #f5f5f5;
      margin: 70px auto 0;
      padding-top: 72px;
      box-sizing: border-box;
      display: flex;
      justify-content: space-between;
      .value {
        color: #666666;
      }
    }
  }
}
</style>