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
9c8cacc5
Commit
9c8cacc5
authored
Aug 23, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单集购买
parent
3eabffcd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/components/video/index.js
+11
-0
No files found.
src/components/video/index.js
View file @
9c8cacc5
...
@@ -150,8 +150,10 @@ class Video extends Component {
...
@@ -150,8 +150,10 @@ class Video extends Component {
console
.
log
(
item
);
console
.
log
(
item
);
this
.
setState
({
this
.
setState
({
singleBox
:
true
,
singleBox
:
true
,
singleType
:
1
,
singMess
:
item
singMess
:
item
})
})
window
.
localStorage
.
setItem
(
'singMess'
,
JSON
.
stringify
(
item
))
}
}
// 自组件传给父组件的boxHide
// 自组件传给父组件的boxHide
...
@@ -165,6 +167,9 @@ class Video extends Component {
...
@@ -165,6 +167,9 @@ class Video extends Component {
if
(
!
getParam
(
'oid'
))
{
if
(
!
getParam
(
'oid'
))
{
return
;
return
;
}
else
{
}
else
{
this
.
setState
({
singMess
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'singMess'
))
})
_this
.
intervalPayStatus
=
setInterval
(
function
()
{
_this
.
intervalPayStatus
=
setInterval
(
function
()
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/orderState/oid/
${
getParam
(
'oid'
)}
`
).
then
(
res
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/orderState/oid/
${
getParam
(
'oid'
)}
`
).
then
(
res
=>
{
if
(
res
.
data
.
errno
===
401
)
{
if
(
res
.
data
.
errno
===
401
)
{
...
@@ -211,6 +216,9 @@ class Video extends Component {
...
@@ -211,6 +216,9 @@ class Video extends Component {
if
(
!
getParam
(
'oid'
))
{
if
(
!
getParam
(
'oid'
))
{
return
return
}
else
{
}
else
{
this
.
setState
({
singMess
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'singMess'
))
})
// this.props.weixinPay(weixin_code)
// this.props.weixinPay(weixin_code)
http
.
get
(
`
${
API
[
'base-api'
]}
/pay/wxpay/pub_charge/oid/
${
getParam
(
'oid'
)}
/code/
${
weixin_code
}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/pay/wxpay/pub_charge/oid/
${
getParam
(
'oid'
)}
/code/
${
weixin_code
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
errno
===
0
)
{
if
(
res
.
data
.
errno
===
0
)
{
...
@@ -289,6 +297,9 @@ class Video extends Component {
...
@@ -289,6 +297,9 @@ class Video extends Component {
};
};
// 判断支付是否成功
// 判断支付是否成功
check
=
(
oid
)
=>
{
check
=
(
oid
)
=>
{
this
.
setState
({
singMess
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'singMess'
))
})
http
.
get
(
`
${
API
[
'base-api'
]}
/class_order_status/
${
oid
}
`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/class_order_status/
${
oid
}
`
).
then
((
res
)
=>
{
if
(
Number
(
res
.
data
.
data
.
errno
)
===
200
)
{
if
(
Number
(
res
.
data
.
data
.
errno
)
===
200
)
{
// 正常购买单集成功
// 正常购买单集成功
...
...
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