diff --git a/pages/foot-tab/foot-tab.js b/pages/foot-tab/foot-tab.js index 10193eb..50d834a 100644 --- a/pages/foot-tab/foot-tab.js +++ b/pages/foot-tab/foot-tab.js @@ -1,14 +1,12 @@ // pages/component/foot-tab.js -let aIconList = ['check-rectangle','star','notification','circle']; -let cure = 1 Component({ /** * 组件的属性列表 */ properties: { - clickValue: { + iconList: { type: Array, - value: aIconList + value: null } }, @@ -16,7 +14,6 @@ Component({ * 组件的初始数据 */ data: { - clickValue: cure, message: {dot: true} }, @@ -25,31 +22,46 @@ Component({ */ methods: { setIconData(cur){ - cure = cur; this.setData({ - clickValue: cur - }) + '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: '../index/index' }) } if (cur == 2){ + this.setData({ + 'iconList[1]': 'star-filled' + }) wx.redirectTo({ url: '../today/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); }, diff --git a/pages/foot-tab/foot-tab.wxml b/pages/foot-tab/foot-tab.wxml index 4719ac0..3013bf0 100644 --- a/pages/foot-tab/foot-tab.wxml +++ b/pages/foot-tab/foot-tab.wxml @@ -1,7 +1,7 @@ - - 清单 - 今日任务 - 消息 + + 清单 + 今日任务 + 消息 我的 diff --git a/project.private.config.json b/project.private.config.json index 6635189..aa2ae36 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,6 +1,6 @@ { "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", - "projectname": "quinn", + "projectname": "quinn-wx", "setting": { "compileHotReLoad": true }