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
e1bd1a85
Commit
e1bd1a85
authored
Jul 07, 2025
by
俞嘉婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 字段对了下 补充逻辑
parent
3607892f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
48 deletions
+96
-48
main.ts
mock/main.ts
+31
-13
index.ts
src/api/index.ts
+2
-0
HomePage.less
src/pages/HomePage/HomePage.less
+14
-14
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+15
-6
loginpop.jsx
src/panels/loginpop/loginpop.jsx
+18
-5
store.ts
src/store/store.ts
+16
-10
No files found.
mock/main.ts
View file @
e1bd1a85
...
...
@@ -25,6 +25,21 @@ export default [
}
},
},
{
url
:
'/home/coop_queryAgreement.do'
,
response
:
({
query
})
=>
{
return
{
success
:
true
,
code
:
""
,
message
:
""
,
timeStamp
:
Date
.
now
(),
data
:
{
agreementTitle
:
'服务协议'
,
agreementText
:
'服务协议内容'
,
}
}
},
},
{
url
:
'/home/index.do'
,
response
:
({
query
})
=>
{
...
...
@@ -37,6 +52,7 @@ export default [
actStartTime
:
Date
.
now
()
-
1
*
24
*
60
*
60
*
1000
,
actEndTime
:
Date
.
now
()
+
3
*
24
*
60
*
60
*
1000
,
myEndTime
:
Date
.
now
()
+
1
*
24
*
60
*
60
*
1000
,
endPop
:
false
,
uid
:
'234234'
,
ruleText
:
'rulerulerulerulerulerulerule'
,
"bigStartConfig"
:
new
Array
(
5
).
fill
(
1
).
map
((
_
,
index
)
=>
{
...
...
@@ -58,31 +74,33 @@ export default [
"totalIncome"
:
"8390.22"
},
"checkIn"
:
{
"totalCheckIn"
:
"4"
,
"totalCheckIn"
:
6
,
"todayCheckIn"
:
false
,
"totalExperienceNum"
:
1420000
,
"checkInConfig"
:
[
{
"id"
:
1
,
"days"
:
"3"
,
"experienceNum"
:
"1"
,
"status"
:
'2'
"days"
:
3
,
"experienceNum"
:
10000
,
"status"
:
true
},
{
"id"
:
2
,
"days"
:
"5"
,
"experienceNum"
:
"3"
,
"status"
:
'1'
"days"
:
5
,
"experienceNum"
:
30000
,
"status"
:
false
},
{
"id"
:
3
,
"days"
:
"10"
,
"experienceNum"
:
"6"
,
"status"
:
'0'
"days"
:
10
,
"experienceNum"
:
60000
,
"status"
:
false
},
{
"id"
:
4
,
"days"
:
"20"
,
"experienceNum"
:
"9"
,
"status"
:
'0'
"days"
:
20
,
"experienceNum"
:
90000
,
"status"
:
false
},
]
},
...
...
src/api/index.ts
View file @
e1bd1a85
...
...
@@ -54,6 +54,8 @@ const API = generateAPI({
uri
:
"home/isWhiteUser.do"
,
showMsg
:
false
,
},
// 首页-查询服务协议
coop_queryAgreement
:
"home/coop_queryAgreement.do"
,
// 首页-校验验证码并登录
coop_checkCode
:
{
uri
:
'home/coop_checkCode.do'
,
...
...
src/pages/HomePage/HomePage.less
View file @
e1bd1a85
...
...
@@ -416,24 +416,24 @@
}
.r_product_name {
width: 520px;
height: 2
7
px;
height: 2
8
px;
left: 32px;
top: 3
1
px;
top: 3
0
px;
position: absolute;
font-size: 28px;
line-height: 2
7
px;
line-height: 2
8
px;
color: rgba(1, 1, 1, 1);
font-weight: bold;
.lineClamp1();
}
.r_product_risk {
width: 360px;
height: 3
0
px;
height: 3
2
px;
left: 31px;
top: 7
9
px;
top: 7
7
px;
position: absolute;
font-size: 32px;
line-height: 3
0
px;
line-height: 3
2
px;
color: rgba(211, 26, 25, 1);
font-weight: bold;
.lineClamp1();
...
...
@@ -567,13 +567,13 @@
width: 200px;
height: 63px;
left: 0px;
top: 5
9
px;
top: 5
7
px;
position: absolute;
.b_product_rate_label {
width: 100%;
height: 20px;
left: 0px;
top: 4
3
px;
top: 4
6
px;
position: absolute;
opacity: 0.6;
font-size: 20px;
...
...
@@ -583,12 +583,12 @@
}
.b_product_rate_value {
width: 100%;
height:
24
px;
height:
32
px;
left: 2px;
top: 0px;
position: absolute;
font-size: 32px;
line-height:
24
px;
line-height:
32
px;
color: rgba(211, 26, 25, 1);
font-weight: bold;
.lineClamp1();
...
...
@@ -598,13 +598,13 @@
width: 280px;
height: 63px;
left: 222px;
top:
60
px;
top:
57
px;
position: absolute;
.b_product_shu_label {
width: 100%;
height: 20px;
left: 1px;
top: 4
3
px;
top: 4
5
px;
position: absolute;
opacity: 0.6;
font-size: 20px;
...
...
@@ -614,12 +614,12 @@
}
.b_product_shu_value {
width: 100%;
height: 2
7
px;
height: 2
8
px;
left: 0px;
top: 0px;
position: absolute;
font-size: 28px;
line-height: 2
7
px;
line-height: 2
8
px;
color: rgba(0, 0, 0, 1);
font-weight: bold;
.lineClamp1();
...
...
src/pages/HomePage/HomePage.tsx
View file @
e1bd1a85
...
...
@@ -61,10 +61,19 @@ class HomePage extends React.Component<any, any> {
ModalCtrl
.
showModal
(
Rulepop
)
})
/** 已签到 */
signedHandle
=
_asyncThrottle
(
async
()
=>
{
if
(
!
store
.
judgeActTime
())
return
Toast
.
show
(
"今日已签到"
)
})
/** 签到 */
signHandle
=
_asyncThrottle
(
async
()
=>
{
if
(
!
store
.
judgeActTime
())
return
await
API
.
doCheckIn
();
const
{
success
}
=
await
API
.
doCheckIn
();
if
(
success
)
{
Toast
.
show
(
"签到成功"
)
}
await
store
.
updateIndex
();
})
...
...
@@ -147,9 +156,9 @@ class HomePage extends React.Component<any, any> {
{
/* 签到区 */
}
<
div
className=
"sign_section"
>
<
span
className=
"sign_section_bg"
></
span
>
<
span
className=
"sign_tips"
>
累计签到,最高可得
{
checkIn
?.
TODO
||
0
}
万资金
</
span
>
{
checkIn
?.
TODO
?
<
div
className=
"signed_btn"
>
已签到
</
div
>
<
span
className=
"sign_tips"
>
累计签到,最高可得
{
((
checkIn
?.
totalExperienceNum
||
0
)
/
10000
).
toFixed
(
0
)
}
万资金
</
span
>
{
checkIn
?.
todayCheckIn
?
<
Button
className=
"signed_btn"
onClick=
{
this
.
signedHandle
}
>
已签到
</
Button
>
:
<
Button
className=
"sign_btn"
onClick=
{
this
.
signHandle
}
>
签到得1万资金
</
Button
>
}
<
div
className=
"sign_progress"
>
...
...
@@ -161,12 +170,12 @@ class HomePage extends React.Component<any, any> {
{
checkIn
?.
checkInConfig
?.
map
((
item
,
index
)
=>
{
return
(
<
div
className=
{
`step_item step_item${index + 1} ${item.
status == '0' ? 'locked' : item.status == '1' ? 'signed' : 'receiv
ed'}`
}
className=
{
`step_item step_item${index + 1} ${item.
days > checkIn?.totalCheckIn ? 'locked' : item.status ? 'received' : 'sign
ed'}`
}
key=
{
`sign_${index}`
}
onClick=
{
()
=>
this
.
signPrizeHandle
(
item
)
}
>
<
span
className=
"prize_bg"
></
span
>
<
div
className=
"prize_amount"
>
{
item
.
experienceNum
}
<
span
className=
"unit"
>
万
</
span
></
div
>
<
div
className=
"prize_amount"
>
{
((
item
.
experienceNum
||
0
)
/
10000
).
toFixed
(
0
)
}
<
span
className=
"unit"
>
万
</
span
></
div
>
<
span
className=
"prize_day"
>
累计
{
item
.
days
}
天
</
span
>
</
div
>
)
...
...
src/panels/loginpop/loginpop.jsx
View file @
e1bd1a85
...
...
@@ -34,7 +34,20 @@ class Loginpop extends React.Component {
}
componentDidMount
()
{
this
.
getUserInfo
()
this
.
queryAgreement
()
if
(
CFG
.
channel
===
CHANNEL
.
HXLC
)
{
this
.
getUserInfo
()
}
}
// 查询服务协议
queryAgreement
=
async
()
=>
{
const
{
success
,
data
}
=
await
API
.
coop_queryAgreement
()
if
(
success
)
{
this
.
setState
({
agreementInfo
:
data
||
{},
})
}
}
getUserInfo
=
()
=>
{
...
...
@@ -123,7 +136,7 @@ class Loginpop extends React.Component {
// 确认提交
handleSubmit
=
_asyncThrottle
(()
=>
{
const
{
loginPhone
,
loginCode
}
=
this
.
state
;
const
{
agreementTitle
}
=
this
.
props
||
{};
const
{
agreementTitle
}
=
this
.
state
.
agreementInfo
||
{};
if
(
!!
agreementTitle
&&
!
this
.
state
.
privacyChecked
)
{
// 未勾选隐私协议
Toast
.
show
(
'请仔细阅读服务协议并勾选'
)
...
...
@@ -147,7 +160,7 @@ class Loginpop extends React.Component {
const
params
=
{
"phoneNumber"
:
loginPhone
,
"smsCode"
:
loginCode
,
"origenUid"
:
uid
,
"origenUid"
:
uid
||
''
,
// 华夏理财渠道才拿得到 其他渠道不用传
}
const
{
success
,
data
}
=
await
API
.
coop_checkCode
(
params
)
if
(
success
)
{
...
...
@@ -163,7 +176,7 @@ class Loginpop extends React.Component {
const
{
loginPhone
,
loginCode
,
showCountDown
,
countDown
,
showSendAgain
,
showSend
}
=
this
.
state
;
const
{
showPrivacyPop
,
privacyChecked
}
=
this
.
state
;
const
{
agreementTitle
,
agreementText
,
hideClose
}
=
this
.
props
||
{};
const
{
agreementTitle
,
agreementText
,
hideClose
}
=
this
.
state
.
agreementInfo
||
{};
return
(<>
<
div
className=
{
`loginpop modal_center ${!agreementTitle ? 'no_check' : ''}`
}
>
<
span
className=
"bg"
></
span
>
...
...
@@ -198,7 +211,7 @@ class Loginpop extends React.Component {
<
span
className=
"content_title"
onClick=
{
()
=>
this
.
setState
({
showPrivacyPop
:
true
})
}
dangerouslySetInnerHTML=
{
{
__html
:
agreementTitle
}
}
></
span
>
</
div
>
</
div
>
}
<
Button
className=
{
`btn ${CFG.channel === CHANNEL.OFFLINE_QRCODE ? 'enter_btn' : ''
}`
}
onClick=
{
this
.
handleSubmit
}
></
Button
>
<
Button
className=
{
`btn ${CFG.channel === CHANNEL.OFFLINE_QRCODE ? 'enter_btn' : ''}`
}
onClick=
{
this
.
handleSubmit
}
></
Button
>
{
!
hideClose
&&
<
Button
className=
"close"
onClick=
{
this
.
close
}
></
Button
>
}
</
div
>
...
...
src/store/store.ts
View file @
e1bd1a85
...
...
@@ -82,12 +82,14 @@ class Store {
},
// 签到模块
checkIn
?:
{
totalCheckIn
?:
string
,
totalCheckIn
?:
number
,
todayCheckIn
?:
boolean
,
// 今日是否签到(true签到)
totalExperienceNum
?:
number
,
// 累计可获得最高体验金数量
checkInConfig
?:
Array
<
{
id
?:
number
,
days
?:
string
,
experienceNum
?:
string
,
status
?:
string
,
days
?:
number
,
experienceNum
?:
number
,
status
?:
boolean
,
// true已领奖
}
>
,
},
// 推荐产品配置
...
...
@@ -103,7 +105,11 @@ class Store {
realBuyJumpUrl
?:
string
,
}
>
,
// 待存储产品code
codeList
?:
Array
<
string
>
,
codeList
?:
Array
<
{
code
?:
string
,
type
?:
number
,
// 产品类型(0-非现金,1-现金)
}
>
,
endPop
?:
boolean
,
}
=
{};
async
judgeIsWhiteUser
()
{
...
...
@@ -119,7 +125,7 @@ class Store {
ModalCtrl
.
showModal
(
InvalidPop
);
}
else
if
(
code
==
60002
)
{
// 请绑定手机号
ModalCtrl
.
showModal
(
Loginpop
,
{
agreementTitle
:
'《模拟理财服务协议》'
,
agreementText
:
'您即将进入第三方服务页面,该服务由华夏理财有限责任公司提供。为了便于您使用本页面服务,需要您主动提供手机号信息,个人信息仅用于本活动登录及参与,无其他用途。相关信息保护责任由华夏理财承担。'
})
// TODO 字段?
ModalCtrl
.
showModal
(
Loginpop
)
}
else
{
Toast
.
show
(
message
||
'网络异常,请稍后再试'
)
}
...
...
@@ -130,16 +136,16 @@ class Store {
if
(
!
success
)
{
return
;
}
const
resData
=
data
||
{}
const
resData
=
data
||
{}
resData
.
currentTime
=
timeStamp
;
this
.
indexData
=
resData
;
const
{
firstMoneyPop
,
TODO
}
=
resData
const
{
firstMoneyPop
,
endPop
}
=
resData
if
(
firstMoneyPop
)
{
ModalCtrl
.
showModal
(
FirstPop
,
firstMoneyPop
);
}
if
(
TODO
)
{
if
(
endPop
)
{
ModalCtrl
.
showModal
(
Tipspop
);
}
}
...
...
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