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
1a33390c
Commit
1a33390c
authored
Aug 21, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cancel request course detail api before get into course detail
parent
566a885d
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
38 additions
and
39 deletions
+38
-39
src/components/Index/index.js
+2
-2
src/components/bargainMiddlePage/index.js
+2
-2
src/components/classify/courselist.js
+2
-2
src/components/classify/index.js
+2
-2
src/components/coupons/index.js
+2
-2
src/components/detail/btnstatus/index.js
+0
-1
src/components/detail/group/togroup.js
+3
-3
src/components/detail/index.js
+5
-5
src/components/my/index.js
+2
-2
src/components/myOrders/index.js
+2
-2
src/components/order/index.js
+2
-2
src/components/preferential/index.js
+2
-2
src/components/purchased/index.js
+2
-2
src/components/scholarship/index.js
+2
-2
src/components/search/recommendation/index.js
+2
-2
src/components/search/search-result.js
+2
-2
src/components/shopCart/index.js
+2
-2
src/components/video/recommendation/index.js
+2
-2
No files found.
src/components/Index/index.js
View file @
1a33390c
...
@@ -110,10 +110,10 @@ class Index extends Component {
...
@@ -110,10 +110,10 @@ class Index extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
);
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
return
false
;
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/bargainMiddlePage/index.js
View file @
1a33390c
...
@@ -272,10 +272,10 @@ class BargainMiddlePage extends Component {
...
@@ -272,10 +272,10 @@ class BargainMiddlePage extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
);
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
return
false
;
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/classify/courselist.js
View file @
1a33390c
...
@@ -107,9 +107,9 @@ class Classify extends Component {
...
@@ -107,9 +107,9 @@ class Classify extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/classify/index.js
View file @
1a33390c
...
@@ -54,10 +54,10 @@ class Classify extends Component {
...
@@ -54,10 +54,10 @@ class Classify extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
);
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
return
false
;
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/coupons/index.js
View file @
1a33390c
...
@@ -149,10 +149,10 @@ class UseCoupon extends PureComponent {
...
@@ -149,10 +149,10 @@ class UseCoupon extends PureComponent {
if
(
coupon
[
'ctype'
]
===
1
)
{
if
(
coupon
[
'ctype'
]
===
1
)
{
history
.
push
(
`/classify`
)
history
.
push
(
`/classify`
)
}
else
{
}
else
{
dispatch
(
getCourses
(
coupon
[
'limit_course'
],
()
=>
{
//
dispatch(getCourses(coupon['limit_course'], () => {
history
.
push
(
`/detail?id=
${
coupon
[
'limit_course'
]}
`
);
history
.
push
(
`/detail?id=
${
coupon
[
'limit_course'
]}
`
);
return
false
;
return
false
;
}));
//
}));
}
}
}
else
{
}
else
{
...
...
src/components/detail/btnstatus/index.js
View file @
1a33390c
...
@@ -6,7 +6,6 @@ import { getCourses } from "@/components/detail/actions"
...
@@ -6,7 +6,6 @@ import { getCourses } from "@/components/detail/actions"
import
{
connect
}
from
"react-redux"
import
{
connect
}
from
"react-redux"
import
'./index.scss'
import
'./index.scss'
import
Overlay
from
'../overlay'
import
Overlay
from
'../overlay'
import
axios
from
"axios"
;
class
BtnStatus
extends
Component
{
class
BtnStatus
extends
Component
{
...
...
src/components/detail/group/togroup.js
View file @
1a33390c
...
@@ -35,7 +35,7 @@ class ToGroup extends Component {
...
@@ -35,7 +35,7 @@ class ToGroup extends Component {
title
:
`【仅剩
${
number
}
个名额】我
${
pdd_price
}
元拼了《
${
data
.
course_title
}
》`
,
title
:
`【仅剩
${
number
}
个名额】我
${
pdd_price
}
元拼了《
${
data
.
course_title
}
》`
,
desc
:
data
.
course_title
,
// 分享描述
desc
:
data
.
course_title
,
// 分享描述
// 直接进入课程详情页,isIn: 1
// 直接进入课程详情页,isIn: 1
link
:
location
.
origin
+
`/detail?id=
${
data
.
course_id
}
&isIn=1
`
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
location
.
origin
+
`/detail?id=
${
data
.
course_id
}
`
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
data
.
image_name
,
// 分享图标
imgUrl
:
data
.
image_name
,
// 分享图标
};
};
http
.
post
(
`
${
API
[
'base-api'
]}
/m/sale/signature`
).
then
(
res
=>
{
http
.
post
(
`
${
API
[
'base-api'
]}
/m/sale/signature`
).
then
(
res
=>
{
...
@@ -124,10 +124,10 @@ class ToGroup extends Component {
...
@@ -124,10 +124,10 @@ class ToGroup extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
,
{
href
:
'/classify'
});
history
.
push
(
`/detail?id=
${
id
}
`
,
{
href
:
'/classify'
});
return
false
;
return
false
;
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/detail/index.js
View file @
1a33390c
...
@@ -17,6 +17,8 @@ import {compose, bindActionCreators} from "redux";
...
@@ -17,6 +17,8 @@ import {compose, bindActionCreators} from "redux";
class
Detail
extends
Component
{
class
Detail
extends
Component
{
courseId
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
...
@@ -35,10 +37,8 @@ class Detail extends Component {
...
@@ -35,10 +37,8 @@ class Detail extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
// 直接进入课程详情页,isIn: 1
if
(
getParam
(
'isIn'
))
{
this
.
props
.
getCourses
();
this
.
props
.
getCourses
();
}
this
.
courseId
=
getParam
(
'id'
)
const
{
courseInfo
}
=
this
.
props
;
const
{
courseInfo
}
=
this
.
props
;
if
(
courseInfo
.
course_info
.
is_bargain
)
{
if
(
courseInfo
.
course_info
.
is_bargain
)
{
this
.
getBargainInfo
();
this
.
getBargainInfo
();
...
@@ -107,7 +107,7 @@ class Detail extends Component {
...
@@ -107,7 +107,7 @@ class Detail extends Component {
link
:
location
.
origin
+
`/detail??id=
${
course_id
}
`
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
location
.
origin
+
`/detail??id=
${
course_id
}
`
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
image_name
,
// 分享图标
imgUrl
:
image_name
,
// 分享图标
};
};
console
.
log
(
shareData
);
http
.
post
(
`
${
API
[
'base-api'
]}
/m/sale/signature`
).
then
(
res
=>
{
http
.
post
(
`
${
API
[
'base-api'
]}
/m/sale/signature`
).
then
(
res
=>
{
const
{
nonce_str
,
signature
,
timestamp
}
=
res
.
data
;
const
{
nonce_str
,
signature
,
timestamp
}
=
res
.
data
;
wx
.
config
({
wx
.
config
({
...
@@ -279,7 +279,7 @@ class Detail extends Component {
...
@@ -279,7 +279,7 @@ class Detail extends Component {
{
/*分享赚钱*/
}
{
/*分享赚钱*/
}
{
{
courseInfo
.
is_dist
&&
this
.
courseId
===
courseInfo
.
course_id
&&
courseInfo
.
is_dist
&&
<
ShareRank
courseInfo
=
{
courseInfo
}
/
>
<
ShareRank
courseInfo
=
{
courseInfo
}
/
>
}
}
...
...
src/components/my/index.js
View file @
1a33390c
...
@@ -30,10 +30,10 @@ class My extends PureComponent {
...
@@ -30,10 +30,10 @@ class My extends PureComponent {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
);
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
return
false
;
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/myOrders/index.js
View file @
1a33390c
...
@@ -75,10 +75,10 @@ class MyOrders extends Component {
...
@@ -75,10 +75,10 @@ class MyOrders extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
);
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
return
false
;
}));
//
}));
}
}
...
...
src/components/order/index.js
View file @
1a33390c
...
@@ -374,9 +374,9 @@ class Order extends Component {
...
@@ -374,9 +374,9 @@ class Order extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/preferential/index.js
View file @
1a33390c
...
@@ -80,9 +80,9 @@ class Preferential extends Component {
...
@@ -80,9 +80,9 @@ class Preferential extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/purchased/index.js
View file @
1a33390c
...
@@ -37,9 +37,9 @@ class Purchased extends Component {
...
@@ -37,9 +37,9 @@ class Purchased extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
...
...
src/components/scholarship/index.js
View file @
1a33390c
...
@@ -188,9 +188,9 @@ class _Scholarship extends Component {
...
@@ -188,9 +188,9 @@ class _Scholarship extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/search/recommendation/index.js
View file @
1a33390c
...
@@ -35,9 +35,9 @@ class Recommendation extends Component {
...
@@ -35,9 +35,9 @@ class Recommendation extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/search/search-result.js
View file @
1a33390c
...
@@ -57,9 +57,9 @@ class SearchResult extends PureComponent {
...
@@ -57,9 +57,9 @@ class SearchResult extends PureComponent {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
render
()
{
render
()
{
...
...
src/components/shopCart/index.js
View file @
1a33390c
...
@@ -168,9 +168,9 @@ class Cart extends Component {
...
@@ -168,9 +168,9 @@ class Cart extends Component {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
console
.
log
(
id
);
console
.
log
(
id
);
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
...
...
src/components/video/recommendation/index.js
View file @
1a33390c
...
@@ -46,9 +46,9 @@ class Recommendation extends PureComponent {
...
@@ -46,9 +46,9 @@ class Recommendation extends PureComponent {
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
//
dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
}));
//
}));
}
}
render
()
{
render
()
{
...
...
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