fix: 登录时将langs存入sessionStorage

This commit is contained in:
chenjinsong
2021-07-23 11:19:10 +08:00
parent 6903b2f61d
commit f24f813cec
4 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
*/
import { get, post } from '@/utils/http'
import { sortByOrderNum } from '@/permission'
import {storageKey} from "@/utils/constants";
export const api = {
// 系统相关
@@ -121,6 +122,7 @@ export async function getPermission () {
export async function getI18n () {
const dictData = await getDictList()
const langs = dictData.map(d => d.value).join(',')
sessionStorage.setItem(storageKey.languages, langs)
const request = new Promise(resolve => {
get(api.i18n, { l: langs }).then(response => {
response.data.cn = response.data.zh