You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
1.8 KiB

// pages/history/history.js
Page({
/**
* 页面的初始数据
*/
data: {
index:0,
pros:[
{
url:"/pages/images/11.jpg"
},
{
url:"/pages/images/22.jpg"
},
{
url:"/pages/images/33.jpg"
},
{
url:"/pages/images/44.jpg"
},
{
url:"/pages/images/55.jpg"
}
]
},
navclick(event){
console.log("进入点击事件");
console.log(event.target.dataset.index);
this.setData({
index:event.target.dataset.index
})
 var index =event.target.dataset.index;
   var result=null;
  if(index==0){
    result=[
{
url:"/pages/images/11.jpg"
},
{
url:"/pages/images/22.jpg"
},
{
url:"/pages/images/33.jpg"
},
{
url:"/pages/images/44.jpg"
},
{
url:"/pages/images/55.jpg"
}
  ];
  }else if(index==1){
    result=[
{
url:"/pages/images/21.png"
},
{
url:"/pages/images/22.png"
},
{
url:"/pages/images/23.png"
},
{
url:"/pages/images/24.png"
},
{
url:"/pages/images/25.png"
},
{
url:"/pages/images/26.png"
},
{
url:"/pages/images/27.png"
},
{
url:"/pages/images/28.png"
}
];
}else{
result=[ {
url:"/pages/images/11.png"
},
{
url:"/pages/images/12.png"
},
{
url:"/pages/images/13.png"
},
{
url:"/pages/images/14.png"
},
{
url:"/pages/images/15.png"
},
{
url:"/pages/images/16.png"
},
{
url:"/pages/images/17.png"
},
{
url:"/pages/images/18.png"
},
{
url:"/pages/images/19.png"
},
{
url:"/pages/images/20.png"
}
]}
 this.setData({
pros:result
})
  }
}
)