360b799a by 华明祺

no message

1 parent c90e9218
1 import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' 1 import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus'
2 import {useStorage} from "@vueuse/core/index";
2 3
4 const language= useStorage('language',0)
3 let loadingInstance 5 let loadingInstance
4 6
5 export default { 7 export default {
...@@ -21,19 +23,19 @@ export default { ...@@ -21,19 +23,19 @@ export default {
21 }, 23 },
22 // 弹出提示 24 // 弹出提示
23 alert(content) { 25 alert(content) {
24 return ElMessageBox.alert(content, '系统提示') 26 return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips')
25 }, 27 },
26 // 错误提示 28 // 错误提示
27 alertError(content) { 29 alertError(content) {
28 return ElMessageBox.alert(content, '系统提示', { type: 'error' }) 30 return ElMessageBox.alert(content, language.value==0 ? language.value==0 ? '系统提示' :'Tips' :'Tips', { type: 'error' })
29 }, 31 },
30 // 成功提示 32 // 成功提示
31 alertSuccess(content) { 33 alertSuccess(content) {
32 return ElMessageBox.alert(content, '系统提示', { type: 'success' }) 34 return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'success' })
33 }, 35 },
34 // 警告提示 36 // 警告提示
35 alertWarning(content) { 37 alertWarning(content) {
36 return ElMessageBox.alert(content, '系统提示', { type: 'warning' }) 38 return ElMessageBox.alert(content, language.value==0 ? '系统提示' :'Tips', { type: 'warning' })
37 }, 39 },
38 // 通知提示 40 // 通知提示
39 notify(content) { 41 notify(content) {
...@@ -53,17 +55,17 @@ export default { ...@@ -53,17 +55,17 @@ export default {
53 }, 55 },
54 // 确认窗体 56 // 确认窗体
55 confirm(content) { 57 confirm(content) {
56 return ElMessageBox.confirm(content, '系统提示', { 58 return ElMessageBox.confirm(content, language.value==0 ? '系统提示' :'Tips', {
57 confirmButtonText: '确定', 59 confirmButtonText: language.value==0 ? '确定' :'OK',
58 cancelButtonText: '取消', 60 cancelButtonText: language.value==0 ? '取消' :'Cancel',
59 type: 'warning' 61 type: 'warning'
60 }) 62 })
61 }, 63 },
62 // 提交内容 64 // 提交内容
63 prompt(content) { 65 prompt(content) {
64 return ElMessageBox.prompt(content, '系统提示', { 66 return ElMessageBox.prompt(content, language.value==0 ? '系统提示' :'Tips', {
65 confirmButtonText: '确定', 67 confirmButtonText: language.value==0 ? '确定' :'OK',
66 cancelButtonText: '取消', 68 cancelButtonText: language.value==0 ? '取消' :'Cancel',
67 type: 'warning' 69 type: 'warning'
68 }) 70 })
69 }, 71 },
......
...@@ -141,7 +141,7 @@ service.interceptors.response.use( ...@@ -141,7 +141,7 @@ service.interceptors.response.use(
141 if (code === 401) { 141 if (code === 401) {
142 if (!isRelogin.show) { 142 if (!isRelogin.show) {
143 isRelogin.show = true 143 isRelogin.show = true
144 ElMessage({ message: '登录状态已过期', type: 'error' }) 144 // ElMessage({ message: '登录状态已过期', type: 'error' })
145 // ElMessageBox.confirm( 145 // ElMessageBox.confirm(
146 // '登录状态已过期,您可以继续留在该页面,或者重新登录', 146 // '登录状态已过期,您可以继续留在该页面,或者重新登录',
147 // '系统提示', 147 // '系统提示',
......
...@@ -344,6 +344,8 @@ function afterR() { ...@@ -344,6 +344,8 @@ function afterR() {
344 query: { 344 query: {
345 matchId: matchId.value 345 matchId: matchId.value
346 } 346 }
347 }).then(()=>{
348 // location.reload()
347 }) 349 })
348 } else { 350 } else {
349 router.push({ 351 router.push({
...@@ -351,12 +353,10 @@ function afterR() { ...@@ -351,12 +353,10 @@ function afterR() {
351 params: { 353 params: {
352 id: 0 354 id: 0
353 } 355 }
356 }).then(()=>{
357 location.reload()
354 }) 358 })
355 } 359 }
356
357 setTimeout(()=>{
358 location.reload()
359 },500)
360 } 360 }
361 </script> 361 </script>
362 362
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!