This commit is contained in:
Putoo
2026-05-20 18:32:54 +08:00
parent 2c85872abd
commit 784bc66ef6
51 changed files with 1818 additions and 106 deletions

View File

@@ -1,4 +1,8 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIRedisCache_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F55e5569a0f314a0db6a665eafad446dd6800_003F9e_003F88bbb06d_003FIRedisCache_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJwtExtensions_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6b089d08a87d4ddd82371ae63e754ba05000_003F26_003Fd6433acb_003FJwtExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJwtHelper_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6b089d08a87d4ddd82371ae63e754ba05000_003Fe2_003F86047f24_003FJwtHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJwtSecurityTokenHandler_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FSourcesCache_003Ff9d3fc33fd2fba97d4e718534a67f1d3c61e492634cd51c4798ce5621f780f3_003FJwtSecurityTokenHandler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASqlSetup_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F72993acb059c49dcbba437a858c0b0942000_003F46_003F2e14505d_003FSqlSetup_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F51505665371d472f8bdbc333fa4d888cf49938_003Fdf_003F23ca03dd_003FString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F51505665371d472f8bdbc333fa4d888cf49938_003Fdf_003F23ca03dd_003FString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATokenValidationParameters_002Ecs_002Fl_003AC_0021_003FUsers_003F29055_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffbb48859ccd84b0d884ab212a4cf9fdb5f820_003F55_003F417754e1_003FTokenValidationParameters_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>

View File

@@ -1,4 +1,4 @@
using SqlSugar;
using SqlSugar;
using System;
namespace Application.Domain.Entity

View File

@@ -1,4 +1,4 @@
using SqlSugar;
using SqlSugar;
using System;
namespace Application.Domain.Entity
@@ -83,11 +83,5 @@ namespace Application.Domain.Entity
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? addTime { get; set; }
/// <summary>
/// 最后更新时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? upTime { get; set; }
}
}

View File

@@ -0,0 +1,39 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_acc
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// 海贝
/// </summary>
[SugarColumn(IsNullable = true)]
public long? cowry { get; set; }
/// <summary>
/// 金
/// </summary>
[SugarColumn(IsNullable = true)]
public long? gold { get; set; }
/// <summary>
/// 师德
/// </summary>
[SugarColumn(IsNullable = true)]
public long? teach { get; set; }
/// <summary>
/// 声望
/// </summary>
[SugarColumn(IsNullable = true)]
public long? renown { get; set; }
}
}

View File

@@ -0,0 +1,63 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_acc_log
{
/// <summary>
/// accId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 36)]
public string accId { get; set; }
/// <summary>
/// userId
/// </summary>
[SugarColumn(Length = 36, IsNullable = true)]
public string? userId { get; set; }
/// <summary>
/// accType
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? accType { get; set; }
/// <summary>
/// code
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? code { get; set; }
/// <summary>
/// name
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? name { get; set; }
/// <summary>
/// amount
/// </summary>
[SugarColumn(Length = 18, IsNullable = true)]
public decimal? amount { get; set; }
/// <summary>
/// addTime
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? addTime { get; set; }
/// <summary>
/// endTime
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? endTime { get; set; }
/// <summary>
/// remark
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? remark { get; set; }
}
}

View File

@@ -0,0 +1,63 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_attr
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// lev
/// </summary>
[SugarColumn(IsNullable = true)]
public int? lev { get; set; }
/// <summary>
/// minAtk
/// </summary>
[SugarColumn(IsNullable = true)]
public int? minAtk { get; set; }
/// <summary>
/// maxAtk
/// </summary>
[SugarColumn(IsNullable = true)]
public int? maxAtk { get; set; }
/// <summary>
/// defense
/// </summary>
[SugarColumn(IsNullable = true)]
public int? defense { get; set; }
/// <summary>
/// agility
/// </summary>
[SugarColumn(IsNullable = true)]
public int? agility { get; set; }
/// <summary>
/// upBlood
/// </summary>
[SugarColumn(IsNullable = true)]
public int? upBlood { get; set; }
/// <summary>
/// upMorale
/// </summary>
[SugarColumn(IsNullable = true)]
public int? upMorale { get; set; }
/// <summary>
/// levUpdate
/// </summary>
[SugarColumn(IsNullable = true)]
public long? levUpdate { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_blood
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// blood
/// </summary>
[SugarColumn(IsNullable = true)]
public int? blood { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_copper
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// 铜
/// </summary>
[SugarColumn(IsNullable = true)]
public long? copper { get; set; }
}
}

View File

