From 52d463e03c1f074099ed8e8a6b7c3ddde52d2708 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Fri, 27 Oct 2023 14:50:28 +0800
Subject: [PATCH] fix:小程序初版

---
 pages/index/index.vue |   81 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 76 insertions(+), 5 deletions(-)

diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6445b39..bc74e39 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,5 +1,76 @@
-<template />
-
-<script></script>
-
-<style></style>
+<template>
+	<view class="newIndex">
+		<uni-nav-bar backgroundColor='#000' color='#fff' statusBar :border='false' fixed :title="title" />
+		<u-loading-page :loading="loading"></u-loading-page>
+		<agencyPage v-if="isShow" ref="agencyPage"></agencyPage>
+		<myInfor v-if="!isShow"></myInfor>
+		<tabBar v-if="showTabBar" @handleChangeTabe='handleChangeTabe' :currIndex='currIndex'></tabBar>
+	</view>
+</template>
+<script>
+	import agencyPage from '@/pages/actionChange/agencyPage/index.vue'
+	import myInfor from '@/pages/actionChange/myInfor/index.vue'
+	import tabBar from '@/pages/actionChange/components/commonUserTabBar.vue'
+	export default {
+		data() {
+			return {
+				isShow: true,
+				loading: true,
+				showTabBar: true,
+				token: '',
+				currIndex: '0',
+				title: '������'
+			}
+		},
+		components: {
+			agencyPage,
+			myInfor,
+			tabBar
+		},
+		onLoad(option) {},
+		onReady() {},
+		onShow() {
+			this.currIndex = '0'
+			this.showTabBar = true
+		},
+		async mounted() {
+			//������������������
+			await this.$onLaunched
+			this.token = uni.getStorageSync('tonken')
+			console.log('indextoken', 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()
+			})
+		},
+		methods: {
+			getData() {
+				console.log('indextokengetContaminateList')
+				this.$refs.agencyPage.getContaminateList()
+			},
+			handleChangeTabe(index) {
+				if (index === 2) {
+					this.isShow = false
+					this.title = '������'
+				}
+				if (index === 0) {
+					this.isShow = true
+					this.$nextTick(() => {
+						this.getData()
+					})
+				}
+				if (index === 1) {
+					uni.navigateTo({
+						url: '/pages/actionChange/newPage/index'
+					})
+					this.showTabBar = false
+				}
+			}
+		}
+	}
+</script>
+<style></style>
\ No newline at end of file

--
Gitblit v1.8.0