// pages/component/foot-tab.js Component({ /** * 组件的属性列表 */ properties: { iconList: { type: Array, value: null } }, /** * 组件的初始数据 */ data: { message: {dot: true} }, /** * 组件的方法列表 */ methods: { setIconData(cur){ this.setData({ 'iconList[0]': 'check-rectangle', 'iconList[1]': 'star', 'iconList[2]': 'notification', 'iconList[3]': 'info-circle' }); if (cur == 1){ this.setData({ 'iconList[0]': 'check-rectangle-filled', }) wx.redirectTo({ url: '../task/index' }) } if (cur == 2){ this.setData({ 'iconList[1]': 'star-filled' }) wx.redirectTo({ url: '../task/index' }) } if (cur == 3){ this.setData({ 'iconList[2]': 'notification-filled' }) wx.redirectTo({ url: '../message/index' }) } if (cur == 4){ this.setData({ 'iconList[3]': 'info-circle-filled' }) wx.redirectTo({ url: '../myself/index' }) } }, onChange(event) { this.setIconData(event.detail.value); }, } })