626

parent 1f95d35e
......@@ -446,10 +446,7 @@ export default {
Toast.clear()
},
initPage() {
// sessionStorage.
// console.log(this.couponInfo.money)
// debugger
// console.log(ss)
let that = this
getCourseInfoApi().then(res =>{
console.log(res,'459')
......@@ -495,9 +492,6 @@ export default {
this.$sa.track("view61tipshadow", {});
this.$store.dispatch('setCouponShadow',false)
}
// if(!localStorage.getItem('activity')){
// localStorage.setItem('activity');
// }
console.log(course)
// console.log(Date.parse(new Date()))
// console.log(Date.parse(new Date('2019/6/4')))
......
......@@ -32,7 +32,6 @@
</div>
</div>
</template>
<script>
import {subUserLessonApi,getUserWatchApi,getwechatParam} from "../../service/api";
import {Toast} from 'vant'
......
......@@ -136,16 +136,21 @@
let itemBoxWidth = Number(getComputedStyle(document.querySelector('.itemBox')).width.replace('px',''))
console.log(itemBoxWidth)
let difWidth = (parentwidth/2)-45
if(index*this.videoWidth>difWidth){
let indexS = index - 1
if((index*this.videoWidth-difWidth)<(itemBoxWidth-parentwidth)){
this.$refs.scrollDom.scrollTo(-((index*this.videoWidth)-difWidth),0,this.videoWidth)
if(this.showObj.video.length>3){
if(index*this.videoWidth>difWidth){
console.log(140)
let indexS = index - 1
if((index*this.videoWidth-difWidth)<(itemBoxWidth-parentwidth)){
this.$refs.scrollDom.scrollTo(-((index*this.videoWidth)-difWidth),0,this.videoWidth)
}else{
this.$refs.scrollDom.scrollTo(-(itemBoxWidth-parentwidth),0,this.videoWidth)
}
}else{
this.$refs.scrollDom.scrollTo(-(itemBoxWidth-parentwidth),0,this.videoWidth)
console.log(148)
this.$refs.scrollDom.scrollTo(0,0,this.videoWidth)
}
}else{
this.$refs.scrollDom.scrollTo(0,0,this.videoWidth)
}
},
swiperback(index){
this.videoIndex = index
......
......@@ -44,8 +44,7 @@
:initial-swipe="tabIndex-1"
:duration="1000"
class="scroll"
@change="swipeChange"
>
@change="swipeChange">
<van-swipe-item @click="swipeItemClick">
<scroll
:style="{maxHeight: height +'px'}"
......
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