Files

424 lines
15 KiB
HTML
Raw Permalink Normal View History

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>KSD转出OTC</title>
<link rel="stylesheet" type="text/css" href="/css/api.css" />
<link rel="stylesheet" type="text/css" href="/css/content.css" />
<script type="text/javascript" src="/scripts/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="/scripts/jquery.cookie.min.js"></script>
<!--<script type="text/javascript" src="/scripts/iscroll.js"></script>-->
<script type="text/javascript" src="/script/main.js?t=0"></script>
<script type="text/javascript" src="/layer/layer.js"></script>
<script type="text/javascript" src="/Scripts/long.js"></script>
<script type="text/javascript" src="/script/moment.js"></script>
<script type="text/javascript" src="/script/area.js?t=0"></script>
<script type="text/javascript" src="/script/api.js"></script>
<style type="text/css">
html, body {
overflow: hidden;
}
#wrapper {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.pullDown {
position: absolute;
top: -1.25rem;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
display: none;
}
.pullUp {
position: absolute;
bottom: -1.25rem;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
display: none;
}
.pullDown.loading, .pullUp.loading, .pullDown.refresh, .pullUp.refresh {
display: block;
}
.dbtnbox {
margin: 0 auto;
width: 100%;
text-align: center;
padding: 0;
box-sizing: border-box;
}
.dbtnbox input[type='button'] {
height: 3.5em;
line-height: 3.5em;
border-radius: 0;
}
.uploadpic_btn {
position: absolute;
width: 5em;
height: 5em;
right: 0;
top: 0;
opacity: 0;
filter: alpha(opacity=0);
}
.layer {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 100;
background: rgba(0, 0, 0, .5);
display: none;
}
.layer img {
width: auto;
max-width: 20em;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
<script type="text/javascript">
var userId = null;
var LoginId = null;
var CartId = null;
var opentimes = null;
var sInterval0 = null;
var zcsxf = 0;
var t = 0;
var title = "KSD转出OTC";
var address = null;
var myScroll = null;
var pullDown = 1; // 下拉刷新避免多次执行
var pullUp = 1; // 上拉加载避免多次执行
var downHeight = 0;
var upHeight = 0;
var isload = true;//设置是否终止滚动加载
var curScrollHeight = 0;//当前滚动位置
var curCount = 1;//计数器,防止滚动时重复执行加载下一页
$(document).ready(function () {
userId = getlocalStorage("userId");
LoginId = getlocalStorage("LoginId");
CartId = getlocalStorage("CartId");
/*var tt = $.getUrlParam("t");
if (tt != null) {
t = tt;
}
if (t == 1) {
title = "流量积分转KSD";
}
$("header h1").html(title);
$(document).attr("title", title);
$("title").html(title);*/
rdata();
getje();
});
function rdata() {
var userinfo = getlocalStorage("userinfo");
var userdata = JSON.parse(userinfo);
var TXEnable = userdata.ZCEnable;
if (TXEnable == 1) {
$("#savebtn").val("暂时不能转出");
$("#savebtn").attr("disabled", true);
} else {
$("#savebtn").val("提交");
$("#savebtn").removeAttr("disabled");
}
$("#txtuserid").val(userdata.UserName);
$("#textje2").html(userdata.ksdye);
if (t == 1) {
$("#textje2").html(userdata.ggjfye);
}
zcsxf = userdata.zhsxf;
$("#sxf_box").html(zcsxf + "%");
$("#txmsg").html(userdata.zzmsg0);
}
function onviewimage(t) {
var _src = "";
if (t == 0) {
_src = $("#yedimage img").attr("src");
} else {
_src = $("#weixinimage img").attr("src");
}
$(".layer img").attr("src", _src);
$(".layer").fadeIn();
}
function onsave() {
var je = fTrim($('#txtje').val());
var czuserid = fTrim($('#txtuserid').val());
var pwd = fTrim($('#txtpwd').val());
var ifb = true;
if (ifb) {
if (je == "") {
tishi3("转出数量不能为空!");
$("#txtje").focus();
ifb = false;
}
}
if (ifb) {
if (czuserid == "") {
tishi3("OTC账户不能为空");
$("#txtuserid").focus();
ifb = false;
}
}
if (ifb) {
if (pwd == "") {
tishi3("安全密码不能为空!");
$("#txtpwd").focus();
ifb = false;
}
}
if (ifb) {
if ($("#savebtn").val() != "提交") {
ifb = false;
}
}
if (ifb) {
$("#savebtn").attr("disabled");
$("#savebtn").val("请稍候...");
try {
var datas = {
action: "mslczc",
userId: userId,
LoginId: LoginId,
t:t,
czuserid: czuserid,
pwd: pwd,
je: je
};
$.ajax({
type: 'POST',
url: "/apiajax.ashx?ifweb=1",
data: datas,
dataType: "json",
error: function (xhr) {
tishi3("发生错误:" + JSON.stringify(xhr));
},
success: function (data) {
$("#savebtn").removeAttr("disabled");
$("#savebtn").val("提交");
if (data) {
if (data.status == 1) {
tishi3(data.msg);
$('#txtje').val("");
setlocalStorage("userinfo", JSON.stringify(data.userInfo));
rdata();
setlocalStorage("myrefresh", 1);
setlocalStorage("mylogrefresh", 1);
setlocalStorage("indexrefresh", 1);
setlocalStorage("ksdrefresh", 1);
var closeInterval = setInterval(function () {
closeWin();
layer.closeAll();
clearInterval(closeInterval);
}, 300);
} if (data.status == 0) {
tishi3(data.msg);
if (data.msg == "请先修改安全密码!") {
var closeInterval = setInterval(function () {
onlink("editpwd.html?t=1");
layer.closeAll();
clearInterval(closeInterval);
}, 500);
}
if (data.msg == "请先实名认证!") {
var closeInterval = setInterval(function () {
onlink("mydata.html");
layer.closeAll();
clearInterval(closeInterval);
}, 500);
}
}
} else {
tishi3('网络异常,请稍后重试');
}
}
});
} catch (err) {
tishi3(err);
}
}
}
function getje() {
var je = fTrim($('#txtje').val());
if (je != "") {
var sjje = parseFloat(je);
sjje = (sjje - sjje * zcsxf / 100);
$("#textje0").html(changeTwoDecimal_f(sjje));
}
}
</script>
</head>
<body class="wrap">
<header>
<div class="ub">
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:3em" onclick="closeWin()">
<img src="../image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
</div>
<h1 class="ub-f1">
KSD转出OTC
</h1>
<div class="nav-btn blue" id="nav-right" onclick="onlink('zhuanchu_log.html')" style="color:#fff; margin:0; padding:0; min-width:4em; padding-right:1em;">
转出记录
</div>
</div>
</header>
<section class="ub-f1" id="wrapper">
<div id="wrapper_content">
<p class="pullDown">下拉刷新...</p>
<div class="clear"></div>
<div id="content2" class="ub ub-ver" style="padding:0.8em; box-sizing:border-box;">
<div class="tixin-item" style="margin-top:0.8em;">
<div class="ub ub-ac" style="margin-bottom: .08em;">
<div class="ub font_box" style="padding:0.8em 0em;width:8em;">
您的余额
</div>
<div class="ub ub-f1 uinput11" style="box-sizing:border-box;">
<p><span class="text" id="textje2" style=" color: red;">0.00</span></p>
</div>
</div>
<div class="ub ub-ac" style="margin-bottom: .08em;">
<div class="ub font_box" style="padding:0.8em 0em;width:6em;">
转出数量
</div>
<div class="ub ub-f1 uinput11" style="box-sizing:border-box;">
<input type="number" id="txtje" onblur="getje()" onkeydown="getje()" onkeyup="getje()" />
</div>
</div>
<!--<div class="flex-end" style="margin-bottom: .08em;">
<div class="ub font_box" style="padding:0.8em 0.8em;">
手续费:<span id="sxf_box" style="color:#ff4d00;"></span>
</div>
<div class="ub font_box" style="padding:0.8em 0em; padding-right:2em;">
实际到账:<span id="textje0" style="color:#ff4d00;"></span>
</div>
</div>-->
<div class="ub ub-ac" style="margin-bottom: .08em;">
<div class="ub font_box" style="padding:0.8em 0em;width:6em;">
KSD账户
</div>
<div class="ub ub-f1 uinput11" style="box-sizing:border-box;">
<input type="text" id="txtuserid" style="" />
</div>
</div>
<!--
</div>
</div>
<!--<div class="ub ub-ac" id="phone" style="margin-bottom: .08em;">
<div class="ub ub-f1" style="padding:1em 1.5em;">
您的手机号
</div>
<div class="ub ub-ac ub-pc uinput11" style="width:10em;padding-right: 1.6em">
<input id="txtphone" type="text" disabled value="" style="color:#848484; border:0; width: 9em;" />
</div>
</div>
<div class="ub ub-ac" id="phonesms" style="margin-bottom: .08em;">
<div class="ub ub-f1" style="padding:1em 1.5em;width:4em;">
手机验证码
</div>
<div class="ub ub-ac ub-pc">
<div class="ub ub-ac ub-pc uinput11" style="width:10em;padding-right: 1.6em">
<input id="txtcode" type="text" style=" width: 3.2em; text-align: center;" />
<input class="tx-c" id="getcode" type="button" style="border: 1px solid #DFDFDF;width: 6.5em;margin:0;height:2em;color: #000;background-color: #FFFFFF" value="获取验证码" onclick="time(this)"/>
</div>
</div>
</div>-->
<div class="ub ub-ac" id="phonesms" style="margin-bottom: .08em;">
<div class="ub font_box" style="padding:0.8em 0em;width:6em;">
安全密码
</div>
<div class="ub ub-f1 uinput11" style="box-sizing:border-box;">
<input type="password" id="txtpwd" style="" />
</div>
</div>
<div class="ub ub-ver" style="margin-bottom: .08em;">
<div class="ub" style="padding:0.8em 0em;width:100%;box-sizing:border-box;">
转出说明
</div>
<div class="ub ub-ac ub-pc" style="padding:0em;">
<div id="txmsg" class="ub" style="width:100%;padding: 0.8em 0em;padding-top:0;color:#848484; box-sizing:border-box;">
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
<p class="pullUp">上拉加载...</p>
</div>
</section>
<footer>
<div class="dbtnbox">
<input id="savebtn" type="button" class="mybtn" onclick="onsave()" value="提交">
</div>
</footer>
<div class="ajaxLoader ub ub-ac uhide" onclick="reload()">
<div class="ub ub-ac ub-ver"><img src="image/load.gif" /><br>正在加载...</div>
</div>
<div class="layer" onclick='$(".layer").fadeOut();'>
<img src="/images/jt.png" alt="">
</div>
</body>
</html>