nidapeng
2024-04-30 e459023e11f5b7be2d86662722b70605aee7992b
admin/src/views/login.vue
@@ -1,7 +1,7 @@
<template>
  <div class="wrap">
    <div class="introduce">
      <h2>豆米跳跳</h2>
      <h2>{{title}}</h2>
      <h3></h3>
    </div>
    <div class="login">
@@ -23,12 +23,14 @@
<script>
import { mapMutations } from 'vuex'
import { getCaptcha, loginByPassword } from '@/api/system/common'
import Cookies from "js-cookie";
export default {
  name: 'Login',
  data () {
    return {
      loading: false,
      title: process.env.VUE_APP_TITLE,
      username: '',
      password: '',
      // 验证码
@@ -57,8 +59,9 @@
        code: this.captcha.value.trim(),
        uuid: this.captcha.uuid
      })
        .then(() => {
         // window.location.href = process.env.VUE_APP_CONTEXT_PATH
        .then((res) => {
          // window.location.href = process.env.VUE_APP_CONTEXT_PATH
          Cookies.set('dm_user_token',res)
          window.location.reload()
        })
        .catch(e => {