<template name="underway-name">
  <div id="underway" :style="styleData.underwaybox" :key="keyee" ref="underway"
    @click.stop="styleClick('click', 'underway')" @mousemove.stop="styleClick('mousemove', 'underway')"
    @mouseout.stop="styleClick('mouseout')">

    <div class="activityTopicTitleDiv" :style="styleData.activityTopicTitleDiv"></div>

    <!-- ====================== 恭喜中奖 名单==================== -->
    <div class="bonus" :style="styleData.bonusdiv" ref="prerentul" :class="prizelist.length != 0 ? '' : 'hiden'">
      <ul class="bonusul" :style="styleData.bonusul" ref="domul">
        <li :style="styleData.bonusli" v-for="apiece in prizelist" :key="apiece.id">恭喜{{ apiece.nickName }}中奖</li>
        <!-- 中奖名单遍历 -->
      </ul>
    </div>

    <div class="activityTopicDivAll" :style="styleData.activityTopicDivAll">
      <!-- 盖楼话题 -->
      <div class="activityTopicDiv" :style="styleData.activityTopicDiv">
        {{activityTopic}}
      </div>
      <!-- ========================= 有没有人盖楼 ============================== -->
      <div class="rob" :style="styleData.rob" v-if="this.list.length == 0">还没有人盖楼哦，快抢第一！！</div>

      <!-- =============================== 评论盖楼 =================================== -->
      <div class="bscroll" :style="isWebClick ?styleData.bscroll1:styleData.bscroll" v-if="this.list.length != 0">
        <van-pull-refresh v-model="isLoading" success-text="刷新成功" @refresh="onRefresh">
          <div class="bscrollcontainer" :style="styleData.bscrollcontainer">
            <div class="reviewlist" :style="styleData.reviewlist">

              <div class="reviewitem" :style="styleData.reviewitem" v-for="(item) in list" :key="item.id">

                <div class="portrait" :style="styleData.portrait">

                  <img :src="item.userImg" alt="图片加载失败" class="portraitimg" :style="styleData.portraitimg" />
                  <div v-if="item.isMe == 1" :style="styleData.isMyOwn">
                    我
                  </div>
                </div>

                <div :style="styleData.reviewitemLeft">

                  <div class="main" :style="styleData.main">
                    <div class="maininformation" :style="styleData.maininformation">
                      <div>{{ item.userNick }}</div>
                      <div :style="styleData.nowIdStyle">{{ item.buildCount }}楼</div>
                    </div>
                  </div>

                  <div class="maintime" :style="styleData.maintime">{{ item.createTime }}</div>
                  <div class="maincontent" :style="styleData.maincontent">{{ item.buildText }}</div>
                </div>

              </div>

            </div>
          </div>
        </van-pull-refresh>
      </div>

    </div>
    <!-- =============================== input ================================= -->
    <div class="reviewblock" :style="isWebClick ? styleData.reviewblock1 : styleData.reviewblock"
      v-if="timeOut != true">
      <div class="inputtittle" :style="styleData.inputtittle" :class="{ istishi: tishi }">
        <img src="https://img10.360buyimg.com/imgzone/jfs/t1/43439/21/9579/259/5d3162d1E786da604/303d47610519685d.png"
          alt class="inputliimg" />
        <div v-for="(item1, index) in floorlist" :key="index" @click="handlewinname(index)">{{ item1.votingContent }}
        </div>
      </div>
      <input type="text" autocomplete="off" maxlength="50" placeholder="评论至少5个字符，不多于50个字符" id="inp" @focus="centre"
        @blur="fail" @input="inputValue" />
      <div class="reviewblockbtndiv" :style="styleData.reviewblockbtndiv">
        <button class="reviewblockbtn" :style="styleData.reviewblockbtn" v-lz-click="'7'" @click="handleadd(dataList)">
          盖楼
        </button>
      </div>
    </div>

  </div>
</template>
<script>
// import { buildingLoadingPopService } from '../../../util/comCreate.js';

