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
2063a15a
Commit
2063a15a
authored
Dec 02, 2022
by
青梅竹马
Browse files
Options
Browse Files
Download
Plain Diff
更新拼团
parents
52ca6337
2f385e73
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
27 deletions
+34
-27
build/mrstaticjs/togroup.013b5bb9.chunk.js
+2
-1
build/mrstaticjs/togroup.013b5bb9.chunk.js.map
+2
-2
src/components/detail/group/togroup.js
+30
-24
No files found.
build/mrstaticjs/togroup.013b5bb9.chunk.js
View file @
2063a15a
(
this
[
"webpackJsonpmr-julyedu"
]
=
this
[
"webpackJsonpmr-julyedu"
]
||
[]).
push
([[
44
],{
1500
:
function
(
e
,
a
,
t
){
"use strict"
;
t
.
r
(
a
);
t
(
133
);
var
n
,
s
=
t
(
70
),
c
=
t
.
n
(
s
),
r
=
(
t
(
82
),
t
(
29
)),
o
=
t
.
n
(
r
),
i
=
(
t
(
132
),
t
(
35
)),
l
=
t
.
n
(
i
),
d
=
(
t
(
197
),
t
(
84
)),
m
=
t
.
n
(
d
),
u
=
(
t
(
36
),
t
(
10
)),
p
=
t
.
n
(
u
),
_
=
t
(
3
),
f
=
t
(
4
),
E
=
t
(
6
),
h
=
t
(
7
),
v
=
t
(
0
),
N
=
t
.
n
(
v
),
g
=
(
t
(
863
),
t
(
24
)),
b
=
t
(
1
),
w
=
t
(
20
),
y
=
t
(
15
),
C
=
Object
(
w
.
b
)((
function
(
e
){
return
{
user
:
e
.
user
}}))(
n
=
function
(
e
){
Object
(
E
.
a
)(
t
,
e
);
var
a
=
Object
(
h
.
a
)(
t
);
function
t
(
e
){
var
n
;
return
Object
(
_
.
a
)(
this
,
t
),(
n
=
a
.
call
(
this
,
e
)).
invitedFriends
=
function
(){
var
e
=
n
.
state
,
a
=
e
.
pdd_price
,
t
=
e
.
number
,
s
=
e
.
data
;
if
(
b
.
b
.
isWeixin
){
var
c
=
n
.
state
.
share
;
n
.
setState
({
share
:
!
c
}),
Object
(
b
.
m
)({
title
:
"
\
u3010
\
u4ec5
\
u5269"
.
concat
(
t
,
"
\
u4e2a
\
u540d
\
u989d
\
u3011
\
u6211"
).
concat
(
a
,
"
\
u5143
\
u62fc
\
u4e86
\
u300a"
).
concat
(
s
.
course_title
,
"
\
u300b"
),
desc
:
s
.
course_title
,
link
:
window
.
location
.
href
+
"&is_originator=1"
,
imgUrl
:
s
.
image_name
})}
else
p
.
a
.
info
(
"
\
u8bf7
\
u5728
\
u5fae
\
u4fe1
\
u4e2d
\
u4f7f
\
u7528
\
u5206
\
u4eab
\
u529f
\
u80fd
\
uff01"
,
2
)},
n
.
toCourseDetail
=
function
(
e
){
return
n
.
props
.
history
.
push
(
"/detail?id="
.
concat
(
e
),{
href
:
"/classify"
}),
!
1
},
n
.
handleToGroup
=
function
(){
var
e
=
n
.
state
,
a
=
e
.
isBuy
,
t
=
void
0
!==
a
&&
a
,
s
=
e
.
data
,
c
=
void
0
===
s
?{}:
s
,
r
=
n
.
props
,
o
=
r
.
user
,
i
=
r
.
history
,
l
=
r
.
location
;
if
(
o
.
hasError
)
if
(
b
.
b
.
isWeixin
){
var
d
=
window
.
location
.
href
;
if
(
d
.
includes
(
"code="
)
&&
d
.
includes
(
"state=STATE"
)){
var
m
=
d
.
lastIndexOf
(
"code="
);
d
=
d
.
substr
(
0
,
m
-
1
)}
window
.
location
.
assign
(
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
.
concat
(
encodeURIComponent
(
d
),
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
))}
else
i
.
push
(
"/passport"
,{
from
:
l
});
else
t
?
n
.
setState
({
modal
:
!
0
}):
i
.
push
(
"/order?id="
.
concat
(
c
.
course_id
),{
group
:
1
,
pdd_order_id
:
n
.
state
.
pddOrderId
})},
n
.
state
=
{
data
:{},
share
:
!
1
,
pdd_price
:
0
,
groupon_member
:[],
person_num
:
0
,
is_success
:
!
1
,
number
:
0
,
isBuy
:
!
1
,
modal
:
!
1
,
pddOrderId
:
""
,
is_new_user
:
!
0
,
user_info_sample_http
:
!
1
},
n
}
return
Object
(
f
.
a
)(
t
,[{
key
:
"componentDidMount"
,
value
:
function
(){
var
e
=
this
;
b
.
f
.
get
(
""
.
concat
(
API
[
"base-api"
],
"/pdd/info/"
).
concat
(
Object
(
b
.
c
)(
"id"
))).
then
((
function
(
a
){
if
(
0
===
a
.
data
.
errno
){
if
(
e
.
setState
({
data
:
a
.
data
.
data
.
course_info
,
pdd_price
:
a
.
data
.
data
.
pdd_price
,
groupon_member
:
a
.
data
.
data
.
groupon_member
,
is_success
:
a
.
data
.
data
.
is_success
,
person_num
:
a
.
data
.
data
.
person_num
,
course_list
:
a
.
data
.
data
.
course_list
,
number
:
a
.
data
.
data
.
number
,
pddOrderId
:
a
.
data
.
data
.
pdd_order_id
,
countdown
:
""
,
isBuy
:
a
.
data
.
data
.
is_buy
}),
0
===
a
.
data
.
data
.
is_success
){
var
t
=
1
e3
*
a
.
data
.
data
.
end_time
,
n
=
0
,
s
=
0
,
c
=
0
,
r
=
0
;
setInterval
((
function
(){
t
-=
1
e3
,
a
.
data
.
data
.
end_time
>
86400
?(
n
=
""
.
concat
(
parseInt
(
t
/
864
e5
)).
padStart
(
2
,
0
),
s
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
)
/
36
e5
)).
padStart
(
2
,
0
),
c
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
-
36
e5
*
s
)
/
6
e4
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
n
,
"
\
u5929"
).
concat
(
s
,
"
\
u65f6"
).
concat
(
c
,
"
\
u5206"
)})):(
s
=
""
.
concat
(
parseInt
(
t
/
36
e5
)).
padStart
(
2
,
0
),
c
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
s
)
/
6
e4
)).
padStart
(
2
,
0
),
r
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
s
-
6
e4
*
c
)
/
1
e3
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
s
,
":"
).
concat
(
c
,
":"
).
concat
(
r
)}))}),
1
e3
)}}
else
p
.
a
.
info
(
a
.
data
.
msg
,
2
)})),
this
.
state
.
user_info_sample_http
||
b
.
f
.
get
(
""
.
concat
(
API
.
home
,
"/m/user_info_sample/0"
)).
then
((
function
(
a
){
200
===
a
.
data
.
code
?
console
.
log
(
"
\
u5df2
\
u7ecf
\
u767b
\
u5f55"
):
console
.
log
(
"
\
u53bb
\
u767b
\
u5f55"
),
e
.
setState
({
is_new_user
:
a
.
data
.
data
.
is_new_user
,
user_info_sample_http
:
!
0
})}))}},{
key
:
"render"
,
value
:
function
(){
var
e
=
this
,
a
=
this
.
state
,
t
=
a
.
data
,
n
=
t
.
course_id
,
s
=
t
.
course_title
,
c
=
t
.
simpledescription
,
r
=
t
.
price0
,
o
=
t
.
price1
,
i
=
a
.
is_success
,
d
=
a
.
course_list
,
u
=
(
a
.
is_new_user
,
N
.
a
.
createElement
(
"div"
,{
className
:
"info"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"title"
,
onClick
:
function
(){
return
e
.
toCourseDetail
(
n
)}},
s
),
N
.
a
.
createElement
(
"p"
,{
className
:
"contact text-overflow-2"
},
c
),
N
.
a
.
createElement
(
"div"
,{
className
:
"des"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"course-price"
},
N
.
a
.
createElement
(
"span"
,{
className
:
"new"
},
"
\
xa5"
,
o
),
N
.
a
.
createElement
(
"span"
,{
className
:
"old"
},
"
\
xa5"
,
r
)))));
return
N
.
a
.
createElement
(
"div"
,{
className
:
"to-group-box"
},
N
.
a
.
createElement
(
g
.
e
,{
title
:
"
\
u62fc
\
u56e2"
,
cart
:
!
1
,
toHref
:
"/"
}),
N
.
a
.
createElement
(
m
.
a
,{
transparent
:
!
0
,
visible
:
this
.
state
.
modal
,
title
:
"
\
u63d0
\
u793a"
,
footer
:[{
text
:
"
\
u786e
\
u5b9a"
,
onPress
:
function
(){
e
.
setState
({
modal
:
!
1
}),
e
.
props
.
history
.
push
(
"/"
)}}]},
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u7ecf
\
u8d2d
\
u4e70
\
u8fc7
\
u8be5
\
u8bfe
\
u7a0b
\
uff5e"
)),
!
i
&&
N
.
a
.
createElement
(
g
.
j
,{
img
:
this
.
state
.
data
.
image_name
,
id
:
this
.
state
.
data
.
course_id
,
info
:
u
,
toDetail
:
this
.
toCourseDetail
}),
N
.
a
.
createElement
(
I
,{
data
:
this
.
state
,
invitedFriends
:
this
.
invitedFriends
,
handleToGroup
:
this
.
handleToGroup
,
userInfo
:
this
.
props
.
user
}),
N
.
a
.
createElement
(
l
.
a
,
null
),
N
.
a
.
createElement
(
"div"
,{
className
:
"group-course"
},
N
.
a
.
createElement
(
"div"
,{
className
:
"top-title"
},
N
.
a
.
createElement
(
"span"
,
null
,
"
\
u672c
\
u5468
\
u7279
\
u60e0"
)),
d
&&
d
.
length
>
0
&&
d
[
0
].
course
&&
d
[
0
].
course
.
length
>
0
&&
d
[
0
].
course
.
slice
(
0
,
4
).
map
((
function
(
a
){
var
t
=
N
.
a
.
createElement
(
"div"
,{
className
:
"info"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"title"
,
onClick
:
function
(){
return
e
.
toCourseDetail
(
a
.
course_id
)}},
a
.
course_title
),
N
.
a
.
createElement
(
"p"
,{
className
:
"contact text-overflow-2"
},
a
.
simpledescription
),
N
.
a
.
createElement
(
"div"
,{
className
:
"des"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"course-price"
},
N
.
a
.
createElement
(
"span"
,{
className
:
"new"
},
"
\
xa5"
,
a
.
pdd_price
),
N
.
a
.
createElement
(
"span"
,{
className
:
"old"
},
"
\
xa5"
,
a
.
price0
))));
return
N
.
a
.
createElement
(
g
.
j
,{
img
:
a
.
image_name
,
key
:
a
.
course_id
,
id
:
a
.
course_id
,
info
:
t
,
toDetail
:
e
.
toCourseDetail
})}))))}}]),
t
}(
v
.
Component
))
||
n
;
function
I
(
e
){
var
a
,
t
,
n
,
s
;
console
.
log
(
"GorupContent------data:"
,
e
);
for
(
var
r
=
e
.
data
,
i
=
r
.
pdd_price
,
l
=
r
.
data
,
d
=
r
.
groupon_member
,
m
=
r
.
is_success
,
u
=
r
.
person_num
,
p
=
r
.
share
,
_
=
r
.
number
,
f
=
r
.
countdown
,
E
=
r
.
is_new_user
,
h
=
e
.
userInfo
,
v
=
[],
g
=
_
;
0
!=
g
;)
v
.
push
(
g
),
g
--
;
if
(
s
=
N
.
a
.
createElement
(
"div"
,{
className
:
"group-user-list"
},
N
.
a
.
createElement
(
o
.
a
,{
justify
:
"center"
,
className
:
"imgList"
},
d
.
map
((
function
(
e
){
return
N
.
a
.
createElement
(
"div"
,{
className
:
"imgContainer"
,
key
:
Math
.
random
()},
N
.
a
.
createElement
(
"img"
,{
className
:
"imgname"
,
src
:
e
.
avatar
,
alt
:
""
}),
1
===
e
.
user_type
?
N
.
a
.
createElement
(
"div"
,{
className
:
"leaderFlag"
},
N
.
a
.
createElement
(
"span"
,
null
,
"
\
u56e2
\
u957f"
)):
null
)})),
v
.
map
((
function
(
e
){
return
N
.
a
.
createElement
(
"div"
,{
className
:
"imgContainer"
,
key
:
Math
.
random
()},
N
.
a
.
createElement
(
"div"
,{
className
:
"imgname"
},
N
.
a
.
createElement
(
"i"
,{
className
:
"iconfont iconwode-xianxing no-body"
})))})))),
d
&&
d
.
length
>
0
){
var
w
=!
1
;
!
h
.
hasError
&&
d
.
forEach
((
function
(
e
){
e
.
uid
==
h
.
data
.
uid
&&
(
w
=!
0
)})),
w
?(
a
=
E
?
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
Math
.
round
(
l
.
price1
-
i
,
2
),
"
\
u5143"
)):
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u662f
\
u4e03
\
u6708
\
u7
684
\
u8001
\
u670b
\
u53cb
\
uff0c
\
u5feb
\
u5f00
\
u56e2
\
u9080
\
u8bf7
\
u597d
\
u53cb
\
u52a0
\
u5165
\
u5427
\
uff08
\
u8001
\
u7528
\
u6237
\
u81ea
\
u52a8
\
u5f00
\
u65b0
\
u56e2
\
uff09"
),
t
=
N
.
a
.
createElement
(
"span"
,{
className
:
"group-btn"
,
onClick
:
e
.
invitedFriends
},
"
\
u9080
\
u8bf7
\
u597d
\
u53cb
\
u53c2
\
u56e2 "
,
f
,
"
\
u540e
\
u7ed3
\
u675f"
),
n
=
N
.
a
.
createElement
(
"p"
,{
className
:
"dec"
},
"
\
u5206
\
u4eab
\
u52303
\
u4e2a
\
u7fa4
\
u540e
\
uff0c
\
u6210
\
u56e2
\
u7387
\
u9ad8
\
u8fbe98%"
)):
1
==
Object
(
b
.
c
)(
"is_originator"
)?(
a
=
E
?
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
Math
.
round
(
l
.
price1
-
i
,
2
),
"
\
u5143"
)):
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u662f
\
u4e03
\
u6708
\
u7684
\
u8001
\
u670b
\
u53cb
\
uff0c
\
u5feb
\
u5f00
\
u56e2
\
u9080
\
u8bf7
\
u597d
\
u53cb
\
u52a0
\
u5165
\
u5427
\
uff08
\
u8001
\
u7528
\
u6237
\
u81ea
\
u52a8
\
u5f00
\
u65b0
\
u56e2
\
uff09"
),
t
=
E
?
N
.
a
.
createElement
(
"a"
,{
href
:
"javascript:;"
,
className
:
"group-btn"
,
onClick
:
e
.
handleToGroup
},
"
\
u4e00
\
u952e
\
u53c2
\
u56e2"
):
N
.
a
.
createElement
(
"a"
,{
href
:
"javascript:;"
,
className
:
"group-btn"
,
onClick
:
e
.
handleToGroup
},
"
\
u4e00
\
u952e
\
u5f00
\
u56e2"
)):(
a
=
E
?
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
Math
.
round
(
l
.
price1
-
i
,
2
),
"
\
u5143"
)):
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u662f
\
u4e03
\
u6708
\
u7684
\
u8001
\
u670b
\
u53cb
\
uff0c
\
u5feb
\
u5f00
\
u56e2
\
u9080
\
u8bf7
\
u597d
\
u53cb
\
u52a0
\
u5165
\
u5427
\
uff08
\
u8001
\
u7528
\
u6237
\
u81ea
\
u52a8
\
u5f00
\
u65b0
\
u56e2
\
uff09
"
),
t
=
N
.
a
.
createElement
(
"span"
,{
className
:
"group-btn"
,
onClick
:
e
.
invitedFriends
},
"
\
u9080
\
u8bf7
\
u597d
\
u53cb
\
u53c2
\
u56e2 "
,
f
,
"
\
u540e
\
u7ed3
\
u675f"
),
n
=
N
.
a
.
createElement
(
"p"
,{
className
:
"dec"
},
"
\
u5206
\
u4eab
\
u52303
\
u4e2a
\
u7fa4
\
u540e
\
uff0c
\
u6210
\
u56e2
\
u7387
\
u9ad8
\
u8fbe98%"
))}
return
1
===
m
&&
(
a
=
N
.
a
.
createElement
(
"p"
,{
className
:
"success"
},
"
\
u62fc
\
u56e2
\
u6210
\
u529f"
),
t
=
N
.
a
.
createElement
(
y
.
b
,{
to
:
"/detail?id="
.
concat
(
l
.
course_id
),
className
:
"tostudy"
},
"
\
u53bb
\
u5b66
\
u4e60"
)),
N
.
a
.
createElement
(
"div"
,{
className
:
"gorup-content"
},
p
?
N
.
a
.
createElement
(
"div"
,{
className
:
"groupSuccessMbc"
,
onClick
:
e
.
invitedFriends
},
N
.
a
.
createElement
(
"div"
,{
className
:
"tipContent"
},
"
\
u8fd8
\
u5dee"
.
concat
(
_
,
"
\
u4eba
\
uff0c
\
u5206
\
u4eab
\
u52303
\
u4e2a
\
u7fa4
\
uff0c
\
u6210
\
u56e2
\
u7387
\
u9ad8
\
u8fbe98%"
)),
N
.
a
.
createElement
(
"div"
,{
className
:
"tipArrow"
},
N
.
a
.
createElement
(
"i"
,{
className
:
"iconfont iconyindao"
}))):
null
,
a
,
N
.
a
.
createElement
(
c
.
a
,
null
,
s
),
N
.
a
.
createElement
(
c
.
a
,
null
,
t
),
n
,
!
m
&&
N
.
a
.
createElement
(
"div"
,{
className
:
"group-dec"
},
N
.
a
.
createElement
(
"span"
,
null
,
N
.
a
.
createElement
(
"i"
,{
className
:
"iconfont iconiconfront-1"
}),
"
\
xb7
\
u597d
\
u53cb
\
u53c2
\
u56e2
\
xb7
\
u4eba
\
u6ee1
\
u6210
\
u4ea4
\
xb7
\
u4eba
\
u4e0d
\
u6ee1
\
u9000
\
u6b3e"
),
N
.
a
.
createElement
(
"span"
,{
className
:
"allNum"
},
"
\
u7d2f
\
u8ba1"
.
concat
(
u
,
"
\
u4eba
\
u6210
\
u56e2"
))))}
a
.
default
=
C
},
863
:
function
(
e
,
a
,
t
){}}]);
(
this
[
"webpackJsonpmr-julyedu"
]
=
this
[
"webpackJsonpmr-julyedu"
]
||
[]).
push
([[
44
],{
1500
:
function
(
e
,
a
,
t
){
"use strict"
;
t
.
r
(
a
);
t
(
133
);
var
n
,
s
=
t
(
70
),
c
=
t
.
n
(
s
),
r
=
(
t
(
82
),
t
(
29
)),
o
=
t
.
n
(
r
),
i
=
(
t
(
132
),
t
(
35
)),
l
=
t
.
n
(
i
),
d
=
(
t
(
197
),
t
(
84
)),
m
=
t
.
n
(
d
),
u
=
(
t
(
36
),
t
(
10
)),
p
=
t
.
n
(
u
),
_
=
t
(
3
),
f
=
t
(
4
),
E
=
t
(
6
),
h
=
t
(
7
),
v
=
t
(
0
),
N
=
t
.
n
(
v
),
g
=
(
t
(
863
),
t
(
24
)),
b
=
t
(
1
),
w
=
t
(
20
),
y
=
t
(
15
),
C
=
Object
(
w
.
b
)((
function
(
e
){
return
{
user
:
e
.
user
}}))(
n
=
function
(
e
){
Object
(
E
.
a
)(
t
,
e
);
var
a
=
Object
(
h
.
a
)(
t
);
function
t
(
e
){
var
n
;
return
Object
(
_
.
a
)(
this
,
t
),(
n
=
a
.
call
(
this
,
e
)).
invitedFriends
=
function
(){
var
e
=
n
.
state
,
a
=
e
.
pdd_price
,
t
=
e
.
number
,
s
=
e
.
data
;
if
(
b
.
b
.
isWeixin
){
var
c
=
n
.
state
.
share
;
n
.
setState
({
share
:
!
c
}),
Object
(
b
.
m
)({
title
:
"
\
u3010
\
u4ec5
\
u5269"
.
concat
(
t
,
"
\
u4e2a
\
u540d
\
u989d
\
u3011
\
u6211"
).
concat
(
a
,
"
\
u5143
\
u62fc
\
u4e86
\
u300a"
).
concat
(
s
.
course_title
,
"
\
u300b"
),
desc
:
s
.
course_title
,
link
:
window
.
location
.
href
+
"&is_originator=1"
,
imgUrl
:
s
.
image_name
})}
else
p
.
a
.
info
(
"
\
u8bf7
\
u5728
\
u5fae
\
u4fe1
\
u4e2d
\
u4f7f
\
u7528
\
u5206
\
u4eab
\
u529f
\
u80fd
\
uff01"
,
2
)},
n
.
toCourseDetail
=
function
(
e
){
return
n
.
props
.
history
.
push
(
"/detail?id="
.
concat
(
e
),{
href
:
"/classify"
}),
!
1
},
n
.
handleToGroup
=
function
(){
var
e
=
n
.
state
,
a
=
e
.
isBuy
,
t
=
void
0
!==
a
&&
a
,
s
=
e
.
data
,
c
=
void
0
===
s
?{}:
s
,
r
=
n
.
props
,
o
=
r
.
user
,
i
=
r
.
history
,
l
=
r
.
location
;
if
(
o
.
hasError
)
if
(
b
.
b
.
isWeixin
){
var
d
=
window
.
location
.
href
;
if
(
d
.
includes
(
"code="
)
&&
d
.
includes
(
"state=STATE"
)){
var
m
=
d
.
lastIndexOf
(
"code="
);
d
=
d
.
substr
(
0
,
m
-
1
)}
window
.
location
.
assign
(
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
.
concat
(
encodeURIComponent
(
d
),
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
))}
else
i
.
push
(
"/passport"
,{
from
:
l
});
else
t
?
n
.
setState
({
modal
:
!
0
}):
i
.
push
(
"/order?id="
.
concat
(
c
.
course_id
),{
group
:
1
,
pdd_order_id
:
n
.
state
.
pddOrderId
})},
n
.
state
=
{
data
:{},
share
:
!
1
,
pdd_price
:
0
,
groupon_member
:[],
person_num
:
0
,
is_success
:
!
1
,
number
:
0
,
isBuy
:
!
1
,
modal
:
!
1
,
pddOrderId
:
""
,
is_new_user
:
!
0
,
user_info_sample_http
:
!
1
},
n
}
return
Object
(
f
.
a
)(
t
,[{
key
:
"componentDidMount"
,
value
:
function
(){
var
e
=
this
;
b
.
f
.
get
(
""
.
concat
(
API
[
"base-api"
],
"/pdd/info/"
).
concat
(
Object
(
b
.
c
)(
"id"
))).
then
((
function
(
a
){
if
(
0
===
a
.
data
.
errno
){
if
(
e
.
setState
({
data
:
a
.
data
.
data
.
course_info
,
pdd_price
:
a
.
data
.
data
.
pdd_price
,
groupon_member
:
a
.
data
.
data
.
groupon_member
,
is_success
:
a
.
data
.
data
.
is_success
,
person_num
:
a
.
data
.
data
.
person_num
,
course_list
:
a
.
data
.
data
.
course_list
,
number
:
a
.
data
.
data
.
number
,
pddOrderId
:
a
.
data
.
data
.
pdd_order_id
,
countdown
:
""
,
isBuy
:
a
.
data
.
data
.
is_buy
}),
0
===
a
.
data
.
data
.
is_success
){
var
t
=
1
e3
*
a
.
data
.
data
.
end_time
,
n
=
0
,
s
=
0
,
c
=
0
,
r
=
0
;
setInterval
((
function
(){
t
-=
1
e3
,
a
.
data
.
data
.
end_time
>
86400
?(
n
=
""
.
concat
(
parseInt
(
t
/
864
e5
)).
padStart
(
2
,
0
),
s
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
)
/
36
e5
)).
padStart
(
2
,
0
),
c
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
-
36
e5
*
s
)
/
6
e4
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
n
,
"
\
u5929"
).
concat
(
s
,
"
\
u65f6"
).
concat
(
c
,
"
\
u5206"
)})):(
s
=
""
.
concat
(
parseInt
(
t
/
36
e5
)).
padStart
(
2
,
0
),
c
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
s
)
/
6
e4
)).
padStart
(
2
,
0
),
r
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
s
-
6
e4
*
c
)
/
1
e3
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
s
,
":"
).
concat
(
c
,
":"
).
concat
(
r
)}))}),
1
e3
)}}
else
p
.
a
.
info
(
a
.
data
.
msg
,
2
)})),
this
.
state
.
user_info_sample_http
||
b
.
f
.
get
(
""
.
concat
(
API
.
home
,
"/m/user_info_sample/0"
)).
then
((
function
(
a
){
200
===
a
.
data
.
code
?
console
.
log
(
"
\
u5df2
\
u7ecf
\
u767b
\
u5f55"
):
console
.
log
(
"
\
u53bb
\
u767b
\
u5f55"
),
e
.
setState
({
is_new_user
:
a
.
data
.
data
.
is_new_user
,
user_info_sample_http
:
!
0
})}))}},{
key
:
"render"
,
value
:
function
(){
var
e
=
this
,
a
=
this
.
state
,
t
=
a
.
data
,
n
=
t
.
course_id
,
s
=
t
.
course_title
,
c
=
t
.
simpledescription
,
r
=
t
.
price0
,
o
=
t
.
price1
,
i
=
a
.
is_success
,
d
=
a
.
course_list
,
u
=
(
a
.
is_new_user
,
N
.
a
.
createElement
(
"div"
,{
className
:
"info"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"title"
,
onClick
:
function
(){
return
e
.
toCourseDetail
(
n
)}},
s
),
N
.
a
.
createElement
(
"p"
,{
className
:
"contact text-overflow-2"
},
c
),
N
.
a
.
createElement
(
"div"
,{
className
:
"des"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"course-price"
},
N
.
a
.
createElement
(
"span"
,{
className
:
"new"
},
"
\
xa5"
,
o
),
N
.
a
.
createElement
(
"span"
,{
className
:
"old"
},
"
\
xa5"
,
r
)))));
return
N
.
a
.
createElement
(
"div"
,{
className
:
"to-group-box"
},
N
.
a
.
createElement
(
g
.
e
,{
title
:
"
\
u62fc
\
u56e2"
,
cart
:
!
1
,
toHref
:
"/"
}),
N
.
a
.
createElement
(
m
.
a
,{
transparent
:
!
0
,
visible
:
this
.
state
.
modal
,
title
:
"
\
u63d0
\
u793a"
,
footer
:[{
text
:
"
\
u786e
\
u5b9a"
,
onPress
:
function
(){
e
.
setState
({
modal
:
!
1
}),
e
.
props
.
history
.
push
(
"/"
)}}]},
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u7ecf
\
u8d2d
\
u4e70
\
u8fc7
\
u8be5
\
u8bfe
\
u7a0b
\
uff5e"
)),
!
i
&&
N
.
a
.
createElement
(
g
.
j
,{
img
:
this
.
state
.
data
.
image_name
,
id
:
this
.
state
.
data
.
course_id
,
info
:
u
,
toDetail
:
this
.
toCourseDetail
}),
N
.
a
.
createElement
(
I
,{
data
:
this
.
state
,
invitedFriends
:
this
.
invitedFriends
,
handleToGroup
:
this
.
handleToGroup
,
userInfo
:
this
.
props
.
user
}),
N
.
a
.
createElement
(
l
.
a
,
null
),
N
.
a
.
createElement
(
"div"
,{
className
:
"group-course"
},
N
.
a
.
createElement
(
"div"
,{
className
:
"top-title"
},
N
.
a
.
createElement
(
"span"
,
null
,
"
\
u672c
\
u5468
\
u7279
\
u60e0"
)),
d
&&
d
.
length
>
0
&&
d
[
0
].
course
&&
d
[
0
].
course
.
length
>
0
&&
d
[
0
].
course
.
slice
(
0
,
4
).
map
((
function
(
a
){
var
t
=
N
.
a
.
createElement
(
"div"
,{
className
:
"info"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"title"
,
onClick
:
function
(){
return
e
.
toCourseDetail
(
a
.
course_id
)}},
a
.
course_title
),
N
.
a
.
createElement
(
"p"
,{
className
:
"contact text-overflow-2"
},
a
.
simpledescription
),
N
.
a
.
createElement
(
"div"
,{
className
:
"des"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"course-price"
},
N
.
a
.
createElement
(
"span"
,{
className
:
"new"
},
"
\
xa5"
,
a
.
pdd_price
),
N
.
a
.
createElement
(
"span"
,{
className
:
"old"
},
"
\
xa5"
,
a
.
price0
))));
return
N
.
a
.
createElement
(
g
.
j
,{
img
:
a
.
image_name
,
key
:
a
.
course_id
,
id
:
a
.
course_id
,
info
:
t
,
toDetail
:
e
.
toCourseDetail
})}))))}}]),
t
}(
v
.
Component
))
||
n
;
function
I
(
e
){
var
a
,
t
,
n
,
s
;
console
.
log
(
"GorupContent------data:"
,
e
);
for
(
var
r
=
e
.
data
,
i
=
r
.
pdd_price
,
l
=
r
.
data
,
d
=
r
.
groupon_member
,
m
=
r
.
is_success
,
u
=
r
.
person_num
,
p
=
r
.
share
,
_
=
r
.
number
,
f
=
r
.
countdown
,
E
=
r
.
is_new_user
,
h
=
e
.
userInfo
,
v
=
[],
g
=
_
;
0
!=
g
;)
v
.
push
(
g
),
g
--
;
if
(
s
=
N
.
a
.
createElement
(
"div"
,{
className
:
"group-user-list"
},
N
.
a
.
createElement
(
o
.
a
,{
justify
:
"center"
,
className
:
"imgList"
},
d
.
map
((
function
(
e
){
return
N
.
a
.
createElement
(
"div"
,{
className
:
"imgContainer"
,
key
:
Math
.
random
()},
N
.
a
.
createElement
(
"img"
,{
className
:
"imgname"
,
src
:
e
.
avatar
,
alt
:
""
}),
1
===
e
.
user_type
?
N
.
a
.
createElement
(
"div"
,{
className
:
"leaderFlag"
},
N
.
a
.
createElement
(
"span"
,
null
,
"
\
u56e2
\
u957f"
)):
null
)})),
v
.
map
((
function
(
e
){
return
N
.
a
.
createElement
(
"div"
,{
className
:
"imgContainer"
,
key
:
Math
.
random
()},
N
.
a
.
createElement
(
"div"
,{
className
:
"imgname"
},
N
.
a
.
createElement
(
"i"
,{
className
:
"iconfont iconwode-xianxing no-body"
})))})))),
d
&&
d
.
length
>
0
){
var
w
=!
1
;
!
h
.
hasError
&&
d
.
forEach
((
function
(
e
){
e
.
uid
==
h
.
data
.
uid
&&
(
w
=!
0
)})),
w
?(
a
=
E
?
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
Math
.
round
(
l
.
price1
-
i
,
2
),
"
\
u5143"
)):
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u662f
\
u4e03
\
u6708
\
u7
528
\
u6237
\
u65e0
\
u6cd5
\
u53c2
\
u4e0e
\
u8be5
\
u56e2
\
uff0c
\
u5f00
\
u65b0
\
u56e2
\
u9080
\
u8bf7
\
u5c1a
\
u672a
\
u6ce8
\
u518c
\
u4e03
\
u6708
\
u7684
\
u52a0
\
u5165
\
u5427"
),
t
=
N
.
a
.
createElement
(
"span"
,{
className
:
"group-btn"
,
onClick
:
e
.
invitedFriends
},
"
\
u9080
\
u8bf7
\
u597d
\
u53cb
\
u53c2
\
u56e2 "
,
f
,
"
\
u540e
\
u7ed3
\
u675f"
),
n
=
N
.
a
.
createElement
(
"p"
,{
className
:
"dec"
},
"
\
u5206
\
u4eab
\
u52303
\
u4e2a
\
u7fa4
\
u540e
\
uff0c
\
u6210
\
u56e2
\
u7387
\
u9ad8
\
u8fbe98%"
)):
1
==
Object
(
b
.
c
)(
"is_originator"
)?(
a
=
E
?
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
Math
.
round
(
l
.
price1
-
i
,
2
),
"
\
u5143"
)):
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u662f
\
u4e03
\
u6708
\
u7528
\
u6237
\
u65e0
\
u6cd5
\
u53c2
\
u4e0e
\
u8be5
\
u56e2
\
uff0c
\
u5f00
\
u65b0
\
u56e2
\
u9080
\
u8bf7
\
u5c1a
\
u672a
\
u6ce8
\
u518c
\
u4e03
\
u6708
\
u7684
\
u52a0
\
u5165
\
u5427"
),
t
=
E
?
N
.
a
.
createElement
(
"a"
,{
href
:
"javascript:;"
,
className
:
"group-btn"
,
onClick
:
e
.
handleToGroup
},
"
\
u4e00
\
u952e
\
u53c2
\
u56e2"
):
N
.
a
.
createElement
(
"a"
,{
href
:
"javascript:;"
,
className
:
"group-btn"
,
onClick
:
e
.
handleToGroup
},
"
\
u4e00
\
u952e
\
u5f00
\
u56e2"
)):(
a
=
E
?
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
Math
.
round
(
l
.
price1
-
i
,
2
),
"
\
u5143"
)):
N
.
a
.
createElement
(
"p"
,
null
,
"
\
u60a8
\
u5df2
\
u662f
\
u4e03
\
u6708
\
u7528
\
u6237
\
u65e0
\
u6cd5
\
u53c2
\
u4e0e
\
u8be5
\
u56e2
\
uff0c
\
u5f00
\
u65b0
\
u56e2
\
u9080
\
u8bf7
\
u5c1a
\
u672a
\
u6ce8
\
u518c
\
u4e03
\
u6708
\
u7684
\
u52a0
\
u5165
\
u5427
"
),
t
=
N
.
a
.
createElement
(
"span"
,{
className
:
"group-btn"
,
onClick
:
e
.
invitedFriends
},
"
\
u9080
\
u8bf7
\
u597d
\
u53cb
\
u53c2
\
u56e2 "
,
f
,
"
\
u540e
\
u7ed3
\
u675f"
),
n
=
N
.
a
.
createElement
(
"p"
,{
className
:
"dec"
},
"
\
u5206
\
u4eab
\
u52303
\
u4e2a
\
u7fa4
\
u540e
\
uff0c
\
u6210
\
u56e2
\
u7387
\
u9ad8
\
u8fbe98%"
))}
return
1
===
m
&&
(
a
=
N
.
a
.
createElement
(
"p"
,{
className
:
"success"
},
"
\
u62fc
\
u56e2
\
u6210
\
u529f"
),
t
=
N
.
a
.
createElement
(
y
.
b
,{
to
:
"/detail?id="
.
concat
(
l
.
course_id
),
className
:
"tostudy"
},
"
\
u53bb
\
u5b66
\
u4e60"
)),
N
.
a
.
createElement
(
"div"
,{
className
:
"gorup-content"
},
p
?
N
.
a
.
createElement
(
"div"
,{
className
:
"groupSuccessMbc"
,
onClick
:
e
.
invitedFriends
},
N
.
a
.
createElement
(
"div"
,{
className
:
"tipContent"
},
"
\
u8fd8
\
u5dee"
.
concat
(
_
,
"
\
u4eba
\
uff0c
\
u5206
\
u4eab
\
u52303
\
u4e2a
\
u7fa4
\
uff0c
\
u6210
\
u56e2
\
u7387
\
u9ad8
\
u8fbe98%"
)),
N
.
a
.
createElement
(
"div"
,{
className
:
"tipArrow"
},
N
.
a
.
createElement
(
"i"
,{
className
:
"iconfont iconyindao"
}))):
null
,
a
,
N
.
a
.
createElement
(
c
.
a
,
null
,
s
),
N
.
a
.
createElement
(
c
.
a
,
null
,
t
),
n
,
!
m
&&
N
.
a
.
createElement
(
"div"
,{
className
:
"group-dec"
},
N
.
a
.
createElement
(
"span"
,
null
,
N
.
a
.
createElement
(
"i"
,{
className
:
"iconfont iconiconfront-1"
}),
"
\
xb7
\
u597d
\
u53cb
\
u53c2
\
u56e2
\
xb7
\
u4eba
\
u6ee1
\
u6210
\
u4ea4
\
xb7
\
u4eba
\
u4e0d
\
u6ee1
\
u9000
\
u6b3e"
),
N
.
a
.
createElement
(
"span"
,{
className
:
"allNum"
},
"
\
u7d2f
\
u8ba1"
.
concat
(
u
,
"
\
u4eba
\
u6210
\
u56e2"
))))}
a
.
default
=
C
},
863
:
function
(
e
,
a
,
t
){}}]);
//# sourceMappingURL=togroup.013b5bb9.chunk.js.map
\ No newline at end of file
build/mrstaticjs/togroup.013b5bb9.chunk.js.map
View file @
2063a15a
{"version":3,"sources":["components/detail/group/togroup.js"],"names":["ToGroup","connect","state","user","props","invitedFriends","pdd_price","number","data","browser","isWeixin","share","setState","wxShare","title","course_title","desc","link","window","location","href","imgUrl","image_name","info","toCourseDetail","id","history","push","handleToGroup","isBuy","hasError","redirectURI","includes","index","lastIndexOf","substr","assign","encodeURIComponent","from","modal","course_id","group","pdd_order_id","pddOrderId","groupon_member","person_num","is_success","is_new_user","user_info_sample_http","http","get","API","getParam","then","res","errno","course_info","course_list","countdown","is_buy","date","end_time","day","hours","minutes","seconds","setInterval","parseInt","padStart","msg","this","home","code","console","log","simpledescription","price0","price1","Info","className","onClick","cart","toHref","transparent","visible","footer","text","onPress","img","toDetail","GorupContent","userInfo","length","course","slice","map","item","weekInfo","key","Component","tip","btn","dec","groupTip","ary","num","justify","Math","random","src","avatar","alt","user_type","flag","forEach","uid","round","to"],"mappings":"iVAUMA,EADLC,aAAQ,SAACC,GAAK,MAAM,CAAEC,KAAMD,EAAMC,QAAQ,qDAEzC,WAAYC,GAAQ,IAAD,EAehB,OAfgB,qBACjB,cAAMA,IAiBRC,eAAiB,WACf,MAAoC,EAAKH,MAAjCI,EAAS,EAATA,UAAWC,EAAM,EAANA,OAAQC,EAAI,EAAJA,KAC3B,GAAIC,IAAQC,SAAU,CACpB,IAAIC,EAAQ,EAAKT,MAAMS,MACvB,EAAKC,SAAS,CACZD,OAAQA,IAEVE,YAAQ,CACNC,MAAM,qBAAD,OAAQP,EAAM,yCAAQD,EAAS,mCAAOE,EAAKO,aAAY,UAC5DC,KAAMR,EAAKO,aACXE,KAAMC,OAAOC,SAASC,KAAO,mBAC7BC,OAAQb,EAAKc,kBAGf,IAAMC,KAAK,2EAAgB,IAE9B,EAuEDC,eAAiB,SAACC,GAGhB,OAFoB,EAAKrB,MAAjBsB,QACAC,KAAK,cAAD,OAAeF,GAAM,CAAEL,KAAM,eAClC,GACR,E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UAAU,UAAQ,sBAAOlC,EAAU,yBAOpC7C,a","file":"mrstaticjs/togroup.013b5bb9.chunk.js","sourcesContent":["/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */\r\nimport React, { Component } from \"react\"\r\nimport \"./togroup.scss\"\r\nimport { HeaderBar, VList } from \"../../../common\"\r\nimport { getParam, http, browser, wxShare } from \"src/utils\"\r\nimport { connect } from \"react-redux\"\r\nimport { Link } from \"react-router-dom\"\r\nimport { WingBlank, WhiteSpace, Flex, Toast, Modal } from \"antd-mobile\"\r\n\r\n@connect((state) => ({ user: state.user }))\r\nclass ToGroup extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n data: {},\r\n share: false,\r\n pdd_price: 0,\r\n groupon_member: [],\r\n person_num: 0, // 共多少人成团\r\n is_success: false, // 是否拼团成功\r\n number: 0, // 差几人成团\r\n isBuy: false,\r\n modal: false,\r\n pddOrderId: \"\",\r\n is_new_user: true,\r\n user_info_sample_http: false\r\n }\r\n }\r\n\r\n invitedFriends = () => {\r\n const { pdd_price, number, data } = this.state\r\n if (browser.isWeixin) {\r\n let share = this.state.share\r\n this.setState({\r\n share: !share,\r\n })\r\n wxShare({\r\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\r\n desc: data.course_title,\r\n link: window.location.href + \"&is_originator=1\",\r\n imgUrl: data.image_name,\r\n })\r\n } else {\r\n Toast.info(\"请在微信中使用分享功能!\", 2)\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n http.get(`${API[\"base-api\"]}/pdd/info/${getParam(\"id\")}`).then((res) => {\r\n if (res.data.errno !== 0) {\r\n Toast.info(res.data.msg, 2)\r\n return\r\n }\r\n this.setState({\r\n data: res.data.data.course_info,\r\n pdd_price: res.data.data.pdd_price,\r\n groupon_member: res.data.data.groupon_member,\r\n is_success: res.data.data.is_success,\r\n person_num: res.data.data.person_num,\r\n course_list: res.data.data.course_list,\r\n number: res.data.data.number,\r\n pddOrderId: res.data.data.pdd_order_id,\r\n countdown: \"\",\r\n isBuy: res.data.data.is_buy,\r\n })\r\n\r\n if (res.data.data.is_success === 0) {\r\n let date = res.data.data.end_time * 1000,\r\n day = 0,\r\n hours = 0,\r\n minutes = 0,\r\n seconds = 0\r\n setInterval(() => {\r\n date -= 1000\r\n if (res.data.data.end_time > 86400) {\r\n day = `${parseInt(date / (3600000 * 24))}`.padStart(2, 0)\r\n hours = `${parseInt(\r\n (date - day * 3600000 * 24) / 3600000\r\n )}`.padStart(2, 0)\r\n minutes = `${parseInt(\r\n (date - day * 3600000 * 24 - hours * 3600000) / 60000\r\n )}`.padStart(2, 0)\r\n this.setState({\r\n countdown: `${day}天${hours}时${minutes}分`,\r\n })\r\n } else {\r\n hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0)\r\n minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(\r\n 2,\r\n 0\r\n )\r\n seconds = `${parseInt(\r\n (date - hours * 3600000 - minutes * 60000) / 1000\r\n )}`.padStart(2, 0)\r\n this.setState({\r\n countdown: `${hours}:${minutes}:${seconds}`,\r\n })\r\n }\r\n }, 1000)\r\n }\r\n })\r\n if (!this.state.user_info_sample_http) {\r\n http.get(`${API.home}/m/user_info_sample/0`).then((res) => {\r\n if (res.data.code === 200) {\r\n console.log('已经登录');\r\n } else {\r\n //为登录,去登录\r\n console.log('去登录');\r\n // this.props.history.push(\"/passport\", { from: this.props.location })\r\n }\r\n this.setState({ is_new_user: res.data.data.is_new_user, user_info_sample_http: true })\r\n })\r\n }\r\n\r\n }\r\n\r\n toCourseDetail = (id) => {\r\n const { history } = this.props\r\n history.push(`/detail?id=${id}`, { href: \"/classify\" })\r\n return false\r\n }\r\n\r\n handleToGroup = () => {\r\n const { isBuy = false, data = {} } = this.state\r\n const { user, history, location } = this.props\r\n if (user.hasError) {\r\n if (browser.isWeixin) {\r\n let redirectURI = window.location.href\r\n if (\r\n redirectURI.includes(\"code=\") &&\r\n redirectURI.includes(\"state=STATE\")\r\n ) {\r\n let index = redirectURI.lastIndexOf(\"code=\")\r\n redirectURI = redirectURI.substr(0, index - 1)\r\n }\r\n window.location.assign(\r\n `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(\r\n redirectURI\r\n )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`\r\n )\r\n } else {\r\n history.push(\"/passport\", { from: location })\r\n }\r\n return\r\n }\r\n\r\n if (!isBuy) {\r\n history.push(`/order?id=${data.course_id}`, {\r\n group: 1,\r\n pdd_order_id: this.state.pddOrderId,\r\n })\r\n } else {\r\n this.setState({\r\n modal: true,\r\n })\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n data: { course_id, course_title, simpledescription, price0, price1 },\r\n is_success,\r\n course_list,\r\n is_new_user\r\n } = this.state\r\n const Info = (\r\n <div className=\"info\">\r\n <p className=\"title\" onClick={() => this.toCourseDetail(course_id)}>\r\n {course_title}\r\n </p>\r\n <p className=\"contact text-overflow-2\">{simpledescription}</p>\r\n <div className=\"des\">\r\n <p className=\"course-price\">\r\n <span className=\"new\">¥{price1}</span>\r\n <span className=\"old\">¥{price0}</span>\r\n </p>\r\n </div>\r\n </div>\r\n )\r\n return (\r\n <div className=\"to-group-box\">\r\n <HeaderBar title=\"拼团\" cart={false} toHref={\"/\"}></HeaderBar>\r\n <Modal\r\n transparent\r\n visible={this.state.modal}\r\n title=\"提示\"\r\n footer={[\r\n {\r\n text: \"确定\",\r\n onPress: () => {\r\n this.setState({\r\n modal: false,\r\n })\r\n this.props.history.push(\"/\")\r\n },\r\n },\r\n ]}\r\n >\r\n <p>您已经购买过该课程~</p>\r\n </Modal>\r\n {!is_success && (\r\n <VList\r\n img={this.state.data.image_name}\r\n id={this.state.data.course_id}\r\n info={Info}\r\n toDetail={this.toCourseDetail}\r\n />\r\n )}\r\n\r\n <GorupContent\r\n data={this.state}\r\n invitedFriends={this.invitedFriends}\r\n handleToGroup={this.handleToGroup}\r\n userInfo={this.props.user}\r\n />\r\n\r\n <WhiteSpace></WhiteSpace>\r\n <div className=\"group-course\">\r\n <div className=\"top-title\">\r\n <span>本周特惠</span>\r\n {/* <Link to={`/preferential`} className=\"more\">\r\n 更多<i className=\"iconfont iconiconfront-70\"></i>\r\n </Link> */}\r\n </div>\r\n {course_list &&\r\n course_list.length > 0 &&\r\n course_list[0].course &&\r\n course_list[0].course.length > 0 &&\r\n course_list[0].course.slice(0, 4).map((item) => {\r\n let weekInfo = (\r\n <div className=\"info\">\r\n <p\r\n className=\"title\"\r\n onClick={() => this.toCourseDetail(item.course_id)}\r\n >\r\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\r\n {item.course_title}\r\n {/* </Link> */}\r\n </p>\r\n <p className=\"contact text-overflow-2\">\r\n {item.simpledescription}\r\n </p>\r\n <div className=\"des\">\r\n <p className=\"course-price\">\r\n <span className=\"new\">¥{item.pdd_price}</span>\r\n <span className=\"old\">¥{item.price0}</span>\r\n </p>\r\n </div>\r\n </div>\r\n )\r\n return (\r\n <VList\r\n img={item.image_name}\r\n key={item.course_id}\r\n id={item.course_id}\r\n info={weekInfo}\r\n toDetail={this.toCourseDetail}\r\n />\r\n )\r\n })}\r\n </div>\r\n </div>\r\n )\r\n }\r\n}\r\n\r\nfunction GorupContent(props) {\r\n console.log('GorupContent------data:',props)\r\n let tip, btn, dec, groupTip\r\n const {\r\n pdd_price,\r\n data,\r\n groupon_member,\r\n is_success,\r\n person_num,\r\n share,\r\n number,\r\n countdown,\r\n is_new_user\r\n } = props.data\r\n const { userInfo } = props\r\n let ary = [],\r\n num = number\r\n\r\n while (num != 0) {\r\n ary.push(num)\r\n num--\r\n }\r\n groupTip = (\r\n <div className=\"group-user-list\">\r\n <Flex justify=\"center\" className=\"imgList\">\r\n {groupon_member.map((item) => {\r\n return (\r\n <div className=\"imgContainer\" key={Math.random()}>\r\n <img className=\"imgname\" src={item.avatar} alt=\"\" />\r\n {item.user_type === 1 ? (\r\n <div className=\"leaderFlag\">\r\n <span>团长</span>\r\n </div>\r\n ) : null}\r\n </div>\r\n )\r\n })}\r\n {ary.map((item) => {\r\n return (\r\n <div className=\"imgContainer\" key={Math.random()}>\r\n <div className=\"imgname\">\r\n <i className=\"iconfont iconwode-xianxing no-body\"></i>\r\n </div>\r\n </div>\r\n )\r\n })}\r\n </Flex>\r\n </div>\r\n )\r\n\r\n if (groupon_member && groupon_member.length > 0) {\r\n let flag = false\r\n !userInfo.hasError &&\r\n groupon_member.forEach((item) => {\r\n if (item.uid == userInfo.data.uid) {\r\n flag = true\r\n }\r\n })\r\n if (flag) {\r\n\r\n tip = (\r\n is_new_user ? <p className=\"tip\">{`拼团省¥${Math.round(\r\n data.price1 - pdd_price,\r\n 2\r\n )}元`}</p> :\r\n <p>您已是七月的老朋友,快开团邀请好友加入吧(老用户自动开新团)</p>\r\n )\r\n btn = (\r\n <span className=\"group-btn\" onClick={props.invitedFriends}>\r\n 邀请好友参团 {countdown} 后结束\r\n </span>\r\n )\r\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\r\n } else {\r\n if (getParam(\"is_originator\") == 1) {\r\n tip = (\r\n is_new_user ? <p className=\"tip\">{`拼团省¥${Math.round(\r\n data.price1 - pdd_price,\r\n 2\r\n )}元`}</p> :\r\n <p>您已是七月的老朋友,快开团邀请好友加入吧(老用户自动开新团)</p>\r\n )\r\n btn = (\r\n is_new_user ? <a\r\n href=\"javascript:;\"\r\n className=\"group-btn\"\r\n onClick={props.handleToGroup}\r\n >\r\n 一键参团\r\n </a>:<a\r\n href=\"javascript:;\"\r\n className=\"group-btn\"\r\n onClick={props.handleToGroup}\r\n >\r\n 一键开团\r\n </a>\r\n )\r\n } else {\r\n tip = (\r\n is_new_user ? <p className=\"tip\">{`拼团省¥${Math.round(\r\n data.price1 - pdd_price,\r\n 2\r\n )}元`}</p> :\r\n <p>您已是七月的老朋友,快开团邀请好友加入吧(老用户自动开新团)</p>\r\n )\r\n btn = (\r\n <span className=\"group-btn\" onClick={props.invitedFriends}>\r\n 邀请好友参团 {countdown} 后结束\r\n </span>\r\n )\r\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\r\n }\r\n }\r\n }\r\n\r\n if (is_success === 1) {\r\n tip = <p className=\"success\">拼团成功</p>\r\n btn = (\r\n <Link to={`/detail?id=${data.course_id}`} className=\"tostudy\">\r\n 去学习\r\n </Link>\r\n )\r\n }\r\n return (\r\n <div className=\"gorup-content\">\r\n {share ? (\r\n <div className=\"groupSuccessMbc\" onClick={props.invitedFriends}>\r\n <div className=\"tipContent\">\r\n {`还差${number}人,分享到3个群,成团率高达98%`}\r\n </div>\r\n <div className=\"tipArrow\">\r\n <i className=\"iconfont iconyindao\"></i>\r\n </div>\r\n </div>\r\n ) : null}\r\n\r\n {tip}\r\n <WingBlank>{groupTip}</WingBlank>\r\n <WingBlank>{btn}</WingBlank>\r\n {dec}\r\n {!is_success && (\r\n <div className=\"group-dec\">\r\n <span>\r\n <i className=\"iconfont iconiconfront-1\"></i>\r\n ·好友参团 ·人满成交 ·人不满退款\r\n </span>\r\n <span className=\"allNum\">{`累计${person_num}人成团`}</span>\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ToGroup\r\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["components/detail/group/togroup.js"],"names":["ToGroup","connect","state","user","props","invitedFriends","pdd_price","number","data","browser","isWeixin","share","setState","wxShare","title","course_title","desc","link","window","location","href","imgUrl","image_name","info","toCourseDetail","id","history","push","handleToGroup","isBuy","hasError","redirectURI","includes","index","lastIndexOf","substr","assign","encodeURIComponent","from","modal","course_id","group","pdd_order_id","pddOrderId","groupon_member","person_num","is_success","is_new_user","user_info_sample_http","http","get","API","getParam","then","res","errno","course_info","course_list","countdown","is_buy","date","end_time","day","hours","minutes","seconds","setInterval","parseInt","padStart","msg","this","home","code","console","log","simpledescription","price0","price1","Info","className","onClick","cart","toHref","transparent","visible","footer","text","onPress","img","toDetail","GorupContent","userInfo","length","course","slice","map","item","weekInfo","key","Component","tip","btn","dec","groupTip","ary","num","justify","Math","random","src","avatar","alt","user_type","flag","forEach","uid","round","to"],"mappings":"iVAUMA,EADLC,aAAQ,SAACC,GAAK,MAAM,CAAEC,KAAMD,EAAMC,QAAQ,qDAEzC,WAAYC,GAAQ,IAAD,EAehB,OAfgB,qBACjB,cAAMA,IAiBRC,eAAiB,WACf,MAAoC,EAAKH,MAAjCI,EAAS,EAATA,UAAWC,EAAM,EAANA,OAAQC,EAAI,EAAJA,KAC3B,GAAIC,IAAQC,SAAU,CACpB,IAAIC,EAAQ,EAAKT,MAAMS,MACvB,EAAKC,SAAS,CACZD,OAAQA,IAEVE,YAAQ,CACNC,MAAM,qBAAD,OAAQP,EAAM,yCAAQD,EAAS,mCAAOE,EAAKO,aAAY,UAC5DC,KAAMR,EAAKO,aACXE,KAAMC,OAAOC,SAASC,KAAO,mBAC7BC,OAAQb,EAAKc,kBAGf,IAAMC,KAAK,2EAAgB,IAE9B,EAuEDC,eAAiB,SAACC,GAGhB,OAFoB,EAAKrB,MAAjBsB,QACAC,KAAK,cAAD,OAAeF,GAAM,CAAEL,KAAM,eAClC,GACR,EAEDQ,cAAgB,WACd,MAAqC,EAAK1B,MAAK,IAAvC2B,aAAK,OAAQ,MAAErB,YAAI,MAAG,GAAE,EAChC,EAAoC,EAAKJ,MAAjCD,EAAI,EAAJA,KAAMuB,EAAO,EAAPA,QAASP,EAAQ,EAARA,SACvB,GAAIhB,EAAK2B,SACP,GAAIrB,IAAQC,SAAU,CACpB,IAAIqB,EAAcb,OAAOC,SAASC,KAClC,GACEW,EAAYC,SAAS,UACrBD,EAAYC,SAAS,eACrB,CACA,IAAIC,EAAQF,EAAYG,YAAY,SACpCH,EAAcA,EAAYI,OAAO,EAAGF,EAAQ,GAE9Cf,OAAOC,SAASiB,OAAO,6FAAD,OACyEC,mBAC3FN,GACD,+EAGHL,EAAQC,KAAK,YAAa,CAAEW,KAAMnB,SAKjCU,EAMH,EAAK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,EAAMwB,eAAc,4BAG1B,uBACHR,KAAK,eACL2D,UAAU,YACVC,QAAS5E,EAAMwB,eAAc,8BAMjCwE,EACErD,EAAc,uBAAGgC,UAAU,OAAK,kCAAS4B,KAAKS,MAC5C5G,EAAKqE,OAASvE,EACd,GACD,WACC,mNAEJ+F,EACE,0BAAMtB,UAAU,YAAYC,QAAS5E,EAAMC,gBAAe,wCAChDqD,EAAS,uBAGrB4C,EAAM,uBAAGvB,UAAU,OAAK,iFAa9B,OARmB,IAAfjC,IACFsD,EAAM,uBAAGrB,UAAU,WAAS,4BAC5BsB,EACE,kBAAC,IAAI,CAACgB,GAAE,qBAAgB7G,EAAKgC,WAAauC,UAAU,WAAS,uBAM/D,yBAAKA,UAAU,iBACZpE,EACC,yBAAKoE,UAAU,kBAAkBC,QAAS5E,EAAMC,gBAC9C,yBAAK0E,UAAU,cAAY,sBACnBxE,EAAM,uFAEd,yBAAKwE,UAAU,YACb,uBAAGA,UAAU,0BAGf,KAEHqB,EACD,2BAAYG,GACZ,2BAAYF,GACXC,GACCxD,GACA,yBAAKiC,UAAU,aACb,8BACE,uBAAGA,UAAU,6BAA+B,gGAG9C,0BAAMA,UAAU,UAAQ,sBAAOlC,EAAU,yBAOpC7C,a","file":"mrstaticjs/togroup.013b5bb9.chunk.js","sourcesContent":["/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */\r\nimport React, { Component } from \"react\"\r\nimport \"./togroup.scss\"\r\nimport { HeaderBar, VList } from \"../../../common\"\r\nimport { getParam, http, browser, wxShare } from \"src/utils\"\r\nimport { connect } from \"react-redux\"\r\nimport { Link } from \"react-router-dom\"\r\nimport { WingBlank, WhiteSpace, Flex, Toast, Modal } from \"antd-mobile\"\r\n\r\n@connect((state) => ({ user: state.user }))\r\nclass ToGroup extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n data: {},\r\n share: false,\r\n pdd_price: 0,\r\n groupon_member: [],\r\n person_num: 0, // 共多少人成团\r\n is_success: false, // 是否拼团成功\r\n number: 0, // 差几人成团\r\n isBuy: false,\r\n modal: false,\r\n pddOrderId: \"\",\r\n is_new_user: true,\r\n user_info_sample_http: false\r\n }\r\n }\r\n\r\n invitedFriends = () => {\r\n const { pdd_price, number, data } = this.state\r\n if (browser.isWeixin) {\r\n let share = this.state.share\r\n this.setState({\r\n share: !share,\r\n })\r\n wxShare({\r\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\r\n desc: data.course_title,\r\n link: window.location.href + \"&is_originator=1\",\r\n imgUrl: data.image_name,\r\n })\r\n } else {\r\n Toast.info(\"请在微信中使用分享功能!\", 2)\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n http.get(`${API[\"base-api\"]}/pdd/info/${getParam(\"id\")}`).then((res) => {\r\n if (res.data.errno !== 0) {\r\n Toast.info(res.data.msg, 2)\r\n return\r\n }\r\n this.setState({\r\n data: res.data.data.course_info,\r\n pdd_price: res.data.data.pdd_price,\r\n groupon_member: res.data.data.groupon_member,\r\n is_success: res.data.data.is_success,\r\n person_num: res.data.data.person_num,\r\n course_list: res.data.data.course_list,\r\n number: res.data.data.number,\r\n pddOrderId: res.data.data.pdd_order_id,\r\n countdown: \"\",\r\n isBuy: res.data.data.is_buy,\r\n })\r\n\r\n if (res.data.data.is_success === 0) {\r\n let date = res.data.data.end_time * 1000,\r\n day = 0,\r\n hours = 0,\r\n minutes = 0,\r\n seconds = 0\r\n setInterval(() => {\r\n date -= 1000\r\n if (res.data.data.end_time > 86400) {\r\n day = `${parseInt(date / (3600000 * 24))}`.padStart(2, 0)\r\n hours = `${parseInt(\r\n (date - day * 3600000 * 24) / 3600000\r\n )}`.padStart(2, 0)\r\n minutes = `${parseInt(\r\n (date - day * 3600000 * 24 - hours * 3600000) / 60000\r\n )}`.padStart(2, 0)\r\n this.setState({\r\n countdown: `${day}天${hours}时${minutes}分`,\r\n })\r\n } else {\r\n hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0)\r\n minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(\r\n 2,\r\n 0\r\n )\r\n seconds = `${parseInt(\r\n (date - hours * 3600000 - minutes * 60000) / 1000\r\n )}`.padStart(2, 0)\r\n this.setState({\r\n countdown: `${hours}:${minutes}:${seconds}`,\r\n })\r\n }\r\n }, 1000)\r\n }\r\n })\r\n if (!this.state.user_info_sample_http) {\r\n http.get(`${API.home}/m/user_info_sample/0`).then((res) => {\r\n if (res.data.code === 200) {\r\n console.log('已经登录');\r\n } else {\r\n //为登录,去登录\r\n console.log('去登录');\r\n // this.props.history.push(\"/passport\", { from: this.props.location })\r\n }\r\n this.setState({ is_new_user: res.data.data.is_new_user, user_info_sample_http: true })\r\n })\r\n }\r\n\r\n }\r\n\r\n toCourseDetail = (id) => {\r\n const { history } = this.props\r\n history.push(`/detail?id=${id}`, { href: \"/classify\" })\r\n return false\r\n }\r\n\r\n handleToGroup = () => {\r\n const { isBuy = false, data = {} } = this.state\r\n const { user, history, location } = this.props\r\n if (user.hasError) {\r\n if (browser.isWeixin) {\r\n let redirectURI = window.location.href\r\n if (\r\n redirectURI.includes(\"code=\") &&\r\n redirectURI.includes(\"state=STATE\")\r\n ) {\r\n let index = redirectURI.lastIndexOf(\"code=\")\r\n redirectURI = redirectURI.substr(0, index - 1)\r\n }\r\n window.location.assign(\r\n `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(\r\n redirectURI\r\n )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`\r\n )\r\n } else {\r\n history.push(\"/passport\", { from: location })\r\n }\r\n return\r\n }\r\n\r\n if (!isBuy) {\r\n history.push(`/order?id=${data.course_id}`, {\r\n group: 1,\r\n pdd_order_id: this.state.pddOrderId,\r\n })\r\n } else {\r\n this.setState({\r\n modal: true,\r\n })\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n data: { course_id, course_title, simpledescription, price0, price1 },\r\n is_success,\r\n course_list,\r\n is_new_user\r\n } = this.state\r\n const Info = (\r\n <div className=\"info\">\r\n <p className=\"title\" onClick={() => this.toCourseDetail(course_id)}>\r\n {course_title}\r\n </p>\r\n <p className=\"contact text-overflow-2\">{simpledescription}</p>\r\n <div className=\"des\">\r\n <p className=\"course-price\">\r\n <span className=\"new\">¥{price1}</span>\r\n <span className=\"old\">¥{price0}</span>\r\n </p>\r\n </div>\r\n </div>\r\n )\r\n return (\r\n <div className=\"to-group-box\">\r\n <HeaderBar title=\"拼团\" cart={false} toHref={\"/\"}></HeaderBar>\r\n <Modal\r\n transparent\r\n visible={this.state.modal}\r\n title=\"提示\"\r\n footer={[\r\n {\r\n text: \"确定\",\r\n onPress: () => {\r\n this.setState({\r\n modal: false,\r\n })\r\n this.props.history.push(\"/\")\r\n },\r\n },\r\n ]}\r\n >\r\n <p>您已经购买过该课程~</p>\r\n </Modal>\r\n {!is_success && (\r\n <VList\r\n img={this.state.data.image_name}\r\n id={this.state.data.course_id}\r\n info={Info}\r\n toDetail={this.toCourseDetail}\r\n />\r\n )}\r\n\r\n <GorupContent\r\n data={this.state}\r\n invitedFriends={this.invitedFriends}\r\n handleToGroup={this.handleToGroup}\r\n userInfo={this.props.user}\r\n />\r\n\r\n <WhiteSpace></WhiteSpace>\r\n <div className=\"group-course\">\r\n <div className=\"top-title\">\r\n <span>本周特惠</span>\r\n {/* <Link to={`/preferential`} className=\"more\">\r\n 更多<i className=\"iconfont iconiconfront-70\"></i>\r\n </Link> */}\r\n </div>\r\n {course_list &&\r\n course_list.length > 0 &&\r\n course_list[0].course &&\r\n course_list[0].course.length > 0 &&\r\n course_list[0].course.slice(0, 4).map((item) => {\r\n let weekInfo = (\r\n <div className=\"info\">\r\n <p\r\n className=\"title\"\r\n onClick={() => this.toCourseDetail(item.course_id)}\r\n >\r\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\r\n {item.course_title}\r\n {/* </Link> */}\r\n </p>\r\n <p className=\"contact text-overflow-2\">\r\n {item.simpledescription}\r\n </p>\r\n <div className=\"des\">\r\n <p className=\"course-price\">\r\n <span className=\"new\">¥{item.pdd_price}</span>\r\n <span className=\"old\">¥{item.price0}</span>\r\n </p>\r\n </div>\r\n </div>\r\n )\r\n return (\r\n <VList\r\n img={item.image_name}\r\n key={item.course_id}\r\n id={item.course_id}\r\n info={weekInfo}\r\n toDetail={this.toCourseDetail}\r\n />\r\n )\r\n })}\r\n </div>\r\n </div>\r\n )\r\n }\r\n}\r\n\r\nfunction GorupContent(props) {\r\n console.log('GorupContent------data:',props)\r\n let tip, btn, dec, groupTip\r\n const {\r\n pdd_price,\r\n data,\r\n groupon_member,\r\n is_success,\r\n person_num,\r\n share,\r\n number,\r\n countdown,\r\n is_new_user\r\n } = props.data\r\n const { userInfo } = props\r\n let ary = [],\r\n num = number\r\n\r\n while (num != 0) {\r\n ary.push(num)\r\n num--\r\n }\r\n groupTip = (\r\n <div className=\"group-user-list\">\r\n <Flex justify=\"center\" className=\"imgList\">\r\n {groupon_member.map((item) => {\r\n return (\r\n <div className=\"imgContainer\" key={Math.random()}>\r\n <img className=\"imgname\" src={item.avatar} alt=\"\" />\r\n {item.user_type === 1 ? (\r\n <div className=\"leaderFlag\">\r\n <span>团长</span>\r\n </div>\r\n ) : null}\r\n </div>\r\n )\r\n })}\r\n {ary.map((item) => {\r\n return (\r\n <div className=\"imgContainer\" key={Math.random()}>\r\n <div className=\"imgname\">\r\n <i className=\"iconfont iconwode-xianxing no-body\"></i>\r\n </div>\r\n </div>\r\n )\r\n })}\r\n </Flex>\r\n </div>\r\n )\r\n\r\n if (groupon_member && groupon_member.length > 0) {\r\n let flag = false\r\n !userInfo.hasError &&\r\n groupon_member.forEach((item) => {\r\n if (item.uid == userInfo.data.uid) {\r\n flag = true\r\n }\r\n })\r\n if (flag) {\r\n\r\n tip = (\r\n is_new_user ? <p className=\"tip\">{`拼团省¥${Math.round(\r\n data.price1 - pdd_price,\r\n 2\r\n )}元`}</p> :\r\n <p>您已是七月用户无法参与该团,开新团邀请尚未注册七月的加入吧</p>\r\n )\r\n btn = (\r\n <span className=\"group-btn\" onClick={props.invitedFriends}>\r\n 邀请好友参团 {countdown} 后结束\r\n </span>\r\n )\r\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\r\n } else {\r\n if (getParam(\"is_originator\") == 1) {\r\n tip = (\r\n is_new_user ? <p className=\"tip\">{`拼团省¥${Math.round(\r\n data.price1 - pdd_price,\r\n 2\r\n )}元`}</p> :\r\n <p>您已是七月用户无法参与该团,开新团邀请尚未注册七月的加入吧</p>\r\n )\r\n btn = (\r\n is_new_user ? <a\r\n href=\"javascript:;\"\r\n className=\"group-btn\"\r\n onClick={props.handleToGroup}\r\n >\r\n 一键参团\r\n </a>:<a\r\n href=\"javascript:;\"\r\n className=\"group-btn\"\r\n onClick={props.handleToGroup}\r\n >\r\n 一键开团\r\n </a>\r\n )\r\n } else {\r\n tip = (\r\n is_new_user ? <p className=\"tip\">{`拼团省¥${Math.round(\r\n data.price1 - pdd_price,\r\n 2\r\n )}元`}</p> :\r\n <p>您已是七月用户无法参与该团,开新团邀请尚未注册七月的加入吧</p>\r\n )\r\n btn = (\r\n <span className=\"group-btn\" onClick={props.invitedFriends}>\r\n 邀请好友参团 {countdown} 后结束\r\n </span>\r\n )\r\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\r\n }\r\n }\r\n }\r\n\r\n if (is_success === 1) {\r\n tip = <p className=\"success\">拼团成功</p>\r\n btn = (\r\n <Link to={`/detail?id=${data.course_id}`} className=\"tostudy\">\r\n 去学习\r\n </Link>\r\n )\r\n }\r\n return (\r\n <div className=\"gorup-content\">\r\n {share ? (\r\n <div className=\"groupSuccessMbc\" onClick={props.invitedFriends}>\r\n <div className=\"tipContent\">\r\n {`还差${number}人,分享到3个群,成团率高达98%`}\r\n </div>\r\n <div className=\"tipArrow\">\r\n <i className=\"iconfont iconyindao\"></i>\r\n </div>\r\n </div>\r\n ) : null}\r\n\r\n {tip}\r\n <WingBlank>{groupTip}</WingBlank>\r\n <WingBlank>{btn}</WingBlank>\r\n {dec}\r\n {!is_success && (\r\n <div className=\"group-dec\">\r\n <span>\r\n <i className=\"iconfont iconiconfront-1\"></i>\r\n ·好友参团 ·人满成交 ·人不满退款\r\n </span>\r\n <span className=\"allNum\">{`累计${person_num}人成团`}</span>\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ToGroup\r\n"],"sourceRoot":""}
\ No newline at end of file
src/components/detail/group/togroup.js
View file @
2063a15a
...
...
@@ -23,7 +23,7 @@ class ToGroup extends Component {
modal
:
false
,
pddOrderId
:
""
,
is_new_user
:
true
,
user_info_sample_http
:
false
user_info_sample_http
:
false
,
}
}
...
...
@@ -102,16 +102,18 @@ class ToGroup extends Component {
if
(
!
this
.
state
.
user_info_sample_http
)
{
http
.
get
(
`
${
API
.
home
}
/m/user_info_sample/0`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
console
.
log
(
'已经登录'
);
console
.
log
(
"已经登录"
)
}
else
{
//为登录,去登录
console
.
log
(
'去登录'
);
console
.
log
(
"去登录"
)
// this.props.history.push("/passport", { from: this.props.location })
}
this
.
setState
({
is_new_user
:
res
.
data
.
data
.
is_new_user
,
user_info_sample_http
:
true
})
this
.
setState
({
is_new_user
:
res
.
data
.
data
.
is_new_user
,
user_info_sample_http
:
true
,
})
})
}
}
toCourseDetail
=
(
id
)
=>
{
...
...
@@ -161,7 +163,7 @@ class ToGroup extends Component {
data
:
{
course_id
,
course_title
,
simpledescription
,
price0
,
price1
},
is_success
,
course_list
,
is_new_user
is_new_user
,
}
=
this
.
state
const
Info
=
(
<
div
className
=
"info"
>
...
...
@@ -265,7 +267,7 @@ class ToGroup extends Component {
}
function
GorupContent
(
props
)
{
console
.
log
(
'GorupContent------data:'
,
props
)
console
.
log
(
"GorupContent------data:"
,
props
)
let
tip
,
btn
,
dec
,
groupTip
const
{
pdd_price
,
...
...
@@ -276,7 +278,7 @@ function GorupContent(props) {
share
,
number
,
countdown
,
is_new_user
is_new_user
,
}
=
props
.
data
const
{
userInfo
}
=
props
let
ary
=
[],
...
...
@@ -323,13 +325,13 @@ function GorupContent(props) {
}
})
if
(
flag
)
{
tip
=
(
is_new_user
?
<
p
className
=
"tip"
>
{
`拼团省¥
${
Math
.
round
(
tip
=
is_new_user
?
(
<
p
className
=
"tip"
>
{
`拼团省¥
${
Math
.
round
(
data
.
price1
-
pdd_price
,
2
)}
元`
}
<
/p>
:
<
p
>
您已是七月的老朋友,快开团邀请好友加入吧(老用户自动开新团)
<
/p
>
)}
元`
}
<
/p
>
)
:
(
<
p
>
您已是七月用户无法参与该团,开新团邀请尚未注册七月的加入吧
<
/p
>
)
btn
=
(
<
span
className
=
"group-btn"
onClick
=
{
props
.
invitedFriends
}
>
...
...
@@ -339,21 +341,24 @@ function GorupContent(props) {
dec
=
<
p
className
=
"dec"
>
分享到
3
个群后,成团率高达
98
%<
/p
>
}
else
{
if
(
getParam
(
"is_originator"
)
==
1
)
{
tip
=
(
is_new_user
?
<
p
className
=
"tip"
>
{
`拼团省¥
${
Math
.
round
(
tip
=
is_new_user
?
(
<
p
className
=
"tip"
>
{
`拼团省¥
${
Math
.
round
(
data
.
price1
-
pdd_price
,
2
)}
元`
}
<
/p>
:
<
p
>
您已是七月的老朋友,快开团邀请好友加入吧(老用户自动开新团)
<
/p
>
)}
元`
}
<
/p
>
)
:
(
<
p
>
您已是七月用户无法参与该团,开新团邀请尚未注册七月的加入吧
<
/p
>
)
btn
=
(
is_new_user
?
<
a
btn
=
is_new_user
?
(
<
a
href
=
"javascript:;"
className
=
"group-btn"
onClick
=
{
props
.
handleToGroup
}
>
一键参团
<
/a>:<
a
<
/a
>
)
:
(
<
a
href
=
"javascript:;"
className
=
"group-btn"
onClick
=
{
props
.
handleToGroup
}
...
...
@@ -362,12 +367,13 @@ function GorupContent(props) {
<
/a
>
)
}
else
{
tip
=
(
is_new_user
?
<
p
className
=
"tip"
>
{
`拼团省¥
${
Math
.
round
(
tip
=
is_new_user
?
(
<
p
className
=
"tip"
>
{
`拼团省¥
${
Math
.
round
(
data
.
price1
-
pdd_price
,
2
)}
元`
}
<
/p>
:
<
p
>
您已是七月的老朋友,快开团邀请好友加入吧(老用户自动开新团)
<
/p
>
)}
元`
}
<
/p
>
)
:
(
<
p
>
您已是七月用户无法参与该团,开新团邀请尚未注册七月的加入吧
<
/p
>
)
btn
=
(
<
span
className
=
"group-btn"
onClick
=
{
props
.
invitedFriends
}
>
...
...
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