Commit c05cc0bf by 前端

箭头

1 parent 343e2d2b
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<!-- 左箭头 end --> <!-- 左箭头 end -->
<!-- 右箭头 开始 --> <!-- 右箭头 开始 -->
<div class="right_arrow" v-if="current < 5"> <div class="right_arrow">
<div class="arrow_inner" @click="rightClickEvent"> <div class="arrow_inner" @click="rightClickEvent">
<img src="@/assets/images/arrow_right.png" class="img" alt="" /> <img src="@/assets/images/arrow_right.png" class="img" alt="" />
<img src="@/assets/images/arrow_circle.png" class="circle" alt="" /> <img src="@/assets/images/arrow_circle.png" class="circle" alt="" />
...@@ -122,4 +122,4 @@ export default { ...@@ -122,4 +122,4 @@ export default {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -77,25 +77,25 @@ export default { ...@@ -77,25 +77,25 @@ export default {
this.activeName = data this.activeName = data
}) })
document.addEventListener('touchstart', function (event) { // document.addEventListener('touchstart', function (event) {
_this.startX = event.touches[0].pageX // _this.startX = event.touches[0].pageX
}) // })
document.addEventListener('touchmove', function (event) { // document.addEventListener('touchmove', function (event) {
_this.moveX = event.touches[0].pageX - _this.startX // _this.moveX = event.touches[0].pageX - _this.startX
}) // })
document.addEventListener('touchend', function () { // document.addEventListener('touchend', function () {
let m = _this.moveX // let m = _this.moveX
if (m < -30) { // if (m < -30) {
console.log('向左滑动事件被触发!') // console.log('向左滑动事件被触发!')
_this.nextClick() // _this.nextClick()
} else if (m > 30) { // } else if (m > 30) {
console.log('向右滑动事件被触发!') // console.log('向右滑动事件被触发!')
_this.prevClick() // _this.prevClick()
} // }
}) // })
}, },
methods: { methods: {
// selectVal(val) { // selectVal(val) {
...@@ -120,9 +120,10 @@ export default { ...@@ -120,9 +120,10 @@ export default {
//this.current = 0 //this.current = 0
// window.open('https://bi-view.beta.glsx.com.cn/#/home', '_blank') // window.open('https://bi-view.beta.glsx.com.cn/#/home', '_blank')
// return false // return false
this.$router.push({ // this.$router.push({
name: 'boutiqueDetail' // name: 'boutiqueDetail'
}) // })
index = -1
} }
this.transitionName = 'slide-left' this.transitionName = 'slide-left'
this.current = index + 1 this.current = index + 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!