<template>
  <div class="gotoShopNewDivAll" ref="goToShopBtn" @click="styleClick('click', 'goToShopBtn')"
    @mousemove="styleClick('mousemove', 'goToShopBtn')" @mouseout="styleClick('mouseout')"
    :class="isWebClick ? 'collect-fd1' : 'collect-fd'">
    <div>
      <div :style="styleData.goToShopBtn" v-lz-click="'4'" @click="buttonClick(null)"></div>
    </div>
  </div>
</template>

<script>
import { goToShopPage } from '../../../util/tools.js';
import store from '../../../store/store.js';
import { prizeShare } from '../../../js/share.js';
import apis1 from '../../../util/apis1.js';
// import sharebg from '../assets/images/share.png'
let { initPage, storeGoodsPoint } = apis1;
export default {
  props: ['datas', 'styleData', 'keyData', 'isTemplate', 'templateData', 'isWebClick', 'modifyContent'],
  data() {
    return {
      styleDataOld: {}
    };
  },
  created() {
    //深拷贝重置需要
    this.styleDataOld = JSON.parse(JSON.stringify(this.styleData));
  },
  methods: {
    styleClick(type, refName) {
      if (this.isWebClick) {
        //传值给B端
        let byValue = {
          modifyContent: this.modifyContent,
          refName: refName,
          styleData: this.styleData,
          c_this: this,
          styleDataOld: this.styleDataOld
        };
        this.$emit('opertaionCom', type, byValue);
      }
    },
    buttonClick() {
      if (this.isTemplate == true) {
        // this.$toast('活动预览，仅供查看');
      } else {
        storeGoodsPoint(4)
        goToShopPage(store.state.shopId);
      }
    }
  }
};
</script>

<style lang="scss" scoped="scoped">
.gotoShopNewDivAll {
  // position: sticky;
  // bottom: 0;
  width: 100%;
  z-index: 10;
}
.collect-fd {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}
.collect-fd1 {
  height: 0.88rem;
}
</style>
