1212
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
{{ item.nick }}
|
||||
</Abar>
|
||||
</span>:
|
||||
<span v-html="item.msg"></span>
|
||||
<span v-html="item.msg" @click="HtmlEvent"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<template>
|
||||
<span v-if="showUrl == false">
|
||||
<span v-html="EquTool.ConvertEquName(equData,showLev)"></span>
|
||||
<span v-html="EquTool.ConvertEquName(equData, showLev)"></span>
|
||||
</span>
|
||||
<router-link v-if="showUrl" :to='"/prop/equ?ue=" + equData.ueId'>
|
||||
<span v-html="EquTool.ConvertEquName(equData,showLev)"></span>
|
||||
</router-link>
|
||||
<Abar :href='"/prop/equ?ue=" + equData.ueId' v-if="showUrl"><span
|
||||
v-html="EquTool.ConvertEquName(equData, showLev)"></span> </Abar>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
// 1. 定义接收父组件传来的参数 props
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
统一配置中心
|
||||
*/
|
||||
export class BaseConfig {
|
||||
// public static BaseUrl: string = 'https://localhost:7198'
|
||||
// public static BaseMediaUrl: string = 'https://localhost:7198/'
|
||||
public static BaseUrl:string="http://kx.iyba.cn:5291";
|
||||
public static BaseMediaUrl:string="http://kx.iyba.cn:5291";
|
||||
public static BaseUrl: string = 'https://localhost:7198'
|
||||
public static BaseMediaUrl: string = 'https://localhost:7198/'
|
||||
// public static BaseUrl:string="http://kx.iyba.cn:5291";
|
||||
// public static BaseMediaUrl:string="http://kx.iyba.cn:5291";
|
||||
}
|
||||
|
||||
@@ -1 +1,51 @@
|
||||
<template></template>
|
||||
<template>
|
||||
<div class="content">
|
||||
【排行榜】
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=0">等级排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=8">铜贝排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=1">攻击排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=2">防御排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=3">敏捷排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=4">体力排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=5">士气排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=6">幸运排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=9">师德排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=10">声望排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=7">战力排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=11">魅力排行</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
✧<Abar href="/rank/info?id=12">亲密度排行</Abar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: layout.default
|
||||
})
|
||||
</script>
|
||||
|
||||
97
Web/src/pages/rank/info.vue
Normal file
97
Web/src/pages/rank/info.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
【{{ name }}】
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
<GameUser :data="item.user"></GameUser>({{ item.sign }})
|
||||
</div>
|
||||
<span v-if="data.length == 0">
|
||||
暂无排行.
|
||||
</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Pagination :currentPage="currentPage" :limit="10" :total="total" @pageChange="handlePageChange" />
|
||||
</div>
|
||||
<div class="content" style="font-size: 14px;margin-top: 15px;">
|
||||
*{{ timeTips }}
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
|
||||
const currentPage = ref<number>(1);
|
||||
const total = ref<number>(0);
|
||||
const data = ref<Array<any>>([]);
|
||||
const timeTips = ref("");
|
||||
const name = ref("");
|
||||
let type = PageExtend.QueryString("id");
|
||||
onMounted(async () => {
|
||||
try {
|
||||
name.value = GetRankName(Number(type));
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await RankService.GetRankData(Number(type), currentPage.value);
|
||||
if (result.code == 0) {
|
||||
data.value = result.data.data;
|
||||
total.value = result.data.total;
|
||||
timeTips.value = result.data.upTime;
|
||||
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
/**翻页 */
|
||||
const handlePageChange = async (page: number): Promise<void> => {
|
||||
currentPage.value = page;
|
||||
await BindData();
|
||||
};
|
||||
|
||||
const GetRankName = (type: number) => {
|
||||
let result = '';
|
||||
switch (type) {
|
||||
case 0:
|
||||
result = "等级排行榜"; break;
|
||||
case 1:
|
||||
result = "攻击排行榜"; break;
|
||||
case 2:
|
||||
result = "防御排行榜"; break;
|
||||
case 3:
|
||||
result = "敏捷排行榜"; break;
|
||||
case 4:
|
||||
result = "体力排行榜"; break;
|
||||
case 5:
|
||||
result = "士气排行榜"; break;
|
||||
case 6:
|
||||
result = "幸运排行榜"; break;
|
||||
case 7:
|
||||
result = "战力排行榜"; break;
|
||||
case 8:
|
||||
result = "铜贝排行榜"; break;
|
||||
case 9:
|
||||
result = "师德排行榜"; break;
|
||||
case 10:
|
||||
result = "声望排行榜"; break;
|
||||
case 11:
|
||||
result = "魅力排行榜"; break;
|
||||
case 12:
|
||||
result = "亲密排行榜"; break;
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -7,20 +7,20 @@
|
||||
</div>
|
||||
<div class="common serch">
|
||||
搜索内容:<input type="text" class="search-ipt" v-model="serch">
|
||||
<button class="ipt-btn" name="serch" @click="BindData">搜索</button>
|
||||
<button class="ipt-btn" name="serch" @click="refData">搜索</button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="common" v-if="type == '0'">
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
<Abar :href='"/prop/goods?ue=" + item.ueId'>{{ item.equName }}({{ item.lev }}级)</Abar>
|
||||
<Abar :href='"/prop/equ?ue=" + item.ueId'>{{ item.equName }}({{ item.lev }}级)</Abar>
|
||||
[<Abutton @click="SaleView(item)">出售</Abutton>]
|
||||
</div>
|
||||
</div>
|
||||
<div class="common" v-if="type == '1'">
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
<Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.goodsName }}({{item.count}})</Abar>
|
||||
<Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.goodsName }}({{ item.count }})</Abar>
|
||||
[<Abutton @click="SaleView(item)">出售</Abutton>]
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,16 +28,19 @@
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
<span v-if="item.code == 'Card'">
|
||||
<Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.goodsName }}({{item.count}})</Abar>
|
||||
<Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.goodsName }}({{ item.count }})</Abar>
|
||||
</span>
|
||||
<span v-else>
|
||||
<Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.goodsName }}({{item.count}})</Abar>
|
||||
<Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.goodsName }}({{ item.count }})</Abar>
|
||||
</span>
|
||||
[<Abutton @click="SaleView(item)">出售</Abutton>]
|
||||
</div>
|
||||
</div>
|
||||
<span v-if="data.length == 0">暂无.</span>
|
||||
</div>
|
||||
<div class="content" v-if="type == '0'">
|
||||
➣<Abutton @click="bathSale">一键出售装备</Abutton>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Pagination :currentPage="currentPage" :limit="10" :total="total" @pageChange="handlePageChange" />
|
||||
</div>
|
||||
@@ -85,13 +88,18 @@ const BindData = async (): Promise<void> => {
|
||||
let result = await StoreService.GetNpcSale(Number(npcId), Number(type.value), serch.value, currentPage.value);
|
||||
if (result.code == 0) {
|
||||
data.value = result.data.data;
|
||||
total.value = result.data.total;
|
||||
total.value = result.data.total;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
const refData = async () => {
|
||||
currentPage.value = 1;
|
||||
await BindData();
|
||||
}
|
||||
|
||||
/**翻页 */
|
||||
const handlePageChange = async (page: number): Promise<void> => {
|
||||
currentPage.value = page;
|
||||
@@ -131,11 +139,29 @@ const SaleOk = async (): Promise<void> => {
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
showSale.value = false;
|
||||
MessageExtend.Notify(result.msg,"success");
|
||||
MessageExtend.Notify(result.msg, "success");
|
||||
await BindData();
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
const bathSale = async () => {
|
||||
if (type.value == '0') {
|
||||
MessageExtend.ShowConfirmDialogAsyc("出售装备", `您确定要出售当前装备吗?`, async () => {
|
||||
let npcId = LocalStorageHelper.GetOnNpc();
|
||||
let result = await StoreService.BathSaleEqu(Number(npcId), serch.value);
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify(result.msg, "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.Notify(result.msg, "danger");
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -23,7 +23,7 @@
|
||||
师德:{{ accData.teach }}<br>
|
||||
声望:{{ accData.renown }}<br>
|
||||
活力:{{ vitality }}<br>
|
||||
罪恶值:0<br>
|
||||
罪恶值:{{ accData.enemy }}<br>
|
||||
帮派:无<br>
|
||||
<div v-if="buff.length > 0">
|
||||
---◈BUFF状态◈---<br>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
坐骑:无<br>
|
||||
成就:<br>
|
||||
个性签名:{{ userData.sign }}<br>
|
||||
罪恶值:0<br>
|
||||
罪恶值:{{ accData.enemy }}<br>
|
||||
师德:{{ accData.teach }}<br>
|
||||
</div>
|
||||
<div class="content">
|
||||
@@ -98,6 +98,9 @@
|
||||
<div class="content" v-if="team.state == 1">
|
||||
队伍:<Abar :href='"/user/team/info?id=" + team.team.teamId'>{{ team.team.name }}</Abar>
|
||||
</div>
|
||||
<div class="content" v-if="isPk">
|
||||
<Abutton @click="FightAtk">攻击</Abutton>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -112,6 +115,7 @@ const online = ref(0);
|
||||
const onMap = ref('');
|
||||
const isFriend = ref(false);
|
||||
const isEnemy = ref(false);
|
||||
const isPk = ref(false);
|
||||
const team = ref<any>({});
|
||||
/**装备定义 */
|
||||
const equ = ref<Array<any>>([]);
|
||||
@@ -150,7 +154,7 @@ const BindData = async (): Promise<void> => {
|
||||
isFriend.value = result.data.isFriend;
|
||||
isEnemy.value = result.data.isEnemy;
|
||||
team.value = result.data.team;
|
||||
|
||||
isPk.value = result.data.isPk;
|
||||
equ.value = result.data.equ;
|
||||
suit.value = result.data.suit;
|
||||
Hold.value = equ.value.filter(it => it.code == 'Hold');
|
||||
@@ -163,6 +167,7 @@ const BindData = async (): Promise<void> => {
|
||||
Fashion.value = equ.value.filter(it => it.code == 'Fashion');
|
||||
Wing.value = equ.value.filter(it => it.code == 'Wing');
|
||||
Decorate.value = equ.value.filter(it => it.code == 'Decorate');
|
||||
console.log(result);
|
||||
|
||||
}
|
||||
else if (result.code == 101) {
|
||||
@@ -210,4 +215,17 @@ const AddEnemy = async (): Promise<void> => {
|
||||
});
|
||||
}
|
||||
|
||||
const FightAtk = async () => {
|
||||
let no = PageExtend.QueryString("no");
|
||||
MessageExtend.LoadingToast("战斗初始化...");
|
||||
let result = await FightService.FightPerson(no);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
return PageExtend.Redirect("/fight?f=" + result.data);
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -10,6 +10,14 @@ export class FightService {
|
||||
return await ApiService.Request("post", "/Fight/FightMonster", { type, monsterId, sign });
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色战斗生成
|
||||
* GET /Fight/FightPerson
|
||||
*/
|
||||
static async FightPerson(no: string) {
|
||||
return await ApiService.Request("get", "/Fight/FightPerson", { no });
|
||||
}
|
||||
|
||||
/**
|
||||
* 战斗接口
|
||||
* POST /Fight/Fight
|
||||
|
||||
9
Web/src/services/Index/RankService.ts
Normal file
9
Web/src/services/Index/RankService.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class RankService {
|
||||
/**
|
||||
* 获取排名数据
|
||||
* GET /Rank/GetRankData
|
||||
*/
|
||||
static async GetRankData(type: number, page: number) {
|
||||
return await ApiService.Request("get", "/Rank/GetRankData", { type, page });
|
||||
}
|
||||
}
|
||||
@@ -38,4 +38,12 @@ export class StoreService {
|
||||
static async Sale(npcId: number, count: number, search: string, type: number, id: string) {
|
||||
return await ApiService.Request("post", "/Map/Store/Sale", { npcId, count, search, type, id });
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量出售装备
|
||||
* GET /Map/Store/BathSaleEqu
|
||||
*/
|
||||
static async BathSaleEqu(npcId: number, query: string) {
|
||||
return await ApiService.Request("get", "/Map/Store/BathSaleEqu", { npcId, query });
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ export class FightTool {
|
||||
if (this.randomTrigger(atkUser.del_Fashion)) {
|
||||
if (defUser.code == 'Person') {
|
||||
remData.push({
|
||||
"code": "equ",
|
||||
"code": "Equ",
|
||||
"par": "Fashion",
|
||||
"count": 1
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user