121212
This commit is contained in:
@@ -17,6 +17,7 @@ public class GameEquService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<game_equ_suit> GetEuqSuitInfo(string suitCode)
|
public async Task<game_equ_suit> GetEuqSuitInfo(string suitCode)
|
||||||
{
|
{
|
||||||
string key = string.Format(BaseCache.BaseCacheKeys, "EquData", "SuitInfo");
|
string key = string.Format(BaseCache.BaseCacheKeys, "EquData", "SuitInfo");
|
||||||
@@ -27,6 +28,7 @@ public class GameEquService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
|||||||
data = await db.Queryable<game_equ_suit>().Where(it => it.suitCode == suitCode).SingleAsync();
|
data = await db.Queryable<game_equ_suit>().Where(it => it.suitCode == suitCode).SingleAsync();
|
||||||
await redis.AddHashAsync(key, suitCode, data);
|
await redis.AddHashAsync(key, suitCode, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,7 +240,7 @@ public class GameEquService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
userEqu = userEqu.FindAll(it => it.isLock == 0);
|
userEqu = userEqu.FindAll(it => it.isLock == 0 && it.isOn == 0);
|
||||||
if (userEqu.Count < count)
|
if (userEqu.Count < count)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -304,9 +306,16 @@ public class GameEquService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
|||||||
await db.Insertable(logs).SplitTable().ExecuteCommandAsync();
|
await db.Insertable(logs).SplitTable().ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 辅助方法
|
#region 辅助方法
|
||||||
|
|
||||||
public async Task<int> GetUserEquWeightSum(string userId)
|
public async Task<int> GetUserEquWeightSum(string userId)
|
||||||
{
|
{
|
||||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_equ>();
|
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_equ>();
|
||||||
@@ -314,6 +323,5 @@ public class GameEquService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
|||||||
return data.Sum(it => (int)it.weight);
|
return data.Sum(it => (int)it.weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -57,9 +57,9 @@ public class EquController : ControllerBase
|
|||||||
return PoAction.Message("装备不存在!");
|
return PoAction.Message("装备不存在!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (equInfo.suitCode != "0" && !string.IsNullOrEmpty(equInfo.suitCode))
|
if (ueInfo.suitCode != "0" && !string.IsNullOrEmpty(ueInfo.suitCode))
|
||||||
{
|
{
|
||||||
suit = await _equService.GetEuqSuitInfo(equInfo.suitCode);
|
suit = await _equService.GetEuqSuitInfo(ueInfo.suitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
user = await UserModelTool.GetUserView(ueInfo.owerId);
|
user = await UserModelTool.GetUserView(ueInfo.owerId);
|
||||||
@@ -68,4 +68,69 @@ public class EquController : ControllerBase
|
|||||||
return PoAction.Ok(new { equ = equInfo, suit, equData = ueInfo,user });
|
return PoAction.Ok(new { equ = equInfo, suit, equData = ueInfo,user });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取套装详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="suitCode"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IPoAction> GetEquSuitInfo(string suitCode)
|
||||||
|
{
|
||||||
|
var data = await _equService.GetEuqSuitInfo(suitCode);
|
||||||
|
if (data == null)
|
||||||
|
{
|
||||||
|
return PoAction.Message("套装不存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
return PoAction.Ok(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定操作
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ueId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IPoAction> EquLock(string ueId)
|
||||||
|
{
|
||||||
|
var userId = StateHelper.userId;
|
||||||
|
var equInfo = await _equService.GetUserEquInfo(ueId);
|
||||||
|
if (equInfo == null)
|
||||||
|
{
|
||||||
|
return PoAction.Message("装备不存在!");
|
||||||
|
}
|
||||||
|
if (equInfo.userId != userId)
|
||||||
|
{
|
||||||
|
return PoAction.Message("装备不存在!");
|
||||||
|
}
|
||||||
|
if (equInfo.isAppr == 0)
|
||||||
|
{
|
||||||
|
return PoAction.Message("装备未鉴定!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
equInfo.isLock = equInfo.isLock == 0 ? 1 : 0;
|
||||||
|
|
||||||
|
bool result = await _equService.UpdateUserEquInfo(equInfo);
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
string msg = equInfo.isLock == 1 ? "成功绑定装备!" : "成功解除装备绑定!";
|
||||||
|
return PoAction.Ok(true, msg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return PoAction.Message("操作失败,请稍后尝试!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 穿/卸装备
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ueId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IPoAction> DownOrUpEqu(string ueId)
|
||||||
|
{
|
||||||
|
return PoAction.Ok(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -115,13 +115,7 @@ public class TeamController : ControllerBase
|
|||||||
{
|
{
|
||||||
string userId = StateHelper.userId;
|
string userId = StateHelper.userId;
|
||||||
var teamInfo = await _teamService.GetTeamDataByTeamId(teamId);
|
var teamInfo = await _teamService.GetTeamDataByTeamId(teamId);
|
||||||
int isMyTeam = teamInfo.user.Any(it => it.user.userId == userId) ? 1 : 0;
|
return PoAction.Ok(teamInfo);
|
||||||
int manger = teamInfo.team.masterId == userId ? 1 : 0;
|
|
||||||
return PoAction.Ok(new
|
|
||||||
{
|
|
||||||
data = teamInfo,
|
|
||||||
isMyTeam = isMyTeam
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -16,9 +16,10 @@ public class UserController : ControllerBase
|
|||||||
private readonly IGameGoodsService _goodsService;
|
private readonly IGameGoodsService _goodsService;
|
||||||
private readonly IGameChatService _chatService;
|
private readonly IGameChatService _chatService;
|
||||||
private readonly IGameSkillService _skillService;
|
private readonly IGameSkillService _skillService;
|
||||||
|
private readonly IGameTeamService _teamService;
|
||||||
public UserController(IUnitUserService userService, IUnitUserAttrService attrService,
|
public UserController(IUnitUserService userService, IUnitUserAttrService attrService,
|
||||||
IUnitUserAccService accService, IGameMapService mapService, IUnitUserRelationService relationService,
|
IUnitUserAccService accService, IGameMapService mapService, IUnitUserRelationService relationService,
|
||||||
IGameGoodsService goodsService, IGameChatService chatService,IGameSkillService skillService)
|
IGameGoodsService goodsService, IGameChatService chatService,IGameSkillService skillService,IGameTeamService teamService)
|
||||||
{
|
{
|
||||||
_userService = userService;
|
_userService = userService;
|
||||||
_attrService = attrService;
|
_attrService = attrService;
|
||||||
@@ -28,6 +29,7 @@ public class UserController : ControllerBase
|
|||||||
_goodsService = goodsService;
|
_goodsService = goodsService;
|
||||||
_chatService = chatService;
|
_chatService = chatService;
|
||||||
_skillService = skillService;
|
_skillService = skillService;
|
||||||
|
_teamService = teamService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -160,7 +162,8 @@ public class UserController : ControllerBase
|
|||||||
string onMapName = $"{onCity.cityName}-{onMapInfo.mapName}";
|
string onMapName = $"{onCity.cityName}-{onMapInfo.mapName}";
|
||||||
bool isFriend = await _relationService.CheckIsFriend(userId, userInfo.userId);
|
bool isFriend = await _relationService.CheckIsFriend(userId, userInfo.userId);
|
||||||
bool isEnemy = await _relationService.CheckUserEnemy(userId, userInfo.userId);
|
bool isEnemy = await _relationService.CheckUserEnemy(userId, userInfo.userId);
|
||||||
object result = new { user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy };
|
var team = await _teamService.GetUserTeamInfo(userInfo.userId);
|
||||||
|
object result = new { user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy ,team};
|
||||||
return PoAction.Ok(result);
|
return PoAction.Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<!-- 城内地图 -->
|
<!-- 城内地图 -->
|
||||||
<GamePopup v-model:show="showCity" title="【城市地图】">
|
<GamePopup v-model:show="showCity" title="【城市地图】">
|
||||||
<!-- 自定义内容 -->
|
<!-- 自定义内容 -->
|
||||||
<div class="">
|
<div class="" style="margin-top: 10px;">
|
||||||
<span v-for="(item, index) in cityShow" :key="index">
|
<span v-for="(item, index) in cityShow" :key="index">
|
||||||
<Abutton @click="ChangeMap(item.mapId)">{{ item.mapName }}</Abutton>
|
<Abutton @click="ChangeMap(item.mapId)">{{ item.mapName }}</Abutton>
|
||||||
<br v-if="(index + 1) % 4 == 0">
|
<br v-if="(index + 1) % 4 == 0">
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
耐久:{{ equInfo.durability }}<br>
|
耐久:{{ equInfo.durability }}<br>
|
||||||
<span v-if="equInfo.suitCode != '0' && equInfo.suitCode != ''">
|
<span v-if="equInfo.suitCode != '0' && equInfo.suitCode != ''">
|
||||||
套装:<Abar href="/">{{ suitInfo.suitName }}</Abar><br>
|
套装:<Abar :href='"/prop/suit?no=" + equInfo.suitCode'>{{ suitInfo.suitName }}</Abar><br>
|
||||||
</span>
|
</span>
|
||||||
特性:{{ EquTool.GetEquAttrName(equInfo.equAttr, 0) }}<br>
|
特性:{{ EquTool.GetEquAttrName(equInfo.equAttr, 0) }}<br>
|
||||||
<span v-if="equInfo.holeCount > 0">
|
<span v-if="equInfo.holeCount > 0">
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
耐久:{{ equData.maxdurability }}/{{ equData.durability }}<br>
|
耐久:{{ equData.maxdurability }}/{{ equData.durability }}<br>
|
||||||
<span v-if="equData.suitCode != '0' && equData.suitCode != ''">
|
<span v-if="equData.suitCode != '0' && equData.suitCode != ''">
|
||||||
套装:<Abar href="/">{{ suitInfo.suitName }}</Abar><br>
|
套装:<Abar :href='"/prop/suit?no=" + equData.suitCode'>{{ suitInfo.suitName }}</Abar><br>
|
||||||
</span>
|
</span>
|
||||||
特性:{{ EquTool.GetEquAttrName(equData.equAttr, 0) }}<br>
|
特性:{{ EquTool.GetEquAttrName(equData.equAttr, 0) }}<br>
|
||||||
<span v-if="equData.holeCount > 0">
|
<span v-if="equData.holeCount > 0">
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="common" v-if="myUserId == equData.userId && equData.isAppr == 1">
|
<div class="common" v-if="myUserId == equData.userId && equData.isAppr == 1">
|
||||||
<span>
|
<span>
|
||||||
◈<Abutton>穿戴装备</Abutton><br>
|
◈<Abutton @click="UpOrDownEqu">穿戴装备</Abutton><br>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
◈<Abutton>洗练</Abutton><br>
|
◈<Abutton>洗练</Abutton><br>
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
◈<Abutton>升星</Abutton><br>
|
◈<Abutton>升星</Abutton><br>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
◈<Abutton>绑定</Abutton><br>
|
◈<Abutton @click="LockEqu">{{ equData.isLock == 0 ? "绑定" : "解绑" }}</Abutton><br>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
◈<Abar href="">寄售</Abar><br>
|
◈<Abar href="">寄售</Abar><br>
|
||||||
@@ -186,4 +186,22 @@ const BindData = async (): Promise<void> => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**穿/卸装备 */
|
||||||
|
const UpOrDownEqu = async () => {
|
||||||
|
alert(ueId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**绑定装备 */
|
||||||
|
const LockEqu = async () => {
|
||||||
|
MessageExtend.LoadingToast("操作中...");
|
||||||
|
let result = await EquService.EquLock(ueId);
|
||||||
|
MessageExtend.LoadingClose();
|
||||||
|
if (result.code == 0) {
|
||||||
|
await BindData();
|
||||||
|
MessageExtend.Notify(result.msg, "success");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageExtend.ShowDialog("绑定装备", result.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
57
Web/src/pages/prop/suit.vue
Normal file
57
Web/src/pages/prop/suit.vue
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<template>
|
||||||
|
<div class="content">
|
||||||
|
【套装介绍】
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
套装名称:{{ data.suitName }}<br>
|
||||||
|
套装介绍:<span v-html="data.sign"></span><br>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
---◈套装部件◈---<br>
|
||||||
|
<div class="item" v-for="item in onEqu">
|
||||||
|
▸<Abar :href='"/prop/equ?id=" + item.equId'>{{ item.equName }}</Abar>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
---◈套装属性◈---<br>
|
||||||
|
<div v-for="item in suitAttr">
|
||||||
|
<div class="content" v-for="attr in item.attrItem">
|
||||||
|
<span>{{ item.type == 0 ? "✧" : "✡" }}</span>
|
||||||
|
<span>{{ attr.tip }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
layout: layout.default,
|
||||||
|
middleware: 'page-loading'
|
||||||
|
})
|
||||||
|
const data = ref<any>({});
|
||||||
|
const onEqu = ref<Array<any>>([]);
|
||||||
|
const suitAttr = ref<Array<any>>([]);
|
||||||
|
onMounted(async () => {
|
||||||
|
try {
|
||||||
|
await BindData();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
PageLoading.Close();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const BindData = async (): Promise<void> => {
|
||||||
|
let suitCode = PageExtend.QueryString("no");
|
||||||
|
let result = await EquService.GetEquSuitInfo(suitCode);
|
||||||
|
if (result.code == 0) {
|
||||||
|
data.value = result.data;
|
||||||
|
onEqu.value = result.data.onEqu;
|
||||||
|
suitAttr.value = result.data.attr;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageExtend.ShowDialog("提示", result.msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1 +1,80 @@
|
|||||||
<template></template>
|
<template>
|
||||||
|
<div class="content">
|
||||||
|
【队伍资料】
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
名称:{{ team.name }}<br>
|
||||||
|
成员:({{ user.length }}/{{ team.count }})<br>
|
||||||
|
分类:{{ codeTips }}<br>
|
||||||
|
队长:<GameUser :data="master" :show-icon="0"></GameUser>
|
||||||
|
<span>{{ masterOnline ? "(在线)" : "(离线)" }}</span><br>
|
||||||
|
<div>
|
||||||
|
<span v-if="member.length == 0">
|
||||||
|
->暂无队员.
|
||||||
|
</span>
|
||||||
|
<div v-for="item in member">
|
||||||
|
队员:<GameUser :data="item.user" :show-icon="0"></GameUser>
|
||||||
|
<span>{{ item.isOnline == 1 ? "(在线)" : "(离线)" }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
✦<Abutton @click="JoinTeam">加入队伍</Abutton>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
layout: layout.default,
|
||||||
|
middleware: 'page-loading'
|
||||||
|
})
|
||||||
|
const state = ref(0);
|
||||||
|
const codeTips = ref('');
|
||||||
|
const team = ref<any>({});
|
||||||
|
const user = ref<Array<any>>([]);
|
||||||
|
const master = ref<any>({});
|
||||||
|
const masterOnline = ref(false);
|
||||||
|
const member = ref<Array<any>>([]);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
try {
|
||||||
|
await BindData();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
PageLoading.Close();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const BindData = async (): Promise<void> => {
|
||||||
|
let teamId = PageExtend.QueryString("id");
|
||||||
|
let result = await TeamService.GetTeamInfo(teamId);
|
||||||
|
if (result.code == 0) {
|
||||||
|
state.value = result.data.state;
|
||||||
|
team.value = result.data.team;
|
||||||
|
user.value = result.data.user;
|
||||||
|
codeTips.value = result.data.codeTips;
|
||||||
|
let masterInfo = user.value.find(it => it.user.userId == team.value.masterId);
|
||||||
|
master.value = masterInfo.user;
|
||||||
|
masterOnline.value = masterInfo.isOnline;
|
||||||
|
member.value = user.value.filter(it => it.user.userId != team.value.masterId);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageExtend.ShowDialog("提示", result.msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const JoinTeam = async () => {
|
||||||
|
let teamId = PageExtend.QueryString("id");
|
||||||
|
MessageExtend.LoadingToast("加入中...");
|
||||||
|
let result = await TeamService.JoinTeam(teamId);
|
||||||
|
MessageExtend.LoadingClose();
|
||||||
|
if (result.code == 0) {
|
||||||
|
PageExtend.Redirect("/user/team");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageExtend.ShowDialog("加入队伍", result.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<Abar :href='"/user/message/read?id=" + userData.userNo'>私聊</Abar>. <Abar :href='"/user/gift/give?no="+userData.userNo'>送礼物</Abar>. <Abar href="/user/interact/dou">逗一下</Abar><br />
|
<Abar :href='"/user/message/read?id=" + userData.userNo'>私聊</Abar>. <Abar
|
||||||
<Abar href="/user/master/add">拜师</Abar>. <Abar :href='"/trade/user?no="+userData.userNo'>交易</Abar>. <Abar href="/bag/give">送道具</Abar><br>
|
:href='"/user/gift/give?no=" + userData.userNo'>送礼物</Abar>. <Abar href="/user/interact/dou">逗一下</Abar><br />
|
||||||
|
<Abar href="/user/master/add">拜师</Abar>. <Abar :href='"/trade/user?no=" + userData.userNo'>交易</Abar>. <Abar
|
||||||
|
href="/bag/give">送道具</Abar><br>
|
||||||
<Abutton @click="FriendHandle">{{ isFriend ? "删除好友" : "加好友" }}</Abutton>
|
<Abutton @click="FriendHandle">{{ isFriend ? "删除好友" : "加好友" }}</Abutton>
|
||||||
<span v-if="isEnemy == false">
|
<span v-if="isEnemy == false">
|
||||||
.<Abutton @click="AddEnemy">加仇人</Abutton>
|
.<Abutton @click="AddEnemy">加仇人</Abutton>
|
||||||
@@ -39,11 +41,15 @@
|
|||||||
装饰: <br>
|
装饰: <br>
|
||||||
套装: <br>
|
套装: <br>
|
||||||
帮会: <br>
|
帮会: <br>
|
||||||
队伍:<br>
|
<div v-if="team.state == 1">
|
||||||
|
队伍:<Abar :href='"/user/team/info?id=" + team.team.teamId'>{{ team.team.name }}</Abar>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content"></div>
|
<div class="content"></div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import Team from './team/team.vue';
|
||||||
|
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: layout.default,
|
layout: layout.default,
|
||||||
@@ -56,7 +62,7 @@ const online = ref(0);
|
|||||||
const onMap = ref('');
|
const onMap = ref('');
|
||||||
const isFriend = ref(false);
|
const isFriend = ref(false);
|
||||||
const isEnemy = ref(false);
|
const isEnemy = ref(false);
|
||||||
|
const team = ref<any>({});
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
await BindData();
|
await BindData();
|
||||||
@@ -79,6 +85,7 @@ const BindData = async (): Promise<void> => {
|
|||||||
onMap.value = result.data.onMapName;
|
onMap.value = result.data.onMapName;
|
||||||
isFriend.value = result.data.isFriend;
|
isFriend.value = result.data.isFriend;
|
||||||
isEnemy.value = result.data.isEnemy;
|
isEnemy.value = result.data.isEnemy;
|
||||||
|
team.value = result.data.team;
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}
|
}
|
||||||
else if (result.code == 101) {
|
else if (result.code == 101) {
|
||||||
|
|||||||
@@ -6,4 +6,28 @@ export class EquService {
|
|||||||
static async GetEquInfo(equId: number, ueId: string) {
|
static async GetEquInfo(equId: number, ueId: string) {
|
||||||
return await ApiService.Request("get", "/Equ/GetEquInfo", { equId, ueId });
|
return await ApiService.Request("get", "/Equ/GetEquInfo", { equId, ueId });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取套装详情
|
||||||
|
* GET /Equ/GetEquSuitInfo
|
||||||
|
*/
|
||||||
|
static async GetEquSuitInfo(suitCode: string) {
|
||||||
|
return await ApiService.Request("get", "/Equ/GetEquSuitInfo", { suitCode });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定操作
|
||||||
|
* GET /Equ/EquLock
|
||||||
|
*/
|
||||||
|
static async EquLock(ueId: string) {
|
||||||
|
return await ApiService.Request("get", "/Equ/EquLock", { ueId });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 穿/卸装备
|
||||||
|
* GET /Equ/DownOrUpEqu
|
||||||
|
*/
|
||||||
|
static async DownOrUpEqu(ueId: string) {
|
||||||
|
return await ApiService.Request("get", "/Equ/DownOrUpEqu", { ueId });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user