保安服务企业管理项目备份
guoshilong
2024-01-03 e747a23e38f1db8924b90af6ea90a29fd5a0058a
登录修改
2 files modified
12 ■■■■■ changed files
src/page/login/userlogin.vue 8 ●●●● patch | view | raw | blame | history
src/store/modules/user.js 4 ●●● patch | view | raw | blame | history
src/page/login/userlogin.vue
@@ -49,6 +49,7 @@
import {info} from "@/api/system/tenant"
import {getCaptcha} from "@/api/user"
import {getTopUrl} from "@/util/util"
import {Message} from "element-ui";
export default {
  name: "userlogin",
@@ -120,8 +121,10 @@
          })
          this.$store
            .dispatch("LoginByUsername", this.loginForm)
            .then(() => {
              console.log("userInfo",this.userInfo)
            .then((data) => {
              if (data.error_description) {
                loading.close()
              }else{
              this.$store.dispatch("GetMenu", [this.userInfo, ""]).then((data) => {
                //登录跳转首页改完跳转保安单位情况智能分析
                let path = this.tagWel.value
@@ -136,6 +139,7 @@
                this.$router.push({path: path})
                loading.close()
              });
              }
            })
            .catch(() => {
              loading.close()
src/store/modules/user.js
@@ -50,9 +50,7 @@
    LoginByUsername({ commit }, userInfo) {
      return new Promise((resolve, reject) => {
        loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type, userInfo.key, userInfo.code).then(res => {
          // debugger;
          const data = res.data;
          // console.log(res.data, 'datadatadatadatadata')
          if (data.error_description) {
            Message({
              message: data.error_description,
@@ -66,7 +64,7 @@
            commit('DEL_ALL_TAG');
            commit('CLEAR_LOCK');
          }
          resolve();
          resolve(data);
        }).catch(error => {
          reject(error);
        })