| | |
| | | myInfor, |
| | | tabBar |
| | | }, |
| | | onLoad(option) {}, |
| | | async onLoad() { |
| | | await this.$onLaunched |
| | | this.getData() |
| | | }, |
| | | onReady() {}, |
| | | onShow() { |
| | | this.currIndex = '0' |
| | | this.showTabBar = true |
| | | }, |
| | | async mounted() { |
| | | onReachBottom() { |
| | | //这里是判断是否需要继续掉接口 |
| | | this.$refs.agencyPage.onBottom() |
| | | }, |
| | | mounted() { |
| | | //等待登录成功 |
| | | await this.$onLaunched |
| | | this.token = uni.getStorageSync('tonken') |
| | | console.log('indextoken', this.token) |
| | | console.log('已经进了index页面了', this.token) |
| | | this.loading = false |
| | | this.getData() |
| | | uni.$on('currIndex', data => { |
| | | console.log('currIndexOn', data) |
| | | this.currIndex = data.data.index |
| | | this.showTabBar = data.data.showTabBar |
| | | this.$refs.agencyPage.getContaminateList() |
| | | this.$refs.agencyPage.setData() |
| | | }) |
| | | this.share.title = this.title |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | console.log('indextokengetContaminateList') |
| | | this.$refs.agencyPage.getContaminateList() |
| | | console.log('获取数据') |
| | | this.$refs.agencyPage.setData() |
| | | }, |
| | | handleChangeTabe(index) { |
| | | if (index === 2) { |
| | | this.isShow = false |
| | | this.title = '我的' |
| | | this.share.title = this.title |
| | | } |
| | | if (index === 0) { |
| | | this.isShow = true |
| | | this.title = '首页' |
| | | this.share.title = this.title |
| | | this.$nextTick(() => { |
| | | this.getData() |
| | | }) |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style></style> |
| | | <style> |
| | | .newIndex { |
| | | width: calc(100vw); |
| | | } |
| | | </style> |