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