@@ -0,0 +1,267 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_equ
{
/// <summary>
/// ueId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string ueId { get; set; }
/// <summary>
/// userId
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? userId { get; set; }
/// <summary>
/// owerId
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? owerId { get; set; }
/// <summary>
/// equId
/// </summary>
[SugarColumn(IsNullable = true)]
public int? equId { get; set; }
/// <summary>
/// equName
/// </summary>
[SugarColumn(IsNullable = true)]
public string? equName { get; set; }
/// <summary>
/// unitEquName
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? unitEquName { get; set; }
/// <summary>
/// lev
/// </summary>
[SugarColumn(IsNullable = true)]
public int? lev { get; set; }
/// <summary>
/// quality
/// </summary>
[SugarColumn(IsNullable = true)]
public int? quality { get; set; }
/// <summary>
/// qualityName
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? qualityName { get; set; }
/// <summary>
/// qualityAttr
/// </summary>
[SugarColumn(Length = 2000, IsNullable = true)]
public string? qualityAttr { get; set; }
/// <summary>
/// sex
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? sex { get; set; }
/// <summary>
/// code
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? code { get; set; }
/// <summary>
/// img
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? img { get; set; }
/// <summary>
/// sign
/// </summary>
[SugarColumn(Length = 100, IsNullable = true)]
public string? sign { get; set; }
/// <summary>
/// minAtk
/// </summary>
[SugarColumn(IsNullable = true)]
public int? minAtk { get; set; }
/// <summary>
/// maxAtk
/// </summary>
[SugarColumn(IsNullable = true)]
public int? maxAtk { get; set; }
/// <summary>
/// Defense
/// </summary>
[SugarColumn(IsNullable = true)]
public int? Defense { get; set; }
/// <summary>
/// Agility
/// </summary>
[SugarColumn(IsNullable = true)]
public int? Agility { get; set; }
/// <summary>
/// Blood
/// </summary>
[SugarColumn(IsNullable = true)]
public int? Blood { get; set; }
/// <summary>
/// Morale
/// </summary>
[SugarColumn(IsNullable = true)]
public int? Morale { get; set; }
/// <summary>
/// suitCode
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? suitCode { get; set; }
/// <summary>
/// durability
/// </summary>
[SugarColumn(IsNullable = true)]
public int? durability { get; set; }
/// <summary>
/// maxdurability
/// </summary>
[SugarColumn(IsNullable = true)]
public int? maxdurability { get; set; }
/// <summary>
/// isIntensify
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isIntensify { get; set; }
/// <summary>
/// intensifyLev
/// </summary>
[SugarColumn(IsNullable = true)]
public int? intensifyLev { get; set; }
/// <summary>
/// holeCount
/// </summary>
[SugarColumn(IsNullable = true)]
public int? holeCount { get; set; }
/// <summary>
/// opTime
/// </summary>
[SugarColumn(IsNullable = true)]
public int? opTime { get; set; }
/// <summary>
/// useEndTime
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? useEndTime { get; set; }
/// <summary>
/// weight
/// </summary>
[SugarColumn(IsNullable = true)]
public int? weight { get; set; }
/// <summary>
/// isLock
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isLock { get; set; }
/// <summary>
/// sysPrice
/// </summary>
[SugarColumn(Length = 10, IsNullable = true)]
public decimal? sysPrice { get; set; }
/// <summary>
/// canEqualUp
/// </summary>
[SugarColumn(IsNullable = true)]
public int? canEqualUp { get; set; }
/// <summary>
/// EquAttr
/// </summary>
[SugarColumn(IsNullable = true)]
public string? EquAttr { get; set; }
/// <summary>
/// EquMent
/// </summary>
[SugarColumn(IsNullable = true)]
public string? EquMent { get; set; }
/// <summary>
/// EquAwaken
/// </summary>
[SugarColumn(IsNullable = true)]
public string? EquAwaken { get; set; }
/// <summary>
/// GemMent
/// </summary>
[SugarColumn(IsNullable = true)]
public string? GemMent { get; set; }
/// <summary>
/// isDeal
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isDeal { get; set; }
/// <summary>
/// isGive
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isGive { get; set; }
/// <summary>
/// score
/// </summary>
[SugarColumn(IsNullable = true)]
public int? score { get; set; }
/// <summary>
/// start
/// </summary>
[SugarColumn(IsNullable = true)]
public int? start { get; set; }
/// <summary>
/// exp
/// </summary>
[SugarColumn(IsNullable = true)]
public int? exp { get; set; }
/// <summary>
/// startAttr
/// </summary>
[SugarColumn(IsNullable = true)]
public string? startAttr { get; set; }
/// <summary>
/// swallow
/// </summary>
[SugarColumn(IsNullable = true)]
public string? swallow { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_exp
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// exp
/// </summary>
[SugarColumn(IsNullable = true)]
public long? exp { get; set; }
/// <summary>
/// upExp
/// </summary>
[SugarColumn(IsNullable = true)]
public long? upExp { get; set; }
}
}

View File

@@ -0,0 +1,45 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_friend
{
/// <summary>
/// fId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string fId { get; set; }
/// <summary>
/// sId
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? sId { get; set; }
/// <summary>
/// mId
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? mId { get; set; }
/// <summary>
/// near
/// </summary>
[SugarColumn(IsNullable = true)]
public int? near { get; set; }
/// <summary>
/// status
/// </summary>
[SugarColumn(IsNullable = true)]
public int? status { get; set; }
/// <summary>
/// addTime
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? addTime { get; set; }
}
}

View File

