Commit c8cb72fa authored by 汪波's avatar 汪波

Merge branch 'dev' of http://gitlab.fingerage.com:999/xiabin/zuiketang into dev

# Conflicts:
#	src/frontend/views/layouts/centerHeader.php
#	src/frontend/views/layouts/main.php
parent 59a50601
...@@ -94,6 +94,7 @@ class SiteController extends Controller ...@@ -94,6 +94,7 @@ class SiteController extends Controller
*/ */
public function actionLogin() public function actionLogin()
{ {
if (!Yii::$app->user->isGuest) { if (!Yii::$app->user->isGuest) {
return $this->goHome(); return $this->goHome();
} }
......
...@@ -16,5 +16,14 @@ $this->registerMetaTag(['name' => 'keywords', 'content' => $classInfo['name']]); ...@@ -16,5 +16,14 @@ $this->registerMetaTag(['name' => 'keywords', 'content' => $classInfo['name']]);
</div> </div>
<script type='text/javascript'>
$(function () {
turmbw = $('.video-img-box img').width();
turmbh = turmbw*5/9;
$('.video-img-box img,.play-mask').css('height',turmbh);
$('.play-mask').css('padding-top',turmbh/2-20);
})
</script>
<div class="copyright m-t-20">© 2016 c.pp.cc 皖ICP备13046642号</div> <div class="copyright m-t-20">© 2016 c.pp.cc 皖ICP备13046642号</div>
...@@ -17,7 +17,6 @@ $this->beginContent('@app/views/layouts/center.php'); ...@@ -17,7 +17,6 @@ $this->beginContent('@app/views/layouts/center.php');
<!-- 左侧菜单 --> <!-- 左侧菜单 -->
<ul class="simple-menu"> <ul class="simple-menu">
<li <?= (Yii::$app->controller->id === 'user-center' and Yii::$app->controller->action->id === 'info') ? 'class = "active"' : '' ?>> <li <?= (Yii::$app->controller->id === 'user-center' and Yii::$app->controller->action->id === 'info') ? 'class = "active"' : '' ?>>
<a href="<?= $baseUrl . '/user-center/' ?>"><i class="icon-person_pin"></i>个人信息</a> <a href="<?= $baseUrl . '/user-center/' ?>"><i class="icon-person_pin"></i>个人信息</a>
</li> </li>
...@@ -30,15 +29,11 @@ $this->beginContent('@app/views/layouts/center.php'); ...@@ -30,15 +29,11 @@ $this->beginContent('@app/views/layouts/center.php');
<li <?= (Yii::$app->controller->id === 'user-center' and Yii::$app->controller->action->id === 'browse-record') ? 'class = "active"' : '' ?>> <li <?= (Yii::$app->controller->id === 'user-center' and Yii::$app->controller->action->id === 'browse-record') ? 'class = "active"' : '' ?>>
<a href="<?= $baseUrl . '/user-center/browse-record' ?>"><i class="icon-visibility"></i>浏览记录</a> <a href="<?= $baseUrl . '/user-center/browse-record' ?>"><i class="icon-visibility"></i>浏览记录</a>
</li> </li>
<li><a href="<?=$baseUrl .'/my-course'?>"><i class="icon-school"></i>我的课堂</a></li>
<!--
<li><a href="<?/*=$baseUrl .'/my-course'*/?>"><i class="icon-school"></i>我的课堂</a></li>
<li><a href="<?/*=$baseUrl .'/site/logout'*/?>"><i class="icon-power_settings_new"></i>退出登录</a></li>
-->
</ul> </ul>
<div class="apply-class"> <div class="apply-class">
<button class="btn btn-danger" onclick="location.href='/classes-info/apply';">申请课堂</button> <button class="btn btn-danger" onclick="location.href='/classes-info/apply';">申请课堂</button>
<button class="btn btn-primary" onclick="location.href='/my-course';">我的课堂</button>
</div> </div>
<a class="loginout" href="<?=$baseUrl .'/site/logout'?>"><i class="icon-power_settings_new"></i>退出登录</a> <a class="loginout" href="<?=$baseUrl .'/site/logout'?>"><i class="icon-power_settings_new"></i>退出登录</a>
......
...@@ -61,3 +61,12 @@ $this->title = '已购课程'; ...@@ -61,3 +61,12 @@ $this->title = '已购课程';
</div> </div>
<?php endif;?> <?php endif;?>
<script type='text/javascript'>
$(function () {
turmbw = $('.video-img-box img').width();
turmbh = turmbw*5/9;
$('.video-img-box img,.play-mask').css('height',turmbh);
$('.play-mask').css('padding-top',turmbh/2-20);
})
</script>
...@@ -6,6 +6,9 @@ body { ...@@ -6,6 +6,9 @@ body {
a,a:hover,a:link { a,a:hover,a:link {
text-decoration: none; text-decoration: none;
} }
.mx900 {
max-width: 900px!important;
}
/*icomoon*/ /*icomoon*/
@font-face { @font-face {
...@@ -303,8 +306,6 @@ a,a:hover,a:link { ...@@ -303,8 +306,6 @@ a,a:hover,a:link {
/* Swiper幻灯 */ /* Swiper幻灯 */
.swiper-container { .swiper-container {
width: 100%;
height: 500px;
} }
.swiper-slide { .swiper-slide {
text-align: center; text-align: center;
...@@ -325,14 +326,17 @@ a,a:hover,a:link { ...@@ -325,14 +326,17 @@ a,a:hover,a:link {
-webkit-align-items: center; -webkit-align-items: center;
align-items: center; align-items: center;
} }
.swiper-slide img {
width: 100%;
}
/*视频列表*/ /*视频列表*/
.v-list { .v-list {
margin-top: 20px; margin-top: 20px;
} }
.v-main-box { .v-main-box {
padding-bottom: 10px;
background-color: #fff; background-color: #fff;
height: 300px;
margin-bottom: 20px; margin-bottom: 20px;
-webkit-transition: all 0.4s ease; -webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease; -o-transition: all 0.4s ease;
...@@ -341,12 +345,13 @@ a,a:hover,a:link { ...@@ -341,12 +345,13 @@ a,a:hover,a:link {
.v-screen { .v-screen {
position: relative; position: relative;
width: 100%; width: 100%;
height: 200px;
overflow: hidden; overflow: hidden;
} }
.v-screen a { .v-screen a {
position: relative; position: relative;
display: block; display: block;
height: 180px;
overflow: hidden;
} }
.v-screen > span { .v-screen > span {
...@@ -369,12 +374,10 @@ a,a:hover,a:link { ...@@ -369,12 +374,10 @@ a,a:hover,a:link {
.v-foot, .v-foot,
.v-teacher-list { .v-teacher-list {
padding: 0 10px; padding: 0 10px;
height: 22px;
line-height: 22px;
} }
.v-tit { .v-tit {
height: 40px; height: 40px;
line-height: 40px; line-height: 45px;
font-size: 14px; font-size: 14px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -383,6 +386,8 @@ a,a:hover,a:link { ...@@ -383,6 +386,8 @@ a,a:hover,a:link {
.v-teacher-list { .v-teacher-list {
font-size: 12px; font-size: 12px;
color: #666; color: #666;
height: 22px;
line-height: 22px;
} }
.v-tit a { .v-tit a {
color: #333333; color: #333333;
...@@ -411,18 +416,17 @@ a,a:hover,a:link { ...@@ -411,18 +416,17 @@ a,a:hover,a:link {
} }
.v-main-box:hover .play-mask { .v-main-box:hover .play-mask {
display: inline-block; display: inline-block;
line-height: 200px;
} }
.play-mask { .play-mask {
display: none; display: none;
position: absolute; position: absolute;
background-color: rgba(0,0,0,.3); background-color: rgba(0,0,0,.3);
width: 100%; width: 100%;
height: 200px;
left: 0; left: 0;
top: 0; top: 0;
height: 180px;
line-height: 180px;
text-align: center; text-align: center;
line-height: 200px;
font-size: 64px; font-size: 64px;
color: #fff; color: #fff;
-webkit-transition: all 0.4s ease; -webkit-transition: all 0.4s ease;
......
...@@ -1181,7 +1181,7 @@ textarea.input-r-control { ...@@ -1181,7 +1181,7 @@ textarea.input-r-control {
.sm-box .price { .sm-box .price {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
color: #f11300; color: #666;
} }
.play-mask { .play-mask {
position: absolute; position: absolute;
......
<template> <template>
<div class="container v-list" v-show="lists.length > 0"> <div class="container v-list mx900" v-show="lists.length > 0">
<div class="row"> <div class="row">
<div v-for="(index,item) in lists" class="col-md-4"> <div v-for="(index,item) in lists" class="col-md-4">
<div class="v-main-box"> <div class="v-main-box">
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
</div> </div>
<div class="v-tit"><a @click="itemClick(item.id)" href="javascript:;">{{item.name}}</a></div> <div class="v-tit"><a @click="itemClick(item.id)" href="javascript:;">{{item.name}}</a></div>
<div v-if="item.teachers.length > 0" class="v-teacher-list"> <div class="v-teacher-list">
讲师:{{getTeachers(index)}} <span v-if="item.teachers.length > 0">讲师:{{getTeachers(index)}}</span>
</div> </div>
<div class="v-foot"> <div class="v-foot">
......
<template> <template>
<div class="container m-t-20"> <div class="container m-t-20 mx900">
<div class="swiper-container" v-if="lists.length !== 0"> <div class="swiper-container" id="getWidth" v-if="lists.length !== 0">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div v-for="item in lists" @click="itemClick(item.id)" class="swiper-slide" <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}}-->
{{item.name}} <img :src="getFullPreViewPic(item.preview_pic)">
</div> </div>
</div> </div>
<div class="swiper-pagination"></div> <div class="swiper-pagination"></div>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
watch: { watch: {
lists(){ lists(){
this.$nextTick(function () { this.$nextTick(function () {
new Swiper('.swiper-container', { var mySwiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination', pagination: '.swiper-pagination',
nextButton: '.swiper-button-next', nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev', prevButton: '.swiper-button-prev',
...@@ -38,8 +38,10 @@ ...@@ -38,8 +38,10 @@
spaceBetween: 30, spaceBetween: 30,
centeredSlides: true, centeredSlides: true,
autoplay: 2500, autoplay: 2500,
autoHeight:true,
autoplayDisableOnInteraction: false autoplayDisableOnInteraction: false
}); });
}); });
} }
}, },
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<div class="d-i-b" v-if="addFormShow"> <div class="d-i-b" v-if="addFormShow">
<input type="text" class="input-r-control reset-input" placeholder="请输入讲师名称" v-model="newName" v-el:nameInput> <input type="text" class="input-r-control reset-input" placeholder="请输入讲师名称" v-model="newName" v-el:nameInput>
<button type="button" class="btn btn-nobg" @click="addTeacher">保存</button> <button type="button" class="btn btn-nobg" @click="addTeacher">保存</button>
<button type="button" class="btn btn-nobg">取消</button>
</div> </div>
<span class="m-l-10" v-else><a href="javascript:;" @click="showAddForm">+ 添加讲师</a></span> <span class="m-l-10" v-else><a href="javascript:;" @click="showAddForm">+ 添加讲师</a></span>
</div> </div>
......
<template> <template>
<div id="edit-container" class="add-box" v-if="showEdit"> <div id="edit-container" class="add-box" v-if="showEdit">
<div class="add-box-main"> <div class="add-box-main">
<div class="tit">基本信息</div> <div class="tit">个人信息</div>
<avatar-upload :avatar="avatarsrc" :uptoken="publicToken"></avatar-upload> <avatar-upload :avatar="avatarsrc" :uptoken="publicToken"></avatar-upload>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div v-if="!showEdit" id="normal-container" class="add-box"> <div v-if="!showEdit" id="normal-container" class="add-box">
<div class="add-box-main"> <div class="add-box-main">
<div class="tit">基本信息</div> <div class="tit">个人信息</div>
<div class="upload-avatar"> <div class="upload-avatar">
<img id="avatar-uploader" <img id="avatar-uploader"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment