<template>
    <div class="Index">
        <chart-b></chart-b>
    </div>
</template>

<script>
import { mapActions } from "vuex";
import chart_b from "./charts/chart2";

export default {
    name: "Index",
    components: {
        "chart-b": chart_b
    },
    data() {
        return {};
    },
    created() {},
    methods: {
        ...mapActions(["fetch"]),
        get() {
            this.fetch({
                api: "aaa",
                method: "GET",
                data: {},
                success: res => {
                    console.log(res);
                },
                fail: err => {
                    console.log(err);
                    if (err.errMsg) this.$message.error(err.errMsg);
                    else this.$message.error("服务器发生异常");
                }
            });
        }
    }
};
</script>
