|
|
@ -1,18 +1,10 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="wrap"> |
|
|
|
<div class="wrap"> |
|
|
|
<!-- <el-card shadow="hover" |
|
|
|
|
|
|
|
class="m-b-20"> |
|
|
|
|
|
|
|
<div class="flex-between"> |
|
|
|
|
|
|
|
<el-page-header @back="$router.back()" |
|
|
|
|
|
|
|
:content="form.mall.productName"></el-page-header> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-card> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="inner"> |
|
|
|
<div class="inner"> |
|
|
|
<Breadcrumb ref="breadcrumb" |
|
|
|
<Breadcrumb ref="breadcrumb" |
|
|
|
:data.sync="routes" /> |
|
|
|
:data.sync="routes" /> |
|
|
|
<div class="top"> |
|
|
|
<div class="top"> |
|
|
|
<el-carousel class="pics" |
|
|
|
<el-carousel class="pics fadeInLeft" |
|
|
|
:interval="6000" |
|
|
|
:interval="6000" |
|
|
|
height="278px" |
|
|
|
height="278px" |
|
|
|
:arrow="form.pics.length > 1 ? 'hover' : 'never'" |
|
|
|
:arrow="form.pics.length > 1 ? 'hover' : 'never'" |
|
|
@ -25,7 +17,7 @@ |
|
|
|
</el-image> |
|
|
|
</el-image> |
|
|
|
</el-carousel-item> |
|
|
|
</el-carousel-item> |
|
|
|
</el-carousel> |
|
|
|
</el-carousel> |
|
|
|
<div class="right" |
|
|
|
<div class="right fadeInRight" |
|
|
|
id="fields"> |
|
|
|
id="fields"> |
|
|
|
<h6>{{ form.mall.productName }}</h6> |
|
|
|
<h6>{{ form.mall.productName }}</h6> |
|
|
|
<div v-if="isCourse" |
|
|
|
<div v-if="isCourse" |
|
|
@ -90,13 +82,13 @@ |
|
|
|
<div class="course" |
|
|
|
<div class="course" |
|
|
|
id="part0"> |
|
|
|
id="part0"> |
|
|
|
<div class="detail"> |
|
|
|
<div class="detail"> |
|
|
|
<ul class="tab"> |
|
|
|
<ul class="tab fadeInDown"> |
|
|
|
<li v-for="(tab, i) in tabs" |
|
|
|
<li v-for="(tab, i) in tabs" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
:class="{active: curTab === tab.id}" |
|
|
|
:class="{active: curTab === tab.id}" |
|
|
|
@click="tabChange(tab)">{{ tab.name }}</li> |
|
|
|
@click="tabChange(tab)">{{ tab.name }}</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div class="courses"> |
|
|
|
<div class="courses fadeInUp"> |
|
|
|
<div class="des" |
|
|
|
<div class="des" |
|
|
|
v-html="form.mall.detailedIntroduction"></div> |
|
|
|
v-html="form.mall.detailedIntroduction"></div> |
|
|
|
<div class="chapter" |
|
|
|
<div class="chapter" |
|
|
@ -138,8 +130,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="products"> |
|
|
|
<div class="products"> |
|
|
|
<h6>热门产品推荐</h6> |
|
|
|
<h6 class="fadeInUp">热门产品推荐</h6> |
|
|
|
<ul class="product"> |
|
|
|
<ul class="product fadeInDown"> |
|
|
|
<li v-for="(item, i) in hots" |
|
|
|
<li v-for="(item, i) in hots" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
@click="toDetail(item.mallId)"> |
|
|
|
@click="toDetail(item.mallId)"> |
|
|
@ -290,13 +282,6 @@ export default { |
|
|
|
this.qrcodeTop = (height > 0 ? height : 0) + 'px' |
|
|
|
this.qrcodeTop = (height > 0 ? height : 0) + 'px' |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
this.getHot() |
|
|
|
this.getHot() |
|
|
|
ScrollReveal().reveal('.products', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: 'bottom', // 动画开始的方向 |
|
|
|
|
|
|
|
// distance: '300px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
scale: 0.8, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 产品详情 |
|
|
|
// 产品详情 |
|
|
@ -327,6 +312,7 @@ export default { |
|
|
|
e.mall.associatedProduct && this.getChapter() |
|
|
|
e.mall.associatedProduct && this.getChapter() |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = document.querySelector('#fields').clientHeight + 'px' |
|
|
|
this.height = document.querySelector('#fields').clientHeight + 'px' |
|
|
|
|
|
|
|
this.initAnimate() |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -335,6 +321,84 @@ export default { |
|
|
|
let res = await this.$get(this.api.curriculumChapter + '/' + this.form.mall.associatedProduct) |
|
|
|
let res = await this.$get(this.api.curriculumChapter + '/' + this.form.mall.associatedProduct) |
|
|
|
this.chapterList = res.chapterList |
|
|
|
this.chapterList = res.chapterList |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 初始化动画 |
|
|
|
|
|
|
|
initAnimate () { |
|
|
|
|
|
|
|
const sr = ScrollReveal() |
|
|
|
|
|
|
|
sr.reveal('.animate', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
// origin: 'bottom', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '50px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sr.reveal('.fadeInUp', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: 'top', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '100px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
// scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sr.reveal('.fadeInDown', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: 'bottom', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '100px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
// scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ScrollReveal().reveal('.fadeInDown0', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: 'bottom', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '150px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
// scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ScrollReveal().reveal('.fadeInDown1', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: 'bottom', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '150px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
delay: 100, |
|
|
|
|
|
|
|
// scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ScrollReveal().reveal('.fadeInDown2', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: 'bottom', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '150px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
delay: 200, |
|
|
|
|
|
|
|
// scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sr.reveal('.fadeInLeft', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: this.$store.getters.getModelType ? 'left' : 'top', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '100px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
// scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sr.reveal('.fadeInRight', { |
|
|
|
|
|
|
|
reset: true, // 滚动鼠标时,动画开关(如果为true, 动画可以执行n次) |
|
|
|
|
|
|
|
origin: this.$store.getters.getModelType ? 'right' : 'bottom', // 动画开始的方向 |
|
|
|
|
|
|
|
distance: '100px',//移动距离 |
|
|
|
|
|
|
|
duration: 1000, // 动画持续时间 |
|
|
|
|
|
|
|
// scale: 0.8, |
|
|
|
|
|
|
|
// viewFactor: 100, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// tab切换 |
|
|
|
// tab切换 |
|
|
|
tabChange ({ id }) { |
|
|
|
tabChange ({ id }) { |
|
|
|
this.curTab = id |
|
|
|
this.curTab = id |
|
|
|