Skip to content

Commit

Permalink
跳转至客户端模式不再提示,修复词条页面更新但周边未更新的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFish-233 committed Sep 17, 2022
1 parent 6c52ffd commit 9da97fb
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public async Task<string> TransferDepositFile(string url)

public async Task TransferAllMainImages(int maxCount)
{
var entries = await _entryRepository.GetAll().Where(s => string.IsNullOrWhiteSpace(s.MainPicture) == false && s.MainPicture.Contains("?") == false && s.MainPicture.Contains("default") == false)
var entries = await _entryRepository.GetAll().Where(s => string.IsNullOrWhiteSpace(s.MainPicture) == false && s.IsHidden == false && string.IsNullOrWhiteSpace(s.Name) == false && s.MainPicture.Contains("?") == false && s.MainPicture.Contains("default") == false)
.OrderBy(s => s.Id)
.Take(maxCount).ToListAsync();

Expand All @@ -321,7 +321,7 @@ public async Task TransferAllMainImages(int maxCount)

}

var articles = await _articleRepository.GetAll().Where(s => string.IsNullOrWhiteSpace(s.MainPicture) == false && s.MainPicture.Contains("?") == false && s.MainPicture.Contains("default") == false)
var articles = await _articleRepository.GetAll().Where(s => string.IsNullOrWhiteSpace(s.MainPicture) == false&&s.IsHidden==false&&string.IsNullOrWhiteSpace(s.Name)==false && s.MainPicture.Contains("?") == false && s.MainPicture.Contains("default") == false)
.OrderBy(s => s.Id)
.Take(maxCount).ToListAsync();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ public async Task<ActionResult<Result>> GetBindGroupQQCodeAsync(BindGroupQQModel
[HttpGet("{id}")]
public async Task<ActionResult<UserArticleListModel>> GetUserArticles(string id)
{
var articles = await _articleRepository.GetAll().Include(s=>s.CreateUser).AsNoTracking().Where(s => s.CreateUserId == id).ToListAsync();
var articles = await _articleRepository.GetAll().Include(s=>s.CreateUser).AsNoTracking().Where(s => s.CreateUserId == id&&s.IsHidden==false&&string.IsNullOrWhiteSpace(s.Name)==false).ToListAsync();

var model =new UserArticleListModel();
foreach (var item in articles.OrderByDescending(s=>s.Id))
Expand Down
2 changes: 2 additions & 0 deletions CnGalWebSite/CnGalWebSite.APIServer/wwwroot/robot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ Disallow: /home/editrecord/
Disallow: /home/editrecord
Disallow: /account/
Disallow: /admin/

Sitemap: https://www.cngal.org/site.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@inject ToastService ToastService
@inject DialogService DialogService
@inject HttpClient Http
@inject NavigationManager NavigationManager
@inject IServiceProvider Provider
@inject IDataCacheService _dataCacheService


<MDialog @bind-Value="Dialog"
Width="600">
Expand All @@ -13,19 +12,17 @@
<MCardText>
填写微博链接后点击保存,再到列表中找到创建的动态,点击编辑,在新的窗口中确认无误后发布
</MCardText>
<MCardText>
<MTextField @bind-Value="Model.Link" Label="微博链接" Color="@_dataCacheService.ThemeSetting.Theme" />
</MCardText>

<div class="row">

<div class="form-group col-12">
<BootstrapInput @bind-Value="Model.Link" ShowLabel="true" />
</div>

</div>
<MCardActions Class="pb-6 pe-6 ps-6 pt-6">
<CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaButton Text="取消" IsAsync="true" OnClick="@(()=>Dialog=false)" Icon="mdi-close" Color="error" TextStyle/>
<MCardActions Class="pb-4 pe-6 ps-6 pt-0">
<CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaButton Text="取消" IsAsync="true" OnClick="@(()=>Dialog=false)" Icon="mdi-close" Color="error" TextStyle />

<MSpacer></MSpacer>
<CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaButton Text="保存" IsAsync="true" OnClick="OnSave" Icon="mdi-check" Color="green" TextStyle/>
<CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaButton Text="保存" IsAsync="true" OnClick="OnSave" Icon="mdi-check" Color="green" TextStyle />
</MCardActions>
</MCard>
</MDialog>
Expand Down Expand Up @@ -70,7 +67,7 @@
{

await ToastService.Success("添加微博动态成功", "添加微博动态成功");
await OnRefreshTable.InvokeAsync();
await OnRefreshTable.InvokeAsync();
Dialog = false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ else
[Parameter]
public GameOverviewPeripheriesModel Model { get; set; }

protected override async Task OnInitializedAsync()
protected override async Task OnParametersSetAsync()
{
if (EntryId > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@inject IAppHelper? _appHelper

<TitleTip NoIndex></TitleTip>
<CnGalWebSite.Shared.MasaComponent.Shared.Tips.LoginPagesRoot>
@*<CnGalWebSite.Shared.MasaComponent.Shared.Tips.LoginPagesRoot>
<style>
.swal2-icon.swal2-info {
border-color: #009ef7;
Expand All @@ -39,7 +39,7 @@
</div>
</div>
</CnGalWebSite.Shared.MasaComponent.Shared.Tips.LoginPagesRoot>
</CnGalWebSite.Shared.MasaComponent.Shared.Tips.LoginPagesRoot>*@



Expand Down Expand Up @@ -85,6 +85,14 @@
}
}

protected override async Task OnAfterRenderAsync(bool firstRender)
{
if(firstRender)
{
await OnClickLeft();
}
}

private Task OnClickLeft()
{
//处理回调
Expand Down

0 comments on commit 9da97fb

Please sign in to comment.