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
a5b7c22e
Commit
a5b7c22e
authored
May 19, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A
parent
c9ee5288
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
132 additions
and
324 deletions
+132
-324
apps/exams/Tpl/default/Index/pay_w3g.html
+107
-226
apps/news/Tpl/default/Topic/index_w3g.html
+25
-98
No files found.
apps/exams/Tpl/default/Index/pay_w3g.html
View file @
a5b7c22e
<include
file=
"__THEME__/public_header_w3g"
/>
<include
file=
"__THEME__/public_header_w3g"
/>
<
link
href=
"__APP__/css/pay_video_3g.css"
rel=
"stylesheet"
>
<
style
>
<div
class=
"body"
>
body
{
<div
class=
"wrap"
>
padding
:
0
!important
;
<div
class=
"min-height-wrap"
>
}
<div
class=
"class_order_tit"
>
确认订单
</div>
<!--商品信息-->
<dl
class=
"df_course-info"
>
<dt><h3>
试卷信息
</h3></dt>
<dd>
<a
href=
"{:U('exams/Index/paper',['c'=>0,'module_id'=>$exams_module_id])}"
>
<h3>
{:mStr($exams_paper_title,20)}
</h3>
</a>
</dd>
</dl>
<!--支付方式-->
<dl
class=
"df_pay-style"
>
<dt><h3>
支付方式
</h3></dt>
<php>
if($is_wx){unset($payWay['支付宝支付']);}$firstPayWay = current($payWay);
</php>
<if
condition=
"in_array('alipay',$payConfig) and ($is_wx eq false)"
>
<dd
value=
"alipay"
class=
"paytype"
><a
class=
"icon icon-zhifubao1"
></a><span
class=
"name"
>
支付宝
</span><i
<
if
condition=
'($firstPayWay eq alipay)'
>
class="icon icon-xuanze"
</if>
>
</i></dd>
</if>
<if
condition=
"in_array('wxpay',$payConfig)"
>
<dd
value=
"wxpay"
class=
"paytype"
><a
class=
"icon icon-weixinzhifu1"
></a><span
class=
"name"
>
微信支付
</span><i
<
if
condition=
'$is_wx or $firstPayWay eq wxpay '
>
class="icon icon-xuanze"
</if>
style="border: 1px solid rgb(237, 237, 237);">
</i></dd>
</if>
<if
condition=
"in_array('lcnpay',$payConfig)"
>
<dd
value=
"lcnpay"
class=
"paytype"
><a
class=
"icon icon-qianbao"
></a><span
class=
"name"
>
余额支付(¥{$account_balance|default=0})
</span><i
<
if
condition=
'($firstPayWay eq lcnpay)'
>
class="icon icon-xuanze"
</if>
>
</i></dd>
</if>
</dl>
<!--实付金额-->
</style>
<dl
class=
"df_pay-price"
>
<dd><h3>
实付金额
</h3><p
id=
"pay_money"
>
¥{$price}
</p></dt>
</dl>
<!--购买协议-->
<div
id=
"app"
>
<div
class=
"df_pay-protocol"
>
<div
class=
"layout_v"
>
<p><i
class=
"icon icon-xuanze"
attr=
"1"
></i>
我已阅读并同意
<a
href=
"{:U('basic/Single/info',array('id'=>'buy'))}"
>
《{$site['site_keyword']}购买协议》
</a></p>
<div
class=
"pay_course_info layout_h"
>
<van-image
src=
"{:getCover($cover,220,130)}"
fit=
"cover"
width=
"120"
height=
"68"
></van-image>
<div
class=
"layout_v"
style=
"margin-left: 0.75rem;"
>
<span
class=
"text_14_600 color_333333"
>
{:mStr($exams_paper_title,20)}
</span>
<span
class=
"text_14_600 color_FF3B3B"
style=
"margin-top: 0.5rem;"
>
¥{$price}
</span>
</div>
</div>
<!--提交订单-->
<div
class=
"df_pay-buy"
>
<h3>
合计:
<strong
id=
"pay_money2"
>
¥{$price}
</strong></h3>
<a
href=
"javascript:;"
onclick=
"buyOperat(this,{$exams_paper_id});"
type=
"submit"
>
提交
</a>
</div>
</div>
<form
action=
"{:U('course/PayVideo/payLibraryExams')}"
method=
"POST"
id=
"buyfrom"
>
<div
class=
"normal_gap"
></div>
<input
type=
"hidden"
value=
"{$exams_paper_id}"
name=
"paper_id"
/>
<div
class=
"layout_v pay_course_bottom"
>
<input
type=
"hidden"
value=
"{$_SESSION['mid']}"
name=
"mid"
/>
<span
class=
"text_16_600 color_333333"
style=
"margin-bottom: 0.75rem;"
>
选择支付方式
</span>
<input
type=
"hidden"
value=
"{$price}"
name=
"money"
/>
<div
class=
"layout_h_b"
>
<if
condition=
"$is_wx and in_array('wxpay',$payConfig['pay'])"
>
<div
class=
"layout_h_v_c"
>
<input
type=
"hidden"
value=
"wxpay"
name=
"pay"
/>
<van-image
height=
"28"
width=
"28"
fit=
"cover"
src=
"__THEME__/img/weichat_logo.png"
></van-image>
<else/>
<span
class=
"text_14_400 color_333333"
style=
"margin-left: 0.75rem;"
>
微信
</span>
<volist
name=
"payWay"
id=
"vo"
offset=
"0"
length=
"1"
>
<input
type=
"hidden"
value=
"{$vo}"
name=
"pay"
/>
</volist>
</if>
<input
type=
"hidden"
value=
"{$_GET['vst']}"
name=
"vst"
/>
</form>
</div>
</div>
<van-icon
class=
"self_center"
name=
"__THEME__/img/picker_y@3x.png"
size=
"20"
></van-icon>
</div>
</div>
</div>
<if
condition=
"$is_wx eq false"
>
<style>
#_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
;}
._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
;}
#_ts_box_h5
._box_hd
{
padding
:
20px
0px
;
color
:
black
;
font-size
:
16px
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.16
);}
#_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
);}
._layer-wt
{
padding
:
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('exams/Index/pay',['vst'=>$_GET['vst']])}"
>
支付遇到问题,联系客服
</a></div>
</div>
</div>
</if>
<div
class=
"divider"
></div>
<div
style=
"margin: 1.5rem 0.75rem;"
class=
"layout_h_v_c"
>
<van-icon
@
click=
"agree = !agree"
size=
"22"
:name=
"agree ? '__THEME__/img/picker_y@3x.png' : '__THEME__/img/unpicker.png'"
style=
"margin-right: 0.5rem;"
></van-icon>
我已阅读并同意
<a
href=
"{:U('basic/Single/info',array('id'=>'buy'))}"
><span
class=
"color_primary"
>
《{$site['site_keyword']}购买协议》
</span></a>
</div>
</div>
<div
class=
"layout_h_v_c fixed_bottom_bar"
>
<span
class=
"text_14_600 color_333333"
style=
"margin-right: 0.5rem;"
>
合计
</span>
<span
class=
"text_14_600 color_FF3B3B"
>
¥{$price}
</span>
<div
class=
"weight_full layout_h_r"
>
<div
@
click=
"onBuy({$id}, 'video')"
class=
"vip_buy_pay_button layout_center"
><span
class=
"text_14_400 color_white"
>
确认支付
</span></div>
</div>
</div>
</div>
<script>
<script>
new
Vue
({
el
:
"#app"
,
$
(
function
(){
data
:
function
()
{
$
(
".df_pay-style dd:last-child"
).
children
(
"i"
).
css
(
"border"
,
"1px solid #ededed"
);
return
{
$
(
".df_pay-style dd"
).
on
(
"click"
,
function
(){
agree
:
false
,
var
val
=
$
(
this
).
attr
(
'value'
);
info
:
{}
$
(
'input:hidden[name="pay"]'
).
val
(
val
);
$
(
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
(){
var
proVal
=
$
(
this
).
attr
(
"attr"
);
if
(
proVal
==
1
){
$
(
this
).
attr
(
"attr"
,
"0"
).
css
(
"color"
,
"#656565"
);
}
else
{
$
(
this
).
attr
(
"attr"
,
"1"
).
css
(
"color"
,
"#57BC4C"
)
}
}
});
},
})
created
:
function
(){
'<if condition="$is_wx eq false">'
$
(
function
(){
var
wpay
=
"{$_GET['wpay']}"
;
var
ppn
=
"{$_GET['ppn']}"
;
if
(
wpay
!=
''
){
$
(
'._hide_box_h5,#_ts_box_h5'
).
show
();
$
(
'#_layer-content'
).
click
(
function
(){
$
(
'._hide_box_h5,#_ts_box_h5'
).
hide
();
s
=
setInterval
(
function
(){
$
.
ajax
({
url
:
"{:U('course/PayVideo/getPayStatus')}"
,
data
:{
pay_pass_num
:
ppn
},
type
:
'post'
,
success
:
function
(
res
){
try
{
res
=
JSON
.
parse
(
res
);
if
(
res
.
status
==
1
){
clearInterval
(
s
);
ui
.
success
(
'购买成功'
);
setTimeout
(
function
(){
window
.
location
.
href
=
res
.
data
;
},
2000
);
}
}
catch
(
e
){
return
;
}
}
});
},
1800
);
});
}
});
'</if>'
//购买操作
},
var
buyOperat
=
function
(
sbt
,
gid
){
computed
:
{
if
(
MID
<=
0
){
totalPrice
:
function
()
{
ui
.
confirm
(
'请先登录'
,
{
return
"{$price}"
yes
:
function
()
{
},
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
discount
:
function
()
{
}
return
"(已优惠:¥0)"
});
return
false
;
}
if
(
!
gid
){
ui
.
error
(
'参数错误'
);
return
false
;
}
}
},
if
(
$
(
'.df_pay-protocol i.icon-xuanze'
).
attr
(
'attr'
)
!=
'1'
){
methods
:
{
ui
.
error
(
"购买必须同意《{$site['site_keyword']}购买协议》"
);
onBuy
:
function
(
id
,
type
)
{
return
false
;
let
that
=
this
if
(
that
.
agree
)
{
$
.
post
(
U
(
"course/PayVideo/checkPayOperat"
),
{
check_type
:
'{$pay_video_type}'
,
mid
:
MID
,
vid
:
id
,
pay
:
"wxpay"
,
money
:
"{$moner_data['oriPrice']}"
,
},
function
(
data
)
{
let
res
=
JSON
.
parse
(
data
)
if
(
res
.
status
==
1
)
{
that
.
startWxPay
(
id
)
}
else
{
ui
.
error
(
res
.
info
)
}
}
var
form
=
$
(
sbt
).
parents
(
'form'
);
})
var
pay
=
$
(
'input:hidden[name="pay"]'
).
val
();
}
else
{
ui
.
error
(
'请阅读并同意购买协议'
)
if
(
pay
!=
'alipay'
&&
pay
!=
'wxpay'
&&
pay
!=
'lcnpay'
){
ui
.
error
(
'支付方式错误'
);
return
false
;
}
}
},
$
(
sbt
).
attr
(
'style'
,
'background:rgba(102, 102, 102, 0.65)'
).
removeAttr
(
'onclick'
);
startWxPay
:
function
(
id
)
{
if
(
pay
==
'wxpay'
){
var
s
=
0
;
$
.
ajax
({
$
.
ajax
({
url
:
"{:U('course/PayVideo/payLibraryExams')}"
,
url
:
"{:U('course/PayVideo/payLibrary')}"
,
data
:
$
(
'#buyfrom'
).
serialize
(),
data
:{
check_type
:
'{$pay_video_type}'
,
mid
:
MID
,
vid
:
id
,
pay
:
"wxpay"
,
money
:
"{$moner_data['oriPrice']}"
,
},
async
:
false
,
async
:
false
,
type
:
'post'
,
type
:
'post'
,
success
:
function
(
data
){
success
:
function
(
data
){
if
(
typeof
data
!=
'object'
){
let
res
=
JSON
.
parse
(
data
)
var
data
=
eval
(
'('
+
data
+
')'
);
if
(
res
.
status
==
1
)
{
}
else
{
ui
.
error
(
res
.
data
)
}
}
clearInterval
(
s
);
}})
if
(
data
.
status
==
1
){
},
var
pay_pass_num
=
data
.
data
.
pay_pass_num
;
checkPayStatus
:
function
(
num
)
{
'<if condition="$is_wx">'
let
that
=
this
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
JSON
.
parse
(
data
.
data
.
html
),
function
(
res
){
if
(
res
.
err_msg
==
"get_brand_wcpay_request:ok"
){
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
:
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
);
ui
.
success
(
'购买成功'
)
ui
.
success
(
'购买成功'
);
setTimeout
(
function
(){
window
.
location
.
href
=
res
.
data
;
},
1500
);
}
}
catch
(
e
){
return
;
}
}
});
},
1800
);
}
}
);
'<else/>'
var
a
=
document
.
createElement
(
'a'
);
a
.
href
=
data
.
data
.
html
;
a
.
click
();
return
false
;
'</if>'
}
else
{
ui
.
error
(
data
.
data
);
setTimeout
(
function
(){
setTimeout
(
function
(){
window
.
location
.
href
=
window
.
location
.
href
;
window
.
location
.
href
=
res
.
data
},
1500
);
},
1500
)
}
},
error
:
function
(){
return
false
}
});
}
else
{
if
(
pay
==
'alipay'
){
$
(
"#buyfrom"
).
submit
();
}
else
{
var
url
=
"{:U('course/PayVideo/payLibraryExams')}"
;
}
$
.
ajax
({
type
:
"POST"
,
url
:
url
,
data
:
$
(
'#buyfrom'
).
serialize
(),
dataType
:
"json"
,
success
:
function
(
res
){
var
res
=
getResponseData
(
res
);
if
(
res
.
status
==
1
)
{
ui
.
success
(
res
.
info
);
setTimeout
(
function
()
{
window
.
location
.
href
=
res
.
data
;
},
2000
);
}
else
{
}
else
{
ui
.
error
(
res
.
info
);
setTimeout
(
()
=>
{
that
.
checkPayStatus
(
num
)
},
1000
)
return
false
}
}
catch
(
e
){
return
}
}
}
}
});
})
}
}
}
}
})
</script>
</script>
<include
file=
"__THEME__/public_footer_w3g"
/>
<include
file=
"__THEME__/public_footer_w3g"
/>
apps/news/Tpl/default/Topic/index_w3g.html
View file @
a5b7c22e
<include
file=
"__THEME__/public_header_w3g"
/>
<include
file=
"__THEME__/public_header_w3g"
/>
<style>
<style>
.info
{
line-height
:
20px
;}
body
{
.info
i
{
transform
:
translateY
(
2px
);
font-size
:
18px
;
padding-right
:
5px
;}
padding
:
0
!important
;
.newslist
h3
{
min-height
:
40px
;
}
}
</style>
</style>
<div
class=
"min-height-wrap"
>
<div
id=
"app"
>
<!--content start-->
<van-sticky>
<div
class=
"body"
>
<div
class=
"tabs_container"
>
<div
id=
"slideBox"
class=
"slideBox"
>
<div
@
click=
"onChange(idx)"
v-for=
"(tab, idx) in options"
:key=
"idx"
:class=
"idx == tab ? 'tab_item_selected' : 'tab_item_normal'"
>
<div
class=
"bd"
>
<span>
{{tab.title}}
</span>
<ul>
<volist
name=
"ad_list"
id=
"vo"
offset=
"0"
length=
"5"
>
<li>
<a
target=
"_blank"
href=
"{$vo.bannerurl}"
>
<img
src=
"{:getCover($vo['banner'],640,320)}"
title=
"{$vo.banner_title}"
alt=
"{$vo.banner_title}"
class=
"lazyloading"
/>
</a>
</li>
</volist>
</ul>
</div>
<div
class=
"hd"
>
<ul></ul>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
// TouchSlide({
// slideCell:"#slideBox",
// titCell:".hd ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
// mainCell:".bd ul",
// effect:"leftLoop",
// autoPage:true,//自动分页
// autoPlay:true //自动播放
// });
</script>
<ul
class=
"newsnav"
>
<li><a
href=
"{:U('news/Topic/index')}"
<
if
condition=
"$_GET['cate'] eq ''"
>
style="color: #00BED4;"
</if>
>全部资讯
</a></li>
<volist
name=
"cate"
id=
"vo"
>
<li><a
href=
"{:U('news/Topic/index',['cate'=>$vo['zy_topic_category_id']])}"
<
if
condition=
"$_GET['cate'] eq $vo['zy_topic_category_id']"
>
style="color: #00BED4;border-bottom: 2px solid #00BED4;"
</if>
>{:t($vo['title'])}
</a></li>
</volist>
</ul>
<!--<div class="searchdiv"><if condition="$cate_name_one">在“<span>{$cate_name_one}</span>”分类下,</if>找到{$topic_data.count}条资讯</div>-->
<ul
class=
"newslist more_newslist"
>
<volist
name=
"topic_data.data"
id=
"vo"
>
<li><a
href=
"{:U('news/Topic/view',array('id'=>$vo['id']))}"
>
<img
src=
"{:getCover($vo['image'],150,90)}"
/>
<h3>
{$vo.title|mStr=###,'25'}
</h3>
<!-- <p>{$vo.desc|mStr=###,'85'}</p> -->
<div
class=
"info"
><span><i
class=
"iconfontNEW"
>

</i>
{$vo.readcount}浏览
</span><span
style=
"float:right;transform: translateY(1px)"
>
{$vo.dateline|friendlyDate}
</span></div>
</a></li>
</volist>
</ul>
</div>
</div>
<div
class=
"loadding"
>
</van-sticky>
<php>
if($topic_data['data']){
</php>
<if
condition=
"$topic_data['nowPage'] eq $topic_data['totalPages']"
>
<div>
再拉也没有了。。
</div><else/>
正在加载更多。。
</if></div>
<php>
}else{
</php>
<div>
再拉也没有了。。
</div>
<php>
}
</php>
</div>
<a
class=
"backtop"
></a>
</div>
</div>
<script>
<script>
var
p
=
1
;
$
(
window
).
scroll
(
function
()
{
//已经滚动到上面的页面高度
var
scrollTop
=
$
(
this
).
scrollTop
();
//页面高度
var
scrollHeight
=
$
(
document
).
height
();
//浏览器窗口高度
var
windowHeight
=
$
(
this
).
height
();
//此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
if
(
scrollHeight
-
(
scrollTop
+
windowHeight
)
<
60
)
{
if
(
!
p
||
p
>=
"{$topic_data['totalPages']}"
){
return
false
;
}
else
{
new
App
({
p
=
p
+
1
;
el
:
"#app"
,
ajaxBang
();
data
:
function
()
{
}
return
{
}
tab
:
0
,
});
options
:
[{
title
:
"招聘信息"
,
//请求事件
items
:
[]
function
ajaxBang
(){
},{
$
.
ajax
({
title
:
"平台公告"
,
type
:
"GET"
,
items
:
[]
url
:
"{:U('news/Topic/getTopicList')}"
,
},{
data
:
"p="
+
p
+
"&cate={$_GET['cate']}"
,
title
:
"考试信息"
,
dataType
:
"json"
,
items
:
[]
success
:
function
(
data
){
}]
appendHtml
(
data
);
}
});
}
//追加html
function
appendHtml
(
data
){
$
(
".more_newslist"
).
append
(
data
.
data
);
if
(
!
p
||
p
>=
data
.
totalPages
){
$
(
'.loadding'
).
html
(
'<div>再拉也没有了。。</div>'
)
return
false
;
}
else
{
p
=
data
.
nowPage
;
//下一页
}
}
}
}
})
</script>
</script>
<!--footer-->
<!--footer-->
...
...
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