Commit 83c0f601 by 李伟康

提交代码

1 parent 0dcfd574
<template> <template>
<div class="layout"> <div class="layout">
<div class="title">左右滑动查看核销凭证</div> <div class="title">左右滑动查看核销凭证</div>
<div class="content">
<div <div
class="img-box flex" class="img-box flex"
:key="updata" :key="updata"
...@@ -32,6 +33,17 @@ ...@@ -32,6 +33,17 @@
</div> </div>
</template> </template>
</div> </div>
<div class="dots x-center text-center">
<template v-for="(i,index) in orderList">
<div
:key="index"
:class="['dots-item',{'active':itemIndex == index}]"
>
</div>
</template>
</div>
</div>
<div class="tips text-center">长按保存图片</div> <div class="tips text-center">长按保存图片</div>
</div> </div>
</template> </template>
...@@ -85,7 +97,7 @@ export default { ...@@ -85,7 +97,7 @@ export default {
box.scrollLeft = total box.scrollLeft = total
} }
} }
if(this.lastItemIndex == this.itemIndex) box.scrollLeft = total if (this.lastItemIndex == this.itemIndex) box.scrollLeft = total
}, },
scroll: util.debounce(e => { scroll: util.debounce(e => {
_this.lastItemIndex = _this.itemIndex _this.lastItemIndex = _this.itemIndex
...@@ -97,7 +109,7 @@ export default { ...@@ -97,7 +109,7 @@ export default {
let total = index == 0 ? 0 : width * index + (spacing * index) let total = index == 0 ? 0 : width * index + (spacing * index)
_this.itemIndex = index _this.itemIndex = index
_this.moveSlow(box.scrollLeft, total) _this.moveSlow(box.scrollLeft, total)
},200), }, 200),
getOrderList () { getOrderList () {
let { id } = this.getLocalStorage('wx_scrm_link_params') let { id } = this.getLocalStorage('wx_scrm_link_params')
shopmallApi.getOrderList(id).then(data => { shopmallApi.getOrderList(id).then(data => {
...@@ -128,6 +140,22 @@ export default { ...@@ -128,6 +140,22 @@ export default {
color: #999999; color: #999999;
padding: 16px 0 8px 20px; padding: 16px 0 8px 20px;
} }
.content {
position: relative;
.dots {
bottom: 15px;
&-item {
width: 5px;
height: 5px;
background: rgba(255, 255, 255, 0.5);
border-radius: 100%;
margin: 0 4px;
}
.active {
background: #ffffff;
}
}
}
.img-box { .img-box {
overflow-x: scroll; overflow-x: scroll;
width: 100%; width: 100%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!