From c40f3711bce9da6257de0ca98a57ccff3d5ee1c3 Mon Sep 17 00:00:00 2001 From: Putoo <290555932@qq.com> Date: Sat, 11 Jul 2026 18:52:38 +0800 Subject: [PATCH] 1212121 --- .../logdb/db/game_charm_log.cs | 69 ++++++++ .../view/GiftLogView.cs | 11 ++ Service/Application.Domain/Enum/GoodsEnum.cs | 3 +- .../User/IUnitUserRelationService.cs | 10 ++ .../Services/Service/Business/RankService.cs | 4 + .../Service/User/UnitUserRelationService.cs | 108 +++++++++++- .../Application.Domain/Tool/Base/GameBus.cs | 5 + .../Application.Domain/Tool/Base/UbbTool.cs | 18 ++ .../Controllers/User/GiveController.cs | 162 ++++++++++++++++++ .../Controllers/User/UserController.cs | 21 ++- Web/public/images/gift/num_0.png | Bin 0 -> 711 bytes Web/public/images/gift/num_1.png | Bin 0 -> 534 bytes Web/public/images/gift/num_2.png | Bin 0 -> 708 bytes Web/public/images/gift/num_3.png | Bin 0 -> 759 bytes Web/public/images/gift/num_4.png | Bin 0 -> 705 bytes Web/public/images/gift/num_5.png | Bin 0 -> 730 bytes Web/public/images/gift/num_6.png | Bin 0 -> 716 bytes Web/public/images/gift/num_7.png | Bin 0 -> 643 bytes Web/public/images/gift/num_8.png | Bin 0 -> 745 bytes Web/public/images/gift/num_9.png | Bin 0 -> 734 bytes Web/public/images/gift/x.png | Bin 0 -> 875 bytes Web/src/config/BaseConfig.ts | 8 +- Web/src/pages/user/gift/give.vue | 83 ++++++++- Web/src/pages/user/gift/index.vue | 55 +++++- Web/src/pages/user/index.vue | 5 +- Web/src/pages/user/user.vue | 8 +- Web/src/services/user/GiveService.ts | 25 +++ 27 files changed, 577 insertions(+), 18 deletions(-) create mode 100644 Service/Application.Domain.Entity/logdb/db/game_charm_log.cs create mode 100644 Service/Application.Domain.Entity/view/GiftLogView.cs create mode 100644 Service/Application.Web/Controllers/User/GiveController.cs create mode 100644 Web/public/images/gift/num_0.png create mode 100644 Web/public/images/gift/num_1.png create mode 100644 Web/public/images/gift/num_2.png create mode 100644 Web/public/images/gift/num_3.png create mode 100644 Web/public/images/gift/num_4.png create mode 100644 Web/public/images/gift/num_5.png create mode 100644 Web/public/images/gift/num_6.png create mode 100644 Web/public/images/gift/num_7.png create mode 100644 Web/public/images/gift/num_8.png create mode 100644 Web/public/images/gift/num_9.png create mode 100644 Web/public/images/gift/x.png create mode 100644 Web/src/services/user/GiveService.ts diff --git a/Service/Application.Domain.Entity/logdb/db/game_charm_log.cs b/Service/Application.Domain.Entity/logdb/db/game_charm_log.cs new file mode 100644 index 0000000..87a8c58 --- /dev/null +++ b/Service/Application.Domain.Entity/logdb/db/game_charm_log.cs @@ -0,0 +1,69 @@ +using SqlSugar; +using System; + +namespace Application.Domain.Entity +{ + [Tenant("Kg.SeaTime.Log")] + public class game_charm_log + { + /// + /// logId + /// + [SugarColumn(IsPrimaryKey = true, Length = 50)] + public string logId { get; set; } + + /// + /// userId + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? userId { get; set; } + + /// + /// fromId + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? fromId { get; set; } + + /// + /// goodsId + /// + [SugarColumn(IsNullable = true)] + public Int32? goodsId { get; set; } + + /// + /// name + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? name { get; set; } + + /// + /// img + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? img { get; set; } + + /// + /// count + /// + [SugarColumn(IsNullable = true)] + public int? count { get; set; } + + /// + /// charm + /// + [SugarColumn(IsNullable = true)] + public int? charm { get; set; } + + /// + /// sumCharm + /// + [SugarColumn(IsNullable = true)] + public int? sumCharm { get; set; } + + /// + /// addTime + /// + [SugarColumn(IsNullable = true)] + public DateTime? addTime { get; set; } + } +} \ No newline at end of file diff --git a/Service/Application.Domain.Entity/view/GiftLogView.cs b/Service/Application.Domain.Entity/view/GiftLogView.cs new file mode 100644 index 0000000..b307e73 --- /dev/null +++ b/Service/Application.Domain.Entity/view/GiftLogView.cs @@ -0,0 +1,11 @@ +namespace Application.Domain.Entity; + +public class GiftLogView +{ + public UserModel user { get; set; } + public UserModel from { get; set; } + public string name { get; set; } + public string img { get; set; } + public int count { get; set; } + public DateTime? time { get; set; } +} \ No newline at end of file diff --git a/Service/Application.Domain/Enum/GoodsEnum.cs b/Service/Application.Domain/Enum/GoodsEnum.cs index 789c566..189eb13 100644 --- a/Service/Application.Domain/Enum/GoodsEnum.cs +++ b/Service/Application.Domain/Enum/GoodsEnum.cs @@ -16,11 +16,12 @@ public static class GoodsEnum Pack,//宝箱 ChoicePack,//选择宝箱 Weight,//负重 + Gift,//礼物道具 Exp,//经验 State,//状态物品 Ship,//船只 Practise,//修炼道具 - Durability,//负重道具 + Durability,//耐久道具 AddExp,//扣除经验获得道具 GetExp//使用后获得经验 } diff --git a/Service/Application.Domain/Services/Interface/User/IUnitUserRelationService.cs b/Service/Application.Domain/Services/Interface/User/IUnitUserRelationService.cs index da99832..d9fd51a 100644 --- a/Service/Application.Domain/Services/Interface/User/IUnitUserRelationService.cs +++ b/Service/Application.Domain/Services/Interface/User/IUnitUserRelationService.cs @@ -20,4 +20,14 @@ public interface IUnitUserRelationService Task DeleteUserEnemy(string userId, string eId); #endregion + + #region 魅力相关 + + Task GetUserNewGift(string userId); + Task> GetUserGiftLog(string userId, int page, int limit, RefAsync total); + + Task AddCharm(string userId, string fromId, int goodsId, string name, string img, int charm, + int count); + + #endregion } \ No newline at end of file diff --git a/Service/Application.Domain/Services/Service/Business/RankService.cs b/Service/Application.Domain/Services/Service/Business/RankService.cs index 5228225..d689289 100644 --- a/Service/Application.Domain/Services/Service/Business/RankService.cs +++ b/Service/Application.Domain/Services/Service/Business/RankService.cs @@ -168,6 +168,10 @@ public class RankService(ISqlSugarClient DbClient, IRedisCache redis) : IRankSer { temp.sign = item.renown.ToString(); } + else if(type==11) + { + temp.sign = item.charm.ToString(); + } temp.par = ""; result.Add(temp); } diff --git a/Service/Application.Domain/Services/Service/User/UnitUserRelationService.cs b/Service/Application.Domain/Services/Service/User/UnitUserRelationService.cs index 8f55546..68b9da3 100644 --- a/Service/Application.Domain/Services/Service/User/UnitUserRelationService.cs +++ b/Service/Application.Domain/Services/Service/User/UnitUserRelationService.cs @@ -38,10 +38,10 @@ public class UnitUserRelationService(ISqlSugarClient DbClient, IRedisCache redis public async Task CheckIsFriend(string userId, string toId) { - string frId = StringAssist.GetSortKey(userId, toId); - var db = DbClient.AsTenant().GetConnectionWithAttr(); - return await db.Queryable().Where(it => it.frId == frId).AnyAsync(); + var data = await GetUserFriendInfo(userId, toId); + return data != null; } + public async Task AddFriend(string userId, string toId) { @@ -62,6 +62,21 @@ public class UnitUserRelationService(ISqlSugarClient DbClient, IRedisCache redis return await db.Deleteable().Where(it => it.frId == frId).ExecuteCommandAsync() > 0; } + private async Task GetUserFriendInfo(string userId, string toId) + { + string frId = StringAssist.GetSortKey(userId, toId); + var db = DbClient.AsTenant().GetConnectionWithAttr(); + return await db.Queryable().Where(it => it.frId == frId).SingleAsync(); + } + + private async Task UpdateFriendNear(string frId, int op, int count) + { + int opCount = op == 1 ? count : 0 - count; + var db = DbClient.AsTenant().GetConnectionWithAttr(); + return await db.Updateable().SetColumns(it => it.near == it.near + opCount) + .Where(it => it.frId == frId).ExecuteCommandAsync() > 0; + } + #endregion #region 仇人 @@ -120,4 +135,91 @@ public class UnitUserRelationService(ISqlSugarClient DbClient, IRedisCache redis } #endregion + + #region 赠送礼物 + + public async Task GetUserNewGift(string userId) + { + string key = string.Format(UserCache.BaseCacheKey, "UserNewGift"); + if (await redis.HExistsHashAsync(key, userId)) + { + return await redis.GetHashAsync(key, userId); + } + + var db = DbClient.AsTenant().GetConnectionWithAttr(); + var data = await db.Queryable().Where(it => it.userId == userId) + .OrderByDescending(it => it.addTime).FirstAsync(); + if (data == null) + { + data = new game_charm_log(); + } + + await redis.AddHashAsync(key, userId, data); + return data; + } + + public async Task> GetUserGiftLog(string userId, int page, int limit, RefAsync total) + { + var db = DbClient.AsTenant().GetConnectionWithAttr(); + var data = await db.Queryable().Where(it => it.userId == userId) + .OrderByDescending(it => it.addTime).ToPageListAsync(page, limit, total); + List result = new List(); + foreach (var item in data) + { + GiftLogView temp = new GiftLogView() + { + user = await UserModelTool.GetUserView(item.userId), + from = await UserModelTool.GetUserView(item.fromId), + name = item.name, + img = item.img, + count = (int)item.count, + time = item.addTime + }; + result.Add(temp); + } + + return result; + } + + public async Task AddCharm(string userId, string fromId, int goodsId, string name, string img, int charm, + int count) + { + int sumCharm = count * charm; + var accService = App.GetService(); + bool result = await accService.UpdateUserData(userId, 1, nameof(AccEnum.AccType.charm), sumCharm, "赠送礼物获得"); + if (result) + { + game_charm_log log = new game_charm_log() + { + logId = StringAssist.NewGuid, + userId = userId, + fromId = fromId, + goodsId = goodsId, + name = name, + img = img, + count = count, + charm = charm, + sumCharm = sumCharm, + addTime = DateTime.Now + }; + var db = DbClient.AsTenant().GetConnectionWithAttr(); + if (await db.Insertable(log).ExecuteCommandAsync() > 0) + { + string key = string.Format(UserCache.BaseCacheKey, "UserNewGift"); + await redis.AddHashAsync(key, userId,log); + + //判断关系是否为好友 + var frInfo = await GetUserFriendInfo(userId, fromId); + if (frInfo != null) + { + //添加亲密度 + await UpdateFriendNear(frInfo.frId, 1, sumCharm); + } + } + + } + return result; + } + + #endregion } \ No newline at end of file diff --git a/Service/Application.Domain/Tool/Base/GameBus.cs b/Service/Application.Domain/Tool/Base/GameBus.cs index 80264ac..f24f49d 100644 --- a/Service/Application.Domain/Tool/Base/GameBus.cs +++ b/Service/Application.Domain/Tool/Base/GameBus.cs @@ -69,6 +69,11 @@ public static class GameBus var mapService = App.GetService(); isok = await mapService.AddUserCityMap(userId, Convert.ToInt32(parameter)); } + else if (goodsType.Equals(nameof(GameEnum.PropCode.skill))) + { + var skillService = App.GetService(); + isok = await skillService.UpdateUserSkill(userId, Convert.ToInt32(parameter)); + } return isok; } diff --git a/Service/Application.Domain/Tool/Base/UbbTool.cs b/Service/Application.Domain/Tool/Base/UbbTool.cs index 9bf7d20..bfe565d 100644 --- a/Service/Application.Domain/Tool/Base/UbbTool.cs +++ b/Service/Application.Domain/Tool/Base/UbbTool.cs @@ -6,4 +6,22 @@ public class UbbTool { return $"{name}"; } + private static string _GiftUbb = "{1}"; + public static string GiftUbb(string id, string name) + { + return string.Format(_GiftUbb, id, name); + } + public static string GiveGiftStr(int count) + { + string result = string.Empty; + result += GiftUbb("images/gift/x.png", "×"); + char[] num = count.ToString().ToCharArray(); + + foreach (char s in num) + { + result += GiftUbb(string.Format("images/gift/num_{0}.png", s.ToString()), s.ToString()); + } + + return result; + } } \ No newline at end of file diff --git a/Service/Application.Web/Controllers/User/GiveController.cs b/Service/Application.Web/Controllers/User/GiveController.cs new file mode 100644 index 0000000..a5383b3 --- /dev/null +++ b/Service/Application.Web/Controllers/User/GiveController.cs @@ -0,0 +1,162 @@ +using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; + +namespace Application.Web.Controllers.User; + +/// +/// 赠送接口 +/// +[ApiExplorerSettings(GroupName = "User")] +[Route("User/[controller]/[action]")] +[ApiController] +[Authorize] +public class GiveController : ControllerBase +{ + private readonly IGameGoodsService _goodsService; + private readonly IGameEquService _equService; + private readonly IUnitUserWeight _weightService; + private readonly IUnitUserRelationService _relationService; + private readonly IUnitUserService _userService; + private readonly IGameChatService _chatService; + private readonly IMessageService _messageService; + + public GiveController(IGameGoodsService goodsService, IGameEquService equService, IUnitUserWeight weightService, + IUnitUserRelationService relationService, IUnitUserService userService, IGameChatService chatService, + IMessageService messageService) + { + _goodsService = goodsService; + _equService = equService; + _weightService = weightService; + _relationService = relationService; + _userService = userService; + _chatService = chatService; + _messageService = messageService; + } + + /// + /// 获取赠送礼物物品 + /// + /// + /// + [HttpGet] + public async Task GetUserGiftGoods(string no) + { + var fromInfo = await _userService.GetUserInfoByUserNo(no); + if (fromInfo == null) + { + return PoAction.Message("玩家不存在!"); + } + + string userId = StateHelper.userId; + int areaId = StateHelper.areaId; + if (areaId != fromInfo.areaId) + { + return PoAction.Message("玩家不存在!"); + } + + var data = await _goodsService.GetUserGoodsData(userId, nameof(GoodsEnum.Code.Gift)); + return PoAction.Ok(new + { + userNo = fromInfo.userNo, + nick = fromInfo.nick, + data = data + }); + } + + /// + /// 赠送礼物 + /// + /// + /// + /// + /// + [HttpGet] + public async Task ToGift(string no, int goodsId, int count) + { + var fromInfo = await _userService.GetUserInfoByUserNo(no); + if (fromInfo == null) + { + return PoAction.Message("玩家不存在!"); + } + + string userId = StateHelper.userId; + int areaId = StateHelper.areaId; + if (areaId != fromInfo.areaId) + { + return PoAction.Message("玩家不存在!"); + } + + count = count < 1 ? 1 : count; + var goodsInfo = await _goodsService.GetUserGoodsInfo(userId, goodsId); + if (goodsInfo.code != nameof(GoodsEnum.Code.Gift)) + { + return PoAction.Message("该道具无法赠送!"); + } + + if (goodsInfo.count < count) + { + return PoAction.Message("您礼物数量不足!"); + } + + if (await _goodsService.UpdateUserGoods(userId, 0, goodsId, count, "赠送礼物")) + { + var goods = await _goodsService.GetGoodsInfo(goodsId); + dynamic giftConfig = JsonConvert.DeserializeObject(goods.content); + int charm = Convert.ToInt32(giftConfig.charm); + int isBroad = Convert.ToInt32(giftConfig.isBroad); + int broadCount = Convert.ToInt32(giftConfig.broadCount); + string gifUbb = UbbTool.GiftUbb(goods.img, goods.goodsName); + + if (await _relationService.AddCharm(fromInfo.userId, userId, goodsId, goods.goodsName, goods.img, charm, + count)) + { + var myInfo = await _userService.GetUserInfoByUserId(userId); + string noticeMsg = $"[{UbbTool.HomeUbb(myInfo.userNo, myInfo.nick)}]赠送您{gifUbb}×{count}!"; + await _chatService.SendChat(fromInfo.userId, nameof(GameChatEnum.Code.Notice), noticeMsg); + + if (isBroad == 1 && count >= broadCount) + { + //发送系统广布 + string tip = + $"赠送给[{UbbTool.HomeUbb(fromInfo.userNo, fromInfo.nick)}] {gifUbb} {UbbTool.GiveGiftStr(count)}"; + await _messageService.SendBroadcast(userId, nameof(MessageEnum.BroadcastCode.Gift), tip); + } + + return PoAction.Ok(true); + } + else + { + return PoAction.Message("赠送失败,请稍后尝试!"); + } + } + else + { + return PoAction.Message("赠送失败,请稍后尝试!"); + } + } + + /// + /// 获取礼物记录 + /// + /// + /// + /// + [HttpGet] + public async Task GetGiftLog(string? no, int page) + { + string userId = StateHelper.userId; + if (!string.IsNullOrEmpty(no)) + { + var noInfo = await _userService.GetUserInfoByUserNo(no); + if (noInfo != null) + { + userId = noInfo.userId; + } + } + + RefAsync total = 0; + var data = await _relationService.GetUserGiftLog(userId, page, 10, total); + return PoAction.Ok(new { data, total = total.Value }); + } + +} \ No newline at end of file diff --git a/Service/Application.Web/Controllers/User/UserController.cs b/Service/Application.Web/Controllers/User/UserController.cs index 1549a07..d73b62f 100644 --- a/Service/Application.Web/Controllers/User/UserController.cs +++ b/Service/Application.Web/Controllers/User/UserController.cs @@ -55,11 +55,18 @@ public class UserController : ControllerBase var vigourInfo = await _attrService.GetUserVigourInfo(userId); var accInfo = await _accService.GetUserAccInfo(userId); var userDataInfo = await _accService.GetUserDataInfo(userId); - object acc = new { accInfo.gold, accInfo.cowry, userDataInfo.teach, userDataInfo.renown,userDataInfo.enemy }; + object acc = new { accInfo.gold, accInfo.cowry, userDataInfo.teach, userDataInfo.renown, userDataInfo.enemy }; var buff = await _attrService.GetUserStateData(userId, "ALL"); var stock = await _attrService.GetUserStock(userId); - object result = new { user, attr = attrInfo, exp, vigourInfo.vitality, acc, buff, stock }; + string gift = string.Empty; + var giftData = await _relationService.GetUserNewGift(userId); + if (!string.IsNullOrEmpty(giftData.logId)) + { + gift = $"收到{giftData.name}"; + } + + object result = new { user, attr = attrInfo, exp, vigourInfo.vitality, acc, buff, stock,gift }; return PoAction.Ok(result); } @@ -176,7 +183,7 @@ public class UserController : ControllerBase object user = new { userInfo.userNo, userInfo.nick, userInfo.sex, userInfo.sign }; var attrInfo = await _attrService.GetUserAttrModel(userInfo.userId); //基础属性 var accInfo = await _accService.GetUserDataInfo(userInfo.userId); - object acc = new { accInfo.teach,accInfo.enemy }; + object acc = new { accInfo.teach, accInfo.enemy }; var online = await _mapService.GetUserOnMap(userInfo.userId); int isOnline = online.upTime > @@ -192,11 +199,17 @@ public class UserController : ControllerBase var equ = await _equService.GetUserOnEqu(userInfo.userId); var suit = await _equService.GetUserEquSuit(userInfo.userId); + string gift = string.Empty; + var giftData = await _relationService.GetUserNewGift(userInfo.userId); + if (!string.IsNullOrEmpty(giftData.logId)) + { + gift = $"收到{giftData.name}"; + } var isPk = await UserStateTool.CheckPkState(userId, userInfo.userId, isEnemy, isAtArea); object result = new { - user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy, team, equ, suit,isPk + user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy, team, equ, suit, gift, isPk }; return PoAction.Ok(result); } diff --git a/Web/public/images/gift/num_0.png b/Web/public/images/gift/num_0.png new file mode 100644 index 0000000000000000000000000000000000000000..77fb7dfef91f845c8d1d3a32fe2abf84bfa756cb GIT binary patch literal 711 zcmV;&0yzDNP)AUy(V4+Fg^uAWVbcz<6kJtSJTSya~!c$I)m z+l?YB_xV8$LfQiaVHpn9ItX2Ki1=o6awgCRGy+_{u$4TU1RUqh>wa#w-eaI=3N;04 z3L5+dFkl8`&afFE6msCqmtm!p=*K1Qw%h?=Vq~0vJ~3y$%(flH%>Vf1s;{(_06(oN z3;;AJ4p;(KT|5oHGQ|1W8O^VsgG#NCs;ye~0WL+^jWgE&!D-(XoY;^mnuvXe?zde4pMd9Pp!qxe3@|%0 zhwWqw>1YQ>_6(!eLSe2%z+aE#K893WLFe^bBIl8Lez5*u-VeM3*Wmk~n{*mGOy5Si?Bu6O&wOyDeaAK$F#jR@>$Y5VR~$vr!%P t0kRjY)wVeWoC5|k{DZo`M!^1y{R6&n(60Xt-3xR4UBNy~2HuaB;PLQy zaAvi(zM3JD=;}Xr!u6YbG&ju?41q$i*QrD4kh7+u)tV|h>)zk1x#>L1ah9+|b3;eS z*;-AwUcwQ$fA;|a+hY@whs!`_dSy%L4JS-xO3!g`Hk);OV9>;yF^VYiCD$6#-fh^h zVtNs`ptYeu0R?iohLAEZY=>Y0ofmwbS@D_POu_{0K0BbUsS!LI zIvHZ?j$A9@Bz&EnXPJkOo`n5$DpOkAOu{r0m#$u3-M>*oQ}gRx!=T?!B#mR0fBygK Y7dgO{k-4|?ssI2007*qoM6N<$g0esPxc~qF literal 0 HcmV?d00001 diff --git a/Web/public/images/gift/num_2.png b/Web/public/images/gift/num_2.png new file mode 100644 index 0000000000000000000000000000000000000000..cc134a9673735927756cb62e53ce7859f9464ce9 GIT binary patch literal 708 zcmV;#0z3VQP)l7^oK|~V&Y>a8r%(zHico{N-3lCi0<(}W~%RTp; z7l_5vI|2=2CwkC{0%;6F+POOkx84ka{Ha)U(Yx zHiwFrmz2I<&LWF6jzp$)HP)1T0sX0mLnFsKq<8fYK1XGe>P_WqOO79#H}~sp82ILT z^)!SH%Ir_=3XP55C7pT2-wurVrXzP!JUHe8Jt^Z z-U!$W*?n2T9S6X~$@kWhsqM|oqci8`jk)M}su8dNXHR`Xh3n;?lnMoqc{Fq&+eYgv z{<*!|#Q5Mk5B0lz28ZLhOm`^%Mne16KDOqZIPtO1Cnw?D#d77PXt3)w<%pF*E-r2`JIiH?AAHn7@7&q1fChB(7F_;{_&f_N5e)>UyF1DV*hhJU=q{l+Pf{3e?FmYF<_BPGgsv=%*VB- za1>880-i+Iq1|0_-OE}R1J%Wq#FnNe<1cOkv$tA&IlEnHW;$zSZm-k>_QLCLeW<;y zbzNd-jd1ph^GY+*k!KB9+msvd``n)_tGnj^UQnF+F7g!OfZ7{g#-4$rulbKrRMVJR q;IY+j5B4+w{k3|t!3LWDC;kN{bF)4Tp3gP_000030*rcJNaSK2k%@9EhgBOGp<+$ zcm$zmUbscit1*%2TVytqY2@!Z6`?@aj#Z+uFtk5>?~2vMfUD6Qjm7MK{vag>%+JLf zKl+J7y$4MHGAfgzyrjm)hKF*V`eKp85RODqYd)E>?~T32Mkm0=yDPOcMFh9?kpApH z=B0oaFfuv*ee>%*`%O*$X!_Sn;KBNk`uIvTnwbe3?CXaqB#HsyMZ7Tq|Jj{C2Fkv(-HcK;clXpn74=7UiYYB2z;SZ@pmnrv)|Dm0C7! z5!5~+2(S0~$+vT!Q^kM@)Sga!>8U3k6WqDkTI?ujI{wiqgG2o=sbI>5z+>os_q{`A zXXmsvH(7Uk49ure&V4toZ(zXK`2_rf?MUSV3a1QBID?SobrySM_w|MgcBwramA&H* p;#}VItFqJXmR^^e-d7%FiZN*`@#h002ovPDHLkV1g33fGz+4 literal 0 HcmV?d00001 diff --git a/Web/public/images/gift/num_4.png b/Web/public/images/gift/num_4.png new file mode 100644 index 0000000000000000000000000000000000000000..d63f6b05232b39d57fdaac95b9a46f407f4a3365 GIT binary patch literal 705 zcmV;y0zUnTP)b#-5 zeXI`qu_6E`r^YIf>Z+O zob;*7WHDN+x94=g{y3B1eEE)g{nb0wEPO&55(!Z zycdg~X(;i+>ZGV_qwl_MXY8tE4w+c`{CER93yD*ma4XiO?u~4JajrO9=4|%?dv>;| zN@c{u#KR2z_Cvt`ax1}lw82|1C(Rj)xRSAZUk|7*A0>kf7ykGwa5g?wlUNddN($8; zOht!KwYhnTrym~SI@y0?i^@wiK6Zzt56qT~BCd1yJqyfTQ14W4I)T5>UUGb@8a6=l zYoCk9Q@)dZgCGgp{M6GV5xoXI^bk=mfx+mdqJ%)R zdQd9J!W9N(1ZfeIX__QM+SGEJ6W#CE!}c@hpPx^iw{y?;e9pO-bB`cm)dd0-%L8(^ zIREZ&N)w7BgkX)b4bTkS1}rMYhJbd5Q~D}|K&v8*2c7~(W08jJyv+rFOn_@NWQi2D z0;<4sfU*8~9G9;q0%@SBjaG;p+FBmq8vSCaF=_IE2{m9nz>%Y|uncHxLD-@M0e_JB zUmnGsSL-lCxq>No7jh81f2J86yavQUOdg0h#=ec?ak~Nf9ZqRZ?G5XJ~g@Bmhp|>>c)dL_>D->XqZ3I>l{z~i370GNd8DwN1kdVgD<^4)Lin3^Wr4T*t+oSzI)F-oXfr64OHRL zp1^I;fDF2D3D;q|P!a^?+QjV?s;~#2qr386!(RMQO^W>ov1{n=e=crlI0^AeY*#h$ zP8>#J@u4@8vahrgA0fQr)Az^XIH=P4ojCkQ?A4@fwjCpsx?KNmA>v%AF8DXWb+KbF zB^^K7E(`}1e@}Sx^-=RPv+(U^!Fnw>;SA!(hLW<+w@_SFTpIJv=x^rd)*`VJn+xkX zJcD#!DlU7Zg(AhJ(An`7%S&OzNmqDH)rA`tud;{F;QY3>z=!YMV{2=S)&W7&ZsDz; zSsGVZ{L9DZR?S~4!DrKj(onRAwH&?;FAg+lOT>in1GEkblfASI2-mvwY`@D}FKmhU zna6g<8tS$D2o834HhSv8Mpg-ePPxe$qwjv;+}RvOtg3`q7FNa12FhZ*SY+96yaT;ay$sVKJwVX++7 zal%63MwDA$o!V1wOLME4748n#De?XU8e1PC?nYMxL|v)v5!89YG$Vkr9bOkn_0YkKKGT>o>Q9oPSSUBA68Dq^P#tNB2gNSHM6C`F~ND6I&pkP263+=*yP)Y~lLa{YaDuR&ULP}a` z8bda%=*ka*3$>^#qt-OBaPIIsuIzkc^AuhH-Ll+Kmq!xZLNw|MNcg<=mi1 zo9lxT)nZ-g%OX9+?a|x}2qAcfPy}qmFxnP@MY@ITXl`aA30Q+W$ka8Ztf^hl^}HtY zj9;CGCuq9%pzu#w%)V}9zWTPqz8}{wbPE%+3qqscf2ncq#OVy$aW)Rv4%@bWNulKP z75?ST1quk2e2`UDbv<%dLLBf0w*EPEO6zBv-gVww)VLw9p?)dLIz71e+{wW|U>biT zaVTSGEj_8OKIOOml`2+j^m6Hb-|s%;;ly3&9nH=3g%DypgirB#6dy;Rr+c}ILJ-nf ze~ny?U{^+SGksBE5)f|Atufg1%`y!&Wt8uf%RM*LKM?IZTwIh|1PG_l+R~Wvbz7yv z^jfNR`1R-E$nTvy^nU@rKv(9&U~lJgUJyRY8aZ>x!~1uc9YSAeQ4(+!j>30a%B`*_ z6Ea;MJx&`Mn2&lOt}qEWjJmBGmgx8-t&m#F$2$xjJ0AH1N}?_X+=tHU%3y!n3SL)A z)n<*HyJURq2D5kfhlECAr@RY(+FY$%T3FZR(PY}t@O;#sBv>4<8LchN?OJvp1XC|x z8SFnA`H4}JfO*JIJ~Q>=6*zPLqVe1R9W_$i)w_(2l6})?!u>c%@eej`C|O*X>o!04 doCtgGdJ7^Xpq68|Dlz~7002ovPDHLkV1k-hD=Gj0 literal 0 HcmV?d00001 diff --git a/Web/public/images/gift/num_8.png b/Web/public/images/gift/num_8.png new file mode 100644 index 0000000000000000000000000000000000000000..32717e0221dc0874465077f3c56ed1742b29469f GIT binary patch literal 745 zcmVmLJ>Hl9?Au7Y1Uaj!?Im?$v6Nc_DV8;Eh2-B?LtT7Lua$A$b`=SKcT= zK?GqsMbpVNS!Nf}$1L(L`p{t)uiI>HZx{2)IXAoNzys$w|8xGF|9hVINJLq6fy6FW z3CNqi3z!vv(-TILBDH&VV*vEPgH58m80;1B5V#i|+>J07cnVkm%*VA@Y)KKOnIQ91 zA&bDGNw;Z?kvt02nya;3?@q^=tUy_>u+AiqPX(ZGDjE+sS;C@S$?K|?(NK&!s z6z~DIhLw=e22fJk2)-eFeucXoy%EHxMLx0*^!2Ryaz*~Ca1u$5SkM4IB4^X;s&x=B zAZe^Po=u9dOE`&!;sR{#Z93|zbdZ#dccUEq9*n7<0C2oaqVN6>fX{$wdQlA|lH4LB zE30AD-`Pk9Ze!FM08l@k!@s65%GFt&u;(>-^fIlB4JEU zr>3@&iLv24B2ylZ*P#qhXDvikKvm$yh(nNt0M=GjR0YVYhw#qt6-$^2V92Qe1yCSu zBPcL!OIb2TG)P7}{;ZQsj1L3+B5KO9l9vGcvQI}r`7PAN=Tzm)p;kazvV?3cL&~)x z9keqtt>rSV*+MJ&7Y$8GcH()WB$TT-JP*Pm@ z7x#QwVs7CL1CRPe=nOCzy$|CN76JWit)_Su0?q=1uzkVC`}N)dR^T!)6NAkF-GE7u b{dfBV%BIzErP*)I00000NkvXXu0mjfj~7wB literal 0 HcmV?d00001 diff --git a/Web/public/images/gift/num_9.png b/Web/public/images/gift/num_9.png new file mode 100644 index 0000000000000000000000000000000000000000..573bc9e0c78a9f82c6f06cc2ed40fb456ae6010a GIT binary patch literal 734 zcmV<40wMj0P)JRVbdEV#8^E~hO{{&%jSOqF72%KcV z1-uVWj(9c^LaB{WBLMM0Ghh$E!ZilG0vaQW)PUJQKVShkcw9@?0WG>68pcM~86Vy# z1PTEgQ2j4p7BC5Di_dAfbXAARoChKsq??LLH=gNr?$mo(oR?LACt9a~vO|Ye3_7er zcDHYn(rc8`e@4pn*MZZo#JooNX*@|ftU@}h!X>2)F*Fg(vp|U@D~8GoI^-%Ki}1KV z)Az)Q$Gw1D1-S}Vb1atZOaS{anbyYMPtZx&bim*3;J$r`*); zA}u|G8TTwe1~40~!=nI&dHcZ+_`&(&Stz-<;0?vm6!Gilaxk@|HZlMr_6YbS_$2z+ z)lj^qJWh$P?PO^spK+H9;LC_-b3$$82_SuLK8fUgw~#-Exp;Dt)Z{gEaXv~9Cm>fq zn6EH2I2EjMg##ixbOAUAh9Eu%ky?i_zmsxD8l|}j-~*vAm5@EwF<_&mxi%SeTL0h#Rli7l% z@E*=L?`Uah0+<2v0Dribqdkf{uuBYyg0?a}d(CzSa4Xd+Q@idr|@TIO(RTqb-=f4?KyTt0}aig&U%4*)fyGxC{R#SdpRMwHLGZ^qit;(Bj`?5p2Q%{D5#~VX QQvd(}07*qoM6N<$f@l{(eEF7{`D2-a=^`tdTNOkYI$yidQx@#ksDdzGN;Y_)4_IU^eF$BQcD9F!%;!FVSSn z#6BM=lP#s&U4N` z4}9Q|N~TH4@{@o$z)hg{J!ggHkrpx@ilm$%$^lw{2+%sVHYI^I#c3Y+-SSz#Th2)a zJPwpPoDz#xC^(!FKp+m91Dpi{LgOk@02TuW08DW(FHr39d#L{?t-qaSClNMfWiMje@tOPD*5>`%NE;6 zF@K6=-HfhVsNM1_r<+dzi~!5OuB`nx9tdy|D1G#IM~2NZLZR~k3`AiF@;)-b5HOs= zv)+%X`Tl3_-e?E74t%ABjC+vWhhE?^Kz*eZ->kHEins2+VOQfYJ&`v6=YVguknvp9 z6K$gcjQ}3E%#?H!^xKfq1JG}SKFCZ_1PtKMcvvFP3)}`=3uh|SuCz1Ro{f}O1CFJT z5g_&wCYw#vt+9$TNBnNtn+z!0R4V4CvUQOiOX^f)^(XXLHqFgv7_fPfvI6iDeA#Ji z{K704jefU0{w~7Uy8t%Mn?Tug6VjxGNNRvc^ewyh?xDRs$g947z9}z*@DpOsu2JSu z>5wyM(^_4OdicBm<^!L*3RG5C*Aa_6Mslijz6evjV;em^VSte%e;iWMEmq3DTo2jv zk(?^i`p(d%wZiC-I4@d`0z{(`^dSW)Qzdxi2G!fgVMl=yfPDw|a_im`q)e60r(upA z|4Vcl6dPfi7NFFT;pCGUvuV3@O4N@6 \ No newline at end of file + + \ No newline at end of file diff --git a/Web/src/pages/user/gift/index.vue b/Web/src/pages/user/gift/index.vue index c93c264..42e54dc 100644 --- a/Web/src/pages/user/gift/index.vue +++ b/Web/src/pages/user/gift/index.vue @@ -1,3 +1,54 @@ \ No newline at end of file +
+ 礼物记录 +
+
+
+ {{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}. + 收到[]赠送 + ×{{item.count}} +
+ 暂无. +
+
+ +
+ + + \ No newline at end of file diff --git a/Web/src/pages/user/index.vue b/Web/src/pages/user/index.vue index 406d6bb..6107d31 100644 --- a/Web/src/pages/user/index.vue +++ b/Web/src/pages/user/index.vue @@ -6,7 +6,8 @@ 性别:{{ userData.sex }}
特权:
徽章:显示
- 社交:未收到礼物
+ 社交: + {{ gift == '' ? "未收到礼物" : gift }}
婚姻:单身
个性签名:{{ userData.sign }}修改
宠物:暂无
@@ -74,6 +75,7 @@ const attrData = ref({}); const accData = ref({}); const buff = ref>([]); const stock = ref>([]); +const gift = ref(''); onMounted(async () => { try { @@ -96,6 +98,7 @@ const BindData = async (): Promise => { accData.value = result.data.acc; buff.value = result.data.buff; stock.value = result.data.stock; + gift.value = result.data.gift; console.log(result); } else { diff --git a/Web/src/pages/user/user.vue b/Web/src/pages/user/user.vue index b14d151..0a305e4 100644 --- a/Web/src/pages/user/user.vue +++ b/Web/src/pages/user/user.vue @@ -3,7 +3,7 @@ 私聊. 送礼物. 逗一下
拜师. 交易. 送道具
+ href="/user/bag/give">送道具
{{ isFriend ? "删除好友" : "加好友" }} .加仇人 @@ -15,7 +15,9 @@ 昵称:{{ userData.nick }}
特权:
徽章:
- 社交: 暂无
+ 社交: + {{ gift }} +
婚姻:
结拜:暂无
宠物:暂无
@@ -117,6 +119,7 @@ const isFriend = ref(false); const isEnemy = ref(false); const isPk = ref(false); const team = ref({}); +const gift = ref(''); /**装备定义 */ const equ = ref>([]); const suit = ref>([]); @@ -154,6 +157,7 @@ const BindData = async (): Promise => { isFriend.value = result.data.isFriend; isEnemy.value = result.data.isEnemy; team.value = result.data.team; + gift.value = result.data.gift; isPk.value = result.data.isPk; equ.value = result.data.equ; suit.value = result.data.suit; diff --git a/Web/src/services/user/GiveService.ts b/Web/src/services/user/GiveService.ts new file mode 100644 index 0000000..1cf057d --- /dev/null +++ b/Web/src/services/user/GiveService.ts @@ -0,0 +1,25 @@ +export class GiveService { + /** + * 获取赠送礼物物品 + * GET /User/Give/GetUserGiftGoods + */ + static async GetUserGiftGoods(no: string) { + return await ApiService.Request("get", "/User/Give/GetUserGiftGoods", { no }); + } + + /** + * 赠送礼物 + * GET /User/Give/ToGift + */ + static async ToGift(no: string, goodsId: number, count: number) { + return await ApiService.Request("get", "/User/Give/ToGift", { no, goodsId, count }); + } + + /** + * 获取礼物记录 + * GET /User/Give/GetGiftLog + */ + static async GetGiftLog(no: string, page: number) { + return await ApiService.Request("get", "/User/Give/GetGiftLog", { no, page }); + } +} \ No newline at end of file