Commit d1892909 authored by 俞嘉婷's avatar 俞嘉婷

feat: 10.我的持仓列表 修改展示内容为累计收益、持仓金额

parent 32be2a02
......@@ -212,6 +212,8 @@ export default [
"realBuyJumpUrl": `https://www.baidu.com?t=${(index + 1)}`,
"rate": 502, // 利率(需要除100展示)
"type": index === 0 ? '0' : '1', // 产品类型(0-非现金,1-现金)
"totalProfit": Math.random() * 1000000 >> 0, // 累计收益,mineProduct为true时有值,单位:分
"positionMoney": Math.random() * 1000000 >> 0, // 持仓金额,mineProduct为true时有值,单位:分
}
}),
"codeList": [
......
......@@ -379,14 +379,28 @@ class HomePage extends React.Component<any, any> {
{curTabProductList?.map((item, index) => (
<div className="b_product_item" key={`r_prdct_${index}`}>
<span className="b_product_name">{item.name}</span>
<div className="b_product_rate">
{!!item.rate && <span className="b_product_rate_value">{(item.rate / 100).toFixed(2)}%</span>}
<span className="b_product_rate_label">{RATE_NAME[item.type] || '年化收益率'}</span>
</div>
<div className="b_product_shu">
<span className="b_product_shu_value">{item.shenShuGuiZei}</span>
<span className="b_product_shu_label">{item.fengXian}{item.qigouText}</span>
</div>
{curTab == 2
? <>
<div className="b_product_rate">
{!!item.rate && <span className="b_product_rate_value">{this.settleMoney(item.totalProfit || 0)}</span>}
<span className="b_product_rate_label">累计收益</span>
</div>
<div className="b_product_shu">
<span className="b_product_shu_value">{this.settleMoney(item.positionMoney || 0)}</span>
<span className="b_product_shu_label">持仓金额</span>
</div>
</>
: <>
<div className="b_product_rate">
{!!item.rate && <span className="b_product_rate_value">{(item.rate / 100).toFixed(2)}%</span>}
<span className="b_product_rate_label">{RATE_NAME[item.type] || '年化收益率'}</span>
</div>
<div className="b_product_shu">
<span className="b_product_shu_value">{item.shenShuGuiZei}</span>
<span className="b_product_shu_label">{item.fengXian}{item.qigouText}</span>
</div>
</>
}
<Button className="detail_btn_1" onClick={() => this.jumpVirtualDetailHandle(item)}></Button>
<span className="b_product_line"></span>
</div>
......
......@@ -124,6 +124,8 @@ class Store {
mineProduct?: boolean, // 我的产品(true是)
rate?: number, // 利率(需要除100展示)
type?: string, // 产品类型(0-非现金,1-现金)
totalProfit?: number, // 累计收益,mineProduct为true时有值,单位:分
positionMoney?: number, // 持仓金额,mineProduct为true时有值,单位:分
}>,
// 待存储产品code
codeList?: Array<{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment