<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>申请入驻</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="__VUE__/css/weui.min.css">
		<link rel="stylesheet" href="__VUE__/css/main.css">
	</head>
	<body>
		<div id="main">
			<div class="weui-cells__title" >选择地区</div>
			<div class="weui-cell weui-cell_select weui-cell_select-after">
				<div class="weui-cell__hd">
					<label for="" class="weui-label">省份</label>
				</div>
				<div class="weui-cell__bd">
					<select class="weui-select" 
					name="province" 
					v-model="province"
					v-on:change="createMap">
						<option :value="index" v-for="(province,index) in addressList.provinceArr">{{addressList.provinceArr[index].province}}</option>
					</select>
				</div>
			</div>
			<div class="weui-cell weui-cell_select weui-cell_select-after">
				<div class="weui-cell__hd">
					<label for="" class="weui-label">城市</label>
				</div>
				<div class="weui-cell__bd">
					<select class="weui-select" 
					name="city" 
					v-model="city"
					v-on:change="createMap">
						<option :value="index" v-for="(city,index) in cityArr">{{cityArr[index]["city"]}}</option>
					</select>
				</div>
			</div>
			<div class="weui-cell weui-cell_select weui-cell_select-after">
				<div class="weui-cell__hd">
					<label for="" class="weui-label">区/县</label>
				</div>
				<div class="weui-cell__bd">
					<select class="weui-select" 
					name="area" 
					v-model="area"
					v-on:change="createMap">
						<option :value="index" v-for="(county,index) in areaArr">{{areaArr[index].county}}</option>
					</select>
				</div>
			</div>
			<div class="weui-cell weui-cell_select weui-cell_select-after">
				<div class="weui-cell__hd">
					<label for="" class="weui-label">小区</label>
				</div>
				<div class="weui-cell__bd">
					<select class="weui-select" 
					name="community" 
					v-model="community"
					v-on:change="createMap">
						<option :value="index" v-for="(community,index) in communityArr">{{communityArr[index].village}}</option>
					</select>
				</div>
			</div>
			<div class="weui-cell">
				<div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
				<div class="weui-cell__bd">
					<input class="weui-input" type="text" v-model="userName" placeholder="请输入姓名">
				</div>
			</div>
			<div class="weui-cell">
				<div class="weui-cell__hd"><label class="weui-label">手机号</label></div>
				<div class="weui-cell__bd">
					<input class="weui-input" type="tel" maxlength="11" pattern="[^[0-9]{11}$]" v-model="phone" placeholder="请输入电话">
				</div>
			</div>
			<div class="weui-cells__title">店名</div>
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<input class="weui-input" type="text" v-model="storeName" placeholder="请输入商店名称">
				</div>
			</div>
			<div class="weui-cells__title">实体店地址</div>
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<textarea class="weui-textarea" v-model="address" placeholder="请输入实体店地址" rows="3" maxlength="50"></textarea>
					<div class="weui-textarea-counter"><span>{{address.length}}</span>/50</div>
				</div>
			</div>
			<!-- 营业执照 -->
			<div class="weui-cell">
				<div class="weui-uploader">
					<div class="weui-uploader__hd">
						<p class="weui-uploader__title">营业执照</p>
						<div class="weui-uploader__info">{{shopLicense.length}}/1</div>
					</div>
					<div class="weui-uploader__bd">
						<ul class="weui-uploader__files" id="uploaderFiles">
							<li v-for="(imgSrc,key) in shopLicense" class="weui-uploader__file">
								<img :src="imgSrc" />
								<a style="position: absolute;" class="del_btn" v-on:click='delShopLicense(key)'>
									<span class="glyphicon glyphicon-remove">×</span>
								</a>
							</li>
						</ul>
						<div class="weui-uploader__input-box" v-if="shopLicense.length<=0">
							<div v-on:click="addShopLicense" class="weui-uploader__input" ></div>
						</div>
					</div>
				</div>
			</div>
			<!-- 食品流通证 -->
			<div class="weui-cell">
				<div class="weui-uploader">
					<div class="weui-uploader__hd">
						<p class="weui-uploader__title">食品流通证</p>
						<div class="weui-uploader__info">{{foodLicense.length}}/1</div>
					</div>
					<div class="weui-uploader__bd">
						<ul class="weui-uploader__files" id="uploaderFiles">
							<li v-for="(imgSrc,key) in foodLicense" class="weui-uploader__file">
								<img :src="imgSrc" />
								<a style="position: absolute;" class="del_btn" v-on:click='delFoodLicense(key)'>
									<span class="glyphicon glyphicon-remove">×</span>
								</a>
							</li>
						</ul>
						<div class="weui-uploader__input-box" v-if="foodLicense.length<=0">
							<div v-on:click="addFoodLicense" class="weui-uploader__input" ></div>
						</div>
					</div>
				</div>
			</div>
			<!-- 食品流通证 -->
			<div class="weui-cell">
				<div class="weui-uploader">
					<div class="weui-uploader__hd">
						<p class="weui-uploader__title">LOGO</p>
						<div class="weui-uploader__info">{{logoLicense.length}}/1</div>
					</div>
					<div class="weui-uploader__bd">
						<ul class="weui-uploader__files" id="uploaderFiles">
							<li v-for="(imgSrc,key) in logoLicense" class="weui-uploader__file">
								<img :src="imgSrc" />
								<a style="position: absolute;" class="del_btn" v-on:click='delLogoLicense(key)'>
									<span class="glyphicon glyphicon-remove">×</span>
								</a>
							</li>
						</ul>
						<div class="weui-uploader__input-box" v-if="logoLicense.length<=0">
							<div v-on:click="addLogoLicense" class="weui-uploader__input" ></div>
						</div>
					</div>
				</div>
			</div>
			<div class="weui-cell">
				<button class="weui-btn weui-btn_primary" @click="update && uploadImage()">{{confirmTips}}</button>
			</div>
		</div>	
		<script src = "http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script>
			wx.config({
			    debug: false,
			    appId: '<?php echo $signPackage["appId"];?>',
			    timestamp: '<?php echo $signPackage["timestamp"];?>',
			    nonceStr: '<?php echo $signPackage["nonceStr"];?>',
			    signature: '<?php echo $signPackage["signature"];?>',
			    jsApiList: ['closeWindow','chooseImage','uploadImage']
			});

			wx.ready(function(){
			    // wx.closeWindow();
			});
		</script>
		<script src = "__VUE__/js/jquery-2.1.4.min.js"></script>
		<script src = "__VUE__/js/vue.min.js"></script>
		<script src = "__VUE__/js/weui.min.js"></script>
		<script src = "__VUE__/js/main.js?v1.3"></script>
	</body>
</html>