<template>
	<view class="container">
		<!-- <view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
			<view class="searchBox_add">
				<u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon>
			</view>
		</view> -->

		<view class="community">
			<view class="community_left">
				<image mode="aspectFill" src="../../../static/logo.png" alt="" />
			</view>
			<view class="community_right" @click="changeShow">
				<view class="community_right_text">
					<view class="community_right_text1">七个2锁城</view>
					<view class="community_right_text2">衡水市上海公馆6A</view>
				</view>
				<view class="community_right_more">
					<u-icon bold color="#999999" size="30" name="arrow-right" @click="back"></u-icon>
				</view>
			</view>
		</view>

		<view class="content">
			<view class="iconStyle">
				<u-grid col="6" :border="false">
					<u-grid-item v-for="(item, index) in baseList" :key="index" @click="click(item)">
						<view class="grid-item">
							<image class="nav_icon" :src="item.image" mode=""></image>
						</view>
							<text class="grid-text">{{ item.name }}</text>
					</u-grid-item>
				</u-grid>
			</view>
		</view>


		<view class="boxshadow" v-if="show" @click="changeShow">
			<view class="boxshadowCon">
				<view class="boxshadowCon_Tit">
					请选择店铺
					<br />
					<view class="boxshadowCon_Text">从以下列表中选择您的管理权限的店铺</view>
					<view class="cancel">确定</view>
				</view>
				<view class="lines"></view>
				<view class="communityList">
					<view class="boxshadowCon_Text2">您有n个店铺的管理权限</view>
					<view style="width: 100%;height: 200rpx;">
						<view class="communityItem" v-for="(item, index) in 8" :key="index">
							<view class="community_left">
								<image mode="aspectFill" src="../../../static/logo.png" alt="" />
							</view>
							<view class="community_right" @click="changeShow2">
								<view class="community_right_text">
									<view class="community_right_text1">七个2锁城</view>
									<view class="community_right_text2">衡水市上海公馆6A</view>
								</view>
							</view>
							<view class="communityItem_radio">
								<radio></radio>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>

	</view>

</template>

<script>
import {
	request,
	picUrl,
	uniqueByField,
	menuButtonInfo,
	NavgateTo
} from '../../../utils';
import {
	apiArr
} from '../../../api/community';


export default {
	data() {
		return {
			top: "",
			localHeight: "",
			active: 1,
			show: false,
			show2: false,
			baseList: [
				{
					image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png",
					name: "订单",
					url: "",
				}, {
					image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/gp_cancelAfterVerification.png",
					name: "到店核销",
					url: "",
				}
			],
		}
	},
	onLoad(options) {
		const meun = menuButtonInfo();
		this.top = meun.top;
		// this.top = meun.height + meun.top;
		this.localHeight = meun.height;
	},


	methods: {
		changeTab(index) {
			this.active = index;
		},
		back() {
			uni.navigateBack({
				delta: 1
			});
		},
		changeShow() {
			this.show = !this.show
		},
		changeShow2() {
			this.show2 = !this.show
		},
		click(item) {
			console.log("🚀 ~ click ~ item:", item)
			if(item.name === '到店核销'){
				NavgateTo('/packages/storeManagement/orderVerification/index')
			}else{
				NavgateTo('/packages/storeManagement/order/index')
			}
		}
	},


}
</script>

<style>
@import url("./index.css");
</style>