ソースを参照

切换时id处理

htc 1 年間 前
コミット
9d2a9b73d4
1 ファイル変更2 行追加0 行削除
  1. 2 0
      pages/home/index.vue

+ 2 - 0
pages/home/index.vue

@@ -192,6 +192,7 @@
 				if (t) {
 					if (t.merchantType == 2) { //酒店民宿
 						uni.setStorageSync('homestayId', t.merchantId);
+						uni.setStorageSync('merchantId', '');
 						this.getDetails();
 						this.page = 1;
 						this.finished = false;
@@ -200,6 +201,7 @@
 					} else {
 						this.item = null;
 						this.list = [];
+						uni.setStorageSync('homestayId', '');
 						uni.setStorageSync('merchantId', t.merchantId);
 					}
 				}