469 lines
17 KiB
HTML
469 lines
17 KiB
HTML
<!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>互转</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 t = 1;
|
||
var title = "";
|
||
var zzsxf = 0;
|
||
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 = "余额互转";
|
||
}
|
||
if (t == 2) {
|
||
title = "赠送兑换积分";
|
||
}
|
||
if (t == 3) {
|
||
title = "贡献值互转";
|
||
}
|
||
if (t == 4) {
|
||
title = "消费券互转";
|
||
}
|
||
|
||
$("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.ZZEnable;
|
||
if (t == 4) {
|
||
TXEnable = userdata.ZZEnable0;
|
||
}
|
||
else if (t == 2) {
|
||
TXEnable = userdata.ZZEnable1;
|
||
}
|
||
if (TXEnable == 1) {
|
||
$("#savebtn").val("暂时不能转账");
|
||
$("#savebtn").attr("disabled", true);
|
||
} else {
|
||
$("#savebtn").val("提交");
|
||
$("#savebtn").removeAttr("disabled");
|
||
}
|
||
var stitle = "您的余额";
|
||
var ye = userdata.xjjye;
|
||
zzsxf = 0;
|
||
if (t == 2) {
|
||
stitle = "您的兑换积分";
|
||
ye = userdata.mfye;
|
||
zzsxf = 0;
|
||
$("#nav-right").html("赠送记录");
|
||
|
||
$("#zznumtitle").html("赠送数量");
|
||
$("#zzmsgtitle").html("赠送说明");
|
||
}
|
||
if (t == 3) {
|
||
stitle = "您的贡献值";
|
||
ye = userdata.gxzye;
|
||
zzsxf = 0;
|
||
}
|
||
if (t == 4) {
|
||
stitle = "您的佣金";
|
||
ye = userdata.xjye;
|
||
zzsxf = 0;
|
||
}
|
||
if (t == 5) {
|
||
stitle = "您的KSD";
|
||
ye = userdata.ksdye;
|
||
zzsxf = 0;
|
||
}
|
||
$("#zztitle").html(stitle+":");
|
||
$("#textje2").html(ye);
|
||
$("#sxf_box").html(zzsxf + "%");
|
||
$("#txmsg").html((t == 5 ? userdata.zzmsg : (t == 4 ? userdata.zzmsg2 : (t == 2 ? userdata.zzmsg1.replace(/转账/gi, "赠送") : userdata.zzmsg1))));
|
||
if (t == 2) {
|
||
//$("#txmsg").html($("#txmsg").html().replace(/转账/gi, "赠送"));
|
||
}
|
||
}
|
||
function checkname() {
|
||
if (fTrim($("#txtusername").val()) == "") {
|
||
tishi3("对方账户不能为空");
|
||
} else {
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: '/apiajax.ashx?action=GetUserName2&ifweb=1&t=3&name=' + $("#txtusername").val(),
|
||
dataType: "json",
|
||
error: function (xhr) {
|
||
tishi3("发生错误:" + JSON.stringify(xhr));
|
||
},
|
||
success: function (data) {
|
||
|
||
if (data.status == 1) {
|
||
$("#txtname").val(data.name);
|
||
|
||
}
|
||
if (data.status == 0) {
|
||
$("#txtname").val("");
|
||
tishi3(data.msg);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
function onsave() {
|
||
var username = fTrim($('#txtusername').val());
|
||
var je = fTrim($('#txtje').val());
|
||
var pwd = fTrim($('#txtpwd').val());
|
||
var desc = fTrim($('#explain').val());
|
||
var ifb = true;
|
||
if (ifb) {
|
||
if (username == "") {
|
||
tishi3("对方账号不能为空!");
|
||
$("#txtusername").focus();
|
||
ifb = false;
|
||
}
|
||
}
|
||
if (ifb) {
|
||
if (je == "") {
|
||
tishi3("转账数量不能为!");
|
||
$("#txtje").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: "zhuanzhang",
|
||
userId: userId,
|
||
LoginId: LoginId,
|
||
UserName: username,
|
||
code: "",
|
||
pwd: pwd,
|
||
je: je,
|
||
zztype: t,
|
||
desc: desc
|
||
};
|
||
$.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);
|
||
}, 600);
|
||
|
||
} if (data.status == 0) {
|
||
tishi3(data.msg);
|
||
if (data.msg == "请先修改安全密码!") {
|
||
var closeInterval = setInterval(function () {
|
||
layer.closeAll();
|
||
onlink("editpwd.html?t=1");
|
||
clearInterval(closeInterval);
|
||
}, 600);
|
||
}
|
||
}
|
||
} else {
|
||
tishi3('网络异常,请稍后重试');
|
||
}
|
||
}
|
||
});
|
||
} catch (err) {
|
||
tishi3(err);
|
||
}
|
||
}
|
||
}
|
||
function onlog() {
|
||
onlink("zhuanzhang_log.html?t=" + t);
|
||
}
|
||
function getje() {
|
||
var je = fTrim($('#txtje').val());
|
||
if (je != "") {
|
||
var sjje = parseFloat(je);
|
||
if (t == 0 || t == 1 || t == 3) {
|
||
sjje = (sjje - sjje * zzsxf/100);
|
||
} else if (t == 2) {
|
||
sjje = sjje - zzsxf;
|
||
}
|
||
$("#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">
|
||
互转
|
||
</h1>
|
||
<div class="nav-btn blue" id="nav-right" onclick="onlog()" 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 style="padding:0.8em;box-sizing:border-box;">
|
||
<div class="tixin-item">
|
||
<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="text" id="txtusername" onblur="checkname()" />
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="ub ub-ac" id="zhanghao" 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="text" id="txtname" disabled="" style="width:9em; border: 0; outline: none;background:none" />
|
||
|
||
</div>
|
||
</div>
|
||
<div class="ub ub-ac" style="margin-bottom: .08em;">
|
||
<div class="ub font_box" id="zztitle" style="padding:0.8em 0em;width:7em;">
|
||
您的余额
|
||
</div>
|
||
<div class="ub ub-f1 uinput11" style="box-sizing:border-box;">
|
||
<div class="text" id="textje2" style="width:8em;text-align:left; color: red;">0.00</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<div class="ub ub-ac" style="margin-bottom: .08em;">
|
||
<div class="ub font_box" id="zznumtitle" 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()" style=" text-align: center;" />
|
||
|
||
</div>
|
||
|
||
</div>
|
||
<div class="flex-end uhide" id="zzsxf_box" style="margin-bottom: .08em;">
|
||
<div class="ub font_box" style="padding:0.8em 0;">
|
||
手续费:<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" 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=" text-align: center;" />
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="ub ub-f1 ub-ver" style="padding: .8em 0; padding-left:0em; margin-bottom: .2em;height: 2em;">
|
||
<div class="ub uinput11">
|
||
<textarea id="explain" style=" width:100%;height: 2.7em;line-height:2.2em;" placeholder="添加备注" onfocus="placeholder='';" onblur="$(this).val()==''?placeholder='添加备注':placeholder=''"></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="ub ub-ver" style="margin-bottom: .08em;">
|
||
<div class="ub" id="zzmsgtitle" style="padding:0.8em 0em;width:6em;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 style="background-color:#fff; border:0;">
|
||
<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>
|