| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | product: { |
| | | value: 'all', |
| | | options: [{ |
| | | value: 'all', |
| | | label: '全部产品', |
| | | }, |
| | | { |
| | | value: 'new', |
| | | label: '最新产品', |
| | | }, |
| | | { |
| | | value: 'hot', |
| | | label: '最火产品', |
| | | }, |
| | | ], |
| | | }, |
| | | loading: true, |
| | | hidden: true, |
| | | totalSize: '', |
| | |
| | | sorter: { |
| | | value: 'default', |
| | | }, |
| | | // product: { |
| | | // value: '*', |
| | | // options: [{ |
| | | // value: '*', |
| | | // label: '总分类', |
| | | // }, |
| | | // { |
| | | // value: 'jsek_bFHigherEducation', |
| | | // //重点项目 |
| | | // price: 'jsek_higherEducation', |
| | | // label: '高等教育', |
| | | // }, |
| | | // { |
| | | // value: 'jsek_bFVocationalEducation', |
| | | // //重点项目 |
| | | // price: 'jsek_vocationalEducation', |
| | | // label: '职业教育', |
| | | // }, |
| | | // { |
| | | // value: 'jsek_bFTeacherEducation', |
| | | // //重点项目 |
| | | // price: 'jsek_teacherEducation', |
| | | // label: '教师教育', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | product: { |
| | | value: '*', |
| | | options: [{ |
| | | value: '*', |
| | | label: '总分类', |
| | | }, |
| | | { |
| | | value: 'jsek_bFHigherEducation', |
| | | //重点项目 |
| | | price: 'jsek_higherEducation', |
| | | label: '高等教育', |
| | | }, |
| | | { |
| | | value: 'jsek_bFVocationalEducation', |
| | | //重点项目 |
| | | price: 'jsek_vocationalEducation', |
| | | label: '职业教育', |
| | | }, |
| | | { |
| | | value: 'jsek_bFTeacherEducation', |
| | | //重点项目 |
| | | price: 'jsek_teacherEducation', |
| | | label: '教师教育', |
| | | }, |
| | | ], |
| | | }, |
| | | multipleSelect: { |
| | | value: [], |
| | | options: [], |
| | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // 总分类 |
| | | // 总分类 |
| | | onChange(e) { |
| | | console.log(e); |
| | | // e.stopImmediatePropagation(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this.data.page.size = 16 //更改显示的值 |
| | | const newValue = e.detail.value; |
| | | const selectedOption = this.data.product.options.find(option => option.value === newValue); |
| | | const newPrice = selectedOption ? selectedOption.price : null; |
| | | const bookExhibitionListsubsidiary = [] |
| | | this.setData({ |
| | | bookExhibitionListsubsidiary: this.data.bookExhibitionList |
| | | }) |
| | | console.log(bookExhibitionListsubsidiary, 'bookExhibitionListsubsidiary'); |
| | | console.log(newValue, 'newValue'); |
| | | console.log(newPrice, 'newPrice'); |
| | | |
| | | if (newPrice) { |
| | | this.setData({ |
| | | keynoteDisabled: false |
| | | }) |
| | | } |
| | | if (!newPrice) { |
| | | this.setData({ |
| | | keynoteDisabled: true |
| | | }) |
| | | } |
| | | console.log(newValue); |
| | | this.setData({ |
| | | 'product.value': newValue, |
| | | 'product.price': newPrice, // 将选中的 price 值保存在数据中 |
| | | }); |
| | | this.bookExhibitionGet(newValue); |
| | | this.keyProjectsGet(newPrice); |
| | | // 调用更新页面数据的函数,传入新的 value 和 price 值 |
| | | |
| | | if (this.data.keynoteValue) { |
| | | //如果有数据就清空并刷新页面 |
| | | this.data.keynoteValue = [] |
| | | this.bookExhibitionGet(newValue) |
| | | this.onLoad() |
| | | } |
| | | // e.stopImmediatePropagation() |
| | | |
| | | }, |
| | | |
| | | // 总分类 |
| | | // 总分类 |
| | | // onChange(e) { |
| | | |
| | | // this.data.page.size = 16 //更改显示的值 |
| | | // const newValue = e.detail.value; |
| | | // const selectedOption = this.data.product.options.find(option => option.value === newValue); |
| | | // const newPrice = selectedOption ? selectedOption.price : null; |
| | | // const bookExhibitionListsubsidiary = [] |
| | | // this.setData({ |
| | | // bookExhibitionListsubsidiary: this.data.bookExhibitionList |
| | | // }) |
| | | // console.log(bookExhibitionListsubsidiary, 'bookExhibitionListsubsidiary'); |
| | | // console.log(newValue, 'newValue'); |
| | | // console.log(newPrice, 'newPrice'); |
| | | |
| | | // if (newPrice) { |
| | | // this.setData({ |
| | | // keynoteDisabled: false |
| | | // }) |
| | | // } |
| | | // if (!newPrice) { |
| | | // this.setData({ |
| | | // keynoteDisabled: true |
| | | // }) |
| | | // } |
| | | // console.log(newValue); |
| | | // this.setData({ |
| | | // 'product.value': newValue, |
| | | // 'product.price': newPrice, // 将选中的 price 值保存在数据中 |
| | | // }); |
| | | // this.bookExhibitionGet(newValue); |
| | | // this.keyProjectsGet(newPrice); |
| | | // // 调用更新页面数据的函数,传入新的 value 和 price 值 |
| | | |
| | | // if (this.data.keynoteValue) { |
| | | // //如果有数据就清空并刷新页面 |
| | | // this.data.keynoteValue = [] |
| | | // this.bookExhibitionGet(newValue) |
| | | // this.onLoad() |
| | | // } |
| | | // }, |
| | | |
| | | // 重点项目 |
| | | handleMultipleSelect(e) { |
| | |
| | | }); |
| | | }, |
| | | handleConfirm(event) { |
| | | |
| | | |
| | | |
| | | const { |
| | | value |
| | | } = event.detail; |
| | |
| | | console.log(e.detail.value, 'e.detail.value'); |
| | | this.bookExhibitionGet() |
| | | }, |
| | | onTest() { |
| | | onOpend() { |
| | | console.log(7555); |
| | | } |
| | | }) |