import { PrizeResultPopComService, buildingEndPopService } from '../../../util/hdzxtcomCreate.js'
import apis from '../../../util/apis1.js';
let { build, getWinnerData, giveLike, followShop, building } = apis;
import Vue from 'vue';
import bus from '../../../util/bus.js';
import {checkEmoj} from '../../../util/tools.js';
import { PullRefresh, Toast } from 'vant';
Vue.use(PullRefresh);
export default {
  props: ['isTemplate', 'datas', 'styleData', 'keyData', 'templateData', 'isWebClick', 'modifyContent'],
  data() {
    return {
      endtime: 1626775200, //活动结束时间
      isLoading: false, //下拉刷新
      list: [], //评论盖楼数组
      dataList: [], //主数据数组
      isheartshow: false, //控制点赞变不变红
      myname: 'jl', //模拟点赞用户信息(j**l)
      tishi: true, //失去焦点true
      floorlist: [], //提示评论家数组
      prizelist: [], //获奖数组
      timeOut: false, //是否竣工(活动是否结束)
      keyee: 0, //控制key值
      userName: '', //用户名
      timedrize: null,
      styleDataOld: {},
      activityTopic: '',//盖楼话题
      listData: [],//总盖楼数据
      pageNum: 0,
      pageSize: 100,
      totalPage: 1, // 统共页数，默认为1
      prizeResultData: {
        styleData: {},
        datas: {},
        keyData: {
          prizeUrl: 'showImg',
          prizeName: 'prizeName',
          prizeType: 'prizeType',
          priceInfo: 'priceInfo',
          discountType: 'discountType',
          couponType: 'couponType'
        }
      }
    };
  },
  mounted() {
    //深拷贝重置需要
    this.styleDataOld = JSON.parse(JSON.stringify(this.styleData));
    this.initData();
  },
  methods: {
    //点击可修改位置的方法
    styleClick(type, refName) {
      if (this.isWebClick) {
        //传值给B端
        let byValue = {
          modifyContent: this.modifyContent,
          refName: refName,
          styleData: this.styleData,
          styleDataOld: this.styleDataOld,
          c_this: this,
          isCustomSwitching: this.isCustomSwitching
        };
        this.$emit('opertaionCom', type, byValue);
      }
    },
    //下拉刷新
    onRefresh(isClick) {
      if (this.isTemplate || this.isWebClick) {
        // this.$toast('活动预览，仅供查看');
        this.isLoading = false;
        return;
      }
      const self = this;
      let actStatus = sessionStorage.getItem('actStatus');
      if (actStatus == 2) {
        this.$toast('活动已结束');
        this.isLoading = false;
        return;
      }
      if (actStatus == 1) {
        this.$toast('活动未开始');
        this.isLoading = false;
        return;
      }
      var month;
      var day;
      var hour;
      var minute;
      this.pageNum = this.pageNum + 1
      if (this.pageNum < this.totalPage) {
        let begin = (this.pageNum - 1) * this.pageSize;
        let end = this.pageNum * this.pageSize;
        this.list = this.list.concat(this.listData.slice(begin, end))
        this.isLoading = false;
      } else {
        this.list = this.listData
        this.isLoading = false;
      }

      // building(data => {
      //   // console.log(data);
      //   var nowLength = data.data.records.length;
      //   data.data.records.forEach((v, i) => {
      //     v.activeName = v.userNick;
      //     v.userNick = v.userNick.substr(0, 1) + '***' + v.userNick.substr(-1, 1);
      //     if (v.likes) {
      //       console.log(v.likes, 'likes');
      //       v.zan = v.likes.length;
      //       if (v.likes.length == 0) {
      //         v.active = false;
      //       } else {
      //         v.likes.forEach((a, i) => {
      //           if (a == data.data.userId) {
      //             v.active = true;
      //           } else {
      //             v.active = false;
      //           }
      //         });
      //       }
      //     } else {
      //       v.zan = 0;
      //       v.active = false;
      //     }
      //     v.nowId = 0;
      //     var time = new Date(v.createTime);
      //     month = time.getMonth() + 1;
      //     if (time.getDate() < 10) {
      //       day = '0' + time.getDate();
      //     } else {
      //       day = time.getDate();
      //     }
      //     if (time.getHours() < 10) {
      //       hour = '0' + time.getHours();
      //     } else {
      //       hour = time.getHours();
      //     }
      //     if (time.getMinutes() < 10) {
      //       minute = '0' + time.getMinutes();
      //     } else {
      //       minute = time.getMinutes();
      //     }
      //     v.createTime = month + '-' + day + ' ' + hour + ':' + minute;
      //     v.nowId = nowLength--;
      //     this.list.splice(i, 1, v);
      //   });


      // if (isClick) {
      //   Toast(`您盖到了第${data.data.bulidCount}层`);
      // }
      // getWinnerData(data => {
      //   // bus.$emit('winner', data);
      //   data.data.forEach((v, i) => {
      //     v.nickName = v.nickName.substr(0, 1) + '***' + v.nickName.substr(-1, 1);
      //   });
      //   this.prizelist = data.data;
      //   this.keyee++;
      //   this.reffunction();
      // });

      //盖楼结束后的弹框显示的数据
      // bus.$emit('gertger', data.data.bulidCount);
      // });


    },
    //增加评论按钮
    handleadd(item) {
      console.log(item);
      if (this.isTemplate || this.isWebClick) {
        // this.$toast('活动预览，仅供查看');
        return;
      }
      const self = this;
      let actStatus = sessionStorage.getItem('actStatus');
      if (actStatus == 2) {
        this.$toast('活动已结束');
        return;
      }
      if (actStatus == 1) {
        this.$toast('活动未开始');
        return;
      }
      var text = inp.value; //获取value值
      var nowLow = 0; //初始楼层0
      var nowId = this.listData.length + 1; //v-for动态id控制动态用户的楼层
      var month;
      var day;
      var hour;
      var minute;
      if (text == '') {
        Toast(`请输入盖楼评论哦~`);
        return;
      }
      if (text.split('').length < 5) {
        Toast('至少输入5个字符~');
        return;
      }
      if(!checkEmoj(text)){
         Toast('不能输入特殊字符~');
        return;
      }

      if (new Date().getMonth() + 1 < 10) {
        month = '0' + (new Date().getMonth() + 1);
      } else {
        month = new Date().getMonth() + 1;
      }
      if (new Date().getDate() < 10) {
        day = '0' + new Date().getDate();
      } else {
        day = new Date().getDate();
      }
      if (new Date().getHours() < 10) {
        hour = '0' + new Date().getHours();
      } else {
        hour = new Date().getHours();
      }
      if (new Date().getMinutes() < 10) {
        minute = '0' + new Date().getMinutes();
      } else {
        minute = new Date().getMinutes();
      }
      var time = month + '-' + day + ' ' + hour + ':' + minute;
      var name = item.nickName.substr(0, 1) + '***' + item.nickName.substr(-1, 1);

      var obj = {
        //插入带用户信息假数据的数组里
        buildText: text,
        nowId: nowId,
        userNick: name,
        userImg: item.userImg,
        createTime: time,
        active: false,
        zan: '0'
      };
      if (text == '') {
        Toast(`请输入盖楼评论哦~`);
      } else {
        // 盖楼加载  TODO调后台接口
        console.log(text.slice(), 'text');
        // buildingLoadingPopService.create(submit => {});
        build(text, data => {
          console.log(data, '盖楼增加评论');
          if (data.data == 1) {
            // buildingLoadingPopService.close();
            Toast('已超过每日最大可盖次数');
          } else if (data.data == 2) {
            // buildingLoadingPopService.close();
            Toast('已超过活动最大可盖次数');
          } else if (data.data == 3) {
            // buildingLoadingPopService.close();
            Toast('已超过连续最大可盖次数');
          } else {
            if (data.data != '' && data.data.prizeInfoId != '' && data.data.prizeInfoId) {
              this.prizeResultData.datas = data.data;
              this.publicData.$emit('reloadPrize', true);
              //中奖
              PrizeResultPopComService.create(this.prizeResultData, data.data, this.styleData, submit => {
                PrizeResultPopComService.close();
              });
            }
            this.keyee++;
            // buildingLoadingPopService.close();
            this.listData.splice(0, 0, obj); //倒叙渲染dom
            inp.value = ''; //input点击后清除value
            nowLow = this.listData.length + 1; //提醒框盖到第几层了
            this.getListData();
            this.tishi = true;
            bus.$emit('gertger', nowLow - 1);
          }
        });
      }
    },
    //判难评论账号与点赞账号是否相同
    handleheart(name, d, item) {
      console.log(item, name);
      if (this.isTemplate || this.isWebClick) {
        // this.$toast('活动预览，仅供查看');
        return;
      }
      const self = this;
      let actStatus = sessionStorage.getItem('actStatus');
      if (actStatus == 2) {
        this.$toast('活动已结束');
        return;
      }
      if (actStatus == 1) {
        this.$toast('活动未开始');
        return;
      }
      if (item.userId == this.myname) {
        Toast(`自己不能给自己点赞!`);
        // console.log("ififififif")
      } else {
        //根据点赞心变色
        // console.log("else")
        if (this.list[d].active == false) {
          giveLike(item.id, 1, data => {
            this.list[d].active = true;
            this.list[d].zan++;
            this.keyee++;
            Toast(`点赞成功!`);
          });
        } else {
          giveLike(item.id, 0, data => {
            this.list[d].active = false;
            this.list[d].zan--;
            this.keyee++;
            Toast(`取消成功!`);
          });
        }
      }
      // console.log(name == this.myname)
    },
    //获取焦点显示提示评论
    centre() {
      if (this.isTemplate || this.isWebClick) {
        // this.$toast('活动预览，仅供查看');
        return;
      }
      if (this.floorlist.length > 0) {
        this.tishi = false;
        console.log(this.tishi);
      } else {
        this.tishi = true;
        console.log(this.floorlist.length);
      }
    },

    initData() {
      if (this.isTemplate) {
        // this.$toast('活动预览，仅供查看');
        // console.log(this.templateData, 'this.templateDatathis.templateData');
        var datasAll = this.templateData;
        console.log(datasAll, 'datasAlldatasAlldatasAlldatasAll')
        if (datasAll) {
          this.activityTopic = datasAll.bulidingSettingData.buildingRuleVo.activityTopic;
          this.list = [
            {
              buildText: '人工智能111 + 4k超清全屏幕,人工智能 + 4k超清全屏幕,人工智能 + 4k超清全屏幕,人工智能 + 4k超清全屏幕,人工智能 + 4k超清全屏幕',
              dayTime: '2021-08-19',
              updateTime: 1629351822000,
              userId: 'KMPf7YUtoqAOfyPytDsN5vDWlEMz+zQpi8XowgwyRvBH1Oq94/Y4fcs8ljsT9SZj',
              userImg: 'https://img10.360buyimg.com/imgzone/jfs/t20782/85/568972117/2758/78eafc28/5b0fd507Ne2b074cc.png',
              userNick: 'j***l',
              zan: '22631',
              createTime: '8-19 13:43',
              buildCount: 3,
              isMe: 0,//1 是本人 0 不是

            },
            {
              buildText: '人工智能 + 4k超清全屏幕',
              dayTime: '2021-08-19',
              updateTime: 1629351822000,
              userId: 'KMPf7YUtoqAOfyPytDsN5vDWlEMz+zQpi8XowgwyRvBH1Oq94/Y4fcs8ljsT9SZj',
              userImg: 'http://storage.360buyimg.com/i.imageUpload/6a645f687a6150516854536676426c31363238303632313930393730_mid.jpg',
              userNick: 'j***l',
              zan: '14800',
              createTime: '8-19 13:43',
              buildCount: 2,
              isMe: 1,//1 是本人 0 不是
            },
            {
              buildText: '人工智能 + 4k超清全屏幕',
              dayTime: '2021-08-19',
              updateTime: 1629351822000,
              userId: 'KMPf7YUtoqAOfyPytDsN5vDWlEMz+zQpi8XowgwyRvBH1Oq94/Y4fcs8ljsT9SZj',
              userImg: 'http://storage.360buyimg.com/i.imageUpload/6a645f687a6150516854536676426c31363238303632313930393730_mid.jpg',
              userNick: 'j***l',
              zan: '11600',
              createTime: '8-19 13:43',
              buildCount: 1,
              isMe: 0,//1 是本人 0 不是
            }
          ];
        } else {
          this.activityTopic = "预览话题预览话题预览话题预览话题预览话题预览话题预览话题预览话题预览话题预览话题";
          this.list = [
            {
              buildText: '人工智能 + 4k超清全屏幕,人工智能 + 4k超清全屏幕,人工智能 + 4k超清全屏幕,人工智能 + 4k超清全屏幕,人工智能 + 4k超清全屏幕',
              dayTime: '2021-08-19',
              updateTime: 1629351822000,
              userId: 'KMPf7YUtoqAOfyPytDsN5vDWlEMz+zQpi8XowgwyRvBH1Oq94/Y4fcs8ljsT9SZj',
              userImg: 'https://img10.360buyimg.com/imgzone/jfs/t20782/85/568972117/2758/78eafc28/5b0fd507Ne2b074cc.png',
              userNick: 'j***l',
              zan: '22631',
              createTime: '8-19 13:43',
              nowId: 3,
              isMe: 0,//1 是本人 0 不是

            },
            {
              buildText: '人工智能 + 4k超清全屏幕',
              dayTime: '2021-08-19',
              updateTime: 1629351822000,
              userId: 'KMPf7YUtoqAOfyPytDsN5vDWlEMz+zQpi8XowgwyRvBH1Oq94/Y4fcs8ljsT9SZj',
              userImg: 'http://storage.360buyimg.com/i.imageUpload/6a645f687a6150516854536676426c31363238303632313930393730_mid.jpg',
              userNick: 'j***l',
              zan: '14800',
              createTime: '8-19 13:43',
              nowId: 2,
              isMe: 1,//1 是本人 0 不是
            },
            {
              buildText: '人工智能 + 4k超清全屏幕',
              dayTime: '2021-08-19',
              updateTime: 1629351822000,
              userId: 'KMPf7YUtoqAOfyPytDsN5vDWlEMz+zQpi8XowgwyRvBH1Oq94/Y4fcs8ljsT9SZj',
              userImg: 'http://storage.360buyimg.com/i.imageUpload/6a645f687a6150516854536676426c31363238303632313930393730_mid.jpg',
              userNick: 'j***l',
              zan: '11600',
              createTime: '8-19 13:43',
              nowId: 1,
              isMe: 0,//1 是本人 0 不是
            }
          ];
        }
        this.timeOut = false;
        return;
      }

      const self = this;

      // let actStatus = sessionStorage.getItem('actStatus');
      // if (actStatus == 2) {
      //   this.timeOut = true;
      // }

      building(buildingData => {
        let buildingData1 = buildingData.data;

        this.myname = buildingData1.userId;
        this.dataList = buildingData1;
        this.floorlist = buildingData1.comments;
        this.activityTopic = buildingData1.activityTopic;

        let endTime = buildingData1.endTime;//竣工时间
        let nowTime = new Date().getTime();
        var actStatus = 0;
        if (nowTime >= endTime) {
          this.timeOut = true;
          actStatus = 2;
        }

        if (buildingData1.records.length != 0) {
          var month;
          var day;
          var hour;
          var minute;
          var nowLength = buildingData1.records.length;
          buildingData1.records.forEach(v => {
            v.activeName = v.userNick;
            v.userNick = v.userNick.substr(0, 1) + '***' + v.userNick.substr(-1, 1);
            if (v.likes) {
              // console.log(v.likes, 'likes');
              v.zan = v.likes.length;
              if (v.likes.length == 0) {
                v.active = false;
              } else {
                v.likes.forEach((a, i) => {
                  if (a == buildingData1.userId) {
                    v.active = true;
                  } else {
                    v.active = false;
                  }
                });
              }
            } else {
              v.zan = 0;
              v.active = false;
            }
            v.nowId = 0;
            var time = new Date(v.createTime);
            month = time.getMonth() + 1;
            if (time.getDate() < 10) {
              day = '0' + time.getDate();
            } else {
              day = time.getDate();
            }
            if (time.getHours() < 10) {
              hour = '0' + time.getHours();
            } else {
              hour = time.getHours();
            }
            if (time.getMinutes() < 10) {
              minute = '0' + time.getMinutes();
            } else {
              minute = time.getMinutes();
            }
            v.createTime = month + '-' + day + ' ' + hour + ':' + minute;
            v.nowId = nowLength--;
            this.listData.push(v);
          });
          this.totalPage = Math.ceil(this.listData.length / this.pageSize);
          this.onRefresh()
          // console.log(this.list);
        }
        getWinnerData(winnerData => {
          // bus.$emit('winner', data);

          if (actStatus == 2) {
            buildingEndPopService.create(buildingData1, winnerData, this.isTemplate, this.styleData, (callBack) => {
              buildingEndPopService.close();
            })
          }
          winnerData.data.forEach((v, i) => {
            v.nickName = v.nickName.substr(0, 1) + '***' + v.nickName.substr(-1, 1);
            this.prizelist.splice(i, 1, v);
          });
          this.reffunction();
          this.keyee++;
          console.log(this.prizelist, 'zxccccccccccccccc')
        });


      })


    },
    getListData() {
      this.listData = []
      building(buildingData => {
        let buildingData1 = buildingData.data;
        this.myname = buildingData1.userId;
        this.dataList = buildingData1;
        this.floorlist = buildingData1.comments;
        this.activityTopic = buildingData1.activityTopic;

        let endTime = buildingData1.endTime;//竣工时间
        let nowTime = new Date().getTime();
        var actStatus = 0;
        if (nowTime >= endTime) {
          this.timeOut = true;
          actStatus = 2;
        }

        if (buildingData1.records.length != 0) {
          var month;
          var day;
          var hour;
          var minute;
          var nowLength = buildingData1.records.length;
          buildingData1.records.forEach(v => {
            v.activeName = v.userNick;
            v.userNick = v.userNick.substr(0, 1) + '***' + v.userNick.substr(-1, 1);
            if (v.likes) {
              // console.log(v.likes, 'likes');
              v.zan = v.likes.length;
              if (v.likes.length == 0) {
                v.active = false;
              } else {
                v.likes.forEach((a, i) => {
                  if (a == buildingData1.userId) {
                    v.active = true;
                  } else {
                    v.active = false;
                  }
                });
              }
            } else {
              v.zan = 0;
              v.active = false;
            }
            v.nowId = 0;
            var time = new Date(v.createTime);
            month = time.getMonth() + 1;
            if (time.getDate() < 10) {
              day = '0' + time.getDate();
            } else {
              day = time.getDate();
            }
            if (time.getHours() < 10) {
              hour = '0' + time.getHours();
            } else {
              hour = time.getHours();
            }
            if (time.getMinutes() < 10) {
              minute = '0' + time.getMinutes();
            } else {
              minute = time.getMinutes();
            }
            v.createTime = month + '-' + day + ' ' + hour + ':' + minute;
            v.nowId = nowLength--;
            // debugger
            this.listData.push(v);
          });
          this.totalPage = Math.ceil(this.listData.length / this.pageSize);
          this.pageNum = 0;
          this.list = []
          this.onRefresh()
          // console.log(this.list);
        }
        getWinnerData(winnerData => {
          // bus.$emit('winner', data);

          if (actStatus == 2) {
            buildingEndPopService.create(buildingData1, winnerData, this.isTemplate, this.styleData, (callBack) => {
              buildingEndPopService.close();
            })
          }
          winnerData.data.forEach((v, i) => {
            v.nickName = v.nickName.substr(0, 1) + '***' + v.nickName.substr(-1, 1);
            this.prizelist.splice(i, 1, v);
          });
          this.reffunction();
          this.keyee++;
          console.log(this.prizelist, 'zxccccccccccccccc')
        });
      })
    },

    reffunction() {
      //恭喜中奖lenght>1时动态
      clearInterval(this.timedrize);

      if (this.prizelist.length < 2) {
      } else {
        var prerent = this.$refs.prerentul;
        var ulheight = this.$refs.domul.offsetHeight * this.prizelist.length; //获取ul的高度
        var liheight = this.$refs.domul.offsetHeight;
        var distance = 0; //控制高
        this.timedrize = setInterval(() => {
          if (distance == -ulheight) {
            distance = liheight;
            this.$refs.domul.style.transition = 'none';
            this.$refs.domul.style.transform = `translateY(${distance}px)`;
            setTimeout(() => {
              this.$refs.domul.style.transition = 'all 2s';
              distance -= liheight;
              this.$refs.domul.style.transform = `translateY(${distance}px)`;
            }, 1);
          } else {
            distance -= liheight;
            this.$refs.domul.style.transform = `translateY(${distance}px)`;
            console.log(liheight, '33333333');
          }
        }, 1500);
      }
    },
    //将提示内容添加在input里
    handlewinname(index) {
      inp.value = this.floorlist[index].votingContent;
      console.log(inp.value);
      if (inp.value == this.floorlist[index].votingContent) {
        this.tishi = true;
        // console.log('44444');
      }
    },
    //失去焦点隐藏提示评论
    fail() {
      setTimeout(() => {
        if (inp.value == '') {
          this.tishi = true;
        }
      }, 100);
    },
    inputValue() {
      if (this.isTemplate || this.isWebClick) {
        // this.$toast('活动预览，仅供查看');
        inp.value = '';
        return;
      }
      let actStatus = sessionStorage.getItem('actStatus');
      if (actStatus == 2) {
        this.$toast('活动已结束');
        inp.value = '';
        return;
      }
      if (actStatus == 1) {
        this.$toast('活动未开始');
        inp.value = '';
        return;
      }
    },
  }
};
</script>
<style scoped>
.maincontent {
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reviewblock input {
  width: 4.8rem;
  height: 0.8rem;
  background: #fff;
  border-radius: 0.4rem;
  font-size: 0.2rem;
  color: #252525;
  line-height: 0.8rem;
  padding-left: 0.25rem;
  box-sizing: border-box;
}
.reviewblockbtn {
  width: 1.9rem;
  height: 0.8rem;
  border-radius: 0.4rem;
  margin-left: 0.2rem;
  background: linear-gradient(90deg, #f2270c 0%, #ff6420 100%);
  font-size: 0.3rem;
  text-align: center;
  line-height: 0.8rem;
  color: #fff;
}
.reviewlist {
  margin-bottom: 0.4rem;
}
.heart {
  background-image: url(https://img10.360buyimg.com/imgzone/jfs/t1/53386/6/4694/581/5d25bc9dE5e4d939d/e93b0d9d2a5bd062.png);
}
.active {
  background-image: url(https://img10.360buyimg.com/imgzone/jfs/t1/83453/18/4204/581/5d25bc9dE748c437b/23120ee415b5b912.png);
}
.hiden {
  height: 0;
}
.inputtittle {
  width: 4.8rem;
  border: solid #ccc 1px;
  border-radius: 5px;
  background: #f2f2f2;
  position: absolute;
  left: 0.3rem;
  bottom: 1.2rem;
  box-sizing: border-box;
  padding: 0.24rem;
  font-size: 0.24rem;
  color: #252525;
  line-height: 0.5rem;
  text-align: initial;
  z-index: 300;
}
.inputliimg {
  width: 0.12rem;
  height: 0.06rem;
  position: absolute;
  bottom: -0.06rem;
  left: 0.23rem;
  border: 0;
}
.istishi {
  display: none;
}
.congratulations {
  display: none;
}
.bonusul {
  height: 0.6rem;
  transition: 2s all;
}
</style>
