<template>
  <div class="div_page_bg">
    <provider-classify-item v-for="(data,index) in baseInfo.fbTypeInfo" :key="index" :type-info="data"></provider-classify-item>
    <loading v-model="loading" text="加载中"></loading>
  </div>
</template>

<script>
  import ProviderClassifyItem from "../../components/providerInfo/providerClassifyItem";
  import {getDetail} from "../../service/getData";
  export default {
    name: "providerDocumentClassifyInfo",
    components: {ProviderClassifyItem},
    data(){
      return{
        loading:false,
        fbId:'',
        baseInfo:'',
      }
    },
    created(){
      try {
        EbeiPlugins.setNavigationItemTitle("分类信息");
      }
      catch (e) {

      }
      this.fbId = this.$route.query.fbId;
      this.getDetailJs();
    },
    methods:{
      getDetailJs(){
        let that = this;
        let params = {
          fbId:this.fbId
        }
        that.loading = true;
        getDetail(params).then(res => {
          that.loading = false;
          if (res.status === 200) {
            that.baseInfo = res.data;
          } else {
            that.showTips(res.message)
          }
        }).catch(error => {
          that.loading = false;
        })
      },
      showTips (tip) {
        this.$vux.toast.show({
          type: 'text',
          text: tip,
          position: 'bottom'
        })
      },

    }
  }
</script>

<style scoped>
  .div_page_bg{
    width: 100%;
    height: 100vh;
    padding: 5px 15px 15px;
    background-color: #F7F7F7;
  }

</style>
