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
40e13d49
Commit
40e13d49
authored
Oct 14, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用户浏览页
parent
c00e6156
Changes
34
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1435 additions
and
350 deletions
+1435
-350
Course.php
src/common/models/Course.php
+56
-9
Courseware.php
src/common/models/Courseware.php
+5
-0
m160927_121107_course_init.php
src/console/migrations/m160927_121107_course_init.php
+0
-1
HomeController.php
src/frontend/controllers/HomeController.php
+82
-21
UserCenterController.php
src/frontend/controllers/UserCenterController.php
+11
-10
index.php
src/frontend/views/home/index.php
+6
-16
video.php
src/frontend/views/home/video.php
+109
-0
main.php
src/frontend/views/layouts/main.php
+2
-5
about.php
src/frontend/views/site/about.php
+0
-19
contact.php
src/frontend/views/site/contact.php
+0
-45
error.php
src/frontend/views/site/error.php
+13
-11
login.php
src/frontend/views/site/login.php
+42
-40
requestPasswordResetToken.php
src/frontend/views/site/requestPasswordResetToken.php
+33
-31
resetPassword.php
src/frontend/views/site/resetPassword.php
+31
-29
resetPasswordSuccess.php
src/frontend/views/site/resetPasswordSuccess.php
+26
-24
signup.php
src/frontend/views/site/signup.php
+45
-43
tokenInput.php
src/frontend/views/site/tokenInput.php
+31
-29
glyphicons-halflings-regular.eot
src/frontend/web/css/fonts/glyphicons-halflings-regular.eot
+0
-0
glyphicons-halflings-regular.svg
src/frontend/web/css/fonts/glyphicons-halflings-regular.svg
+229
-0
glyphicons-halflings-regular.ttf
src/frontend/web/css/fonts/glyphicons-halflings-regular.ttf
+0
-0
glyphicons-halflings-regular.woff
src/frontend/web/css/fonts/glyphicons-halflings-regular.woff
+0
-0
login.css
src/frontend/web/css/login.css
+1
-4
main.css
src/frontend/web/css/main.css
+454
-0
reset.css
src/frontend/web/css/reset.css
+28
-1
banner.jpg
src/frontend/web/img/banner.jpg
+0
-0
share_tit.png
src/frontend/web/img/share_tit.png
+0
-0
site.jpg
src/frontend/web/img/site.jpg
+0
-0
videobg.jpg
src/frontend/web/img/videobg.jpg
+0
-0
course-lists.vue
src/frontend/web/js/home/components/course-lists.vue
+97
-0
recommend.vue
src/frontend/web/js/home/components/recommend.vue
+71
-0
index.js
src/frontend/web/js/home/index.js
+29
-12
swiper.min.css
src/frontend/web/js/libs/swiper/swiper.min.css
+15
-0
swiper.min.js
src/frontend/web/js/libs/swiper/swiper.min.js
+18
-0
webpack.config.js
src/frontend/web/webpack.config.js
+1
-0
No files found.
src/common/models/Course.php
View file @
40e13d49
...
@@ -5,6 +5,7 @@ namespace common\models;
...
@@ -5,6 +5,7 @@ namespace common\models;
use
Yii
;
use
Yii
;
use
yii\behaviors\TimestampBehavior
;
use
yii\behaviors\TimestampBehavior
;
use
yii\helpers\HtmlPurifier
;
use
yii\helpers\HtmlPurifier
;
use
yii\redis\ActiveQuery
;
use
yii\redis\ActiveRecord
;
use
yii\redis\ActiveRecord
;
/**
/**
...
@@ -30,8 +31,11 @@ class Course extends \yii\db\ActiveRecord
...
@@ -30,8 +31,11 @@ class Course extends \yii\db\ActiveRecord
const
STATUS_OK
=
1
;
const
STATUS_OK
=
1
;
const
STATUS_FAILED
=
2
;
const
STATUS_FAILED
=
2
;
const
STATUS_LOCKED
=
3
;
const
STATUS_LOCKED
=
3
;
const
RECOMMEDN
=
1
;
const
UN_RECOMMEND
=
0
;
public
function
formName
()
{
public
function
formName
()
{
return
''
;
return
''
;
}
}
...
@@ -41,13 +45,13 @@ class Course extends \yii\db\ActiveRecord
...
@@ -41,13 +45,13 @@ class Course extends \yii\db\ActiveRecord
public
function
beforeSave
(
$insert
)
public
function
beforeSave
(
$insert
)
{
{
if
(
!
parent
::
beforeSave
(
$insert
))
{
if
(
!
parent
::
beforeSave
(
$insert
))
{
return
false
;
return
FALSE
;
}
}
$this
->
name
=
strip_tags
(
$this
->
name
);
$this
->
name
=
strip_tags
(
$this
->
name
);
$this
->
intro
=
HtmlPurifier
::
process
(
$this
->
intro
);
$this
->
intro
=
HtmlPurifier
::
process
(
$this
->
intro
);
return
true
;
return
TRUE
;
}
}
/**
/**
...
@@ -73,14 +77,14 @@ class Course extends \yii\db\ActiveRecord
...
@@ -73,14 +77,14 @@ class Course extends \yii\db\ActiveRecord
{
{
return
[
return
[
[[
'name'
,
'preview_pic'
],
'required'
],
[[
'name'
,
'preview_pic'
],
'required'
],
[
'name'
,
'string'
,
'length'
=>
[
1
,
60
]],
[
'name'
,
'string'
,
'length'
=>
[
1
,
60
]],
[[
'user_id'
,
'class_id'
],
'integer'
],
[[
'user_id'
,
'class_id'
],
'integer'
],
[
'intro'
,
'string'
],
[
'intro'
,
'string'
],
[
'price'
,
'integer'
,
'min'
=>
0
,
'max'
=>
9999
],
[
'price'
,
'integer'
,
'min'
=>
0
,
'max'
=>
9999
],
[
'free_time'
,
'integer'
,
'min'
=>
0
,
'max'
=>
15
],
[
'free_time'
,
'integer'
,
'min'
=>
0
,
'max'
=>
15
],
[
'recommend'
,
'boolean'
],
[
'recommend'
,
'boolean'
],
[
'recommend'
,
'default'
,
'value'
=>
0
],
[
'recommend'
,
'default'
,
'value'
=>
0
],
[
'status'
,
'in'
,
'range'
=>
[
0
,
1
,
2
,
3
]]
[
'status'
,
'in'
,
'range'
=>
[
0
,
1
,
2
,
3
]]
];
];
}
}
...
@@ -114,7 +118,50 @@ class Course extends \yii\db\ActiveRecord
...
@@ -114,7 +118,50 @@ class Course extends \yii\db\ActiveRecord
{
{
$query
=
self
::
find
();
$query
=
self
::
find
();
return
$query
->
select
(
'id,user_id,class_id,name,price,preview_pic,recommend,status,created_at,updated_at'
)
return
$query
->
select
(
'id,user_id,class_id,name,price,preview_pic,recommend,status,created_at,updated_at'
)
->
where
([
'id'
=>
$id
])
->
asArray
()
->
one
();
->
where
([
'id'
=>
$id
])
->
asArray
()
->
one
();
}
/**
* 获取课程列表
* @param $classId
* @param $page 从0开始
* @param $num
* @return array
*/
public
static
function
getCourseListsByClassId
(
$classId
,
$page
,
$num
)
{
$status
=
self
::
STATUS_OK
;
$condition
=
"class_id=:class_id and status=
$status
"
;
$params
=
[
':class_id'
=>
$classId
];
//获取总数
$count
=
self
::
find
()
->
where
(
$condition
,
$params
)
->
count
();
$start
=
$page
*
$num
;
if
(
$count
>
0
)
{
$data
=
self
::
find
()
->
select
(
'id,price,name,intro,preview_pic,recommend,created_at'
)
->
where
(
$condition
,
$params
)
->
limit
(
$num
)
->
offset
(
$start
)
->
with
(
'teachers'
)
->
asArray
()
->
all
();
}
return
[
'count'
=>
$count
,
'data'
=>
$data
];
}
}
/**
* 获取推荐的课程
* @param $classID
* @return array|\yii\db\ActiveRecord[]
*/
public
static
function
getRecommendByClassId
(
$classID
)
{
$recommend
=
self
::
RECOMMEDN
;
return
self
::
find
()
->
select
(
'id,name,intro,preview_pic,recommend,created_at'
)
->
where
(
"class_id=:class_id and recommend =
$recommend
"
,
[
':class_id'
=>
$classID
])
->
asArray
()
->
all
();
}
/**
* 获取关联的讲师信息
* @return $this
*/
public
function
getTeachers
()
{
return
$this
->
hasMany
(
Teacher
::
className
(),
[
'id'
=>
'teacher_id'
])
->
viaTable
(
CourseTeacher
::
tableName
(),
[
'course_id'
=>
'id'
]);
}
}
}
src/common/models/Courseware.php
View file @
40e13d49
...
@@ -23,6 +23,11 @@ use yii\db\ActiveRecord;
...
@@ -23,6 +23,11 @@ use yii\db\ActiveRecord;
*/
*/
class
Courseware
extends
ActiveRecord
class
Courseware
extends
ActiveRecord
{
{
const
STATUS_UNCHECK
=
0
;
const
STATUS_OK
=
1
;
const
STATUS_FAILED
=
2
;
const
STATUS_LOCKED
=
3
;
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
...
...
src/console/migrations/m160927_121107_course_init.php
View file @
40e13d49
...
@@ -18,7 +18,6 @@ class m160927_121107_course_init extends Migration
...
@@ -18,7 +18,6 @@ class m160927_121107_course_init extends Migration
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'classed_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'classed_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'avatar'
=>
$this
->
string
(
255
)
->
notNull
(),
'name'
=>
$this
->
string
(
32
)
->
notNull
(),
'name'
=>
$this
->
string
(
32
)
->
notNull
(),
'price'
=>
$this
->
integer
()
->
notNull
(),
'price'
=>
$this
->
integer
()
->
notNull
(),
'free_time'
=>
$this
->
integer
()
->
notNull
(),
'free_time'
=>
$this
->
integer
()
->
notNull
(),
...
...
src/frontend/controllers/HomeController.php
View file @
40e13d49
...
@@ -4,6 +4,7 @@ namespace frontend\controllers;
...
@@ -4,6 +4,7 @@ namespace frontend\controllers;
use
common\libs\alipay\AliPay
;
use
common\libs\alipay\AliPay
;
use
common\libs\WeixinPay
;
use
common\libs\WeixinPay
;
use
common\models\Classes
;
use
common\models\Comments
;
use
common\models\Comments
;
use
common\models\Course
;
use
common\models\Course
;
use
common\models\Courseware
;
use
common\models\Courseware
;
...
@@ -18,6 +19,7 @@ use yii\base\ErrorException;
...
@@ -18,6 +19,7 @@ use yii\base\ErrorException;
use
yii\base\InvalidParamException
;
use
yii\base\InvalidParamException
;
use
yii\filters\AccessControl
;
use
yii\filters\AccessControl
;
use
yii\helpers\Html
;
use
yii\helpers\Html
;
use
yii\web\ForbiddenHttpException
;
class
HomeController
extends
\yii\web\Controller
class
HomeController
extends
\yii\web\Controller
{
{
...
@@ -55,18 +57,78 @@ class HomeController extends \yii\web\Controller
...
@@ -55,18 +57,78 @@ class HomeController extends \yii\web\Controller
/**
/**
* 首页
* 首页
* @param $c
ourseId 课程
id
* @param $c
lassId 课堂
id
* @return string
* @return string
*/
*/
public
function
actionIndex
(
$c
ourse
Id
)
public
function
actionIndex
(
$c
lass
Id
)
{
{
$result
=
Course
::
findByCourseId
(
$courseId
);
$classInfo
=
Classes
::
findOne
([
'id'
=>
$classId
]);
var_dump
(
$result
);
if
(
$classInfo
!==
NULL
)
{
return
$this
->
render
(
'index'
);
$classInfo
=
$classInfo
->
toArray
();
return
$this
->
render
(
'index'
,
[
'classInfo'
=>
$classInfo
]);
}
else
{
throw
new
InvalidParamException
(
'参数错误'
);
}
}
/**
* 获取课程列表
* @param $classId
* @param $page
* @param int $num
* @throws ForbiddenHttpException
*/
public
function
actionGetCourseLists
(
$classId
,
$page
,
$num
=
10
)
{
if
(
Yii
::
$app
->
request
->
isAjax
or
TRUE
)
{
if
(
$page
>=
0
and
$num
>
0
)
{
$result
=
Course
::
getCourseListsByClassId
(
$classId
,
$page
,
$num
);
}
else
{
throw
new
InvalidParamException
(
'参数错误'
);
}
}
else
{
throw
new
ForbiddenHttpException
(
'非法请求'
);
}
Utils
::
ajaxResponse
(
TRUE
,
'ok'
,
$result
);
}
/**
* 获取推荐的课程列表
* @param $classId
* @throws ForbiddenHttpException
*/
public
function
actionGetRecommendCourses
(
$classId
)
{
if
(
Yii
::
$app
->
request
->
isAjax
)
{
$result
=
Course
::
getRecommendByClassId
(
$classId
);
}
else
{
throw
new
ForbiddenHttpException
(
'非法请求'
);
}
Utils
::
ajaxResponse
(
TRUE
,
'ok'
,
$result
);
}
}
/**
* 视频播放
* @param $courseId
* @return string
*/
public
function
actionVideo
(
$courseId
)
{
$coursewareInfo
=
Courseware
::
findOne
([
'id'
=>
$courseId
,
'status'
=>
Courseware
::
STATUS_OK
]);
if
(
$coursewareInfo
===
NULL
)
{
throw
new
InvalidParamException
(
'参数错误'
);
}
else
{
return
$this
->
render
(
'video'
);
}
}
/**
/**
* 点赞或者取消点赞
* 点赞或者取消点赞
* @param $coursewareId
* @param $coursewareId
...
@@ -224,26 +286,25 @@ class HomeController extends \yii\web\Controller
...
@@ -224,26 +286,25 @@ class HomeController extends \yii\web\Controller
*/
*/
public
function
actionWeixinPayQrcode
()
public
function
actionWeixinPayQrcode
()
{
{
// $userId = Yii::$app->user->identity->getId();
$userId
=
Yii
::
$app
->
user
->
identity
->
getId
();
// $courseBaseInfo = Course::findBaseInfoByCourseId($courseId);
$courseBaseInfo
=
Course
::
findBaseInfoByCourseId
(
$courseId
);
// if ($courseBaseInfo !== NULL) {
if
(
$courseBaseInfo
!==
NULL
)
{
// $price = $courseBaseInfo['price'];
$price
=
$courseBaseInfo
[
'price'
];
// $productId = $this->generateOrderNumber($userId, $courseId, $price);
$productId
=
$this
->
generateOrderNumber
(
$userId
,
$courseId
,
$price
);
// $weixinPay = WeixinPay::getInstance();
$weixinPay
=
WeixinPay
::
getInstance
();
// return QrCode::jpg($weixinPay->makePayUrl($productId));
return
QrCode
::
jpg
(
$weixinPay
->
makePayUrl
(
$productId
));
// } else {
}
else
{
// throw new InvalidParamException('参数错误');
throw
new
InvalidParamException
(
'参数错误'
);
// }
}
//
$weixinPay
=
WeixinPay
::
getInstance
();
$url
=
$weixinPay
->
makePayUrl
(
time
());
// var_dump($url);exit;
return
QrCode
::
jpg
((
$url
));
}
}
public
function
actionMobilePay
(){
/**
* 移动端微信支付
*/
public
function
actionMobilePay
()
{
$weixinpay
=
\Yii
::
$app
->
params
[
'weixinpay'
];
$weixinpay
=
\Yii
::
$app
->
params
[
'weixinpay'
];
$client
=
new
Client
(
$client
=
new
Client
(
[
[
...
...
src/frontend/controllers/UserCenterController.php
View file @
40e13d49
...
@@ -125,17 +125,18 @@ class UserCenterController extends Controller
...
@@ -125,17 +125,18 @@ class UserCenterController extends Controller
if
(
$user
->
avatar
!==
$avatar
)
{
if
(
$user
->
avatar
!==
$avatar
)
{
$oldAvatar
=
$user
->
avatar
;
$oldAvatar
=
$user
->
avatar
;
}
}
$user
->
avatar
=
Html
::
encode
(
$avatar
);
$user
->
username
=
Html
::
encode
(
$username
);
$user
->
save
();
//资源清理
if
(
$oldAvatar
)
{
//删除
UploadPools
::
deleteFile
(
UploadPools
::
getSkey
(
'public'
,
$oldAvatar
));
//认领资源
UploadPools
::
claimFileBySkey
(
UploadPools
::
getSkey
(
'public'
,
$avatar
));
}
}
}
$user
->
avatar
=
Html
::
encode
(
$avatar
);
$user
->
username
=
Html
::
encode
(
$username
);
$user
->
save
();
//资源清理
if
(
$oldAvatar
)
{
//删除
UploadPools
::
deleteFile
(
UploadPools
::
getSkey
(
'public'
,
$oldAvatar
));
//认领资源
UploadPools
::
claimFileBySkey
(
UploadPools
::
getSkey
(
'public'
,
$avatar
));
}
Utils
::
ajaxResponse
(
$status
,
$msg
);
Utils
::
ajaxResponse
(
$status
,
$msg
);
}
else
{
}
else
{
throw
new
\yii\web\ForbiddenHttpException
(
'非法请求'
);
throw
new
\yii\web\ForbiddenHttpException
(
'非法请求'
);
...
...
src/frontend/views/home/index.php
View file @
40e13d49
...
@@ -2,23 +2,13 @@
...
@@ -2,23 +2,13 @@
/* @var $this yii\web\View */
/* @var $this yii\web\View */
\frontend\assets\AppAsset
::
addScript
(
$this
,
'@web/assets/home_index.js'
);
\frontend\assets\AppAsset
::
addScript
(
$this
,
'@web/assets/home_index.js'
);
\frontend\assets\AppAsset
::
addCss
(
$this
,
'@web/assets/css/home_index.css'
);
\frontend\assets\AppAsset
::
addCss
(
$this
,
'@web/assets/css/home_index.css'
);
\frontend\assets\AppAsset
::
addCss
(
$this
,
'@web/assets/css/main.css'
);
?>
?>
<h1>
home/index
</h1>
<input
id=
"class-info"
type=
"hidden"
value=
"
<?=
\yii\helpers\Html
::
encode
(
json_encode
(
$classInfo
))
?>
"
/>
<p>
<video
id=
"example_video_1"
class=
"video-js vjs-default-skin vjs-big-play-centered"
controls
preload=
"auto"
width=
"640"
height=
"264"
poster=
"http://dev.qdn.pp.cc/object/test-thumb1.jpg"
data-setup=
'{"example_option":true,"autoplay":false,"language":"zh-CN"}'
>
<source
src=
"http://dev.qdn.pp.cc/object/test-3.mp4"
type=
"video/mp4"
/>
</video>
<div
id=
"index-container"
>
</p>
<recommend
:class-id=
"classId"
></recommend>
<course-lists
:class-id=
"classId"
></course-lists>
</div>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
src/frontend/views/home/video.php
0 → 100644
View file @
40e13d49
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 2016/10/14
* Time: 下午5:39
*/
$this
->
title
=
"视频播放"
;
\frontend\assets\AppAsset
::
addCss
(
$this
,
'@web/assets/css/main.css'
);
?>
<div
class=
"container"
>
<div
class=
"cnt-tit"
>
<h3>
为什么身体会做出不由自主的行为?
</h3>
<div
class=
"tit-share hidden-xs"
>
<a
href=
"javascript:;"
class=
"wechat post-icons"
></a>
<a
href=
"javascript:;"
class=
"weibo post-icons"
></a>
<a
href=
"javascript:;"
class=
"qzone post-icons"
></a>
</div>
</div>
<div
class=
"video-main"
>
<embed
src=
'http://player.youku.com/player.php/sid/XMTc1NDM3MjUyNA==/v.swf'
allowFullScreen=
'true'
quality=
'high'
width=
'100%'
height=
'630'
align=
'middle'
allowScriptAccess=
'always'
type=
'application/x-shockwave-flash'
></embed>
</div>
<div
class=
"video-detail-info"
>
<div
class=
"video-teacher"
>
<a
href=
"#"
><img
src=
"img/avatar2.jpg"
></a>
<p><a
href=
"#"
>
乔布斯
</a></p>
<span>
2016-10-08
</span>
</div>
<div
class=
"video-sm-info"
>
<a
href=
"#"
><i
class=
"icon-comment-empty"
></i>
543
</a>
<a
href=
"#"
><i
class=
"icon-fav-empty"
></i>
31
</a>
<a
href=
"#"
><i
class=
"icon-zan-empty"
></i>
97
</a>
</div>
</div>
</div>
<!--视频介绍-->
<div
class=
"warp-box"
>
<div
class=
"container"
>
<div
class=
"video-description"
>
<div
class=
"title"
>
视频介绍
</div>
<div
class=
"text"
>
四川水煮鱼,重庆串串香,新疆羊肉串,西北烤全羊,江西酒糟鱼,湖北小龙虾,汕头牛肉丸……虽然一直信奉着“胃有多大,世界就有多大”的至理名言,奈何却被一口烂牙阻挡了前进的脚步。快来看看今天的视频,保护好你的牙齿吧!
</div>
</div>
<div
class=
"video-comment"
>
<div
class=
"title"
>
评论
<small>
607次
</small></div>
</div>
<div
class=
"comment-login"
>
需要
<a
href=
"#"
>
登录
</a>
才能评论
</div>
<div
class=
"comment-box"
>
<div
class=
"comment-head"
>
<img
src=
"img/avatar2.jpg"
>
</div>
<div
class=
"comment-input clearfix"
>
<textarea
name=
""
id=
""
cols=
"30"
rows=
"10"
class=
"form-control"
placeholder=
"说几句吧,亲..."
></textarea>
<button
class=
"btn btn-default pull-right m-t-10"
>
发表评论
</button>
</div>
</div>
<div
class=
"comment-main-list clearfix"
>
<div
class=
"user-h pull-left"
><img
src=
"img/avatar2.jpg"
></div>
<div
class=
"user-i"
>
<span>
Frank
<small>
10分钟前
</small></span>
<p>
呵呵。。。不知为什么我听了你这么说话特牙疼
</p>
</div>
</div>
<div
class=
"comment-main-list clearfix"
>
<div
class=
"user-h pull-left"
><img
src=
"img/avatar2.jpg"
></div>
<div
class=
"user-i"
>
<span>
Frank
<small>
10分钟前
</small></span>
<p>
呵呵。。。不知为什么我听了你这么说话特牙疼
</p>
</div>
</div>
<div
class=
"comment-main-list clearfix"
>
<div
class=
"user-h pull-left"
><img
src=
"img/avatarMax.png"
></div>
<div
class=
"user-i"
>
<span>
Frank
<small>
10分钟前
</small></span>
<p>
呵呵。。。不知为什么我听了你这么说话特牙疼
</p>
</div>
</div>
<div
class=
"comment-main-list clearfix"
>
<div
class=
"user-h pull-left"
><img
src=
"img/avatar2.jpg"
></div>
<div
class=
"user-i"
>
<span>
Frank
<small>
10分钟前
</small></span>
<p>
呵呵。。。不知为什么我听了你这么说话特牙疼
</p>
</div>
</div>
<div
class=
"comment-main-list clearfix"
>
<div
class=
"user-h pull-left"
><img
src=
"img/avatarMax.png"
></div>
<div
class=
"user-i"
>
<span>
Frank
<small>
10分钟前
</small></span>
<p>
呵呵。。。不知为什么我听了你这么说话特牙疼
</p>
</div>
</div>
</div>
</div>
src/frontend/views/layouts/main.php
View file @
40e13d49
...
@@ -16,7 +16,7 @@ $baseUrl = \yii\helpers\Url::base();
...
@@ -16,7 +16,7 @@ $baseUrl = \yii\helpers\Url::base();
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<html
lang=
"
<?=
Yii
::
$app
->
language
?>
"
>
<html
lang=
"
<?=
Yii
::
$app
->
language
?>
"
>
<title>
<?=
$this
->
title
?>
</title>
<title>
<?=
$this
->
title
?>
</title>
<meta
charset=
"
<?=
Yii
::
$app
->
charset
?>
"
>
<meta
charset=
"
<?=
Yii
::
$app
->
charset
?>
"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"description"
content=
""
>
<meta
name=
"keywords"
content=
""
>
<meta
name=
"keywords"
content=
""
>
...
@@ -45,10 +45,7 @@ $baseUrl = \yii\helpers\Url::base();
...
@@ -45,10 +45,7 @@ $baseUrl = \yii\helpers\Url::base();
</nav>
</nav>
<div
class=
"container"
>
<?=
$content
?>
<?=
$content
?>
</div>
<?php
$this
->
endBody
()
?>
<?php
$this
->
endBody
()
?>
...
...
src/frontend/views/site/about.php
deleted
100644 → 0
View file @
c00e6156
<?php
/* @var $this yii\web\View */
use
yii\helpers\Html
;
$this
->
title
=
'About'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
<div
class=
"site-about"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<p>
This is the About page. You may modify the following file to customize its content:
</p>
<code>
<?=
__FILE__
?>
</code>
</div>
src/frontend/views/site/contact.php
deleted
100644 → 0
View file @
c00e6156
<?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \frontend\models\ContactForm */
use
yii\helpers\Html
;
use
yii\bootstrap\ActiveForm
;
use
yii\captcha\Captcha
;
$this
->
title
=
'Contact'
;
$this
->
params
[
'breadcrumbs'
][]
=
$this
->
title
;
?>
<div
class=
"site-contact"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<p>
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
</p>
<div
class=
"row"
>
<div
class=
"col-lg-5"
>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'contact-form'
]);
?>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'autofocus'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'email'
)
?>
<?=
$form
->
field
(
$model
,
'subject'
)
?>
<?=
$form
->
field
(
$model
,
'body'
)
->
textarea
([
'rows'
=>
6
])
?>
<?=
$form
->
field
(
$model
,
'verifyCode'
)
->
widget
(
Captcha
::
className
(),
[
'template'
=>
'<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>'
,
])
?>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
'Submit'
,
[
'class'
=>
'btn btn-primary'
,
'name'
=>
'contact-button'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
</div>
</div>
src/frontend/views/site/error.php
View file @
40e13d49
...
@@ -9,19 +9,21 @@ use yii\helpers\Html;
...
@@ -9,19 +9,21 @@ use yii\helpers\Html;
$this
->
title
=
$name
;
$this
->
title
=
$name
;
?>
?>
<div
class=
"site-error"
>
<div
class=
"container"
>
<div
class=
"site-error"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<div
class=
"alert alert-danger"
>
<div
class=
"alert alert-danger"
>
<?=
nl2br
(
Html
::
encode
(
$message
))
?>
<?=
nl2br
(
Html
::
encode
(
$message
))
?>
</div>
</div>
<p>
<p>
The above error occurred while the Web server was processing your request.
The above error occurred while the Web server was processing your request.
</p>
</p>
<p>
<p>
Please contact us if you think this is a server error. Thank you.
Please contact us if you think this is a server error. Thank you.
</p>
</p>
</div>
</div>
</div>
src/frontend/views/site/login.php
View file @
40e13d49
...
@@ -7,59 +7,61 @@ use yii\widgets\ActiveForm;
...
@@ -7,59 +7,61 @@ use yii\widgets\ActiveForm;
$this
->
title
=
'登录'
;
$this
->
title
=
'登录'
;
$baseUrl
=
\yii\helpers\Url
::
base
();
$baseUrl
=
\yii\helpers\Url
::
base
();
?>
?>
<div
class=
"z-m-center"
>
<div
class=
"container"
>
<h3>
云涯
</h3>
<div
class=
"z-m-center"
>
<p>
欢迎来到最课堂,专注在线直播
</p>
<h3>
云涯
</h3>
<p>
欢迎来到最课堂,专注在线直播
</p>
<div
id=
"myTab"
class=
"tab-a"
>
<div
id=
"myTab"
class=
"tab-a"
>
<ul>
<ul>
<li
class=
"active"
><a
href=
"
<?=
$baseUrl
.
"/site/login"
?>
"
data-toggle=
"tab"
>
登录
</a></li>
<li
class=
"active"
><a
href=
"
<?=
$baseUrl
.
"/site/login"
?>
"
data-toggle=
"tab"
>
登录
</a></li>
<li><a
href=
"
<?=
$baseUrl
.
"/site/signup"
?>
"
data-toggle=
"tab"
>
注册
</a></li>
<li><a
href=
"
<?=
$baseUrl
.
"/site/signup"
?>
"
data-toggle=
"tab"
>
注册
</a></li>
</ul>
</ul>
</div>
</div>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade in active"
id=
"login"
>
<div
class=
"reg-box"
>
<?php
$form
=
ActiveForm
::
begin
(
[
'id'
=>
'login-form'
,
]);
?>
<div
class=
"tab-pane fade in active"
id=
"login"
>
<div
class=
"reg-box"
>
<?php
$form
=
ActiveForm
::
begin
(
[
'id'
=>
'login-form'
,
]);
?>
<div
class=
" input-wrapper"
>
<input
name=
"telephone"
value=
"
<?=
$model
->
telephone
?>
"
type=
"text"
class=
""
placeholder=
"手机号码"
autofocus=
""
>
</div>
<div
class=
" input-wrapper last-wrapper"
>
<input
name=
"password"
type=
"password"
class=
""
placeholder=
"密码"
>
<span
class=
"tips tip-vcode"
>
<?=
$model
->
getFirstError
(
'password'
)
?>
</span>
<div
class=
" input-wrapper"
>
</div>
<input
name=
"telephone"
value=
"
<?=
$model
->
telephone
?>
"
type=
"text"
class=
""
placeholder=
"手机号码"
autofocus=
""
>
</div>
</div>
<div
class=
" input-wrapper last-wrapper"
>
<input
name=
"password"
type=
"password"
class=
""
placeholder=
"密码"
>
<span
class=
"tips tip-vcode"
>
<?=
$model
->
getFirstError
(
'password'
)
?>
</span>
<div
class=
"checkbox part-wap"
>
<label>
<?=
$model
->
rememberMe
?>
<input
name=
"rememberMe"
type=
"checkbox"
value=
"1"
<?=
$model
->
rememberMe
?
"checked"
:
''
?>
>
记住密码
</label>
<a
href=
"
<?=
$baseUrl
.
"/site/request-password-reset"
?>
"
>
忘记密码?
</a>
</div>
</div>
</div>
<div
class=
"checkbox part-wap"
>
<div
class=
"foot-reg-btn"
>
<label>
<button
class=
"btn btn-log"
type=
"submit"
>
登录
</button>
<?=
$model
->
rememberMe
?>
</div>
<input
name=
"rememberMe"
type=
"checkbox"
value=
"1"
<?=
$model
->
rememberMe
?
"checked"
:
''
?>
>
记住密码
<?php
ActiveForm
::
end
();
?>
</label>
<a
href=
"
<?=
$baseUrl
.
"/site/request-password-reset"
?>
"
>
忘记密码?
</a>
</div>
<div
class=
"foot-reg-btn"
>
<!-- <div class="div-line">或</div>-->
<button
class=
"btn btn-log"
type=
"submit"
>
登录
</button>
<!---->
<!-- <div class="foot-reg-btn">-->
<!-- <button class="btn btn-reg" type="submit">微信登录</button>-->
<!-- </div>-->
</div>
</div>
<?php
ActiveForm
::
end
();
?>
<!-- <div class="div-line">或</div>-->
<!---->
<!-- <div class="foot-reg-btn">-->
<!-- <button class="btn btn-reg" type="submit">微信登录</button>-->
<!-- </div>-->
</div>
</div>
</div>
</div>
</div>
</div>
src/frontend/views/site/requestPasswordResetToken.php
View file @
40e13d49
...
@@ -11,47 +11,49 @@ $this->title = '找回密码';
...
@@ -11,47 +11,49 @@ $this->title = '找回密码';
$this
->
registerJsFile
(
'http://static.geetest.com/static/tools/gt.js'
);
$this
->
registerJsFile
(
'http://static.geetest.com/static/tools/gt.js'
);
?>
?>
<div
class=
"z-m-center"
>
<div
class=
"container"
>
<h3>
找回密码
</h3>
<div
class=
"z-m-center"
>
<p>
请按步骤获取密码
</p>
<h3>
找回密码
</h3>
<p>
请按步骤获取密码
</p>
<div
id=
"myTab"
class=
"tab-find"
>
<ul>
<div
id=
"myTab"
class=
"tab-find"
>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<ul>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
</ul>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
</div>
</ul>
</div>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade in active"
id=
"one"
>
<div
class=
"tab-content"
id=
"myTabContent"
>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'request-password-reset-form'
]);
?>
<div
class=
"tab-pane fade in active"
id=
"one"
>
<div
class=
"tab-pane fade in active"
id=
"one"
>
<div
class=
"reg-box"
>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'request-password-reset-form'
]);
?>
<div
class=
"phone input-wrapper last-wrapper"
>
<input
name=
"telephone"
type=
"text"
class=
""
placeholder=
"请输入注册的手机号码"
required=
""
autofocus=
""
>
<div
class=
"tab-pane fade in active"
id=
"one"
>
<!--<span class="tips">手机号或者密码错误</span>-->
<div
class=
"reg-box"
>
<div
class=
"phone input-wrapper last-wrapper"
>
<input
name=
"telephone"
type=
"text"
class=
""
placeholder=
"请输入注册的手机号码"
required=
""
autofocus=
""
>
<!--<span class="tips">手机号或者密码错误</span>-->
</div>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
id=
"embed-captcha"
></div>
<p
id=
"wait"
class=
"show"
>
正在加载验证码......
</p>
<p
id=
"notice"
class=
"hide"
>
请先拖动验证码到相应位置
</p>
</div>
</div>
</div>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
id=
"embed-captcha"
></div>
<p
id=
"wait"
class=
"show"
>
正在加载验证码......
</p>
<p
id=
"notice"
class=
"hide"
>
请先拖动验证码到相应位置
</p>
</div>
</div>
<div
class=
"foot-reg-btn"
>
<div
class=
"foot-reg-btn"
>
<button
id=
"submit"
class=
"btn btn-log"
type=
"submit"
>
获取验证码
</button>
<button
id=
"submit"
class=
"btn btn-log"
type=
"submit"
>
获取验证码
</button>
</div>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
</div>
</div>
</div>
</div>
</div>
src/frontend/views/site/resetPassword.php
View file @
40e13d49
...
@@ -21,43 +21,45 @@ JS;
...
@@ -21,43 +21,45 @@ JS;
$this
->
registerJs
(
$jsString
);
$this
->
registerJs
(
$jsString
);
?>
?>
<div
class=
"z-m-center"
>
<div
class=
"container"
>
<h3>
找回密码
</h3>
<div
class=
"z-m-center"
>
<p>
请按步骤获取密码
</p>
<h3>
找回密码
</h3>
<p>
请按步骤获取密码
</p>
<div
id=
"myTab"
class=
"tab-find"
>
<ul>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
</ul>
</div>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
id=
"myTab"
class=
"tab-find"
>
<ul>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
</ul>
</div>
<div
class=
"tab-pane fade in active"
id=
"three"
>
<div
class=
"tab-content"
id=
"myTabContent"
>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'request-password-reset-form'
]);
?>
<div
class=
"reg-box"
>
<div
class=
"tab-pane fade in active"
id=
"three"
>
<div
class=
"password input-wrapper"
>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'request-password-reset-form'
]);
?>
<input
value=
"
<?=
$model
->
password
?>
"
id=
"password"
name=
"password"
type=
"password"
class=
""
placeholder=
"设置新密码"
required=
""
>
</div>
<div
class=
"check-password input-wrapper last-wrapper"
>
<div
class=
"reg-box"
>
<input
value=
"
<?=
$model
->
rePassword
?>
"
id
id=
"repassword"
name=
"rePassword"
type=
"password"
class=
""
placeholder=
"重复输入密码"
required=
""
>
<div
class=
"password input-wrapper"
>
<span
id=
"repassword_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'rePassword'
)
?>
</span>
<input
value=
"
<?=
$model
->
password
?>
"
id=
"password"
name=
"password"
type=
"password"
class=
""
placeholder=
"设置新密码"
required=
""
>
</div>
<div
class=
"check-password input-wrapper last-wrapper"
>
<input
value=
"
<?=
$model
->
rePassword
?>
"
id
id=
"repassword"
name=
"rePassword"
type=
"password"
class=
""
placeholder=
"重复输入密码"
required=
""
>
<span
id=
"repassword_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'rePassword'
)
?>
</span>
</div>
</div>
</div>
<div
class=
"foot-reg-btn"
>
<button
id=
"submit"
class=
"btn btn-log"
type=
"submit"
>
确认
</button>
</div>
<?php
ActiveForm
::
end
()
?>
</div>
</div>
<div
class=
"foot-reg-btn"
>
<button
id=
"submit"
class=
"btn btn-log"
type=
"submit"
>
确认
</button>
</div>
<?php
ActiveForm
::
end
()
?>
</div>
</div>
</div>
</div>
</div>
</div>
src/frontend/views/site/resetPasswordSuccess.php
View file @
40e13d49
...
@@ -12,38 +12,40 @@ $this->title = '密码设置成功';
...
@@ -12,38 +12,40 @@ $this->title = '密码设置成功';
?>
?>
<div
class=
"z-m-center"
>
<div
class=
"container"
>
<h3>
找回密码
</h3>
<div
class=
"z-m-center"
>
<p>
请按步骤获取密码
</p>
<h3>
找回密码
</h3>
<p>
请按步骤获取密码
</p>
<div
id=
"myTab"
class=
"tab-find"
>
<ul>
<div
id=
"myTab"
class=
"tab-find"
>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<ul>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
</ul>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
</div>
</ul>
</div>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade in active"
id=
"four"
>
<div
class=
"tab-pane fade in active"
id=
"four"
>
<div
class=
"sucess-box"
>
<div
class=
"sucess-box"
>
<span><i
class=
"glyphicon glyphicon-ok"
></i></span>
<span><i
class=
"glyphicon glyphicon-ok"
></i></span>
<p>
密码重置成功
</p>
<p>
密码重置成功
</p>
</div>
</div>
<div
class=
"foot-reg-btn"
>
<div
class=
"foot-reg-btn"
>
<button
class=
"btn btn-reg"
onclick=
"window.location.href='
<?=
\yii\helpers\Url
::
base
()
.
"/site"
?>
'"
<button
class=
"btn btn-reg"
onclick=
"window.location.href='
<?=
\yii\helpers\Url
::
base
()
.
"/site"
?>
'"
type=
"submit"
>
去登录
type=
"submit"
>
去登录
</button>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
src/frontend/views/site/signup.php
View file @
40e13d49
...
@@ -10,65 +10,67 @@ $baseUrl = \yii\helpers\Url::base();
...
@@ -10,65 +10,67 @@ $baseUrl = \yii\helpers\Url::base();
$this
->
registerJsFile
(
'http://static.geetest.com/static/tools/gt.js'
);
$this
->
registerJsFile
(
'http://static.geetest.com/static/tools/gt.js'
);
?>
?>
<div
class=
"z-m-center"
>
<div
class=
"container"
>
<h3>
云涯
</h3>
<div
class=
"z-m-center"
>
<p>
欢迎来到最课堂,专注在线直播
</p>
<h3>
云涯
</h3>
<p>
欢迎来到最课堂,专注在线直播
</p>
<div
id=
"myTab"
class=
"tab-a"
>
<ul>
<div
id=
"myTab"
class=
"tab-a"
>
<li><a
href=
"
<?=
$baseUrl
.
"/site/login"
?>
"
data-toggle=
"tab"
>
登录
</a></li>
<ul>
<li
class=
"active"
><a
href=
"
<?=
$baseUrl
.
"/site/singup"
?>
"
data-toggle=
"tab"
>
注册
</a></li>
<li><a
href=
"
<?=
$baseUrl
.
"/site/login"
?>
"
data-toggle=
"tab"
>
登录
</a></li>
</ul>
<li
class=
"active"
><a
href=
"
<?=
$baseUrl
.
"/site/singup"
?>
"
data-toggle=
"tab"
>
注册
</a></li>
</div>
</ul>
</div>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade in active"
id=
"register"
>
<div
class=
"tab-pane fade in active"
id=
"register"
>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'form-signup'
]);
?>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'form-signup'
]);
?>
<div
class=
"reg-box"
>
<div
class=
"reg-box"
>
<div
class=
"phone input-wrapper"
>
<div
class=
"phone input-wrapper"
>
<input
name=
"telephone"
id=
"telephone"
value=
"
<?=
$model
->
telephone
?>
"
type=
"text"
class=
""
<input
name=
"telephone"
id=
"telephone"
value=
"
<?=
$model
->
telephone
?>
"
type=
"text"
class=
""
placeholder=
"手机号码"
required=
""
autofocus=
""
>
placeholder=
"手机号码"
required=
""
autofocus=
""
>
<span
id=
"telephone_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'telephone'
)
?>
</span>
<span
id=
"telephone_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'telephone'
)
?>
</span>
</div>
</div>
<div
class=
"v-code input-wrapper"
>
<div
class=
"v-code input-wrapper"
>
<input
id=
"token"
name=
"token"
type=
"text"
class=
""
placeholder=
"验证码"
>
<input
id=
"token"
name=
"token"
type=
"text"
class=
""
placeholder=
"验证码"
>
<span
id=
"token_tips"
class=
"tips tip-vcode"
>
<?=
$model
->
getFirstError
(
'token'
)
?>
</span>
<span
id=
"token_tips"
class=
"tips tip-vcode"
>
<?=
$model
->
getFirstError
(
'token'
)
?>
</span>
<button
class=
"btn btn-get-vcode"
id=
"send_msg"
>
获取验证码
</button>
<button
class=
"btn btn-get-vcode"
id=
"send_msg"
>
获取验证码
</button>
</div>
</div>
<div
class=
"password input-wrapper"
>
<div
class=
"password input-wrapper"
>
<input
id=
"password"
name=
"password"
type=
"password"
class=
""
placeholder=
"输入密码"
required=
""
>
<input
id=
"password"
name=
"password"
type=
"password"
class=
""
placeholder=
"输入密码"
required=
""
>
<span
id=
"password_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'password'
)
?>
</span>
<span
id=
"password_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'password'
)
?>
</span>
</div>
</div>
<div
class=
"check-password input-wrapper last-wrapper"
>
<div
class=
"check-password input-wrapper last-wrapper"
>
<input
id=
"repassword"
name=
"rePassword"
type=
"password"
class=
""
placeholder=
"再次输入密码"
required=
""
>
<input
id=
"repassword"
name=
"rePassword"
type=
"password"
class=
""
placeholder=
"再次输入密码"
required=
""
>
<span
class=
"tips tip-vcode"
>
<?=
$model
->
getFirstError
(
'rePassword'
)
?>
</span>
<span
class=
"tips tip-vcode"
>
<?=
$model
->
getFirstError
(
'rePassword'
)
?>
</span>
<span
id=
"repassword_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'rePassword'
)
?>
</span>
<span
id=
"repassword_tips"
class=
"tips"
>
<?=
$model
->
getFirstError
(
'rePassword'
)
?>
</span>
</div>
</div>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
id=
"embed-captcha"
></div>
<div
id=
"embed-captcha"
></div>
<p
id=
"wait"
class=
"show"
>
正在加载验证码......
</p>
<p
id=
"wait"
class=
"show"
>
正在加载验证码......
</p>
<p
id=
"notice"
class=
"hide"
>
请先拖动验证码到相应位置
</p>
<p
id=
"notice"
class=
"hide"
>
请先拖动验证码到相应位置
</p>
</div>
</div>
</div>
</div>
<div
id=
"submit"
class=
"foot-reg-btn"
>
<div
id=
"submit"
class=
"foot-reg-btn"
>
<button
class=
"btn btn-reg"
type=
"submit"
>
注册
</button>
<button
class=
"btn btn-reg"
type=
"submit"
>
注册
</button>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
</div>
</div>
</div>
</div>
</div>
src/frontend/views/site/tokenInput.php
View file @
40e13d49
...
@@ -15,44 +15,46 @@ $this->title = '输入验证码';
...
@@ -15,44 +15,46 @@ $this->title = '输入验证码';
$this
->
registerJsFile
(
'http://static.geetest.com/static/tools/gt.js'
);
$this
->
registerJsFile
(
'http://static.geetest.com/static/tools/gt.js'
);
?>
?>
<div
class=
"z-m-center"
>
<div
class=
"container"
>
<h3>
找回密码
</h3>
<div
class=
"z-m-center"
>
<p>
请按步骤获取密码
</p>
<h3>
找回密码
</h3>
<p>
请按步骤获取密码
</p>
<div
id=
"myTab"
class=
"tab-find"
>
<ul>
<div
id=
"myTab"
class=
"tab-find"
>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<ul>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
1
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
data-toggle=
"tab"
>
2
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
3
</a></li>
</ul>
<li><a
href=
"javascript:;"
data-toggle=
"tab"
>
4
</a></li>
</div>
</ul>
</div>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade in active"
id=
"two"
>
<div
class=
"tab-pane fade in active"
id=
"two"
>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'token-input-form'
]);
?>
<?php
$form
=
ActiveForm
::
begin
([
'id'
=>
'token-input-form'
]);
?>
<div
class=
"reg-box"
>
<div
class=
"reg-box"
>
<div
class=
"phone input-wrapper last-wrapper"
>
<div
class=
"phone input-wrapper last-wrapper"
>
<input
name=
"token"
type=
"text"
class=
""
value=
"
<?=
$model
->
token
?>
"
placeholder=
"请输入6位验证码"
required=
""
autofocus=
""
>
<input
name=
"token"
type=
"text"
class=
""
value=
"
<?=
$model
->
token
?>
"
placeholder=
"请输入6位验证码"
required=
""
autofocus=
""
>
<span
class=
"tips"
>
<?=
$model
->
getFirstError
(
'token'
)
?>
</span>
<span
class=
"tips"
>
<?=
$model
->
getFirstError
(
'token'
)
?>
</span>
</div>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
id=
"embed-captcha"
></div>
<p
id=
"wait"
class=
"show"
>
正在加载验证码......
</p>
<p
id=
"notice"
class=
"hide"
>
请先拖动验证码到相应位置
</p>
</div>
</div>
</div>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
class=
"foot-reg-btn"
>
<div
id=
"embed-captcha"
></div>
<button
id=
"token_input"
class=
"btn btn-log"
type=
"submit"
>
下一步
</button>
<p
id=
"wait"
class=
"show"
>
正在加载验证码......
</p>
<p
id=
"notice"
class=
"hide"
>
请先拖动验证码到相应位置
</p>
</div>
</div>
<?php
ActiveForm
::
end
()
?>
</div>
</div>
<div
class=
"foot-reg-btn"
>
<button
id=
"token_input"
class=
"btn btn-log"
type=
"submit"
>
下一步
</button>
</div>
<?php
ActiveForm
::
end
()
?>
</div>
</div>
</div>
</div>
</div>
</div>
src/frontend/web/css/fonts/glyphicons-halflings-regular.eot
0 → 100644
View file @
40e13d49
File added
src/frontend/web/css/fonts/glyphicons-halflings-regular.svg
0 → 100644
View file @
40e13d49
This diff is collapsed.
Click to expand it.
src/frontend/web/css/fonts/glyphicons-halflings-regular.ttf
0 → 100644
View file @
40e13d49
File added
src/frontend/web/css/fonts/glyphicons-halflings-regular.woff
0 → 100644
View file @
40e13d49
File added
src/frontend/web/css/login.css
View file @
40e13d49
...
@@ -21,10 +21,7 @@ a,a:hover,a:link {
...
@@ -21,10 +21,7 @@ a,a:hover,a:link {
.yun-login-btn
li
a
{
.yun-login-btn
li
a
{
color
:
#333
;
color
:
#333
;
}
}
.yun-login-btn
li
:last-child
a
{
background-color
:
#34bf49
;
color
:
#fff
;
}
.z-m-center
{
.z-m-center
{
...
...
src/frontend/web/css/main.css
0 → 100644
View file @
40e13d49
@charset
"utf-8"
;
body
{
font-family
:
"Microsoft YaHei"
,
"Helvitica Neue"
,
Helvitica
,
Arial
,
"Hiragino Sans GB"
,
"Arial Regular"
,
"Microsoft JhengHei"
,
sans-serif
;
background-color
:
#fafafa
;
}
a
,
a
:hover
,
a
:link
{
text-decoration
:
none
;
}
/*font*/
@font-face
{
font-family
:
'icomoon'
;
src
:
url('fonts/icomoon.eot?uyryw3')
;
src
:
url('fonts/icomoon.eot?uyryw3#iefix')
format
(
'embedded-opentype'
),
url('fonts/icomoon.ttf?uyryw3')
format
(
'truetype'
),
url('fonts/icomoon.woff?uyryw3')
format
(
'woff'
),
url('fonts/icomoon.svg?uyryw3#icomoon')
format
(
'svg'
);
font-weight
:
normal
;
font-style
:
normal
;
}
[
class
^=
"icon-"
],
[
class
*=
" icon-"
]
{
/* use !important to prevent issues with browser extensions that change fonts */
font-family
:
'icomoon'
!important
;
speak
:
none
;
font-style
:
normal
;
font-weight
:
normal
;
font-variant
:
normal
;
text-transform
:
none
;
line-height
:
1
;
/* Better Font Rendering =========== */
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
}
.icon-comment-empty
:before
{
content
:
"\e900"
;
}
.icon-comment-full
:before
{
content
:
"\e901"
;
}
.icon-fav-empty
:before
{
content
:
"\e902"
;
}
.icon-fav-full
:before
{
content
:
"\e903"
;
}
.icon-zan-empty
:before
{
content
:
"\e904"
;
}
.icon-zan-full
:before
{
content
:
"\e905"
;
}
.navbar-main
{
background-color
:
#fff
;
box-shadow
:
0
0
30px
rgba
(
0
,
0
,
0
,
.05
);
}
.logo
{
line-height
:
60px
;
margin-left
:
30px
;
font-size
:
16px
;
}
.logo
a
{
color
:
#333
;
}
.yun-login-btn
{
margin-right
:
30px
;
margin-bottom
:
0
;
}
.yun-login-btn
,
.yun-login-btn
li
{
list-style
:
none
;
}
.yun-login-btn
li
{
display
:
inline-block
;
height
:
60px
;
line-height
:
60px
;
padding
:
0
10px
;
}
.yun-login-btn
li
a
{
color
:
#333
;
display
:
block
;
}
.c-menu-item
{
margin-bottom
:
0
;
margin-left
:
20px
;
}
.c-menu-item
li
{
display
:
inline-block
;
height
:
60px
;
line-height
:
60px
;
margin
:
0
10px
0
;
padding
:
0
;
}
.c-menu-item
li
a
{
display
:
block
;
height
:
60px
;
color
:
#333
;
}
.c-menu-item
li
.active
a
{
display
:
block
;
border-bottom
:
4px
solid
#ef2f11
;
}
/* Swiper幻灯 */
.swiper-container
{
width
:
100%
;
height
:
500px
;
}
.swiper-slide
{
text-align
:
center
;
font-size
:
18px
;
background
:
#fff
;
/* Center slide text vertically */
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
-webkit-flex
;
display
:
flex
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
-webkit-justify-content
:
center
;
justify-content
:
center
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
-webkit-align-items
:
center
;
align-items
:
center
;
}
/*视频列表*/
.v-list
{
margin-top
:
20px
;
}
.v-main-box
{
background-color
:
#fff
;
height
:
300px
;
margin-bottom
:
20px
;
-webkit-transition
:
all
0.4s
ease
;
-o-transition
:
all
0.4s
ease
;
transition
:
all
0.4s
ease
;
}
.v-screen
{
position
:
relative
;
width
:
100%
;
height
:
200px
;
overflow
:
hidden
;
}
.v-screen
a
{
position
:
relative
;
display
:
block
;
}
.v-screen
>
span
{
position
:
absolute
;
display
:
inline-block
;
width
:
30px
;
height
:
30px
;
left
:
10px
;
top
:
10px
;
}
.v-screen
>
span
>
img
{
width
:
30px
;
height
:
30px
;
border-radius
:
100%
;
}
.v-tit
,
.v-price
,
.v-foot
{
padding
:
0
10px
;
}
.v-tit
{
height
:
40px
;
line-height
:
40px
;
font-size
:
14px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.v-tit
a
{
color
:
#333333
;
}
.v-price
{
color
:
#ef2f11
;
padding-bottom
:
10px
;
}
.v-foot
{
position
:
relative
;
font-size
:
12px
;
color
:
#999
;
}
.v-detail
{
position
:
absolute
;
right
:
10px
;
bottom
:
0
;
color
:
#bbbbbb
;
}
.v-detail
span
{
padding-left
:
10px
;
}
.v-main-box
:hover
{
cursor
:
pointer
;
box-shadow
:
0
0
20px
rgba
(
0
,
0
,
0
,
.12
);
}
.v-main-box
:hover
.play-mask
{
display
:
inline-block
;
line-height
:
200px
;
}
.play-mask
{
display
:
none
;
position
:
absolute
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
width
:
100%
;
height
:
200px
;
left
:
0
;
top
:
0
;
text-align
:
center
;
line-height
:
200px
;
font-size
:
64px
;
color
:
#fff
;
-webkit-transition
:
all
0.4s
ease
;
-o-transition
:
all
0.4s
ease
;
transition
:
all
0.4s
ease
;
}
.col-md-3
{
padding-right
:
10px
;
padding-left
:
10px
;
}
.get-more
{
margin
:
0
auto
;
width
:
30%
;
text-align
:
center
;
font-size
:
12px
;
}
.get-more
a
{
display
:
block
;
height
:
45px
;
line-height
:
45px
;
background-color
:
#fff
;
color
:
#999
;
}
.copyright
{
height
:
40px
;
line-height
:
40px
;
background-color
:
#fff
;
text-align
:
center
;
color
:
#999
;
font-size
:
12px
;
border-top
:
1px
solid
#f3f3f3
;
}
.m-t-20
{
margin-top
:
20px
;
}
/*视频内容页面*/
.cnt-tit
{
position
:
relative
;
height
:
22px
;
font-size
:
22px
;
margin
:
30px
0
;
}
.tit-share
{
position
:
absolute
;
display
:
inline-block
;
height
:
22px
;
right
:
0
;
top
:
0
;
}
.post-icons
{
width
:
25px
;
height
:
22px
;
float
:
left
;
margin-left
:
16px
;
background
:
url(../img/share_tit.png)
no-repeat
;
}
.weibo
{
background-position
:
-25px
0
;
}
.qzone
{
background-position
:
-50px
0
;
}
.weibo
:hover
{
background-position
:
-25px
-22px
;
}
.qzone
:hover
{
background-position
:
-50px
-22px
;
}
.wechat
:hover
{
background-position
:
0
-22px
;
}
.video-detail-info
{
position
:
relative
;
height
:
80px
;
background-color
:
#fff
;
border
:
1px
solid
#f3f3f3
;
border-top
:
none
;
}
.video-teacher
{
padding
:
15px
;
}
.video-teacher
a
{
color
:
#333
;
}
.video-teacher
img
{
float
:
left
;
width
:
50px
;
height
:
50px
;
border-radius
:
100%
;
margin-right
:
10px
;
}
.video-teacher
p
{
font-size
:
16px
;
margin
:
5px
0
0
;
}
.video-teacher
span
{
font-size
:
12px
;
color
:
#999
;
}
.video-sm-info
{
position
:
absolute
;
height
:
80px
;
line-height
:
80px
;
right
:
15px
;
top
:
0
;
}
.video-sm-info
a
{
display
:
inline-block
;
position
:
relative
;
margin-right
:
15px
;
vertical-align
:
middle
;
font-size
:
12px
;
color
:
#999
;
padding-left
:
35px
;
height
:
30px
;
line-height
:
30px
;
}
.video-sm-info
a
i
{
position
:
absolute
;
width
:
30px
;
height
:
30px
;
text-align
:
center
;
line-height
:
30px
;
top
:
0
;
left
:
0
;
font-size
:
30px
;
}
/*video detail*/
.warp-box
{
background-color
:
#fff
;
margin-top
:
40px
;
padding
:
20px
0
;
border-top
:
1px
solid
#f3f3f3
;
}
.video-description
.title
{
font-size
:
16px
;
color
:
#333
;
padding-bottom
:
10px
;
}
.video-description
.text
{
color
:
#999
;
}
.video-comment
{
margin-top
:
30px
;
}
.video-comment
.title
{
font-size
:
16px
;
color
:
#333
;
padding-bottom
:
10px
;
}
.video-comment
.title
small
{
font-size
:
12px
;
color
:
#999
;
padding-left
:
10px
;
}
.comment-login
{
display
:
block
;
width
:
100%
;
height
:
100px
;
text-align
:
center
;
line-height
:
100px
;
border
:
1px
solid
#e5e6e8
;
}
.comment-box
{
position
:
relative
;
padding-left
:
60px
;
margin-top
:
20px
;
}
.comment-head
img
{
width
:
50px
;
height
:
50px
;
border-radius
:
100%
;
}
.comment-head
{
position
:
absolute
;
left
:
0
;
top
:
0
;
padding-right
:
10px
;
}
.comment-input
{
display
:
block
;
}
.comment-input
textarea
{
height
:
50px
;
}
.m-t-10
{
margin-top
:
10px
;
}
.user-h
{
padding-right
:
10px
;
}
.user-h
img
{
height
:
50px
;
width
:
50px
;
border-radius
:
100%
;
}
.user-i
span
,
.user-i
span
small
{
font-size
:
14px
;
color
:
#999
;
}
.user-i
span
small
{
padding-left
:
5px
;
}
.user-i
p
{
padding-top
:
5px
;
}
.comment-main-list
{
margin-bottom
:
40px
;
}
.teacher-info
{
margin
:
40px
auto
;
}
.teacher-info
img
{
width
:
100px
;
height
:
100px
;
border-radius
:
100%
;
}
.teacher-info
h3
{
font-size
:
18px
;
}
.teacher-info
p
{
max-width
:
500px
;
margin
:
0
auto
;
color
:
#666
;
}
\ No newline at end of file
src/frontend/web/css/reset.css
View file @
40e13d49
...
@@ -181,6 +181,7 @@ ul,
...
@@ -181,6 +181,7 @@ ul,
ol
,
ol
,
li
{
li
{
list-style
:
none
;
list-style
:
none
;
float
:
left
;
}
}
i
,
em
{
i
,
em
{
...
@@ -231,6 +232,24 @@ i, em {
...
@@ -231,6 +232,24 @@ i, em {
-moz-osx-font-smoothing
:
grayscale
;
-moz-osx-font-smoothing
:
grayscale
;
}
}
.icon-comment-empty
:before
{
content
:
"\e900"
;
}
.icon-comment-full
:before
{
content
:
"\e901"
;
}
.icon-fav-empty
:before
{
content
:
"\e902"
;
}
.icon-fav-full
:before
{
content
:
"\e903"
;
}
.icon-zan-empty
:before
{
content
:
"\e904"
;
}
.icon-zan-full
:before
{
content
:
"\e905"
;
}
.icon-add
:before
{
.icon-add
:before
{
content
:
"\e145"
;
content
:
"\e145"
;
}
}
...
@@ -273,12 +292,21 @@ i, em {
...
@@ -273,12 +292,21 @@ i, em {
.icon-crop_original
:before
{
.icon-crop_original
:before
{
content
:
"\e3c4"
;
content
:
"\e3c4"
;
}
}
.icon-favorite
:before
{
content
:
"\e87d"
;
}
.icon-favorite_border
:before
{
content
:
"\e87e"
;
}
.icon-fingerprint
:before
{
.icon-fingerprint
:before
{
content
:
"\e90d"
;
content
:
"\e90d"
;
}
}
.icon-ondemand_video
:before
{
.icon-ondemand_video
:before
{
content
:
"\e63a"
;
content
:
"\e63a"
;
}
}
.icon-power_settings_new
:before
{
content
:
"\e8ac"
;
}
.icon-slideshow
:before
{
.icon-slideshow
:before
{
content
:
"\e41b"
;
content
:
"\e41b"
;
}
}
...
@@ -390,4 +418,3 @@ i, em {
...
@@ -390,4 +418,3 @@ i, em {
.icon-menu
:before
{
.icon-menu
:before
{
content
:
"\e120"
;
content
:
"\e120"
;
}
}
src/frontend/web/img/banner.jpg
0 → 100644
View file @
40e13d49
85 KB
src/frontend/web/img/share_tit.png
0 → 100644
View file @
40e13d49
1.67 KB
src/frontend/web/img/site.jpg
0 → 100644
View file @
40e13d49
2.64 KB
src/frontend/web/img/videobg.jpg
0 → 100644
View file @
40e13d49
16.9 KB
src/frontend/web/js/home/components/course-lists.vue
0 → 100644
View file @
40e13d49
<
template
>
<div
class=
"container v-list"
v-show=
"lists.length > 0"
>
<div
class=
"row"
>
<div
v-for=
"item in lists"
class=
"col-md-3"
>
<div
class=
"v-main-box"
>
<div
class=
"v-screen"
>
<a
@
click=
"itemClick(item.id)"
href=
"javascript:;"
>
<img
:src=
"getFullPreViewPic(item.preview_pic)"
>
<span
class=
"play-mask"
><i
class=
"glyphicon glyphicon-play-circle"
></i></span>
</a>
<!--头像-->
<span><img
src=
"http://dev.zuiketang.com/assets/img/avatar2.jpg"
></span>
</div>
<div
class=
"v-tit"
><a
@
click=
"itemClick(item.id)"
href=
"javascript:;"
>
{{
item
.
name
}}
</a></div>
<div
class=
"v-price"
>
<small>
¥
</small>
{{
item
.
price
}}
</div>
<div
class=
"v-foot"
>
<p>
{{
transcateTime
(
item
.
created_at
)
}}
</p>
<!--
<div
class=
"v-detail"
>
-->
<!--
<span><i
class=
"icon-comment-full"
></i>
12031
</span>
-->
<!--
<span><i
class=
"icon-fav-full"
></i>
87
</span>
-->
<!--
<span><i
class=
"icon-zan-full"
></i>
331
</span>
-->
<!--
</div>
-->
</div>
</div>
</div>
</div>
<div
@
click=
"moreClick"
v-show=
"more"
class=
"get-more"
><a
href=
"javascript:;"
>
点击查看更多
</a></div>
</div>
</
template
>
<
script
>
import
moment
from
'moment'
;
export
default
{
data
(){
return
{
lists
:
[],
page
:
0
,
num
:
10
,
more
:
false
}
},
methods
:
{
itemClick
(
id
)
{
window
.
location
.
href
=
__BASE_URL__
+
'home/video?courseId='
+
id
;
},
transcateTime
(
time
)
{
return
moment
(
new
Date
(
time
*
1000
)).
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
,
getFullPreViewPic
(
pic
)
{
return
__QINIU_URL__
+
'/'
+
pic
;
}
,
moreClick
()
{
this
.
page
++
;
this
.
getLists
(
this
.
classId
,
this
.
page
,
this
.
num
);
}
,
getLists
(
classId
,
page
,
num
)
{
var
url
=
__BASE_URL__
+
'home/get-course-lists?classId='
+
classId
+
'&page='
+
page
+
'&num='
+
num
;
var
self
=
this
;
$
.
getJSON
(
url
,
function
(
reponse
)
{
if
(
reponse
.
status
===
true
)
{
var
result
=
reponse
.
data
;
self
.
count
=
result
.
count
;
self
.
lists
=
self
.
lists
.
concat
(
result
.
data
);
self
.
more
=
(
self
.
count
>
self
.
lists
.
length
);
}
else
{
layer
.
alert
(
reponse
.
message
,
{
'icon'
:
2
,
'title'
:
'提示'
})
}
}).
error
(
function
()
{
layer
.
alert
(
'获取推荐课堂列表错误'
,
{
'icon'
:
2
,
'title'
:
'提示'
})
})
}
},
props
:
{
classId
:
{
required
:
true
}
}
,
ready
()
{
this
.
getLists
(
this
.
classId
,
this
.
page
,
this
.
num
);
}
}
</
script
>
src/frontend/web/js/home/components/recommend.vue
0 → 100644
View file @
40e13d49
<
template
>
<div
class=
"swiper-container"
v-if=
"lists.length !== 0"
>
<div
class=
"swiper-wrapper"
>
<div
v-for=
"item in lists"
@
click=
"itemClick(item.id)"
class=
"swiper-slide"
:style=
"
{background: 'url('+getFullPreViewPic(item.preview_pic)+') top center no-repeat'}">
{{
item
.
name
}}
</div>
</div>
<div
class=
"swiper-pagination"
></div>
</div>
</
template
>
<
script
>
require
(
'../../libs/swiper/swiper.min.css'
);
var
Swiper
=
require
(
'../../libs/swiper/swiper.min.js'
);
export
default
{
data
(){
return
{
lists
:
[]
}
},
props
:
{
classId
:
{
required
:
true
}
},
watch
:
{
lists
(){
this
.
$nextTick
(
function
()
{
new
Swiper
(
'.swiper-container'
,
{
pagination
:
'.swiper-pagination'
,
nextButton
:
'.swiper-button-next'
,
prevButton
:
'.swiper-button-prev'
,
paginationClickable
:
true
,
spaceBetween
:
30
,
centeredSlides
:
true
,
autoplay
:
2500
,
autoplayDisableOnInteraction
:
false
});
});
}
},
methods
:
{
itemClick
(
id
){
window
.
location
.
href
=
__BASE_URL__
+
'home/video?courseId='
+
id
;
},
getFullPreViewPic
(
pic
){
return
__QINIU_URL__
+
'/'
+
pic
;
},
getLists
(
classId
){
var
url
=
__BASE_URL__
+
'home/get-recommend-courses?classId='
+
classId
;
var
self
=
this
;
$
.
getJSON
(
url
,
function
(
reponse
)
{
if
(
reponse
.
status
===
true
)
{
self
.
lists
=
reponse
.
data
;
}
else
{
layer
.
alert
(
reponse
.
message
,
{
'icon'
:
2
,
'title'
:
'提示'
})
}
}).
error
(
function
()
{
layer
.
alert
(
'获取推荐课堂列表错误'
,
{
'icon'
:
2
,
'title'
:
'提示'
})
})
}
},
components
:
{},
ready
()
{
this
.
getLists
(
this
.
classId
);
}
}
</
script
>
src/frontend/web/js/home/index.js
View file @
40e13d49
/**
/**
* Created by xiabin on 2016/9/29.
* Created by xiabin on 2016/9/29.
*/
*/
require
(
'expose?videojs!../libs/videojs/video.js'
);
// require('expose?videojs!../libs/videojs/video.js');
require
(
'../libs/videojs/video-js.css'
);
// require('../libs/videojs/video-js.css');
require
(
'../libs/videojs/lang/zh-CN.js'
);
// require('../libs/videojs/lang/zh-CN.js');
// console.log(videojs);
// // console.log(videojs);
// layer.msg('home/index');
// // layer.msg('home/index');
videojs
.
options
.
flash
.
swf
=
__CDN_URL__
+
'assets/videojs/video-js.swf'
;
// videojs.options.flash.swf = __CDN_URL__ + 'assets/videojs/video-js.swf';
window
.
VIDEOJS_NO_BASE_THEME
=
true
;
// window.VIDEOJS_NO_BASE_THEME = true;
//
// videojs("example_video_1").ready(function () {
// var myPlayer = this;
//
// // EXAMPLE: Start playing the video.
// // myPlayer.play();
//
// });
var
Vue
=
require
(
'vue'
);
var
recommend
=
require
(
'./components/recommend.vue'
);
var
courseLists
=
require
(
'./components/course-lists.vue'
);
var
classInfo
=
JSON
.
parse
(
$
(
'#class-info'
).
val
());
videojs
(
"example_video_1"
).
ready
(
function
()
{
var
myPlayer
=
this
;
// EXAMPLE: Start playing the video.
new
Vue
({
// myPlayer.play();
el
:
"#index-container"
,
data
:
{
classId
:
classInfo
.
id
},
components
:
{
recommend
:
recommend
,
courseLists
:
courseLists
}
});
});
\ No newline at end of file
src/frontend/web/js/libs/swiper/swiper.min.css
0 → 100644
View file @
40e13d49
This diff is collapsed.
Click to expand it.
src/frontend/web/js/libs/swiper/swiper.min.js
0 → 100644
View file @
40e13d49
This diff is collapsed.
Click to expand it.
src/frontend/web/webpack.config.js
View file @
40e13d49
...
@@ -12,6 +12,7 @@ var entry = {
...
@@ -12,6 +12,7 @@ var entry = {
vendor
:
[
"jquery"
,
"vue"
,
js_dir
+
"/utils/layer"
,
js_dir
+
"/libs/global.js"
],
vendor
:
[
"jquery"
,
"vue"
,
js_dir
+
"/utils/layer"
,
js_dir
+
"/libs/global.js"
],
login_css
:
[
css_dir
+
'/login.css'
],
login_css
:
[
css_dir
+
'/login.css'
],
style
:
[
css_dir
+
'/reset.css'
,
css_dir
+
'/style.css'
],
style
:
[
css_dir
+
'/reset.css'
,
css_dir
+
'/style.css'
],
main
:
[
css_dir
+
'/main.css'
],
signup
:
[
js_dir
+
'/site/signup.js'
],
signup
:
[
js_dir
+
'/site/signup.js'
],
login
:
[
js_dir
+
'/site/login.js'
],
login
:
[
js_dir
+
'/site/login.js'
],
request_password_reset
:
[
js_dir
+
'/site/request_password_reset'
],
request_password_reset
:
[
js_dir
+
'/site/request_password_reset'
],
...
...
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