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
9d012045
Commit
9d012045
authored
Jun 02, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
4b1d0d35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
404 additions
and
554 deletions
+404
-554
apps/course/Tpl/default/PayVideo/index_w3g.html
+404
-554
No files found.
apps/course/Tpl/default/PayVideo/index_w3g.html
View file @
9d012045
<include
file=
"__THEME__/public_header_w3g"
/>
<include
file=
"__THEME__/public_header_w3g"
/>
<link
href=
"__APP__/css/pay_video_3g.css"
rel=
"stylesheet"
>
<link
href=
"__APP__/css/pay_video_3g.css"
rel=
"stylesheet"
>
<style>
<style>
...
@@ -6,566 +6,416 @@
...
@@ -6,566 +6,416 @@
</style>
</style>
<div
className=
"body"
>
<div
class=
"body"
>
<div
className=
"wrap"
>
<div
class=
"wrap"
>
<div
className=
"min-height-wrap"
>
<div
class=
"min-height-wrap"
>
<div
className=
"class_order_tit"
>
核对订单信息
</div>
<div
class=
"class_order_tit"
>
核对订单信息
</div>
<!--商品信息-->
<!--商品信息-->
<dl
class=
"df_course-info"
>
<dl
className=
"df_course-info"
>
<dt><h3>
商品信息
</h3></dt>
<dt><h3>
商品信息
<dd>
</h3></dt>
<if
condition=
"$pay_video_type eq 'zy_video'"
>
<dd>
<a
href=
"{:U('course/Video/view',['id'=>$id])}"
>
<if
<elseif
condition=
"$pay_video_type eq 'zy_live'"
/>
condition=
"$pay_video_type eq 'zy_video'"
>
<a
href=
"{:U('live/Index/view',['id'=>$id])}"
>
<a
href=
"{:U('course/Video/view',['id'=>$id])}"
>
<elseif
condition=
"$pay_video_type eq 'zy_album'"
/>
<
<a
href=
"{:U('course/Album/view',['id'=>$id])}"
>
elseif
condition=
"$pay_video_type eq 'zy_ive'"
/>
<elseif
condition=
"$pay_video_type eq 'zy_line_course'"
/>
<a
href=
"{:U('live/Index/view',['id'=>$id])}"
>
<a
href=
"{:U('course/Album/view',['id'=>$id])}"
>
<elseif
condition=
"$pay_video_type eq 'zy_abum'"
/>
<elseif
condition=
"$pay_video_type eq 'zy_classes'"
/>
<a
href=
"{:U('course/Album/view',['id'=>$id])}"
>
<a
href=
"{:U('course/Classes/view',['id'=>$id])}"
>
<elseif
condition=
"$pay_video_type eq 'zy_line_corse'"
/>
</if>
<a
href=
"{:U('course/Album/view',['id'=>$id])}"
>
<span>
<elseif
condition=
"$pay_video_type eq 'zy_clases'"
/>
<a
href=
"{:U('course/Classes/view',['id'=>$id])}"
>
</if>
<span>
<img
src=
"{:getCover($cover,220,130)}"
width=
"120"
height=
"70"
alt=
"{$video_title}"
>
<img
src=
"{:getCover($cover,220,130)}"
width=
"120"
height=
"70"
alt=
"{$video_title}"
>
</span>
</span>
<h3>
<h3>
{$video_title|mS
{$video_title|mStr=20}
<if
condition=
"$course_hour_info"
>
- {$course_hour_info['title']|mStr=20}
</if>
tr=20}
<if
condition=
"$course_hour_info"
>
- {$course_hour_info['title']|mStr=20}
</if>
<p>
¥
<if
condition=
"$course_hour_info"
>
{$course_hour_info['course_hour_price']}
<else/>
<p>
¥
<if
condition=
"$course_hour_info"
>
{$course_hour_info['course_hour_pr
<if
condition=
"$is_event"
>
{$moner_data['selPrice']}
<else/>
{$moner_data['oriPrice']}
</if>
ice']}
<else/>
</if></p>
<if
condition=
"$is_event"
>
{$moner_data['selPr
</h3>
ice']}
<
</a>
else/>
{$moner_data['oriPr
</dd>
ice']}
</if>
</dl>
</if></p>
</h3>
<!--支付方式-->
</a
<dl
class=
"df_pay-style"
>
>
<dt><h3>
支付方式
</h3></dt>
</dd>
<php>
if($is_wx){unset($payWay['支付宝支付']);}$firstPayWay = current($payWay);
</php>
</dl>
<!--支付方式-->
<if
condition=
"in_array('alipay',$payConfig['pay']) and ($is_wx eq false)"
>
<dl
className=
"df
<dd
value=
"alipay"
class=
"paytype"
><a
class=
"icon icon-zhifubao1"
></a><span
class=
"name"
>
支付宝
</span><if
condition=
"$firstPayWay eq alipay"
><i
class=
"icon icon-xuanze"
></i></if></dd>
style"
>
</if>
<dt><h3>
支付方式
</
h3></dt>
<if
condition=
"in_array('wxpay',$payConfig['pay'])"
>
<php>
if($is_wx){unset($payWay['支付宝支付']);}$firstPayWay = curren
<dd
value=
"wxpay"
class=
"paytype"
><a
class=
"icon icon-weixinzhifu1"
></a><span
class=
"name"
>
微信支付
</span><i
class=
"<if condition='$is_wx or $firstPayWay eq wxpay '>icon icon-xuanze</if>"
style=
"border: 1px solid rgb(237, 237, 237);"
></i></dd>
yWay);
</php>
</if>
<if
condition=
"in_array('alipay',$payConfig['pay']) and ($
eq false)"
>
<if
condition=
"in_array('unionpay',$payConfig['pay'])"
>
<dd
value=
"alipay"
className=
"paytype"
><a
className=
"icon icon-zhi
<!--<span val="unionpay">银联支付</span>-->
ubao1"
></a><span
className=
</if>
"name"
>
支付宝
</span><if
condition=
"$firstPayWay eq alipay"
><i
className=
"icon icon-
xuanze"
></
<if
condition=
"in_array('lcnpay',$payConfig['pay'])"
>
i></if
<dd
value=
"lcnpay"
class=
"paytype"
><a
class=
"icon icon-qianbao"
></a><span
class=
"name"
>
<!-- <img style="width: 24px;position: relative;top: -4px;left: -1%" src="__APP__/icon/yue.png" alt="图标"/> -->
余额支付(¥{$account_balance})
</span><i
class=
"<if condition='($firstPayWay eq lcnpay)'>icon icon-xuanze</if>"
></i></dd>
</if>
></dd>
</dl>
</if>
<!--优惠券-->
<if
condition=
"in_array(
<if
condition=
"$is_asb OR ($pay_order AND $used_coupon)"
>
<!-- 拼团无优惠券 --><!-- 砍价成功无优惠券 -->
',$payConfig['pay'])"
>
<elseif
condition=
"$show_coupon eq 1 and $course_hour_info eq null"
/>
<dd
value=
"wxpay"
className=
"paytype"
><a
className=
"icon
<dl
class=
"df_pay-coupon"
>
con-weixinzhifu1"
></a><span
cl
<a
href=
"{:U('course/PayVideo/coupon',['id'=>$id, 'vst'=>$coupon_vst, 'asb'=>$_GET['asb']])}"
>
ssName=
"name"
>
微信支付
</span><i
className=
"<if condition='$is_wx or $firstPayWay eq wx
<dt><h3>
优惠券
</h3></dt>
ay '>icon icon-xuanze</if>"
style=
"border: 1px solid rgb(237
<dd><p><if
condition=
"$videoCoupon or $discount or $courseCard"
>
有
<else/>
无
</if>
可用优惠券
<i
class=
"icon icon-youjiantou"
></i></p></dd>
, 237, 237);"
></i></dd>
</a>
</if>
</dl>
</if>
<if
condition=
"in_arra
onpay',$payConfig['pay'])"
>
<!--实付金额-->
<!--<s
<dl
class=
"df_pay-price"
>
al="u
<dd><h3>
实付金额
</h3><p
id=
"pay_money"
>
¥
<if
condition=
"$course_hour_info"
>
{$course_hour_info['course_hour_price']}
<else/>
{$moner_data['price']}
</if></p></dt>
<if
condition=
"in_array($pay_video_type, ['zy_video','zy_live','zy_classes']) and $chd eq 0"
>
y">银联支付</span>-->
<dd><h3>
优惠折扣
</h3><p
id=
"cod_money1"
>
-¥
<if
condition=
"$is_event"
>
{$moner_data['selPrice'] - $moner_data['price']}
<else/>
{$moner_data['oriPrice']- $moner_data['price']}
</if></p></dd>
</if>
</if>
</dl>
<if
condition=
"in_ar
cnpay',$payConfig['pay'])"
>
<!--购买协议-->
<dd
value=
"lcnpay"
className=
"paytype"
><a
className=
"icon icon-qianbao"
></a><span
className=
"name"
>
<!-- <img style="width: 24px;position: relative;top: -4px;left: -1%" src="__APP__/icon/yue.png" alt="图标"/> -->
余
<div
class=
"df_pay-protocol"
>
支付(¥{$account_balance})
</span><i
className=
"<if condition='($firstPayWay eq lcnpay)'
<p><i
class=
"icon icon-xuanze"
attr=
"1"
></i>
我已阅读并同意
<a
href=
"{:U('basic/Single/info',array('id'=>'buy'))}"
>
《{$site['site_keyword']}购买协议》
</a></p>
icon
</div>
nze</if>"
>
<!--提交订单-->
</i></dd>
<div
class=
"df_pay-buy"
>
</if>
<h3>
合计:
<strong
id=
"pay_money2"
>
¥
<if
condition=
"$course_hour_info"
>
{$course_hour_info['course_hour_price']}
<else/>
{$moner_data['price']}
</if></strong></h3>
</dl>
<a
href=
"javascript:;"
onclick=
"buyOperat(this,{$id},'video');"
type=
"submit"
>
提交
</a>
</div>
<!--优惠券-->
<form
action=
"{:U('course/PayVideo/payLibrary')}"
method=
"POST"
id=
"pay_video_form"
>
<if
condition=
"$is_asb OR ($pay_order AND $used_coupon)"
<input
type=
"hidden"
value=
"{$id}"
name=
"vid"
/>
>
<!-- 拼团无优惠券 --><!-- 砍价成功无优惠券 -->
<input
type=
"hidden"
value=
"1"
name=
"discount_type"
/>
<elseif
condition=
"$showco
<input
type=
"hidden"
value=
"{$coupon_use_id}"
name=
"coupon_id"
id=
"coupon_id"
/>
eq 1 and $course_hour_info eq null"
<input
type=
"hidden"
value=
"{$_SESSION['mid']}"
name=
"mid"
/>
/>
<input
type=
"hidden"
name=
"mount_mhm_id"
value=
"{$mount_mhm_id}"
/>
<dl
className=
"df_pay-coupon"
>
<input
type=
"hidden"
value=
"{$agent_mhm_id}"
name=
"agent_mhm_id"
/>
<a
href=
"{:U('course/PayVideo/coupon',['id'=>$
<input
type=
"hidden"
name=
"asb"
value=
"{$asb}"
>
t'=>$coupon_vst, 'asb
<input
type=
"hidden"
name=
"event"
value=
"{$event_id}"
>
T['a
<input
type=
"hidden"
value=
"{$pay_video_type}"
name=
"check_type"
/>
sb'
<input
type=
"hidden"
value=
"{$video_title}"
name=
"title"
/>
]])}"
>
<if
condition=
"in_array($pay_video_type,['zy_video','zy_live','zy_classes'])"
>
<dt><h3>
优惠券
</h3></dt>
<input
type=
"hidden"
value=
"{$course_hour_info['id']}"
name=
"course_hour_id"
/>
<dd><p><if
condit
</if>
ion=
"$v
<php>
if($_GET['order']){
</php><input
type=
"hidden"
value=
"1"
name=
"order"
/><php>
}
</php>
i
<input
type=
"hidden"
id=
"pay_money_val"
value=
"{$moner_data['price']}"
name=
"money"
/>
deoCo
upon or $discount or $courseCard"
>
有
<else/>
无
</if>
可
<if
condition=
"$is_wx and in_array('wxpay',$payConfig['pay'])"
>
用优惠券
<i
<input
type=
"hidden"
value=
"wxpay"
name=
"pay"
/>
cla
<else/>
e=
"ic
<volist
name=
"payWay"
id=
"vo"
offset=
"0"
length=
"1"
>
con-y
<input
type=
"hidden"
value=
"{$vo}"
name=
"pay"
/>
</volist>
ntou"
></i></p>
</if>
</dd>
<input
type=
"hidden"
value=
"{$_GET['vst']}"
name=
"vst"
/>
</a>
</form>
</dl>
</div>
</
</div>
if>
</div>
<!--实付金额-->
<dl
clas
sName=
"df_pay-price"
>
<dd><h3>
实付金额
</h3><p
id=
"pay_money"
>
¥
<if
conditio
n=
"$cou
rse_hour_info"
>
{$cours
e_hou
r_in
fo['c
_hour_price']}
<else/>
{$moner_data['price']}
</if></p></dt>
<if
condition=
"in_array($pay_vi
pe, ['zy_video','
zy_live','zy_classes'
]) and $chd eq 0"
>
<dd><h3>
优惠折扣
</h3><p
id=
"cod_money1"
>
-¥
<if
condition
=
"$is_e
vent"
>
{$moner_data['selPrice'] - $moner_data['
price
']}
<
else/>
{$mo
data[
rice']- $mo
data['price']}
</if></p></dd>
</if>
</dl>
<!--购买协议-->
<div
className=
"df_pay-proto
ol"
>
<p><i
className=
"icon icon-xuanze"
attr=
"1"
></i>
我已阅读并同意
<a
href=
"{:U('basic/Singl
fo',ar
id'=>'buy'))}"
>
《{$site['site_keyword']}购买协议》
</a></p>
</div>
<!--提交订单-->
<div
className=
"df_pay-buy"
>
<h3>
合计:
<strong
id=
"pay_money2"
>
¥
<if
c
ondition=
"$course_hour
_info
"
>
{$course_hou
o['course_hour_price']}
<else/>
{$moner_data['price']}
</if></strong></h3>
<a
href=
"
javas
t:;"
onClick=
"buyOperat(this,{$id},'video');"
type=
"submit"
>
提交
</a>
</div>
<form
action=
"{:U('course/PayVideo/payLibrary')}"
method=
"
POST"
id=
"pay_video_form"
>
<input
type=
"hiden"
value=
"{$id}"
name=
"vid"
/>
<input
type=
"hidden"
value=
"1"
name=
"discout_type"
/>
<input
type=
"hidden"
value=
"{$coupon_use_id}"
name=
"
coupon_id"
id=
"coupon_id"
/>
<input
type=
"hidden"
value=
"{$_ES
'mid']}"
name=
"mid"
/>
<input
type=
"hidden"
name=
"mount_mhm_d"
value=
"{$mount_mhm_id}"
/>
<input
type=
"hidden"
value=
"{$agent_mhm_id}"
name=
"agent_mhm_id"
/>
<
input
type=
"hidden"
name=
"asb"
value=
"{$asb}"
>
<input
type=
"
hidden"
name=
"event"
value=
"{$event_id}"
>
<input
type=
"
hidden"
value=
"{$pay_video_type}"
name=
"check_type"
/>
<input
type=
"hidden"
value=
"{$video_title}"
name=
"title"
/>
<if
condition=
"in_array($pay_vieo
,['zy
o','zy_live','zy_classes'])"
>
<input
type=
"hidden"
value=
"{$course_hur
_info['id']}"
name=
"course_hour_id"
/>
</if>
<php>
if($_GET['order']){
</php><input
type=
"hidden"
value=
"1"
name=
"order"
/><php>
}
</php>
<input
type=
"hidden"
id=
"pay_money_val"
value=
"{$moner_data['pice']}"
name=
"
money"
/>
<if
condition=
"$is_wx and in_arra
y',$payConfig['pay'])"
>
<input
type=
"hiden"
value=
"wxpay"
name=
"pay
"
/>
<else/>
<volist
name=
"payWay"
id=
"vo"
offset=
"0
"
l
gth=
"1"
>
<input
type=
"hidden"
value=
"{$vo}"
name=
"pay
"
/>
</vol
ist
>
</if>
<input
type=
"hidden"
val
ue=
"{$_GET['vst
']}"
name=
"vst"
/>
</form>
</d
iv
>
</div>
</
div>
<if
condition=
"$is_wx eq false"
>
<if
condition=
"$is_wx eq false"
>
<style>
<style>
#_ts_box_h5
{
width
:
290px
;
height
:
180px
;
text-align
:
center
;
colo
#_ts_box_h5
{
width
:
290px
;
height
:
180px
;
text-align
:
center
;
color
:
#535353
;
border-radius
:
5px
;
position
:
fixed
;
background
:
#fff
;
-webkit-box-shadow
:
0
2px
5px
#dddddd
;
-moz-box-shadow
:
0
2px
5px
#dddddd
;
-khtml-box-shadow
:
0
2px
5px
#dddddd
;
-ms-box-shadow
:
0
0
15px
#888888
;
box-shadow
:
0
0
15px
#888888
;
z-index
:
997
;
left
:
5%
;
top
:
35%
;
margin
:
0
auto
;
background
:
#fff
;}
r
:
#535353
;
border-radius
:
5px
;
pos
._hide_box_h5
{
z-index
:
996
;
filter
:
alpha
(
opacity
=
50
);
background
:
#666
;
opacity
:
0.5
;
-moz-opacity
:
0.5
;
left
:
0
;
top
:
0
;
height
:
99%
;
width
:
100%
;
position
:
fixed
;}
ition
:
fixed
;
background
:
#fff
;
-webkit-box-
#_ts_box_h5
._box_hd
{
padding
:
20px
0px
;
color
:
black
;
font-size
:
16px
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.16
);}
shadow
:
0
2px
5px
#dddddd
;
-moz-box
#_layer-content
{
padding
:
15px
0px
;
color
:
rgba
(
255
,
35
,
0
,
0.69
);
font-size
:
16px
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.1
);}
-shadow
:
0
2px
5
p
._layer-wt
{
padding
:
15px
0px
;
color
:
#908d8d
;
font-size
:
16px
;}
x
#dddddd
;
-khtm
l
</style>
-box-sha
dow
:
0
2px
5px
#dddddd
;
-ms-box
<div
class=
"_hide_box_h5"
style=
"display: none;"
></div>
-shadow
:
0
0
15px
#888888
;
box-
<div
id=
"_ts_box_h5"
style=
"display: none;"
>
shadow
:
0
0
15px
#
<div
class=
"_box_hd"
>
请确认微信支付是否完成
</div>
88888
8
;
<div
id=
"_layer-content"
>
已完成支付
</div>
z-in
de
<div
class=
"_layer-wt"
><a
href=
"{:U('course/PayVideo/index',['vst'=>$_GET['vst']])}"
>
支付遇到问题,联系客服
</a></div>
x
:
997
;
</div>
left
:
5%
;
t
op
:
3
5%
;
margin
:
0
au
to
;
background
:
#fff
;}
._hide_box_h5
{
z-
index
:
996
;
fil
ter
:
alpha
(
opacit
y
=
50
);
background
:
#666
;
opacity
:
0.5
;
-moz-opaci
ty
:
0.5
;
left
:
0
;
to
p
:
0
;
height
:
99%
;
widt
h
:
100%
;
position
:
fixed
;}
#_ts
_box_h5
._box_hd
{
padding
:
20px
0px
;
color
:
black
;
font-size
:
1
6px
;
border-
b
ottom
:
1px
solid
r
gba
(
0
,
0
,
0
,
0
.
16
);}
#_layer-
c
tent
{
pad
ng
:
15px
0px
;
color
:
rgba
(
255
,
35
,
0
,
0.69
);
font-size
:
16px
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.1
);}
._layer-wt
{
pdding
:
15px
0px
;
color
:
#908d8d
;
font-size
:
16px
;}
</style
>
<div
class=
"_hide_box_h5"
style=
"display: none;"
></div>
<div
id=
"_ts_box_h5"
style=
"display: none;"
>
<div
class=
"_box_hd"
>
请确认微信支付是否完成
</div>
<div
id=
"_layer-content"
>
已完成支付
</div>
<div
class=
"_layer-wt"
><a
href=
"{:U('course/PayVideo/index',['vst'=>$_GET['vst']])}"
>
支付遇到问题,联系客服
</a></div>
</div>
</if>
</if>
<script>
<script>
$
(
function
(){
$
(
function
(){
$
(
".df_pay-style dd:last-child"
).
children
(
"i"
).
css
(
"border"
,
"1px solid #ededed"
);
$
(
".df_pay-style dd:last-child"
).
children
(
"i"
).
css
(
"border"
,
"1px solid #ededed"
);
$
(
".df_pay-style dd"
).
on
(
"click"
,
function
(){
$
(
".df_pay-style dd"
).
on
(
"click"
,
function
(){
$
(
this
).
children
(
"i"
).
attr
(
"class"
,
"icon icon-xuanze"
).
css
(
"border"
,
"1px solid transparent"
).
parent
().
siblings
().
children
(
"i"
).
removeAttr
(
"class"
,
"icon icon-xuanze"
).
css
(
"border"
,
"1px solid #ededed"
);
$
(
this
).
children
(
"i"
).
attr
(
"class"
,
"icon icon-xuanze"
).
css
(
"border"
,
"1px solid transparent"
).
parent
().
siblings
().
children
(
"i"
).
removeAttr
(
"class"
,
"icon icon-xuanze"
).
css
(
"border"
,
"1px solid #ededed"
);
});
});
$
(
".df_pay-protocol i"
).
on
(
"click"
,
function
(){
$
(
".df_pay-protocol i"
).
on
(
"click"
,
function
(){
var
proVal
=
$
(
this
).
attr
(
"attr"
);
var
proVal
=
$
(
this
).
attr
(
"attr"
);
if
(
proVal
==
1
){
if
(
proVal
==
1
){
$
(
this
).
attr
(
"attr"
,
"0"
).
css
(
"color"
,
"#656565"
);
$
(
this
).
attr
(
"attr"
,
"0"
).
css
(
"color"
,
"#656565"
);
}
else
{
}
else
{
$
(
this
).
attr
(
"attr"
,
"1"
).
css
(
"color"
,
"#57BC4C"
)
$
(
this
).
attr
(
"attr"
,
"1"
).
css
(
"color"
,
"#57BC4C"
)
}
}
});
});
})
})
'<if condition="$is_wx eq false">'
'<if condition="$is_wx eq false">'
$
(
function
(){
$
(
function
(){
var
wpay
=
"{$_GET['wpay']}"
;
var
wpay
=
"{$_GET['wpay']}"
;
var
ppn
=
"{$_GET['ppn']}"
;
var
ppn
=
"{$_GET['ppn']}"
;
if
(
wpay
!=
''
){
if
(
wpay
!=
''
){
$
(
'._hide_box_h5,#_ts_box_h5'
).
show
();
$
(
'._hide_box_h5,#_ts_box_h5'
).
show
();
$
(
'#_layer-content'
).
click
(
function
(){
$
(
'#_layer-content'
).
click
(
function
(){
$
(
'._hide_box_h5,#_ts_box_h5'
).
hide
();
$
(
'._hide_box_h5,#_ts_box_h5'
).
hide
();
s
=
setInterval
(
function
(){
s
=
setInterval
(
function
(){
$
.
ajax
({
$
.
ajax
({
url
:
"{:U('course/PayVideo/getPayStatus')}"
,
url
:
"{:U('course/PayVideo/getPayStatus')}"
,
data
:{
pay_pass_num
:
ppn
},
data
:{
pay_pass_num
:
ppn
},
type
:
'post'
,
type
:
'post'
,
success
:
function
(
res
){
success
:
function
(
res
){
try
{
try
{
res
=
JSON
.
parse
(
res
);
res
=
JSON
.
parse
(
res
);
if
(
res
.
status
==
1
){
if
(
res
.
status
==
1
){
clearInterval
(
s
);
clearInterval
(
s
);
ui
.
success
(
'购买成功'
);
ui
.
success
(
'购买成功'
);
setTimeout
(
function
(){
setTimeout
(
function
(){
window
.
location
.
href
=
res
.
data
;
window
.
location
.
href
=
res
.
data
;
},
2000
);
},
2000
);
}
}
}
catch
(
e
){
}
catch
(
e
){
return
;
return
;
}
}
}
}
});
});
},
1800
);
},
1800
);
});
});
}
}
});
});
'</if>'
'</if>'
$
(
function
(){
$
(
function
(){
// var id = '{$coupon.id}';
// var id = '{$coupon.id}';
// var price = '{$moner_data.price}';
// var price = '{$moner_data.price}';
// // console.log(price);
// // console.log(price);
// $.ajax({
// $.ajax({
// type:"POST",
// type:"POST",
// url:"{:U('course/PayVideo/getCouponInfo')}",
// url:"{:U('course/PayVideo/getCouponInfo')}",
// data:{id:id},
// data:{id:id},
// dataType:"json",
// dataType:"json",
// success:function(data){
// success:function(data){
// if(data){
// if(data){
// buyvCoupon(data.coupon_id,data.cuid,data.type,price);
// buyvCoupon(data.coupon_id,data.cuid,data.type,price);
// }else{
// }else{
// return false;
// return false;
// }
// }
// }
// }
// });
// });
//支付方式选择
//支付方式选择
$
(
'.paytype'
).
click
(
function
(){
$
(
'.paytype'
).
click
(
function
(){
var
pay
=
$
(
this
).
attr
(
'value'
);
var
pay
=
$
(
this
).
attr
(
'value'
);
$
(
'input:hidden[name="pay"]'
).
val
(
pay
);
$
(
'input:hidden[name="pay"]'
).
val
(
pay
);
});
});
// $(".hide_box").fadeToggle();
// $(".hide_box").fadeToggle();
// $(".shang_box").fadeToggle();
// $(".shang_box").fadeToggle();
});
});
function
buyvCoupon
(
cid
,
coupon_id
,
discount_type
)
{
function
buyvCoupon
(
cid
,
coupon_id
,
discount_type
)
{
if
(
MID
<=
0
){
if
(
MID
<=
0
){
ui
.
confirm
(
'请先登录'
,
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
yes
:
function
()
{
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
}
}
});
});
return
false
;
return
false
;
}
}
if
(
!
cid
||
!
coupon_id
||
!
discount_type
){
if
(
!
cid
||
!
coupon_id
||
!
discount_type
){
ui
.
error
(
'参数错误'
);
ui
.
error
(
'参数错误'
);
return
false
;
return
false
;
}
}
var
price
=
$
(
'#pay_money_val'
).
val
();
var
price
=
$
(
'#pay_money_val'
).
val
();
if
(
price
<=
0
){
if
(
price
<=
0
){
ui
.
error
(
'该课程不需要您购买'
);
ui
.
error
(
'该课程不需要您购买'
);
return
false
;
return
false
;
}
}
$
(
'#coupon_id'
).
val
(
coupon_id
);
$
(
'#coupon_id'
).
val
(
coupon_id
);
$
.
post
(
U
(
"course/PayVideo/checkCoupon"
),{
cid
:
cid
,
coupon_id
:
coupon_id
,
discount_type
:
discount_type
,
price
:
price
},
function
(
e
){
$
.
post
(
U
(
"course/PayVideo/checkCoupon"
),{
cid
:
cid
,
coupon_id
:
coupon_id
,
discount_type
:
discount_type
,
price
:
price
},
function
(
e
){
if
(
e
.
status
==
1
){
if
(
e
.
status
==
1
){
// $('#cod_money1').text("-¥"+e.data.minus_price);
// $('#cod_money1').text("-¥"+e.data.minus_price);
// $('#cod_money2').text("¥"+e.data.minus_price);
// $('#cod_money2').text("¥"+e.data.minus_price);
// $('#pay_money').text("¥"+e.data.after_price);
// $('#pay_money').text("¥"+e.data.after_price);
// $('#pay_money2').text("¥"+e.data.after_price);
// $('#pay_money2').text("¥"+e.data.after_price);
// $('#pay_money_val').val(e.data.after_price);
// $('#pay_money_val').val(e.data.after_price);
// ui.success(e.info);
// ui.success(e.info);
$
(
'.removeUse'
).
show
();
$
(
'.removeUse'
).
show
();
}
else
{
}
else
{
ui
.
error
(
e
.
info
);
ui
.
error
(
e
.
info
);
}
}
},
'json'
);
},
'json'
);
}
}
//取消使用
//取消使用
function
removeUse
(
sid
){
function
removeUse
(
sid
){
var
code
=
$
(
"input[name='card']"
).
val
();
var
code
=
$
(
"input[name='card']"
).
val
();
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
"{:U('course/PayVideo/cancelExchangeCard')}"
,
url
:
"{:U('course/PayVideo/cancelExchangeCard')}"
,
data
:{
code
:
code
,
mhm_id
:
sid
},
data
:{
code
:
code
,
mhm_id
:
sid
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
){
success
:
function
(
data
){
if
(
data
.
status
==
1
){
if
(
data
.
status
==
1
){
ui
.
success
(
data
.
info
);
ui
.
success
(
data
.
info
);
setTimeout
(
'window.location.reload()'
,
500
);
setTimeout
(
'window.location.reload()'
,
500
);
}
else
{
}
else
{
ui
.
error
(
data
.
info
);
ui
.
error
(
data
.
info
);
return
false
;
return
false
;
}
}
}
}
});
});
}
}
/**
/**
* 删除字符串str的首尾空格
* 删除字符串str的首尾空格
* @name trim
* @name trim
* @grammar UM.utils.trim(str) => String
* @grammar UM.utils.trim(str) => String
*/
*/
var
trim
=
function
(
str
)
{
var
trim
=
function
(
str
)
{
return
str
.
replace
(
/
(
^
[
\t\n\r]
+
)
|
([
\t\n\r]
+$
)
/g
,
''
);
return
str
.
replace
(
/
(
^
[
\t\n\r]
+
)
|
([
\t\n\r]
+$
)
/g
,
''
);
}
}
//购买操作
//购买操作
var
buyOperat
=
function
(
sbt
,
vid
,
type
){
var
buyOperat
=
function
(
sbt
,
vid
,
type
){
if
(
MID
<=
0
){
if
(
MID
<=
0
){
ui
.
confirm
(
'请先登录'
,
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
yes
:
function
()
{
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
}
}
});
});
return
false
;
return
false
;
}
}
if
(
!
vid
||
!
type
){
if
(
!
vid
||
!
type
){
ui
.
error
(
'参数错误'
);
ui
.
error
(
'参数错误'
);
return
false
;
return
false
;
}
}
if
(
$
(
'.df_pay-protocol i.icon-xuanze'
).
attr
(
'attr'
)
!=
'1'
){
if
(
$
(
'.df_pay-protocol i.icon-xuanze'
).
attr
(
'attr'
)
!=
'1'
){
ui
.
error
(
"购买必须同意《{$site['site_keyword']}购买协议》"
);
ui
.
error
(
"购买必须同意《{$site['site_keyword']}购买协议》"
);
return
false
;
return
false
;
}
}
var
form
=
$
(
'#pay_video_form'
);
var
form
=
$
(
'#pay_video_form'
);
var
pay
=
$
(
'input:hidden[name="pay"]'
).
val
();
var
pay
=
$
(
'input:hidden[name="pay"]'
).
val
();
var
money
=
$
(
'input:hidden[name="money"]'
).
val
();
var
money
=
$
(
'input:hidden[name="money"]'
).
val
();
if
(
pay
!=
'alipay'
&&
pay
!=
'unionpay'
&&
pay
!=
'wxpay'
&&
pay
!=
'lcnpay'
){
if
(
pay
!=
'alipay'
&&
pay
!=
'unionpay'
&&
pay
!=
'wxpay'
&&
pay
!=
'lcnpay'
){
ui
.
error
(
'支付方式错误'
);
ui
.
error
(
'支付方式错误'
);
return
false
;
return
false
;
}
}
if
(
money
<=
0
){
if
(
money
<=
0
){
ui
.
error
(
'该课程不需要您购买'
);
ui
.
error
(
'该课程不需要您购买'
);
return
false
;
return
false
;
}
}
$
(
sbt
).
attr
(
'style'
,
'background:rgba(102, 102, 102, 0.65)'
).
removeAttr
(
'onclick'
);
$
(
sbt
).
attr
(
'style'
,
'background:rgba(102, 102, 102, 0.65)'
).
removeAttr
(
'onclick'
);
setTimeout
(
function
(){
setTimeout
(
function
(){
$
.
post
(
U
(
"course/PayVideo/checkPayOperat"
),
form
.
serialize
(),
function
(
data
){
$
.
post
(
U
(
"course/PayVideo/checkPayOperat"
),
form
.
serialize
(),
function
(
data
){
if
(
data
.
status
==
1
){
if
(
data
.
status
==
1
){
$
(
sbt
).
attr
(
"onclick"
,
"buyOperat(this,'{$id}','video')"
).
removeAttr
(
'style'
);
$
(
sbt
).
attr
(
"onclick"
,
"buyOperat(this,'{$id}','video')"
).
removeAttr
(
'style'
);
if
(
pay
==
'wxpay'
){
if
(
pay
==
'wxpay'
){
$
.
ajax
({
$
.
ajax
({
url
:
"{:U('course/PayVideo/payLibrary')}"
,
url
:
"{:U('course/PayVideo/payLibrary')}"
,
data
:
form
.
serialize
(),
data
:
form
.
serialize
(),
async
:
false
,
async
:
false
,
type
:
'post'
,
type
:
'post'
,
success
:
function
(
data
){
success
:
function
(
data
){
if
(
typeof
data
!=
'object'
){
if
(
typeof
data
!=
'object'
){
var
data
=
eval
(
'('
+
data
+
')'
);
var
data
=
eval
(
'('
+
data
+
')'
);
}
}
if
(
data
.
status
==
1
){
if
(
data
.
status
==
1
){
var
pay_pass_num
=
data
.
data
.
pay_pass_num
;
var
pay_pass_num
=
data
.
data
.
pay_pass_num
;
'<if condition="$is_wx">'
'<if condition="$is_wx">'
WeixinJSBridge
.
invoke
(
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
JSON
.
parse
(
data
.
data
.
html
),
'getBrandWCPayRequest'
,
JSON
.
parse
(
data
.
data
.
html
),
function
(
res
){
function
(
res
){
if
(
res
.
err_msg
==
"get_brand_wcpay_request:ok"
){
if
(
res
.
err_msg
==
"get_brand_wcpay_request:ok"
){
s
=
setInterval
(
function
(){
s
=
setInterval
(
function
(){
$
.
ajax
({
$
.
ajax
({
url
:
"{:U('course/PayVideo/getPayStatus')}"
,
url
:
"{:U('course/PayVideo/getPayStatus')}"
,
data
:{
pay_pass_num
:
pay_pass_num
},
data
:{
pay_pass_num
:
pay_pass_num
},
type
:
'post'
,
type
:
'post'
,
success
:
function
(
res
){
success
:
function
(
res
){
try
{
try
{
res
=
JSON
.
parse
(
res
);
res
=
JSON
.
parse
(
res
);
if
(
res
.
status
==
1
){
if
(
res
.
status
==
1
){
clearInterval
(
s
);
clearInterval
(
s
);
ui
.
success
(
'购买成功'
);
ui
.
success
(
'购买成功'
);
setTimeout
(
function
(){
setTimeout
(
function
(){
window
.
location
.
href
=
res
.
data
;
window
.
location
.
href
=
res
.
data
;
},
1500
);
},
1500
);
}
}
}
catch
(
e
){
}
catch
(
e
){
return
;
return
;
}
}
}
}
});
});
},
1800
);
},
1800
);
}
}
}
}
);
);
'<else/>'
'<else/>'
var
a
=
document
.
createElement
(
'a'
);
var
a
=
document
.
createElement
(
'a'
);
a
.
href
=
data
.
data
.
html
;
a
.
href
=
data
.
data
.
html
;
a
.
click
();
a
.
click
();
return
false
;
return
false
;
'</if>'
'</if>'
}
else
{
}
else
{
ui
.
error
(
data
.
data
);
ui
.
error
(
data
.
data
);
setTimeout
(
function
(){
setTimeout
(
function
(){
window
.
location
.
href
=
window
.
location
.
href
;
window
.
location
.
href
=
window
.
location
.
href
;
},
1500
);
},
1500
);
}
}
},
},
error
:
function
(){
error
:
function
(){
return
false
return
false
}
}
});
});
}
else
if
(
pay
==
'lcnpay'
){
}
else
if
(
pay
==
'lcnpay'
){
$
.
post
(
U
(
"course/PayVideo/payLibrary"
),
$
(
'#pay_video_form'
).
serialize
(),
function
(
res
){
$
.
post
(
U
(
"course/PayVideo/payLibrary"
),
$
(
'#pay_video_form'
).
serialize
(),
function
(
res
){
res
=
JSON
.
parse
(
res
);
res
=
JSON
.
parse
(
res
);
if
(
res
.
status
==
1
){
if
(
res
.
status
==
1
){
ui
.
success
(
res
.
info
);
ui
.
success
(
res
.
info
);
setTimeout
(
function
(){
setTimeout
(
function
(){
window
.
location
.
href
=
res
.
data
;
window
.
location
.
href
=
res
.
data
;
},
2000
);
},
2000
);
}
else
{
}
else
{
ui
.
error
(
res
.
info
);
ui
.
error
(
res
.
info
);
return
false
return
false
}
}
});
});
}
else
{
}
else
{
$
(
".buyOperating"
).
hide
();
$
(
".buyOperating"
).
hide
();
$
(
".mask"
).
hide
();
$
(
".mask"
).
hide
();
$
(
"#charge"
).
attr
(
'id'
,
''
);
$
(
"#charge"
).
attr
(
'id'
,
''
);
setTimeout
(
""
,
3000
);
setTimeout
(
""
,
3000
);
form
.
submit
();
form
.
submit
();
}
}
}
else
if
(
data
.
status
==
9
){
}
else
if
(
data
.
status
==
9
){
ui
.
error
(
data
.
info
);
ui
.
error
(
data
.
info
);
window
.
location
.
reload
();
window
.
location
.
reload
();
}
else
{
}
else
{
var
time
=
15
;
var
time
=
15
;
var
_codesetInterval
=
setInterval
(
function
(){
var
_codesetInterval
=
setInterval
(
function
(){
if
(
time
<=
0
){
if
(
time
<=
0
){
$
(
sbt
).
attr
(
"onclick"
,
"buyOperat(this,'{$id}','video')"
).
removeAttr
(
'style'
);
$
(
sbt
).
attr
(
"onclick"
,
"buyOperat(this,'{$id}','video')"
).
removeAttr
(
'style'
);
clearInterval
(
_codesetInterval
);
clearInterval
(
_codesetInterval
);
}
else
{
}
else
{
$
(
sbt
).
attr
(
'style'
,
'background:rgba(102, 102, 102, 0.65)'
).
removeAttr
(
'onclick'
);
$
(
sbt
).
attr
(
'style'
,
'background:rgba(102, 102, 102, 0.65)'
).
removeAttr
(
'onclick'
);
time
--
;
time
--
;
}
}
},
1000
);
},
1000
);
ui
.
error
(
data
.
info
);
ui
.
error
(
data
.
info
);
return
false
;
return
false
;
}
}
},
'json'
);
},
'json'
);
},
1000
);
},
1000
);
}
}
</script>
</script>
<include
file=
"__THEME__/public_footer_w3g"
/>
<include
file=
"__THEME__/public_footer_w3g"
/>
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