 <template>
    <section class="back-top">
        <div class="back-btn" @click="backTop">
            <img src="../../images/backTop.png"/>
        </div>
      
    </section>
</template>

<script>
    export default {
    	data(){
            return{
               objPoint:{}
            }
        },
        props:{
            burialPoint:{
                default:'',
                type:String
            }
        },
        mounted(){
            if(this.burialPoint == 'activity'){
                this.objPoint = {
                    menuLevel:2,
                    menuFromCode:'m_home',
                    menuCode:'m_content_list',
                    functionCode:'f_activity',
                    actionCode:'c_top'
                }
            }
        },
  
        methods: {
            backTop:function(){
                if(this.burialPoint == 'activity'){
                    this.pageBurialPoin(this.objPoint);
                }
               
                var osTop = document.documentElement.scrollTop || document.body.scrollTop; 
                if(osTop > 0){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                }
                

            }
            
        },
    }
</script>

<style lang="scss" scoped>
    @import '../../style/mixin';
	.back-btn{
        position: fixed;
        width: px2rem(35px);
        height: px2rem(35px);
        right: px2rem(15px);
        z-index: 100;
        bottom: px2rem(80px);;
        img{
            width: 100%;
            height: 100%;
            display: block;
        }

    }
    
</style>

