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
5cb6f0cf
Commit
5cb6f0cf
authored
Sep 17, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
close popup add judge when wechat to browse
parent
51f16c46
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
4 deletions
+38
-4
src/components/detail/redPacket/index.js
+38
-4
No files found.
src/components/detail/redPacket/index.js
View file @
5cb6f0cf
...
@@ -56,11 +56,42 @@ class RedPacket extends PureComponent {
...
@@ -56,11 +56,42 @@ class RedPacket extends PureComponent {
// 微信进入
// 微信进入
const
isWechat
=
getParam
(
'wechat'
);
const
isWechat
=
getParam
(
'wechat'
);
const
{
userInfo
}
=
this
.
props
;
if
(
isWechat
===
'1'
&&
!
browser
.
isWeixin
)
{
if
(
isWechat
===
'1'
&&
!
browser
.
isWeixin
)
{
if
(
userInfo
&&
userInfo
.
uid
)
{
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`
,
{
action
:
'check'
,
share_code
:
data
.
share_code
}
).
then
(
res
=>
{
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
});
}
}
})
}
});
}
else
{
this
.
setState
({
this
.
setState
({
type
:
1
type
:
1
});
});
}
}
}
this
.
fetchShareInfo
();
this
.
fetchShareInfo
();
}
}
...
@@ -623,14 +654,17 @@ class RedPacket extends PureComponent {
...
@@ -623,14 +654,17 @@ class RedPacket extends PureComponent {
className
=
"popup-password__button--close iconfont iconiconfront-2"
className
=
"popup-password__button--close iconfont iconiconfront-2"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
getParam
(
'wechat'
)
===
'1'
)
{
if
(
getParam
(
'wechat'
)
===
'1'
)
{
this
.
handleToClose
(
false
);
if
(
userInfo
&&
userInfo
.
uid
)
{
this
.
handleToClose
(
true
);
history
.
push
(
`/detail?id=
${
getParam
(
'id'
)}
`
);
history
.
push
(
`/detail?id=
${
getParam
(
'id'
)}
`
);
}
else
{
}
else
{
this
.
handleToClose
(
true
);
}
this
.
setState
({
this
.
setState
({
isCopy
:
false
type
:
3
});
});
}
}
else
{
this
.
handleToClose
(
true
);
}
}}
}}
/
>
/
>
<
/div
>
<
/div
>
...
...
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