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
cd9c5f31
Commit
cd9c5f31
authored
Sep 26, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Plain Diff
试听
parents
cd5e830b
1fc750fd
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
136 additions
and
22 deletions
+136
-22
package-lock.json
+5
-22
src/App.js
+40
-0
src/common/CallApp/index.js
+13
-0
src/common/Captcha/index.js
+4
-0
src/components/bargainMiddlePage/barcode/index.js
+20
-0
src/components/bargainMiddlePage/barcode/index.scss
+8
-0
src/components/detail/bargain/index.js
+4
-0
src/components/detail/index.js
+21
-0
src/components/passport/bindingTel/index.js
+4
-0
src/components/passport/common/veriCodeInput/index.js
+4
-0
src/components/passport/forgotPassword/index.js
+4
-0
src/components/passport/login/index.js
+4
-0
src/components/passport/setPassword/index.js
+5
-0
No files found.
package-lock.json
View file @
cd9c5f31
...
...
@@ -3692,6 +3692,11 @@
"resolved"
:
"https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz"
,
"integrity"
:
"sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk="
},
"clipboard-copy"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/clipboard-copy/-/clipboard-copy-3.1.0.tgz"
,
"integrity"
:
"sha512-Xsu1NddBXB89IUauda5BIq3Zq73UWkjkaQlPQbLNvNsd5WBMnTWPNKYR6HGaySOxGYZ+BKxP2E9X4ElnI3yiPA=="
},
"cliui"
:
{
"version"
:
"4.1.0"
,
"resolved"
:
"https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz"
,
...
...
@@ -3984,14 +3989,6 @@
"resolved"
:
"https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz"
,
"integrity"
:
"sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"copy-to-clipboard"
:
{
"version"
:
"3.2.0"
,
"resolved"
:
"https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.2.0.tgz"
,
"integrity"
:
"sha512-eOZERzvCmxS8HWzugj4Uxl8OJxa7T2k1Gi0X5qavwydHIfuSHq2dTD09LOg/XyGq4Zpb5IsR/2OJ5lbOegz78w=="
,
"requires"
:
{
"toggle-selection"
:
"^1.0.6"
}
},
"core-js"
:
{
"version"
:
"2.6.5"
,
"resolved"
:
"https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz"
,
...
...
@@ -12087,15 +12084,6 @@
}
}
},
"react-copy-to-clipboard"
:
{
"version"
:
"5.0.1"
,
"resolved"
:
"https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.1.tgz"
,
"integrity"
:
"sha512-ELKq31/E3zjFs5rDWNCfFL4NvNFQvGRoJdAKReD/rUPA+xxiLPQmZBZBvy2vgH7V0GE9isIQpT9WXbwIVErYdA=="
,
"requires"
:
{
"copy-to-clipboard"
:
"^3"
,
"prop-types"
:
"^15.5.8"
}
},
"react-dev-utils"
:
{
"version"
:
"8.0.0"
,
"resolved"
:
"https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-8.0.0.tgz"
,
...
...
@@ -14514,11 +14502,6 @@
"repeat-string"
:
"^1.6.1"
}
},
"toggle-selection"
:
{
"version"
:
"1.0.6"
,
"resolved"
:
"https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz"
,
"integrity"
:
"sha1-bkWxJj8gF/oKzH2J14sVuL932jI="
},
"topo"
:
{
"version"
:
"2.0.2"
,
"resolved"
:
"https://registry.npmjs.org/topo/-/topo-2.0.2.tgz"
,
...
...
src/App.js
View file @
cd9c5f31
...
...
@@ -62,9 +62,15 @@ class App extends Component {
const
routeMatchRule
=
/binding-tel|forgot|set-password/
const
{
history
}
=
this
.
props
history
.
listen
((
location
,
action
)
=>
{
<<<<<<<
HEAD
this
.
utm
()
this
.
firstLoad
=
false
this
.
setNavigationRecord
(
location
,
action
)
=======
this
.
firstLoad
=
false
this
.
setNavigationRecord
(
location
,
action
)
this
.
utm
()
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
if
(
cookie
.
get
(
'uid'
)
&&
this
.
props
.
user
.
hasError
)
{
this
.
getUser
()
}
...
...
@@ -88,13 +94,21 @@ class App extends Component {
setNavigationRecord
=
(
location
,
action
)
=>
{
const
{
pathname
,
search
,
hash
}
=
location
<<<<<<<
HEAD
let
isLastRecord
=
location
.
pathname
===
(
this
.
records
.
length
&&
this
.
records
[
this
.
records
.
length
-
1
].
pathname
)
=======
let
isLastRecord
=
location
.
pathname
===
this
.
records
.
length
&&
this
.
records
[
this
.
records
.
length
-
1
].
pathname
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
switch
(
action
)
{
case
'POP'
:
this
.
firstLoad
?
this
.
records
.
push
({
pathname
,
search
,
hash
})
:
this
.
records
.
pop
()
break
case
'REPLACE'
:
<<<<<<<
HEAD
this
.
records
.
length
>
1
&&
(
this
.
records
[
this
.
records
.
length
-
1
]
=
{
pathname
,
search
,
hash
})
=======
this
.
records
[
this
.
records
.
length
-
1
]
=
{
pathname
,
search
,
hash
}
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
break
default
:
!
isLastRecord
&&
this
.
records
.
push
({
pathname
,
search
,
hash
})
...
...
@@ -102,7 +116,10 @@ class App extends Component {
location
.
state
&&
location
.
state
.
records
?
(
location
.
state
.
records
=
this
.
records
)
<<<<<<<
HEAD
:
location
.
state
?
location
.
state
=
{...
location
.
state
,
records
:
this
.
records
}
=======
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
:
(
location
.
state
=
{
records
:
this
.
records
})
}
...
...
@@ -169,6 +186,11 @@ class App extends Component {
}
componentDidUpdate
()
{
<<<<<<<
HEAD
=======
this
.
setPreviousLocation
()
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
if
(
!
this
.
props
.
user
.
hasError
&&
getParam
(
'redirect'
))
{
window
.
location
.
href
=
getParam
(
'redirect'
)
...
...
@@ -177,12 +199,19 @@ class App extends Component {
setPreviousLocation
=
()
=>
{
const
{
location
,
history
:
{
action
}}
=
this
.
props
<<<<<<<
HEAD
if
(
location
.
pathname
.
startsWith
(
'/passport'
))
{
/*let index = this.records.findIndex(item => item.pathname.startsWith('/passport'))
=======
if (location.pathname.startsWith('/passport')) {
let index = this.records.findIndex(item => item.pathname.startsWith('/passport'))
>>>>>>> 1fc750fdc1798d51d70f5528d18340721dff9ef8
this.previousLocation = index > 0
? this.records[index - 1]
: this.records.length
? this.records[this.records.length - 1]
<<<<<<< HEAD
: null*/
}
else
{
if
(
action
===
'POP'
||
action
===
'REPLACE'
)
{
...
...
@@ -194,6 +223,17 @@ class App extends Component {
}
=======
:
null
}
else
{
if
(
action
===
'POP'
||
action
===
'REPLACE'
)
{
let
index
=
this
.
records
.
findIndex
(
item
=>
item
.
pathname
.
startsWith
(
'/passport'
))
this
.
previousLocation
=
index
>
0
?
this
.
records
[
index
-
1
]
:
this
.
records
[
this
.
records
.
length
-
1
]
}
else
{
this
.
previousLocation
=
location
}
}
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
}
transformUser
=
res
=>
{
...
...
src/common/CallApp/index.js
View file @
cd9c5f31
...
...
@@ -24,16 +24,29 @@ const options = {
class
OpenApp
extends
Component
{
<<<<<<<
HEAD
callApp
=
new
CallApp
(
options
)
// callApp = null
=======
// callApp = new CallApp(options)
callApp
=
null
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
static
defaultProps
=
{
text
:
'在APP打开'
}
<<<<<<<
HEAD
componentWillMount
()
{
// this.callApp = new CallApp({});
=======
componentWillMount
()
{
this
.
callApp
=
new
CallApp
({
...
options
,
path
:
this
.
props
.
path
||
'/'
});
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
}
...
...
src/common/Captcha/index.js
View file @
cd9c5f31
...
...
@@ -13,8 +13,12 @@ class Captcha extends Component {
}
componentDidMount
()
{
<<<<<<<
HEAD
const
{
getInstance
,
handleError
,
onVerify
}
=
this
.
props
;
const
_this
=
this
;
=======
const
{
getInstance
,
handleError
,
onVerify
}
=
this
.
props
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
const
el
=
document
.
getElementById
(
'captcha'
);
el
&&
initCaptcha
(
function
()
{
initNECaptcha
({
...
...
src/components/bargainMiddlePage/barcode/index.js
View file @
cd9c5f31
...
...
@@ -8,8 +8,12 @@ class FollowBarcode extends Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
<<<<<<<
HEAD
url
:
''
,
codeUrl
:
''
=======
url
:
''
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
}
}
...
...
@@ -24,6 +28,7 @@ class FollowBarcode extends Component {
this
.
setState
({
url
:
data
.
url
});
<<<<<<<
HEAD
const
_this
=
this
;
return
new
Promise
(
resolve
=>
{
QRCode
.
toDataURL
(
data
.
url
,
{},
function
(
err
,
url
)
{
...
...
@@ -31,6 +36,13 @@ class FollowBarcode extends Component {
_this
.
setState
({
codeUrl
:
url
});
=======
return
new
Promise
(
resolve
=>
{
QRCode
.
toDataURL
(
data
.
url
,
{},
function
(
err
,
url
)
{
this
.
setState
({
codeUrl
:
url
})
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
});
resolve
();
});
...
...
@@ -40,7 +52,11 @@ class FollowBarcode extends Component {
}
render
()
{
<<<<<<<
HEAD
const
{
codeUrl
}
=
this
.
state
;
=======
const
{
codeSrc
}
=
this
.
state
;
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
const
{
firendBaigainPrice
,
userInfo
:
{
avatar
},
money
}
=
this
.
props
;
return
(
<
div
className
=
'bargain-popup__barcode'
>
...
...
@@ -50,7 +66,11 @@ class FollowBarcode extends Component {
<
p
className
=
'bargain-popup__title'
>
谢谢你帮我砍了
{
money
}
元!
<
/p
>
}
<
p
className
=
'bargain-popup__desc'
>
关注公众号,可以再砍一刀哦
~<
/p
>
<<<<<<<
HEAD
<
img
className
=
"bargain-popup__imgage"
src
=
{
codeUrl
}
alt
=
""
/>
=======
<
i
className
=
"bargain-popup__imgage"
style
=
{{
backgroundImage
:
`url(
${
codeSrc
}
)`
}}
><
/i
>
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
<
/div
>
);
}
...
...
src/components/bargainMiddlePage/barcode/index.scss
View file @
cd9c5f31
...
...
@@ -34,7 +34,14 @@
}
.bargain-popup__imgage
{
<<<<<<<
HEAD
display
:
block
;
width
:
106px
;
margin
:
15px
auto
0
;
=======
width
:
86px
;
height
:
86px
;
margin-top
:
15px
;
background-size
:
cover
;
>>>>>>>
1fc750fdc1798d51d70f5528d18340721dff9ef8
}
\ No newline at end of file
src/components/detail/bargain/index.js
View file @
cd9c5f31
...
...
@@ -80,7 +80,11 @@ class Bargain extends Component {
});
// 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买
<<<<<<<
HEAD
if
(
data
.
bargain_status
===
0
||
data
.
bargain_status
===
1
)
{
=======
if
(
data
.
bargain_status
===
0
)
{
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
this
.
getBargainRankList
({
type
:
0
,
bargain_code
:
data
.
bargain_code
...
...
src/components/detail/index.js
View file @
cd9c5f31
...
...
@@ -18,6 +18,7 @@ import {bindActionCreators} from "redux";
import
{
delCountryNum
}
from
'./../country/countryRedux'
;
import
RedPacket
from
'./redPacket'
;
import
{
Link
}
from
"react-router-dom"
;
class
Detail
extends
Component
{
...
...
@@ -318,13 +319,33 @@ class Detail extends Component {
}
// 点击子组件试听按钮
<<<<<<<
HEAD
toAudition
=
(
v_course_id
,
video_id
)
=>
{
=======
toAudition
=
(
vCourseId
,
videoId
)
=>
{
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
if
(
!
uid
)
{
this
.
props
.
history
.
push
(
'/passport/login'
)
}
else
{
<<<<<<<
HEAD
this
.
props
.
history
.
push
(
`/play/video?id=
${
v_course_id
}
&video_id=
${
video_id
}
`
);
=======
if
(
videoId
==
''
||
videoId
==
0
||
videoId
==
undefined
){
return
false
;
}
http
.
post
(
`
${
API
[
'base-api'
]}
/sys/get_class_audition?video_id=
${
videoId
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
200
)
{
this
.
props
.
history
.
push
(
`/play/video?id=
${
vCourseId
+
'&video_id='
+
videoId
}
`
)
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
}
})
// this.setState({
// auditionBox: true,
// })
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
}
}
// 点击子组件单集购买按钮
...
...
src/components/passport/bindingTel/index.js
View file @
cd9c5f31
...
...
@@ -123,7 +123,11 @@ const formikConfig = {
phone_num
:
values
.
tel
,
phone_code
:
values
.
veriCode
,
mkey
:
getParam
(
'mkey'
),
<<<<<<<
HEAD
area_code
:
'00'
+
props
.
country
.
num
,
=======
area_code
:
props
.
country
.
num
,
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
plat
:
5
}).
then
(
res
=>
{
const
data
=
res
.
data
...
...
src/components/passport/common/veriCodeInput/index.js
View file @
cd9c5f31
...
...
@@ -87,7 +87,11 @@ class VeriCodeInput extends Component {
http
.
post
(
`
${
API
[
'passport-api'
]}
/quick_sms`
,
{
phone_num
:
tel
||
account
,
action
:
action
||
'login'
,
<<<<<<<
HEAD
area_code
:
'00'
+
country
.
num
,
=======
area_code
:
country
.
num
,
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
challenge
,
checking
}).
then
(
res
=>
{
...
...
src/components/passport/forgotPassword/index.js
View file @
cd9c5f31
...
...
@@ -123,7 +123,11 @@ const formikConfig = {
http
.
post
(
`
${
API
[
'passport-api'
]}
/check_phone_code`
,
{
phone
:
values
.
tel
,
code
:
values
.
veriCode
,
<<<<<<<
HEAD
area_code
:
'00'
+
props
.
country
.
num
=======
area_code
:
props
.
country
.
num
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
}).
then
(
res
=>
{
if
(
res
.
data
.
errno
==
0
)
{
props
.
history
.
push
(
'/passport/set-password'
,
{
from
:
props
.
location
})
...
...
src/components/passport/login/index.js
View file @
cd9c5f31
...
...
@@ -133,7 +133,11 @@ const FormikConfig = {
props
.
quickLogin
({
phone_num
:
values
.
tel
,
phone_code
:
values
.
veriCode
,
<<<<<<<
HEAD
area_code
:
'00'
+
props
.
country
.
num
=======
area_code
:
props
.
country
.
num
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
}).
then
(
res
=>
{
if
(
res
.
hasError
)
{
Toast
.
info
(
res
.
msg
);
...
...
src/components/passport/setPassword/index.js
View file @
cd9c5f31
...
...
@@ -15,6 +15,11 @@ import { connect } from "react-redux";
class
SetPassword
extends
Component
{
<<<<<<<
HEAD
=======
>>>>>>>
1
fc750fdc1798d51d70f5528d18340721dff9ef8
render
()
{
let
{
values
,
errors
,
location
}
=
this
.
props
let
{
from
}
=
location
.
state
||
{
from
:
{
pathname
:
'/'
}}
...
...
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