Commit acf7124c by 高淑倩

add: bottom 左划事件

parent 52a6e49f
......@@ -15,6 +15,8 @@ wxService.page({
pages:[],
render: null, // 渲染页面数据对象(安全渲染)
renderPageOver: false, // 渲染页面结束
startX: 0,
startY: 0
},
/**
......@@ -54,6 +56,22 @@ wxService.page({
onShow: function () {
},
touchStart(e) {
this.setData({
startX: e.changedTouches[0].clientX,
startY: e.changedTouches[0].clientY
});
},
touchEnd(e) {
let x = e.changedTouches[0].clientX;
let y = e.changedTouches[0].clientY;
// endX, endY, startX, startY
const {startX, startY} = this.data
let isTouchLeft = utils.getTouchData(x, y, startX, startY)
if( isTouchLeft == left) {
}
},
// page 信息
initPage(){
this.setData({
......
......@@ -21,7 +21,7 @@
</view>
<!-- 底部 -->
<view class="images-tab" wx:if="{{pItem.type == 4}}">
<view class='footer-content' style="background:{{pItem.bottom.color}};color:{{pItem.bottom.color}}">
<view class='footer-content' style="background:{{pItem.bottom.color}};color:{{pItem.bottom.color}}" catchtouchstart='touchStart' catchtouchend="touchEnd">
<text class="footer-arrow" style="color:{{pItem.bottom.fontColor}}"><<</text>
<text class='footer-text' style="color:{{pItem.bottom.fontColor}}">{{pItem.bottom.title}}</text>
</view>
......
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