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
753fc539
Commit
753fc539
authored
Jul 08, 2025
by
俞嘉婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 端内查询收益率
parent
2de67253
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
5 deletions
+56
-5
main.ts
mock/main.ts
+1
-1
project.settings.json
project.settings.json
+1
-1
index.ts
src/api/index.ts
+4
-1
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+1
-1
store.ts
src/store/store.ts
+49
-1
No files found.
mock/main.ts
View file @
753fc539
...
@@ -111,7 +111,7 @@ export default [
...
@@ -111,7 +111,7 @@ export default [
"qigouText"
:
"1元起购"
,
"qigouText"
:
"1元起购"
,
"baiFenBiText"
:
"90%活动用户选购本产品t"
,
"baiFenBiText"
:
"90%活动用户选购本产品t"
,
"fengXian"
:
"中低风险"
,
"fengXian"
:
"中低风险"
,
"code"
:
"23112008P
"
,
"code"
:
index
===
0
?
"23112008P"
:
"consectetur
"
,
"status"
:
(
index
+
1
)
%
2
===
0
?
'1'
:
'0'
,
"status"
:
(
index
+
1
)
%
2
===
0
?
'1'
:
'0'
,
"mineProduct"
:
(
index
+
1
)
%
3
===
0
,
"mineProduct"
:
(
index
+
1
)
%
3
===
0
,
"realBuyJumpUrl"
:
`https://www.baidu.com?t=
${(
index
+
1
)}
`
,
"realBuyJumpUrl"
:
`https://www.baidu.com?t=
${(
index
+
1
)}
`
,
...
...
project.settings.json
View file @
753fc539
{
"proSetting"
:{
"projectxIDs"
:{
"testId"
:[{
"label"
:
"test"
,
"value"
:
"p476a83d1"
}],
"prodId"
:[{
"label"
:
"线上测试"
,
"value"
:
"p
69bb35bf
"
},{
"label"
:
"正式"
,
"value"
:
"p16480c32"
}]},
"skinVariables"
:[],
"mockSetting"
:{
"projectId"
:
""
,
"pageId"
:
""
}},
"envSetting"
:{},
"psdSetting"
:{
"psdFSSetting"
:
true
,
"psdCenterSetting"
:
true
}}
{
"proSetting"
:{
"projectxIDs"
:{
"testId"
:[{
"label"
:
"test"
,
"value"
:
"p476a83d1"
}],
"prodId"
:[{
"label"
:
"线上测试"
,
"value"
:
"p
f909ff04
"
},{
"label"
:
"正式"
,
"value"
:
"p16480c32"
}]},
"skinVariables"
:[],
"mockSetting"
:{
"projectId"
:
""
,
"pageId"
:
""
}},
"envSetting"
:{},
"psdSetting"
:{
"psdFSSetting"
:
true
,
"psdCenterSetting"
:
true
}}
src/api/index.ts
View file @
753fc539
...
@@ -49,7 +49,10 @@ const API = generateAPI({
...
@@ -49,7 +49,10 @@ const API = generateAPI({
// 首页
// 首页
index
:
"home/index.do"
,
index
:
"home/index.do"
,
// 首页-产品参数更新
// 首页-产品参数更新
coop_codeUpdate
:
"home/coop_codeUpdate.do"
,
coop_codeUpdate
:
{
uri
:
"home/coop_codeUpdate.do"
,
method
:
'post'
,
},
// 首页-白名单限制弹窗
// 首页-白名单限制弹窗
isWhiteUser
:
{
isWhiteUser
:
{
uri
:
"home/isWhiteUser.do"
,
uri
:
"home/isWhiteUser.do"
,
...
...
src/pages/HomePage/HomePage.tsx
View file @
753fc539
...
@@ -206,7 +206,7 @@ class HomePage extends React.Component<any, any> {
...
@@ -206,7 +206,7 @@ class HomePage extends React.Component<any, any> {
<
div
className=
"r_products_item"
key=
{
`r_prdct_${index}`
}
>
<
div
className=
"r_products_item"
key=
{
`r_prdct_${index}`
}
>
<
span
className=
"r_product_bg"
></
span
>
<
span
className=
"r_product_bg"
></
span
>
<
span
className=
"r_product_name"
>
{
item
.
name
}
</
span
>
<
span
className=
"r_product_name"
>
{
item
.
name
}
</
span
>
<
span
className=
"r_product_risk"
>
{
(
item
.
rate
/
100
).
toFixed
(
2
)
}
%
</
span
>
{
!!
item
.
rate
&&
<
span
className=
"r_product_risk"
>
{
(
item
.
rate
/
100
).
toFixed
(
2
)
}
%
</
span
>
}
<
span
className=
"r_product_rate"
>
{
RATE_NAME
[
item
.
type
]
||
'年化收益率'
}
</
span
>
<
span
className=
"r_product_rate"
>
{
RATE_NAME
[
item
.
type
]
||
'年化收益率'
}
</
span
>
<
Button
className=
"detail_btn"
onClick=
{
()
=>
this
.
jumpVirtualDetailHandle
(
item
)
}
></
Button
>
<
Button
className=
"detail_btn"
onClick=
{
()
=>
this
.
jumpVirtualDetailHandle
(
item
)
}
></
Button
>
<
div
className=
"r_product_like"
>
<
div
className=
"r_product_like"
>
...
...
src/store/store.ts
View file @
753fc539
...
@@ -11,6 +11,8 @@ import Loginpop from '@/panels/loginpop/loginpop';
...
@@ -11,6 +11,8 @@ import Loginpop from '@/panels/loginpop/loginpop';
import
InvalidPop
from
'@/panels/invalidPop/invalidPop'
;
import
InvalidPop
from
'@/panels/invalidPop/invalidPop'
;
import
FirstPop
from
'@/panels/firstPop/firstPop'
;
import
FirstPop
from
'@/panels/firstPop/firstPop'
;
import
Tipspop
from
'@/panels/tipspop/tipspop'
;
import
Tipspop
from
'@/panels/tipspop/tipspop'
;
import
{
queryAppFundDetail
}
from
'@/AppTools'
;
import
{
CHANNEL
}
from
'@/AppTools'
;
class
Store
{
class
Store
{
...
@@ -145,7 +147,7 @@ class Store {
...
@@ -145,7 +147,7 @@ class Store {
resData
.
currentTime
=
timeStamp
;
resData
.
currentTime
=
timeStamp
;
this
.
indexData
=
resData
;
this
.
indexData
=
resData
;
const
{
firstMoneyPop
,
endPop
,
checkIn
}
=
resData
const
{
firstMoneyPop
,
endPop
,
checkIn
,
codeList
}
=
resData
// 计算进度条百分比
// 计算进度条百分比
if
(
checkIn
?.
checkInConfig
&&
checkIn
?.
totalCheckIn
!==
undefined
)
{
if
(
checkIn
?.
checkInConfig
&&
checkIn
?.
totalCheckIn
!==
undefined
)
{
...
@@ -161,6 +163,52 @@ class Store {
...
@@ -161,6 +163,52 @@ class Store {
if
(
endPop
)
{
if
(
endPop
)
{
ModalCtrl
.
showModal
(
Tipspop
);
ModalCtrl
.
showModal
(
Tipspop
);
}
}
// 更新产品信息
if
(
codeList
?.
length
&&
CFG
.
channel
==
CHANNEL
.
HXLC
)
{
this
.
updateFundInfo
(
codeList
)
}
}
/**
* 更新某些基金信息
* @param fundcodeList 需要查询的基金code列表
*/
async
updateFundInfo
(
fundcodeList
)
{
console
.
info
(
'需要查询的基金code列表, '
,
fundcodeList
.
map
(
item
=>
item
.
code
))
// 调客户端方法 查询产品的收益率等信息
const
adInfos
=
[]
for
(
let
len
=
fundcodeList
.
length
,
i
=
0
;
i
<
len
;
i
++
)
{
const
res
=
await
queryAppFundDetail
(
fundcodeList
[
i
])
if
(
res
)
adInfos
.
push
(
res
)
}
// 将客户端查到的收益率 更新到产品列表中
const
_temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
indexData
))
_temp
.
recommendProductConfig
=
_temp
.
recommendProductConfig
?.
map
(
item
=>
{
const
_adInfo
=
adInfos
.
find
(
adInfo
=>
adInfo
.
fundcode
==
item
.
code
)
if
(
_adInfo
)
{
item
.
rate
=
(
_adInfo
.
incomeRate
||
0
)
*
100
return
item
}
return
item
})
this
.
indexData
=
_temp
;
console
.
info
(
'基金产品收益率信息(客户端更新后的), '
,
toJS
(
this
.
indexData
))
if
(
!
adInfos
?.
length
)
return
// 将客户端查到的收益率 更新我们后端
const
_codeList
=
adInfos
.
map
(
item
=>
{
return
{
code
:
item
.
fundcode
,
// 产品code
incomeRate
:
(
item
.
incomeRate
||
0
)
*
100
,
// 年化率(单位:分),例如:1.78%传递178
netValue
:
(
item
.
pernetValue
||
0
)
*
100
,
// 净值(单位:分),例如:1.66传递166
}
})
const
params
=
{
codeList
:
_codeList
,
}
API
.
coop_codeUpdate
(
params
)
}
}
/**
/**
...
...
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