<template>
    <div class="auctionToast" v-if="show">
        <basicPop :pop="pop" @closeClick="closeClick">
            <div :style="styleData.listDiv" class="listDiv">
                <div v-if="title != '提示'" class="content">{{ content }}</div>
                <div v-else class="contents">
                    <div class="text">{{ content }}</div>
                    <div class="btn" @click="updateNow">立即刷新</div>
                </div>
                <div class="closeDiv" :style="styleData.closeDiv" @click="closeDialog()"></div>
            </div>
        </basicPop>
    </div>
</template>

<script>
import basicPop from './hdzxtbasicPop.vue';
import store from "../../../store/store";
import apis1 from '../../../util/apis1.js';

export default {
    components: {
        basicPop
    },
    props: [],
    data() {
        return {
            show: true,
            pop: {
                title: '',
                titlepop: ''
            }
        };
    },
    // computed: {
    //     title() {
    //         return '竞拍记录';
    //     }
    // },

    created() {
        document.querySelector('body').setAttribute('style', 'position:#fixed;top:0;height:100%;overflow:hidden');
        this.pop.titlepop = this.styleData.titlepop
            ? this.styleData.titlepop
            : { backgroundImage: 'url(//img10.360buyimg.com/imgzone/jfs/t1/141588/29/18217/44025/5fd571b9Ef55329ec/42dba91b188b9dce.png)' };
        this.pop.leftLineDiv = this.styleData.leftLineDiv;
        this.pop.rightLineDiv = this.styleData.rightLineDiv;
        this.pop.background = {
            width: '6rem',
            position: ' absolute',
            left: '50%',
            top: '50%',
            transform: 'translate(-50%, -50%)',
            borderBottomLeftRadius: '8px',
            borderBottomRightRadius: '8px'
        };
        this.pop.title = this.title;
        this.initData();
    },
    methods: {
        closeClick() {
            document.querySelector('body').removeAttribute('style');
            this.submit();
        },
        initData() {
        },

        updateNow() {
            this.publicData.$emit('updateAuction');
        },

        closeDialog() {
            document.querySelector('body').removeAttribute('style');
            this.submit();
        }
    }
};
</script>

<style lang="scss" scoped="scoped">
.closeDiv {
    width: 1rem;
    height: 1rem;
    margin: auto;
    margin-top: 0.7rem;
}

.content {
    // font-size: .4rem;
    // padding: 1rem .5rem;
    width: 100%;
    text-align: center;
    font-size: .4rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0 .5rem;
}

.contents {
    width: 100%;
    font-size: .4rem;
    position: absolute;
    text-align: center;
    top: 45%;
    transform: translateY(-50%);
    padding: 0 .5rem;
}

.btn {
    background: #378adc;
    color: white;
    font-size: .4rem;
    position: absolute;
    padding: .1rem .5rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: .1rem;
    top: 1.5rem;
}

::-webkit-scrollbar {
    display: none;
}
</style>
