<template>
  <el-button @click="login">登录</el-button>
</template>

<script>
import router from "router/index";
import store from "store/index";

export default {
  setup() {
    async function login() {
      let res = await store.dispatch("Login");
      if (res == 1) {
        router.replace("/digitalEmpowermentCenter");
      }
    }
    return {
      login,
    };
  },
};
</script>

<style>
</style>