<template>
    <div class="bodyBoxs">
      <div style="margin-top: 15px;">
        <span style="margin-bottom: 15px;color: #7d7d7f">修改联系客服电话号码</span>
        <el-input placeholder="请输入手机号" style="margin-top: 10px" v-model="phone">
          <template slot="append"><el-button type="primary" @click="setPhone">修改</el-button></template>
        </el-input>
      </div>
    </div>
</template>
<script>
import { getToken } from "@/utils/auth";
export default {
    data(){
        return{
          phone:''
        }
    },
    created(){
      this.getData()
    },
    methods:{
      setPhone(){
        this.$api.setPhone({
          phone:this.phone
        }).then((res) => {
          this.$message({
            message: res.message,
            type: 'success'
          });
        })
      },
      getData(){
        this.$api.showPhone({
        }).then((res) => {
            this.phone = res.data.phone;
        })
      }
    }
}
</script>
<style scoped>
    .bodyBoxs{
        padding: 40px;
    }
    .boxs{
        width: 100%;
        background: #fff;
        border-radius: 15px;
    }

</style>
