소스 검색

跳转首页改为reLaunch,解决切换时未刷新首页问题

htc 1 년 전
부모
커밋
e3467af0cd
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      pagesHouse/home/index.vue

+ 3 - 3
pagesHouse/home/index.vue

@@ -125,7 +125,7 @@
 				merchantType:'',
 			}
 		},
-		onLoad(opt) {
+		onLoad(opt) {
 			this.merchantType=uni.getStorageSync('merchantType');
 			if(this.merchantType==10){
 				this.getData();
@@ -134,7 +134,7 @@
 				this.getData2();
 				this.getList2();
 			}
-			this.getType()
+			this.getType()
 		},
 		methods: {
 			getType() {
@@ -174,7 +174,7 @@
 						this.list = [];
 						uni.setStorageSync('homestayId', t.merchantId);
 						uni.setStorageSync('merchantId', '');
-						uni.navigateTo({
+						uni.reLaunch({
 							url: '/pages/home/index'
 						})
 					}