1
This commit is contained in:
156
application/index/view/user/cash.html
Executable file
156
application/index/view/user/cash.html
Executable file
@ -0,0 +1,156 @@
|
||||
{include file="public/header" nav="提现"}
|
||||
<link rel="stylesheet" type="text/css" href="__ROOT__/static/wap/css/tipmask.css">
|
||||
<link rel="stylesheet" type="text/css" href="__ROOT__/static/wap/css/box_pay.css">
|
||||
<style type="text/css">
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
<div id="app">
|
||||
<div class="box"><!---->
|
||||
<div class="jun-content">
|
||||
<div class="t_box_withdraw">
|
||||
<div class="t_header">
|
||||
<span><img src="__ROOT__/static/wap/images/goback.png" alt="" onClick="javascript:history.back()"></span>
|
||||
<span><i>提现</i></span>
|
||||
</div>
|
||||
<div class="t_con_withdraw">
|
||||
<div class="one">
|
||||
<div class="one1">可提现金额(元)</div>
|
||||
<div class="one2">
|
||||
<em>¥</em>
|
||||
<span>{$user['money']}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="two">
|
||||
<div class="two1">提现金额</div>
|
||||
<div class="two2">
|
||||
<em>¥</em>
|
||||
<input type="number" placeholder="请输入提现金额" id="money" onfocus="this.placeholder=''" oninput="xxoopp()" onblur="this.placeholder='请输入提现金额'">
|
||||
<label for="txsxf">手续费</label> <span id="txsxf">{$txsxf?$txsxf:'0'}%</span>
|
||||
</div>
|
||||
<div class="two3">单次提现金额最低 <span>{$cash_min?$cash_min:'0'}元</span></div>
|
||||
</div>
|
||||
<script>
|
||||
function xxoopp(){
|
||||
|
||||
console.log($("#money").val());
|
||||
var sxf1 = new BigNumber(0.01);
|
||||
var sxf2 = new BigNumber({$txsxf});
|
||||
var sxf3 = new BigNumber(sxf1.times(sxf2));
|
||||
var sxf4 = sxf3.times($("#money").val());
|
||||
$("#txsxf").val(sxf4);
|
||||
// alert(123);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="item three">
|
||||
<label for="pwd">提现密码</label>
|
||||
<input type="password" placeholder="请输入提现密码" id="pwd" onfocus="this.placeholder=''" onblur="this.placeholder='请输入提现密码'">
|
||||
</div>
|
||||
<div class="item">
|
||||
<label>银行卡号</label>
|
||||
<div class="select">
|
||||
{if $bank}
|
||||
<select name="bank" id="bank" style="width: 100%;background: none;border: none;color: #fff;background: #111723;">
|
||||
<option value="{$bank.id}">{$bank.bank} ****{:substr($bank['account'], strlen($bank['account']) - 4, 4)}</option>
|
||||
</select>
|
||||
{else}
|
||||
<p style="line-height:30px;color:#fff;margin-top:6px;"><input type="hidden" name="bank" id="bank" value="0"><a href="/index/user/add_card" style="color:#edd33a">绑定银行卡</a>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if $bank}
|
||||
<div class="t_withdraw_btn">
|
||||
<button id="sub_btn" type="button">确认提交</button>
|
||||
</div>
|
||||
{else}
|
||||
<div class="t_withdraw_btn">
|
||||
<button id="sdtn" type="button">立即去绑定银行卡</button>
|
||||
</div>
|
||||
{/if}
|
||||
<span class="notice">
|
||||
<p>提示:</p>
|
||||
<p>1.提现限制:{$cash_min} - {$cash_max}</p>
|
||||
<p style="color:red;">2.提现时间:{$cash_start} - {$cash_end}</p>
|
||||
<p>3.若忘记提款密码,请<a target="_blank" href="{:getInfo('service')}" style="color:red;">点击找回</a></p>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="public/footer" menu='user'}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tipMask hide">
|
||||
<div class="cont">
|
||||
<p class="title">温馨提示</p>
|
||||
<p class="stitle contents"></p>
|
||||
<div id="msgBtn">
|
||||
<div class="confirm guanbi">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="__ROOT__/static/theme/index/js/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#sdtn").click(function(){
|
||||
var ulrs="/index/user/add_card";
|
||||
window.location.href =ulrs;
|
||||
});
|
||||
$('#withdraw').on('blur',function(){
|
||||
var withdraw = parseFloat($(this).val());
|
||||
var reg_par = (withdraw * 0/100).toFixed(2);
|
||||
$('#reg_par').val(reg_par>=0?reg_par:0);
|
||||
});
|
||||
$("#sub_btn").on("click", function () {
|
||||
var bank = $('#bank').val();
|
||||
var pwd = $("#pwd").val();
|
||||
var money = $("#money").val();
|
||||
if (money < {$cash_min}) {
|
||||
msg("错误", "最低提现金额为{$cash_min}元", 1);
|
||||
return false;
|
||||
}
|
||||
if (money > {$cash_max}) {
|
||||
msg("错误", "最高提现金额为{$cash_max}元", 1);
|
||||
return false;
|
||||
}
|
||||
if (pwd.length < 4) {
|
||||
msg("错误", "请输入交易密码", 1);
|
||||
return false;
|
||||
}
|
||||
var url = "/index/user/cash";
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : url,
|
||||
data: {'money':money,'pwd':pwd,'bank':bank},
|
||||
dataType : "json",
|
||||
success : function(result){
|
||||
if(result.code == 1){
|
||||
msg("提示",result.info,2,"/index/user/cash_record");
|
||||
}else{
|
||||
msg("提示",result.info,1);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
function msg(title, content, type, url) {
|
||||
$(".contents").html(content);
|
||||
if (type == 1) {
|
||||
var btn = '<div class="confirm guanbi" onclick="$(\'.tipMask\').hide();">确定</div>';
|
||||
}
|
||||
else {
|
||||
var btn = '<div class="confirm guanbi" onclick="window.location.href=\'' + url + '\'">确定</div>';
|
||||
}
|
||||
$("#msgBtn").html(btn);
|
||||
$(".tipMask").show();
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user