2222
This commit is contained in:
@@ -30,4 +30,12 @@ export class MapService {
|
||||
static async GetAutoMapPath(toMap: string) {
|
||||
return await ApiService.Request("get", "/Map/Map/GetAutoMapPath", { toMap });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取NPC相关信息
|
||||
* GET /Map/Map/GetNpcInfo
|
||||
*/
|
||||
static async GetNpcInfo(npcId: number) {
|
||||
return await ApiService.Request("get", "/Map/Map/GetNpcInfo", { npcId });
|
||||
}
|
||||
}
|
||||
41
Web/src/services/map/StoreService.ts
Normal file
41
Web/src/services/map/StoreService.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
export class StoreService {
|
||||
/**
|
||||
* 获取npc商店信息
|
||||
* GET /Map/Store/GetNpcStore
|
||||
*/
|
||||
static async GetNpcStore(npcId: number, page: number) {
|
||||
return await ApiService.Request("get", "/Map/Store/GetNpcStore", { npcId, page });
|
||||
}
|
||||
|
||||
/**
|
||||
* 购买物品
|
||||
* POST /Map/Store/Buy
|
||||
* @param npcId body
|
||||
* @param storeId body
|
||||
* @param count body
|
||||
*/
|
||||
static async Buy(npcId: number, storeId: string, count: number) {
|
||||
return await ApiService.Request("post", "/Map/Store/Buy", { npcId, storeId, count });
|
||||
}
|
||||
|
||||
/**
|
||||
* 出售物品
|
||||
* GET /Map/Store/GetNpcSale
|
||||
*/
|
||||
static async GetNpcSale(npcId: number, type: number, query: string, page: number) {
|
||||
return await ApiService.Request("get", "/Map/Store/GetNpcSale", { npcId, type, query, page });
|
||||
}
|
||||
|
||||
/**
|
||||
* 出售物品
|
||||
* POST /Map/Store/Sale
|
||||
* @param npcId body
|
||||
* @param count body
|
||||
* @param search body
|
||||
* @param type body
|
||||
* @param id body
|
||||
*/
|
||||
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 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user