626

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