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
b66b803f
Commit
b66b803f
authored
Feb 11, 2021
by
大周
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改课程模块标题
parent
ce2bf7fd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
build/mrstaticjs/togroup.327e2c93.chunk.js
+2
-1
build/mrstaticjs/togroup.327e2c93.chunk.js.map
+2
-2
No files found.
build/mrstaticjs/togroup.327e2c93.chunk.js
View file @
b66b803f
(
this
[
"webpackJsonpmr-julyedu"
]
=
this
[
"webpackJsonpmr-julyedu"
]
||
[]).
push
([[
45
],{
1141
:
function
(
e
,
a
,
t
){
"use strict"
;
t
.
r
(
a
);
t
(
135
);
var
n
,
c
=
t
(
71
),
s
=
t
.
n
(
c
),
r
=
(
t
(
83
),
t
(
29
)),
i
=
t
.
n
(
r
),
o
=
(
t
(
134
),
t
(
34
)),
l
=
t
.
n
(
o
),
d
=
(
t
(
203
),
t
(
85
)),
m
=
t
.
n
(
d
),
u
=
(
t
(
36
),
t
(
10
)),
p
=
t
.
n
(
u
),
E
=
t
(
4
),
f
=
t
(
5
),
_
=
t
(
7
),
h
=
t
(
6
),
v
=
t
(
0
),
N
=
t
.
n
(
v
),
g
=
(
t
(
729
),
t
(
25
)),
b
=
t
(
1
),
w
=
t
(
20
),
y
=
t
(
15
),
C
=
Object
(
w
.
b
)((
function
(
e
){
return
{
user
:
e
.
user
}}))(
n
=
function
(
e
){
Object
(
_
.
a
)(
t
,
e
);
var
a
=
Object
(
h
.
a
)(
t
);
function
t
(
e
){
var
n
;
return
Object
(
E
.
a
)(
this
,
t
),(
n
=
a
.
call
(
this
,
e
)).
invitedFriends
=
function
(){
var
e
=
n
.
state
,
a
=
e
.
pdd_price
,
t
=
e
.
number
,
c
=
e
.
data
;
if
(
b
.
b
.
isWeixin
){
var
s
=
n
.
state
.
share
;
n
.
setState
({
share
:
!
s
}),
Object
(
b
.
m
)({
title
:
"
\
u3010
\
u4ec5
\
u5269"
.
concat
(
t
,
"
\
u4e2a
\
u540d
\
u989d
\
u3011
\
u6211"
).
concat
(
a
,
"
\
u5143
\
u62fc
\
u4e86
\
u300a"
).
concat
(
c
.
course_title
,
"
\
u300b"
),
desc
:
c
.
course_title
,
link
:
window
.
location
.
href
+
"&is_originator=1"
,
imgUrl
:
c
.
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
,
c
=
e
.
data
,
s
=
void
0
===
c
?{}:
c
,
r
=
n
.
props
,
i
=
r
.
user
,
o
=
r
.
history
,
l
=
r
.
location
;
if
(
i
.
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
o
.
push
(
"/passport"
,{
from
:
l
});
else
t
?
n
.
setState
({
modal
:
!
0
}):
o
.
push
(
"/order?id="
.
concat
(
s
.
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
:
""
},
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
,
c
=
0
,
s
=
0
,
r
=
0
;
setInterval
((
function
(){
t
-=
1
e3
,
a
.
data
.
data
.
end_time
>
86400
?(
n
=
""
.
concat
(
parseInt
(
t
/
864
e5
)).
padStart
(
2
,
0
),
c
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
)
/
36
e5
)).
padStart
(
2
,
0
),
s
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
-
36
e5
*
c
)
/
6
e4
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
n
,
"
\
u5929"
).
concat
(
c
,
"
\
u65f6"
).
concat
(
s
,
"
\
u5206"
)})):(
c
=
""
.
concat
(
parseInt
(
t
/
36
e5
)).
padStart
(
2
,
0
),
s
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
c
)
/
6
e4
)).
padStart
(
2
,
0
),
r
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
c
-
6
e4
*
s
)
/
1
e3
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
c
,
":"
).
concat
(
s
,
":"
).
concat
(
r
)}))}),
1
e3
)}}
else
p
.
a
.
info
(
a
.
data
.
msg
,
2
)}))}},{
key
:
"render"
,
value
:
function
(){
var
e
=
this
,
a
=
this
.
state
,
t
=
a
.
data
,
n
=
t
.
course_id
,
c
=
t
.
course_title
,
s
=
t
.
simpledescription
,
r
=
t
.
price0
,
i
=
t
.
price1
,
o
=
a
.
is_success
,
d
=
a
.
course_list
,
u
=
N
.
a
.
createElement
(
"div"
,{
className
:
"info"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"title"
,
onClick
:
function
(){
return
e
.
toCourseDetail
(
n
)}},
c
),
N
.
a
.
createElement
(
"p"
,{
className
:
"contact text-overflow-2"
},
s
),
N
.
a
.
createElement
(
"div"
,{
className
:
"des"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"course-price"
},
N
.
a
.
createElement
(
"span"
,{
className
:
"new"
},
"
\
xa5"
,
i
),
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"
)),
!
o
&&
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
,
"
\
u
672c
\
u5468
\
u7279
\
u60e0
"
)),
d
&&
d
.
length
>
0
&&
d
[
0
].
course
&&
d
[
0
].
course
.
length
>
0
&&
d
[
0
].
course
.
slice
(
0
,
10
).
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
.
price1
),
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
){
for
(
var
a
,
t
,
n
,
c
,
r
=
e
.
data
,
o
=
r
.
pdd_price
,
l
=
r
.
data
,
d
=
r
.
groupon_member
,
m
=
r
.
is_success
,
u
=
r
.
person_num
,
p
=
r
.
share
,
E
=
r
.
number
,
f
=
r
.
countdown
,
_
=
e
.
userInfo
,
h
=
[],
v
=
E
;
0
!=
v
;)
h
.
push
(
v
),
v
--
;
if
(
c
=
N
.
a
.
createElement
(
"div"
,{
className
:
"group-user-list"
},
N
.
a
.
createElement
(
i
.
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
)})),
h
.
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
g
=!
1
;
!
_
.
hasError
&&
d
.
forEach
((
function
(
e
){
e
.
uid
==
_
.
data
.
uid
&&
(
g
=!
0
)})),
g
?(
a
=
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
l
.
price1
-
o
,
"
\
u5143"
)),
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
=
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
l
.
price1
-
o
,
"
\
u5143"
)),
t
=
N
.
a
.
createElement
(
"a"
,{
href
:
"javascript:;"
,
className
:
"group-btn"
,
onClick
:
e
.
handleToGroup
},
"
\
u4e00
\
u952e
\
u53c2
\
u56e2"
)):(
a
=
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
l
.
price1
-
o
,
"
\
u5143"
)),
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
(
E
,
"
\
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
(
s
.
a
,
null
,
c
),
N
.
a
.
createElement
(
s
.
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
},
729
:
function
(
e
,
a
,
t
){}}]);
(
this
[
"webpackJsonpmr-julyedu"
]
=
this
[
"webpackJsonpmr-julyedu"
]
||
[]).
push
([[
45
],{
1141
:
function
(
e
,
a
,
t
){
"use strict"
;
t
.
r
(
a
);
t
(
135
);
var
n
,
c
=
t
(
71
),
s
=
t
.
n
(
c
),
r
=
(
t
(
83
),
t
(
29
)),
i
=
t
.
n
(
r
),
o
=
(
t
(
134
),
t
(
34
)),
l
=
t
.
n
(
o
),
d
=
(
t
(
203
),
t
(
85
)),
m
=
t
.
n
(
d
),
u
=
(
t
(
36
),
t
(
10
)),
p
=
t
.
n
(
u
),
E
=
t
(
4
),
f
=
t
(
5
),
_
=
t
(
7
),
h
=
t
(
6
),
v
=
t
(
0
),
N
=
t
.
n
(
v
),
g
=
(
t
(
729
),
t
(
25
)),
b
=
t
(
1
),
w
=
t
(
20
),
y
=
t
(
15
),
C
=
Object
(
w
.
b
)((
function
(
e
){
return
{
user
:
e
.
user
}}))(
n
=
function
(
e
){
Object
(
_
.
a
)(
t
,
e
);
var
a
=
Object
(
h
.
a
)(
t
);
function
t
(
e
){
var
n
;
return
Object
(
E
.
a
)(
this
,
t
),(
n
=
a
.
call
(
this
,
e
)).
invitedFriends
=
function
(){
var
e
=
n
.
state
,
a
=
e
.
pdd_price
,
t
=
e
.
number
,
c
=
e
.
data
;
if
(
b
.
b
.
isWeixin
){
var
s
=
n
.
state
.
share
;
n
.
setState
({
share
:
!
s
}),
Object
(
b
.
m
)({
title
:
"
\
u3010
\
u4ec5
\
u5269"
.
concat
(
t
,
"
\
u4e2a
\
u540d
\
u989d
\
u3011
\
u6211"
).
concat
(
a
,
"
\
u5143
\
u62fc
\
u4e86
\
u300a"
).
concat
(
c
.
course_title
,
"
\
u300b"
),
desc
:
c
.
course_title
,
link
:
window
.
location
.
href
+
"&is_originator=1"
,
imgUrl
:
c
.
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
,
c
=
e
.
data
,
s
=
void
0
===
c
?{}:
c
,
r
=
n
.
props
,
i
=
r
.
user
,
o
=
r
.
history
,
l
=
r
.
location
;
if
(
i
.
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
o
.
push
(
"/passport"
,{
from
:
l
});
else
t
?
n
.
setState
({
modal
:
!
0
}):
o
.
push
(
"/order?id="
.
concat
(
s
.
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
:
""
},
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
,
c
=
0
,
s
=
0
,
r
=
0
;
setInterval
((
function
(){
t
-=
1
e3
,
a
.
data
.
data
.
end_time
>
86400
?(
n
=
""
.
concat
(
parseInt
(
t
/
864
e5
)).
padStart
(
2
,
0
),
c
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
)
/
36
e5
)).
padStart
(
2
,
0
),
s
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
n
*
24
-
36
e5
*
c
)
/
6
e4
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
n
,
"
\
u5929"
).
concat
(
c
,
"
\
u65f6"
).
concat
(
s
,
"
\
u5206"
)})):(
c
=
""
.
concat
(
parseInt
(
t
/
36
e5
)).
padStart
(
2
,
0
),
s
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
c
)
/
6
e4
)).
padStart
(
2
,
0
),
r
=
""
.
concat
(
parseInt
((
t
-
36
e5
*
c
-
6
e4
*
s
)
/
1
e3
)).
padStart
(
2
,
0
),
e
.
setState
({
countdown
:
""
.
concat
(
c
,
":"
).
concat
(
s
,
":"
).
concat
(
r
)}))}),
1
e3
)}}
else
p
.
a
.
info
(
a
.
data
.
msg
,
2
)}))}},{
key
:
"render"
,
value
:
function
(){
var
e
=
this
,
a
=
this
.
state
,
t
=
a
.
data
,
n
=
t
.
course_id
,
c
=
t
.
course_title
,
s
=
t
.
simpledescription
,
r
=
t
.
price0
,
i
=
t
.
price1
,
o
=
a
.
is_success
,
d
=
a
.
course_list
,
u
=
N
.
a
.
createElement
(
"div"
,{
className
:
"info"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"title"
,
onClick
:
function
(){
return
e
.
toCourseDetail
(
n
)}},
c
),
N
.
a
.
createElement
(
"p"
,{
className
:
"contact text-overflow-2"
},
s
),
N
.
a
.
createElement
(
"div"
,{
className
:
"des"
},
N
.
a
.
createElement
(
"p"
,{
className
:
"course-price"
},
N
.
a
.
createElement
(
"span"
,{
className
:
"new"
},
"
\
xa5"
,
i
),
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"
)),
!
o
&&
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
,
"
\
u
0032
\
u0031
\
u65b0
\
u6625
\
u4e00
\
u5206
\
u79d2
"
)),
d
&&
d
.
length
>
0
&&
d
[
0
].
course
&&
d
[
0
].
course
.
length
>
0
&&
d
[
0
].
course
.
slice
(
0
,
10
).
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
.
price1
),
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
){
for
(
var
a
,
t
,
n
,
c
,
r
=
e
.
data
,
o
=
r
.
pdd_price
,
l
=
r
.
data
,
d
=
r
.
groupon_member
,
m
=
r
.
is_success
,
u
=
r
.
person_num
,
p
=
r
.
share
,
E
=
r
.
number
,
f
=
r
.
countdown
,
_
=
e
.
userInfo
,
h
=
[],
v
=
E
;
0
!=
v
;)
h
.
push
(
v
),
v
--
;
if
(
c
=
N
.
a
.
createElement
(
"div"
,{
className
:
"group-user-list"
},
N
.
a
.
createElement
(
i
.
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
)})),
h
.
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
g
=!
1
;
!
_
.
hasError
&&
d
.
forEach
((
function
(
e
){
e
.
uid
==
_
.
data
.
uid
&&
(
g
=!
0
)})),
g
?(
a
=
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
l
.
price1
-
o
,
"
\
u5143"
)),
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
=
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
l
.
price1
-
o
,
"
\
u5143"
)),
t
=
N
.
a
.
createElement
(
"a"
,{
href
:
"javascript:;"
,
className
:
"group-btn"
,
onClick
:
e
.
handleToGroup
},
"
\
u4e00
\
u952e
\
u53c2
\
u56e2"
)):(
a
=
N
.
a
.
createElement
(
"p"
,{
className
:
"tip"
},
"
\
u62fc
\
u56e2
\
u7701
\
uffe5"
.
concat
(
l
.
price1
-
o
,
"
\
u5143"
)),
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
(
E
,
"
\
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
(
s
.
a
,
null
,
c
),
N
.
a
.
createElement
(
s
.
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
},
729
:
function
(
e
,
a
,
t
){}}]);
//# sourceMappingURL=togroup.327e2c93.chunk.js.map
\ No newline at end of file
build/mrstaticjs/togroup.327e2c93.chunk.js.map
View file @
b66b803f
{"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","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","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","to"],"mappings":"iVAUMA,EADLC,aAAQ,SAACC,GAAD,MAAY,CAAEC,KAAMD,EAAMC,Q,qDAEjC,WAAYC,GAAQ,IAAD,8BACjB,cAAMA,IAeRC,eAAiB,WAAO,IAAD,EACe,EAAKH,MAAjCI,EADa,EACbA,UAAWC,EADE,EACFA,OAAQC,EADN,EACMA,KAC3B,GAAIC,IAAQC,SAAU,CACpB,IAAIC,EAAQ,EAAKT,MAAMS,MACvB,EAAKC,SAAS,CACZD,OAAQA,IAEVE,YAAQ,CACNC,MAAM,qBAAD,OAAQP,EAAR,yCAAsBD,EAAtB,mCAAsCE,EAAKO,aAA3C,UACLC,KAAMR,EAAKO,aACXE,KAAMC,OAAOC,SAASC,KAAO,mBAC7BC,OAAQb,EAAKc,kBAGf,IAAMC,KAAK,2EAAgB,IA9BZ,EA0FnBC,eAAiB,SAACC,GAGhB,OAFoB,EAAKrB,MAAjBsB,QACAC,KAAR,qBAA2BF,GAAM,CAAEL,KAAM,eAClC,GA7FU,EAgGnBQ,cAAgB,WAAO,IAAD,EACiB,EAAK1B,MADtB,IACZ2B,aADY,aACGrB,YADH,MACU,GADV,IAEgB,EAAKJ,MAAjCD,EAFY,EAEZA,KAAMuB,EAFM,EAENA,QAASP,EAFH,EAEGA,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,EA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tG,EAAKgC,WAAaiC,UAAU,WAApD,uBAMF,yBAAKA,UAAU,iBACZ9D,EACC,yBAAK8D,UAAU,kBAAkBC,QAAStE,EAAMC,gBAC9C,yBAAKoE,UAAU,cAAf,sBACQlE,EADR,uFAGA,yBAAKkE,UAAU,YACb,uBAAGA,UAAU,0BAGf,KAEHqB,EACD,2BAAYG,GACZ,2BAAYF,GACXC,GACClD,GACA,yBAAK2B,UAAU,aACb,8BACE,uBAAGA,UAAU,6BADf,gGAIA,0BAAMA,UAAU,UAAhB,sBAA+B5B,EAA/B,yBAOK7C,a","file":"mrstaticjs/togroup.327e2c93.chunk.js","sourcesContent":["/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */\nimport React, { Component } from \"react\"\nimport \"./togroup.scss\"\nimport { HeaderBar, VList } from \"../../../common\"\nimport { getParam, http, browser, wxShare } from \"src/utils\"\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast, Modal } from \"antd-mobile\"\n\n@connect((state) => ({ user: state.user }))\nclass ToGroup extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: {},\n share: false,\n pdd_price: 0,\n groupon_member: [],\n person_num: 0, // 共多少人成团\n is_success: false, // 是否拼团成功\n number: 0, // 差几人成团\n isBuy: false,\n modal: false,\n pddOrderId: \"\",\n }\n }\n\n invitedFriends = () => {\n const { pdd_price, number, data } = this.state\n if (browser.isWeixin) {\n let share = this.state.share\n this.setState({\n share: !share,\n })\n wxShare({\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\n desc: data.course_title,\n link: window.location.href + \"&is_originator=1\",\n imgUrl: data.image_name,\n })\n } else {\n Toast.info(\"请在微信中使用分享功能!\", 2)\n }\n }\n\n componentDidMount() {\n http.get(`${API[\"base-api\"]}/pdd/info/${getParam(\"id\")}`).then((res) => {\n if (res.data.errno !== 0) {\n Toast.info(res.data.msg, 2)\n return\n }\n this.setState({\n data: res.data.data.course_info,\n pdd_price: res.data.data.pdd_price,\n groupon_member: res.data.data.groupon_member,\n is_success: res.data.data.is_success,\n person_num: res.data.data.person_num,\n course_list: res.data.data.course_list,\n number: res.data.data.number,\n pddOrderId: res.data.data.pdd_order_id,\n countdown: \"\",\n isBuy: res.data.data.is_buy,\n })\n\n if (res.data.data.is_success === 0) {\n let date = res.data.data.end_time * 1000,\n day = 0,\n hours = 0,\n minutes = 0,\n seconds = 0\n setInterval(() => {\n date -= 1000\n if (res.data.data.end_time > 86400) {\n day = `${parseInt(date / (3600000 * 24))}`.padStart(2, 0)\n hours = `${parseInt(\n (date - day * 3600000 * 24) / 3600000\n )}`.padStart(2, 0)\n minutes = `${parseInt(\n (date - day * 3600000 * 24 - hours * 3600000) / 60000\n )}`.padStart(2, 0)\n this.setState({\n countdown: `${day}天${hours}时${minutes}分`,\n })\n } else {\n hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0)\n minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(\n 2,\n 0\n )\n seconds = `${parseInt(\n (date - hours * 3600000 - minutes * 60000) / 1000\n )}`.padStart(2, 0)\n this.setState({\n countdown: `${hours}:${minutes}:${seconds}`,\n })\n }\n }, 1000)\n }\n })\n }\n\n toCourseDetail = (id) => {\n const { history } = this.props\n history.push(`/detail?id=${id}`, { href: \"/classify\" })\n return false\n }\n\n handleToGroup = () => {\n const { isBuy = false, data = {} } = this.state\n const { user, history, location } = this.props\n if (user.hasError) {\n if (browser.isWeixin) {\n let redirectURI = window.location.href\n if (\n redirectURI.includes(\"code=\") &&\n redirectURI.includes(\"state=STATE\")\n ) {\n let index = redirectURI.lastIndexOf(\"code=\")\n redirectURI = redirectURI.substr(0, index - 1)\n }\n window.location.assign(\n `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(\n redirectURI\n )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`\n )\n } else {\n history.push(\"/passport\", { from: location })\n }\n return\n }\n\n if (!isBuy) {\n history.push(`/order?id=${data.course_id}`, {\n group: 1,\n pdd_order_id: this.state.pddOrderId,\n })\n } else {\n this.setState({\n modal: true,\n })\n }\n }\n\n render() {\n const {\n data: { course_id, course_title, simpledescription, price0, price1 },\n is_success,\n course_list,\n } = this.state\n const Info = (\n <div className=\"info\">\n <p className=\"title\" onClick={() => this.toCourseDetail(course_id)}>\n {course_title}\n </p>\n <p className=\"contact text-overflow-2\">{simpledescription}</p>\n <div className=\"des\">\n <p className=\"course-price\">\n <span className=\"new\">¥{price1}</span>\n <span className=\"old\">¥{price0}</span>\n </p>\n </div>\n </div>\n )\n return (\n <div className=\"to-group-box\">\n <HeaderBar title=\"拼团\" cart={false} toHref={\"/\"}></HeaderBar>\n <Modal\n transparent\n visible={this.state.modal}\n title=\"提示\"\n footer={[\n {\n text: \"确定\",\n onPress: () => {\n this.setState({\n modal: false,\n })\n this.props.history.push(\"/\")\n },\n },\n ]}\n >\n <p>您已经购买过该课程~</p>\n </Modal>\n {!is_success && (\n <VList\n img={this.state.data.image_name}\n id={this.state.data.course_id}\n info={Info}\n toDetail={this.toCourseDetail}\n />\n )}\n\n <GorupContent\n data={this.state}\n invitedFriends={this.invitedFriends}\n handleToGroup={this.handleToGroup}\n userInfo={this.props.user}\n />\n\n <WhiteSpace></WhiteSpace>\n <div className=\"group-course\">\n <div className=\"top-title\">\n <span>21新春一分秒</span>\n {/* <Link to={`/preferential`} className=\"more\">\n 更多<i className=\"iconfont iconiconfront-70\"></i>\n </Link> */}\n </div>\n {course_list &&\n course_list.length > 0 &&\n course_list[0].course &&\n course_list[0].course.length > 0 &&\n course_list[0].course.slice(0, 9).map((item) => {\n let weekInfo = (\n <div className=\"info\">\n <p\n className=\"title\"\n onClick={() => this.toCourseDetail(item.course_id)}\n >\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </Link> */}\n </p>\n <p className=\"contact text-overflow-2\">\n {item.simpledescription}\n </p>\n <div className=\"des\">\n <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n </div>\n </div>\n )\n return (\n <VList\n img={item.image_name}\n key={item.course_id}\n id={item.course_id}\n info={weekInfo}\n toDetail={this.toCourseDetail}\n />\n )\n })}\n </div>\n </div>\n )\n }\n}\n\nfunction GorupContent(props) {\n let tip, btn, dec, groupTip\n const {\n pdd_price,\n data,\n groupon_member,\n is_success,\n person_num,\n share,\n number,\n countdown,\n } = props.data\n const { userInfo } = props\n let ary = [],\n num = number\n\n while (num != 0) {\n ary.push(num)\n num--\n }\n groupTip = (\n <div className=\"group-user-list\">\n <Flex justify=\"center\" className=\"imgList\">\n {groupon_member.map((item) => {\n return (\n <div className=\"imgContainer\" key={Math.random()}>\n <img className=\"imgname\" src={item.avatar} alt=\"\" />\n {item.user_type === 1 ? (\n <div className=\"leaderFlag\">\n <span>团长</span>\n </div>\n ) : null}\n </div>\n )\n })}\n {ary.map((item) => {\n return (\n <div className=\"imgContainer\" key={Math.random()}>\n <div className=\"imgname\">\n <i className=\"iconfont iconwode-xianxing no-body\"></i>\n </div>\n </div>\n )\n })}\n </Flex>\n </div>\n )\n\n if (groupon_member && groupon_member.length > 0) {\n let flag = false\n !userInfo.hasError &&\n groupon_member.forEach((item) => {\n if (item.uid == userInfo.data.uid) {\n flag = true\n }\n })\n if (flag) {\n tip = <p className=\"tip\">{`拼团省¥${data.price1 - pdd_price}元`}</p>\n btn = (\n <span className=\"group-btn\" onClick={props.invitedFriends}>\n 邀请好友参团 {countdown} 后结束\n </span>\n )\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\n } else {\n if (getParam(\"is_originator\") == 1) {\n tip = <p className=\"tip\">{`拼团省¥${data.price1 - pdd_price}元`}</p>\n btn = (\n <a\n href=\"javascript:;\"\n className=\"group-btn\"\n onClick={props.handleToGroup}\n >\n 一键参团\n </a>\n )\n } else {\n tip = <p className=\"tip\">{`拼团省¥${data.price1 - pdd_price}元`}</p>\n btn = (\n <span className=\"group-btn\" onClick={props.invitedFriends}>\n 邀请好友参团 {countdown} 后结束\n </span>\n )\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\n }\n }\n }\n\n if (is_success === 1) {\n tip = <p className=\"success\">拼团成功</p>\n btn = (\n <Link to={`/detail?id=${data.course_id}`} className=\"tostudy\">\n 去学习\n </Link>\n )\n }\n return (\n <div className=\"gorup-content\">\n {share ? (\n <div className=\"groupSuccessMbc\" onClick={props.invitedFriends}>\n <div className=\"tipContent\">\n {`还差${number}人,分享到3个群,成团率高达98%`}\n </div>\n <div className=\"tipArrow\">\n <i className=\"iconfont iconyindao\"></i>\n </div>\n </div>\n ) : null}\n\n {tip}\n <WingBlank>{groupTip}</WingBlank>\n <WingBlank>{btn}</WingBlank>\n {dec}\n {!is_success && (\n <div className=\"group-dec\">\n <span>\n <i className=\"iconfont iconiconfront-1\"></i>\n ·好友参团 ·人满成交 ·人不满退款\n </span>\n <span className=\"allNum\">{`累计${person_num}人成团`}</span>\n </div>\n )}\n </div>\n )\n}\n\nexport default ToGroup\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","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","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","to"],"mappings":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8BACE,uBAAGA,UAAU,6BADf,gGAIA,0BAAMA,UAAU,UAAhB,sBAA+B5B,EAA/B,yBAOK7C,a","file":"mrstaticjs/togroup.327e2c93.chunk.js","sourcesContent":["/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */\nimport React, { Component } from \"react\"\nimport \"./togroup.scss\"\nimport { HeaderBar, VList } from \"../../../common\"\nimport { getParam, http, browser, wxShare } from \"src/utils\"\nimport { connect } from \"react-redux\"\nimport { Link } from \"react-router-dom\"\nimport { WingBlank, WhiteSpace, Flex, Toast, Modal } from \"antd-mobile\"\n\n@connect((state) => ({ user: state.user }))\nclass ToGroup extends Component {\n constructor(props) {\n super(props)\n this.state = {\n data: {},\n share: false,\n pdd_price: 0,\n groupon_member: [],\n person_num: 0, // 共多少人成团\n is_success: false, // 是否拼团成功\n number: 0, // 差几人成团\n isBuy: false,\n modal: false,\n pddOrderId: \"\",\n }\n }\n\n invitedFriends = () => {\n const { pdd_price, number, data } = this.state\n if (browser.isWeixin) {\n let share = this.state.share\n this.setState({\n share: !share,\n })\n wxShare({\n title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,\n desc: data.course_title,\n link: window.location.href + \"&is_originator=1\",\n imgUrl: data.image_name,\n })\n } else {\n Toast.info(\"请在微信中使用分享功能!\", 2)\n }\n }\n\n componentDidMount() {\n http.get(`${API[\"base-api\"]}/pdd/info/${getParam(\"id\")}`).then((res) => {\n if (res.data.errno !== 0) {\n Toast.info(res.data.msg, 2)\n return\n }\n this.setState({\n data: res.data.data.course_info,\n pdd_price: res.data.data.pdd_price,\n groupon_member: res.data.data.groupon_member,\n is_success: res.data.data.is_success,\n person_num: res.data.data.person_num,\n course_list: res.data.data.course_list,\n number: res.data.data.number,\n pddOrderId: res.data.data.pdd_order_id,\n countdown: \"\",\n isBuy: res.data.data.is_buy,\n })\n\n if (res.data.data.is_success === 0) {\n let date = res.data.data.end_time * 1000,\n day = 0,\n hours = 0,\n minutes = 0,\n seconds = 0\n setInterval(() => {\n date -= 1000\n if (res.data.data.end_time > 86400) {\n day = `${parseInt(date / (3600000 * 24))}`.padStart(2, 0)\n hours = `${parseInt(\n (date - day * 3600000 * 24) / 3600000\n )}`.padStart(2, 0)\n minutes = `${parseInt(\n (date - day * 3600000 * 24 - hours * 3600000) / 60000\n )}`.padStart(2, 0)\n this.setState({\n countdown: `${day}天${hours}时${minutes}分`,\n })\n } else {\n hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0)\n minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(\n 2,\n 0\n )\n seconds = `${parseInt(\n (date - hours * 3600000 - minutes * 60000) / 1000\n )}`.padStart(2, 0)\n this.setState({\n countdown: `${hours}:${minutes}:${seconds}`,\n })\n }\n }, 1000)\n }\n })\n }\n\n toCourseDetail = (id) => {\n const { history } = this.props\n history.push(`/detail?id=${id}`, { href: \"/classify\" })\n return false\n }\n\n handleToGroup = () => {\n const { isBuy = false, data = {} } = this.state\n const { user, history, location } = this.props\n if (user.hasError) {\n if (browser.isWeixin) {\n let redirectURI = window.location.href\n if (\n redirectURI.includes(\"code=\") &&\n redirectURI.includes(\"state=STATE\")\n ) {\n let index = redirectURI.lastIndexOf(\"code=\")\n redirectURI = redirectURI.substr(0, index - 1)\n }\n window.location.assign(\n `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(\n redirectURI\n )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`\n )\n } else {\n history.push(\"/passport\", { from: location })\n }\n return\n }\n\n if (!isBuy) {\n history.push(`/order?id=${data.course_id}`, {\n group: 1,\n pdd_order_id: this.state.pddOrderId,\n })\n } else {\n this.setState({\n modal: true,\n })\n }\n }\n\n render() {\n const {\n data: { course_id, course_title, simpledescription, price0, price1 },\n is_success,\n course_list,\n } = this.state\n const Info = (\n <div className=\"info\">\n <p className=\"title\" onClick={() => this.toCourseDetail(course_id)}>\n {course_title}\n </p>\n <p className=\"contact text-overflow-2\">{simpledescription}</p>\n <div className=\"des\">\n <p className=\"course-price\">\n <span className=\"new\">¥{price1}</span>\n <span className=\"old\">¥{price0}</span>\n </p>\n </div>\n </div>\n )\n return (\n <div className=\"to-group-box\">\n <HeaderBar title=\"拼团\" cart={false} toHref={\"/\"}></HeaderBar>\n <Modal\n transparent\n visible={this.state.modal}\n title=\"提示\"\n footer={[\n {\n text: \"确定\",\n onPress: () => {\n this.setState({\n modal: false,\n })\n this.props.history.push(\"/\")\n },\n },\n ]}\n >\n <p>您已经购买过该课程~</p>\n </Modal>\n {!is_success && (\n <VList\n img={this.state.data.image_name}\n id={this.state.data.course_id}\n info={Info}\n toDetail={this.toCourseDetail}\n />\n )}\n\n <GorupContent\n data={this.state}\n invitedFriends={this.invitedFriends}\n handleToGroup={this.handleToGroup}\n userInfo={this.props.user}\n />\n\n <WhiteSpace></WhiteSpace>\n <div className=\"group-course\">\n <div className=\"top-title\">\n <span>本周特惠</span>\n {/* <Link to={`/preferential`} className=\"more\">\n 更多<i className=\"iconfont iconiconfront-70\"></i>\n </Link> */}\n </div>\n {course_list &&\n course_list.length > 0 &&\n course_list[0].course &&\n course_list[0].course.length > 0 &&\n course_list[0].course.slice(0, 4).map((item) => {\n let weekInfo = (\n <div className=\"info\">\n <p\n className=\"title\"\n onClick={() => this.toCourseDetail(item.course_id)}\n >\n {/* <Link to={`/detail?id=${item.course_id}`}> */}\n {item.course_title}\n {/* </Link> */}\n </p>\n <p className=\"contact text-overflow-2\">\n {item.simpledescription}\n </p>\n <div className=\"des\">\n <p className=\"course-price\">\n <span className=\"new\">¥{item.price1}</span>\n <span className=\"old\">¥{item.price0}</span>\n </p>\n </div>\n </div>\n )\n return (\n <VList\n img={item.image_name}\n key={item.course_id}\n id={item.course_id}\n info={weekInfo}\n toDetail={this.toCourseDetail}\n />\n )\n })}\n </div>\n </div>\n )\n }\n}\n\nfunction GorupContent(props) {\n let tip, btn, dec, groupTip\n const {\n pdd_price,\n data,\n groupon_member,\n is_success,\n person_num,\n share,\n number,\n countdown,\n } = props.data\n const { userInfo } = props\n let ary = [],\n num = number\n\n while (num != 0) {\n ary.push(num)\n num--\n }\n groupTip = (\n <div className=\"group-user-list\">\n <Flex justify=\"center\" className=\"imgList\">\n {groupon_member.map((item) => {\n return (\n <div className=\"imgContainer\" key={Math.random()}>\n <img className=\"imgname\" src={item.avatar} alt=\"\" />\n {item.user_type === 1 ? (\n <div className=\"leaderFlag\">\n <span>团长</span>\n </div>\n ) : null}\n </div>\n )\n })}\n {ary.map((item) => {\n return (\n <div className=\"imgContainer\" key={Math.random()}>\n <div className=\"imgname\">\n <i className=\"iconfont iconwode-xianxing no-body\"></i>\n </div>\n </div>\n )\n })}\n </Flex>\n </div>\n )\n\n if (groupon_member && groupon_member.length > 0) {\n let flag = false\n !userInfo.hasError &&\n groupon_member.forEach((item) => {\n if (item.uid == userInfo.data.uid) {\n flag = true\n }\n })\n if (flag) {\n tip = <p className=\"tip\">{`拼团省¥${data.price1 - pdd_price}元`}</p>\n btn = (\n <span className=\"group-btn\" onClick={props.invitedFriends}>\n 邀请好友参团 {countdown} 后结束\n </span>\n )\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\n } else {\n if (getParam(\"is_originator\") == 1) {\n tip = <p className=\"tip\">{`拼团省¥${data.price1 - pdd_price}元`}</p>\n btn = (\n <a\n href=\"javascript:;\"\n className=\"group-btn\"\n onClick={props.handleToGroup}\n >\n 一键参团\n </a>\n )\n } else {\n tip = <p className=\"tip\">{`拼团省¥${data.price1 - pdd_price}元`}</p>\n btn = (\n <span className=\"group-btn\" onClick={props.invitedFriends}>\n 邀请好友参团 {countdown} 后结束\n </span>\n )\n dec = <p className=\"dec\">分享到3个群后,成团率高达98%</p>\n }\n }\n }\n\n if (is_success === 1) {\n tip = <p className=\"success\">拼团成功</p>\n btn = (\n <Link to={`/detail?id=${data.course_id}`} className=\"tostudy\">\n 去学习\n </Link>\n )\n }\n return (\n <div className=\"gorup-content\">\n {share ? (\n <div className=\"groupSuccessMbc\" onClick={props.invitedFriends}>\n <div className=\"tipContent\">\n {`还差${number}人,分享到3个群,成团率高达98%`}\n </div>\n <div className=\"tipArrow\">\n <i className=\"iconfont iconyindao\"></i>\n </div>\n </div>\n ) : null}\n\n {tip}\n <WingBlank>{groupTip}</WingBlank>\n <WingBlank>{btn}</WingBlank>\n {dec}\n {!is_success && (\n <div className=\"group-dec\">\n <span>\n <i className=\"iconfont iconiconfront-1\"></i>\n ·好友参团 ·人满成交 ·人不满退款\n </span>\n <span className=\"allNum\">{`累计${person_num}人成团`}</span>\n </div>\n )}\n </div>\n )\n}\n\nexport default ToGroup\n"],"sourceRoot":""}
\ No newline at end of file
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