jiangping
2024-08-26 e23a1db0b60437f17d09d65c65f8fd0c8a5d88c7
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