fix: 修复登陆,i18n bug
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
mixins: [rightBoxMixin],
|
||||
data () {
|
||||
return {
|
||||
url: api.i18nBox,
|
||||
url: api.i18nSys,
|
||||
loginName: localStorage.getItem(storageKey.username),
|
||||
rules: { // 表单校验规则
|
||||
name: [
|
||||
|
||||
@@ -70,7 +70,7 @@ export default {
|
||||
mixins: [table],
|
||||
data () {
|
||||
return {
|
||||
url: api.i18n,
|
||||
url: api.i18nLang,
|
||||
tableTitle: [ // 原始table列
|
||||
{
|
||||
label: 'ID',
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
@@ -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: '',
|
||||
|
||||
Reference in New Issue
Block a user