Compare commits

...

41 Commits

Author SHA1 Message Date
dragon
8c06877c67 新增操作人 2024-12-10 17:10:46 +08:00
dragon
be82b67bab 图片显示新公会申请 2024-12-10 15:22:22 +08:00
dragon
da9368018a 新增新公会申请 2024-12-09 14:05:05 +08:00
khalil
c39b992e31 送礼明细-后台-增加房间 2024-12-06 14:27:31 +08:00
khalil
1aa6a67531 充值h5-后台-支持同地区下不同货币收款 2024-12-05 15:20:40 +08:00
khalil
a2fa4a8fbd ss公会-后台-奖励发放-默认分区阿拉伯 2024-12-03 18:59:55 +08:00
dragon
4ab5768849 修复装扮商城状态不生效问题 2024-12-03 18:19:34 +08:00
dragon
fa2d3975d2 修改文案 2024-12-03 18:09:16 +08:00
dragon
0fdcf097c8 新增id 2024-12-03 16:00:26 +08:00
dragon
3d18a53f34 礼物管理土耳其编辑 2024-12-03 10:29:57 +08:00
dragon
627de18eaf 修改标题 2024-12-03 10:29:56 +08:00
dragon
8868f4204c 修改图片上传异常问题 2024-12-03 10:29:55 +08:00
dragon
38bffe26dc 修复资料卡编辑异常问题 2024-12-03 10:29:54 +08:00
dragon
8a548f9a69 重新定义全局报错异常 2024-12-03 10:29:53 +08:00
dragon
28b21d5c85 新增全局错误监听 2024-12-03 10:29:52 +08:00
dragon
dcdf89aa48 优化加载页面 2024-12-03 10:29:51 +08:00
dragon
b9dcae392a 隐藏清除svga容器 2024-12-03 10:29:50 +08:00
dragon
ae4b9d0493 个人主页资源管理用vue3写法 2024-12-03 10:29:49 +08:00
dragon
8789fdfc29 移除mp4测试是否有异常 2024-12-03 10:29:48 +08:00
dragon
0700880ade 测试不展示svga是否异常 2024-12-03 10:29:47 +08:00
dragon
7c042161bd 删除表头动效字段 2024-12-03 10:29:46 +08:00
dragon
431749ef28 测试svga是否还有异常 2024-12-03 10:29:45 +08:00
dragon
7bb0faad23 隐藏表格svga 2024-12-03 10:29:44 +08:00
dragon
59a2461f73 新增装扮商城支持mp4限制第二banner不能输入空格 2024-12-03 10:29:43 +08:00
dragon
223311f321 新增个人赠送记录撤回功能 2024-12-03 10:29:42 +08:00
dragon
02474473bf 完成装扮商城版本需求 2024-12-03 10:29:40 +08:00
dragon
559fea9300 版本功能 2024-12-03 10:29:39 +08:00
dragon
ed618598c2 版本暂存 2024-12-03 10:29:38 +08:00
dragon
7610a2768f 新增礼物管理全服通知-赛头像 2024-12-03 10:29:37 +08:00
khalil
eb7e9387c6 主播薪资-后台-分页 2024-12-02 21:56:50 +08:00
dragon
212498b6be 关闭初始化充值明细 2024-11-29 14:03:30 +08:00
dragon
369bf84a1f 修改退款货币排序 2024-11-29 11:47:50 +08:00
dragon
a79445b9e5 修改退款金额字段 2024-11-29 10:54:27 +08:00
dragon
fda1a6aacb 新增退款明细后台错误提示 2024-11-28 17:57:37 +08:00
dragon
e58363371c 修改渲染总额顺序 2024-11-28 15:31:30 +08:00
dragon
943518ce24 修改国家接口 2024-11-27 15:07:07 +08:00
dragon
df0093c4f8 修复充值明细异常问题 2024-11-27 14:51:02 +08:00
dragon
19d8ac3753 充值明细和转赠新增送统计字段 2024-11-27 14:51:01 +08:00
dragon
9486359ddf 新增用户退款查询 2024-11-27 14:50:59 +08:00
khalil
ef7c060545 送礼记录-后台-查询-修改结构 2024-11-26 14:37:58 +08:00
dragon
350c1b0e07 修复分区异常问题 2024-11-25 18:57:46 +08:00
27 changed files with 4295 additions and 1458 deletions

View File

