123456789101112131415161718192021222324252627282930313233343536373839404142 |
- const app = getApp()
- const bus = app.globalData.bus
- Component({
- data: {
- curtTab: 0,
- tabBar: {
- textColor: "#6C6C6C",
- selectedColor: "#1ECDB9",
- items: [
- {
- pagePath: "/pages/index/index",
- name: "租车",
- icon: "/static/resource/images/home-w.png",
- activeIcon: "/static/resource/images/home-b.png"
- },
- {
- pagePath: "/pages/my/my",
- name: "我的",
- icon: "/static/resource/images/my-w.png",
- activeIcon: "/static/resource/images/my-b.png"
- }
- ]
- }
- },
- methods: {
- navToInputPage() {
- bus.emit('join')
- my.switchTab({
- url: '/pages/index/index'
- })
- },
- switchTab(e) {
- const {dataset: { index, item: { pagePath = '' }} = {}} = e.target
- my.switchTab({
- url: pagePath
- })
- }
- }
- })
|