[update] 导入请求头增加language
This commit is contained in:
@@ -57,7 +57,6 @@ export const ConfigurableTableMixin = {
|
|||||||
// type: '', // 这个字段不知道什么含义
|
// type: '', // 这个字段不知道什么含义
|
||||||
filters: {}, // 固定的搜索条件
|
filters: {}, // 固定的搜索条件
|
||||||
needFilterTableBtn: true, // 是否需要过滤没有权限的按钮
|
needFilterTableBtn: true, // 是否需要过滤没有权限的按钮
|
||||||
tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
|
|
||||||
getTableHeaderFunc: null, // 获取表头的方法
|
getTableHeaderFunc: null, // 获取表头的方法
|
||||||
tableSlotField: [], // 表格需要使用插槽的字段,dbFieldName
|
tableSlotField: [], // 表格需要使用插槽的字段,dbFieldName
|
||||||
disabledMixinsCreate: false,
|
disabledMixinsCreate: false,
|
||||||
@@ -78,7 +77,17 @@ export const ConfigurableTableMixin = {
|
|||||||
},
|
},
|
||||||
importExcelUrl () {
|
importExcelUrl () {
|
||||||
return `${window._CONFIG.domianURL}${this.url.importUrl}`
|
return `${window._CONFIG.domianURL}${this.url.importUrl}`
|
||||||
}
|
},
|
||||||
|
tokenHeader () {
|
||||||
|
const head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
|
||||||
|
let language = localStorage.getItem('language') || ''
|
||||||
|
if (!language) {
|
||||||
|
language = 'zh-cn'
|
||||||
|
}
|
||||||
|
const cut = language === 'zh-cn' ? 'zh' : 'en'
|
||||||
|
head.Language = cut
|
||||||
|
return head
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
if (this.disabledMixinsCreate) {
|
if (this.disabledMixinsCreate) {
|
||||||
|
|||||||
@@ -97,6 +97,12 @@ export const JeroListMixin = {
|
|||||||
if (tenantid) {
|
if (tenantid) {
|
||||||
head['tenant-id'] = tenantid
|
head['tenant-id'] = tenantid
|
||||||
}
|
}
|
||||||
|
let language = localStorage.getItem('language') || ''
|
||||||
|
if (!language) {
|
||||||
|
language = 'zh-cn'
|
||||||
|
}
|
||||||
|
const cut = language === 'zh-cn' ? 'zh' : 'en'
|
||||||
|
head.Language = cut
|
||||||
return head
|
return head
|
||||||
},
|
},
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
|
|||||||
+6
@@ -211,6 +211,12 @@ export default {
|
|||||||
if (tenantid) {
|
if (tenantid) {
|
||||||
head['tenant-id'] = tenantid
|
head['tenant-id'] = tenantid
|
||||||
}
|
}
|
||||||
|
let language = localStorage.getItem('language') || ''
|
||||||
|
if (!language) {
|
||||||
|
language = 'zh-cn'
|
||||||
|
}
|
||||||
|
const cut = language === 'zh-cn' ? 'zh' : 'en'
|
||||||
|
head.Language = cut
|
||||||
return head
|
return head
|
||||||
},
|
},
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
|
|||||||
+6
@@ -534,6 +534,12 @@ export default {
|
|||||||
if (tenantid) {
|
if (tenantid) {
|
||||||
head['tenant-id'] = tenantid
|
head['tenant-id'] = tenantid
|
||||||
}
|
}
|
||||||
|
let language = localStorage.getItem('language') || ''
|
||||||
|
if (!language) {
|
||||||
|
language = 'zh-cn'
|
||||||
|
}
|
||||||
|
const cut = language === 'zh-cn' ? 'zh' : 'en'
|
||||||
|
head.Language = cut
|
||||||
return head
|
return head
|
||||||
},
|
},
|
||||||
importUrl: function () {
|
importUrl: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user