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.
151 lines
2.4 KiB
151 lines
2.4 KiB
// pages/cate/cate.js
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
index:0,
|
|
pros:[
|
|
{
|
|
url:"/images/文学艺术/25fbf9fb-a3a4-40aa-9df3-91b3914cd31e.webp",
|
|
name:""
|
|
},
|
|
{
|
|
url:"/images/文学艺术/2fd23edd-a9ed-41ba-8a99-f175b83f9496.webp",
|
|
name:""
|
|
},
|
|
{
|
|
url:"/images/文学艺术/4449269-fm.webp",
|
|
name:""
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
navlick(event){
|
|
console.log("进入点击事件");
|
|
console.log(event.target.dataset.index);
|
|
var index = event.target.dataset.index;
|
|
var result = null;
|
|
// 判定点击结果 switch case
|
|
if(index==0){
|
|
result=[
|
|
{
|
|
url:"/images/算盘.jpg",
|
|
name:""
|
|
},
|
|
{
|
|
url:"/images/算筹.jpg",
|
|
name:""
|
|
},
|
|
{
|
|
url:"/images/规和矩.jpg",
|
|
name:""
|
|
},
|
|
|
|
]
|
|
}else if(index==1){
|
|
result=[{
|
|
url:"/images/九章算术.jpg",
|
|
name:"九章算术"
|
|
},
|
|
{
|
|
url:"/images/海岛算经.jpg",
|
|
name:"海岛算经"
|
|
},
|
|
{
|
|
url:"/images/算法大全.jpg",
|
|
name:"算法大全"
|
|
},
|
|
{
|
|
url:"/images/1.jpg",
|
|
name:"中国术数概论"
|
|
},
|
|
|
|
{
|
|
url:"/images/3.jpg",
|
|
name:"中国古代史籍校读法"
|
|
},
|
|
{
|
|
url:"/images/2.jpg",
|
|
name:"古代玄秘数术"
|
|
},
|
|
{
|
|
url:"/images/4.jpg",
|
|
name:"中国传统数学史话"
|
|
},
|
|
{
|
|
url:"/images/5.jpg",
|
|
name:"中国数学史大系"
|
|
},
|
|
{
|
|
url:"/images/6.jpg",
|
|
name:"珠算入门"
|
|
},
|
|
|
|
]
|
|
}
|
|
|
|
this.setData({
|
|
index:index,
|
|
pros:result
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
}
|
|
}) |