You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

164 lines
5.0 KiB

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<!--#include file="/widget/head.html"-->
</head>
<body class="layui-body">
<div id="wrapper" class="row layui-card layui-panel">
<!-- Navigation -->
<!--#include file="/widget/nav.html"-->
<div id="page-wrapper" class="layui-form" lay-filter="mform">
<div class="layui-card" id="card-page-wrapper">
<div class="row">
<div class="container" style="margin-left: 10px">
<div class="col-md-1" style="width:40px;">
<p style="font-size: 18px;line-height: 35px;float: right">Uid:</p>
</div>
<div class="col-md-4" style="width:200px;">
<input type="text" class="layui-input" id="uid" placeholder="请输入UID">
</div>
<div class="col-md-1">
<button type="button" class="layui-btn" id="sele">查询</button>
</div>
<div class="col-md-1">
<button type="button" class=" layui-btn" id="costItemDiv">更改道具</button>
</div>
</div>
</div>
<div class="row table-responsive" id="form" style="width: 100%">
<table class="table table-striped table-bordered table-hover inline" id="hero_table">
</table>
</div>
</div>
</div>
</div>
<!--#include file="/widget/tail.html"-->
<script type="text/javascript">
var itemlist;
$("#sele").click(function () {
Select_data(1, 120, 1);
});
$("#costItemDiv").click(function(){
var uid = $("#uid").val();
opennotice(uid)
});
function opennotice(uid) {
let title = "扣除道具";
layer.open({
content: `/pages/EditBagCost.html?uid=${uid}`,
type: 2,
title: title,
area: ['550px', '350px'],
success: function(layero, index){
// 获取弹窗中的iframe元素
var iframe = layero.find('iframe')[0];
// 向iframe传递数据
iframe.contentWindow.postMessage({data: uid}, '*');
}
});
}
function ini_page(data) {
layui.laypage.render({
elem: 'test1',
count: data.count,
limits: [10, 20, 30, 40, 50, 80, 100],
limit: 100,
layout: ["count", "prev", "page", "next", "limit", "skip"],
jump: function (obj, first) {
if (!first) {
Select_data(obj.curr, obj.limit, 0);
}
}
});
}
function inihero_table(data, limit) {
m_limit = limit;
console.info(data);
herotable = layui.table.render({
elem: '#hero_table',
page: false,
data: data,
width: 1300,
height: 1100,
autoSort: true,
limit: limit,
cols: [[
{ field: 'itemId', title: 'itemId', sort: true, width: 120 },
{ field: 'count', title: '数量', sort: true, width: 180 },
{ field: 'name', title: '名称', sort: true, width: 180 },
]]
});
}
function Select_data(page, limit, first) {
let uid=$("#uid").val();
if(uid==""||uid==0){
return;
}
$.ajax({
type: "GET",
url: Page.SvrIp + "/api/player_monitor",
data: {
token: cookie.get("token"),
page: page,
limit: limit,
Account: uid,
uid: uid,
token: cookie.get("token"),
AccountType: 0,
dbName: "PandoraBag"
},
dataType: "json",
beforeSend: function () {
layer.load(1, { shade: [0.8, '#393D49'] });
},
complete: function () {
layer.closeAll('loading');
},
success: function (d) {
console.dir(d);
debugger;
exchange_data =d.data; //JSON.parse(d.data);
inihero_table(exchange_data, limit);
if (first === 1) {
ini_page(d);
}
}
});
}
$(function () {
initPage('背包查询');
});
</script>
<script src="../js/coupon.js"></script>
</body>
</html>