修改提示语
This commit is contained in:
@@ -153,6 +153,7 @@ export function downloadFile(url, fileName, parameter, callback) {
|
||||
isTrue: isTrue
|
||||
})
|
||||
return downFile(url, parameter).then((data) => {
|
||||
console.log(data)
|
||||
if (!data || data.size === 0) {
|
||||
Vue.prototype['$message'].warning('文件下载失败')
|
||||
return
|
||||
|
||||
@@ -40,7 +40,7 @@ const err = (error) => {
|
||||
}
|
||||
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||
//notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
|
||||
if (token && data.message.includes('Token失效')) {
|
||||
if ((token && data.message.includes('Token失效')) || (token && data.message.includes('token非法无效'))) {
|
||||
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
@@ -72,7 +72,7 @@ const err = (error) => {
|
||||
notification.error({ message: '系统提示', description: '网络超时' })
|
||||
break
|
||||
case 401:
|
||||
if (token && data.message.includes('Token失效')) {
|
||||
if ((token && data.message.includes('Token失效')) || (token && data.message.includes('token非法无效'))) {
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
@@ -156,6 +156,7 @@ service.interceptors.request.use(config => {
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use((response) => {
|
||||
console.log(response)
|
||||
if ((response.data.code == 401 && response.data.message.includes('token')) || (response.data.code == 401 && response.data.message.includes('Token'))) {
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
@@ -199,7 +200,7 @@ function blobToJson(data) {
|
||||
try {
|
||||
let jsonData = JSON.parse(this.result) // 说明是普通对象数据,后台转换失败
|
||||
if (jsonData.status === 500) {
|
||||
if (token && jsonData.message.includes('Token失效')) {
|
||||
if ((token && jsonData.message.includes('Token失效')) || (token && jsonData.message.includes('token非法无效'))) {
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
this.confirmLoading = false
|
||||
this.$emit('batSettingList')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -718,7 +718,7 @@
|
||||
this.confirmLoading = false
|
||||
this.$emit('editModelList')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -646,7 +646,7 @@
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -706,7 +706,7 @@
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -731,7 +731,7 @@
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user