360b799a by 华明祺

no message

1 parent c90e9218
import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus'
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
let loadingInstance
export default {
......@@ -21,19 +23,19 @@ export default {
},
// 弹出提示
alert(content) {
return ElMessageBox.alert(content, '系统提示')
return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips')
},
// 错误提示
alertError(content) {
return ElMessageBox.alert(content, '系统提示', { type: 'error' })
return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips', { type: 'error' })
},
// 成功提示
alertSuccess(content) {
return ElMessageBox.alert(content, '系统提示', { type: 'success' })
return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'success' })
},
// 警告提示
alertWarning(content) {
return ElMessageBox.alert(content, '系统提示', { type: 'warning' })
return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'warning' })
},
// 通知提示
notify(content) {
......@@ -53,17 +55,17 @@ export default {
},
// 确认窗体
confirm(content) {
return ElMessageBox.confirm(content, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
return ElMessageBox.confirm(content, language.value==0 ? '系统提示' :'Tips', {
confirmButtonText: language.value==0 ? '确定' :'OK',
cancelButtonText: language.value==0 ? '取消' :'Cancel',
type: 'warning'
})
},
// 提交内容
prompt(content) {
return ElMessageBox.prompt(content, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
return ElMessageBox.prompt(content, language.value==0 ? '系统提示' :'Tips', {
confirmButtonText: language.value==0 ? '确定' :'OK',
cancelButtonText: language.value==0 ? '取消' :'Cancel',
type: 'warning'
})
},
......
......@@ -141,7 +141,7 @@ service.interceptors.response.use(
if (code === 401) {
if (!isRelogin.show) {
isRelogin.show = true
ElMessage({ message: '登录状态已过期', type: 'error' })
// ElMessage({ message: '登录状态已过期', type: 'error' })
// ElMessageBox.confirm(
// '登录状态已过期,您可以继续留在该页面,或者重新登录',
// '系统提示',
......
......@@ -344,6 +344,8 @@ function afterR() {
query: {
matchId: matchId.value
}
}).then(()=>{
// location.reload()
})
} else {
router.push({
......@@ -351,12 +353,10 @@ function afterR() {
params: {
id: 0
}
}).then(()=>{
location.reload()
})
}
setTimeout(()=>{
location.reload()
},500)
}
</script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!