ContactAdmin.vue 1.5 KB
<template>
  <div>
    <el-dialog
      :visible="contactVisible"
      @update:visible="$emit('update:contactVisible',false)"
      width="636px"
      :before-close="handleClose"
      :close-on-click-modal="false"
      append-to-body
      center
    >
      <span class="contact_tip">请联系管理员</span>
      <div class="contact_method">
        <p class="method_title">联系方式</p>
        <p class="method_phone">{{contact}}</p>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {post} from "@/api/http";
export default {
  props: ["contactVisible"],
  data(){
    return{
      schoolId:"",
      contact:""
    }
  },
  methods: {
    handleClose: function() {
      this.$emit("update:contactVisible", false);
    },
    // 管理员联系方式 
    getContact(){
      let url = "/api/common/contact_admin";
      let params = {
        schoolId:this.schoolId
      };
      post(url,params)
      .then(res=>{
        this.contact = res.mobile;
      })
    },
  },
  mounted() {
    this.schoolId = this.$route.params.test;
    this.getContact();
  }
};
</script>
<style scoped>
/* 提示 */
.contact_tip {
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  line-height: 26px;
  color: #34485e;
  opacity: 1;
}
/* 联系方式 */
.contact_method{
    margin-top:30px;
    text-align: center;
    margin-bottom:30px
}
.method_title{
    font-size:16px;
    color:#8C9198
}
.method_phone{
    font-size:28px;
    color:#34485E
}
</style>