diff --git a/Service/Application.Web/Controllers/Pub/PubController.cs b/Service/Application.Web/Controllers/Pub/PubController.cs index 9447200..3789432 100644 --- a/Service/Application.Web/Controllers/Pub/PubController.cs +++ b/Service/Application.Web/Controllers/Pub/PubController.cs @@ -12,7 +12,8 @@ namespace Application.Web.Controllers.Pub { private readonly IAreaService _areaService; private readonly INoticeService _noticeService; - public PubController(IAreaService areaService,INoticeService noticeService) + + public PubController(IAreaService areaService, INoticeService noticeService) { _areaService = areaService; _noticeService = noticeService; @@ -24,7 +25,7 @@ namespace Application.Web.Controllers.Pub /// /// [HttpGet] - public async Task GetMain(string sid) + public async Task GetMain(string? sid) { bool isOnline = false; if (!string.IsNullOrEmpty(sid)) @@ -34,8 +35,9 @@ namespace Application.Web.Controllers.Pub var areaData = await _areaService.GetAreaData(); var notice = await _noticeService.GetNoticeDataByTake(5); - int OnCount = 100; - return PoAction.Ok(new { area = areaData ,notice,isOnline,onCount=OnCount}); + + int OnCount = 100; + return PoAction.Ok(new { area = areaData, notice, isOnline, onCount = OnCount }); } } } \ No newline at end of file diff --git a/Web/src/composables/StateHelper.ts b/Web/src/composables/StateHelper.ts index 2441ac6..442a8e6 100644 --- a/Web/src/composables/StateHelper.ts +++ b/Web/src/composables/StateHelper.ts @@ -21,4 +21,9 @@ export class StateHelper { this.userStore.setSid(sid); } + static OffOnline() + { + this.userStore.offOnline(); + } + } \ No newline at end of file diff --git a/Web/src/extends/MessageExtend.ts b/Web/src/extends/MessageExtend.ts index d8dc935..80b528d 100644 --- a/Web/src/extends/MessageExtend.ts +++ b/Web/src/extends/MessageExtend.ts @@ -8,12 +8,12 @@ export class MessageExtend { } // 提示弹窗 - static ShowDialog(message: string, title?: string) { + static ShowDialog(title: string, message: string) { showDialog({ title: title, message: message }) } // 确认提示弹窗 - static Dialog(title: string, message: string, onConfirm?: () => void, onCancel?: () => void, confirmButtonText?: string) { + static ShowConfirmDialog(title: string, message: string, onConfirm?: () => void, onCancel?: () => void, confirmButtonText?: string) { showConfirmDialog({ title: title, message: message, @@ -33,7 +33,7 @@ export class MessageExtend { showSuccessToast(text) } else if (type == 'fail') { showFailToast(text) - } else { + } else { console.log(text); showToast(text) } diff --git a/Web/src/pages/index.vue b/Web/src/pages/index.vue index 0c903c6..5890f49 100644 --- a/Web/src/pages/index.vue +++ b/Web/src/pages/index.vue @@ -1,34 +1,30 @@