project init
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
// pages/component/foot-tab.js
|
// pages/component/foot-tab.js
|
||||||
let aIconList = ['check-rectangle','star','notification','circle'];
|
|
||||||
let cure = 1
|
|
||||||
Component({
|
Component({
|
||||||
/**
|
/**
|
||||||
* 组件的属性列表
|
* 组件的属性列表
|
||||||
*/
|
*/
|
||||||
properties: {
|
properties: {
|
||||||
clickValue: {
|
iconList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
value: aIconList
|
value: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -16,7 +14,6 @@ Component({
|
|||||||
* 组件的初始数据
|
* 组件的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
clickValue: cure,
|
|
||||||
message: {dot: true}
|
message: {dot: true}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -25,31 +22,46 @@ Component({
|
|||||||
*/
|
*/
|
||||||
methods: {
|
methods: {
|
||||||
setIconData(cur){
|
setIconData(cur){
|
||||||
cure = cur;
|
|
||||||
this.setData({
|
this.setData({
|
||||||
clickValue: cur
|
'iconList[0]': 'check-rectangle',
|
||||||
})
|
'iconList[1]': 'star',
|
||||||
|
'iconList[2]': 'notification',
|
||||||
|
'iconList[3]': 'info-circle'
|
||||||
|
});
|
||||||
if (cur == 1){
|
if (cur == 1){
|
||||||
|
this.setData({
|
||||||
|
'iconList[0]': 'check-rectangle-filled',
|
||||||
|
})
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../index/index'
|
url: '../index/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (cur == 2){
|
if (cur == 2){
|
||||||
|
this.setData({
|
||||||
|
'iconList[1]': 'star-filled'
|
||||||
|
})
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../today/index'
|
url: '../today/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (cur == 3){
|
if (cur == 3){
|
||||||
|
this.setData({
|
||||||
|
'iconList[2]': 'notification-filled'
|
||||||
|
})
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../message/index'
|
url: '../message/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (cur == 4){
|
if (cur == 4){
|
||||||
|
this.setData({
|
||||||
|
'iconList[3]': 'info-circle-filled'
|
||||||
|
})
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../myself/index'
|
url: '../myself/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
this.setIconData(event.detail.value);
|
this.setIconData(event.detail.value);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--pages/component/foot-tab.wxml-->
|
<!--pages/component/foot-tab.wxml-->
|
||||||
<t-tab-bar value="{{clickValue}}" bindchange="onChange">
|
<t-tab-bar bindchange="onChange">
|
||||||
<t-tab-bar-item badge-props="{{ {count: 12} }}" value="1" icon="{{iconList[0]}}">清单</t-tab-bar-item>
|
<t-tab-bar-item value="1" icon="{{iconList[0]}}">清单</t-tab-bar-item>
|
||||||
<t-tab-bar-item badge-props="{{message}}" value="2" icon="{{iconList[1]}}">今日任务</t-tab-bar-item>
|
<t-tab-bar-item value="2" icon="{{iconList[1]}}">今日任务</t-tab-bar-item>
|
||||||
<t-tab-bar-item value="3" icon="{{iconList[2]}}">消息</t-tab-bar-item>
|
<t-tab-bar-item badge-props="{{message}}" value="3" icon="{{iconList[2]}}">消息</t-tab-bar-item>
|
||||||
<t-tab-bar-item value="4" icon="{{iconList[3]}}">我的</t-tab-bar-item>
|
<t-tab-bar-item value="4" icon="{{iconList[3]}}">我的</t-tab-bar-item>
|
||||||
</t-tab-bar>
|
</t-tab-bar>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"projectname": "quinn",
|
"projectname": "quinn-wx",
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true
|
"compileHotReLoad": true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user