quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<template>
  <!--
          作者:自定义
          时间:2025-10-31
          描述:插件中心-名片-名片设置
      -->
  <div v-loading="loading">
    <el-tabs size="small" v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="基础设置" name="basic"></el-tab-pane>
      <el-tab-pane label="页面背景图" name="background"></el-tab-pane>
    </el-tabs>
 
    <!--基础设置-->
    <Basic v-if="activeName == 'basic'" :settingData="settingData"></Basic>
 
    <!--页面背景图-->
    <Background v-if="activeName == 'background'" :settingData="settingData"></Background>
 
  </div>
</template>
 
<script>
import Basic from './part/Basic.vue';
import Background from './part/Background.vue';
import BusinessApi from '@/api/business';
 
export default {
  name: "BusinessSetting",
  components: {
    Basic,
    Background
  },
  data() {
    return {
      loading: false,
      activeName: 'basic',
      settingData: {}
    };
  },
  created() {
    this.getData();
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    getData() {
      this.loading = true;
       BusinessApi.settingIndex().then(res => {
        this.settingData = res.data.data;
        this.loading = false;
      });
    }
  }
};
</script>
 
<style>
</style>