// pages/food material/food material.js
Page({
data: {
cateItems: [
{
cate_id: 1,
cate_name: "推荐",
ishaveChild: false,
children:
[
// {
// child_id: 1,
// name: '洁面皂',
// image: "http://mz.djmall.xmisp.cn/files/logo/20161208/148117972563.jpg"
// },
// {
// child_id: 2,
// name: '卸妆',
// image: "http://mz.djmall.xmisp.cn/files/logo/20161207/148110444480.jpg"
// },
// {
// child_id: 3,
// name: '洁面乳',
// image: "http://mz.djmall.xmisp.cn/files/logo/20161208/148117973270.jpg"
// },
// {
// child_id: 4,
// name: '面部祛角质',
// image: "http://mz.djmall.xmisp.cn/files/logo/20161208/148117981591.jpg"
// }
]
},
{
cate_id: 2,
cate_name: "肉蛋类",
ishaveChild: true,
children:
[
{
child_id: 1,
image: "/images/foodmaterial/meategg/anchun.jpg"
},
{
child_id: 2,
image: "/images/foodmaterial/meategg/huotui.jpg"
},
{
child_id: 3,
image: "/images/foodmaterial/meategg/ji.jpg"
},
{
child_id: 4,
image: "/images/foodmaterial/meategg/jichi.jpg"
},
{
child_id: 5,
image: "/images/foodmaterial/meategg/jidan.jpg"
},
{
child_id: 6,
image: "/images/foodmaterial/meategg/jixongrou.jpg"
},
{
child_id: 7,
image: "/images/foodmaterial/meategg/larou.jpg"
},
{
child_id: 8,
image: "/images/foodmaterial/meategg/liji.jpg"
}
]
},
{
cate_id: 3,
cate_name: "海鲜类",
ishaveChild: true,
children:
[
{
child_id: 1,
image: "/images/foodmaterial/seafood/baoyu.jpg"
},
{
child_id: 2,
image: "/images/foodmaterial/seafood/caoyu.jpg"
},
{
child_id: 3,
image: "/images/foodmaterial/seafood/daiyu.jpg"
},
{
child_id: 4,
image: "/images/foodmaterial/seafood/diwang.jpg"
}
]
},
{
cate_id: 4,
cate_name: "菌类",
ishaveChild: true,
children:
[
{
child_id: 1,
image: "/images/foodmaterial/jun/jin.jpg"
},
{
child_id: 2,
image: "/images/foodmaterial/jun/m.jpg"
},
{
child_id: 3,
image: "/images/foodmaterial/jun/pinggu.jpg"
},
{
child_id: 4,
image: "/images/foodmaterial/jun/xianggu.jpg"
}
]
},
{
cate_id: 5,
cate_name: "鲜果类",
ishaveChild: true,
children:
[
{
child_id: 1,
image: "/images/foodmaterial/fruit/1.jpg"
},
{
child_id: 2,
image: "/images/foodmaterial/fruit/2.jpg"
},
{
child_id: 3,
image: "/images/foodmaterial/fruit/3.jpg"
},
{
child_id: 4,
image: "/images/foodmaterial/fruit/4.jpg"
}
]
},
{
cate_id: 6,
cate_name: "蔬菜类",
ishaveChild: false,
children: []
},
{
cate_id: 7,
cate_name: "豆制类",
ishaveChild: false,
children: []
},
{
cate_id: 8,
cate_name: "米类",
ishaveChild: false,
children: []
},
{
cate_id: 9,
cate_name: "干果类",
ishaveChild: false,
children: []
},
{
cate_id: 10,
cate_name: "方便面类",
ishaveChild: false,
children: []
}
],
curNav: 1,
curIndex: 0
},
//事件处理函数
switchRightTab: function (e) {
// 获取item项的id,和数组的下标值
let id = e.target.dataset.id,
index = parseInt(e.target.dataset.index);
// 把点击到的某一项,设为当前index
this.setData({
curNav: id,
curIndex: index
})
}
})
甜辣uu
- 粉丝: 9564
- 资源: 1102
最新资源
- 《能源转型投资展望:2025年及长远规划》.pdf
- PPTAAD DADAA
- SM2258XT-BGA144-4BGA180-6L-R1019 三星KLUCG4J1CB B0B1颗粒开盘工具 , EC, 3A, 94, 43, A4, CA 七彩虹SL300这个固件有用
- 基于Java开发的日程管理FlexTime应用设计源码
- 基于JavaScript、CSS、HTML的简易DOM版飞机游戏设计源码
- 【C++初级程序设计·配套源码】第1期-语法基础
- 基于华为消费者业务官网的仿制前端首页设计源码
- 影驰战将PS3111 东芝芯片TT18G23AIN开卡成功分享,图片里面画线的选项很重要
- 基于Java和Vue的kopsoftKANBAN车间电子看板设计源码
- 基于Go语言的SharpWxDump微信取证信息分析设计源码
- 基于C语言的USB光盘资料操作教学源码
- 基于GitHub的TypeScript文档中文翻译设计源码
- 【C++初级程序设计·配套源码】第2期-基本数据类型
- 基于Vue和SpringBoot的企业员工管理系统2.0版本设计源码
- 没用333333333333333333333333333333
- C++ STL 高级教程深入浅出版.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