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

<script>
export default {
  props: ["currentData","signDays","signDateStyle","signPromptStyle"],
  components: {},
  data() {
    return {
      activityType:0,
      templateId:0,
      timeTile:true,
      signDateStyleNew:{},
      signPromptStyleNew:{}
    };
  },
  created() {
    console.log(this.signDateStyle,"plplplp")
    this.signDateStyleNew = this.signDateStyle;
    this.signPromptStyleNew = this.signPromptStyle;
    this.activityType = sessionStorage.getItem('activityType');
    this.templateId = sessionStorage.getItem('templateId');
     console.log(this.templateId,this.activityType,"templateId")
    if(this.templateId =='20201228083300ljqdsl02'){
      this.timeTile = false
    }
    if (this.activityType == 1 || this.activityType == 10001) {
      this.signPromptStyleNew = {
        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) {
    } else if ((this.activityType == 3 || this.activityType == 10003)&&this.templateId =='20201228083300ljqdsl01') {
      this.signPromptStyleNew = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '7.84rem',
        'font-size': '0.40rem',
        color: '#ffffff',
        width: '100%',
        'text-align': 'center'
      };
      this.signDateStyleNew = {
        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.signPromptStyleNew = {
        display: 'flex',
        'justify-content': 'center',
        position: 'absolute',
        top: '5rem',
        'font-size': '0.45rem',
        color: '#ffffff',
        width: '100%',
        'text-align': 'center'
      };
      this.signDateStyleNew = {
        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 == null){
    }

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

<style></style>
