<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
		<link rel="stylesheet" href="__VUE__/css/base.css">
		<link rel="stylesheet" href="__VUE__/css/storeCenter.css">
		<link rel="stylesheet" href="__VUE__/css/weui.css">
		<link rel="stylesheet" href="__VUE__/css/weui-switch.css">
		<title>商家中心</title>
	</head>
	<body>
		<div id="wrapper">
			<template>
			<div class="header" :style="{backgroundImage: 'url(__GOODIMG__/'+logo + ')',backgroundRepeat:'no-repeat'}">
				<div class="header_glass"></div>
				<div class="header_blur"></div>
				<div class="header_wrapper">
					<div class="store_img" :style="{background: 'url(__GOODIMG__/'+logo + ')' ,backgroundSize: 'cover'}"></div>	
					<div class="store_name">
						<p>{{storeName}}</p>
					</div>
				</div>
			</div>
			<div class="store_info_box">
				<div class="store_info_item">
					<div class="store_time">
						到期时间：
					</div>
					<div class="store_time">
						<p>{{endingTime}}</p>
					</div>
				</div>
				<div class="store_info_item">
					<div class="store_time">
						剩余天数：
					</div>
					<div class="store_time">
						<p>{{lastDays+'天'}}</p>
					</div>
				</div>
				<div class="store_info_item">
					<div class="store_state">
						<p v-text="'营业中'"></p>
					</div>
					<input @click="stateSwitch" id="state-switch" class="weui-switch" type="checkbox" v-model="storeState" :disabled="!checkable">
				</div>
				
			</div>
			</template>
			<div class="btn_box">

				<div class="btn show-detail" @click="renewDetail()">查看明细</div>
				<div class="btn renew" @click="renew()">立即续费</div>
			</div>
			<transition name="slide-fade">
				<div class="renew_wrapper"  v-if="renewState">
					<div id="renew" style="display: flex;justify-content: center;flex-direction: column;">
					<form action="{:U('Pay/storeRenew')}" method="post" style="display: flex;justify-content: center;flex-direction: column;">
						<div class="renew_header">选择续期</div>
						<select v-model="renewDay" style="background: #fff;padding: 5px 30px;border: 1px solid #eee;margin: 20px">
							<option v-for="(item,index) in renewList" :value="index" v-bind:days="item.days" v-bind:money="item.money">
							{{item.days+'天(￥'+item.money+'元)'}}</option>
						</select>
						<input type="text" name="days" :value="renewList[renewDay].days" style="display: none">
						<input type="text" name="money" :value="renewList[renewDay].money" style="display: none">
						<button id="update" @click="update" style="text-align: center;margin:0 20px;padding: 0 30px" type="submit">提交</button> 
						<div class="close_btn" @click="close()">
							<div>×</div>
						</div>
					</form>
					</div>
				</div>
			</transition>
		</div>
		<script src="__VUE__/js/jquery-2.1.4.min.js"></script>
		<script src="__VUE__/js/vue.js"></script>
		<script src="__VUE__/js/storeCenter.js"></script>
	</body>
</html>