|
|
|
@ -131,7 +131,7 @@ body {
|
|
|
|
|
width: 280px;
|
|
|
|
|
}
|
|
|
|
|
.form-group select {
|
|
|
|
|
width: 280px;
|
|
|
|
|
width: 290px;
|
|
|
|
|
}
|
|
|
|
|
.form-group textarea {
|
|
|
|
|
padding: 5px;
|
|
|
|
@ -163,54 +163,41 @@ body {
|
|
|
|
|
<select id="game-select" name="" class="select_gallery" <?php if($role):?>disabled<?php endif;?>>
|
|
|
|
|
<option value="0">请选择游戏</option>
|
|
|
|
|
<?php foreach($baseGames as $game):?>
|
|
|
|
|
<option value="<?=$game['id']?>" <?php if($role && $role['game_id'] == $game['id']):?>selected<?php endif;?>>
|
|
|
|
|
<option value="<?=$game['id']?>">
|
|
|
|
|
<?=$game['name']?>
|
|
|
|
|
</option>
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>区服</label>
|
|
|
|
|
<select id="server-select" class="select_gallery" <?php if($role):?>disabled<?php endif;?>>
|
|
|
|
|
<option value="0">请选择区服</option>
|
|
|
|
|
<?php foreach($servers as $server):?>
|
|
|
|
|
<option value="<?=$server['id']?>" <?php if($role && $server['server_id'] == $role['server_id']):?>selected<?php endif;?>>
|
|
|
|
|
<?=$server['server_name']?>
|
|
|
|
|
</option>
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
</select>
|
|
|
|
|
<label>角色ID</label>
|
|
|
|
|
<input type="text" id="role-id" name="role_id" class="txt normal_txt" placeholder="请输入角色ID" value="" style="width: 205px;">
|
|
|
|
|
<button id="search-role-btn" class="add-row" type="button">查询</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>角色</label>
|
|
|
|
|
<select id="role-select" name="role_id" class="select_gallery" <?php if($role):?>disabled<?php endif;?>>
|
|
|
|
|
<option value="">请选择角色</option>
|
|
|
|
|
<?php if($role):?>
|
|
|
|
|
<option value="<?=$role['role_id']?>" selected><?=$role['role_name']?></option>
|
|
|
|
|
<?php endif;?>
|
|
|
|
|
</select>
|
|
|
|
|
<label>角色区服</label>
|
|
|
|
|
<p id="server-name" class="static-input">--</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix" style="margin-top: 10px;">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>角色名称</label>
|
|
|
|
|
<p class="static-input">角色名称: --</p>
|
|
|
|
|
<p id="role-name" class="static-input">--</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>当前累充</label>
|
|
|
|
|
<p class="static-input">当前累充: --</p>
|
|
|
|
|
<p id="pay-amount" class="static-input">--</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>模拟发放金额</label>
|
|
|
|
|
<input type="text" name="amount" class="txt normal_txt" placeholder="请输入模拟发放金额" value="">
|
|
|
|
|
<input type="text" id="amount" name="amount" class="txt normal_txt" placeholder="请输入模拟发放金额" value="">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>备注</label>
|
|
|
|
|
<textarea name="remark" class="txt normal_txt" style="width: 280px;" rows="10" placeholder="请输入备注"></textarea>
|
|
|
|
|
<textarea id="remark" name="remark" class="txt normal_txt" style="width: 280px;" rows="10" placeholder="请输入备注"></textarea>
|
|
|
|
|
<!-- <input type="text" name="remark" class="txt normal_txt" placeholder="请输入备注" value=""> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label></label>
|
|
|
|
|
<button id="add-row" class="add-row" type="button">增加</button>
|
|
|
|
|
<button id="submit-btn" class="add-row" type="button">增加</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
@ -221,123 +208,6 @@ body {
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(".select_gallery").select2()
|
|
|
|
|
var globalGameId = $('#game-select').val()
|
|
|
|
|
var hasItf = $('#hasItf').val()
|
|
|
|
|
if (globalGameId > 0) {
|
|
|
|
|
initTable(globalGameId)
|
|
|
|
|
}
|
|
|
|
|
$('#game-select').on({
|
|
|
|
|
change: function () {
|
|
|
|
|
var gameId = $(this).val()
|
|
|
|
|
globalGameId = gameId
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('getServers')}",
|
|
|
|
|
type: "post",
|
|
|
|
|
data: { game_id: gameId },
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(result){
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
var servers = result.data.servers
|
|
|
|
|
var html = "<option value='0'>请选择区服</option>";
|
|
|
|
|
for (var i in servers){
|
|
|
|
|
html += "<option value='"+servers[i].id+"'>"+servers[i].server_name+"</option>"
|
|
|
|
|
}
|
|
|
|
|
$("#server-select").html(html);
|
|
|
|
|
$("#server-select").select2();
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
initTable(gameId)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
var resourceTypes = new Array()
|
|
|
|
|
var rowCount = 0
|
|
|
|
|
function initTable(gameId) {
|
|
|
|
|
var table = $('#resource-table');
|
|
|
|
|
table.find('.normal-row').remove()
|
|
|
|
|
if (hasItf != 1) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('getResourceTypes')}",
|
|
|
|
|
type: "post",
|
|
|
|
|
data: { game_id: gameId },
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(result){
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
rowCount = 0
|
|
|
|
|
resourceTypes = result.data.resourceTypes
|
|
|
|
|
var selector = $('#resource-type-select')
|
|
|
|
|
var html = getResourceTypesHtml()
|
|
|
|
|
selector.html(html)
|
|
|
|
|
selector.select2();
|
|
|
|
|
|
|
|
|
|
var resourceSelector = $('#resource-select')
|
|
|
|
|
resourceSelector.html(getResourcesHtml([]))
|
|
|
|
|
resourceSelector.select2();
|
|
|
|
|
|
|
|
|
|
$('#resource-amount').html('资源价值:--')
|
|
|
|
|
$('#resource-table tbody').html('')
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function getResourceTypesHtml() {
|
|
|
|
|
var html = "<option value=''>请选择资源类型</option>";
|
|
|
|
|
for (var i in resourceTypes) {
|
|
|
|
|
html += "<option value='"+resourceTypes[i].id+"'>"+resourceTypes[i].name+"</option>"
|
|
|
|
|
}
|
|
|
|
|
return html
|
|
|
|
|
}
|
|
|
|
|
$('#resource-type-select').change(function () {
|
|
|
|
|
var that = this
|
|
|
|
|
var typeId = $(this).val()
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('getResources')}",
|
|
|
|
|
type: "post",
|
|
|
|
|
data: { game_id: globalGameId, type_id: typeId },
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(result){
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
var resources = result.data.resources
|
|
|
|
|
var html = getResourcesHtml(resources)
|
|
|
|
|
var rowSelect = $('#resource-select')
|
|
|
|
|
rowSelect.html(html);
|
|
|
|
|
rowSelect.select2();
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
function getResourcesHtml(resources) {
|
|
|
|
|
var html = "<option value=''>请选择资源内容</option>";
|
|
|
|
|
for (var i in resources){
|
|
|
|
|
html += "<option value='"+resources[i].ref_id+"' data-amount="+resources[i].amount+">"+resources[i].name+"</option>"
|
|
|
|
|
}
|
|
|
|
|
return html
|
|
|
|
|
}
|
|
|
|
|
$('#resource-select').change(function () {
|
|
|
|
|
var amount = $(this).find('option:selected').attr('data-amount')
|
|
|
|
|
amount = amount == undefined ? '--' : amount
|
|
|
|
|
$('#resource-amount').html('资源价值:' + amount)
|
|
|
|
|
})
|
|
|
|
|
$('#add-row').click(function () {
|
|
|
|
|
if (rowCount >= 5) {
|
|
|
|
|
return layer.msg('最多同时只能添加5条')
|
|
|
|
|
}
|
|
|
|
|
var hasItf = $('#hasItf').val()
|
|
|
|
|
if (hasItf == 1) {
|
|
|
|
|
addRowItf()
|
|
|
|
|
} else {
|
|
|
|
|
addRow()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function isFloat(num){
|
|
|
|
|
if(!num) {
|
|
|
|
@ -369,181 +239,6 @@ body {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function addRow() {
|
|
|
|
|
var remark = $('#remark-input').val()
|
|
|
|
|
var amount = $('#remark-amount').val()
|
|
|
|
|
if (remark == '') {
|
|
|
|
|
return layer.msg('请输入资源备注')
|
|
|
|
|
}
|
|
|
|
|
if (amount == '') {
|
|
|
|
|
return layer.msg('请输入资源价值')
|
|
|
|
|
}
|
|
|
|
|
if (!isNumber(amount)) {
|
|
|
|
|
return layer.msg('资源价值只能为正整数')
|
|
|
|
|
}
|
|
|
|
|
var html = '<tr class="normal-row" >' +
|
|
|
|
|
'<td style="width:420px" class="remark"><input name="remark" type="text" style="width:400px" value="' + remark + '"></td>' +
|
|
|
|
|
'<td class="amount"><input name="amount" type="text" value="' + amount + '"></td>' +
|
|
|
|
|
'<td><button class="delete-row" type="button" class="danger-btn">删除</button></td>' +
|
|
|
|
|
'</tr>';
|
|
|
|
|
$('#resource-table tbody').append(html)
|
|
|
|
|
rowCount ++
|
|
|
|
|
$(".select_gallery").select2()
|
|
|
|
|
statQuota()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function addRowItf() {
|
|
|
|
|
var resourceTypeId = $('#resource-type-select').val()
|
|
|
|
|
var resourceId = $('#resource-select').val()
|
|
|
|
|
var resourceTypeName = $('#resource-type-select option:selected').html()
|
|
|
|
|
var resourceName = $('#resource-select option:selected').html()
|
|
|
|
|
var amount = $('#resource-select option:selected').attr('data-amount')
|
|
|
|
|
amount = amount == undefined ? '--' : amount
|
|
|
|
|
// var num = $('#num-input').val()
|
|
|
|
|
var num = 1
|
|
|
|
|
var remark = $('#remark-input').val()
|
|
|
|
|
|
|
|
|
|
if (resourceTypeId == '') {
|
|
|
|
|
return layer.msg('请选择资源类型')
|
|
|
|
|
}
|
|
|
|
|
if (resourceId == '') {
|
|
|
|
|
return layer.msg('请选择资源内容')
|
|
|
|
|
}
|
|
|
|
|
if (num == '') {
|
|
|
|
|
return layer.msg('请输入资源数量')
|
|
|
|
|
}
|
|
|
|
|
if (!isNumber(num)) {
|
|
|
|
|
return layer.msg('资源数量只能为正整数')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var html = '<tr class="normal-row" data-resource-id="' + resourceId + '" data-resource-type-id="' + resourceTypeId + '" >' +
|
|
|
|
|
'<td>' + resourceTypeName + '</td>' +
|
|
|
|
|
'<td>' + resourceName + '</td>' +
|
|
|
|
|
'<td class="amount">' + amount + '</td>' +
|
|
|
|
|
'<td class="num"><input name="num" type="text" value="' + num + '" readonly></td>' +
|
|
|
|
|
'<td class="remark"><input name="remark" type="text" value="' + remark + '"></td>' +
|
|
|
|
|
'<td><button class="delete-row" type="button" class="danger-btn">删除</button></td>' +
|
|
|
|
|
'</tr>';
|
|
|
|
|
|
|
|
|
|
$('#resource-table tbody').append(html)
|
|
|
|
|
rowCount ++
|
|
|
|
|
$(".select_gallery").select2()
|
|
|
|
|
statQuota()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#resource-table').on('click', '.delete-row', function () {
|
|
|
|
|
var tr = $(this).parents('tr').eq(0)
|
|
|
|
|
rowCount --
|
|
|
|
|
tr.remove()
|
|
|
|
|
statQuota()
|
|
|
|
|
})
|
|
|
|
|
$('#resource-table').on('blur', 'input[name=num]', function() {
|
|
|
|
|
if($(this).val() == '') {
|
|
|
|
|
return layer.msg('请输入资源数量')
|
|
|
|
|
} else {
|
|
|
|
|
statQuota()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
$('#resource-table').on('blur', 'input[name=amount]', function() {
|
|
|
|
|
if($(this).val() == '') {
|
|
|
|
|
return layer.msg('请输入资源数量')
|
|
|
|
|
} else {
|
|
|
|
|
statQuota()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
function statQuota() {
|
|
|
|
|
var quota = $('#quota').attr('data-quota')
|
|
|
|
|
var hasItf = $('#hasItf').val()
|
|
|
|
|
|
|
|
|
|
var verifyQuota = 0
|
|
|
|
|
if (hasItf == 1) {
|
|
|
|
|
$('#resource-table').find('.normal-row').each(function (index, ele) {
|
|
|
|
|
verifyQuota += $(ele).find('.amount').html() * $(ele).find('.num').children('input').val()
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
$('#resource-table').find('.normal-row').each(function (index, ele) {
|
|
|
|
|
verifyQuota += parseInt($(ele).find('.amount').children('input').val())
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#verify-quota').html(verifyQuota)
|
|
|
|
|
$('#quota').html(quota-verifyQuota)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getUserRoles(bindRoleId, gameId, callback) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('getUserRoles')}",
|
|
|
|
|
type: "post",
|
|
|
|
|
data: { role_id: bindRoleId, game_id: gameId },
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(result){
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
var roles = result.data.roles
|
|
|
|
|
callback(roles)
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#bind_role_id').on({
|
|
|
|
|
blur: function () {
|
|
|
|
|
var gameId = $('#game-select').val()
|
|
|
|
|
if (gameId == 0) {
|
|
|
|
|
return layer.msg('请选择游戏')
|
|
|
|
|
}
|
|
|
|
|
var serverId = $('#server-select').val()
|
|
|
|
|
if (serverId == 0) {
|
|
|
|
|
return layer.msg('请选择区服')
|
|
|
|
|
}
|
|
|
|
|
var bindRoleId = $('#bind_role_id').val()
|
|
|
|
|
if (bindRoleId == '') {
|
|
|
|
|
return layer.msg('请输入角色ID')
|
|
|
|
|
}
|
|
|
|
|
getUserRoles(bindRoleId, gameId, function(roles) {
|
|
|
|
|
if (roles.length == 0) {
|
|
|
|
|
return layer.msg('未查询到角色')
|
|
|
|
|
}
|
|
|
|
|
var html = "<option value=''>请选择角色</option>";
|
|
|
|
|
for (var i in roles){
|
|
|
|
|
html += "<option value='"+roles[i].role_id+"'>"+roles[i].role_name+"</option>"
|
|
|
|
|
}
|
|
|
|
|
$("#bind-role-select").html(html);
|
|
|
|
|
$("#bind-role-select").select2();
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function getRecords() {
|
|
|
|
|
var records = []
|
|
|
|
|
var hasItf = $('#hasItf').val()
|
|
|
|
|
if (hasItf == 1) {
|
|
|
|
|
$('#resource-table tbody tr').each(function (index, tr) {
|
|
|
|
|
var num = $(tr).find('input[name=num]').val()
|
|
|
|
|
var remark = $(tr).find('input[name=remark]').val()
|
|
|
|
|
var resourceId = $(tr).attr('data-resource-id')
|
|
|
|
|
var resourceTypeId = $(tr).attr('data-resource-type-id')
|
|
|
|
|
records.push({
|
|
|
|
|
resource_id: resourceId,
|
|
|
|
|
resource_type_id: resourceTypeId,
|
|
|
|
|
num: num,
|
|
|
|
|
remark: remark,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
$('#resource-table tbody tr').each(function (index, tr) {
|
|
|
|
|
var amount = $(tr).find('input[name=amount]').val()
|
|
|
|
|
var remark = $(tr).find('input[name=remark]').val()
|
|
|
|
|
records.push({
|
|
|
|
|
amount: amount,
|
|
|
|
|
remark: remark,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return records
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#bind-btn').click(function () {
|
|
|
|
|
var box = $('#bind-box')
|
|
|
|
|
layer.open({
|
|
|
|
@ -556,77 +251,68 @@ body {
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#submit-bind').click(function () {
|
|
|
|
|
$('#search-role-btn').click(function () {
|
|
|
|
|
var gameId = $('#game-select').val()
|
|
|
|
|
if (gameId == 0) {
|
|
|
|
|
return layer.msg('请选择游戏')
|
|
|
|
|
}
|
|
|
|
|
var roleId = $('#role-select').val()
|
|
|
|
|
if (roleId == 0) {
|
|
|
|
|
return layer.msg('请选择测试账号角色')
|
|
|
|
|
}
|
|
|
|
|
var bindRoleId = $('#bind-role-select').val()
|
|
|
|
|
if (bindRoleId == 0) {
|
|
|
|
|
return layer.msg('请选择玩家角色')
|
|
|
|
|
var roleId = $('#role-id').val()
|
|
|
|
|
if (roleId == '') {
|
|
|
|
|
return layer.msg('请输入角色ID')
|
|
|
|
|
}
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('bindRole')}",
|
|
|
|
|
type: "post",
|
|
|
|
|
data: { game_id: gameId, bind_role_id: bindRoleId, testing_role_id: roleId},
|
|
|
|
|
url: "{:U('Ajax/searchRoleInfo')}",
|
|
|
|
|
type: "get",
|
|
|
|
|
data: { base_game_id: gameId, role_id: roleId},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(result){
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
layer.msg(result.message, function(){
|
|
|
|
|
window.location.href = window.location.href
|
|
|
|
|
})
|
|
|
|
|
$('#role-name').html(result.data.role_name)
|
|
|
|
|
$('#server-name').html(result.data.server_name)
|
|
|
|
|
$('#pay-amount').html(result.data.pay_amount)
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|
$('#role-name').html('查询失败')
|
|
|
|
|
$('#server-name').html('查询失败')
|
|
|
|
|
$('#pay-amount').html('查询失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$('#submit-btn').on({
|
|
|
|
|
click: function () {
|
|
|
|
|
var records = getRecords()
|
|
|
|
|
|
|
|
|
|
if (records.length == 0) {
|
|
|
|
|
return layer.msg('至少添加一项资源申请')
|
|
|
|
|
var gameId = $('#game-select').val()
|
|
|
|
|
if (gameId == 0) {
|
|
|
|
|
return layer.msg('请选择游戏')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (var i in records) {
|
|
|
|
|
if (records[i].num == '') {
|
|
|
|
|
return layer.msg('请输入资源数量')
|
|
|
|
|
}
|
|
|
|
|
var roleId = $('#role-id').val()
|
|
|
|
|
if (roleId == '') {
|
|
|
|
|
return layer.msg('请输入角色ID')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var gameId = $('#game-select').val()
|
|
|
|
|
var serverId = $('#server-select').val()
|
|
|
|
|
var userAccount = $('#test_account').val()
|
|
|
|
|
var roleId = $('#role-select').val()
|
|
|
|
|
var amount = $('#amount').val()
|
|
|
|
|
var remark = $('#remark').val()
|
|
|
|
|
|
|
|
|
|
if (gameId == 0) {
|
|
|
|
|
return layer.msg('请选择游戏')
|
|
|
|
|
}
|
|
|
|
|
if (serverId == 0) {
|
|
|
|
|
return layer.msg('请选择区服')
|
|
|
|
|
}
|
|
|
|
|
if (userAccount == '') {
|
|
|
|
|
return layer.msg('请输入测试资源账号')
|
|
|
|
|
if (roleId == '') {
|
|
|
|
|
return layer.msg('请输入角色ID')
|
|
|
|
|
}
|
|
|
|
|
if (roleId == 0) {
|
|
|
|
|
return layer.msg('请选择角色')
|
|
|
|
|
if (amount == '') {
|
|
|
|
|
return layer.msg('请输入模拟发放金额')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('doApply')}",
|
|
|
|
|
url: "{:U('saveSimulateSpend')}",
|
|
|
|
|
type: "post",
|
|
|
|
|
data: { records: records, game_id: gameId, server_id: serverId, user_account: userAccount, role_id: roleId},
|
|
|
|
|
data: { base_game_id: gameId, amount: amount, remark: remark, role_id: roleId},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(result){
|
|
|
|
|
if (result.status == 1) {
|
|
|
|
|
layer.msg(result.message, function(){
|
|
|
|
|
parent.window.location.href = "{:U('roles')}"
|
|
|
|
|
parent.window.location.href = parent.window.location.href
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message)
|
|
|
|
|