fix: 修复登陆,i18n bug

This commit is contained in:
@changcode
2022-04-14 17:22:48 +08:00
parent 2cc23bf1a9
commit 884c9da2da
5 changed files with 9 additions and 10 deletions

View File

@@ -66,7 +66,7 @@ export default {
return
}
this.loading = true
post(api.operationLog, { username: this.username, pin: this.pin }).then(
post(api.login, { username: this.username, pin: this.pin }).then(
res => {
if (res.code === 200) {
if (!this.$_.isEmpty(res.data.lang)) {

View File

@@ -65,7 +65,7 @@ export default {
mixins: [rightBoxMixin],
data () {
return {
url: api.i18nBox,
url: api.i18nSys,
loginName: localStorage.getItem(storageKey.username),
rules: { // 表单校验规则
name: [

View File

@@ -70,7 +70,7 @@ export default {
mixins: [table],
data () {
return {
url: api.i18n,
url: api.i18nLang,
tableTitle: [ // 原始table列
{
label: 'ID',

View File

@@ -17,16 +17,16 @@ export const api = {
appearance: '/sys/appearance',
permissions: '/sys/user/permissions',
operationLog: '/sys/log',
login: '/sys/login',
// user
user: '/sys/user',
// role
role: '/sys/role',
menu: '/sys/role/menu/',
sysMenu: '/sys/menu/',
// i18n
i18n: '/sys/i18n/lang',
i18nBox: '/sys/i18n',
i18nLang: '/sys/i18n/lang',
i18nSys: '/sys/i18n',
// chart
chartList: '/visual/chart/list',
// galaxyProxy
@@ -212,7 +212,7 @@ export async function getI18n () {
const langs = dictData.map(d => d.value).join(',')
localStorage.setItem(storageKey.languages, langs)
const request = new Promise(resolve => {
get(api.i18n, { l: langs }).then(response => {
get(api.i18nLang, { l: langs }).then(response => {
response.data.cn = response.data.zh
resolve(response.data)
})

View File

@@ -58,8 +58,7 @@ import cnDataList from '@/components/table/CnDataList'
import dataListMixin from '@/mixins/data-list'
import i18nTable from '@/components/table/settings/I18nTable'
import i18nBox from '@/components/rightBox/settings/I18nBox'
import { api } from '@/utils/api'
import { put } from '@/utils/http'
import { api } from '@/utils/api'
export default {
name: 'I18n',
@@ -71,7 +70,7 @@ export default {
},
data () {
return {
url: api.i18n,
url: api.i18nSys,
blankObject: { // 空白对象
id: '',
name: '',