var touchstartY;
var getData = [];
var pageArr = [
  [
    [],
    []
  ],//手机门店
  [
    [],
    []
  ],//家电门店
  [
    ["criterion-shop","criterion-showarea","criterion-money","compliance","criterion-allDetails"],
    []
  ],//二轮车门店
]
export function data(e){
  console.log(e)
  getData = e;
}
export function touchstart(e){
    // console.log(e)
    touchstartY = e.changedTouches[0].clientY;
  console.log(touchstartY)
}
export function touchend(e){
  // console.log(pageArr[getData[0]][getData[1]][getData[2]])
  if(e.changedTouches[0].clientY-touchstartY>=50){
    console.log("下滑");
    if(getData[2]>0){
      console.log("上一页")
      window.location.href = "http://localhost:8080/#/"+pageArr[getData[0]][getData[1]][getData[2]-1]
    }
  }else if(touchstartY-e.changedTouches[0].clientY>=50){
    console.log("上滑");
    var len = pageArr[getData[0]][getData[1]].length-1;
    if(getData[2]<len){
      console.log("下一页")
      window.location.href = "http://localhost:8080/#/"+pageArr[getData[0]][getData[1]][getData[2]+1]
    }
  }
}