121212
This commit is contained in:
@@ -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://v3.pccsh.com";
|
||||
// public static BaseMediaUrl:string="http://v3.pccsh.com";
|
||||
// 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";
|
||||
}
|
||||
|
||||
51
Web/src/pages/business/cdk.vue
Normal file
51
Web/src/pages/business/cdk.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
CDK兑换
|
||||
</div>
|
||||
<div class="module-content tips" style="font-size:14px;">
|
||||
亲爱的航海家,CDK码可以在这里兑换奖励哦!
|
||||
</div>
|
||||
<div class="module-content">
|
||||
<div class="input">
|
||||
CDK码:<input name="cdk" placeholder="请输入CDK" class="ipt" type="text" v-model="no">
|
||||
</div>
|
||||
<div class="input" style="margin-top: 10px;">
|
||||
<input type="button" value="立即兑换" class="btn btn-danger" @click="exchange" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
|
||||
const no = ref('');
|
||||
onMounted(async () => {
|
||||
try {
|
||||
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const exchange = async () => {
|
||||
if (no.value == '') {
|
||||
MessageExtend.ShowToast("CDK不能为空!");
|
||||
return;
|
||||
}
|
||||
MessageExtend.LoadingToast("兑换中...");
|
||||
let result = await CdkService.Exchange(no.value);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
no.value = '';
|
||||
MessageExtend.Notify(result.msg, "success", 5000);
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -12,6 +12,11 @@
|
||||
◈<Abar :href="item.url">{{ item.name }}</Abar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-if="data.code == 'Event'">
|
||||
<div class="item" v-for="item in data.bus">
|
||||
◈<Abutton @click="HandleEvent(item)">{{ item.name }}</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-if="data.code == 'Task'">
|
||||
<div class="common" v-if="task.length > 0">
|
||||
当前任务:<br>
|
||||
@@ -21,7 +26,7 @@
|
||||
<Abar :href='"/task/info?task=" + item.itemId'>[{{ item.code }}]{{ item.name }}</Abar>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div class="item" v-for="item in data.bus">
|
||||
◈<Abar :href="item.url">{{ item.name }}</Abar>
|
||||
</div>
|
||||
@@ -61,4 +66,20 @@ const BindData = async (): Promise<void> => {
|
||||
}
|
||||
};
|
||||
|
||||
const HandleEvent = async (item: any) => {
|
||||
let npc = PageExtend.QueryString("npc");
|
||||
MessageExtend.LoadingToast("处理中...");
|
||||
let result = await MapService.HandleNpcEvent(Number(npc), item.code, item.parms)
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
MessageExtend.Notify(result.msg, "success");
|
||||
if (result.data == 0) {
|
||||
PageExtend.RedirectTo("/map");
|
||||
}
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
➢<Abar href="/user/friend/search">添加好友</Abar>
|
||||
➢<Abar href="/user/search">添加好友</Abar>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item" v-for="item in maxList" :key="item.umnId">
|
||||
<Aimage :url="item.img"></Aimage>
|
||||
<span @click="getDetail(item.umnId)" style="margin: 0 4px;">{{ item.name }} ×{{ item.count }}</span>
|
||||
<Abutton @click="updown(item.umnId)"> {{ item.show == 0 ? '佩戴' : '卸下' }} </Abutton>
|
||||
<Aimage :url="item.img"></Aimage><br>
|
||||
<Abutton @click="getDetail(item.umnId)">{{ item.name }}</Abutton>({{ item.count }}次)
|
||||
[<Abutton @click="updown(item.umnId)"> {{ item.show == 0 ? '佩戴' : '卸下' }} </Abutton>]
|
||||
</div>
|
||||
<span v-if="maxList.length==0">
|
||||
<span v-if="maxList.length == 0">
|
||||
暂无称号.
|
||||
</span>
|
||||
</div>
|
||||
@@ -22,11 +22,12 @@
|
||||
<div class="mapList" style="max-height: 300px;margin-top: 15px;">
|
||||
|
||||
<div>
|
||||
<Aimage :url="maxDetail.img"></Aimage>
|
||||
<Aimage :url="maxDetail.img"></Aimage><br>
|
||||
到期时间:{{TimeExtend.Format(maxDetail.endTime,"yyyy-MM-dd HH:mm")}}
|
||||
</div>
|
||||
|
||||
<div class="forum-title" style="padding: 0;">
|
||||
装备属性
|
||||
称号属性
|
||||
</div>
|
||||
<div v-for="(tipItem, index) in JSON.parse(maxDetail.attr)" :key="index">
|
||||
{{ Number(index) + 1 }}: {{ tipItem.tip }}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<div class="common">
|
||||
<div class="input">
|
||||
玩家ID:<input name="no" type="number" placeholder="输入玩家ID" maxlength="12" class="ipt" v-model="no" />
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="button"" class=" btn btn-danger" value="查找玩家" @click="search" />
|
||||
</div>
|
||||
<div class="input" style="margin-top: 5px;">
|
||||
<input type="button" class=" btn btn-danger" value="查找玩家" @click="search" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
9
Web/src/services/Index/CdkService.ts
Normal file
9
Web/src/services/Index/CdkService.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class CdkService {
|
||||
/**
|
||||
* 兑换CDK
|
||||
* GET /Cdk/Exchange
|
||||
*/
|
||||
static async Exchange(cdk: string) {
|
||||
return await ApiService.Request("get", "/Cdk/Exchange", { cdk });
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,14 @@ export class MapService {
|
||||
return await ApiService.Request("get", "/Map/Map/GetNpcInfo", { npcId });
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理Npc事务
|
||||
* GET /Map/Map/HandleNpcEvent
|
||||
*/
|
||||
static async HandleNpcEvent(npcId: number, code: string, parms: string) {
|
||||
return await ApiService.Request("get", "/Map/Map/HandleNpcEvent", { npcId, code, parms });
|
||||
}
|
||||
|
||||
/**
|
||||
* 采集接口
|
||||
* GET /Map/Map/CollectMapRes
|
||||
|
||||
Reference in New Issue
Block a user