Sanakey
2022-10-28 0e185fa6db8e3f4209e63c079750a26fe3feddaa
提交 | 用户 | age
d98d05 1 // pages/filterProduct.js
S 2 const app = getApp();
3 import utils from '../../utils/util';
4 import {getElementAttr} from '../../utils/tools';
5 import {FilterModel} from "../../models/filter";
6
7 const filterModel = new FilterModel();
8 Page({
9
10   /**
11    * 页面的初始数据
12    */
13   data: {
14     navData: [{
15       item: '产品介绍',
16       index: 0
17     }, {
18       item: '高清大图',
19       index: 1
20     }],
21     num: 1,
22     list: [
23       {
24         name:'客厅',
25         img:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png']
26       },
27       {
28         name:'卧室',
29         img:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png']
30       },
31       {
32         name:'厨房',
33         img:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png']
34       },
35     ],
36     conlist:['https://cn.vuejs.org/images/components.png','https://cn.vuejs.org/images/components.png'],
37     current:0,
38     items:[
39       {
40         name:'90*90cm',
41         value:'90*90cm',
42         checked: true,
43       },
44       {
45         name:'90*180cm',
46         value:'90*180cm',
47         checked: false,
48       },
49     ]
50   },
51
52   /**
53    * 生命周期函数--监听页面加载
54    */
55   onLoad: function (options) {
56     filterModel.getFilterRes().then((res) => {
57       this.setData({
58         someData: res.ShowGroup[1].list,
59       });
60     });
61   },
62
63   /**
64    * 生命周期函数--监听页面初次渲染完成
65    */
66   onReady: function () {
67
68   },
69
70   /**
71    * 生命周期函数--监听页面显示
72    */
73   onShow: function () {
74
75   },
76
77   //产品,案例菜单点击
78   navTap(e) {
79     this.setData({
80       num: e.currentTarget.dataset.num
81     });
82
83   },
84
85   eventchange(e){
86     console.log('eventchange',e);
87     this.setData({
88       current: e.detail.current
89     })
90   },
91   radioChange(e){
92     console.log('radioChange',e);
93     this.setData({
94       current: e.target.dataset.current
95     })
96   },
97
98   /**
99    * 生命周期函数--监听页面隐藏
100    */
101   onHide: function () {
102
103   },
104
105   /**
106    * 生命周期函数--监听页面卸载
107    */
108   onUnload: function () {
109
110   },
111
112   /**
113    * 页面相关事件处理函数--监听用户下拉动作
114    */
115   onPullDownRefresh: function () {
116
117   },
118
119   /**
120    * 页面上拉触底事件的处理函数
121    */
122   onReachBottom: function () {
123
124   },
125
126   // /**
127   //  * 用户点击右上角分享
128   //  */
129   // onShareAppMessage: function () {
130   //
131   // }
132 });