Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
0019c1c5
Commit
0019c1c5
authored
May 18, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T
parent
14eb39a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
2 deletions
+46
-2
apps/course/Tpl/default/PayVideo/index_w3g.html
+46
-2
No files found.
apps/course/Tpl/default/PayVideo/index_w3g.html
View file @
0019c1c5
...
@@ -67,7 +67,8 @@
...
@@ -67,7 +67,8 @@
},
},
methods
:
{
methods
:
{
onBuy
:
function
(
id
,
type
)
{
onBuy
:
function
(
id
,
type
)
{
if
(
this
.
agree
)
{
let
that
=
this
if
(
that
.
agree
)
{
$
.
post
(
$
.
post
(
U
(
"course/PayVideo/checkPayOperat"
),
U
(
"course/PayVideo/checkPayOperat"
),
{
{
...
@@ -78,11 +79,54 @@
...
@@ -78,11 +79,54 @@
money
:
"{$moner_data['oriPrice']}"
,
money
:
"{$moner_data['oriPrice']}"
,
},
},
function
(
data
)
{
function
(
data
)
{
console
.
log
(
data
)
if
(
data
.
status
==
1
)
{
that
.
startWxPay
()
}
else
{
ui
.
error
(
data
.
info
)
}
})
})
}
else
{
}
else
{
ui
.
error
(
'请阅读并同意购买协议'
)
ui
.
error
(
'请阅读并同意购买协议'
)
}
}
},
startWxPay
:
function
()
{
$
.
ajax
({
url
:
"{:U('course/PayVideo/payLibrary')}"
,
data
:{
check_type
:
'{$pay_video_type}'
,
mid
:
MID
,
vid
:
id
,
pay
:
"wxpay"
,
money
:
"{$moner_data['oriPrice']}"
,
},
async
:
false
,
type
:
'post'
,
success
:
function
(
data
){
console
.
log
(
data
)
})
},
checkPayStatus
:
function
(
num
)
{
let
that
=
this
$
.
ajax
({
url
:
"{:U('course/PayVideo/getPayStatus')}"
,
data
:{
pay_pass_num
:
num
},
type
:
'post'
,
success
:
function
(
res
){
try
{
res
=
JSON
.
parse
(
res
);
if
(
res
.
status
==
1
){
ui
.
success
(
'购买成功'
)
setTimeout
(
function
(){
window
.
location
.
href
=
res
.
data
},
1500
)
}
else
{
setTimeout
(
()
=>
{
that
.
checkPayStatus
(
num
)
},
1000
)
}
}
catch
(
e
){
return
}
}
})
}
}
}
}
})
})
...
...
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