张文飞 3 år sedan
förälder
incheckning
37485e36f9

+ 1 - 1
App.vue

@@ -10,7 +10,7 @@
 			}
 			let BASE_URL = "";
 			var env ='';
-			let res = uni.getStorageSync('env') || '1'
+			let res = uni.getStorageSync('env')
 			switch(res){
 			   case '1': //dev
 			     BASE_URL = 'http://192.168.4.212:8866' // 开发环境

+ 4 - 1
pages/certificationResultPage/certificationResultPage.vue

@@ -28,8 +28,11 @@
 				approvalStatus:-1
 			};
 		},
-		created() {
+		mounted() {
 			this.getCertificationResult();
+			uni.$on("request",()=>{
+				this.getCertificationResult();
+			})
 		},
 		methods:{
 			async getCertificationResult(){

+ 1 - 2
pages/homePage/homePage.vue

@@ -273,9 +273,8 @@
 			},
 			// 调准项目详情
 			goDetailAction(e) {
-				uni.setStorageSync('projectId', e.projectId)
 				uni.navigateTo({
-					url: '../houseDetail/houseDetail'
+					url: '../houseDetail/houseDetail?projectId='+e.projectId
 				})
 			},
 			// 跳转至效果报表

+ 6 - 3
pages/houseDetail/houseDetail.vue

@@ -127,15 +127,18 @@
 				categoryList: []
 			}
 		},
+		onLoad(param) {
+			this.projectId = param.projectId;
+		},
 		mounted() {
 			this.color1 = app.globalData.color1;
 			this.color2 = app.globalData.color2;
 			this.color3 = app.globalData.color3;
 			this.color6 = app.globalData.color6;
-			this.projectId = uni.getStorageSync('projectId')
-			if (this.projectId) {
+			this.detailDatahandle()
+			uni.$on("request",()=>{
 				this.detailDatahandle()
-			}
+			})
 		},
 		methods: {
 			async detailDatahandle() {

+ 5 - 1
pages/reportPage/reportPage.vue

@@ -154,7 +154,11 @@
 			this.color1 = app.globalData.color1;
 			this.color2 = app.globalData.color2;
 			this.getReportHeader()
-			this.getReportMenu()
+			this.getReportMenu();
+			uni.$on("request",()=>{
+				this.getReportHeader()
+				this.getReportMenu()
+			})
 		},
 		methods: {
 			// 表头数据