<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>提现记录</title>
|
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
<link rel="stylesheet" type="text/css" href="./css/base.css" />
|
<link rel="stylesheet" type="text/css" href="./css/txRecord.css" />
|
<link rel="stylesheet" href="./css/index.css">
|
<script>
|
window.onresize = function() {
|
document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
|
};
|
window.onresize();
|
</script>
|
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
|
<script src="http://img.flqapp.com/resource/js/app2019112217.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
|
<script src="js/mobiscroll/mobiscroll_002.js" type="text/javascript"></script>
|
<script src="js/mobiscroll/mobiscroll_004.js" type="text/javascript"></script>
|
<link href="css/mobiscroll/mobiscroll_002.css" rel="stylesheet" type="text/css">
|
<link href="css/mobiscroll/mobiscroll.css" rel="stylesheet" type="text/css">
|
<script src="js/mobiscroll/mobiscroll.js" type="text/javascript"></script>
|
<script src="js/mobiscroll/mobiscroll_003.js" type="text/javascript"></script>
|
<script src="js/mobiscroll/mobiscroll_005.js" type="text/javascript"></script>
|
<link href="css/mobiscroll/mobiscroll_003.css" rel="stylesheet" type="text/css">
|
</head>
|
<body>
|
<div id="root" style="display: none;">
|
<div class="div_item_bg">
|
<div class="div_items" v-for="(item, index) in dataList">
|
<div class="div_items_top">
|
<div class="div_items_top_left">
|
<img src="img/icon_tx.png" class="imtTx">
|
<div class="div_items_top_left_content">
|
<div class="div_items_top_left_content_title">{{item.title}}</div>
|
<div class="div_items_top_left_content_content">{{item.account}}</div>
|
</div>
|
</div>
|
<div class="div_items_top_right">
|
{{item.money}}
|
</div>
|
</div>
|
|
<img src="img/icon_close.png" class="deleClose" @click="deleteData(item.id)">
|
<div class="div_items_line"></div>
|
</div>
|
</div>
|
<!-- 添加粉丝 -->
|
<div class="div_add_bg" @click="addTxRecord">
|
<div class="div_img">
|
<img src="img/icon_add.png">
|
</div>
|
<div class="div_add_desc">添加提现记录</div>
|
</div>
|
<div style="height: 5.3rem"></div>
|
|
<!-- 重要提示 -->
|
<div class="div_tips">
|
<div class="div_tips_title">重要提示</div>
|
<div class="div_tips_content">
|
1.本页数据仅供数据预览使用,不可用作其他用途;<br>
|
2.本页仅对超级会员开放预览使用,且仅支持在板栗快省App中打开;<br>
|
3.系统将会记录上一次填写的预览数据;<br>
|
<span style="color: #E5005C;">4.提交预览后,系统会让相关页面保留预览数据10分钟,10分钟后恢复到非预览数据。</span>
|
</div>
|
<div style="height: 0.41rem;"></div>
|
</div>
|
|
<!-- 提交申请 -->
|
<div class="div_commit">
|
<div class="commitInfo" @click="commitInfo">{{buttonName}}</div>
|
</div>
|
|
<!--弹框 -->
|
<div class="dialogmask">
|
<div class="dialog">
|
<img src="img/icon_close.png" @click="hiddenDialog()">
|
<div class="dialog_title">添加提现记录</div>
|
|
<div id="tx_date" class="tx_title_desc">提现日期</div>
|
<div class="div_input_content_bg">
|
<input id="inpunt_date_year" class="input" type="text" placeholder="如:2020.02.02" readonly="readonly" name="appDate">
|
</div>
|
|
|
<div id="tx_date" class="tx_title_desc">提现时间</div>
|
<div class="div_input_content_bg">
|
<input id="inpunt_date" class="input" type="text" placeholder="如:20:00" name="appTime" readonly="readonly">
|
</div>
|
|
<div id="tx_other" class="tx_title_desc">提现金额</div>
|
<div class="div_input_content_bg">
|
<input id="inpunt_money" class="input" type="number" placeholder="单笔最大提现金额不超过1000" onkeyup="value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
|
</div>
|
|
<div class="dialog_commit" @click="commitAddTxRecord">确认</div>
|
</div>
|
</div>
|
</div>
|
</body>
|
|
<script type="text/javascript">
|
|
|
</script>
|
|
<script>
|
var host = "http://api.flqapp.com";
|
var host1 = "http://apph5.banliapp.com";
|
var nowDate = new Date();
|
var nowDate = new Date();
|
var year = nowDate.getFullYear();
|
var month = nowDate.getMonth() + 1; // 记得当前月是要+1的
|
var dt = nowDate.getDate();
|
var hour = nowDate.getHours(); //得到小时
|
var minu = nowDate.getMinutes(); //得到分钟
|
|
var today = year + "-" + month + "-" + dt;
|
|
$(function() {
|
setTimeout(function() {
|
var currYear = (new Date()).getFullYear();
|
var opt = {};
|
opt.date = {
|
preset: 'date'
|
};
|
opt.datetime = {
|
preset: 'datetime'
|
};
|
opt.time = {
|
preset: 'time'
|
};
|
opt.default = {
|
theme: 'android-ics light', //皮肤样式
|
display: 'modal', //显示方式
|
mode: 'scroller', //日期选择模式
|
dateFormat: 'yyyy-mm-dd',
|
lang: 'zh',
|
showNow: true,
|
nowText: "今天",
|
startYear: currYear - 10, //开始年份
|
endYear: currYear + 10 //结束年份
|
};
|
$("#inpunt_date_year").mobiscroll($.extend(opt['date'], opt['default']));
|
var optTime = $.extend(opt['time'], opt['default']);
|
$("#inpunt_date").mobiscroll(optTime).time(optTime);
|
|
|
}, 1000);
|
|
var app = new Vue({
|
el: '#root',
|
data: {
|
buttonName: '提交预览',
|
dataList: [],
|
},
|
watch: {
|
dataList: function(val) {
|
$('#root').css('display', 'block');
|
}
|
},
|
methods: {
|
addTxRecord: function() {
|
$('.dialogmask').css('display', 'block')
|
},
|
hiddenDialog: function() {
|
$('.input').val('');
|
$('.dialogmask').css('display', 'none')
|
},
|
|
|
commitAddTxRecord: function() {
|
var txYeaer = $('#inpunt_date_year').val();
|
var txDate = $('#inpunt_date').val();
|
var txMoney = $('#inpunt_money').val();
|
var dateBoll = compareDate(txYeaer, today);
|
var timeBoll = CompareDateTime(txDate, hour + ':' + minu);
|
|
if (txYeaer.length <= 0 || txYeaer == null) {
|
yesApp.toast('请输入提现日期')
|
return;
|
}
|
|
if (txDate.length <= 0 || txDate == null) {
|
yesApp.toast('请输入提现时间')
|
return;
|
}
|
|
if (txMoney.length <= 0 || txMoney == null) {
|
yesApp.toast('请输入提现金额')
|
return;
|
}
|
|
if (!dateBoll) {
|
yesApp.toast('提现日期不得选择早于当前日期')
|
return;
|
}
|
|
if (!timeBoll) {
|
yesApp.toast('提现时间不得选择早于当前时间')
|
return;
|
}
|
|
if (parseInt(txMoney) > 1000) {
|
yesApp.toast('单笔最大提现金额不超过1000')
|
return;
|
}
|
|
yesApp.showLoading();
|
var uid = yesApp.getUid();
|
var dateRequest = txYeaer + ' ' + txDate;
|
|
var params = {
|
uid: uid,
|
dayTime: dateRequest,
|
money: txMoney
|
};
|
params = yesApp.getRequestBaseParams(params);
|
|
$.ajax({
|
type: "GET",
|
data: JSON.parse(params),
|
url: host + "/fanli/api/v2/preview/saveExtractRecord",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
if (result.code == 0) {
|
app.hiddenDialog();
|
app.fetchExtractRecord();
|
|
} else {
|
yesApp.hideLoading();
|
// yesApp.toast(result.msg);
|
}
|
},
|
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {}
|
}
|
});
|
},
|
|
fetchExtractRecord: function() {
|
var uid = yesApp.getUid();
|
var params = {
|
uid: uid,
|
};
|
params = yesApp.getRequestBaseParams(params);
|
|
$.ajax({
|
type: "GET",
|
data: JSON.parse(params),
|
url: host + "/fanli/api/v2/preview/getExtractRecord",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
yesApp.hideLoading();
|
if (result.code == 0) {
|
app.dataList = result.data.list;
|
|
} else {
|
yesApp.toast(result.msg);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
setTimeout(function() {}, 2000);
|
}
|
}
|
});
|
},
|
|
commitInfo: function() {
|
yesApp.showLoading();
|
var uid = yesApp.getUid();
|
var params = {
|
uid: uid,
|
};
|
params = yesApp.getRequestBaseParams(params);
|
|
$.ajax({
|
type: "GET",
|
data: JSON.parse(params),
|
url: host + "/fanli/api/v2/preview/previewExtractRecord",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
if (result.code == 0) {
|
yesApp.hideLoading();
|
yesApp.toast('' + result.data);
|
|
} else {
|
yesApp.hideLoading();
|
yesApp.toast(result.msg);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
alert('請求超時');
|
setTimeout(function() {
|
alert('重新请求');
|
}, 2000);
|
}
|
}
|
});
|
},
|
|
deleteData: function(idType) {
|
yesApp.showLoading();
|
var uid = yesApp.getUid();
|
var params = {
|
uid: uid,
|
id: idType,
|
};
|
params = yesApp.getRequestBaseParams(params);
|
|
$.ajax({
|
type: "GET",
|
data: JSON.parse(params),
|
url: host + "/fanli/api/v2/preview/deleteExtractRecord",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
if (result.code == 0) {
|
app.hiddenDialog();
|
app.fetchExtractRecord();
|
|
} else {
|
yesApp.hideLoading();
|
yesApp.toast(result.msg);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
alert('請求超時');
|
setTimeout(function() {
|
alert('重新请求');
|
}, 2000);
|
}
|
}
|
});
|
}
|
}
|
});
|
app.fetchExtractRecord();
|
|
function compareDate(checkStartDate, checkEndDate) {
|
var arys1 = new Array();
|
var arys2 = new Array();
|
if (checkStartDate != null && checkEndDate != null) {
|
arys1 = checkStartDate.split('-');
|
var sdate = new Date(arys1[0], parseInt(arys1[1] - 1), arys1[2]);
|
arys2 = checkEndDate.split('-');
|
var edate = new Date(arys2[0], parseInt(arys2[1] - 1), arys2[2]);
|
if (sdate > edate) {
|
return false;
|
|
} else {
|
return true;
|
}
|
}
|
};
|
|
function CompareDateTime(t1, t2) {
|
var a = t1.split(":");
|
var b = t2.split(":");
|
var aa = a[0] + a[1];
|
var bb = b[0] + b[1];
|
if (parseInt(aa) > parseInt(bb)) {
|
return false;
|
}
|
return true;
|
}
|
});
|
</script>
|
</html>
|