12121
This commit is contained in:
BIN
Web/public/images/broad/award.gif
Normal file
BIN
Web/public/images/broad/award.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
BIN
Web/public/images/broad/gift.gif
Normal file
BIN
Web/public/images/broad/gift.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
Web/public/images/broad/hot1.gif
Normal file
BIN
Web/public/images/broad/hot1.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
Web/public/images/broad/promote.gif
Normal file
BIN
Web/public/images/broad/promote.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
BIN
Web/public/images/broad/remind.gif
Normal file
BIN
Web/public/images/broad/remind.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
Web/public/images/broad/system.gif
Normal file
BIN
Web/public/images/broad/system.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<img :src="BaseConfig.BaseMediaUrl + url" :class="_class" :alt="_alt">
|
||||
<span v-if="url != undefined">
|
||||
<img :src="BaseConfig.BaseMediaUrl + url" :class="_class" :alt="_alt">
|
||||
</span>
|
||||
</template>
|
||||
<script setup>
|
||||
import { BaseConfig } from "@/config/BaseConfig";
|
||||
@@ -8,6 +10,6 @@ const props = defineProps({
|
||||
// 字段名、类型、默认值
|
||||
url: String,
|
||||
_class: String,
|
||||
_alt:String
|
||||
_alt: String
|
||||
})
|
||||
</script>
|
||||
408
Web/src/components/Business/GameBroadcast.vue
Normal file
408
Web/src/components/Business/GameBroadcast.vue
Normal file
@@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<div class="content" v-if="data.length > 0">
|
||||
<div class="broad" v-for="item in data">
|
||||
<span :class="swCodeName(item.code, 1)">
|
||||
<i :class='swCodeName(item.code, 0)'></i>
|
||||
<span v-if="item.userId == '0'">海精灵</span>
|
||||
<span v-else>
|
||||
<Abar :href='"/user/user?no=" + item.userNo'>
|
||||
{{ item.nick }}
|
||||
</Abar>
|
||||
</span>:
|
||||
<span v-html="item.msg"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
// 1. 定义接收父组件传来的参数 props
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Array<any>,
|
||||
default: () => ([])
|
||||
}
|
||||
})
|
||||
|
||||
const swCodeName = (code: string, type: number) => {
|
||||
let result = '';
|
||||
switch (code) {
|
||||
case "Gift":
|
||||
if (type == 0) {
|
||||
result = "broad-gift";
|
||||
}
|
||||
else {
|
||||
result = "";
|
||||
}
|
||||
break;
|
||||
|
||||
case "System":
|
||||
if (type == 0) {
|
||||
result = "broad-system";
|
||||
}
|
||||
else {
|
||||
result = "masked";
|
||||
}
|
||||
break;
|
||||
|
||||
case "Award":
|
||||
if (type == 0) {
|
||||
result = "broad-award";
|
||||
}
|
||||
else {
|
||||
result = "masked1";
|
||||
}
|
||||
break;
|
||||
|
||||
case "Remind":
|
||||
if (type == 0) {
|
||||
result = "broad-remind";
|
||||
}
|
||||
else {
|
||||
result = "caise6";
|
||||
}
|
||||
break;
|
||||
|
||||
case "Promote":
|
||||
if (type == 0) {
|
||||
result = "broad-promote";
|
||||
}
|
||||
else {
|
||||
result = "caise7";
|
||||
}
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
</script>
|
||||
<style >
|
||||
.broad {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.broad-gift {
|
||||
background-image: url('/images/broad/gift.gif');
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-size: 18px; /*设置图片大小*/
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
}
|
||||
.broad-system {
|
||||
background-image: url('/images/broad/system.gif');
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-size: 18px; /*设置图片大小*/
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.broad-award {
|
||||
background-image: url('/images/broad/award.gif');
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-size: 18px; /*设置图片大小*/
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.broad-remind {
|
||||
background-image: url('/images/broad/remind.gif');
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-size: 18px; /*设置图片大小*/
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.broad-promote {
|
||||
background-image: url('/images/broad/promote.gif');
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-size: 18px; /*设置图片大小*/
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.broad-hot1 {
|
||||
background-image: url('/images/broad/hot1.gif');
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-size: 18px; /*设置图片大小*/
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.masked {
|
||||
display: inline;
|
||||
width: 200px;
|
||||
height: 22px;
|
||||
/*渐变背景*/
|
||||
|
||||
background-image: -webkit-linear-gradient(left, #3498db, #f47920 10%, #d71345 20%, #f7acbc 30%, #ffd400 40%, #3498db 50%, #f47920 60%, #d71345 70%, #f7acbc 80%, #ffd400 90%, #3498db);
|
||||
color: transparent;
|
||||
/*文字填充色为透明*/
|
||||
|
||||
-webkit-text-fill-color: transparent;
|
||||
-webkit-background-clip: text;
|
||||
/*背景剪裁为文字,只将文字显示为背景*/
|
||||
|
||||
background-size: 200% 100%;
|
||||
/*背景图片向水平方向扩大一倍,这样background-position才有移动与变化的空间*/
|
||||
/* 动画 */
|
||||
|
||||
animation: masked-animation 4s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes masked-animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
/*background-position 属性设置背景图像的起始位置。*/
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -100% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.masked2 {
|
||||
display: inline;
|
||||
width: 200px;
|
||||
height: 22px;
|
||||
/*渐变背景*/
|
||||
|
||||
background-image: -webkit-linear-gradient(left, #ffa080, #ffa060 10%, #ffa040 20%, #ffa020 30%, #ffa0a0 40%, #ffa080 50%, #ffa060 80%, #ffa040 70%, #ffa020 80%, #ffa000 90%, #ffff00);
|
||||
color: transparent;
|
||||
/*文字填充色为透明*/
|
||||
|
||||
-webkit-text-fill-color: transparent;
|
||||
-webkit-background-clip: text;
|
||||
/*背景剪裁为文字,只将文字显示为背景*/
|
||||
|
||||
background-size: 200% 100%;
|
||||
/*背景图片向水平方向扩大一倍,这样background-position才有移动与变化的空间*/
|
||||
/* 动画 */
|
||||
|
||||
animation: masked-animation 4s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes masked-animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
/*background-position 属性设置背景图像的起始位置。*/
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -100% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.masked1 {
|
||||
display: inline;
|
||||
width: 200px;
|
||||
height: 22px;
|
||||
/*渐变背景*/
|
||||
|
||||
background-image: -webkit-linear-gradient(left, #ff0080, #ff0060 10%, #ff0040 20%, #ff0020 30%, #ff00a0 40%, #ff0080 50%, #ff0060 80%, #ff0040 70%, #ff0020 80%, #ff0000 90%, #ffff00);
|
||||
color: transparent;
|
||||
/*文字填充色为透明*/
|
||||
|
||||
-webkit-text-fill-color: transparent;
|
||||
-webkit-background-clip: text;
|
||||
/*背景剪裁为文字,只将文字显示为背景*/
|
||||
|
||||
background-size: 200% 100%;
|
||||
/*背景图片向水平方向扩大一倍,这样background-position才有移动与变化的空间*/
|
||||
/* 动画 */
|
||||
|
||||
animation: masked-animation 4s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes masked-animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
/*background-position 属性设置背景图像的起始位置。*/
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -100% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.lmma {
|
||||
color: #ffff00;
|
||||
}
|
||||
|
||||
.caise_jt {
|
||||
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2), color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22));
|
||||
color: transparent;
|
||||
-webkit-background-clip: text;
|
||||
-moz-background-clip: text;
|
||||
-ms-background-clip: text;
|
||||
-o-background-clip: text
|
||||
}
|
||||
|
||||
.caise3 {
|
||||
/* 删除 -moz -ms -o 全部废弃前缀 */
|
||||
background: linear-gradient(180deg, #f2f, #fbd7c6, #fdefac, #bfb5dd, #bed5f5);
|
||||
/* 兼容webkit内核浏览器(Chrome/Edge/移动端) */
|
||||
background: -webkit-linear-gradient(180deg, #f2f, #fbd7c6, #fdefac, #bfb5dd, #bed5f5);
|
||||
|
||||
/* 移除多余 color: #f2f; 会被透明覆盖 */
|
||||
color: transparent;
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
|
||||
/* 滚动动画必备,之前缺失 */
|
||||
background-size: 200% 200%;
|
||||
animation: ran 5s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes ran {
|
||||
from {
|
||||
backgroud-position: 0 0;
|
||||
}
|
||||
|
||||
to {
|
||||
background-position: 200px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.caise4 {
|
||||
color: aqua;
|
||||
letter-spacing: 0;
|
||||
text-shadow: 0px 1px 0px #999, 0px 1px 0px #888, 0px 1px 0px #777, 0px 1px 0px #666, 0px 1px 0px #555, 0px 1px 0px #444, 0px 1px 0px #333, 0px 1px 7px #001135
|
||||
}
|
||||
|
||||
.caise5 {
|
||||
text-shadow: 1px 1px 6px deeppink;
|
||||
color: deeppink
|
||||
}
|
||||
|
||||
.caise6 {
|
||||
background-image: -webkit-linear-gradient(left, blue, #66ffff 10%, #cc00ff 20%, #CC00CC 30%, #CCCCFF 40%, #00FFFF 50%, #CCCCFF 60%, #CC00CC 70%, #CC00FF 80%, #66FFFF 90%, blue 100%);
|
||||
-webkit-text-fill-color: transparent;
|
||||
/* 将字体设置成透明色 */
|
||||
-webkit-background-clip: text;
|
||||
/* 裁剪背景图,使文字作为裁剪区域向外裁剪 */
|
||||
-webkit-background-size: 200% 100%;
|
||||
-webkit-animation: masked-animation 3s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes masked-animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -100% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.caise7 {
|
||||
--interval: 1s;
|
||||
text-shadow: 0 0 5px var(--color1), 0 0 5px var(--color2), 0 0 5px var(--color3), 0 0 5px var(--color4);
|
||||
will-change: filter, color;
|
||||
filter: saturate(60%);
|
||||
animation: flicker steps(100) var(--interval) 1s infinite;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(1) {
|
||||
color: yellow;
|
||||
--color1: azure;
|
||||
--color2: orangered;
|
||||
--color3: mediumblue;
|
||||
--color4: dodgerblue;
|
||||
font-family: Gruppo;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(2) {
|
||||
color: lightpink;
|
||||
--color1: pink;
|
||||
--color2: mediumblue;
|
||||
--color3: dodgerblue;
|
||||
--color4: azure;
|
||||
font-family: Bad Script;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(3) {
|
||||
color: lightyellow;
|
||||
--color1: yellow;
|
||||
--color2: dodgerblue;
|
||||
--color3: green;
|
||||
--color4: mediumblue;
|
||||
font-family: Kumar One Outline;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(4) {
|
||||
color: lightyellow;
|
||||
--color1: gold;
|
||||
--color2: dodgerblue;
|
||||
--color3: pink;
|
||||
--color4: azure;
|
||||
font-family: Londrina Outline;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(5) {
|
||||
color: azure;
|
||||
--color1: azure;
|
||||
--color2: aqua;
|
||||
--color3: dodgerblue;
|
||||
--color4: blue;
|
||||
font-family: Sriracha;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(6) {
|
||||
color: azure;
|
||||
--color1: green;
|
||||
--color2: pink;
|
||||
--color3: dodgerblue;
|
||||
--color4: green;
|
||||
font-family: Yellowtail;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(7) {
|
||||
color: lightyellow;
|
||||
--color1: yellow;
|
||||
--color2: orange;
|
||||
--color3: pink;
|
||||
--color4: purple;
|
||||
font-family: Bad Script;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(8) {
|
||||
color: yellow;
|
||||
--color1: yellow;
|
||||
--color2: pink;
|
||||
--color3: azure;
|
||||
--color4: pink;
|
||||
font-family: Monoton;
|
||||
}
|
||||
|
||||
.caise7:nth-of-type(9) {
|
||||
color: lightyellow;
|
||||
--color1: yellow;
|
||||
--color2: gold;
|
||||
--color3: azure;
|
||||
--color4: pink;
|
||||
font-family: Sriracha;
|
||||
}
|
||||
|
||||
@keyframes flicker {
|
||||
50% {
|
||||
color: white;
|
||||
filter: saturate(200%) hue-rotate(90deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
18
Web/src/components/Business/GamePropVerify.vue
Normal file
18
Web/src/components/Business/GamePropVerify.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="common" v-for="item in data">
|
||||
<div v-if="item.code == 'Goods'">
|
||||
▸<Abar :href='"/prop/goods?id=" + item.parameter'>{{ item.name }}</Abar>:({{ item.onCount }}/{{ item.count }})
|
||||
<span style="color: red;" v-if="item.isAsk == 0">(不满足)</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
▸{{ item.name }}:({{ item.onCount }}/{{ item.count }})
|
||||
<span style="color: red;" v-if="item.isAsk == 0">(不满足)</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
// 字段名、类型、默认值
|
||||
data: Array<any>
|
||||
})
|
||||
</script>
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<GameBroadcast :data="broadcast"></GameBroadcast>
|
||||
<div class="item" style="font-size:15px;">
|
||||
<span>[在线奖励]:3分钟后可领取.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ cityInfo.cityName }}·{{ mapInfo.mapName }}
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
@@ -119,6 +120,7 @@ const mapUser = ref<Array<any>>([]);
|
||||
const business = ref<Array<any>>([]);
|
||||
const mapRes = ref<Array<any>>([]);
|
||||
const messageCount = ref(0);
|
||||
const broadcast = ref<Array<any>>([]);
|
||||
// 城内地图显示
|
||||
const showCity = ref(false);
|
||||
|
||||
@@ -144,6 +146,7 @@ const BindData = async (map: string): Promise<void> => {
|
||||
messageCount.value = result.data.noReadMsg;
|
||||
business.value = result.data.business;
|
||||
mapRes.value = result.data.mapRes;
|
||||
broadcast.value = result.data.broadcast;
|
||||
MapVent(result.data.mapInfo.near);
|
||||
onMap.value = mapInfo.value.mapId;
|
||||
}
|
||||
@@ -289,4 +292,4 @@ const CollectRes = async () => {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -72,7 +72,9 @@
|
||||
强化等级:{{ equData.intensifyLev }}<br>
|
||||
</span>
|
||||
<span v-if="equAwaken.length > 0">
|
||||
<Abar href="">装备特性:{{ equAwaken[0].name }}({{ equAwaken[0].lev }}级)</Abar><br>
|
||||
<Abar :href='"/user/equ/awaken?ue=" + equData.ueId'>装备特性:{{ equAwaken[0].name }}({{ equAwaken[0].lev
|
||||
}}级)
|
||||
</Abar><br>
|
||||
</span>
|
||||
附魔:{{ equMent.name }}<br>
|
||||
负重:{{ equData.weight }}<br>
|
||||
@@ -114,28 +116,58 @@
|
||||
<div v-if="equData.isAppr == 0">
|
||||
(*该装备需要鉴定)
|
||||
</div>
|
||||
<div class="common" v-if="myUserId == equData.userId && equData.isAppr == 1">
|
||||
<span>
|
||||
<div class="common" v-if="myUserId == equData.userId">
|
||||
<span v-if="equData.isAppr == 1">
|
||||
◈<Abutton @click="UpOrDownEqu">{{ equData.isOn == 1 ? "卸下装备" : "穿戴装备" }}</Abutton><br>
|
||||
</span>
|
||||
<span>
|
||||
◈<Abutton>觉醒</Abutton><br>
|
||||
<span v-if="equData.isAppr == 1 && equData.isIntensify == 1">
|
||||
◈<Abar :href='"/user/equ/up?ue=" + equData.ueId'>强化</Abar><br>
|
||||
</span>
|
||||
<span>
|
||||
<span v-if="equData.isAppr == 1">
|
||||
◈<Abutton @click="btnOpenAwaken">觉醒</Abutton><br>
|
||||
</span>
|
||||
<span v-if="equData.isAppr == 1">
|
||||
◈<Abutton>洗练</Abutton><br>
|
||||
</span>
|
||||
<span>
|
||||
◈<Abutton @click="LockEqu">{{ equData.isLock == 0 ? "绑定" : "解绑" }}</Abutton><br>
|
||||
</span>
|
||||
<span>
|
||||
◈<Abar href="">寄售</Abar><br>
|
||||
<span v-if="equData.isOn == 0 && equData.isDeal == 1">
|
||||
◈<Abar href="/">寄售</Abar><br>
|
||||
</span>
|
||||
<span>
|
||||
<!-- <span>
|
||||
◈<Abutton>个性化</Abutton><br>
|
||||
</span>
|
||||
</span> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--觉醒-->
|
||||
<GamePopup v-model:show="showAwaken" title="【觉醒装备】" style="width: 60%;min-height: 30%;">
|
||||
<!-- 自定义内容 -->
|
||||
<div class="content">
|
||||
<div v-if="equAwaken.length == 0">
|
||||
装备暂未觉醒.
|
||||
</div>
|
||||
<div v-else>
|
||||
特性名称:{{ equAwaken[0].name }} <br>
|
||||
觉醒等级:{{ equAwaken[0].lev }} 级 <br>
|
||||
特性效果:{{ EquTool.GetEquAttrName(equAwaken[0].awaken, 0) }}<br>
|
||||
</div>
|
||||
<div>
|
||||
<strong>觉醒所需</strong>:<br>
|
||||
<GamePropVerify :data="awakenProp.needs"></GamePropVerify>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" style="max-height: 300px;text-align: center; margin-top: 15px;;" v-if="awakenProp.result">
|
||||
<van-button type="success" @click="btnEquAwaken(1)">
|
||||
觉醒装备
|
||||
</van-button>
|
||||
<van-button type="danger" @click="btnEquAwaken(0)" v-if="equAwaken.length > 0" style="margin-left: 5px;">
|
||||
重置觉醒
|
||||
</van-button>
|
||||
</div>
|
||||
</GamePopup>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -165,7 +197,6 @@ onMounted(async () => {
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let equId = PageExtend.QueryString("id");
|
||||
|
||||
let result = await EquService.GetEquInfo(Number(equId), ueId);
|
||||
if (result.code == 0) {
|
||||
equData.value = result.data.equData;
|
||||
@@ -175,7 +206,6 @@ const BindData = async (): Promise<void> => {
|
||||
equAwaken.value = result.data.equData.equAwaken;
|
||||
equMent.value = result.data.equData.equMent;
|
||||
gemMent.value = result.data.equData.gemMent;
|
||||
console.log(result);
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
@@ -209,4 +239,40 @@ const LockEqu = async () => {
|
||||
MessageExtend.ShowDialog("绑定装备", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**觉醒装备 */
|
||||
const showAwaken = ref(false);
|
||||
const awakenProp = ref<any>({});
|
||||
const btnOpenAwaken = async () => {
|
||||
MessageExtend.LoadingToast("觉醒初始化中...");
|
||||
let result = await EquService.GetEquAwakenInfo(ueId);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
showAwaken.value = true;
|
||||
awakenProp.value = result.data;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("装备觉醒", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
const btnEquAwaken = async (type: number) => {
|
||||
MessageExtend.LoadingToast("觉醒中...");
|
||||
let result = await EquService.HandleEquAwaken(ueId, type);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
if (result.data.state == 1) {
|
||||
MessageExtend.ShowToast(result.msg, "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowToast(result.msg, "fail");
|
||||
}
|
||||
equAwaken.value = result.data.awaken;
|
||||
awakenProp.value = result.data.result;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("装备觉醒", result.msg);
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -54,7 +54,7 @@
|
||||
<span v-if="item.isAppr == 0">(未鉴定)</span>
|
||||
<span v-if="item.useEndTime < onTime" style="color: red;">(过期)</span>
|
||||
<span v-if="item.durability < 1" style="color: red;">(损坏)</span>
|
||||
<span v-if="item.isLock == 1" style="color: green;">(锁)</span>
|
||||
<span v-if="item.isLock == 1" style="color: green;">(绑)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common" v-if="type == '1'">
|
||||
|
||||
48
Web/src/pages/user/equ/awaken.vue
Normal file
48
Web/src/pages/user/equ/awaken.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
【觉醒属性】<br>
|
||||
名称:{{ equData.equName }}<br>
|
||||
<span v-if="equData.equName != equData.unitEquName">
|
||||
装备名称:{{ equData.unitEquName }}<br>
|
||||
</span>
|
||||
部位:{{ EquTool.GetEquPlaceName(equData.code) }}<br>
|
||||
等级:{{ equData.lev }}
|
||||
</div>
|
||||
<div class="content" v-if="equAwaken.length > 0">
|
||||
特性名称:{{ equAwaken[0].name }} <br>
|
||||
觉醒等级:{{ equAwaken[0].lev }} 级 <br>
|
||||
特性效果:{{ EquTool.GetEquAttrName(equAwaken[0].awaken, 0) }}<br>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const equData = ref<any>({});
|
||||
const equAwaken = ref<Array<any>>([]);
|
||||
let ueId = PageExtend.QueryString("ue");
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await EquService.GetEquInfo(0, ueId);
|
||||
if (result.code == 0) {
|
||||
equData.value = result.data.equData;
|
||||
equAwaken.value = result.data.equData.equAwaken;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
147
Web/src/pages/user/equ/up.vue
Normal file
147
Web/src/pages/user/equ/up.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
【装备强化】<br>
|
||||
名称: <GameEqu :equ-data="equData" :show-url="false"></GameEqu><br>
|
||||
<span v-if="equData.equName != equData.unitEquName">
|
||||
装备名称:{{ equData.unitEquName }}<br>
|
||||
</span>
|
||||
部位:{{ EquTool.GetEquPlaceName(equData.code) }}<br>
|
||||
等级:{{ equData.lev }}<br>
|
||||
</div>
|
||||
<div class="content">
|
||||
当前强化等级:{{ equData.intensifyLev }}
|
||||
</div>
|
||||
<div class="content" v-if="isMax == false">
|
||||
➢强化所需:<br>
|
||||
<div class="common" v-for="item in needs">
|
||||
<span v-if="item.code == 'Goods'">
|
||||
▸<Abar :href='"/prop/goods?id=" + item.parameter'>{{ item.name }}</Abar>:({{ item.onCount }}/{{
|
||||
item.count }})
|
||||
<span style="color: red;" v-if="item.isAsk == 0">(不满足)</span>
|
||||
</span>
|
||||
<span v-else-if="item.code == 'copper'">
|
||||
▸{{ item.name }}:({{ GameTool.FormatCopper(item.onCount) }}/ {{ GameTool.FormatCopper(item.count) }})
|
||||
<span style="color: red;" v-if="item.isAsk == 0">(不满足)</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
▸{{ item.name }}:({{ item.onCount }}/{{ item.count }})
|
||||
<span style="color: red;" v-if="item.isAsk == 0">(不满足)</span>
|
||||
</span>
|
||||
<span v-if="item.needItem.length > 0">
|
||||
<Abutton @click="ChangeProp(item)">更换</Abutton>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-if="isMax == isMax && verifyData.result == true">
|
||||
[<Abutton @click="btnHandleEquUp">立即强化</Abutton>]
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content" style="font-size: 16px;;">
|
||||
强化说明:<br>
|
||||
1.强化仅在成功后扣除(正)龙泉水。<br>
|
||||
2.强化等级上限100级。<br>
|
||||
3.强化所需的其他材料可以通过游戏内获得,龙泉水可以通过商城/活动获得。<br>
|
||||
4.使用龙泉水装备会不可交易,使用正龙泉水装备自动为可交易状态。<br>
|
||||
</div>
|
||||
|
||||
<GamePopup v-model:show="showChange" title="【切换材料】" style="width: 60%;max-height: 30%;">
|
||||
<!-- 自定义内容 -->
|
||||
<div class="content" style="max-height: 300px;margin-top: 15px;;">
|
||||
<div class="item" v-for="(item, index) in changeData" :key="index">
|
||||
{{ index + 1 }}.<Abutton @click="ChangePropOk(item)">{{ item.name }}×{{ item.count }}</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
</GamePopup>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const equData = ref<any>({});
|
||||
const isMax = ref(true);
|
||||
const verifyData = ref<any>({});
|
||||
const needs = ref<Array<any>>([]);
|
||||
|
||||
let ueId = PageExtend.QueryString("ue");
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await EquService.GetEquUpInfo(ueId);
|
||||
console.log(result);
|
||||
if (result.code == 0) {
|
||||
equData.value = result.data.equData;
|
||||
isMax.value = result.data.isMax;
|
||||
verifyData.value = result.data.result;
|
||||
needs.value = verifyData.value.needs;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialogEvent("强化装备", result.msg, () => {
|
||||
PageExtend.RedirectTo("/prop/equ?ue=" + ueId);
|
||||
});
|
||||
}
|
||||
};
|
||||
const changeNum = ref(0);
|
||||
const changeData = ref<Array<any>>([]);
|
||||
const showChange = ref(false);
|
||||
const ChangeProp = (data: any) => {
|
||||
changeNum.value = data.id;
|
||||
changeData.value = data.needItem;
|
||||
showChange.value = true;
|
||||
}
|
||||
|
||||
const ChangePropOk = async (data: any) => {
|
||||
MessageExtend.LoadingToast("切换中...");
|
||||
needs.value.forEach(it => {
|
||||
if (it.id == changeNum.value) {
|
||||
it.name = data.name;
|
||||
it.code = data.code;
|
||||
it.parameter = data.parameter;
|
||||
it.count = data.count;
|
||||
}
|
||||
});
|
||||
let _needs = JSON.stringify(needs.value);
|
||||
let result = await BagService.CheckUserProp(_needs);
|
||||
console.log(result);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
verifyData.value = result.data;
|
||||
needs.value = verifyData.value.needs;
|
||||
showChange.value = false;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("材料切换", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**强化装备 */
|
||||
const btnHandleEquUp = async () => {
|
||||
MessageExtend.LoadingToast("强化中...");
|
||||
let _needs = JSON.stringify(needs.value);
|
||||
let result = await EquService.HandleEquUp(ueId, _needs);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
if (result.data.state == 1) {
|
||||
MessageExtend.ShowToast("强化成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowToast("强化失败!", "fail");
|
||||
}
|
||||
equData.value = result.data.equData;
|
||||
isMax.value = result.data.isMax;
|
||||
verifyData.value = result.data.result;
|
||||
needs.value = verifyData.value.needs;
|
||||
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("强化装备", result.msg);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -54,4 +54,39 @@ export class EquService {
|
||||
static async GetUserOnSuitInfo(suitCode: string) {
|
||||
return await ApiService.Request("get", "/Equ/GetUserOnSuitInfo", { suitCode });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取装备觉醒所需
|
||||
* GET /Equ/GetEquAwakenInfo
|
||||
*/
|
||||
static async GetEquAwakenInfo(ue: string) {
|
||||
return await ApiService.Request("get", "/Equ/GetEquAwakenInfo", { ue });
|
||||
}
|
||||
|
||||
/**
|
||||
* 觉醒装备
|
||||
* GET /Equ/HandleEquAwaken
|
||||
* @param type 0重置,1正常觉醒
|
||||
*/
|
||||
static async HandleEquAwaken(ue: string, type: number) {
|
||||
return await ApiService.Request("get", "/Equ/HandleEquAwaken", { ue, type });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取强化信息
|
||||
* GET /Equ/GetEquUpInfo
|
||||
*/
|
||||
static async GetEquUpInfo(ueId: string) {
|
||||
return await ApiService.Request("get", "/Equ/GetEquUpInfo", { ueId });
|
||||
}
|
||||
|
||||
/**
|
||||
* 强化装备
|
||||
* POST /Equ/HandleEquUp
|
||||
* @param ueId body
|
||||
* @param needs body
|
||||
*/
|
||||
static async HandleEquUp(ueId: string, needs: string) {
|
||||
return await ApiService.Request("post", "/Equ/HandleEquUp", { ueId, needs });
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,19 @@ export class BagService {
|
||||
}
|
||||
|
||||
/**
|
||||
* GetUserBagProp
|
||||
* 获取用户道具数据
|
||||
* GET /User/Bag/GetUserBagProp
|
||||
*/
|
||||
static async GetUserBagProp(type: number, ch: number, query: string, page: number) {
|
||||
return await ApiService.Request("get", "/User/Bag/GetUserBagProp", { type, ch, query, page });
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证用户道具
|
||||
* POST /User/Bag/CheckUserProp
|
||||
* @param needs body
|
||||
*/
|
||||
static async CheckUserProp(needs: string) {
|
||||
return await ApiService.Request("post", "/User/Bag/CheckUserProp", { needs });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user