// pages/filterProduct.js const app = getApp(); import utils from '../../utils/util'; import {getElementAttr} from '../../utils/tools'; import {FilterModel} from "../../models/filter"; const filterModel = new FilterModel(); Page({ /** * 页面的初始数据 */ data: { navData: [{ item: '产品介绍', index: 0 }, { item: '高清大图', index: 1 }], num: 1, list: [ { name:'客厅', img:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png'] }, { name:'卧室', img:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png'] }, { name:'厨房', img:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png'] }, ], conlist:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png'], current:0, items:[ { name:'90*90cm', value:'90*90cm', checked: true, }, { name:'90*180cm', value:'90*180cm', checked: false, }, ] }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { filterModel.getFilterRes().then((res) => { this.setData({ someData: res.ShowGroup[1].list, }); }); }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, //产品,案例菜单点击 navTap(e) { this.setData({ num: e.currentTarget.dataset.num }); }, eventchange(e){ console.log('eventchange',e); this.setData({ current: e.detail.current }) }, radioChange(e){ console.log('radioChange',e); this.setData({ current: e.target.dataset.current }) }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, // /** // * 用户点击右上角分享 // */ // onShareAppMessage: function () { // // } });