This commit is contained in:
Putoo
2026-07-11 18:52:38 +08:00
parent dec8c2e076
commit c40f3711bc
27 changed files with 577 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

View File

@@ -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://v3.pccsh.com";
// public static BaseMediaUrl:string="http://v3.pccsh.com";
}

View File

@@ -1 +1,82 @@
<template></template>
<template>
<div class="module-title">
赠送礼物
</div>
<div class="module-content">
<div class="common">
赠送给<Abar :href='"/user/user?no=" + data.userNo'>{{ data.nick }}</Abar>(ID:{{ data.userNo }})
</div>
<div class="item" v-for="(item, index) in goods" :key="index">
{{ index + 1 }}.<Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.goodsName }}</Abar>({{ item.count }})
[<Abutton @click="showView(item)">赠送</Abutton>]
</div>
<span v-if="goods.length == 0">暂无礼物.</span>
</div>
<GamePopup v-model:show="showInfo" title="【赠送礼物】" style="width: 50%;">
<div class="common" style="margin-top: 10px;">
物品名称{{ onShow.goodsName }}<br>
物品数量{{ onShow.count }}<br>
<span style="font-size: 16px;">赠送数量:</span><input type="number" class="search-ipt" v-model="giveCount">
</div>
<div class="common" style="text-align: center;">
<button class="ipt-btn" name="serch" @click="GiveOk" style="margin-top: 15px;">赠送</button>
</div>
</GamePopup>
</template>
<script setup lang="ts">
definePageMeta({
layout: layout.default,
middleware: middleware.loading
})
const data = ref<any>({});
const goods = ref<Array<any>>([]);
const showInfo = ref(false);
const onShow = ref<any>({});
const giveCount = ref(1);
onMounted(async () => {
try {
await BindData();
}
finally {
PageLoading.Close();
}
})
const BindData = async () => {
let no = PageExtend.QueryString("no");
let result = await GiveService.GetUserGiftGoods(no);
if (result.code == 0) {
data.value = result.data;
goods.value = result.data.data;
}
else {
MessageExtend.ShowDialog("赠送礼物", result.msg);
}
console.log(result);
}
const showView = (data: any) => {
showInfo.value = true;
giveCount.value = 1;
onShow.value = data;
}
const GiveOk = async () => {
let no = PageExtend.QueryString("no");
MessageExtend.LoadingToast("赠送中...");
let result = await GiveService.ToGift(no, onShow.value.goodsId, giveCount.value);
MessageExtend.LoadingClose();
if (result.code == 0) {
showInfo.value = false;
await BindData();
MessageExtend.Notify("赠送成功!", "success");
}
else {
MessageExtend.ShowDialog("提示", result.msg);
}
}
</script>

View File

@@ -1,3 +1,54 @@
<template>
暂未开放.
</template>
<div class="module-title">
礼物记录
</div>
<div class="module-content">
<div class="border-btm" v-for="(item, index) in data" :key="index">
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
收到[<GameUser :data="item.from" :show-icon="0"></GameUser>]赠送
<img :src="item.img" :alt="item.name"> ×{{item.count}}
</div>
<span v-if="data.length == 0">暂无.</span>
</div>
<div class="content">
<Pagination :currentPage="currentPage" :limit="10" :total="total" @pageChange="handlePageChange" />
</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 no = PageExtend.QueryString("no");
onMounted(async () => {
try {
await BindData();
}
finally {
PageLoading.Close();
}
})
const BindData = async (): Promise<void> => {
let result = await GiveService.GetGiftLog(no, currentPage.value);
if (result.code == 0) {
data.value = result.data.data;
total.value = result.data.total;
}
else {
MessageExtend.ShowDialog("提示", result.msg);
}
};
/**翻页 */
const handlePageChange = async (page: number): Promise<void> => {
currentPage.value = page;
await BindData();
};
</script>

View File

@@ -6,7 +6,8 @@
性别:<Abar href="/user/sex">{{ userData.sex }}</Abar><br>
<Abar href="/privilege/">特权</Abar>:<br>
徽章:<Abar href="/user/badge/">显示</Abar><br>
社交:<Abar href="/user/gift">未收到礼物</Abar><br>
社交:
<Abar href="/user/gift">{{ gift == '' ? "未收到礼物" : gift }}</Abar><br>
婚姻:单身<br>
个性签名:{{ userData.sign }}<Abar href="/user/sign">修改</Abar><br>
宠物:暂无<br>
@@ -74,6 +75,7 @@ const attrData = ref<any>({});
const accData = ref<any>({});
const buff = ref<Array<any>>([]);
const stock = ref<Array<any>>([]);
const gift = ref('');
onMounted(async () => {
try {
@@ -96,6 +98,7 @@ const BindData = async (): Promise<void> => {
accData.value = result.data.acc;
buff.value = result.data.buff;
stock.value = result.data.stock;
gift.value = result.data.gift;
console.log(result);
}
else {

View File

@@ -3,7 +3,7 @@
<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/master/add">拜师</Abar>. <Abar :href='"/trade/user?no=" + userData.userNo'>交易</Abar>. <Abar
href="/bag/give">送道具</Abar><br>
href="/user/bag/give">送道具</Abar><br>
<Abutton @click="FriendHandle">{{ isFriend ? "删除好友" : "加好友" }}</Abutton>
<span v-if="isEnemy == false">
.<Abutton @click="AddEnemy">加仇人</Abutton>
@@ -15,7 +15,9 @@
昵称:{{ userData.nick }}<br>
特权:<br>
徽章:<br>
社交: 暂无<br>
社交: <span v-if="gift != ''">
<Abar :href='"/user/gift?no=" + userData.userNo'>{{ gift }}</Abar>
</span><br>
婚姻:<br>
结拜:暂无<br>
宠物:暂无<br>
@@ -117,6 +119,7 @@ const isFriend = ref(false);
const isEnemy = ref(false);
const isPk = ref(false);
const team = ref<any>({});
const gift = ref('');
/**装备定义 */
const equ = ref<Array<any>>([]);
const suit = ref<Array<any>>([]);
@@ -154,6 +157,7 @@ const BindData = async (): Promise<void> => {
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;

View File

@@ -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 });
}
}