Commit 94caabfe authored by wangwei's avatar wangwei

星星系统

parent 82dec601
<template> <template>
<div> <div>
<div class="unit-block"> <div class="unit-block">
<!--竖屏 主题栏-->
<swiper :options="swiperOption" class="banner" v-if="$route.query.course_type==0" ref="mySwiper"> <swiper :options="swiperOption" class="banner" v-if="$route.query.course_type==0" ref="mySwiper">
<swiper-slide v-for="(data,index) in unitList" :key="index"> <swiper-slide v-for="(data,index) in unitList" :key="index">
<div class="line"></div> <div class="line"></div>
...@@ -27,6 +28,7 @@ ...@@ -27,6 +28,7 @@
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
<!--横屏主题栏-->
<div class="btn-conntent banner-left"> <div class="btn-conntent banner-left">
<img :src="nextToURL" class=""> <img :src="nextToURL" class="">
</div> </div>
...@@ -58,6 +60,7 @@ ...@@ -58,6 +60,7 @@
</swiper-slide> </swiper-slide>
</swiper> </swiper>
</div> </div>
<!--竖屏 课程-->
<div class="lesson-block"> <div class="lesson-block">
<div v-if="noLesson" class="noLesson"> <div v-if="noLesson" class="noLesson">
<img :src="errorURL" /> <img :src="errorURL" />
...@@ -77,7 +80,9 @@ ...@@ -77,7 +80,9 @@
<span v-if="item.push_time === '0000-00-00'">课程还未开始哦</span> <span v-if="item.push_time === '0000-00-00'">课程还未开始哦</span>
</div> </div>
</div> </div>
<div> <div class="star-block">
<img class="star-img" :src="star_act" v-for="s in item.star_num">
<img class="star-img" :src="star_def" v-for="s in 3-item.star_num">
</div> </div>
<div class="icon-block"> <div class="icon-block">
<i <i
...@@ -91,6 +96,7 @@ ...@@ -91,6 +96,7 @@
</div> </div>
</div> </div>
</div> </div>
<!--横屏 课程-->
<div class="lesson-block-hp"> <div class="lesson-block-hp">
<swiper :options="swiperOptionLesson" class="lesson-sw" ref="mySwiperLesson"> <swiper :options="swiperOptionLesson" class="lesson-sw" ref="mySwiperLesson">
<swiper-slide v-for="(item,x) in hpLessonList" :key="x" style="width: 50vh"> <swiper-slide v-for="(item,x) in hpLessonList" :key="x" style="width: 50vh">
...@@ -103,6 +109,10 @@ ...@@ -103,6 +109,10 @@
<div class="lesson-name-hp"> <div class="lesson-name-hp">
{{item.sub_title}} {{item.sub_title}}
</div> </div>
<div class="star-block">
<img class="star-img" :src="star_act" v-for="s in item.star_num">
<img class="star-img" :src="star_def" v-for="s in 3-item.star_num">
</div>
<i class="map money" v-if="item.push_time !== '0000-00-00' && ((hpLessonList[x+1] && hpLessonList[x+1].push_time === '0000-00-00' || ($route.query.course_type == 0 && findUnit(parent_category_id) && findUnit(parent_category_id).status === 2 || $route.query.course_type ==1 ) && x===hpLessonList.length-1 ))"></i> <i class="map money" v-if="item.push_time !== '0000-00-00' && ((hpLessonList[x+1] && hpLessonList[x+1].push_time === '0000-00-00' || ($route.query.course_type == 0 && findUnit(parent_category_id) && findUnit(parent_category_id).status === 2 || $route.query.course_type ==1 ) && x===hpLessonList.length-1 ))"></i>
</div> </div>
</swiper-slide> </swiper-slide>
...@@ -150,6 +160,8 @@ ...@@ -150,6 +160,8 @@
<script> <script>
import {getCourseListApi,getLessonDetailApi,getLessonListApi} from "../../service/api"; import {getCourseListApi,getLessonDetailApi,getLessonListApi} from "../../service/api";
import star_act from '../../assets/newLesson/star_act.png'
import star_def from '../../assets/newLesson/star_def.png'
import guidePage from '../guide/map' import guidePage from '../guide/map'
import guideContent from '../guide/content' import guideContent from '../guide/content'
import diaBGI from '../../assets/newLesson/diaBG.png' import diaBGI from '../../assets/newLesson/diaBG.png'
...@@ -172,6 +184,8 @@ ...@@ -172,6 +184,8 @@
data() { data() {
let that = this; let that = this;
return { return {
star_act:star_act,
star_def:star_def,
shopType:this.$route.query.course_type, shopType:this.$route.query.course_type,
diaBGI:diaBGI, diaBGI:diaBGI,
nextUnitUrl:nextUnitUrl, nextUnitUrl:nextUnitUrl,
...@@ -361,7 +375,7 @@ ...@@ -361,7 +375,7 @@
let index2 = null; let index2 = null;
this.unitList.forEach((i,x)=>{ this.unitList.forEach((i,x)=>{
if(i.category_id ==this.parent_category_id){ if(i.category_id ==this.parent_category_id){
if(x>3){ if(x>=3){
index=x-3 index=x-3
}else{ }else{
index = x index = x
...@@ -553,9 +567,19 @@ ...@@ -553,9 +567,19 @@
border-bottom: 1 * @toVw solid #EEEEEE; border-bottom: 1 * @toVw solid #EEEEEE;
.text-block{ .text-block{
margin-left: 0; margin-left: 0;
width: 150*@toVw;
}
.star-block{
img{
width: 20*@toVw;
height: 20*@toVw;
margin-left: 3*@toVw;
}
} }
.icon-block{ .icon-block{
margin: auto 0; margin: auto 0;
width: 30*@toVw;
text-align: center;
} }
.clock-block{ .clock-block{
...@@ -780,7 +804,14 @@ ...@@ -780,7 +804,14 @@
.money{ .money{
position: absolute; position: absolute;
right: 0; right: 0;
top: calc(88vh - 17.99550225vw); top: calc(88vh - 20.99550225vw);
}
.star-block{
img{
width: 20*@toVw;
height: 20*@toVw;
margin-left: 3*@toVw;
}
} }
display: inline-block; display: inline-block;
width: 100%; width: 100%;
...@@ -817,7 +848,7 @@ ...@@ -817,7 +848,7 @@
color:rgba(0,0,0,1); color:rgba(0,0,0,1);
} }
.lesson-img-hp{ .lesson-img-hp{
margin: calc((100vh - 20.99550225vw) / 2 - 12vh) auto; margin: calc((100vh - 23.99550225vw) / 2 - 12vh) auto;
width: 20vh; width: 20vh;
height: 20vh; height: 20vh;
border-radius: 100*@toVw; border-radius: 100*@toVw;
......
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
this.page_id = 1; this.page_id = 1;
this.nowLesson = { this.nowLesson = {
type:'text', type:'text',
title:1,
content:this.lesson.content.look, content:this.lesson.content.look,
age:this.nowLesson.age age:this.nowLesson.age
}; };
...@@ -105,12 +106,14 @@ ...@@ -105,12 +106,14 @@
if(this.lesson.content.play.type){ if(this.lesson.content.play.type){
this.nowLesson = { this.nowLesson = {
type:'audio', type:'audio',
title:2,
content:this.lesson.content.play, content:this.lesson.content.play,
age:this.nowLesson.age age:this.nowLesson.age
}; };
}else{ }else{
this.nowLesson = { this.nowLesson = {
type:'video', type:'video',
title:2,
content:this.lesson.content.play, content:this.lesson.content.play,
age:this.nowLesson.age age:this.nowLesson.age
}; };
...@@ -121,12 +124,14 @@ ...@@ -121,12 +124,14 @@
if(this.lesson.content.fun.type){ if(this.lesson.content.fun.type){
this.nowLesson = { this.nowLesson = {
type:'audio', type:'audio',
title:3,
content:this.lesson.content.fun, content:this.lesson.content.fun,
age:this.nowLesson.age age:this.nowLesson.age
}; };
}else{ }else{
this.nowLesson = { this.nowLesson = {
type:'video', type:'video',
title:3,
content:this.lesson.content.fun, content:this.lesson.content.fun,
age:this.nowLesson.age age:this.nowLesson.age
}; };
......
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
<div @click="changeAudio()">音频教学</div> <div @click="changeAudio()">音频教学</div>
</div> </div>
</div> </div>
<div class="finish-block">
<img :src="finishStuat">
</div>
</div> </div>
<guide-block/> <guide-block/>
</div> </div>
...@@ -44,6 +47,7 @@ ...@@ -44,6 +47,7 @@
import luolalaila from '../../assets/newLesson/luolalaila.png' import luolalaila from '../../assets/newLesson/luolalaila.png'
import guideBlock from '../guide/video' import guideBlock from '../guide/video'
import tapToAudio from '../../assets/tapToAudio.png' import tapToAudio from '../../assets/tapToAudio.png'
import finishStuat from '../../assets/newLesson/finishStudy.png'
export default { export default {
name: "play", name: "play",
components:{ components:{
...@@ -51,6 +55,7 @@ ...@@ -51,6 +55,7 @@
}, },
data(){ data(){
return{ return{
finishStuat:finishStuat,
ageShow:false, ageShow:false,
showObj:{ showObj:{
video:[], video:[],
...@@ -212,6 +217,18 @@ ...@@ -212,6 +217,18 @@
} }
} }
} }
.finish-block{
position: absolute;
width: 100%;
left: 0;
padding: 0;
margin: 0;
text-align: center;
bottom: 10*@toVw;
img{
width: 202*@toVw;
}
}
} }
} }
.change-block-HP{ .change-block-HP{
......
...@@ -171,7 +171,7 @@ router.beforeEach((to,from,next)=> { ...@@ -171,7 +171,7 @@ router.beforeEach((to,from,next)=> {
next({name:'index'}); next({name:'index'});
} }
}else{ }else{
if(to.name !== 'noWechat') { if(to.name !== 'noWechat' && process.env.NODE_ENV === 'production') {
next({name:'noWechat'}); next({name:'noWechat'});
} }
} }
......
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