Browse Source

commit -m 二手可见度修改

zhengjinyi 4 years ago
parent
commit
c25e84dfa0
2 changed files with 14 additions and 5 deletions
  1. 6 2
      search/pages/search/search-second.vue
  2. 8 3
      second/pages/product/product-list.vue

+ 6 - 2
search/pages/search/search-second.vue

@@ -70,7 +70,7 @@
 		data() {
 		data() {
 			return {
 			return {
 				shopId:0,
 				shopId:0,
-				userID:0,
+				userId:0,
 				themeClass: 'block',
 				themeClass: 'block',
 				show:false,
 				show:false,
 				userIdentity:'',	
 				userIdentity:'',	
@@ -100,7 +100,10 @@
 			}
 			}
 		},
 		},
 		created() {
 		created() {
-			this.getListFromServer()
+			this.$api.getStorage().then((resolve) => {
+				this.userId = resolve.userId ? resolve.userId : '';
+				this.getListFromServer()
+			})
 		},
 		},
 		computed: {
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 			...mapState(['hasLogin','userInfo'])
@@ -130,6 +133,7 @@
 					this.pageNum += 1;
 					this.pageNum += 1;
 				}
 				}
 				let params = {
 				let params = {
+						userId:this.userId,
 						secondHandType:1,
 						secondHandType:1,
 						instrumentType:0,
 						instrumentType:0,
 						name:this.name,
 						name:this.name,

+ 8 - 3
second/pages/product/product-list.vue

@@ -100,6 +100,7 @@
 		},
 		},
 		data(){
 		data(){
 			return{
 			return{
+				userId:0,
 				isIphoneX:this.$store.state.isIphoneX,
 				isIphoneX:this.$store.state.isIphoneX,
 				clickPath:'/search/pages/search/search-second',
 				clickPath:'/search/pages/search/search-second',
 				isShowClose:false,
 				isShowClose:false,
@@ -140,8 +141,11 @@
 			}
 			}
 		},
 		},
 		created() {
 		created() {
-			 this.setScrollHeight();		
-			 this.gettabList();
+			 this.setScrollHeight();	
+			this.$api.getStorage().then((resolve) => {
+				this.userId = resolve.userId ? resolve.userId : '';
+				this.gettabList();
+			})	
 		},
 		},
 		computed: {
 		computed: {
 			...mapState(['hasLogin','userInfo','isWxAuthorize','identity'])
 			...mapState(['hasLogin','userInfo','isWxAuthorize','identity'])
@@ -204,6 +208,7 @@
 				this.isShowEmpty = false;				
 				this.isShowEmpty = false;				
 				if(loadMore) {this.pageNum += 1;}
 				if(loadMore) {this.pageNum += 1;}
 				let params = {
 				let params = {
+						userId:this.userId,
 						secondHandType:this.currentId,
 						secondHandType:this.currentId,
 						instrumentType:this.currentID2,
 						instrumentType:this.currentID2,
 						name:this.name,
 						name:this.name,
@@ -280,7 +285,7 @@
 			}
 			}
 		},	
 		},	
 		onShow() {
 		onShow() {
-
+				
 		}
 		}
 	}
 	}
 </script>
 </script>