feat: 完善对接接口

This commit is contained in:
橙子
2025-03-09 16:21:39 +08:00
parent b48f584db8
commit d605809932
9 changed files with 311 additions and 55 deletions

View File

@@ -46,4 +46,22 @@ export function getStockMarkets() {
url: "/stock/markets",
method: "get"
});
}
// 买入股票
export function buyStock(data) {
return request({
url: "/stock/buy",
method: "post",
data
});
}
// 卖出股票
export function sellStock(params) {
return request({
url: "/stock/sell",
method: "delete",
params
});
}

View File

@@ -75,9 +75,9 @@ export function getUserProfile() {
}
// 查询bbs个人信息
export function getBbsUserProfile(userName) {
export function getBbsUserProfile(userNameOrId) {
return request({
url: `/bbs-user/${userName}`,
url: `/bbs-user/${userNameOrId}`,
method: "get",
});
}