Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
华
华夏模拟理财_20250701
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
华夏模拟理财_20250701
Commits
d1892909
Commit
d1892909
authored
Aug 04, 2025
by
俞嘉婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 10.我的持仓列表 修改展示内容为累计收益、持仓金额
parent
32be2a02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
main.ts
mock/main.ts
+2
-0
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+22
-8
store.ts
src/store/store.ts
+2
-0
No files found.
mock/main.ts
View file @
d1892909
...
@@ -212,6 +212,8 @@ export default [
...
@@ -212,6 +212,8 @@ export default [
"realBuyJumpUrl"
:
`https://www.baidu.com?t=
${(
index
+
1
)}
`
,
"realBuyJumpUrl"
:
`https://www.baidu.com?t=
${(
index
+
1
)}
`
,
"rate"
:
502
,
// 利率(需要除100展示)
"rate"
:
502
,
// 利率(需要除100展示)
"type"
:
index
===
0
?
'0'
:
'1'
,
// 产品类型(0-非现金,1-现金)
"type"
:
index
===
0
?
'0'
:
'1'
,
// 产品类型(0-非现金,1-现金)
"totalProfit"
:
Math
.
random
()
*
1000000
>>
0
,
// 累计收益,mineProduct为true时有值,单位:分
"positionMoney"
:
Math
.
random
()
*
1000000
>>
0
,
// 持仓金额,mineProduct为true时有值,单位:分
}
}
}),
}),
"codeList"
:
[
"codeList"
:
[
...
...
src/pages/HomePage/HomePage.tsx
View file @
d1892909
...
@@ -379,14 +379,28 @@ class HomePage extends React.Component<any, any> {
...
@@ -379,14 +379,28 @@ class HomePage extends React.Component<any, any> {
{
curTabProductList
?.
map
((
item
,
index
)
=>
(
{
curTabProductList
?.
map
((
item
,
index
)
=>
(
<
div
className=
"b_product_item"
key=
{
`r_prdct_${index}`
}
>
<
div
className=
"b_product_item"
key=
{
`r_prdct_${index}`
}
>
<
span
className=
"b_product_name"
>
{
item
.
name
}
</
span
>
<
span
className=
"b_product_name"
>
{
item
.
name
}
</
span
>
<
div
className=
"b_product_rate"
>
{
curTab
==
2
{
!!
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
className=
"b_product_rate"
>
</
div
>
{
!!
item
.
rate
&&
<
span
className=
"b_product_rate_value"
>
{
this
.
settleMoney
(
item
.
totalProfit
||
0
)
}
</
span
>
}
<
div
className=
"b_product_shu"
>
<
span
className=
"b_product_rate_label"
>
累计收益
</
span
>
<
span
className=
"b_product_shu_value"
>
{
item
.
shenShuGuiZei
}
</
span
>
</
div
>
<
span
className=
"b_product_shu_label"
>
{
item
.
fengXian
}
|
{
item
.
qigouText
}
</
span
>
<
div
className=
"b_product_shu"
>
</
div
>
<
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
>
<
Button
className=
"detail_btn_1"
onClick=
{
()
=>
this
.
jumpVirtualDetailHandle
(
item
)
}
></
Button
>
<
span
className=
"b_product_line"
></
span
>
<
span
className=
"b_product_line"
></
span
>
</
div
>
</
div
>
...
...
src/store/store.ts
View file @
d1892909
...
@@ -124,6 +124,8 @@ class Store {
...
@@ -124,6 +124,8 @@ class Store {
mineProduct
?:
boolean
,
// 我的产品(true是)
mineProduct
?:
boolean
,
// 我的产品(true是)
rate
?:
number
,
// 利率(需要除100展示)
rate
?:
number
,
// 利率(需要除100展示)
type
?:
string
,
// 产品类型(0-非现金,1-现金)
type
?:
string
,
// 产品类型(0-非现金,1-现金)
totalProfit
?:
number
,
// 累计收益,mineProduct为true时有值,单位:分
positionMoney
?:
number
,
// 持仓金额,mineProduct为true时有值,单位:分
}
>
,
}
>
,
// 待存储产品code
// 待存储产品code
codeList
?:
Array
<
{
codeList
?:
Array
<
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment