瀏覽代碼

加userId

张文飞 3 年之前
父節點
當前提交
adb7fe3c19
共有 1 個文件被更改,包括 16 次插入13 次删除
  1. 16 13
      pages/houseDetail/houseDetail.vue

+ 16 - 13
pages/houseDetail/houseDetail.vue

@@ -140,19 +140,22 @@
 		},
 		methods: {
 			async detailDatahandle() {
-				var parmas = {
-					projectId: this.projectId
-				}
-				this.createUserProjectRlat();
-				let res = await this.$myRequest({
-					url: '/project/queryProjectByH5',
-					data: parmas
-				})
-				if (res && res.data.success) {
-					console.log('详情res:', res)
-					this.dataInfo = res.data.single
-					this.reloadCategoryList()
-					this.reloadInfos()
+				if(getApp().globalData.userId){
+					var parmas = {
+						projectId: this.projectId,
+						userId:getApp().globalData.userId
+					}
+					this.createUserProjectRlat();
+					let res = await this.$myRequest({
+						url: '/project/queryProjectByH5',
+						data: parmas
+					})
+					if (res && res.data.success) {
+						console.log('详情res:', res)
+						this.dataInfo = res.data.single
+						this.reloadCategoryList()
+						this.reloadInfos()
+					}
 				}
 			},