update pay function
This commit is contained in:
BIN
__pycache__/app.cpython-310.pyc
Normal file
BIN
__pycache__/app.cpython-310.pyc
Normal file
Binary file not shown.
@@ -140,9 +140,17 @@ const PredictionTopicDetail = () => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取选项数据
|
// 获取选项数据(从后端扁平结构映射到前端使用的嵌套结构)
|
||||||
const yesData = topic.positions?.yes || { total_shares: 0, current_price: 500, lord_id: null };
|
const yesData = {
|
||||||
const noData = topic.positions?.no || { total_shares: 0, current_price: 500, lord_id: null };
|
total_shares: topic.yes_total_shares || 0,
|
||||||
|
current_price: topic.yes_price || 500,
|
||||||
|
lord_id: topic.yes_lord_id || null,
|
||||||
|
};
|
||||||
|
const noData = {
|
||||||
|
total_shares: topic.no_total_shares || 0,
|
||||||
|
current_price: topic.no_price || 500,
|
||||||
|
lord_id: topic.no_lord_id || null,
|
||||||
|
};
|
||||||
|
|
||||||
// 计算总份额
|
// 计算总份额
|
||||||
const totalShares = yesData.total_shares + noData.total_shares;
|
const totalShares = yesData.total_shares + noData.total_shares;
|
||||||
|
|||||||
Reference in New Issue
Block a user