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
a67d3ca1
Commit
a67d3ca1
authored
Sep 09, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
merge new-share
parents
7628a0b4
32b0cf0f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
20 deletions
+32
-20
src/components/detail/index.js
+0
-1
src/components/detail/redPacket/QQicon.png
+0
-0
src/components/detail/redPacket/index.js
+11
-16
src/components/detail/redPacket/index.scss
+21
-3
src/components/detail/redPacket/qq.png
+0
-0
src/components/detail/redPacket/wechat.png
+0
-0
No files found.
src/components/detail/index.js
View file @
a67d3ca1
...
...
@@ -595,7 +595,6 @@ class Detail extends Component {
/
>
}
{
/*砍价*/
}
{
course_info
.
is_baoming
===
0
&&
(
!
course_info
.
is_aist
)
&&
course_info
.
is_bargain
&&
...
...
src/components/detail/redPacket/QQicon.png
0 → 100644
View file @
a67d3ca1
632 Bytes
src/components/detail/redPacket/index.js
View file @
a67d3ca1
import
React
,
{
PureComponent
}
from
'react'
;
import
CopyToClipboard
from
'react-copy-to-clipboard'
;
import
classnames
from
'classnames'
;
import
{
connect
}
from
'redux'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
browser
}
from
'@/utils'
;
import
{
http
,
getParam
,
validateTel
}
from
"@/utils"
;
import
{
Formik
,
withFormik
,
Form
,
Field
}
from
'formik'
;
import
{
Formik
,
Form
,
Field
}
from
'formik'
;
import
{
Toast
}
from
'antd-mobile'
;
import
Captcha
from
'@/common/Captcha'
;
import
FollowQRcode
from
'./../followQRcode'
;
...
...
@@ -62,11 +61,11 @@ class RedPacket extends PureComponent {
}
}
// 绑定时间
startCountDown
=
()
=>
{
if
(
this
.
countdownTimer
)
{
window
.
clearInterval
(
this
.
countdownTimer
);
}
const
{
endTime
}
=
this
.
state
;
let
time
=
endTime
;
let
minutes
=
0
;
...
...
@@ -87,13 +86,12 @@ class RedPacket extends PureComponent {
},
1000
)
}
// 获取分享信息
handleToShare
=
()
=>
{
const
{
history
}
=
this
.
props
;
// 获取分享信息
http
.
get
(
`
${
API
.
home
}
/sys/redPacket/shareUrl/
${
getParam
(
'id'
)}
`
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
;
if
(
code
===
4030
)
{
if
(
code
===
4030
||
code
===
4040
)
{
history
.
push
(
'/passport/login'
);
}
if
(
code
===
200
)
{
...
...
@@ -117,11 +115,10 @@ class RedPacket extends PureComponent {
}
}
// 拆红包
handleToOpen
=
()
=>
{
const
{
history
}
=
this
.
props
;
const
{
shareInfo
:
{
share_code
=
''
}
}
=
this
.
state
;
// 拆红包
http
.
post
(
`
${
API
.
home
}
/sys/redPacket/split`
,
{
...
...
@@ -217,9 +214,8 @@ class RedPacket extends PureComponent {
}
}
}
}
}
else
if
(
code
===
4030
)
{
}
}
else
if
(
code
===
4030
||
code
===
4040
)
{
history
.
push
(
'/passport/login'
);
}
})
...
...
@@ -295,6 +291,7 @@ class RedPacket extends PureComponent {
}
}
// 复制口令
handleToCopy
=
()
=>
{
this
.
setState
({
isCopy
:
true
...
...
@@ -472,10 +469,8 @@ class RedPacket extends PureComponent {
const
cls
=
classnames
(
'popup-mask'
,{
'popup-mask--no'
:
type
!==
0
});
// const isClick =
return
(
<>
<
div
className
=
"red-packet"
>
<
p
className
=
"red-packet__title"
>
分享课程给好友,你和好友都可以领红包哦〜
<
/p
>
<
button
className
=
"red-packet__button"
onClick
=
{
this
.
handleToShare
}
>
分享领红包
<
/button
>
...
...
@@ -805,7 +800,7 @@ class RedPacket extends PureComponent {
<
li
className
=
"popup-bind__account"
>
{
/* wechat */
}
<
i
className
=
"icon
font iconweixinzhifu
"
><
/i
>
<
i
className
=
"icon
-wachat
"
><
/i
>
<
p
className
=
"popup-bind__account--name"
>
{
bindInfo
[
'wechat_nickname'
]}
<
/p
>
<
/li
>
}
...
...
src/components/detail/redPacket/index.scss
View file @
a67d3ca1
...
...
@@ -496,7 +496,8 @@
.popup-bind__title
{
margin
:
0
;
font-size
:
14px
;
font-size
:
16px
;
font-weight
:
500
;
color
:
#333
;
text-align
:
center
;
line-height
:
1
;
...
...
@@ -505,7 +506,7 @@
.popup-bind__desc
{
margin
:
0
;
padding
:
0
20px
;
font-size
:
1
2
px
;
font-size
:
1
4
px
;
color
:
#666
;
text-align
:
left
;
}
...
...
@@ -519,15 +520,22 @@
align-items
:
center
;
height
:
30px
;
margin
:
0
52px
;
padding
:
0
4px
;
text-align
:
left
;
&
:nth-child
(
n
+
2
)
{
border-top
:
1px
solid
#E5E5E5
;
}
.iconfont
{
font-size
:
22px
;
color
:
#999
;
}
}
.popup-bind__account--name
{
margin
:
0
;
padding-left
:
7px
;
font-size
:
12px
;
color
:
#999
;
}
...
...
@@ -546,7 +554,17 @@
display
:
inline-block
;
width
:
22px
;
height
:
22px
;
background-image
:
url('./qq.png')
;
background-image
:
url('./QQicon.png')
;
background-size
:
auto
100%
;
background-repeat
:
no-repeat
;
background-position
:
center
;
}
.icon-wachat
{
display
:
inline-block
;
width
:
22px
;
height
:
22px
;
background-image
:
url('./wechat.png')
;
background-size
:
100%
auto
;
background-repeat
:
no-repeat
;
background-position
:
center
;
...
...
src/components/detail/redPacket/qq.png
deleted
100644 → 0
View file @
7628a0b4
1.75 KB
src/components/detail/redPacket/wechat.png
View replaced file @
7628a0b4
View file @
a67d3ca1
791 Bytes
|
W:
|
H:
782 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
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