幸运币更改

This commit is contained in:
yziiy
2026-01-28 09:55:00 +08:00
parent aa1185ff4c
commit 275d4d46e1
4 changed files with 61 additions and 51 deletions

View File

@@ -1,6 +1,5 @@
import { http } from "@/utils/http";
type Result = {
code: string;
data: any;
@@ -8,11 +7,9 @@ type Result = {
};
// 礼物记录列表
export const queryGiftGiveList = params => {
return http.request<Result>(
"get",
"/adminapi/GiveGift/give_gift_lists",
{ params }
);
return http.request<Result>("get", "/adminapi/GiveGift/give_gift_lists", {
params
});
};
// 充值统计排行
export const queryRechargeRankList = params => {
@@ -24,11 +21,9 @@ export const queryRechargeRankList = params => {
};
// 送礼、收礼排行
export const queryGiftRankList = params => {
return http.request<Result>(
"get",
"/adminapi/Statistical/get_gift_ranking",
{ params }
);
return http.request<Result>("get", "/adminapi/Statistical/get_gift_ranking", {
params
});
};
// 消费
export const queryConsumerRankList = params => {
@@ -48,11 +43,9 @@ export const queryRoomFlowRankList = params => {
};
// 任务领取记录
export const taskRankList = params => {
return http.request<Result>(
"get",
"/adminapi/Statistical/task_statistics",
{ params }
);
return http.request<Result>("get", "/adminapi/Statistical/task_statistics", {
params
});
};
export const taskRewardPriceData = params => {
return http.request<Result>(
@@ -63,16 +56,13 @@ export const taskRewardPriceData = params => {
};
// 中奖记录统计
export const getLuckyRank = params => {
return http.request<Result>(
"get",
"/adminapi/Lottery/record_list",
{ params }
);
return http.request<Result>("get", "/adminapi/Lottery/record_list", {
params
});
};
// 实时状态查询(幸运币)
export const realTimeByluckyList = () => {
return http.request<Result>(
"get",
"/adminapi/Lottery/realtime_statistics"
);
export const realTimeByluckyList = params => {
return http.request<Result>("get", "/adminapi/Lottery/realtime_statistics", {
params
});
};

View File

@@ -1,31 +1,36 @@
<script setup lang="ts">
import { onBeforeMount, ref } from "vue";
import {
realTimeByluckyList
} from "@/api/modules/statistics";
import { realTimeByluckyList } from "@/api/modules/statistics";
const props = defineProps(["type"]);
onBeforeMount(() => {
getInfo()
getInfo();
});
const labelData = ref([{ title: '循环奖池进度', props: 'pool_progress' }, { title: '蓄水池当前金额', props: 'pool_amount_now' }, { title: '最近中奖', props: 'last_winner_user' }, { title: '平台累计收入', props: 'platform_total_income' }])
const labelData = ref([
{ title: "循环奖池进度", props: "pool_progress" },
{ title: "蓄水池当前金额", props: "pool_amount_now" },
{ title: "最近中奖", props: "last_winner_user" },
{ title: "平台累计收入", props: "platform_total_income" }
]);
console.log(props);
const detailData = ref({
last_winner_user: '',
last_winner_user: "",
platform_total_income: "",
pool_amount_now: "",
pool_progress: ""
})
});
const getInfo = async () => {
const { code, data } = await realTimeByluckyList()
console.log(code, data)
if (code) detailData.value = data
}
const { code, data } = await realTimeByluckyList({ pool_type: props.type });
console.log(code, data);
if (code) detailData.value = data;
};
</script>
<template>
<div>
<el-row :gutter="20">
<el-col :span="12" style="margin: 30px 0;" v-for="ele in labelData">
<el-col v-for="(ele, index) in labelData" :key="index" :span="12" style="margin: 30px 0">
<div class="box">
<div class="title">{{ ele.title }}</div>
<div class="value"> {{ detailData[ele.props] }}</div>
<div class="value">{{ detailData[ele.props] }}</div>
</div>
</el-col>
</el-row>
@@ -46,4 +51,4 @@ const getInfo = async () => {
font-size: 16px;
}
}
</style>
</style>

View File

@@ -31,11 +31,24 @@ export function useData() {
const searchForm = ref({
stime: defaultTime.stime,
etime: defaultTime.etime
etime: defaultTime.etime,
pool_type: 1,
user_code: ""
});
const searchLabel = ref([
{ label: "开始时间", prop: "stime", type: "date" },
{ label: "结束时间", prop: "etime", type: "date" }
{ label: "结束时间", prop: "etime", type: "date" },
{ label: "用户ID", prop: "user_code", type: "input" },
{
label: "中奖类型",
prop: "pool_type",
type: "select",
optionList: [
{ label: "初级", value: 1 },
{ label: "中级", value: 3 },
{ label: "高级", value: 4 }
]
}
]);
const tableLabel = ref([
{
@@ -169,9 +182,12 @@ export function useData() {
});
};
// 实时状态查询
const openDiglog = () => {
const openDiglog = type => {
addDialog({
title: `实时状态查询`,
props: {
type: type
},
fullscreen: false,
hideFooter: true,
closeOnClickModal: false,

View File

@@ -33,10 +33,10 @@ defineOptions({
<PureTableBar v-if="!loading" title="幸运币中奖统计列表" :class="[isShow && !deviceDetection() ? '!w-[60vw]' : 'w-full']"
:columns="tableLabel" @refresh="onSearch">
<template #buttons>
<el-button type="text" @click="openDiglog">实时状态查询</el-button>
<el-button type="primary" @click="exportExcel">
导出
</el-button>
<el-button type="text" @click="openDiglog(1)">初级状态查询</el-button>
<el-button type="text" @click="openDiglog(3)">中级状态查询</el-button>
<el-button type="text" @click="openDiglog(4)">高级状态查询</el-button>
<el-button type="primary" @click="exportExcel"> 导出 </el-button>
</template>
<template v-slot="{ size, dynamicColumns }">
<pure-table ref="tableRef" align-whole="center" showOverflowTooltip table-layout="auto" default-expand-all
@@ -44,8 +44,7 @@ defineOptions({
:data="tableList" :columns="dynamicColumns" :pagination="{ ...pagination, size }" :header-cell-style="{
background: 'var(--el-fill-color-light)',
color: 'var(--el-text-color-primary)'
}" @page-current-change="handleCurrentChange" @page-size-change="handleSizeChange">
</pure-table>
}" @page-current-change="handleCurrentChange" @page-size-change="handleSizeChange" />
</template>
</PureTableBar>
</div>
@@ -59,6 +58,6 @@ defineOptions({
padding: 20px;
text-align: center;
align-items: center;
justify-content: space-between
justify-content: space-between;
}
</style>
</style>