Files
g.hnyhua.cn/Mtxfw.VipSite/mobile/zzjf_log.html
2026-02-07 15:48:27 +08:00

391 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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-2.0.2.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/api.js"></script>
<style type="text/css">
html, body {
overflow: hidden;
}
#wrapper {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.mybalance-item {
float: none;
}
.mybalance-item div {
float: none;
}
.showthjto {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.showthjto_box {
position:relative;
border-radius: 0.5em;
margin: 0;
width: 94%;
}
.tab {
height: 2.5em;
line-height: 2.5em;
background-color: #fff;
}
.tab a {
display: flex;
flex: 1;
height: 2.5em;
line-height: 2.5em;
text-align: center;
border: 1px solid #f1f1f1;
border-left: 0;
border-top: 0;
align-items: center;
justify-content: center;
color: #000;
}
.tab a.on {
border-bottom: 1px solid #00B050;
color: #00B050;
}
</style>
<script type="text/javascript">
var userId = null;
var LoginId = null;
var CartId = null;
var opentimes = null;
var t = 0;
var jlid = 0;
var jrjg = 0;
var addtime = "";
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");
$(".tab a").on("click", function () {
var num = $(this).index();
$(this).addClass("on").siblings().removeClass("on");
t = num;
rdata(1);
$("#wrapper").animate({ scrollTop: 0 }, 500);
});
rdata(1);
});
function onScroll0() {
isload = true;//设置是否终止滚动加载
curScrollHeight = 0;//当前滚动位置
curCount = 1;//计数器,防止滚动时重复执行加载下一页
$("#wrapper").scroll(function () {
var pageHeight = $("#sysnew").height();
var showHeight = $("#wrapper").height();
var scrollHeight = $("#wrapper").scrollTop();
if (curScrollHeight - scrollHeight < 10 && curScrollHeight > 0) {
if (curCount == 1 && isload) {
rdata(0);
}
curCount++; //加载下一页后计数器+1
}
if (curScrollHeight < scrollHeight) {
curScrollHeight = pageHeight - showHeight;//滚动到页面底部时,重设当前滚动位置
curCount = 1;
}
});
}
function rdata(ag) {
userId = getlocalStorage("userId");
LoginId = getlocalStorage("LoginId");
var Start = $("#sysnew .databox").length;
if (ag == 1) {
Start = 0;
}
if ($(".ajaxLoader.uhide").length > 0) {
$(".ajaxLoader").removeClass("uhide");
$(".more_box").html("");
$.ajax({
type: 'GET',
url: "/apiajax.ashx",
data: "&action=getzzjf_log&ifweb=1&t=" + t + "&Start=" + Start + "&userId=" + (userId != null ? userId : "") + "&LoginId=" + (LoginId != null ? LoginId : ""),
dataType: "JSON",
error: function (xhr, type) {
tishi3("发生错误" + JSON.stringify(xhr));
},
success: function (data) {
if (data) {
if (data.status == 1) {
var html = "";
if (Start == 0) {
jrjg = data.jrjg;
}
if (data.data.length > 0) {
var html = "";
for (i = 0; i < data.data.length; i++) {
var bifshow = 0;
if (ag == 0) {
if ($("#databox_" + data.data[i].id).length == 0) {
bifshow = 1;
}
} else {
bifshow = 1;
}
if (bifshow == 1) {
html += addMsg(data.data[i]);
}
}
if (ag == 1 || ag == 2) {
$("#sysnew").html(html);
if (ag == 1) {
onScroll0();
}
} else {
$("#sysnew").append(html);
}
} else {
isload = false;
if (Start > 0) {
if (Start > 10) {
$(".more_box").html("找不到更多了");
}
} else {
$('#sysnew').html("");
$(".more_box").html("暂无信息");
}
}
$(".ajaxLoader").addClass("uhide");
} else {
tishi3(data.msg);
$(".ajaxLoader").addClass("uhide");
if (data.msg == "您未登录") {
//$api.rmStorage("userId");
//$api.rmStorage("LoginId");
}
}
} else {
tishi3("网络错误");
$(".ajaxLoader").addClass("uhide");
}
}
});
}
}
function addMsg(param) {
var html = '<div class="mybalance-item databox" id="databox_' + param.id + '">';
html += '<div class="Total">';
html += '<div><span>数量:' + param.sl + '</span></div>';
html += '<div class="right"><span>比例:' + param.jg + '</span></div>';
html += '</div>';
html += '<div class="Total0">';
html += '<div><span>时间:' + judgetime(param.addtime) + '</span></div>';
html += '<div class="right">';
html += '<div>' + param.content + '</div > ';
//html += '<div class="mybtn" onclick="showmc(' + param.id + ',' + param.sl + ')">卖出</div>';
html += '</div>';
html += '</div>';
//html += '<div class="Total0">';
//html += '<div>时间:' + judgetime(param.addtime) + '</div>';
//html += '</div>';
html += '</div>';
html += '<div class="clear"></div>';
return html;
}
function showmc(id, sl) {
jlid = id;
$("#mcsl").html(sl);
$("#mcjg").html(jrjg);
$("#yjdz").html((jrjg * sl).toFixed(2));
showbox(0);
}
function stopPropagation(e) {
if (e.stopPropagation)
e.stopPropagation();
else
e.cancelBubble = true;
}
function showbox(type) {
$("#showthjto" + type).removeClass("uhide");
}
function hideshowthjto(type) {
$("#showthjto" + type).addClass("uhide");
}
function qymc() {
var pwd = fTrim($('#txtpwd').val());
var ifb = true;
if (ifb) {
if (pwd == "") {
tishi3("安全密码不能为空");
$("#txtpwd").focus();
ifb = false;
}
}
if (ifb) {
if ($("#btntj").val() != "确认") {
ifb = false;
}
}
if (ifb) {
$("#btntj").attr("disabled");
$("#btntj").val("请稍候...");
try {
var datas = {
action: "qymczzjf",
userId: userId,
LoginId: LoginId,
id: jlid,
pwd: pwd
};
$.ajax({
type: 'POST',
url: "/apiajax.ashx?ifweb=1",
data: datas,
dataType: "json",
error: function (xhr) {
tishi3("发生错误" + JSON.stringify(xhr));
},
success: function (data) {
$("#btntj").removeAttr("disabled");
$("#btntj").val("确认");
if (data) {
if (data.status == 1) {
tishi3(data.msg);
setlocalStorage("userinfo", JSON.stringify(data.userInfo));
rdata(1);
hideshowthjto(0);
setlocalStorage("myrefresh", 1);
setlocalStorage("zzjfrefresh", 1);
} if (data.status == 0) {
tishi3(data.msg);
if (data.msg == "请先修改安全密码") {
var closeInterval = setInterval(function () {
hideshowthjto(0);
clearInterval(closeInterval);
onlink("editpwd.html?t=1");
}, 600);
}
}
} else {
tishi3('网络异常,请稍后重试');
}
}
});
} catch (err) {
tishi3(err);
}
}
}
</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" style=" margin:0; padding:0; min-width:3em; padding-right:1em;">
</div>
</div>
</header>
<section class="ub-f1" id="wrapper">
<div class="tab flex-around">
<a class="on">全部</a>
<a>收入</a>
<a>支出</a>
</div>
<div class="ub ub-ver" style="padding:0.8em;box-sizing:border-box;" id="sysnew"> </div>
<div class="clear"></div>
<div class="more_box"></div>
</section>
<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="showthjto uhide" id="showthjto0" onclick='hideshowthjto(0);'>
<div class="showthjto_box" onclick="stopPropagation(event)">
<h3><span>卖出</span><span class="close" onclick='hideshowthjto(0);'><img src="../image/close.png" /></span></h3>
<div class="ub ub-ac" style="margin: .8em 0;padding-left:1em;">
卖出数量:<span id="mcsl"></span>
<br>卖出价格:<span id="mcjg"></span>
<br>预计到账:<span id="yjdz"></span>
</div>
<div class="ub ub-ac" style="margin-bottom: .08em;">
<div class="ub" style="padding:1em;">
安全密码
</div>
<div class="ub ub-ac ub-pc">
<div class="ub ub-ac ub-pc uinput11" style="padding-right: 1.6em">
<input type="password" id="txtpwd" style="" />
</div>
</div>
</div>
<div class="ub ub-ac ub-pc" style="margin-bottom: .08em;">
<input type="button" class="btntj mybtn" id="btntj" onclick="qymc()" value="确认" />
<input type="button" class="btnqx mybtn hovered" id="btnqx" onclick='hideshowthjto(0);' value="取消" />
</div>
</div>
</div>
</body>
</html>