<!DOCTYPE html>
<html>
<head>
{template head} 
</head>
<body>
	{template header}
		{template here}
		<div class="signin-form profile">
			<div class="login-form post_li">
				<form method="post" action="member.php">		
					<ul>
						{if $CFG['wx_mchid']}
						<li class="pad_1"><h4>金额(元)</h4><input name="amount" id="amount" type="number" required="" lay-verify="numbers" value="" placeholder="请输入整数金额,最低1元" onKeyUp="changeValue()"></li>
						<li><h4>券点价格</h4><input type=text value="1元兑换{$CFG['jdmoney']}券点" disabled="disabled"></li>
						<li><h4>可充券点</h4><input id="money" type=text value="" disabled="disabled"></li>
						<input type="hidden" name="act" value="act_my_pay">
						<input type="hidden" name="typeid" value="payjuan">
						<input type="submit" value="充值券点" class="layui-btn layui-btn-big layui-btn-normal" name="submit">
						{else}
						<li>* 暂未开通网上充值，请联系{$CFG['phone']}进行线下冲值！</li>
						{/if}
					</ul>
				</form>
			</div>
		</div>
		<!--//signin-form-->
{template footer}
<script>
         var input1pre;
         function changeValue() {
             var val1 = document.getElementById('amount').value;
			 var val2 = document.getElementById('money').value;
             if(typeof input1pre != 'undefined') {
                 val2 = val2.substring(0, val2.lastIndexOf(input1pre));
             }
			 if(val1>=1){
				document.getElementById('money').value = val1*{$CFG['jdmoney']};
			 }else{
				document.getElementById('money').value = '0';
			 }
		 }
</script>				
</body>
</html>