<template>
  <div class="orderEndDivC" v-if="show">
    <div class="maskDiv">
      <div class="popBg">
        <div class="toBuy" @click="toBugGoods()"></div>
        <div class="closePop" @click="closeClick()"></div>

      </div>

    </div>
  </div>
</template>

<script>
import {goToShopPage} from "../../../util/tools";
import store from "../../../store/store";
import {orderGoodsPopService} from "../../../util/hdzxtcomCreate";

export default {
  props: [],

  data() {
    return {

    };
  },
  created() {

  },
  methods: {

    toBugGoods() {
      if (sessionStorage.getItem("assignGoodsFlag") == '0') {
        goToShopPage(store.state.shopId);
      } else {
        orderGoodsPopService.create(this.isTemplate, this.styleData, submit => {
          orderGoodsPopService.close();
        });
      }

      this.closeClick()
    },

    closeClick() {
      this.submit();
    }
  }
};
</script>

<style lang="scss">
.orderEndDivC {

  .maskDiv {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba($color: #000000, $alpha: 0.7);
    top: 0;
    bottom: 0;
    z-index: 200;

    .popBg {
      background: url("//img10.360buyimg.com/imgzone/jfs/t1/103505/33/36267/28801/63c00599F7353fbad/71b3a89fd013b9af.png") no-repeat;
      background-size: 100%;
      width: 5.88rem;
      height: 6.30rem;
      margin: auto;
      transform: translateY(50%);
      display: flex;

    }

    .toBuy {
      background: url("//img10.360buyimg.com/imgzone/jfs/t1/3779/9/18103/3333/63c00598F0b1f6dfd/4d773d7e2964e369.png") no-repeat;
      background-size: 100%;
      width: 4rem;
      height: 0.76rem;
      margin: auto;
      margin-top: 4.9rem;

    }

    .closePop {
      width: 0.45rem;
      height: 0.45rem;
      margin-left: 3.6rem;
      position: absolute;
      right: 0.25rem;
      top: 0.25rem;
    }
  }


}
</style>