@@ -260,4 +260,22 @@ export const removeMember = query => {
method: 'post',
params: query
});
};
// -审核列表
export const guildApplyList = query => {
return request({
url: '/admin/guildApply/list',
method: 'get',
params: query
});
};
// -审核操作
export const guildApplyAudit = query => {
return request({
url: '/admin/guildApply/audit',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,52 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs';
// 地区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 个人主页资源管理列表
export const pesonalBackgroundListByPage = query => {
return request({
url: '/admin/pesonalBackground/listByPage',
method: 'get',
params: query
});
};
// 个人主页资源管理赠送
export const pesonalBackgroundListSend = query => {
return request({
url: '/admin/pesonalBackground/send',
method: 'get',
params: query
});
};
// 个人主页资源管理保存
export const pesonalBackgroundSaveOrUpdate = query => {
return request({
url: '/admin/pesonalBackground/saveOrUpdate',
method: 'post',
params: query
});
};
// 个人主页记录管理&个人赠送记录
export const pesonalBackgroundListRecordByPage = query => {
return request({
url: '/admin/pesonalBackground/listRecordByPage',
method: 'get',
params: query
});
};
// 个人赠送记录撤回
export const pesonalBackgroundListRecordRecoveryPersonalBackground = query => {
return request({
url: '/admin/pesonalBackground/recoveryPersonalBackground',
method: 'get',
params: query
});
};

34
src/api/refund/refund.js Normal file
View File

@@ -0,0 +1,34 @@
import request from '@/utils/request';
import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer';
// 活动配置 相关接口(一级菜单:活动配置)
// 分区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 国家
export const regionInfoList = query => {
return request({
url: '/admin/regionInfo/list',
method: 'get',
params: query
});
};
// 列表
export const refundList = query => {
return request({
url: '/admin/chargeRecord/refundList',
method: 'get',
params: query
});
};
// 导出
export const refundExport = query => {
window.location.href = `/admin/chargeRecord/refundExport?${genQueryParam(query)}`;
return;
};

View File

@@ -60,6 +60,17 @@ const app = createApp(App)
app.config.globalProperties.$copy = function (text) {
copy(text, this);
};
// 全局错误处理
window.onerror = function (message, source, lineno, colno, error) {
console.log(error)
// 判断是否是 'insertBefore' 错误
if (error instanceof TypeError && message.includes('insertBefore')) {
console.error('捕获到 TypeError 错误:', error);
window.location.reload();
// 你可以在这里处理错误,比如记录日志或执行其他操作
return true; // 阻止浏览器默认的错误处理
}
return false; // 默认处理其他类型的错误
};
app.config.warnHandler = () => null;
app.use(store).use(router).use(components).use(VueClipboard).mount('#app')

View File

@@ -0,0 +1,20 @@
const partitionInfoMap = {
1: '英语区',
2: '阿拉伯语区',
4: '华语区',
8: '土耳其区',
}
export const partitionDesc = (val) => {
return Object.keys(partitionInfoMap).filter(k=>{
return(Number(val) & Number(k)) != 0
}).map(k=>partitionInfoMap[k]).join(",");
}
export const partitionIdArr = (val) => {
var arr =[];
Object.keys(partitionInfoMap).filter(k=>{
return(Number(val) & Number(k)) != 0
}).map(k=>arr.push(Number(k)));
return arr
}

View File

@@ -5,7 +5,7 @@ import global from "@/constants/global";
const service = axios.create();
import { ElMessage } from 'element-plus'
service.interceptors.request.use(config => {
console.log('config', config);
// console.log('config', config);
return config;
}, error => {
Promise.reject(error);
@@ -13,7 +13,7 @@ service.interceptors.request.use(config => {
service.interceptors.response.use(res => {
userLogout(res.headers[global.NEED_LOGOUT.toLowerCase()]);
console.log('res.data', res);
// console.log('res.data', res);
// if (res.data.code == 200) {
// ElMessage({
// message: "成功",

View File

@@ -11,19 +11,21 @@
<div id="toolbar">
<div class="col-sm-12">
<label for="searchType"
class="col-sm-4 control-label">地区:</label>
<div class="col-sm-6">
class="col-sm-2 control-label">地区:</label>
<div class="col-sm-8">
<select name="searchType"
id="searchType"
data-btn-class="btn-warning"
class="form-control">
</select>
</div>
<div class="col-sm-2">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
</div>
</div>
<button id="btnSearch"
class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
</div>
</div>
<div class="box-body"
@@ -60,9 +62,6 @@
<input type="hidden"
name="code"
id="code" />
<input type="hidden"
name="currency"
id="currency" />
<input type="hidden"
name="type"
id="type" />
@@ -76,9 +75,19 @@
id="name">
</div>
</div>
<div class="form-group">
<label for="currency"
class="col-sm-3 control-label">货币</label>
<div class="col-sm-9">
<input type="text"
readonly
class="form-control"
id="currency">
</div>
</div>
<div class="form-group">
<label for="rate"
class="col-sm-3 control-label">USD汇率</label>
class="col-sm-3 control-label">USD汇率</label>
<div class="col-sm-9">
<input type="text"
class="form-control"
@@ -324,9 +333,10 @@ export default {
$('#regionTable').bootstrapTable({
columns: [
{ field: 'name', title: '地区', align: 'center', width: '5%' },
{ field: 'currency', title: '货币', align: 'center', width: '5%'},
{
field: 'rate',
title: 'USD汇率',
title: 'USD汇率',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
@@ -430,7 +440,7 @@ export default {
return '<img src="' + val + '" style="width:90px;height:90px;" alt="">'
}
},
{ field: 'regionName', title: '地区', align: 'center', width: '5%' },
{ field: 'currency', title: '货币', align: 'center', width: '5%' },
{
field: 'isEnabled',
title: '是否展示在充值H5',
@@ -823,7 +833,7 @@ export default {
var $select = $('#searchType');
for (let i = 0; i < array.length; i++) {
var $option = $('<option value="' + array[i].type + '" />');
$option.html(array[i].name);
$option.html(array[i].desc + '(' + array[i].name + ')');
if (i == 0) {
$option.attr('selected', true);
}

View File

@@ -100,28 +100,32 @@
<input type="text" class="form-control validate[required]" name="name" id="tr_modal_name" placeholder="请输入气泡名称">
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">安卓图片:</label>
<div class="col-sm-6">
<img src="" id="addAndroidIconPicUrl" style="height:44px;" alt="">
<input type="file" id="add_android_UploadIconPic" name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<button class="btn btn-success" type="button" name="uploadBtn"
id="addAndroidIconPicUrl_androidUrl">上传</button>
<input type="hidden" id="androidUrl" name="androidUrl" class="form-control" />
<form class="form-horizontal" id="addForm1">
<div class="form-group">
<label class="col-sm-4 control-label">安卓图片:</label>
<div class="col-sm-6">
<img src="" id="addAndroidIconPicUrl" style="height:44px;" alt="">
<input type="file" id="add_android_UploadIconPic" name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<button class="btn btn-success" type="button" name="uploadBtn"
id="addAndroidIconPicUrl_androidUrl">上传</button>
<input type="hidden" id="androidUrl" name="androidUrl" class="form-control" />
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">IOS图片:</label>
<div class="col-sm-6">
<img src="" id="addIosIconPicUrl" style="height:44px;" alt="">
<input type="file" id="add_ios_UploadIconPic" name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<button class="btn btn-success" type="button" name="uploadBtn"
id="addIosIconPicUrl_iosUrl">上传</button>
<input type="hidden" id="iosUrl" name="iosUrl" class="form-control" />
</form>
<form class="form-horizontal" id="addForm2">
<div class="form-group" >
<label class="col-sm-4 control-label">IOS图片:</label>
<div class="col-sm-6">
<img src="" id="addIosIconPicUrl" style="height:44px;" alt="">
<input type="file" id="add_ios_UploadIconPic" name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<button class="btn btn-success" type="button" name="uploadBtn"
id="addIosIconPicUrl_iosUrl">上传</button>
<input type="hidden" id="iosUrl" name="iosUrl" class="form-control" />
</div>
</div>
</div>
</form>
<div class="form-group">
<label for="status" class="col-sm-4 control-label">装扮状态:</label>
<div class="col-sm-6">
@@ -422,28 +426,39 @@ export default {
});
$("[name='uploadBtn']").on('click', function () {
let id = $(this).attr('id');
let b = id.split("_");
let imageId = b[0];
let inputId = b[1];
console.log(imageId)
console.log(inputId)
$("#addAndroidIconPicUrl_androidUrl").on('click', function () {
var options = {
type: 'post',
url: '/admin/upload/img',
dataType: 'json',
success: function (json) {
if (json.path) {
$("#" + inputId).val(json.path);
$("#" + imageId).attr("src", json.path);
$("#addAndroidIconPicUrl").val(json.path);
$("#addAndroidIconPicUrl").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
}
};
$("#addForm").ajaxSubmit(options);
$("#addForm1").ajaxSubmit(options);
});
$("#addIosIconPicUrl_iosUrl").on('click', function () {
var options = {
type: 'post',
url: '/admin/upload/img',
dataType: 'json',
success: function (json) {
if (json.path) {
$("#addIosIconPicUrl").val(json.path);
$("#addIosIconPicUrl").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
}
};
$("#addForm2").ajaxSubmit(options);
});
@@ -484,6 +499,8 @@ export default {
partitionFlag |= partitionFlagArray[i].value;
}
formData.partitionFlag = partitionFlag;
formData.androidUrl = $('#addAndroidIconPicUrl').attr('src');
formData.iosUrl = $('#addIosIconPicUrl').attr('src');
// 将修改后的对象转换回序列化字符串
let newSerializeStr = $.param(formData);
//做下数据校验

File diff suppressed because it is too large Load Diff

View File

@@ -197,6 +197,8 @@
class="form-control"
name="skipUri"
id="skipUrlContent"
onkeydown="return event.key !== ' '"
oninput="this.value = this.value.replace(/\s+/g, '')"
/>
</div>
</div>
@@ -460,6 +462,8 @@
class="form-control"
name="skipUri"
id="addSkipUrlContent"
onkeydown="return event.key !== ' '"
oninput="this.value = this.value.replace(/\s+/g, '')"
/>
</div>
</div>
@@ -733,7 +737,6 @@ export default {
// }
// }
// }
function initTable() {
$("#table").bootstrapTable({
columns: [
@@ -1520,7 +1523,7 @@ export default {
margin-right: 10px;
margin-left: 5px;
}
.text{
.text {
font-size: 20px;
margin-top: 20px;
color: rgb(173, 53, 53);

View File

@@ -527,7 +527,7 @@ export default {
this.getData();
},
handlePageChange(val) {
this.pageParams.pageSize = val;
this.pageParams.pageNo = val;
this.getData();
},
// 弹窗分页导航

View File

@@ -115,6 +115,38 @@
</template>
</el-table-column>
<el-table-column prop="adminName" align="center" label="操作人" />
<el-table-column
prop="guildContact"
align="center"
label="公会联系方式"
/>
<el-table-column align="center" prop="idCard" label="公会长身份证件">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.idCard"
:zoom-rate="1.1"
:preview-src-list="[scope.row.idCard]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.inviteCheck"
:zoom-rate="1.1"
:preview-src-list="[scope.row.inviteCheck]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="收款账户" width="300">
<template v-slot="scope">
<el-button

View File

@@ -192,23 +192,70 @@
/>
</div>
</div>
<form class="form-horizontal" id="addForm1">
<div class="form-group">
<label class="col-sm-4 control-label">图片:</label>
<div class="col-sm-6">
<img src="" id="addIconPicUrl" style="height: 44px" alt="" />
<input
type="file"
id="addUploadIconPic"
name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,.mp4"
/>
<button class="btn btn-success" type="button" id="uploadBtn">
上传
</button>
<input
type="hidden"
id="pic"
name="pic"
class="form-control"
/>
<a href="javascript:void(0)" id="removeIconPic">清除</a>
</div>
</div>
</form>
<div class="form-group">
<label class="col-sm-4 control-label">图片:</label>
<label for="effectType" class="col-sm-4 control-label"
>装扮动效图片类型:</label
>
<div class="col-sm-6">
<img src="" id="addIconPicUrl" style="height: 44px" alt="" />
<input
type="file"
id="addUploadIconPic"
name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
/>
<button class="btn btn-success" type="button" id="uploadBtn">
上传
</button>
<input type="hidden" id="pic" name="pic" class="form-control" />
<a href="javascript:void(0)" id="removeIconPic">清除</a>
<select
name="effectType"
id="effectType"
data-btn-class="btn-warning"
class="form-control"
>
<option value="0">图片</option>
<option value="1">MP4</option>
</select>
</div>
</div>
<form class="form-horizontal" id="addForm2">
<div class="form-group">
<label class="col-sm-4 control-label">装扮动效图片:</label>
<div class="col-sm-6">
<img src="" id="addIconPicUrl2" style="height: 44px" alt="" />
<input
type="file"
id="addEffect"
name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,.mp4"
/>
<button class="btn btn-success" type="button" id="uploadBtn2">
上传
</button>
<input
type="hidden"
id="effect"
name="effect"
class="form-control"
/>
<a href="javascript:void(0)" id="removeIconPic2">清除</a>
</div>
</div>
</form>
<div class="form-group">
<label for="status" class="col-sm-4 control-label"
>装扮状态:</label
@@ -399,6 +446,24 @@ export default {
}
},
},
{
field: "effect",
title: "装扮动效图片",
align: "middle",
valign: "middle",
width: "5%",
formatter: function (val, row, index) {
if (val) {
return (
"<img style='max-width: 200px;max-height: 200px' src='" +
val +
"'>"
);
} else {
return "-";
}
},
},
{
field: "type",
title: "装扮类型",
@@ -429,6 +494,21 @@ export default {
}
},
},
{
field: "effectType",
title: "装扮动效图片类型",
align: "middle",
width: "5%",
formatter: function (val) {
if (val === 0) {
return "图片";
} else if (val === 1) {
return "MP4";
} else {
return "-";
}
},
},
{
field: "createTime",
title: "添加时间",
@@ -571,8 +651,11 @@ export default {
$("#addForm #tr_modal_name").val(name);
}
$("#addIconPicUrl").attr("src", row.pic);
$("#addIconPicUrl2").attr("src", row.effect);
$("#addForm #pic").val(row.pic);
$("#addForm #effect").val(row.effect);
$("#addForm #status").val(row.status);
$("#addForm #effectType").val(row.effectType);
//分区
let partitionFlag = row.partitionFlag;
if ((partitionFlag & 1) != 0) {
@@ -608,7 +691,24 @@ export default {
}
},
};
$("#addForm").ajaxSubmit(options);
$("#addForm1").ajaxSubmit(options);
});
$("#uploadBtn2").on("click", function () {
var options = {
type: "post",
url: "/admin/upload/img",
dataType: "json",
success: function (json) {
if (json.path) {
$("#effect").val(json.path);
$("#addIconPicUrl2").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal("show");
}
},
};
$("#addForm2").ajaxSubmit(options);
});
$("#removeIconPic").on("click", function () {
@@ -616,6 +716,12 @@ export default {
$("#addUploadIconPic").val("");
$("#iconPic").val("");
});
$("#removeIconPic2").on("click", function () {
$("#addIconPicUrl2").attr("src", "");
$("#addEffect").val("");
$("#effect").val("");
$("#iconPic").val("");
});
//打开新增页面
$("#btnAdd").on("click", function () {
@@ -626,6 +732,7 @@ export default {
//保存
$("#button-save").on("click", function () {
var pic = $("#pic").val();
var effect = $("#effect").val();
var name = $("#modal_name").val();
var arName = $("#ar_modal_name").val();
var enName = $("#en_modal_name").val();
@@ -682,6 +789,9 @@ export default {
}
formData.partitionFlag = partitionFlag;
// 将修改后的对象转换回序列化字符串
formData.pic = $('#addIconPicUrl').attr('src');
formData.effect = $('#addIconPicUrl2').attr('src');
console.log(formData,2222222222222);
let newSerializeStr = $.param(formData);
$.ajax({
type: "post",
@@ -815,9 +925,14 @@ export default {
function cleanModal() {
$("#id").val("");
$("#addIconPicUrl").attr("src", "");
$("#addIconPicUrl2").attr("src", "");
$("#addUploadIconPic").val("");
$("#addEffect").val("");
$("#effect").val("");
$("#pic").val("");
$("#effect").val("");
$("#status").val("");
$("#effectType").val("");
$("#modal_type").val("");
$("#modal_name").val("");
$('input[name="partitionFlag"]').each(function () {

View File

@@ -172,8 +172,8 @@ export default {
type: 4,
},
{
value: 8,
label: "土耳其区",
type: 8,
name: "土耳其区",
},
],
},

View File

@@ -133,6 +133,38 @@
</el-table-column>
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> -->
<el-table-column
prop="guildContact"
align="center"
label="公会联系方式"
/>
<el-table-column align="center" prop="idCard" label="公会长身份证件">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.idCard"
:zoom-rate="1.1"
:preview-src-list="[scope.row.idCard]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.inviteCheck"
:zoom-rate="1.1"
:preview-src-list="[scope.row.inviteCheck]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">

View File

@@ -0,0 +1,367 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>分区</span>
<el-select v-model="inquire.partitionId" placeholder="请选择">
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>平台ID</span>
<el-input
v-model="inquire.userId"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>状态</span>
<el-select v-model="inquire.status" placeholder="请选择">
<el-option
v-for="item in inquire.statusArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<!-- 时间选择器 -->
<div class="inquire">
<div class="block">
<span class="demonstration">日期</span>
<el-date-picker
v-model="inquire.time"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<el-button class="primary" type="primary" @click="addDialog = true"
>重置搜索</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="id" align="center" label="序号" />
<el-table-column prop="guildId" align="center" label="公会ID" />
<el-table-column prop="erbanNo" align="center" label="公会长ID" />
<el-table-column prop="nick" align="center" label="公会长昵称" />
<el-table-column align="center" prop="giftInfo" label="公会长头像">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.avatar"
:zoom-rate="1.1"
:preview-src-list="[scope.row.avatar]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="guildName" align="center" label="公会昵称" />
<el-table-column align="center" prop="giftInfo" label="公会头像">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.guildAvatar"
:zoom-rate="1.1"
:preview-src-list="[scope.row.guildAvatar]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column
prop="guildContact"
align="center"
label="公会联系方式"
/>
<el-table-column align="center" prop="idCard" label="公会长身份证件">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.idCard"
:zoom-rate="1.1"
:preview-src-list="[scope.row.idCard]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.inviteCheck"
:zoom-rate="1.1"
:preview-src-list="[scope.row.inviteCheck]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="applyTime" align="center" label="申请时间" />
<el-table-column prop="auditStatus" align="center" label="状态">
<template v-slot="scope">
{{
scope.row.auditStatus == 0
? "未审核"
: scope.row.auditStatus == 1
? "已通过"
: "拒绝"
}}
</template>
</el-table-column>
<el-table-column prop="adminName" align="center" label="操作人" />
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button
v-show="scope.row.auditStatus == 0"
@click="agree(scope.row.id)"
type="text"
size="default"
>同意</el-button
>
<el-button
v-show="scope.row.auditStatus == 0"
@click="refuse(scope.row.id)"
type="text"
size="default"
>拒绝</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- 二次确认删除弹窗 -->
<el-dialog v-model="delDialog" title="提示" width="30%" center>
<span> 确定要解散该公会吗?</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="delDialog = false">取消</el-button>
<el-button type="primary" @click="delClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
listPartitionInfo,
guildApplyList,
guildApplyAudit,
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "newGuildApplication",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
partitionId: "",
partitionArr: [],
userId: "",
status: -1,
statusArr: [
{ desc: "未审核", id: 0 },
{ desc: "全部", id: -1 },
{ desc: "通过", id: 1 },
{ desc: "已拒绝", id: 2 },
],
time: "",
},
// 表格
tableData: [],
// 新增弹窗
addDialog: false,
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
listPartitionInfo().then((res) => {
console.log(res.data);
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
guildApplyList({
partitionId: this.inquire.partitionId,
erbanNo: this.inquire.userId,
auditStatus: this.inquire.status,
startDate: startTime,
endDate: endTime,
pageNo: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.rows;
this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
agree(id) {
guildApplyAudit({
auditStatus: 1,
id,
}).then((res) => {
if (res.code == 200) {
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
refuse(id) {
guildApplyAudit({
auditStatus: 2,
id,
}).then((res) => {
if (res.code == 200) {
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess2(res, file) {
this.ediObj.imageUrl2 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess(res, file) {
this.ediObj.imageUrl1 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</style>

View File

@@ -0,0 +1,166 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>平台ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="backgroundId" align="center" label="个人主页id" />
<el-table-column
prop="backgroundName"
align="center"
label="个人主页名称"
/>
<el-table-column prop="uid" align="center" label="用户uID" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="days" align="center" label="赠送天数" />
<el-table-column prop="remake" align="center" label="备注" />
<el-table-column prop="createTime" align="center" label="操作时间" />
<el-table-column prop="optUser" align="center" label="操作人" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
v-if="scope.row.status=1"
@click="personalBackground(scope.row)"
class="primary"
type="primary"
size="default"
>撤回</el-button
>
<div v-else>已撤回</div>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import {
pesonalBackgroundListRecordByPage,
pesonalBackgroundListRecordRecoveryPersonalBackground,
} from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "personalHomepageRecordManagementSend",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
pesonalBackgroundListRecordByPage({
erbanNo: this.inquire.id,
page: this.currentPage,
comeFrom: 2,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.rows;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
personalBackground(val) {
pesonalBackgroundListRecordRecoveryPersonalBackground({
recordId: val.recordId,
}).then((res) => {
if (res.code == 200) {
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,130 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>平台ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="backgroundId" align="center" label="个人主页id" />
<el-table-column prop="backgroundName" align="center" label="个人主页名称" />
<el-table-column prop="uid" align="center" label="用户uID" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="status" align="center" label="个人主页状态" />
<el-table-column prop="createTime" align="center" label="购买天数" />
<el-table-column prop="days" align="center" label="有效时间" />
<el-table-column prop="expireTime" align="center" label="过期时间" />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import { pesonalBackgroundListRecordByPage } from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "personalHomepageRecordManagement",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
pesonalBackgroundListRecordByPage({
erbanNo: this.inquire.id,
page: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.rows;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,802 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>地区</span>
<el-select v-model="inquire.partitionId" placeholder="请选择">
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>名称</span>
<el-input v-model="inquire.name" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>状态</span>
<el-select v-model="inquire.status" placeholder="请选择">
<el-option
v-for="item in inquire.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 新增按钮 -->
<el-button
class="primary"
type="primary"
@click="
operationValue.partitionVal = [];
operationValue.nameZh = '';
operationValue.nameEn = '';
operationValue.nameAr = '';
operationValue.nameTr = '';
operationValue.price = '';
operationValue.day = '';
operationValue.imageUrl = '';
operationValue.status = '';
operationType = 1;
filePreview: null; // 文件预览 URL
isImage = false;
isVideo = false;
isSVGA = false;
operationDialogTitle = '新增';
operationDialog = true;
"
>新增</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="id" align="center" label="id" />
<el-table-column prop="partitionFlag" align="center" label="地区">
<template v-slot="scope">
{{ partitionDesc(scope.row.partitionFlag) }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="中文名称">
<template v-slot="scope">
{{ jsonFun(scope.row.name).zh }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="阿语名称">
<template v-slot="scope">
{{ jsonFun(scope.row.name).ar }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="英语名称"
><template v-slot="scope">
{{ jsonFun(scope.row.name).en }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="土耳其名称"
><template v-slot="scope">
{{ jsonFun(scope.row.name).tr }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="图片">
<template v-slot="scope">
<el-image
:src="scope.row.pic"
:zoom-rate="1.1"
:preview-src-list="[scope.row.pic]"
fit="contain"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="" align="center" label="装扮动效图片类型">
<template v-slot="scope">
{{
scope.row.effectType == 0
? ""
: scope.row.effectType == 1
? "MP4"
: "SVGA"
}}
</template>
</el-table-column>
<el-table-column
prop=""
width="300"
max-height="100"
align="center"
label="装扮动效图片"
>
<template v-slot="scope">
<div v-if="scope.row.effectType == 0"></div>
<!-- 视频预览 -->
<video
v-if="scope.row.effectType == 1"
:src="scope.row.effect"
controls
style="width: 300px; max-height: 300px; display: block"
></video>
<!-- SVGA 预览 -->
<div
v-if="scope.row.effectType == 2"
:id="`svga-player${scope.row.id}`"
style="width: 300px; max-height: 300px; display: block"
>
{{
scope.row.effect && scope.row.id
? initSVGAList(scope.row.effect, scope.row.id)
: ""
}}
<!-- <img style="width: 100px; height: 100px; display: block" src="/Uploads/article/original_img/1487053722.jpg" alt="">
<el-image src=""></el-image> -->
</div>
</template>
</el-table-column>
<el-table-column prop="" align="center" label="状态">
<template v-slot="scope">
{{ scope.row.status == 1 ? "有效" : "无效" }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="贵族限定">
<template v-slot="scope">
{{ scope.row.type == 1 ? "普通" : "贵族" }}
</template>
</el-table-column>
<el-table-column prop="updateTime" align="center" label="操作时间" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="
operationValue.partitionVal = partitionIdArr(
scope.row.partitionFlag
);
operationValue.nameZh = jsonFun(scope.row.name).zh;
operationValue.nameEn = jsonFun(scope.row.name).en;
operationValue.nameAr = jsonFun(scope.row.name).ar;
operationValue.nameTr = jsonFun(scope.row.name).tr;
operationValue.imageUrl = scope.row.pic;
operationValue.status = scope.row.status;
operationType = 2;
operationValueId = scope.row.id;
operationDialogTitle = '编辑';
filePreview: scope.row.effect; // 文件预览 URL
scope.row.effectType == 1
? (isVideo = true)
: scope.row.effectType == 2
? (isSVGA = true)
: (isImage = true);
operationValue.effectType = scope.row.effectType;
initSVGA(scope.row.effect);
operationDialog = true;
"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
<el-button
@click="
sendDialog = true;
sendObj.erbanNos = send.days = send.remark = null;
sendObj.personalBackgroundId = scope.row.id;
"
class="primary"
type="primary"
size="default"
>赠送</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 新增&编辑弹窗 -->
<el-dialog
v-model="operationDialog"
:title="operationDialogTitle"
width="28%"
center
>
<!-- <div class="operation">
<span style="margin-right: 20px">地区</span>
<el-select v-model="operationValue.partitionId" placeholder="请选择">
<el-option
v-for="item in operationValue.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div> -->
<div class="operation">
<span style="margin-right: 20px">地区</span>
<el-checkbox-group
v-model="operationValue.partitionVal"
v-for="(val, i) in inquire.partitionArr"
:key="i"
>
<el-checkbox style="margin-right: 10px" :label="val.id">{{
val.desc
}}</el-checkbox>
</el-checkbox-group>
</div>
<div class="operation">
<span style="margin-right: 20px">华语名称</span>
<el-input
v-model="operationValue.nameZh"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">英语名称</span>
<el-input
v-model="operationValue.nameEn"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">阿拉伯名称</span>
<el-input
v-model="operationValue.nameAr"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">土耳其名称</span>
<el-input
v-model="operationValue.nameTr"
style="width: 200px"
class="input"
></el-input>
</div>
<!-- <div class="operation">
<span style="margin-right: 20px">价格</span>
<el-input
v-model="operationValue.price"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">有效天数</span>
<el-input
v-model="operationValue.day"
style="width: 200px"
class="input"
></el-input>
</div> -->
<div class="operation">
<span class="left" style="margin-right: 20px">图片</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img
v-if="operationValue.imageUrl"
:src="operationValue.imageUrl"
class="avatar"
/>
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<div class="operation">
<span style="margin-right: 20px">装扮动效图片类型</span>
<el-select v-model="operationValue.effectType" placeholder="请选择">
<el-option
v-for="item in operationValue.effectTypeArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="operation">
<span class="left" style="margin-right: 20px">装扮动效图片</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
accept="image/*,.mp4,.svga"
:show-file-list="false"
:on-success="handleAvatarSuccess1"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<!-- 文件预览 -->
<div style="margin-top: 20px">
<!-- 图片预览 -->
<img
v-if="isImage"
:src="filePreview"
alt="Uploaded Image"
style="max-width: 300px"
/>
<!-- 视频预览 -->
<video
v-else-if="isVideo"
:src="filePreview"
controls
style="max-width: 300px"
></video>
<!-- SVGA 预览 -->
<div
v-else-if="isSVGA"
:id="`svga-player`"
style="width: 200px; height: 200px"
></div>
</div>
</el-upload>
</div>
<div class="operation">
<span style="margin-right: 20px">状态</span>
<el-select v-model="operationValue.status" placeholder="请选择">
<el-option
v-for="item in operationValue.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button
@click="
operationDialog = false;
isImage = false;
isVideo = false;
isSVGA = false;
"
>取消</el-button
>
<el-button
type="primary"
@click="operation(type == 1 ? null : operationValueId)"
>
确认
</el-button>
</span>
</template>
</el-dialog>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- 赠送 -->
<el-dialog v-model="sendDialog" title="赠送" width="28%" center>
<div class="operation">
<span style="margin-right: 20px">用户平台ID</span>
<el-input
v-model="sendObj.erbanNos"
style="width: 200px"
class="input"
placeholder="多个请用英文“,”隔开"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">天数</span>
<el-input
v-model="sendObj.days"
style="width: 200px"
class="input"
placeholder=""
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">备注</span>
<el-input
v-model="sendObj.remark"
style="width: 200px"
class="input"
placeholder=""
></el-input>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="sendDialog = false">取消</el-button>
<el-button type="primary" @click="send()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
listPartitionInfo,
pesonalBackgroundListByPage,
pesonalBackgroundSaveOrUpdate,
pesonalBackgroundListSend,
} from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
import { partitionDesc, partitionIdArr } from "@/utils/partitionDesc.js";
import { ref, reactive, onMounted, onUnmounted, nextTick } from "vue";
// @ts-ignore
import { ElMessage } from "element-plus";
import SVGA from "svgaplayerweb";
export default {
name: "personalHomepageResourceManagement",
setup() {
// 响应式数据
const file = ref(null);
const filePreview = ref(null);
const isImage = ref(false);
const isVideo = ref(false);
const isSVGA = ref(false);
const loading = ref(false);
const inquire = reactive({
partitionId: "",
partitionArr: [],
name: "",
status: "",
options: [
{ label: "有效", value: 1 },
{ label: "无效", value: 2 },
{ label: "全部", value: 3 },
],
});
const operationDialog = ref(false);
const operationType = ref(null);
const operationDialogTitle = ref("新增%编辑");
const operationValueId = ref(null);
const operationValue = reactive({
partitionVal: [],
nameZh: "",
nameEn: "",
nameAr: "",
nameTr: "",
price: "",
day: "",
imageUrl: "",
status: "",
options: [
{ label: "有效", value: 1 },
{ label: "无效", value: 2 },
],
effectType: "",
effectTypeArr: [
{ label: "无", value: 0 },
{ label: "MP4", value: 1 },
{ label: "SVGA", value: 2 },
],
});
const sendDialog = ref(false);
const sendObj = reactive({
erbanNos: null,
days: null,
personalBackgroundId: null,
remark: null,
});
const tableData = ref([]);
const total = ref(0); // 总页数
const currentPage = ref(1); // 页码
const pageSize = ref(10); // 条数
// 生命周期钩子
onMounted(() => {
console.log("组件已挂载");
listPartitionInfo().then((res) => {
inquire.partitionArr = operationValue.partitionArr = res.data;
inquire.partitionId = inquire.partitionArr[0].id;
getData();
});
});
onUnmounted(() => {
console.log("组件已卸载");
});
// 查询接口
const getData = () => {
loading.value = true;
pesonalBackgroundListByPage({
partitionId: inquire.partitionId,
name: inquire.name,
status: inquire.status,
page: currentPage.value,
pageSize: pageSize.value,
}).then((res) => {
if (res.code == 200) {
loading.value = false;
total.value = res.data.total;
tableData.value = res.data.list;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
};
const operation = (id) => {
const obj = {
partitionFlag: operationValue.partitionVal.reduce(
(accumulator, currentValue) => accumulator + currentValue,
0
),
name: JSON.stringify({
ar: operationValue.nameAr,
zh: operationValue.nameZh,
en: operationValue.nameEn,
tr: operationValue.nameTr,
}),
pic: operationValue.imageUrl,
effectType: operationValue.effectType,
effect: filePreview.value,
status: operationValue.status,
type: 1, // 资料卡类型 1普通 2贵族
id,
};
console.log(obj);
pesonalBackgroundSaveOrUpdate(obj).then((res) => {
if (res.code == 200) {
operationDialog.value = false;
getData();
isImage.value = false;
isVideo.value = false;
isSVGA.value = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
};
const send = () => {
pesonalBackgroundListSend(sendObj).then((res) => {
if (res.code == 200) {
sendDialog.value = false;
ElMessage({
showClose: true,
message: "赠送成功",
type: "success",
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
};
const beforeAvatarUpload = () => {
ElMessage({
showClose: true,
message: "上传中可能较慢,请等待上传成功后在进行下一步~",
type: "warning",
});
};
const handleAvatarError = () => {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
};
const handleAvatarSuccess = (res, file) => {
console.log(file);
operationValue.imageUrl = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
};
const handleAvatarSuccess1 = (res, files) => {
console.log(files.raw);
const selectedFile = files.raw;
if (!selectedFile) return;
// 清除旧的预览数据
// resetFile();
const fileType = selectedFile.type;
const fileName = selectedFile.name;
// 创建预览 URL
filePreview.value = res.data;
file.value = selectedFile;
// 根据文件类型判断
if (fileType.startsWith("image/")) {
isImage.value = true;
} else if (fileType === "video/mp4") {
isVideo.value = true;
} else if (fileName.endsWith(".svga")) {
isSVGA.value = true;
initSVGA(res.data);
}
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
};
// const resetFile = () => {
// nextTick(() => {
// file.value = null;
// filePreview.value = null;
// isImage.value = false;
// isVideo.value = false;
// isSVGA.value = false;
// // 清除 SVGA 容器内容
// const svgaPlayer = document.getElementById("svga-player");
// if (svgaPlayer) {
// svgaPlayer.innerHTML = "";
// }
// });
// };
const initSVGA = (url) => {
nextTick(() => {
setTimeout(function () {
const container = document.getElementById("svga-player");
if (container) {
const player = new SVGA.Player(container);
const parser = new SVGA.Parser();
parser.load(
url,
(videoItem) => {
player.setVideoItem(videoItem);
player.startAnimation();
},
(error) => {
console.log("SVGA失败", error);
}
);
}
}, 10);
});
};
const initializedIds = new Set();
const initSVGAList = (url, id) => {
if (initializedIds.has(id)) return; // 避免重复初始化
console.log('SVGASVGASVGASVGASVGASVGA',url,id);
nextTick(() => {
const container = document.getElementById("svga-player" + id);
if (!container) {
console.error(`SVGA container for ID ${id} not found`);
return;
}
try {
const player = new SVGA.Player(container);
const parser = new SVGA.Parser();
parser.load(url, (videoItem) => {
player.setVideoItem(videoItem);
player.startAnimation();
});
initializedIds.add(id); // 标记已初始化
} catch (error) {
console.error("SVGA initialization failed:", error);
}
});
};
const jsonFun = (val) => JSON.parse(val);
// 分页导航
const handleSizeChange = () => {
getData();
};
const handleCurrentChange = () => {
getData();
};
return {
partitionDesc,
partitionIdArr,
file,
filePreview,
isImage,
isVideo,
isSVGA,
loading,
inquire,
operationDialog,
operationType,
operationDialogTitle,
operationValueId,
operationValue,
sendDialog,
sendObj,
tableData,
total,
currentPage,
pageSize,
getData,
operation,
send,
beforeAvatarUpload,
handleAvatarError,
handleAvatarSuccess,
handleAvatarSuccess1,
// resetFile,
initSVGA,
initSVGAList,
jsonFun,
handleSizeChange,
handleCurrentChange,
};
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
.avatar {
width: 100%;
}
</style>

View File

@@ -1,189 +1,299 @@
<template>
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<form id="searchForm" action="/admin/recharge/user/give/export" method="get" target="_blank">
<div class="col-sm-12">
<label for="fromErBanNo" class="col-sm-2 control-label">转出人id:</label>
<div class="col-sm-2">
<input type="text" class="form-control" name="fromErBanNo" id="fromErBanNo">
</div>
<label for="toErBanNo" class="col-sm-2 control-label">收入人id:</label>
<div class="col-sm-2">
<input type="text" class="form-control" name="toErBanNo" id="toErBanNo">
</div>
<label for="toRegion" class="col-sm-2 control-label">收入人地区:</label>
<div class="col-sm-2">
<select name="toRegion" id="toRegion" data-btn-class="btn-warning" class="form-control">
<option value="" selected="selected">全部</option>
</select>
</div>
</div>
<div class="col-sm-12">
<label for="startTime" class="col-sm-2 control-label">时间:</label>
<div class="col-sm-3"><input type="text" class="form-control" name="startTime" id="startTime">
</div>
<label for="endTime" class="col-sm-1 control-label">-</label>
<div class="col-sm-3"><input type="text" class="form-control" name="endTime" id="endTime"></div>
</div>
</form>
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnExport" class="btn btn-default">
<i class="glyphicon glyphicon-Export"></i>导出
</button>
</div>
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<form
id="searchForm"
action="/admin/recharge/user/give/export"
method="get"
target="_blank"
>
<div class="col-sm-12">
<label for="fromErBanNo" class="col-sm-2 control-label"
>转出人id:</label
>
<div class="col-sm-2">
<input
type="text"
class="form-control"
name="fromErBanNo"
id="fromErBanNo"
/>
</div>
<label for="toErBanNo" class="col-sm-2 control-label"
>收入人id:</label
>
<div class="col-sm-2">
<input
type="text"
class="form-control"
name="toErBanNo"
id="toErBanNo"
/>
</div>
<label for="toRegion" class="col-sm-2 control-label"
>收入人地区:</label
>
<div class="col-sm-2">
<select
name="toRegion"
id="toRegion"
data-btn-class="btn-warning"
class="form-control"
>
<option value="" selected="selected">全部</option>
</select>
</div>
</div>
<div class="col-sm-12">
<label for="startTime" class="col-sm-2 control-label"
>时间:</label
>
<div class="col-sm-3">
<input
type="text"
class="form-control"
name="startTime"
id="startTime"
/>
</div>
<label for="endTime" class="col-sm-1 control-label">-</label>
<div class="col-sm-3">
<input
type="text"
class="form-control"
name="endTime"
id="endTime"
/>
</div>
</div>
</form>
<div id="mapObjHtml">
<span
style="
margin-right: 10px;
display: inline-block;
font-size: 18px;
color: #2049a9;
"
>金币转赠明细: <b class="b1"></b
></span>
<span
style="
margin-right: 10px;
display: inline-block;
font-size: 18px;
color: #2049a9;
"
>转赠非充值代理用户总数: <b class="b2"></b
></span>
</div>
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnExport" class="btn btn-default">
<i class="glyphicon glyphicon-Export"></i>导出
</button>
</div>
</section>
</div>
</div>
</section>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import TableHelper from "@/utils/bootstrap-table-helper";
export default {
name: "RechargeDiamondGiveDetailView",
setup() {
return {};
},
created() {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
$(function () {
userRegion();
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'createTime', title: '时间', align: 'center', width: '5%' },
{ field: 'fromErBanNo', title: '转出人peko id', align: 'center', width: '5%' },
{ field: 'fromNick', title: '转出人昵称', align: 'center', width: '5%' },
{ field: 'fromClanName', title: '转出人所在公会', align: 'center', width: '5%' },
{
field: 'fromRegion',
title: '转出人所属代充地区',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
var value = '';
if (val) {
var array = val.split(',');
for (let i = 0, len = array.length; i < len; i++) {
var region = array[i];
value += region;
if (i != len - 1) {
value += '<br/>';
}
}
}
return value;
}
},
{ field: 'toErBanNo', title: '收入人peko id', align: 'center', width: '5%' },
{ field: 'toNick', title: '收入人昵称', align: 'center', width: '5%' },
{ field: 'toRegion', title: '收入人地区', align: 'center', width: '5%' },
{ field: 'inviteCode', title: '收入人填写的邀请码', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '转赠数额', align: 'center', width: '5%' },
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
fromErBanNo: $('#fromErBanNo').val(),
toErBanNo: $('#toErBanNo').val(),
toRegion: $('#toRegion').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/recharge/user/give/dayDetailPage',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#startTime').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
//导出功能
$("#btnExport").on('click', function () {
$("#searchForm").submit();
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
//用户地区
function userRegion() {
var array;
$.ajax({
type: "get",
url: "/admin/recharge/user/give/getRegion",
dataType: "json",
async: false,
success: function (json) {
if (json.success == 'true' || json.code == 200) {
array = json.data;
}
}
});
var $select = $('#toRegion');
for (let i = 0; i < array.length; i++) {
var value = array[i];
var $option = $('<option value="' + value + '" />');
$option.html(value);
$select.append($option);
name: "RechargeDiamondGiveDetailView",
setup() {
return {};
},
created() {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
$(function () {
userRegion();
$("#table").bootstrapTable("destroy");
$("#table").bootstrapTable({
columns: [
{
field: "createTime",
title: "时间",
align: "center",
width: "5%",
},
{
field: "fromErBanNo",
title: "转出人peko id",
align: "center",
width: "5%",
},
{
field: "fromNick",
title: "转出人昵称",
align: "center",
width: "5%",
},
{
field: "fromClanName",
title: "转出人所在公会",
align: "center",
width: "5%",
},
{
field: "fromRegion",
title: "转出人所属代充地区",
align: "center",
width: "5%",
formatter: function (val, row, index) {
var value = "";
if (val) {
var array = val.split(",");
for (let i = 0, len = array.length; i < len; i++) {
var region = array[i];
value += region;
if (i != len - 1) {
value += "<br/>";
}
}
}
});
}
},
return value;
},
},
{
field: "toErBanNo",
title: "收入人peko id",
align: "center",
width: "5%",
},
{
field: "toNick",
title: "收入人昵称",
align: "center",
width: "5%",
},
{
field: "toRegion",
title: "收入人地区",
align: "center",
width: "5%",
},
{
field: "inviteCode",
title: "收入人填写的邀请码",
align: "center",
width: "5%",
},
{
field: "diamondNum",
title: "转赠数额",
align: "center",
width: "5%",
},
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) {
//设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
fromErBanNo: $("#fromErBanNo").val(),
toErBanNo: $("#toErBanNo").val(),
toRegion: $("#toRegion").val(),
startTime: $("#startTime").val(),
endTime: $("#endTime").val(),
};
return param;
},
toolbar: "#toolbar",
url: "/admin/recharge/user/give/dayDetailPage",
onLoadSuccess: function (res) {
//加载成功时执行
console.log();
$("#mapObjHtml .b1").text(res.totalMap.totalDiamondNum);
$("#mapObjHtml .b2").text(res.totalMap.totalDiamondNum4Normal);
},
onLoadError: function () {
//加载失败时执行
console.log("load fail");
},
});
var picker1 = $("#startTime").datetimepicker({
format: "yyyy-mm-dd hh:ii:00",
todayBtn: true,
autoclose: true,
});
var picker2 = $("#endTime").datetimepicker({
format: "yyyy-mm-dd hh:ii:00",
todayBtn: true,
autoclose: true,
});
picker1.on("changeDate", function () {
var date = $("#startTime").datetimepicker("getDate");
picker2.datetimepicker("setStartDate", date);
});
picker2.on("changeDate", function () {
var date = $("#endTime").datetimepicker("getDate");
picker1.datetimepicker("setEndDate", date);
});
//导出功能
$("#btnExport").on("click", function () {
$("#searchForm").submit();
});
// 查询刷新
$("#btnSearch").on("click", function () {
TableHelper.doRefresh("#table");
});
//用户地区
function userRegion() {
var array;
$.ajax({
type: "get",
url: "/admin/recharge/user/give/getRegion",
dataType: "json",
async: false,
success: function (json) {
if (json.success == "true" || json.code == 200) {
array = json.data;
}
},
});
var $select = $("#toRegion");
for (let i = 0; i < array.length; i++) {
var value = array[i];
var $option = $('<option value="' + value + '" />');
$option.html(value);
$select.append($option);
}
}
});
},
},
};
</script>

View File

@@ -5,66 +5,55 @@
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<form id="form2"
action=""
method="post"
target="_blank">
<input type="hidden"
name="erbanNo"
id="exportErbanNo">
<input type="hidden"
name="channel"
id="exportChannel">
<input type="hidden"
name="startTime"
id="exportStartTime">
<input type="hidden"
name="endTime"
id="exportEndTime">
<input type="hidden"
name="status"
id="exportStatus">
<input type="hidden"
name="newUser"
id="exportNewUser">
<input type="hidden"
name="appChannel"
id="exportAppChannel">
<form id="form2" action="" method="post" target="_blank">
<input type="hidden" name="erbanNo" id="exportErbanNo" />
<input type="hidden" name="channel" id="exportChannel" />
<input type="hidden" name="startTime" id="exportStartTime" />
<input type="hidden" name="endTime" id="exportEndTime" />
<input type="hidden" name="status" id="exportStatus" />
<input type="hidden" name="newUser" id="exportNewUser" />
<input type="hidden" name="appChannel" id="exportAppChannel" />
</form>
<section class="content">
<div id="toolbar">
<form class="form-inline">
<div class="form-group">
<label for="qErbanNo">平台号</label>
<input type="text"
class="form-control"
name="erbanNo"
id="qErbanNo">
<input
type="text"
class="form-control"
name="erbanNo"
id="qErbanNo"
/>
</div>
<div class="form-group">
<label for="qChannel">渠道:</label>
<input type="text"
class="form-control"
name="channel"
id="qChannel">
<input
type="text"
class="form-control"
name="channel"
id="qChannel"
/>
</div>
<div class="form-group">
<label for="qChannel">时间:</label>
<input type="text"
class="form-control datetime"
name="startTime"
id="qStartTime">
<input
type="text"
class="form-control datetime"
name="startTime"
id="qStartTime"
/>
<label for="qChannel">-</label>
<input type="text"
class="form-control datetime"
name="endTime"
id="qEndTime">
<input
type="text"
class="form-control datetime"
name="endTime"
id="qEndTime"
/>
</div>
<div class="form-group">
<label for="qStatus">状态:</label>
<select class="form-control"
name="status"
id="qStatus">
<select class="form-control" name="status" id="qStatus">
<option value="">全部</option>
<option value="1">发起充值</option>
<option value="2">充值成功</option>
@@ -72,9 +61,7 @@
</div>
<div class="form-group">
<label for="qNewUser">新用户:</label>
<select class="form-control"
name="newUser"
id="qNewUser">
<select class="form-control" name="newUser" id="qNewUser">
<option value="">全部</option>
<option value="1"></option>
<option value="0"></option>
@@ -82,20 +69,20 @@
</div>
<div class="form-group">
<label for="qChannel">app渠道</label>
<input type="text"
class="form-control"
name="appChannel"
id="qAppChannel">
<input
type="text"
class="form-control"
name="appChannel"
id="qAppChannel"
/>
</div>
</form>
<button id="btnSearch"
class="btn btn-sm btn-primary">查询</button>
<button id="btnExport"
class="btn btn-sm btn-primary">导出</button>
<div id="mapObjHtml"></div>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnExport" class="btn btn-sm btn-primary">导出</button>
</div>
<!-- .content -->
<div class="content"
id="table"></div>
<div class="content" id="table"></div>
</section>
</div>
</div>
@@ -103,152 +90,185 @@
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import TableHelper from "@/utils/bootstrap-table-helper";
export default {
name: "ChargeRecordView",
setup () {
return {};
},
created () {
created() {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData () {
$(function () {
$('.datetime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
{ field: 'uid', title: 'uid', align: 'center', width: '5%' },
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
{ field: 'partitionName', title: '分区', align: 'center', width: '5%' },
{ field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%' },
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
{ field: 'localCurrencyCode', title: '当地货币代码', align: 'center', width: '5%' },
{ field: 'localAmount', title: '当地金额', align: 'center', width: '5%' },
{ field: 'chargeRecordId', title: '商户订单号', align: 'center', width: '5%' },
{ field: 'pingxxChargeId', title: '第三方订单号', align: 'center', width: '5%' },
{
field: 'status', title: '状态', align: 'center', width: '5%',
formatter: function (val, row, index) {
if (val == 2) {
return '充值成功';
} else {
return '发起充值';
}
}
},
{
field: 'newUser', title: '是否新用户', align: 'center', width: '5%',
formatter: function (val, row, index) {
if (val) {
return '是';
} else {
return '否';
}
}
},
{ field: 'appChannel', title: 'app渠道', align: 'center', width: '5%' },
],
undefinedText: "-",
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageNumber: params.pageNumber,
pageSize: params.pageSize,
erbanNo: $('#qErbanNo').val(),
channel: $('#qChannel').val(),
startTime: $('#qStartTime').val(),
endTime: $('#qEndTime').val(),
status: $('#qStatus').val(),
newUser: $('#qNewUser').val(),
appChannel: $('#qAppChannel').val(),
};
return param;
},
ajax: function (request) { //使用ajax请求
$.ajax({
type: "GET",
url: '/admin/chargeRecord/list',
contentType: 'application/json;charset=utf-8',
dataType: 'json',
data: request.data,
success: function (res) {
apiResult(res);
request.success({
rows: res.data.records,
total: res.data.total
});
},
error: function (req) {
serverError(req);
}
})
},
toolbar: '#toolbar',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
function serverError (req) {
$("#tipMsg").text(req.responseJSON.message);
$("#tipModal").modal('show');
}
function apiResult (json) {
if (json.code == 200 && json.message == 'success') {
return true;
}
$("#tipMsg").text("请求失败,错误信息:" + json.message);
$("#tipModal").modal('show');
return false;
}
// 导出excel
$('#btnExport').on('click', function () {
var form = $("#form2");
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
$('#exportErbanNo').val($('#qErbanNo').val());
$('#exportChannel').val($('#qChannel').val());
$('#exportStartTime').val($('#qStartTime').val());
$('#exportEndTime').val($('#qEndTime').val());
$('#exportStatus').val($('#qStatus').val());
$('#exportNewUser').val($('#qNewUser').val());
$('#exportAppChannel').val($('#qAppChannel').val());
form.submit();
})
initData() {
$(".datetime").datetimepicker({
format: "yyyy-mm-dd hh:ii:00",
autoclose: true,
});
}
},
// 初始化表格,但不设置 `ajax` 方法,也不绑定 `url`,只提供列配置
$("#table").bootstrapTable({
columns: [
{ field: "erbanNo", title: "平台号", align: "center", width: "5%" },
{ field: "uid", title: "uid", align: "center", width: "5%" },
{ field: "nick", title: "昵称", align: "center", width: "5%" },
{
field: "partitionName",
title: "分区",
align: "center",
width: "5%",
},
{
field: "createTime",
title: "创建时间",
align: "center",
valign: "middle",
width: "10%",
},
{ field: "channel", title: "渠道", align: "center", width: "5%" },
{
field: "localCurrencyCode",
title: "当地货币代码",
align: "center",
width: "5%",
},
{
field: "localAmount",
title: "当地金额",
align: "center",
width: "5%",
},
{
field: "chargeRecordId",
title: "商户订单号",
align: "center",
width: "5%",
},
{
field: "pingxxChargeId",
title: "第三方订单号",
align: "center",
width: "5%",
},
{
field: "status",
title: "状态",
align: "center",
width: "5%",
formatter: function (val, row, index) {
return val == 2 ? "充值成功" : "发起充值";
},
},
{
field: "newUser",
title: "是否新用户",
align: "center",
width: "5%",
formatter: function (val, row, index) {
return val ? "是" : "否";
},
},
{
field: "appChannel",
title: "app渠道",
align: "center",
width: "5%",
},
],
undefinedText: "-",
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server",
queryParamsType: "undefined",
data: [], // 初始化为空数据
});
// 查询刷新
$("#btnSearch").on("click", function () {
const params = {
pageNumber: 1,
pageSize: 20,
erbanNo: $("#qErbanNo").val(),
channel: $("#qChannel").val(),
startTime: $("#qStartTime").val(),
endTime: $("#qEndTime").val(),
status: $("#qStatus").val(),
newUser: $("#qNewUser").val(),
appChannel: $("#qAppChannel").val(),
};
// 手动加载数据
$.ajax({
type: "GET",
url: "/admin/chargeRecord/list",
contentType: "application/json;charset=utf-8",
dataType: "json",
data: params,
success: function (res) {
if (apiResult(res)) {
$("#table").bootstrapTable("load", {
rows: res.data.rows,
total: res.data.total,
});
$("#mapObjHtml span").remove();
const totalMap = res.data.totalMap;
let str = "";
const sortedKeys = Object.keys(totalMap).sort((keyA, keyB) => {
return keyA === "总充值{USD}"
? -1
: keyB === "总充值{USD}"
? 1
: 0;
});
for (const key of sortedKeys) {
str += `
<span style="margin-right:10px;display: inline-block;font-size: 18px;color: #2049a9;" type="text">${key}: ${totalMap[key]}, </span>
`;
}
$("#mapObjHtml").append(str);
}
},
error: function (req) {
serverError(req);
},
});
});
function serverError(req) {
$("#tipMsg").text(req.responseJSON.message);
$("#tipModal").modal("show");
}
function apiResult(json) {
if (json.code == 200 && json.message == "success") {
return true;
}
$("#tipMsg").text("请求失败,错误信息:" + json.message);
$("#tipModal").modal("show");
return false;
}
// 导出excel
$("#btnExport").on("click", function () {
const form = $("#form2");
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
$("#exportErbanNo").val($("#qErbanNo").val());
$("#exportChannel").val($("#qChannel").val());
$("#exportStartTime").val($("#qStartTime").val());
$("#exportEndTime").val($("#qEndTime").val());
$("#exportStatus").val($("#qStatus").val());
$("#exportNewUser").val($("#qNewUser").val());
$("#exportAppChannel").val($("#qAppChannel").val());
form.submit();
});
},
},
};
</script>

View File

@@ -0,0 +1,410 @@
<template>
<div class="box">
<!-- 分区 -->
<div class="inquire">
<div class="block">
<span class="demonstration">分区</span>
<el-select
v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 平台ID -->
<div class="inquire">
<span>平台ID</span>
<el-input
v-model="inquire.userId"
placeholder=""
class="input"
></el-input>
</div>
<!-- 充值订单号 -->
<div class="inquire">
<span>充值订单号</span>
<el-input
v-model="inquire.rechargeNumber"
placeholder=""
class="input"
></el-input>
</div>
<!-- 第三方订单号 -->
<div class="inquire">
<span>第三方订单号</span>
<el-input
v-model="inquire.partyNumber"
placeholder=""
class="input"
></el-input>
</div>
<!-- 国家 -->
<div class="inquire">
<div class="block">
<span class="demonstration">国家</span>
<el-select
v-model="inquire.country"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.countryArr"
:key="item.id"
:label="item.regionDesc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 状态 -->
<div class="inquire">
<div class="block">
<span class="demonstration">状态</span>
<el-select
v-model="inquire.status"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.statusArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 平台 -->
<div class="inquire">
<div class="block">
<span class="demonstration">平台</span>
<el-select
v-model="inquire.platform"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.platformArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 支付渠道 -->
<div class="inquire">
<div class="block">
<span class="demonstration">支付渠道</span>
<el-select
v-model="inquire.paymentChannels"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.paymentChannelsArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 时间选择器 -->
<div class="inquire">
<div class="block">
<span class="demonstration">时间</span>
<el-date-picker
v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>搜索</el-button
>
<el-button
class="primary"
type="primary"
@click="
inquire.partitionId = inquire.partitionArr[0].id;
inquire.userId = '';
inquire.rechargeNumber = '';
inquire.partyNumber = '';
inquire.country = inquire.countryArr[0].id;
inquire.status = 0;
inquire.platform = '';
inquire.paymentChannels = '';
inquire.time = '';
getData();
"
>重置搜索</el-button
>
<el-button class="primary" type="primary" @click="exportInfoFun()"
>导出</el-button
>
<div>
<el-button v-for="(value, key) in sortedMapObj" :key="key" type="text"
>{{ key }}: {{ value }},
</el-button>
</div>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="chargeStatusDesc" align="center" label="支付状态">
</el-table-column>
<el-table-column prop="chargeRecordId" align="center" label="订单ID" />
<el-table-column
prop="pingxxChargeId"
align="center"
label="第三方订单ID"
/>
<el-table-column prop="channel" align="center" label="充值渠道" />
<el-table-column prop="erbanNo" align="center" label="平台ID" />
<el-table-column prop="nick" align="center" label="昵称" />
<el-table-column prop="partitionDesc" align="center" label="地区" />
<el-table-column prop="phone" align="center" label="电话" />
<el-table-column prop="os" align="center" label="平台" />
<el-table-column prop="genderDesc" align="center" label="性别" />
<el-table-column prop="chargeIp" align="center" label="用户IP" />
<el-table-column prop="totalGold" align="center" label="金币数量" />
<el-table-column prop="amount" align="center" label="花费金额USD" />
<el-table-column
prop="localCurrencyCode"
align="center"
label="当地货币代码"
/>
<el-table-column
prop="localAmount"
align="center"
label="当地货币花费金额"
/>
<el-table-column prop="createTime" align="center" label="购买时间" />
<el-table-column prop="successTime" align="center" label="回调时间" />
<el-table-column prop="successTime" align="center" label="退款时间" />
<el-table-column prop="amount" align="center" label="退款金额" />
<el-table-column
prop="refundDesc"
align="center"
label="状态"
></el-table-column>
<el-table-column prop="regionName" align="center" label="国家" />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import {
listPartitionInfo,
refundList,
regionInfoList,
refundExport,
} from "@/api/refund/refund";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "userRefundQuiry",
computed: {
sortedMapObj() {
const entries = Object.entries(this.mapObj);
// 将 "总充值{USD}" 的键排到第一位
entries.sort(([keyA], [keyB]) =>
keyA === "总充值{USD}" ? -1 : keyB === "总充值{USD}" ? 1 : 0
);
return Object.fromEntries(entries);
},
},
data() {
return {
loading: false,
delDialog: false,
delDialogData: null,
mapObj: {},
//查询所需条件对象
inquire: {
partitionId: 0,
partitionArr: [],
userId: "",
rechargeNumber: "",
partyNumber: "",
country: "",
countryArr: [],
status: "",
statusArr: [
{ desc: "全部", id: 0 },
{ desc: "退款中", id: 2 },
{ desc: "退款成功", id: 1 },
{ desc: "退款失败", id: 3 },
],
platform: "",
platformArr: [
{ desc: "全部", id: "" },
{ desc: "Android", id: "android" },
{ desc: "iOS", id: "iOS" },
],
paymentChannels: "",
paymentChannelsArr: [
{ desc: "google内购", id: "google_play_billing" },
{ desc: "payermax", id: "payermax" },
{ desc: "myCard", id: "MyCard" },
{ desc: "startPay", id: "start_pay" },
{ desc: "ios内购", id: "ios_pay" },
{ desc: "对公打款", id: "company" },
],
time: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
});
regionInfoList().then((res) => {
this.inquire.countryArr = res.data;
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
}
refundList({
partitionId: this.inquire.partitionId,
channel: this.inquire.paymentChannels,
chargeRecordId: this.inquire.rechargeNumber,
pingxxChargeId: this.inquire.partyNumber,
refundStatus: this.inquire.status,
regionId: this.inquire.country,
os: this.inquire.platform,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
beginDate: startTime,
endDate: endTime,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.rows;
this.mapObj = res.data.totalMap;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading = false;
});
},
jsonFun(val) {
return JSON.parse(val);
},
exportInfoFun() {
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
}
refundExport({
partitionId: this.inquire.partitionId,
channel: this.inquire.paymentChannels,
chargeRecordId: this.inquire.rechargeNumber,
pingxxChargeId: this.inquire.partyNumber,
refundStatus: this.inquire.status,
regionId: this.inquire.country,
os: this.inquire.platform,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
beginDate: startTime,
endDate: endTime,
}).then();
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
margin-bottom: 10px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</style>

View File

@@ -8,36 +8,39 @@
</section>
<div id="toolbar">
<div class="col-sm-12">
<label for="erbanNo"
class="col-sm-2 control-label">房主平台号:</label>
<label for="erbanNo" class="col-sm-2 control-label"
>房主平台号:</label
>
<div class="col-sm-2">
<input type="text"
class="form-control"
name="erbanNo"
id="erbanNo"
placeholder="">
<input
type="text"
class="form-control"
name="erbanNo"
id="erbanNo"
placeholder=""
/>
</div>
<label for="roomTitle"
class="col-sm-2 control-label">房间标题:</label>
<label for="roomTitle" class="col-sm-2 control-label"
>房间标题:</label
>
<div class="col-sm-2">
<input type="text"
class="form-control"
name="roomTitle"
id="roomTitle"
placeholder="">
<input
type="text"
class="form-control"
name="roomTitle"
id="roomTitle"
placeholder=""
/>
</div>
<label for="partitionId"
class="col-sm-1 control-label">地区:</label>
<label for="partitionId" class="col-sm-1 control-label"
>地区:</label
>
<div class="col-sm-2">
<select name="partitionId"
id="partitionId"
class="form-control">
<option value="4"
selected>华语区</option>
<select name="partitionId" id="partitionId" class="form-control">
<option value="4" selected>华语区</option>
</select>
</div>
<button id="btnSearch"
class="btn btn-default">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
</div>
@@ -46,44 +49,40 @@
<!-- .content -->
<div id="table"></div>
</div>
</section>
<!-- 编辑弹框 -->
<div class="modal fade"
id="roomTabHomeModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel">
<div class="modal-dialog"
role="document">
<div
class="modal fade"
id="roomTabHomeModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">&times;</span>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title"
id="modalLabel">编辑</h4>
<h4 class="modal-title" id="modalLabel">编辑</h4>
</div>
<div class="modal-body">
<form class="form-horizontal"
id="addForm">
<input type="hidden"
name="id"
id="id" />
<input type="hidden"
name="roomUid"
id="roomUid" />
<form class="form-horizontal" id="addForm">
<input type="hidden" name="id" id="id" />
<input type="hidden" name="roomUid" id="roomUid" />
<div class="form-group">
<label for="modal_isTop"
class="col-sm-3 control-label">是否置顶<font color="red">*</font></label>
<label for="modal_isTop" class="col-sm-3 control-label"
>是否置顶<font color="red">*</font></label
>
<div class="col-sm-9">
<select name="isTop"
id="modal_isTop"
class="form-control">
<select name="isTop" id="modal_isTop" class="form-control">
<option value=""></option>
<option value="1"></option>
<option value="0"></option>
@@ -91,45 +90,69 @@
</div>
</div>
<div class="form-group">
<label for="modal_seq"
class="col-sm-3 control-label">置顶排序<font color="red">*</font>:</label>
<label for="modal_type" class="col-sm-3 control-label"
>房间类型<font color="red">*</font></label
>
<div class="col-sm-9">
<input type="text"
class="form-control"
name="seq"
id="modal_seq"
placeholder="数字小的排前面,必填">
<select name="type" id="modal_type" class="form-control">
<option value="1">客服房间</option>
<option value="2">热门房间</option>
</select>
</div>
</div>
<div class="form-group">
<label for="modal_topStart"
class="col-sm-3 control-label">置顶开始时间<font color="red">*</font>
:</label>
<label for="modal_seq" class="col-sm-3 control-label"
>置顶排序调整为位置排序<font color="red">*</font>:</label
>
<div class="col-sm-9">
<input type="text"
class="input-sm form-control datetime"
name="topStart"
id="modal_topStart">
<input
type="number"
class="form-control"
name="seq"
id="modal_seq"
min="1"
max="5"
placeholder="填入的数字=在首页的第几个位置"
oninput="this.value = Math.min(Math.max(this.value, 1), 5)"
/>
</div>
</div>
<div class="form-group">
<label for="modal_topEnd"
class="col-sm-3 control-label">置顶结束时间<font color="red">*</font>
:</label>
<label for="modal_topStart" class="col-sm-3 control-label"
>置顶开始时间<font color="red">*</font> :</label
>
<div class="col-sm-9">
<input type="text"
class="input-sm form-control datetime"
name="topEnd"
id="modal_topEnd">
<input
type="text"
class="input-sm form-control datetime"
name="topStart"
id="modal_topStart"
/>
</div>
</div>
<div class="form-group">
<label for="modal_isShow"
class="col-sm-3 control-label">是否在App首页展示<font color="red">*</font></label>
<label for="modal_topEnd" class="col-sm-3 control-label"
>置顶结束时间<font color="red">*</font> :</label
>
<div class="col-sm-9">
<select name="isShow"
id="modal_isShow"
class="form-control validate[required]">
<input
type="text"
class="input-sm form-control datetime"
name="topEnd"
id="modal_topEnd"
/>
</div>
</div>
<div class="form-group">
<label for="modal_isShow" class="col-sm-3 control-label"
>是否在App首页展示<font color="red">*</font></label
>
<div class="col-sm-9">
<select
name="isShow"
id="modal_isShow"
class="form-control validate[required]"
>
<option value="1"></option>
<option value="0"></option>
</select>
@@ -138,24 +161,23 @@
</form>
</div>
<div class="modal-footer">
<button type="button"
class="btn btn-default"
data-dismiss="modal">关闭</button>
<button type="button"
class="btn btn-primary"
id="btnConfirm">确定</button>
<button type="button" class="btn btn-default" data-dismiss="modal">
关闭
</button>
<button type="button" class="btn btn-primary" id="btnConfirm">
确定
</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { formatTime } from '@/utils/maintainer';
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
import { buildSelectOption } from '@/utils/system-helper';
import TableHelper from "@/utils/bootstrap-table-helper";
import { formatTime } from "@/utils/maintainer";
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { buildSelectOption } from "@/utils/system-helper";
// tab类型选择变化查询
/*function selectOnTabChange(obj){
@@ -164,115 +186,173 @@ import { buildSelectOption } from '@/utils/system-helper';
}*/
export default {
name: "RoomTabHomeView",
setup () {
setup() {
return {};
},
created () {
created() {
this.$nextTick(function () {
this.initPartition();
this.initData();
});
},
methods: {
initData () {
initData() {
$(function () {
$('.datetime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
$(".datetime").datetimepicker({
format: "yyyy-mm-dd hh:ii:00",
autoclose: true,
});
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
$("#table").bootstrapTable("destroy");
$("#table").bootstrapTable({
columns: [
{ field: 'erbanNo', title: '房主平台号', align: 'center', width: '5%' },
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
{
field: 'isPermitRoom',
title: '房间类型',
align: 'center',
width: '5%',
field: "erbanNo",
title: "房主平台号",
align: "center",
width: "5%",
},
{
field: "roomUid",
title: "房主Uid",
align: "center",
width: "5%",
},
{
field: "roomTitle",
title: "房间标题",
align: "center",
width: "8%",
},
{
field: "roomTag",
title: "房间标签",
align: "center",
width: "5%",
},
{
field: "isPermitRoom",
title: "房间类型",
align: "center",
width: "5%",
formatter: function (val, row, index) {
let value = '';
let value = "";
if (val == 1) {
value = '牌照房';
value = "牌照房";
} else if (val == 4) {
value = '个播房';
value = "个播房";
} else {
value = '非牌照房';
value = "非牌照房";
}
return value;
}
},
},
{
field: 'avatar',
title: '图标内容',
align: 'center',
width: '5%',
field: "avatar",
title: "图标内容",
align: "center",
width: "5%",
formatter: function (val, row, index) {
return "<img src='" + val + "' width='40' height='40'>";
}
},
},
{
field: 'isTop',
title: '是否置顶',
align: 'center',
valign: 'middle',
width: '5%',
field: "isTop",
title: "是否置顶",
align: "center",
valign: "middle",
width: "5%",
formatter: function (val, row, index) {
if (val == 1) {
return '是';
return "是";
} else if (val == 0) {
return '否';
return "否";
}
return '否';
}
return "否";
},
},
{
field: 'isShow',
title: '是否在App首页展示',
align: 'center',
valign: 'middle',
width: '5%',
field: "isShow",
title: "是否在App首页展示",
align: "center",
valign: "middle",
width: "5%",
formatter: function (val, row, index) {
if (val == 1) {
return '是';
return "是";
} else if (val == 0) {
return '否';
return "否";
}
return '是';
}
return "是";
},
},
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' },
{ field: 'topStart', title: '置顶开始时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
{ field: 'topEnd', title: '置顶结束时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
{ field: "seq", title: "置顶排序", align: "center", width: "5%" },
{
field: 'isHourTop1', title: '小时榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
return val ? '是' : '否';
}
field: "topStart",
title: "置顶开始时间",
align: "center",
valign: "middle",
width: "10%",
formatter: formatTime,
},
{
field: 'isHourTop1', title: '周榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
return val ? '是' : '否';
}
field: "topEnd",
title: "置顶结束时间",
align: "center",
valign: "middle",
width: "10%",
formatter: formatTime,
},
{
field: 'micUserCount', title: '麦上人数', align: 'center', valign: 'middle', width: '10%'
},
{
field: 'onlineNum', title: '房间人数', align: 'center', valign: 'middle', width: '10%'
},
{
field: 'id',
title: '操作',
align: 'center',
width: '10%',
field: "isHourTop1",
title: "小时榜top1",
align: "center",
valign: "middle",
width: "10%",
formatter: function (val, row, index) {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>';
}
}
return val ? "是" : "否";
},
},
{
field: "isHourTop1",
title: "周榜top1",
align: "center",
valign: "middle",
width: "10%",
formatter: function (val, row, index) {
return val ? "是" : "否";
},
},
{
field: "micUserCount",
title: "麦上人数",
align: "center",
valign: "middle",
width: "10%",
},
{
field: "onlineNum",
title: "房间人数",
align: "center",
valign: "middle",
width: "10%",
},
{
field: "id",
title: "操作",
align: "center",
width: "10%",
formatter: function (val, row, index) {
return (
'<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' +
val +
'" data-index="' +
index +
'">' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>'
);
},
},
],
undefinedText: "",
cache: false,
@@ -281,51 +361,55 @@ export default {
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams (params) { //设置查询参数
queryParams: function queryParams(params) {
//设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
erbanNo: $('#erbanNo').val(),
roomTitle: $('#roomTitle').val(),
partitionId: $('#partitionId').val(),
erbanNo: $("#erbanNo").val(),
roomTitle: $("#roomTitle").val(),
partitionId: $("#partitionId").val(),
};
console.log(param);
return param;
},
url: '/admin/roomTabHome/list',
url: "/admin/roomTabHome/list",
responseHandler: function (data) {
console.info(111, data)
console.info(111, data);
if (data.code === 200) {
return { "rows": data.data, "total": data.data.length };
return { rows: data.data, total: data.data.length };
} else {
return { "rows": [], "total": 0 };
return { rows: [], total: 0 };
}
},
toolbar: '#toolbar',
onLoadSuccess: function () { //加载成功时执行
toolbar: "#toolbar",
onLoadSuccess: function () {
//加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
onLoadError: function () {
//加载失败时执行
console.log("load fail");
}
},
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
$("#btnSearch").on("click", function () {
TableHelper.doRefresh("#table");
});
// 编辑或者新增
$("#btnConfirm").click(function () {
var id = $("#id").val();
var roomUid = $('#roomUid').val();
var roomUid = $("#roomUid").val();
var seq = $("#modal_seq").val();
var isTop = $("#modal_isTop").val();
var type = $("#modal_type").val();
var iconContent = $("#modal_iconContent").val();
var topStart = $("#modal_topStart").val();
var topEnd = $("#modal_topEnd").val();
var isShow = $('#modal_isShow').val();
if ($("#addForm").validationEngine('validate')) {
var isShow = $("#modal_isShow").val();
if ($("#addForm").validationEngine("validate")) {
$.ajax({
type: "post",
url: "/admin/roomTabHome/save",
@@ -343,34 +427,34 @@ export default {
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
$("#roomTabHomeModal").modal('hide');
$("#roomTabHomeModal").modal("hide");
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
$("#roomTabHomeModal").modal('hide');
$("#roomTabHomeModal").modal("hide");
}
}
},
});
}
});
// 获取信息
$("#table").on("click", '.opt-edit', function () {
$("#table").on("click", ".opt-edit", function () {
var id = $(this).attr("data-id");
const index = $(this).data('index');
const record = TableHelper.getData('#table')[index];
const index = $(this).data("index");
const record = TableHelper.getData("#table")[index];
$("#id").val(null);
$("#modal_seq").val(0);
$("#modal_isTop").val(0);
$("#modal_topStart").val('');
$("#modal_topEnd").val('');
$("#modal_type").val(0);
$("#modal_topStart").val("");
$("#modal_topEnd").val("");
$("#modal_isShow").val(0);
$('#roomUid').val(record.roomUid);
if (id && id != 'null') {
$("#roomUid").val(record.roomUid);
if (id && id != "null") {
$.ajax({
type: "get",
url: "/admin/roomTabHome/get",
@@ -382,53 +466,53 @@ export default {
$("#id").val(id);
$("#modal_seq").val(json.seq);
$("#modal_isTop").val(json.isTop ? 1 : 0);
$("#modal_type").val(json.type);
$("#modal_topStart").val(formatTime(json.topStart));
$("#modal_topEnd").val(formatTime(json.topEnd));
$("#modal_isShow").val(json.isShow ? 1 : 0);
} else {
$("#tipMsg").text("获取菜单信息出错");
$("#tipModal").modal('show');
$("#tipModal").modal("show");
}
}
},
});
}
// 打开编辑弹窗
$("#roomTabHomeModal").modal('show');
$("#roomTabHomeModal").modal("show");
$("#modalLabel").text("编辑");
});
// 删除操作
$("#table").on("click", '.opt-remove', function () {
$("#table").on("click", ".opt-remove", function () {
var id = $(this).attr("data-id");
if (id == 'undefined') {
if (id == "undefined") {
$("#tipMsg").text("id参数有误");
$("#tipModal").modal('show');
$("#tipModal").modal("show");
return;
}
if (confirm("你确认删除吗? \r\n 删除后不会恢复,请谨慎操作!")) {
$.ajax({
type: 'post',
type: "post",
url: "/admin/roomTabHome/delete",
data: { id: id },
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("删除成功");
$("#tipModal").modal('show');
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("删除失败");
$("#tipModal").modal('show');
$("#tipModal").modal("show");
}
}
},
});
}
});
});
},
initPartition () {
getPartitionInfoList().then(res => {
initPartition() {
getPartitionInfoList().then((res) => {
let data = res.data;
buildSelectOption(
"#partitionId",

View File

@@ -178,6 +178,7 @@ export default {
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
list({
partitionId: 2,
erbanNo: this.inquire.anchorId,
guildId: this.inquire.guildId,
ownerErbanNo: this.inquire.guildUserId,

File diff suppressed because it is too large Load Diff

View File

@@ -189,6 +189,12 @@
<input type="text" class="form-control validate[required]" name="giftName" id="giftEnName">
</div>
</div>
<div class="form-group">
<label for="giftTrName" class="col-sm-2 control-label">土耳其礼物名称</label>
<div class="col-sm-10">
<input type="text" class="form-control validate[required]" name="giftName" id="giftTrName">
</div>
</div>
<div class="form-group">
<label for="goldPrice" class="col-sm-2 control-label">礼物价格</label>
<div class="col-sm-10">
@@ -283,6 +289,22 @@
<label class="radio-inline"><input type="radio" name="isLatest" value="1"></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否需要全服通知</label>
<div class="col-sm-3">
<label class="radio-inline"><input type="radio" name="notifyFull" value="0" checked></label>
<label class="radio-inline"><input type="radio" name="notifyFull" value="1"></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否需要塞头像</label>
<div class="col-sm-3">
<label class="radio-inline"><input type="radio" name="showAvatarType" value="0" checked></label>
<label class="radio-inline"><input type="radio" name="showAvatarType" value="1">送礼者</label>
<label class="radio-inline"><input type="radio" name="showAvatarType" value="2">收礼者</label>
<label class="radio-inline"><input type="radio" name="showAvatarType" value="3">左送右收</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">限时礼物</label>
<div class="col-sm-3">
@@ -774,6 +796,36 @@ export default {
}
}
},
{
field: 'notifyFull',
title: '是否需要全服通知',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
if (val == 1) {
return '是';
} else {
return '否'
}
}
},
{
field: 'showAvatarType',
title: '是否需要塞头像',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
if (val == 0) {
return '否';
}else if (val == 1) {
return '送礼者';
} else if (val == 2) {
return '收礼者';
}else {
return '左送右收'
}
}
},
{
field: 'roomExclude',
title: '房间专属',
@@ -966,6 +1018,8 @@ export default {
$("input:radio[name='hasSvga']")[0].checked = true;
$("input:radio[name='isLatest']")[0].checked = true;
$("input:radio[name='isTimeLimit']")[0].checked = true;
$("input:radio[name='notifyFull']")[0].checked = true;
$("input:radio[name='showAvatarType']")[0].checked = true;
$("input:radio[name='roomExclude']")[0].checked = true;
$("#notifyStaySecond").val('');
$("#isSkipRoom").val('');
@@ -1217,6 +1271,8 @@ export default {
$("input:radio[name='hasSvga']")[0].checked = true;
$("input:radio[name='isLatest']")[1].checked = true;
$("input:radio[name='isTimeLimit']")[1].checked = true;
$("input:radio[name='notifyFull']")[0].checked = true;
$("input:radio[name='showAvatarType']")[0].checked = true;
$("input:radio[name='roomExclude']")[0].checked = true;
$('#giftType').val('');
$("#notifyStaySecond").val('');
@@ -1253,12 +1309,16 @@ export default {
$("#giftArName").val(jsonName.ar);
// 英语名称
$("#giftEnName").val(jsonName.en);
// 土耳其
$("#giftTrName").val(jsonName.tr);
} else {
$("#giftName").val(giftName);
// 阿语名称
$("#giftArName").val(giftName);
// 英语名称
$("#giftEnName").val(giftName);
// 土耳其名称
$("#giftTrName").val(giftName);
}
$("#goldPrice").val(json.entity.goldPrice);
@@ -1295,6 +1355,8 @@ export default {
var hasSvga = parseNum(json.entity.hasSvga);
var isLatest = parseNum(json.entity.isLatest);
var isTimeLimit = parseNum(json.entity.isTimeLimit);
var notifyFull = parseNum(json.entity.notifyFull);
var showAvatarType = json.entity.showAvatarType;
var isWholeServer = parseNum(json.entity.isWholeServer);
var roomExclude = parseNum(json.entity.roomExclude);
var partitionFlag = json.entity.partitionFlag;
@@ -1312,6 +1374,8 @@ export default {
$("input:radio[name='hasSvga']")[hasSvga].checked = true;
$("input:radio[name='isLatest']")[isLatest].checked = true;
$("input:radio[name='isTimeLimit']")[isTimeLimit].checked = true;
$("input:radio[name='notifyFull']")[notifyFull].checked = true;
$("input:radio[name='showAvatarType']")[showAvatarType].checked = true;
$("input:radio[name='isWholeServerLabel']")[isWholeServer].checked = true;
$("input:radio[name='roomExclude']")[roomExclude].checked = true;
@@ -1401,8 +1465,10 @@ export default {
var ar_name = $("#giftArName").val();
// 英语名称
var en_name = $("#giftEnName").val();
// 土耳其名称
var tr_name = $("#giftTrName").val();
// 国际化字段
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,'tr':tr_name}
const nameValue = JSON.stringify(jsonName);
// 修改属性值
formData.giftName = nameValue; // 将giftName修改为"newGiftName"

View File

@@ -14,15 +14,6 @@
<div id="toolbar">
送礼用户id<input type="text" name="senderErbanNo" id="senderErbanNo" class="input-sm" />
收礼用户id<input type="text" name="receiverErbanNo" id="receiverErbanNo" class="input-sm" />
礼物类型
<select name="giftType" id="giftType">
<option value="">全部</option>
<option value="0">背包礼物</option>
<option value="2">普通礼物</option>
<option value="5">福袋奖池礼物</option>
<option value="7">贵族礼物</option>
<option value="8">周星榜礼物</option>
</select>
礼物名称<input type="text" name="giftName" id="giftName" class="input-sm" />
送礼时间<input type="text" name="startTime" id="startTime" class="input-sm">
- <input type="text" name="endTime" id="endTime" class="input-sm">
@@ -50,42 +41,30 @@ export default {
},
methods: {
initData() {
let tableLoaded = false;
let currParams = {};
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'senderErbanNo', title: '送礼用户id', align: 'center', width: '8%' },
{ field: 'senderNick', title: '送礼用户昵称', align: 'center', width: '16%' },
{ field: 'senderNick', title: '送礼用户昵称', align: 'center', width: '12%' },
{ field: 'receiverErbanNo', title: '收礼用户id', align: 'center', width: '8%' },
{ field: 'receiverNick', title: '收礼用户昵称', align: 'center', width: '16%' },
{ field: 'giftType', title: '礼物类型', align: 'center', width: '16%' },
{ field: 'giftName', title: '礼物名称', align: 'center', width: '10%' },
{ field: 'giftNum', title: '礼物数量', align: 'center', width: '6%' },
{ field: 'receiverNick', title: '收礼用户昵称', align: 'center', width: '12%' },
{ field: 'roomErbanNo', title: "房间id", align: 'center', width: '8%' },
{ field: 'roomTitle', title: "房间", align: 'center', width: '12%' },
{ field: 'giftType', title: '礼物类型', align: 'center', width: '8%' },
{ field: 'giftName', title: '礼物名称', align: 'center', width: '8%' },
{ field: 'giftNum', title: '礼物数量', align: 'center', width: '4%' },
{ field: 'totalGoldNum', title: '礼物总价值(钻)', align: 'center', width: '10%' },
{
field: 'createTime',
title: '送礼时间',
align: 'center',
valign: 'middle',
width: '10%',
formatter: function (val, row, index) {
if (val) {
var date = new Date(val);
return date.format("yyyy-MM-dd hh:mm:ss");
} else {
return '-';
}
}
}
{ field: 'createTime', title: '送礼时间', align: 'center', valign: 'middle', width: '16%'},
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pageSize: 30,
pagination: true,
pageList: [10, 20, 30, 50],
pageList: [30, 50, 100, 200],
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
@@ -110,11 +89,9 @@ export default {
url: '/admin/giftSendRecord/list',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
tableLoaded = true;
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
tableLoaded = false;
}
})
$('#btnSearch').on('click', function () {
@@ -123,7 +100,6 @@ export default {
// $("#tipModal").modal('show');
// return;
// }
console.debug('ASDFASDF')
// if ($('#startTime').val() && $('#endTime').val()) {
// var dateStart = new Date($('#startTime').val().replace(/\-/g, "/"));
// var dateEnd = new Date($('#endTime').val().replace(/\-/g, "/"));
@@ -135,18 +111,24 @@ export default {
// return;
// }
// }
if (tableLoaded || currParams.pageNumber > 1) {
if (currParams.pageNumber > 1) {
TableHelper.doRefreshAndToPage1('#table');
} else {
TableHelper.doRefresh('#table');
}
})
var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayHighlight: true,
todayBtn: true,
language: "zh-cn",
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true
})
var picker2 = $('#endTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayHighlight: true,
todayBtn: true,
language: "zh-cn",
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true
})
picker1.on('changeDate', function () {