refactor(接口定义): 优化获取当前用户名称的方法

This commit is contained in:
wxg0103 2023-01-31 17:41:35 +08:00 committed by wxg0103
parent b04b7703b8
commit 17dc11a340
1 changed files with 1 additions and 3 deletions

View File

@ -281,7 +281,6 @@ import { TYPE_TO_C } from '@/business/automation/scenario/Setting';
import ApiCaseHeader from './ApiCaseHeader';
import { deepClone } from 'metersphere-frontend/src/utils/tableUtils';
import { useApiStore } from '@/store';
import {TokenKey} from "metersphere-frontend/src/utils/constants";
const store = useApiStore();
export default {
@ -701,8 +700,7 @@ export default {
row.createTime = data.createTime;
row.updateTime = data.updateTime;
this.compare = [];
let user = JSON.parse(localStorage.getItem(TokenKey));
row.updateUser = user.name;
row.updateUser = getCurrentUser().name;
row.type = null;
this.$success(this.$t('commons.save_success'));
this.tagCount = 0;