update
This commit is contained in:
parent
9cd5dc693c
commit
ae743f9d39
@ -1607,7 +1607,12 @@
|
|||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
if (data.success) {
|
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();
|
this.refreshData();
|
||||||
} else {
|
} else {
|
||||||
alert('平仓失败: ' + (data.detail || '未知错误'));
|
alert('平仓失败: ' + (data.detail || '未知错误'));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user