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
e655fbbf
Commit
e655fbbf
authored
Apr 23, 2020
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拉取代码
parent
d669b678
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
98 additions
and
33 deletions
+98
-33
build/precache-manifest.c18a62bb682591816eb04deb1d4f3eea.js
+0
-0
src/common/Captcha/index.js
+0
-1
src/components/Index/index.scss
+0
-2
src/components/detail/outline/index.js
+9
-0
src/components/ml/pythomDes/Experience/index.js
+1
-1
src/components/ml/pythomDes/index.js
+13
-3
src/components/passport/accountLogin/index.js
+4
-0
src/components/passport/bindingTel/index.js
+69
-25
src/store/userAction.js
+2
-1
No files found.
build/precache-manifest.c18a62bb682591816eb04deb1d4f3eea.js
0 → 100644
View file @
e655fbbf
This diff is collapsed.
Click to expand it.
src/common/Captcha/index.js
View file @
e655fbbf
...
...
@@ -24,7 +24,6 @@ class Captcha extends Component {
width
:
'auto'
,
onReady
:
function
(
instance
)
{
// 验证码一切准备就绪,此时可正常使用验证码的相关功能
console
.
log
(
_this
);
_this
.
setState
({
isReady
:
true
});
...
...
src/components/Index/index.scss
View file @
e655fbbf
...
...
@@ -634,7 +634,6 @@
background-color
:
#F3F4F8
;
}
.index-box
~
.year19-index
{
display
:
none
;
}
\ No newline at end of file
src/components/detail/outline/index.js
View file @
e655fbbf
...
...
@@ -107,6 +107,7 @@ class OutLine extends Component {
4-已购买直播中
5-可试听且有试听权限
6-可试听但无试听权限
7-新试听功能,点击试听跳转播放页
*/
}
{
// 试听
!
introduce
.
is_aist
&&
(
item
.
class_status
===
6
||
item
.
class_status
===
5
)
&&
...
...
@@ -115,6 +116,14 @@ class OutLine extends Component {
<
i
className
=
'iconfont iconcelluar'
><
/i
>
<
/span
>
}
{
// 点击试听跳转播放页
!
introduce
.
is_aist
&&
item
.
class_status
===
7
&&
<
Link
to
=
{
`/play/video?id=
${
introduce
.
v_course_id
+
'&video_id='
+
item
.
video_id
}
`
}
className
=
'btn-right-10 audition'
>
<
i
className
=
'iconfont iconcelluar'
><
/i>试听</
Link
>
}
{
// 未购买未开单集购买:上锁标志,点击提示购买
!
introduce
.
is_aist
&&
item
.
class_status
===
0
&&
<
i
className
=
'iconfont iconiconfront-74 icon-right-22'
><
/i
>
...
...
src/components/ml/pythomDes/Experience/index.js
View file @
e655fbbf
...
...
@@ -20,7 +20,7 @@ export default class Experience extends Component {
<
/div
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/r%402x.png"
alt
=
""
/>
<
/div
>
<
div
className
=
{
'btn'
}
onClick
=
{
tryLearn
}
>
立即体验
<
/div
>
<
div
className
=
{
'btn'
}
onClick
=
{
()
=>
{
tryLearn
(
1
)}
}
>
立即体验
<
/div
>
<
/
>
)
:
(
...
...
src/components/ml/pythomDes/index.js
View file @
e655fbbf
...
...
@@ -12,7 +12,7 @@ import ShareRank from "@components/detail/shareRank"
import
{
http
,
getParam
,
SendMessageToApp
,
}
from
'@/utils'
import
{
connect
}
from
'react-redux'
import
{
Toast
}
from
"antd-mobile"
import
{
CallApp
}
from
"@common/index"
import
{
CallApp
}
from
"@common/index"
@
connect
(
state
=>
({
user
:
state
.
user
...
...
@@ -35,6 +35,7 @@ class PythonDes extends Component {
// 立即报名
signUp
=
()
=>
{
this
.
statistics
(
3
)
// 已登录
if
(
!
this
.
props
.
user
.
hasError
)
{
this
.
toDetail
()
...
...
@@ -44,7 +45,8 @@ class PythonDes extends Component {
}
// 立即体验、免费试学
tryLearn
=
()
=>
{
tryLearn
=
type
=>
{
this
.
statistics
(
type
)
// 已登录
if
(
!
this
.
props
.
user
.
hasError
)
{
this
.
toLearn
()
...
...
@@ -169,6 +171,11 @@ class PythonDes extends Component {
}
}
// 统计
statistics
=
type
=>
{
http
.
post
(
`
${
API
.
home
}
/web/it_click_num/
${
getParam
(
'id'
)}
`
,
{
type
})
}
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
if
(
this
.
props
.
isAppUpdate
!==
nextProps
.
isAppUpdate
)
{
...
...
@@ -207,7 +214,10 @@ class PythonDes extends Component {
<
/div
>
<
div
className
=
{
'btn__group'
}
>
<
div
className
=
{
'try__study'
}
onClick
=
{
this
.
tryLearn
}
>
免费试学
<
/div
>
<
div
className
=
{
'try__study'
}
onClick
=
{()
=>
{
this
.
tryLearn
(
2
)
}}
>
免费试学
<
/div
>
<
div
className
=
{
'sign__now'
}
onClick
=
{
this
.
signUp
}
>
立即报名
<
/div
>
<
/div
>
<
/div
>
...
...
src/components/passport/accountLogin/index.js
View file @
e655fbbf
...
...
@@ -77,6 +77,10 @@ const formikConfig = {
username
,
password
,
redirect
:
from
&&
window
.
location
.
origin
+
from
.
pathname
+
from
.
search
+
from
.
hash
}).
then
(
res
=>
{
if
(
res
.
hasError
)
{
if
(
res
.
code
===
4004
){
history
.
push
(
`/passport/binding-tel?username=
${
username
}
`
)
return
}
Toast
.
info
(
res
.
msg
,
2
,
null
,
false
)
}
})
...
...
src/components/passport/bindingTel/index.js
View file @
e655fbbf
...
...
@@ -39,7 +39,6 @@ class BindingTel extends Component {
}
}
render
()
{
const
{
values
,
...
...
@@ -119,36 +118,81 @@ const formikConfig = {
return
errors
},
handleSubmit
(
values
,
{
props
})
{
http
.
post
(
`
${
API
[
'passport-api'
]}
/bind_mobile`
,
{
phone_num
:
values
.
tel
,
phone_code
:
values
.
veriCode
,
mkey
:
getParam
(
'mkey'
),
area_code
:
'00'
+
props
.
country
.
num
,
plat
:
5
}).
then
(
res
=>
{
const
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
if
(
data
.
data
[
'is_set_pwd'
])
{
const
{
history
}
=
props
history
.
replace
(
`/passport/set-password`
,
{
user
:
{
hasError
:
false
,
data
:
{
uid
:
data
.
data
.
uid
},
msg
:
data
.
data
.
msg
,
stage
:
'binding'
const
username
=
getParam
(
'username'
)
if
(
username
)
{
//老账号绑定手机号
http
.
post
(
`
${
API
[
"passport-api"
]}
/m/personal/bindMobile`
,
{
phone_num
:
values
.
tel
,
code
:
values
.
veriCode
,
type
:
1
,
area_code
:
'00'
+
props
.
country
.
num
,
user_name
:
username
}).
then
(
res
=>
{
const
{
data
,
errno
,
msg
}
=
res
.
data
if
(
errno
===
200
)
{
props
.
setCurrentUser
({
hasError
:
false
,
data
:
{
username
:
data
.
user_name
,
avatar
:
data
.
avatar_file
,
isVip
:
parseInt
(
data
.
vip
),
token
:
data
.
access_token
,
uid
:
data
.
uid
}
})
const
{
from
}
=
props
.
location
.
state
||
{
from
:
{
pathname
:
'/'
}}
props
.
history
.
push
(
from
)
}
else
{
location
.
assign
(
data
.
data
[
'jump_url'
]
)
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
}
else
{
const
uid
=
getParam
(
'uid'
)
const
params
=
{
phone_num
:
values
.
tel
,
phone_code
:
values
.
veriCode
,
mkey
:
getParam
(
'mkey'
),
area_code
:
'00'
+
props
.
country
.
num
,
plat
:
5
,
type
:
uid
?
1
:
2
}
if
(
uid
)
{
params
.
uid
=
uid
}
http
.
post
(
`
${
API
[
'passport-api'
]}
/bind_mobile`
,
params
).
then
(
res
=>
{
const
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
const
{
history
}
=
props
if
(
data
.
data
[
'is_set_pwd'
])
{
history
.
replace
(
`/passport/set-password`
,
{
user
:
{
hasError
:
false
,
data
:
{
uid
:
data
.
data
.
uid
},
msg
:
data
.
data
.
msg
,
stage
:
'binding'
}
})
}
else
{
if
(
uid
)
{
const
redirect
=
localStorage
.
getItem
(
'binding_redirect'
)
if
(
redirect
)
{
localStorage
.
removeItem
(
'binding_redirect'
)
history
.
replace
(
JSON
.
parse
(
redirect
))
}
else
{
location
.
assign
(
data
.
data
[
'jump_url'
])
}
}
}
}
else
{
Toast
.
info
(
data
.
msg
,
2
,
null
,
false
)
}
})
}
else
{
Toast
.
info
(
data
.
msg
,
2
,
null
,
false
)
}
})
}
}
}
export
default
compose
(
...
...
src/store/userAction.js
View file @
e655fbbf
...
...
@@ -67,7 +67,8 @@ const storeUser = (res, dispatch) => {
payload
=
{
hasError
:
true
,
msg
:
data
.
msg
,
data
:
{}
data
:
{},
code
:
data
.
errno
}
}
dispatch
(
setCurrentUser
(
payload
))
...
...
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