liukangdong
2024-09-18 6ef869b1adcf3a5bb8e4c3117dc507d173f13fd8
admin/src/views/login.vue
@@ -23,6 +23,7 @@
<script>
import { mapMutations } from 'vuex'
import { getCaptcha, loginByPassword } from '@/api/system/common'
import Cookies from "js-cookie";
export default {
  name: 'Login',
@@ -58,13 +59,14 @@
        code: this.captcha.value.trim(),
        uuid: this.captcha.uuid
      })
        .then(() => {
        .then((res) => {
          // window.location.href = process.env.VUE_APP_CONTEXT_PATH
          Cookies.set('dm_user_token',res)
          window.location.reload()
        })
        .catch(e => {
          this.refreshCaptcha()
          this.$tip.apiFailed(e)
          // this.$tip.apiFailed(e)
        })
        .finally(() => {
          this.loading = false