Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
c39b1536
Commit
c39b1536
authored
Sep 17, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solve copy and close action repeate question
parent
5cb6f0cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
26 deletions
+36
-26
src/components/detail/redPacket/index.js
+36
-26
No files found.
src/components/detail/redPacket/index.js
View file @
c39b1536
...
@@ -59,33 +59,41 @@ class RedPacket extends PureComponent {
...
@@ -59,33 +59,41 @@ class RedPacket extends PureComponent {
const
{
userInfo
}
=
this
.
props
;
const
{
userInfo
}
=
this
.
props
;
if
(
isWechat
===
'1'
&&
!
browser
.
isWeixin
)
{
if
(
isWechat
===
'1'
&&
!
browser
.
isWeixin
)
{
if
(
userInfo
&&
userInfo
.
uid
)
{
if
(
userInfo
&&
userInfo
.
uid
)
{
http
.
get
(
`
${
API
.
home
}
/sys/redPacket/shareUrl/
${
getParam
(
'id'
)}
`
).
then
(
res
=>
{
const
type
=
window
.
localStorage
.
getItem
(
'redpacket-click'
);
const
{
code
,
data
}
=
res
.
data
;
if
(
type
===
'split'
)
{
if
(
code
===
200
)
{
http
.
get
(
`
${
API
.
home
}
/sys/redPacket/shareUrl/
${
getParam
(
'id'
)}
`
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
;
// 检查收否领取过
if
(
code
===
200
)
{
http
.
post
(
`
${
API
.
home
}
/sys/redPacket/split`
,
// 检查收否领取过
{
http
.
post
(
action
:
'check'
,
`
${
API
.
home
}
/sys/redPacket/split`
,
share_code
:
data
.
share_code
{
}
action
:
'check'
,
).
then
(
res
=>
{
share_code
:
data
.
share_code
const
{
code
,
data
}
=
res
.
data
;
if
(
code
===
200
)
{
// is_receive 是否领取过 0-否 1-是
if
(
data
.
is_receive
)
{
this
.
judgeReceiveStatus
(
data
,
8
);
}
else
{
this
.
setState
({
type
:
3
});
}
}
}
).
then
(
res
=>
{
})
const
{
code
,
data
}
=
res
.
data
;
}
if
(
code
===
200
)
{
});
window
.
localStorage
.
removeItem
(
'redpacket-click'
);
// is_receive 是否领取过 0-否 1-是
if
(
data
.
is_receive
)
{
this
.
judgeReceiveStatus
(
data
,
8
);
}
else
{
this
.
setState
({
type
:
3
});
}
}
})
}
});
}
else
{
this
.
setState
({
type
:
1
});
window
.
localStorage
.
removeItem
(
'redpacket-click'
);
}
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
type
:
1
type
:
1
...
@@ -638,6 +646,7 @@ class RedPacket extends PureComponent {
...
@@ -638,6 +646,7 @@ class RedPacket extends PureComponent {
<
button
<
button
className
=
"popup-password__button--copy"
className
=
"popup-password__button--copy"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
window
.
localStorage
.
setItem
(
'redpacket-click'
,
'copy'
);
history
.
push
(
'/passport/login'
);
history
.
push
(
'/passport/login'
);
}}
}}
>
复制口令
<
/button
>
>
复制口令
<
/button
>
...
@@ -661,6 +670,7 @@ class RedPacket extends PureComponent {
...
@@ -661,6 +670,7 @@ class RedPacket extends PureComponent {
this
.
setState
({
this
.
setState
({
type
:
3
type
:
3
});
});
window
.
localStorage
.
setItem
(
'redpacket-click'
,
'split'
);
}
}
}
else
{
}
else
{
this
.
handleToClose
(
true
);
this
.
handleToClose
(
true
);
...
...
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