<template>
    <div>
        <navbar title="联系我们"></navbar>
        <div class="main">
            <div class="list">
                <div>联系方式</div>
                <div>{{ baseInfo.phone }}</div>
            </div>
            <div class="list">
                <div>邮箱</div>
                <div>{{ baseInfo.email }}</div>
            </div>
            <div class="list">
                <div>工作时间</div>
                <div>{{ baseInfo.problemDescr }}</div>
            </div>
        </div>
    </div>
</template>
<script>
import navbar from '../../components/navbar/navbar.vue';
import { feedbackAdd,feedbackList } from "@/service/api/home";
export default {
    components: {
        navbar: navbar,
    },
    data(){
        return{
            baseInfo:{
                phone:'',
                email:'',
                problemDescr:''
            }
        }
    },
    created(){
        this.initFeedbackList()
    },
    methods:{
        async initFeedbackList(){
            const params = {
                problemType:'联系我们'
            }
            let result = await feedbackList(params);
            console.log(result, 'sssssssss')
            let maxList = result.reduce((maxObj,obj)=>{
                return maxObj.id>obj.id?maxObj:obj
            })
            console.log(maxList,'maxListmaxList')
            this.baseInfo = maxList
        }
    }
}
</script>
<style scoped>
.main {
    margin-top: 52px;
    background-color: #fff;
}

.list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px 0 20px;
    border-bottom: solid 1px #e0e0e0;
}


</style>