From ab336bdfc9c8093dfbf25561e84a646c26b1289d Mon Sep 17 00:00:00 2001 From: yziiy <15979918+mayday-yziiy@user.noreply.gitee.com> Date: Wed, 22 Oct 2025 10:04:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/union.ts | 7 +++ src/views/Statistical/giftRecord/hook.tsx | 52 ++++++++++++++-------- src/views/Statistical/giftRecord/index.vue | 7 ++- src/views/union/unionList/hook.tsx | 21 ++++++++- src/views/union/unionList/index.vue | 9 +++- 5 files changed, 72 insertions(+), 24 deletions(-) diff --git a/src/api/modules/union.ts b/src/api/modules/union.ts index ac6f2a5..c875e1b 100644 --- a/src/api/modules/union.ts +++ b/src/api/modules/union.ts @@ -3,6 +3,7 @@ import { http } from "@/utils/http"; type Result = { code: string; data: any; + msg: string; }; // 工会列表 export const queryUnionList = params => { @@ -105,4 +106,10 @@ export const grantSubsidyBybatch = data => { return http.request("post", "/adminapi/Guild/subsidy_give_batch", { data }); +}; +// 隐藏或者展示工会 +export const changeStatus = data => { + return http.request("post", "/adminapi/Guild/guild_show_status_edit", { + data + }); }; \ No newline at end of file diff --git a/src/views/Statistical/giftRecord/hook.tsx b/src/views/Statistical/giftRecord/hook.tsx index a4e349c..683399a 100644 --- a/src/views/Statistical/giftRecord/hook.tsx +++ b/src/views/Statistical/giftRecord/hook.tsx @@ -19,12 +19,7 @@ export function useData() { }); const statisticsList = ref([ { label: "礼物总数量", prop: "gift_num" }, - { label: "礼物总价", prop: "total_price" }, - { - label: "平台收益(30%)", prop: "app_earning" - }, - { label: "接收人收益(60%)", prop: "receive_earning" }, - { label: "房主收益(10%)", prop: "room_owner_earning" }, + { label: "礼物总价", prop: "total_price" } ]) const totalData = ref(null) @@ -83,18 +78,6 @@ export function useData() { label: "礼物总价(金币)", prop: "total_price" }, - { - label: "平台收益(30%)钻石", - prop: "app_earning" - }, - { - label: "接收人收益(60%)钻石", - prop: "gift_user_earning" - }, - { - label: "房主收益(10%)钻石", - prop: "room_owner_earning" - }, { label: "来源", prop: "type", @@ -117,6 +100,37 @@ export function useData() { }); if (code) { + const objLabel = [ + { + label: `平台收益(${data.total.app_earning_ratio}%)钻石`, + prop: "app_earning" + }, + { + label: `接收人收益(${data.total.receive_earning_ratio}%)钻石`, + prop: "gift_user_earning" + }, + { + label: `房主收益(${data.total.room_owner_earning_ratio}%)钻石`, + prop: "room_owner_earning" + } + ] + const objStatistics = [ + { + label: `平台收益(${data.total.app_earning_ratio}%)钻石`, + prop: "app_earning" + }, + { + label: `接收人收益(${data.total.receive_earning_ratio}%)钻石`, + prop: "receive_earning" + }, + { + label: `房主收益(${data.total.room_owner_earning_ratio}%)钻石`, + prop: "room_owner_earning" + } + ] + statisticsList.value = [...statisticsList.value, ...objStatistics] + tableLabel.value.splice(7, 0, ...objLabel) + console.log(tableLabel.value) tableList.value = data.lists.map(ele => { return { ...ele, @@ -125,6 +139,8 @@ export function useData() { gift_user_earning: parseFloat(ele.gift_user_earning), } }); + + totalData.value = data.total; pagination.value.total = data.count; pagination.value.currentPage = data.page; diff --git a/src/views/Statistical/giftRecord/index.vue b/src/views/Statistical/giftRecord/index.vue index afa956a..c484012 100644 --- a/src/views/Statistical/giftRecord/index.vue +++ b/src/views/Statistical/giftRecord/index.vue @@ -1,5 +1,5 @@