Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
bd318ef1
Commit
bd318ef1
authored
Oct 27, 2016
by
杨培
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
bc4d47ba
8762a5aa
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
22 deletions
+116
-22
TestController.php
src/console/controllers/TestController.php
+34
-0
index.php
src/frontend/views/classes-info/index.php
+0
-3
index.php
src/frontend/views/my-course/index.php
+3
-1
main.css
src/frontend/web/css/main.css
+27
-0
course-lists.vue
src/frontend/web/js/home/components/course-lists.vue
+5
-0
video-play.vue
src/frontend/web/js/home/components/video-play.vue
+34
-16
video.vue
src/frontend/web/js/home/components/video.vue
+13
-2
No files found.
src/console/controllers/TestController.php
0 → 100644
View file @
bd318ef1
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 2016/10/27
* Time: 上午11:52
*/
namespace
console\controllers
;
use
yii\console\Controller
;
class
TestController
extends
Controller
{
public
function
actionIndex
(){
$t
=
mktime
();
set_time_limit
(
1000
);
$myFile
=
"./insert.sql"
;
$fhandler
=
fopen
(
$myFile
,
'wb'
);
if
(
$fhandler
){
$sql
=
"268
\t
2
\t
'0,262,268,'
\t
0
\t
'2342'
\t
'423423'
\t
'123123'
\t
'23423423'
\t
'2012-01-09 09:55:43'
\t
'upload/product/20111205153432_53211.jpg'
\t
'upload/product/thumb_20111205153432_53211.jpg'
\t
NULL
\t
NULL
\t
38
\t
'件'
\t
''
\t
123
\t
123
\t
0"
;
$i
=
0
;
while
(
$i
<
10
)
//1,000,000
{
$i
++
;
fwrite
(
$fhandler
,
$sql
.
"
\r\n
"
);
}
echo
"写入成功,耗时:"
,
mktime
()
-
$t
;
}
}
}
\ No newline at end of file
src/frontend/views/classes-info/index.php
View file @
bd318ef1
...
...
@@ -22,10 +22,7 @@ $this->title = '我的课堂';
<div
role=
"tabpanel"
class=
"tab-pane active"
id=
"home"
>
<div
class=
"class-name m-t-50"
>
<span
class=
"nomal-class-name"
>
<?=
$model
->
name
?>
<!-- <a href="#"><i class="icon-mode_edit"></i></a>-->
</span>
<div
class=
"edit"
><a
href=
"#"
title=
"课堂设置"
><i
class=
"icon-mode_edit"
></i></a></div>
<span
class=
"edit-class-name"
style=
"display: none"
><input
type=
"text"
class=
"input-r-control"
>
<button
class=
"btn btn-default"
>
保存
</button>
<button
class=
"btn btn-default"
>
取消
</button></span>
</div>
<div
class=
"class-intro"
>
...
...
src/frontend/views/my-course/index.php
View file @
bd318ef1
...
...
@@ -60,7 +60,9 @@ $qiniu = \Yii::$app->qiniu;
<?php
if
(
$course
[
'teachers'
])
{
?>
讲师:
<?=
join
(
', '
,
array_column
(
$course
[
'teachers'
],
'name'
))
?><?php
}
?>
</div>
<div
class=
"description"
>
<?=
mb_substr
(
strip_tags
(
$course
[
'intro'
]),
0
,
250
)
?>
</div>
<div
class=
"teacher clearfix"
><span
class=
"pull-left"
>
发布时间:2016-12-11
</span>
<span
class=
"pull-right"
>
时长:01:23:21
</span></div>
<!--<div class="description">
<?
/*= mb_substr(strip_tags($course['intro']), 0, 250) */
?>
</div>-->
<div
class=
"teacher"
>
<span>
<?=
$course
[
'play_count'
]
?>
次播放
</span>
·
...
...
src/frontend/web/css/main.css
View file @
bd318ef1
...
...
@@ -840,6 +840,7 @@ a,a:hover,a:link {
/*审核中视频样式*/
.video-main
{
position
:
relative
;
height
:
500px
;
width
:
100%
;
background-color
:
#444
;
...
...
@@ -857,4 +858,30 @@ a,a:hover,a:link {
line-height
:
1.8
;
}
.play-mask-box
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
text-align
:
center
;
background-color
:
rgba
(
0
,
0
,
0
,
.4
);
}
.look-video
{
position
:
absolute
;
left
:
0
;
width
:
100%
;
height
:
110px
;
top
:
60%
;
}
.look-video
p
{
margin-top
:
10px
;
}
.look-video
a
{
color
:
#f7b940
;
}
.vjs-big-play-centered
.vjs-big-play-button
{
z-index
:
2
!important
;
}
src/frontend/web/js/home/components/course-lists.vue
View file @
bd318ef1
...
...
@@ -16,6 +16,11 @@
<span
v-if=
"item.teachers.length > 0"
>
讲师:
{{
getTeachers
(
index
)
}}
</span>
</div>
<div
class=
"v-teacher-list clearfix"
>
<span
class=
"pull-left"
>
发布时间:2016-08-04
</span>
<span
class=
"pull-right"
>
时长:01:28:21
</span>
</div>
<div
class=
"v-foot"
>
<div
class=
"v-price"
>
<small>
¥
</small>
...
...
src/frontend/web/js/home/components/video-play.vue
View file @
bd318ef1
...
...
@@ -13,11 +13,13 @@
<a
href=
"javascript:;"
class=
"qzone post-icons bds_qzone"
data-cmd=
"qzone"
title=
"分享到QQ空间"
></a>
</div>
</div>
<myvideo
v-if=
"!coursewareInfo.isPreview"
:preview-url=
"coursewareInfo.previewUrl"
:video-url=
"coursewareInfo.videoUrl"
></myvideo>
<myvideo
v-if=
"!coursewareInfo.isPreview"
:preview-url=
"coursewareInfo.previewUrl"
:video-url=
"coursewareInfo.videoUrl"
></myvideo>
<div
v-else
class=
"video-main"
>
<div
class=
"video-empty"
style=
"height:500px; width: 100%; background-color: #444; color: #fff; text-align: center;"
>
<div
class=
"video-empty"
style=
"height:500px; width: 100%; background-color: #444; color: #fff; text-align: center;"
>
<i
class=
"icon-clock"
></i>
<p>
课程审核中,审核通过后大家才可以看到您的课程
<br
/>
<p>
课程审核中,审核通过后大家才可以看到您的课程
<br/>
审核结果将以短信形式通知您
</p>
</div>
</div>
...
...
@@ -37,13 +39,13 @@
</p>
<p v-else class="
mb
-
right
">
<a href="
javascript
:;
"><i class="
icon
-
comment
-
empty
"></i>{{coursewareInfo.comment_count
}}
</a>
<a
href="
javascript
:;
"><i
<a href="
javascript
:;
"><i
:class="
{
'icon-fav-full'
:
coursewareInfo
.
isFavorite
,
'icon-fav-empty'
:
!
coursewareInfo
.
isFavorite
}
"></i>{{coursewareInfo.favorite_count
}}
</a>
<a
href="
javascript
:;
"><i
<a href="
javascript
:;
"><i
:class="
{
'icon-zan-full'
:
coursewareInfo
.
isSupport
,
'icon-zan-empty'
:
!
coursewareInfo
.
isSupport
}
"></i>{{coursewareInfo.support_count
}}
</a>
</p>
<button v-if="
coursewareInfo
.
isPreview
"
class="
btn
btn
-
danger
m
-
l
-
20
mb
-
left
">购买
<button v-if="
coursewareInfo
.
isPreview
" class="
btn
btn
-
danger
m
-
l
-
20
mb
-
left
">购买
¥{{coursewareInfo.price
}}
</button>
<template v-else>
...
...
@@ -55,7 +57,8 @@
data-toggle="
modal
" disabled="
disabled
">已购买
</button>
<template v-else>
<button v-if="
isMobile
===
false
&&
isWeixin
===
false
" class="
btn
btn
-
danger
m
-
l
-
20
mb
-
left
"
<button id="
web
-
pay
" v-if="
isMobile
===
false
&&
isWeixin
===
false
"
class="
btn
btn
-
danger
m
-
l
-
20
mb
-
left
"
data-toggle="
modal
"
data-target="
#
pay
">购买 ¥{{coursewareInfo.price
}}
</button>
...
...
@@ -189,14 +192,14 @@
}
,
mobileAliPay(courseId){
var url = __BASE_URL__ + 'home/pay?courseId=' + courseId;
window.location.href =
url;
window.location.href = url;
}
,
weixinJsPay(courseId){
var url = __BASE_URL__ + 'weixin-js-pay/index?courseId=' + courseId;
window.location.href = url;
}
,
login(){
var returnUrl = __BASE_URL__ + 'home/video?courseId=' + this.coursewareInfo.course_id;
var returnUrl = __BASE_URL__ + 'home/video?courseId=' + this.coursewareInfo.course_id
+ '&pay=1'
;
var url = __BASE_URL__ + 'site/set-return-url?url=' + returnUrl;
$.getJSON(url, function () {
window.location.href = __BASE_URL__ + 'site/login';
...
...
@@ -251,22 +254,37 @@
}
}
,
components: {
myvideo:myvideo
myvideo:
myvideo
}
,
ready(){
var self = this;
this.isMobile = this.coursewareInfo.isMobile;
this.isWeixin = Utils.isWeixin();
//判断是否要显示支付信息
var pay = getQueryString('pay');
if (pay == 1 && !this.coursewareInfo.isShop) {
if(this.isMobile == false && this.isWeixin == false){
$('#web-pay').trigger('click');
}
else if(this.isMobile == true && this.isWeixin == false){
this.mobileAliPay(this.coursewareInfo.course_id);
}
else if(this.isWeixin === true){
this.weixinJsPay(this.coursewareInfo.course_id);
}
}
}
}
function getQueryString(name) {
var reg = new RegExp("
(
^|&
)
" + name + "
=
([
^&
]
*
)(
&|
$
)
", "
i
");
var r = window.location.search.substr(1).match(reg); //获取url中"
?
"符后的字符串并正则匹配
var context = "";
if (r != null)
context = r[2];
reg = null;
r = null;
return context == null || context == "" || context == "
undefined
" ? "" : context;
}
</script>
...
...
src/frontend/web/js/home/components/video.vue
View file @
bd318ef1
...
...
@@ -4,6 +4,17 @@
controls
preload=
"auto"
>
<source
:src=
"videoUrl"
/>
</video>
<!-- 付费视频的样式
<img
src=
"http://deimg.c.pp.cc/preview/f0/97/a3/f8s68SyefrZj3841.jpg"
width=
"100%"
height=
"auto"
>
<div
class=
"play-mask-box"
>
<div
class=
"look-video"
>
<p>
本课程为付费课程,价格¥108.00
<a
href=
"#"
>
立即购买
</a></p>
<
!
–
<p>
本课程可试看2分钟
</p>
–>
</div>
</div>
-->
</div>
</
template
>
...
...
@@ -36,11 +47,11 @@
"poster"
:
self
.
previewUrl
}).
ready
(
function
()
{
$
(
'#my-video-play'
).
css
(
'width'
,
'100%'
);
var
wVideo
=
$
(
'
.video-detail-info
'
).
width
();
var
wVideo
=
$
(
'
#my-video-play
'
).
width
();
var
hVideo
=
wVideo
*
rate
;
$
(
'#my-video-play'
).
css
(
'height'
,
hVideo
);
window
.
onresize
=
function
()
{
var
wVideo
=
$
(
'
.video-detail-info
'
).
width
();
var
wVideo
=
$
(
'
#my-video-play
'
).
width
();
var
hVideo
=
wVideo
*
rate
;
$
(
'#my-video-play'
).
css
(
'height'
,
hVideo
);
};
...
...
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