@@ -0,0 +1,75 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_goods
{
/// <summary>
/// ugId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string ugId { get; set; }
/// <summary>
/// userId
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? userId { get; set; }
/// <summary>
/// goodsId
/// </summary>
[SugarColumn(IsNullable = true)]
public int? goodsId { get; set; }
/// <summary>
/// goodsName
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? goodsName { get; set; }
/// <summary>
/// lev
/// </summary>
[SugarColumn(IsNullable = true)]
public int? lev { get; set; }
/// <summary>
/// code
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? code { get; set; }
/// <summary>
/// count
/// </summary>
[SugarColumn(Length = 65, IsNullable = true)]
public decimal? count { get; set; }
/// <summary>
/// weight
/// </summary>
[SugarColumn(IsNullable = true)]
public int? weight { get; set; }
/// <summary>
/// sysPrice
/// </summary>
[SugarColumn(Length = 18, IsNullable = true)]
public decimal? sysPrice { get; set; }
/// <summary>
/// 0不可交易1可交易
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isDeal { get; set; }
/// <summary>
/// 0不可赠送 1可赠送
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isGive { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_morale
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// morale
/// </summary>
[SugarColumn(IsNullable = true)]
public long? morale { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_online
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// mapId
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? mapId { get; set; }
/// <summary>
/// ip
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? ip { get; set; }
/// <summary>
/// upTime
/// </summary>
[SugarColumn(IsNullable = true)]
public long? upTime { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_vigour
{
/// <summary>
/// 活力表
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// 当前活力
/// </summary>
[SugarColumn(IsNullable = true)]
public long? vitality { get; set; }
/// <summary>
/// 最大活力
/// </summary>
[SugarColumn(IsNullable = true)]
public long? upVitality { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(IsNullable = true)]
public string? upTime { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_weight
{
/// <summary>
/// userId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string userId { get; set; }
/// <summary>
/// onWeight
/// </summary>
[SugarColumn(IsNullable = true)]
public int? onWeight { get; set; }
/// <summary>
/// maxWeight
/// </summary>
[SugarColumn(IsNullable = true)]
public int? maxWeight { get; set; }
}
}

View File

@@ -0,0 +1,57 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Game")]
public class unit_user_weight_log
{
/// <summary>
/// logId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string logId { get; set; }
/// <summary>
/// userId
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? userId { get; set; }
/// <summary>
/// goodsId
/// </summary>
[SugarColumn(IsNullable = true)]
public int? goodsId { get; set; }
/// <summary>
/// goodsName
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? goodsName { get; set; }
/// <summary>
/// weight
/// </summary>
[SugarColumn(IsNullable = true)]
public int? weight { get; set; }
/// <summary>
/// count
/// </summary>
[SugarColumn(IsNullable = true)]
public int? count { get; set; }
/// <summary>
/// sum
/// </summary>
[SugarColumn(IsNullable = true)]
public int? sum { get; set; }
/// <summary>
/// addTime
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? addTime { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace Application.Domain.Entity;
public class MapNear
{
public string mapId { get; set; }
public string Name { get; set; }
public string positition { get; set; }
}

View File

@@ -1,4 +1,4 @@
using SqlSugar;
using SqlSugar;
using System;
namespace Application.Domain.Entity

View File

@@ -0,0 +1,69 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Resource")]
public class game_city
{
/// <summary>
/// cityId
/// </summary>
[SugarColumn(IsPrimaryKey = true)]
public int cityId { get; set; }
/// <summary>
/// cityName
/// </summary>
[SugarColumn(Length = 20, IsNullable = true)]
public string? cityName { get; set; }
/// <summary>
/// parent
/// </summary>
[SugarColumn(IsNullable = true)]
public int? parent { get; set; }
/// <summary>
/// type
/// </summary>
[SugarColumn(Length = 20, IsNullable = true)]
public string? type { get; set; }
/// <summary>
/// toMap
/// </summary>
[SugarColumn(Length = 20, IsNullable = true)]
public string? toMap { get; set; }
/// <summary>
/// 城市范围x起始坐标
/// </summary>
[SugarColumn(IsNullable = true)]
public int? x_s { get; set; }
/// <summary>
/// 城市范围x结束坐标
/// </summary>
[SugarColumn(IsNullable = true)]
public int? x_e { get; set; }
/// <summary>
/// 城市范围y起始坐标
/// </summary>
[SugarColumn(IsNullable = true)]
public int? y_s { get; set; }
/// <summary>
/// 城市范围y结束坐标
/// </summary>
[SugarColumn(IsNullable = true)]
public int? y_e { get; set; }
/// <summary>
/// sort
/// </summary>
[SugarColumn(IsNullable = true)]
public int? sort { get; set; }
}
}

View File

@@ -0,0 +1,117 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Resource")]
public class game_city_map
{
/// <summary>
/// mapId
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 20)]
public string mapId { get; set; }
/// <summary>
/// mapName
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? mapName { get; set; }
/// <summary>
/// x
/// </summary>
[SugarColumn(IsNullable = true)]
public int? x { get; set; }
/// <summary>
/// y
/// </summary>
[SugarColumn(IsNullable = true)]
public int? y { get; set; }
/// <summary>
/// code
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? code { get; set; }
/// <summary>
/// cityId
/// </summary>
[SugarColumn(IsNullable = true)]
public int? cityId { get; set; }
/// <summary>
/// isPk
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isPk { get; set; }
/// <summary>
/// show
/// </summary>
[SugarColumn(IsNullable = true)]
public int? show { get; set; }
/// <summary>
/// isHome
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isHome { get; set; }
/// <summary>
/// 是否可采集 0不可采集 2可采集
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isRes { get; set; }
/// <summary>
/// isBus
/// </summary>
[SugarColumn(IsNullable = true)]
public int? isBus { get; set; }
/// <summary>
/// retMap
/// </summary>
[SugarColumn(Length = 20, IsNullable = true)]
public string? retMap { get; set; }
/// <summary>
/// near
/// </summary>
[SugarColumn(IsNullable = true,IsJson = true)]
public List<MapNear> near { get; set; }
/// <summary>
/// tips
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? tips { get; set; }
/// <summary>
/// 是否查看附近的人0不显示 1显示
/// </summary>
[SugarColumn(IsNullable = true)]
public int? lookUser { get; set; }
/// <summary>
/// 附近人显示方式0不限制1当前区
/// </summary>
[SugarColumn(IsNullable = true)]
public int? lookArea { get; set; }
/// <summary>
/// 进入权限0不限制1验证
/// </summary>
[SugarColumn(IsNullable = true)]
public int? inRole { get; set; }
/// <summary>
/// 锁定时间
/// </summary>
[SugarColumn(IsNullable = true)]
public int? lockTime { get; set; }
}
}

View File

@@ -0,0 +1,57 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Resource")]
public class game_city_map_res
{
/// <summary>
/// 资源id
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string resId { get; set; }
/// <summary>
/// 地图id
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? mapId { get; set; }
/// <summary>
/// 资源名称
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? resName { get; set; }
/// <summary>
/// 对应物品ID
/// </summary>
[SugarColumn(IsNullable = true)]
public int? goodsId { get; set; }
/// <summary>
/// 获取资源数量
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? count { get; set; }
/// <summary>
/// 采集需要数量
/// </summary>
[SugarColumn(IsNullable = true)]
public int? needVigour { get; set; }
/// <summary>
/// 成功率
/// </summary>
[SugarColumn(Length = 18, IsNullable = true)]
public decimal? okRadio { get; set; }
/// <summary>
/// 采集锁定时间
/// </summary>
[SugarColumn(IsNullable = true)]
public int? gatherTime { get; set; }
}
}

View File

@@ -0,0 +1,63 @@
using SqlSugar;
using System;
namespace Application.Domain.Entity
{
[Tenant("Kg.SeaTime.Resource")]
public class game_city_npc
{
/// <summary>
/// npcId
/// </summary>
[SugarColumn(IsPrimaryKey = true)]
public int npcId { get; set; }
/// <summary>
/// areaId
/// </summary>
[SugarColumn(Length = 255, IsNullable = true)]
public string? areaId { get; set; }
/// <summary>
/// mapId
/// </summary>
[SugarColumn(Length = 20, IsNullable = true)]
public string? mapId { get; set; }
/// <summary>
/// npcName
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? npcName { get; set; }
/// <summary>
/// tips
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? tips { get; set; }
/// <summary>
/// code
/// </summary>
[SugarColumn(Length = 50, IsNullable = true)]
public string? code { get; set; }
/// <summary>
/// story
/// </summary>
[SugarColumn(IsNullable = true)]
public string? story { get; set; }
/// <summary>
/// status
/// </summary>
[SugarColumn(IsNullable = true)]
public int? status { get; set; }
/// <summary>
/// bus
/// </summary>
[SugarColumn(IsNullable = true)]
public string? bus { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
using SqlSugar;
using SqlSugar;
using System;
namespace Application.Domain.Entity

View File

@@ -2,3 +2,4 @@
global using SqlSugar;
global using Application.Domain.Entity;
global using Photon.Core.Redis;
global using Photon.Core.Assist;

View File

@@ -0,0 +1,21 @@
namespace Application.Domain;
public interface IGameMapService
{
#region
Task<game_city> GetCityInfo(int cityId);
Task<game_city_map> GetMapInfo(string mapId);
Task<int> GetMapCityByMapId(string mapId);
Task<List<game_city_npc>> GetMapNpc(string mapId);
Task<game_city_npc> GetNpcInfo(int npcId);
#endregion
#region
Task<string> GetUserOnMapId(string userId);
Task<unit_user_online> GetUserOnMap(string userId);
Task UpdateUserOnMap(string userId, string ip, string mapId);
#endregion
}

View File

@@ -9,6 +9,7 @@ public interface IUnitUserService
Task<unit_user> GetUserInfoByUserNo(string userNo);
Task<unit_user> GetUserInfoByToken(string token);
#endregion
#region

View File

@@ -0,0 +1,128 @@
namespace Application.Domain;
public class GameMapService : IGameMapService, ITransient
{
private readonly ISqlSugarClient _dbClient;
private readonly IRedisCache _redisClient;
public GameMapService(ISqlSugarClient dbClient, IRedisCache redisClient)
{
_dbClient = dbClient;
_redisClient = redisClient;
}
#region
public async Task<game_city> GetCityInfo(int cityId)
{
string key = string.Format(BaseCache.BaseCacheKeys, "MapCityData", "CityData");
var data = await _redisClient.GetHashAsync<game_city>(key, cityId.ToString());
if (data == null)
{
var db = _dbClient.AsTenant().GetConnectionWithAttr<game_city>();
data = await db.Queryable<game_city>().Where(it => it.cityId == cityId).SingleAsync();
await _redisClient.AddHashAsync(key, cityId.ToString(), data);
}
return data;
}
public async Task<game_city_map> GetMapInfo(string mapId)
{
string key = string.Format(BaseCache.BaseCacheKeys, "MapCityData", "MapData");
var data = await _redisClient.GetHashAsync<game_city_map>(key, mapId);
if (data == null)
{
var db = _dbClient.AsTenant().GetConnectionWithAttr<game_city_map>();
data = await db.Queryable<game_city_map>().Where(it => it.mapId == mapId).SingleAsync();
await _redisClient.AddHashAsync(key, mapId, data);
}
return data;
}
public async Task<int> GetMapCityByMapId(string mapId)
{
var data = await GetMapInfo(mapId);
if (data != null)
{
return (int)data.cityId;
}
else
{
return 0;
}
}
public async Task<List<game_city_npc>> GetMapNpc(string mapId)
{
string key = string.Format(BaseCache.BaseCacheKeys, "MapCityData", "NpcData");
var data = await _redisClient.GetHashAsync<List<game_city_npc>>(key, mapId);
if (data == null)
{
var db = _dbClient.AsTenant().GetConnectionWithAttr<game_city_npc>();
data = await db.Queryable<game_city_npc>().Where(it => it.mapId == mapId && it.status == 1).ToListAsync();
await _redisClient.AddHashAsync(key, mapId, data);
}
return data;
}
public async Task<game_city_npc> GetNpcInfo(int npcId)
{
string key = string.Format(BaseCache.BaseCacheKeys, "MapCityData", "NpcInfo");
var data = await _redisClient.GetHashAsync<game_city_npc>(key, npcId.ToString());
if (data == null)
{
var db = _dbClient.AsTenant().GetConnectionWithAttr<game_city_npc>();
data = await db.Queryable<game_city_npc>().Where(it => it.npcId == npcId).SingleAsync();
await _redisClient.AddHashAsync(key, npcId.ToString(),data);
}
return data;
}
#endregion
#region
public async Task<string> GetUserOnMapId(string userId)
{
var data = await GetUserOnMap(userId);
if (data == null)
{
return "16_27";
}
return data.mapId;
}
public async Task<unit_user_online> GetUserOnMap(string userId)
{
string key = string.Format(UserCache.BaseCacheKey, "UserOnline");
if (await _redisClient.HExistsHashAsync(key, userId))
{
return await _redisClient.GetHashAsync<unit_user_online>(key, userId);
}
var db = _dbClient.AsTenant().GetConnectionWithAttr<unit_user_online>();
var data = await db.Queryable<unit_user_online>().Where(it => it.userId == userId).SingleAsync();
await _redisClient.AddHashAsync(key, userId, data);
return data;
}
public async Task UpdateUserOnMap(string userId, string ip, string mapId)
{
unit_user_online onLine = new unit_user_online();
onLine.userId = userId;
onLine.mapId = mapId;
onLine.ip = ip;
onLine.upTime = TimeAssist.GetTimeStampNum;
string key = string.Format(UserCache.BaseCacheKey, "UserOnline");
if (await _redisClient.AddHashAsync(key, userId, onLine))
{
var db = _dbClient.AsTenant().GetConnectionWithAttr<unit_user_online>();
await db.Updateable<unit_user_online>(onLine).ExecuteCommandAsync();
}
}
#endregion
}

View File

@@ -14,11 +14,13 @@ public class UnitUserService : IUnitUserService, ITransient
}
#region
public async Task<List<unit_user>> GetUserDataByAccId(string accId)
{
var db = _dbClient.AsTenant().GetConnectionWithAttr<unit_user>();
return await db.Queryable<unit_user>().Where(it => it.accId == accId).ToListAsync();
}
public async Task<unit_user> GetUserInfoByUserId(string userId)
{
string key = string.Format(UserCache.BaseCacheKeys, "UserInfo", "UserId");
@@ -35,6 +37,7 @@ public class UnitUserService : IUnitUserService, ITransient
return data;
}
public async Task<unit_user> GetUserInfoByUserNo(string userNo)
{
string key = string.Format(UserCache.BaseCacheKeys, "UserInfo", "UserNo");
@@ -68,6 +71,7 @@ public class UnitUserService : IUnitUserService, ITransient
return data;
}
private async Task ClearUserInfo(int type, string id)
{
unit_user result = new unit_user();
@@ -81,17 +85,17 @@ public class UnitUserService : IUnitUserService, ITransient
result = await GetUserInfoByToken(id);
break;
}
await _redisClient.DelHashAsync(string.Format(UserCache.BaseCacheKeys, "UserInfo", "UserId"), result.userId);
await _redisClient.DelHashAsync(string.Format(UserCache.BaseCacheKeys, "UserInfo", "UserNo"), result.userNo);
await _redisClient.DelHashAsync(string.Format(UserCache.BaseCacheKeys, "UserInfo", "Sid"), result.token);
}
#endregion
#region
public async Task<unit_user> Register(int areaId, string accId)
{
unit_user result = new unit_user();
@@ -114,7 +118,6 @@ public class UnitUserService : IUnitUserService, ITransient
result.regOk = 0;
result.isSystem = 0;
result.addTime = DateTime.Now;
result.upTime = DateTime.Now;
bool isok = db.Insertable(result).ExecuteCommand() > 0;
if (!isok)
{
@@ -131,6 +134,7 @@ public class UnitUserService : IUnitUserService, ITransient
return result;
}
public async Task<bool> RegisterUserInfo(string userId, string nick, string sex)
{
var db = _dbClient.AsTenant().GetConnectionWithAttr<unit_user>();
@@ -140,17 +144,74 @@ public class UnitUserService : IUnitUserService, ITransient
.Where(it => it.userId == userId).ExecuteCommandAsync() > 0;
if (result)
{
//注册配置信息
await ClearUserInfo(0, userId);//清理个人信息表缓存
//注册账户
unit_user_acc acc = new unit_user_acc();
acc.userId = userId;
acc.cowry = 0;
acc.gold = 0;
acc.teach = 0;
acc.renown = 0;
db.Insertable(acc).AddQueue();
//注册游戏货币
unit_user_copper copper = new unit_user_copper();
copper.userId = userId;
copper.copper = 0;
db.Insertable(copper).AddQueue();
//注册个人基础属性
unit_user_attr userAttr = GameTool.GetAttrData(1);
userAttr.userId = userId;
db.Insertable(userAttr).AddQueue();
//注册个人血量
unit_user_blood blood = new unit_user_blood();
blood.userId = userId;
blood.blood = userAttr.upBlood;
db.Insertable(blood).AddQueue();
//注册士气
unit_user_morale morale = new unit_user_morale();
morale.userId = userId;
morale.morale = userAttr.upMorale;
db.Insertable(morale).AddQueue();
//注册等级经验
unit_user_exp exp = new unit_user_exp();
exp.userId = userId;
exp.exp = 0;
exp.upExp = GameTool.GetUserUpExp(1);
db.Insertable(exp).AddQueue();
//注册负重
unit_user_weight weight = new unit_user_weight();
weight.userId = userId;
weight.onWeight = 0;
weight.maxWeight = 100;
db.Insertable(weight).AddQueue();
//注册活力
unit_user_vigour vitality = new unit_user_vigour();
vitality.userId = userId;
vitality.vitality = 50;
vitality.upVitality = 50;
vitality.upTime = TimeAssist.GetDateTimeYMDString(0);
db.Insertable(vitality).AddQueue();
//注册在线
unit_user_online online = new unit_user_online();
online.userId = userId;
online.ip = "";
online.mapId = "16_27";
online.upTime = TimeAssist.GetTimeStampNum;
db.Insertable(online).AddQueue();
await db.SaveQueuesAsync(false);
await ClearUserInfo(0, userId);
}
return result;
}
private async Task<int> GetUserNo()
{
int No = 0;

View File

@@ -0,0 +1,41 @@
using Photon.Core.Assist;
namespace Application.Domain;
public class GameTool
{
/// <summary>
/// 获取等级基础属性
/// </summary>
/// <param name="lev"></param>
/// <returns></returns>
public static unit_user_attr GetAttrData(int lev)
{
unit_user_attr data = new unit_user_attr();
data.lev = lev;
data.minAtk = lev + 2;
data.maxAtk = lev + Convert.ToInt32(lev * 0.05) + 4;
data.defense = lev;
data.agility = lev;
data.upBlood = ((lev - 1) * 5) + 80;
data.upMorale = 100 + (lev / 5) * 10;
data.levUpdate = TimeAssist.GetTimeStampNum;
return data;
}
/// <summary>
/// 获取等级升级经验
/// </summary>
/// <param name="lev"></param>
/// <returns></returns>
public static long GetUserUpExp(int lev)
{
long result = 50 * ((lev * lev * lev) + (5 * lev)) - 80;
return result;
}
public static bool AreaVerify( int area,string areas)
{
List<string> onArea = new List<string>() {"0",area.ToString() };
return onArea.Any(it => areas.Contains(it));
}
}

View File

@@ -0,0 +1,55 @@
using System.IdentityModel.Tokens.Jwt;
using System.Text;
using Microsoft.IdentityModel.Tokens;
namespace Application.Service.Pub;
public class JwtTool
{
public static async Task<TokenValidationResult> ParseWithValidationAsync(
string jwtToken,
TokenValidationParameters validationParameters)
{
if (string.IsNullOrWhiteSpace(jwtToken))
throw new ArgumentNullException(nameof(jwtToken));
if (validationParameters == null)
throw new ArgumentNullException(nameof(validationParameters));
var handler = new JwtSecurityTokenHandler();
// 异步验证并解析
return await handler.ValidateTokenAsync(jwtToken, validationParameters);
}
public static async Task<JwtSecurityToken?> ParseWithSecretKeyAsync(string jwtToken, string secretKey)
{
var validationParams = new TokenValidationParameters
{
// 必须配置:密钥
IssuerSigningKey = (SecurityKey) new SymmetricSecurityKey(Encoding.ASCII.GetBytes(secretKey)),
// 验证签名(必须开启)
ValidateIssuerSigningKey = true,
// 根据你的 JWT 配置开启/关闭
ValidateIssuer = false, // 是否验证签发者
ValidateAudience = false, // 是否验证受众
ValidateLifetime = false // 是否验证过期时间(默认开启)
};
var result = await ParseWithValidationAsync(jwtToken, validationParams);
return result.IsValid ? result.SecurityToken as JwtSecurityToken : null;
}
public static async Task< object> GetJwtData(string jwtToken, string secretKey,string key)
{
var token = await ParseWithSecretKeyAsync(jwtToken,secretKey);
var data = token.Payload;
if (data.TryGetValue(key, out object result))
{
return result;
}
return null;
}
}

View File

@@ -0,0 +1,25 @@
namespace Application.Web;
public class ComHelper
{
public static string GetClientUserIp(HttpContext context)
{
var ip = context.Request.Headers["X-Forwarded-For"].FirstOrDefault();
if (string.IsNullOrEmpty(ip))
{
ip = context.Connection.RemoteIpAddress.ToString();
ip = ip.Replace("::ffff:", "");
}
if (ip.Contains(","))
{
ip = ip.Split(',')[0];
}
//var ip = context.Request.Cookies["kxUserIp"];
//if (string.IsNullOrEmpty(ip))
//{
// ip = "0.0.0.0";
//}
return ip;
}
}

View File

@@ -18,12 +18,20 @@
return token.Claims["userId"];
}
}
public static string sid
public static string accId
{
get
{
var token = App.HttpContext.GetTokenInfo();
return token.Claims["token"];
return token.Claims["accId"];
}
}
public static int areaId
{
get
{
var token = App.HttpContext.GetTokenInfo();
return Convert.ToInt32(token.Claims["areaId"]) ;
}
}
}

View File

@@ -154,6 +154,11 @@ namespace Application.Web.Controllers.Login
return PoAction.Message("当前区繁忙,无法进入!");
}
if (areaInfo.opTime > DateTime.Now)
{
return PoAction.Message("暂未开放本区服!");
}
//判断是否已经注册
var userData = await _userService.GetUserDataByAccId(accInfo.accId);
if (userData.Any(it => it.areaId == area))
@@ -170,7 +175,7 @@ namespace Application.Web.Controllers.Login
Dictionary<string, object> loadData = new Dictionary<string, object>();
loadData.Add("userId", userInfo.userId);
loadData.Add("accId", userInfo.accId);
loadData.Add("areaId", userInfo.areaId);
string Key = App.Configuration["JwtTokenOptions:SecurityKey"].ToString();
string Issuer = App.Configuration["JwtTokenOptions:Issuer"].ToString();
string Audience = App.Configuration["JwtTokenOptions:Audience"].ToString();
@@ -222,7 +227,7 @@ namespace Application.Web.Controllers.Login
Dictionary<string, object> loadData = new Dictionary<string, object>();
loadData.Add("userId", userInfo.userId);
loadData.Add("accId", userInfo.accId);
loadData.Add("areaId", userInfo.areaId);
string Key = App.Configuration["JwtTokenOptions:SecurityKey"].ToString();
string Issuer = App.Configuration["JwtTokenOptions:Issuer"].ToString();
string Audience = App.Configuration["JwtTokenOptions:Audience"].ToString();
@@ -242,12 +247,14 @@ namespace Application.Web.Controllers.Login
string Key = App.Configuration["JwtTokenOptions:SecurityKey"].ToString();
string Issuer = App.Configuration["JwtTokenOptions:Issuer"].ToString();
string Audience = App.Configuration["JwtTokenOptions:Audience"].ToString();
var data = JwtHelper.GetTokenPload(parms.token,Key);
string accId = string.Empty;
if (data.TryGetValue("accId", out object _accId))
var tokenData = await JwtTool.GetJwtData(parms.token, Key, "accId");
if (tokenData != null)
{
accId = _accId.ToString();
accId = tokenData.ToString();
}
var userInfo = await _userService.GetUserInfoByToken(parms.refToken);
if (userInfo == null)
{
@@ -258,9 +265,11 @@ namespace Application.Web.Controllers.Login
{
return PoAction.Message("刷新失败,数据信息不合法!");
}
Dictionary<string, object> loadData = new Dictionary<string, object>();
loadData.Add("userId", userInfo.userId);
loadData.Add("accId", userInfo.accId);
loadData.Add("areaId", userInfo.areaId);
string token = JwtHelper.CreateToken(Key, Issuer, Audience, loadData, TokenConfig.TokenTime);
return PoAction.Ok(new
{ token = token, refToken = userInfo.token, userId = userInfo.userId });
@@ -284,6 +293,7 @@ namespace Application.Web.Controllers.Login
{
return PoAction.Message("昵称需要1-12字符之间哦!");
}
string sex = parms.sex == 0 ? "女" : "男";
string userId = StateHelper.userId;
var userInfo = await _userService.GetUserInfoByUserId(userId);

View File

@@ -0,0 +1,61 @@
using Microsoft.AspNetCore.Mvc;
namespace Application.Web.Controllers.Map;
/// <summary>
/// 地图接口
/// </summary>
[ApiExplorerSettings(GroupName = "Map")]
[Route("Map/[controller]/[action]")]
[ApiController]
[Authorize]
public class MapController : ControllerBase
{
private readonly IUnitUserService _userService;
private readonly IGameMapService _mapService;
public MapController(IUnitUserService userService, IGameMapService mapService)
{
_userService = userService;
_mapService = mapService;
}
/// <summary>
/// 获取地图主页信息
/// </summary>
/// <param name="map"></param>
/// <returns></returns>
[HttpGet]
public async Task<IPoAction> GetMapData(string? map)
{
string userId = StateHelper.userId;
var onMap = await _mapService.GetUserOnMap(userId);
game_city_map mapInfo = new game_city_map();
if (string.IsNullOrEmpty(map))
{
mapInfo = await _mapService.GetMapInfo(onMap.mapId);
}
else
{
mapInfo = await _mapService.GetMapInfo(map);
}
//NPC信息
var npcData = await _mapService.GetMapNpc(mapInfo.mapId);
npcData = npcData.FindAll(it => GameTool.AreaVerify(StateHelper.areaId,it.areaId));
//城市信息
var cityInfo = await _mapService.GetCityInfo((int)mapInfo.cityId);
#region 线
string ip = ComHelper.GetClientUserIp(HttpContext);
await _mapService.UpdateUserOnMap(userId, ip, mapInfo.mapId);
#endregion
object ret = new { mapInfo, cityInfo, npcData };
return PoAction.Ok(ret);
}
}

View File

@@ -28,6 +28,12 @@ groups.Add("User", new OpenApiInfo
Version = "v1",
Description = "航海时代用户相关接口。",
});
groups.Add("Map", new OpenApiInfo
{
Title = "用户地图文档",
Version = "v1",
Description = "航海时代用户地图相关接口。",
});
builder.Services.InjectJwt(builder.Configuration, new OpenApiInfo
{
@@ -94,7 +100,8 @@ if (app.Environment.IsDevelopment())
#region swagger配置
app.UseJwtSwagger("swagger", "航海时代接口文档",new List<JwtGroupConfig> {
new JwtGroupConfig(){ groupId="Login", groupName="登录接口文档"},
new JwtGroupConfig(){ groupId="User", groupName="用户接口文档"}
new JwtGroupConfig(){ groupId="User", groupName="用户接口文档"},
new JwtGroupConfig(){ groupId="Map", groupName="用户地图文档"}
});
#endregion

View File

@@ -1,7 +1,12 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
srcDir: 'src/',
components: {
dirs: [
// 自动递归 components 下所有子文件夹
{ path: '~/components', pathPrefix: false }
]
},
future: {
compatibilityVersion: 4,
},

View File

@@ -1,5 +1,5 @@
<template>
<button class="but" @click="handleClick">
<button class="kx-link-button" @click="handleClick">
<slot></slot>
</button>
</template>
@@ -15,7 +15,7 @@ const handleClick = (): any => {
<style>
.but {
.kx-link-button {
/* text-decoration: underline; */
color: #1e5494;
font-size: 18px;
@@ -23,7 +23,7 @@ const handleClick = (): any => {
background: none;
border: none;
}
.but:hover{
.kx-link-button:hover{
color: #FFFFFF;
background: #1e5494;
}

View File

@@ -0,0 +1,26 @@
<template>
<Abutton @click="handleClick" v-if="onValue != onCheak">
<slot></slot>
</Abutton>
<span v-if="onValue == onCheak">
<slot></slot>
</span>
</template>
<script lang="ts" setup>
// 1. 定义接收父组件传来的参数 props
const props = defineProps({
// 字段名、类型、默认值
href: String,
onValue: String,
onCheak: String
})
const emit = defineEmits(['click'])
// 定义 click 事件
const handleClick = (): any => {
emit('click')
}
</script>

View File

@@ -0,0 +1,23 @@
<template>
<div class="clear"></div>
<div class="foot">
<div class="common">
<Abar href="/">首页</Abar>-
<Abar href="/">挂机</Abar>-
<a target="_blank" href="https://work.weixin.qq.com/kfid/kfc86bc348120aea3e7">反馈</a>
</div>
<div class="timeService">
小G报时({{ timeTips }})
</div>
<p style="font-weight:bold;font-size:14px">官方QQ群931835791</p>
</div>
</template>
<script setup>
const timeTips = ref(TimeExtend.Now("HH:mm"));
onMounted(() => {
setInterval(() => {
timeTips.value = TimeExtend.Now("HH:mm");
}, 1000)
})
</script>

View File

@@ -0,0 +1,17 @@
<template>
<div class="common">
<Abar href="/">状态</Abar>.
<Abar href="/">物品</Abar>.
<Abar href="/chat">聊天</Abar>
</div>
<div class="common">
<Abar href="/">好友</Abar>.
<Abar href="/">宠物</Abar>.
<Abar href="/">队伍</Abar>
</div>
<div class="common">
<Abar href="/">商城</Abar>.
<Abar href="/">活动</Abar>.
<Abar href="/">排行</Abar>
</div>
</template>

View File

@@ -31,7 +31,6 @@ export class ApiService {
}
private static redirectToLogin() {
this.userStore.offOnline();
window.location.href = "/";
}

View File

@@ -0,0 +1,72 @@
export class TimeExtend {
/**
* 格式化日期
* @param date 日期对象/时间戳/日期字符串
* @param format 格式化模板
* 示例yyyy-MM-dd、yyyy-MM-dd HH:mm:ss、HH:mm:ss、yyyy年MM月dd日
*/
public static Format(date: Date | string | number, format = 'yyyy-MM-dd HH:mm:ss'): string {
let targetDate: Date
if (typeof date === 'number') {
targetDate = date.toString().length === 10 ? new Date(date * 1000) : new Date(date)
} else {
targetDate = new Date(date)
}
if (isNaN(targetDate.getTime())) return ''
const year = targetDate.getFullYear()
const month = targetDate.getMonth() + 1
const day = targetDate.getDate()
const hours = targetDate.getHours()
const minutes = targetDate.getMinutes()
const seconds = targetDate.getSeconds()
const pad = (num: number) => num.toString().padStart(2, '0')
return format
.replace('yyyy', String(year))
.replace('MM', pad(month))
.replace('dd', pad(day))
.replace('HH', pad(hours))
.replace('hh', pad(hours > 12 ? hours - 12 : hours))
.replace('mm', pad(minutes))
.replace('ss', pad(seconds))
}
/**
* 获取当前时间格式化字符串
* @param format 格式
*/
public static Now(format = 'yyyy-MM-dd HH:mm:ss'): string {
return this.Format(new Date(), format)
}
/**
* 获取当前毫秒时间戳
*/
public static GetTimeStamp(): number {
return Date.now()
}
/**
* 获取当前秒级时间戳
*/
public static GetSecondStamp(): number {
return Math.floor(Date.now() / 1000)
}
/**
* 获取当前日期 yyyy-MM-dd
*/
public static GetDateStr(): string {
return this.Now('yyyy-MM-dd')
}
/**
* 获取当前时分秒 HH:mm:ss
*/
public static GetTimeStr(): string {
return this.Now('HH:mm:ss')
}
}

View File

@@ -6,19 +6,7 @@
<button class="btn btn-ret" @click="GoBack">返回</button><br />
<Abar href="/map">返回游戏</Abar>
</div>
<div class="clear"></div>
<div class="foot">
<div class="common">
<Abar href="/">首页</Abar>-
<Abar href="/">挂机</Abar>-
<a target="_blank" href="https://work.weixin.qq.com/kfid/kfc86bc348120aea3e7">反馈</a>
</div>
<div class="timeService">
小G报时({{ TimeExtend.Now("HH:mm") }})
</div>
<p style="font-weight:bold;font-size:14px">官方QQ群931835791</p>
</div>
<Footer></Footer>
</template>
<script setup lang="ts">

View File

@@ -0,0 +1,51 @@
<template>
<div class="contet">
聊天频道. <Abutton @click="Refresh">刷新</Abutton><br />
<Abar href="/news">*更新内容早知道</Abar>
</div>
<div class="title">
<Acheak @click="BindData('')" :on-value="type" on-cheak="">公共</Acheak>.
<Acheak @click="BindData('1')" :on-value="type" on-cheak="1">队伍</Acheak>.
<Acheak @click="BindData('2')" :on-value="type" on-cheak="2">帮派</Acheak>.
<Acheak @click="BindData('3')" :on-value="type" on-cheak="3">全区</Acheak>.
<Acheak @click="BindData('4')" :on-value="type" on-cheak="4">系统</Acheak>.
<Acheak @click="BindData('5')" :on-value="type" on-cheak="5">全服</Acheak>
</div>
<div class="chat">
<div class="item">
暂无发言.
</div>
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: layout.default,
middleware: 'page-loading'
})
const type = ref('');
onMounted(async () => {
try {
await BindData(type.value);
}
finally {
PageLoading.Close();
}
})
const BindData = async (typeid: string): Promise<void> => {
if (type.value != typeid) {
type.value = typeid;
}
};
/**刷新 */
const Refresh = async (): Promise<void> => {
MessageExtend.LoadingToast("刷新中...");
await BindData(type.value);
MessageExtend.LoadingClose();
MessageExtend.Notify("刷新成功!", "success");
PageExtend.ScrollToTop();
}
</script>

View File

@@ -69,7 +69,7 @@
</div>
<div class="foot">
<div class="timeService">
小G报时(18:33)
小G报时({{ TimeExtend.Now("HH:mm") }})
</div>
</div>
</template>

View File

@@ -3,24 +3,22 @@
<span>[在线奖励]:3分钟后可领取.</span>
</div>
<div class="content">
威尼斯&#xB7;广场
{{ cityInfo.cityName }}·{{ mapInfo.mapName }}
<Abutton @click="Refresh">刷新</Abutton>
<a class="a-nomargin"
href="/Task/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">任务</a><a class=""
href="/Message/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">消息</a>
<Abar href="">任务</Abar>
<Abar href="">消息</Abar>
</div>
<div class="content" style="font-size:14px;font-weight:bold;color:dodgerblue">
</div>
<div class="notification">
<div class="chat">
<div class="item">
[公共]
<span><img src='http://gree.pccsh.com/res/badge/9001.gif' class='user-head' alt='头像' /><a class='a-nodec'
href='/User/Index/Home/250822?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo'><span
class='Nick-Gold'>   航海百曉生    </span></a><img src='http://gree.pccsh.com/res/badge/9001.gif' alt='vip'
class='vip' />&nbsp;<span class='icon-cry'><i class='icon-crystal liangHao'></i></span><img
src='http://gree.pccsh.com/res/badge/9001.gif' alt='心愿星河' class='badge' />&nbsp;</span>
<span><img src='http://gree.pccsh.com/res/badge/9001.gif' class='user-head' alt='头像' /><a
class='a-nodec' href='/User/Index/Home/250822?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo'><span
class='Nick-Gold'>   航海百曉生    </span></a><img src='http://gree.pccsh.com/res/badge/9001.gif'
alt='vip' class='vip' />&nbsp;<span class='icon-cry'><i
class='icon-crystal liangHao'></i></span><img src='http://gree.pccsh.com/res/badge/9001.gif'
alt='心愿星河' class='badge' />&nbsp;</span>
:
<span class=''>出身上天魔套15复仇8白副手10块白四象5块4级审判20一套5级房子材料20</span>
</div>
@@ -39,65 +37,46 @@
</a>
</div>
<div class="content">
<div class="item"><a href='/Task/Npc/Index?npc=1101006&sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo'>巴萨尼奥</a></div>
<div class="item"><a href='/Map/Npc/Index?npc=1101016&sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo'>海精灵(福利)</a></div>
<div class="item"><a href='/Map/Npc/Index?npc=1101061&sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo'>战场指挥官(攻城)</a></div>
<div class="item"><a href='/Map/Npc/Index?npc=1101064&sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo'>欧若拉(主神)</a></div>
<div class="item" v-for="item in npcData">
<Abar href="">{{item.npcName}}{{item.tips}}</Abar>
</div>
</div>
<div class="content">
</div>
<div class="content">
请选择出口:<br />
<span v-if="mapDong.mapId != ''">东:<Abutton @click="BindData(mapDong.mapId)">{{ mapDong.name }}</Abutton></span>
<span v-if="mapXi.mapId != ''">西:<Abutton @click="BindData(mapXi.mapId)">{{ mapXi.name }}</Abutton></span>
<br v-if="mapDong.mapId != '' || mapXi.mapId != ''">
<span v-if="mapNan.mapId != ''">南:<Abutton @click="BindData(mapNan.mapId)">{{ mapNan.name }}</Abutton></span>
<span v-if="mapBei.mapId != ''">北:<Abutton @click="BindData(mapBei.mapId)">{{ mapBei.name }}</Abutton></span>
</div>
<div class="content">请选择出口:<br /><a
href='/Map/17_27?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo&_r=YA9mrXPxwRpy'>市场</a>&nbsp;&nbsp;西<a
href='/Map/15_27?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo&_r=YA9mrXPxwRpy'>教堂</a>&nbsp;&nbsp;<br /><a
href='/Map/16_28?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo&_r=YA9mrXPxwRpy'>银行</a>&nbsp;&nbsp;<a
href='/Map/16_26?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo&_r=YA9mrXPxwRpy'>珠宝店</a>&nbsp;&nbsp;</div>
<div class="content">
<a class="" href="/Map/Index/MapCity/16_27?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">城内地图</a>.<a class=""
href="/Business/Help/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">帮助</a>.<a class=""
href="/Privilege/Purdiam/MapTo?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">传送</a><br />
<div style="font-size:16px;line-height:16px;">
当前坐标X-16&nbsp;&nbsp;Y-27
</div>
</div>
<div class="content">
每逢节假日来找海精灵有惊喜
{{ mapInfo.tips }}
</div>
<div class="content">
<div class="common">
<a class="" href="/User/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">状态</a>. <a class=""
href="/Bag/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">物品</a>. <a class=""
href="/Chat/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">聊天</a>
</div>
<div class="common">
<a class="" href="/Friend/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">好友</a>. <a class=""
href="/Pet/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">宠物</a>. <a class=""
href="/Team/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">队伍</a>
</div>
<div class="common">
<a class="" href="/Mall/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">商城</a>. <a class=""
href="/Bus/Proffer/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">神殿</a>. <a class=""
href="/Business/Market/Act?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">活动</a>
</div>
<div class="common">
<a class="" href="/Act/Kill/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">天榜</a>. <a class=""
href="/Act/Sky/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">赛事</a>. <a class=""
href="/Rank/Index/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">排行</a>
</div>
<MapMenu></MapMenu>
</div>
<Footer></Footer>
</template>
<script setup lang="ts">
definePageMeta({
layout: layout.default,
layout: layout.empty,
middleware: 'page-loading'
})
const mapInfo = ref<any>({});
const cityInfo = ref<any>({});
const npcData = ref<Array<any>>([]);
onMounted(async () => {
try {
await BindData();
await BindData("");
}
finally {
PageLoading.Close();
@@ -105,20 +84,40 @@ onMounted(async () => {
})
/**加载方法 */
const BindData = async (): Promise<void> => {
const BindData = async (map: string): Promise<void> => {
let result = await MapService.GetMapData(map);
if (result.code == 0) {
mapInfo.value = result.data.mapInfo;
cityInfo.value = result.data.cityInfo;
npcData.value = result.data.npcData;
MapVent(result.data.mapInfo.near);
console.log(result.data);
}
else {
MessageExtend.ShowDialog("异常错误", result.msg);
}
};
/**刷新 */
const Refresh = async (): Promise<void> => {
MessageExtend.LoadingToast("刷新中...");
await BindData();
window.setTimeout(() => {
await BindData("");
MessageExtend.LoadingClose();
MessageExtend.Notify("刷新成功!", "success");
}, 1000)
}
/**渲染出口 */
const mapDong = ref<any>({});
const mapXi = ref<any>({});
const mapNan = ref<any>({});
const mapBei = ref<any>({});
const MapVent = (near: Array<any>): void => {
mapDong.value = near.find(item => item.positition == "东");
mapXi.value = near.find(item => item.positition == '西');
mapNan.value = near.find(item => item.positition == '南');
mapBei.value = near.find(item => item.positition == '北');
}
</script>

View File

@@ -0,0 +1,9 @@
export class MapService {
/**
* 获取地图主页信息
* GET /Map/Map/GetMapData
*/
static async GetMapData(map: string) {
return await ApiService.Request("get", "/Map/Map/GetMapData", { map });
}
}