This commit is contained in:
aaron 2026-02-19 19:57:55 +08:00
parent 9cd5dc693c
commit ae743f9d39

View File

@ -1607,7 +1607,12 @@
});
const data = await response.json();
if (data.success) {
alert(`平仓成功!盈亏: ${data.result.pnl_percent.toFixed(2)}%`);
// 区分平仓和取消挂单
if (data.result.pnl_percent !== undefined) {
alert(`平仓成功!盈亏: ${data.result.pnl_percent.toFixed(2)}%`);
} else {
alert('挂单已取消');
}
this.refreshData();
} else {
alert('平仓失败: ' + (data.detail || '未知错误'));