Commit f148a2ed by 李伟康

commit

1 parent 81cb7b04
......@@ -22,7 +22,7 @@
客服
</div>
</template>
<template v-if="showOrderBtn">
<!-- <template v-if="showOrderBtn">
<div
class="page-item flex order-move"
@click="to('crowdfunding.orderList')"
......@@ -32,7 +32,7 @@
<div class="sprite-icon icon-order"></div>
订单
</div>
</template>
</template> -->
</div>
<div class="big-img">
<img :src="detail.activityBigImg" />
......
......@@ -62,7 +62,8 @@ export default {
imgList: [],
updata: Date.now(),
lastItemIndex: 0,
itemIndex: 0
itemIndex: 0,
touchFlag: true
}
},
activated () {
......@@ -81,6 +82,7 @@ export default {
}, 1)
} else {
box.scrollLeft = total
this.touchFlag = false
}
}
if (this.lastItemIndex > this.itemIndex) {
......@@ -92,11 +94,18 @@ export default {
}, 1)
} else {
box.scrollLeft = total
this.touchFlag = false
}
}
if (this.lastItemIndex == this.itemIndex) box.scrollLeft = total
if (this.lastItemIndex == this.itemIndex) {
box.scrollLeft = total
this.touchFlag = false
}
},
touchEnd: util.debounce(e => {
if (_this.touchFlag && e.type == 'scroll') return
else _this.touchFlag = true
_this.lastItemIndex = _this.itemIndex
let box = document.getElementsByClassName('img-box')[0]
let { imgList } = _this
......@@ -105,6 +114,7 @@ export default {
let index = (box.scrollLeft / width).toFixed()
let total = index == 0 ? 0 : width * index + (spacing * index)
_this.itemIndex = index
console.log(e)
_this.moveSlow(box.scrollLeft, total)
}, 200),
getOrderList () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!