You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.4 KiB
74 lines
1.4 KiB
const _app = getApp<IAppOption>(); |
|
|
|
// pages/story/a.ts |
|
Component({ |
|
/** |
|
* 组件的属性列表 |
|
*/ |
|
properties: {}, |
|
|
|
/** |
|
* 组件的初始数据 |
|
*/ |
|
data: { |
|
showEntryCase: false, |
|
active: 0, |
|
notice: false, |
|
tabbar: [ |
|
{ |
|
path: "/pages/home/index", |
|
name: "首页", |
|
icon: "tab1.png", |
|
iconActive: "tab-active1.png", |
|
activeIndex: 1, |
|
}, |
|
{ |
|
path: "/pages/cases/index", |
|
name: "病历", |
|
icon: "tab2.png", |
|
iconActive: "tab-active2.png", |
|
activeIndex: 2, |
|
}, |
|
{ |
|
custom: true, |
|
path: "/module1/pages/entryCases/index", |
|
}, |
|
{ |
|
path: "/pages/chatRoomList/index", |
|
name: "学习窗", |
|
icon: "tab3.png", |
|
iconActive: "tab-active3.png", |
|
activeIndex: 3, |
|
}, |
|
{ |
|
path: "/pages/my/index", |
|
name: "我的", |
|
icon: "tab4.png", |
|
iconActive: "tab-active4.png", |
|
activeIndex: 4, |
|
}, |
|
], |
|
userInfo: {}, |
|
}, |
|
/** |
|
* 组件的方法列表 |
|
*/ |
|
methods: { |
|
handleTab(e: any) { |
|
const { index } = e.currentTarget.dataset; |
|
const tab = this.data.tabbar[index]; |
|
if (tab.custom) { |
|
this.handleClsoeCaseTip(); |
|
wx.navigateTo({ |
|
url: tab.path, |
|
}); |
|
} else { |
|
wx.switchTab({ |
|
url: tab.path, |
|
}); |
|
} |
|
}, |
|
}, |
|
}); |
|
|
|
export {};
|
|
|