<template>
  <div v-if="show">
    <div :style="signDateStyle" v-if="timeTile">—— {{ this.currentData }} ——</div>
    <div :style="signPromptStyle" v-if="activityType == 2 || activityType == 10002">已连续签到{{ signDays }}天</div>
    <div :style="signPromptStyle" v-if="(activityType == 3 || activityType == 10003)&&templateId =='20201228083300ljqdsl01'">已累计签到{{ signDays }}天</div>
    <div :style="signPromptStyle" v-if="(activityType == 3 || activityType == 10003)&&templateId =='20201228083300ljqdsl02'">您已累计签到{{ signDays }}天</div>
  </div>
</template>

<script>
export default {
  props: [],
  components: {},
  data() {
    return {
      activityType:0,
      templateId:0,
      timeTile:true,
      signPromptStyle: {},
      signDateStyle: {}
    };
  },
  created() {
    this.activityType = sessionStorage.getItem('activityType');
    this.templateId = sessionStorage.getItem('templateId');
    if(this.templateId =='20201228083300ljqdsl02'){
      this.timeTile = false
    }
    if (this.activityType == 1 || this.activityType == 10001) {
      this.signPromptStyle = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '3.04rem',
        'font-size': '0.24rem',
        color: '#ff00ff',
        width: '100%',
        'text-align': 'center'
      };
    } else if (this.activityType == 2 || this.activityType == 10002) {
      this.signPromptStyle = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '7.84rem',
        'font-size': '0.40rem',
        color: '#ffffff',
        width: '100%',
        'text-align': 'center'
      };
      this.signDateStyle = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '3.18rem',
        'font-size': '0.26rem',
        color: '#f27903',
        width: '100%',
        'text-align': 'center'
      };
    } else if ((this.activityType == 3 || this.activityType == 10003)&&this.templateId =='20201228083300ljqdsl01') {
      this.signPromptStyle = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '7.84rem',
        'font-size': '0.40rem',
        color: '#black',
        width: '100%',
        'text-align': 'center'
      };
      this.signDateStyle = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '3.06rem',
        'font-size': '0.26rem',
        color: '#ffdf73',
        width: '100%',
        'text-align': 'center'
      };
    }else if((this.activityType == 3 || this.activityType == 10003)&&this.templateId =='20201228083300ljqdsl02'){
      this.signPromptStyle = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '5rem',
        'font-size': '0.45rem',
        color: '#ffffff',
        width: '100%',
        'text-align': 'center'
      };
      this.signDateStyle = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '3.06rem',
        'font-size': '0.26rem',
        color: '#ffdf73',
        width: '100%',
        'text-align': 'center'
      };
    }

    this.publicData.$on('updata', resData => {
      console.log('res', resData);
      this.signDays = resData.signDays
    });
  },
  methods: {}
};
</script>

<style></style>
