<template>
	<view>
		<view class="search-box">
			<view class="search-box-input">
				<u-input placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
					prefixIconStyle="font-size: 24px;color: #909399;" border="true">
				</u-input>
			</view>
		</view>
		<view class="content">
			<ShowShopList v-if="listId == 0" class="list" :isEdit="true" :showStyle="1"></ShowShopList>
		<SearchShopList v-if="listId == 1" class="list" :is-edit="true" :showStyle="1"></SearchShopList>
		<ShowShopList v-if="listId == 2" class="list" :is-edit="true" :showStyle="1"></ShowShopList>
		<ShowShopList v-if="listId == 3" class="list" :is-edit="true" :showStyle="1"></ShowShopList>
		<ShowShopList v-if="listId == 4" class="list" :showStyle="1"></ShowShopList>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				titletext:'',
				listId:'',
				matchList:[]
			}
		},
		methods: {
			getMatch(){
				this.$api.getMyMatch().then(res => {
					this.macthList = res.data.data
					console.log(res);
				})
			}
			
		},
		onLoad: function (option) {
		    wx.setNavigationBarTitle({
		      title: option.titletext
		    })
			this.titletext = option.titletext
			if(this.titletext == '发布的店铺转让'){
				this.listId = 0
			}
			if(this.titletext == '发布的找店选址'){
				this.listId = 1
			}
			
			if(this.titletext == '发布的项目招商'){
				this.listId = 2
			}
			if(this.titletext == '发布的店铺出租'){
				this.listId = 3
			}
			if(this.titletext == '我的匹配'){
				this.listId = 4
					this.getMatch()
				}
			
		  },
		computed:{
			
		}
	}
</script>

<style lang="scss">
		.search-box {
			position: relative;
			z-index: 1;
			left: 50%;
			width: 84.6%;
			transform: translateX(-50%);
		
			.search-box-input {
				border-radius: 12rpx;
				margin-top: 20rpx;
				background-color: #fff;
				opacity: 0.85;
		
				.u-border {
					border: none;
		
					.u-input__content {
						height: 62rpx;
						border-radius: 12rpx;
						background-color: #fff;
		
						.u-input__content__field-wrapper__field {
							font-size: 26rpx !important;
						}
					}
				}
			}
		}
		page{
			background-color: #F8F8F8;
		}
			
		.content{
			margin: 0 10px;
		}
</style>
