<template>
<view>
		<view class="yinc" @tap="closeLayer" v-if="storeShow&&!first&&merchant" ></view>
		<view class="kjpop"  v-if="storeShow&&!first">
			<view class="tops">
				<image src="/static/pages/images/mengdianxuanze.png"></image>
			</view>
			<view class="cont">
				<text>当前门店：</text>
				<view class="title">{{merchant.title}}</view>
				<!-- <view class="btn" @tap="closeLayer">我知道了</view> -->
			</view>
			<view class="bottom dflex">
				<view class="botLeft" @tap="switchStore">切换</view>
				<view class="botRight" @tap="closeLayer">确认</view>
			</view>
		</view>
</view>
</template>

<script>
	const req = require("../../utils/request");
	const utils = require("../../utils/util");
		const app = getApp();
	export default {
		data() {
			return {
				
			};
		},

		components: {},
		props: {
			storeShow:Boolean, //门店二次确认， 乡亲小程序开启了
			first:Boolean, // 是否第一次进入小程序
			merchant:Object //门店
		},
		options: {
			addGlobalClass: true
		},

		// created(){
		//   console.log(this.data.merchant)
		//   req.getRequest('/api/merchant/getMerchantList',{}, res => {
		//     res = res.filter(it=>it.isDefault==1)
		//      this.setData({merchant:res[0]})
		//    })
		// },
		mounted() {
			// console.log(this.storeShow,"123456")
		},

		methods: {
			closeLayer(){
				
				this.$emit('onFather',false)
				
			},
			switchStore(){
				app.globalData.openPage('pages/nearby/nearby')
				
				this.$emit('onFather',false)
			},
		}
	};
</script>
<style>
/* @import "./popAd.css"; */
.yinc{
	position: fixed;
	    top: 0;
	    left: 0;
	    right: 0;
	    bottom: 0;
	    background: rgba(0,0,0,.7);
	    z-index: 99;
}
</style>