<template>
  <div class="prizePopMaskDiv" v-show="show">
    <div class="prizePopBox">
      <div class="listDivStyleNoData">
        <div class="noPrizeDataStyleBtn">
          <button class="btnLeftClass" @click="ruleClick()">
            查看规则
          </button>
          <button class="btnRight12Class" v-lz-click="'4'" @click="buttonClick()">
            进店逛逛
          </button>
        </div>
      </div>
      <div class="close-btn" @click="closeClick()"></div>
    </div>
  </div>
</template>

<script>
import { AcRulePopComService10015Fly } from '../../../util/hdzxtcomCreate.js';
import Vue from 'vue';
import { Notify, Toast } from 'vant';
import store from "../../../store/store";
import {goToShopPage } from '../../../util/tools.js';
Vue.use(Toast, Notify);
export default {
  props: [],
  components: {
  },
  data() {
    return {
      activityType: sessionStorage.getItem('activityType'),
      drawListData: [],
      jsonData: {},
      acRulePopComData: {
        styleData: {},
        datas: {},
        keyData: {}
      },
    };
  },
  created() {
  },

  mounted() {
    document.querySelector('body').setAttribute('style', 'position:#fixed;top:0;height:100%;overflow:hidden');
    this.initData();
  },
  methods: {
    initData() {
      //去请求接口
      if (this.isTemplate == true) {
        //不请求接口 模板预览
      } else {
        console.log('12312312312');
        //去请求接口 TODO
      }
    },
    closeClick() {
      document.querySelector('body').removeAttribute('style');
      this.submit();
    },

    buttonClick() {
      //查看
      let shopId = store.state.shopId;
      goToShopPage(shopId);
    },
    ruleClick() {
      document.querySelector('body').removeAttribute('style');
      this.submit();
      AcRulePopComService10015Fly.create(
        this.acRulePopComData,
        this.isTemplate,
        this.templateData,
        this.styleData,
        prizeRecordDetilClick => {
          AcRulePopComService10015Fly.close();
        }
      );
    },
  }
};
</script>

<style lang="scss" scoped="scoped">
.prizePopMaskDiv {
  width: 100%;
  height: 100%;
  background: rgba($color: #000000, $alpha: 0.7);
  position: fixed;
  top: 0;
  z-index: 201;
}
.prizePopMaskDiv1 {
  width: 100%;
  height: 100%;
  // background: rgba($color: #000000, $alpha: 0.7);
  position: fixed;
  top: 0;
  z-index: 201;
}
.listDivStyleNoData {
  width: 5.16rem;
  height: 2.9rem;
  background: url("//img10.360buyimg.com/imgzone/jfs/t1/106631/36/36883/30466/64e459ceFd637afb1/d96c4ca41e6912a9.png")
    no-repeat;
  background-size: 100% 100%;
  margin: 0 auto;
  padding-top: 1.83rem;
}

.noPrizeDataStyle {
  height: 100%;
  font-size: 0.24rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #8c8c8c;
}
.prizePopBox {
  position: absolute;
  top: 2.71rem;
  left: 50%;
  width: 6.45rem;
  height: 5.51rem;
  background: url("//img10.360buyimg.com/imgzone/jfs/t1/202820/19/33926/74846/64e459ceF72b2bfc9/c6f1ca0df04f2a92.png")
    no-repeat;
  background-size: 100% 100%;
  transform: translateX(-50%);
  padding-top: 1.69rem;
}
.close-btn {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  background: url("//img10.360buyimg.com/imgzone/jfs/t1/183690/31/37249/1097/64e2d8dcFb8273014/2bd869caeaf31168.png")
    no-repeat;
  background-size: 100% 100%;
  bottom: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
}
.noPrizeDataStyleBtn {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}
.btnLeftClass {
  width: 1.88rem;
  height: 0.51rem;
  color: #111010;
  font-size: 0.31rem;
  background-image: url("//img10.360buyimg.com/imgzone/jfs/t1/218123/25/33455/942/64e416a9F9fb3138b/d13e7558b242a409.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 0.15rem;
}
.btnRight12Class {
  width: 1.88rem;
  height: 0.51rem;
  color: #543708;
  font-size: 0.31rem;
  background-image: url("//img10.360buyimg.com/imgzone/jfs/t1/66529/12/22821/1888/64e416a9F0686daf3/04565dad26693a8a.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 0.15rem;
}
</style>


