Files
yusheng-h5/unpackage/dist/build/web/assets/pages-union-roomAndflow.g-7WnUim.js

2 lines
4.3 KiB
JavaScript
Raw Normal View History

2025-11-29 11:33:18 +08:00
import{g as a,h as e,b as t,r as o,f as s,i as l,w as i,j as r,k as n,o as d,l as m,m as f,v as c,p as g,q as u,t as h,F as p,u as _}from"./index-CjgLNey7.js";import{_ as w,a as D}from"./flowIcon.CkJkLSSQ.js";import{r as v}from"./uni-app.es.Lj9F4eZi.js";import{_ as S}from"./uni-load-more.CzXabmC7.js";import{h as P}from"./headerHeight.CXXE7c94.js";import{n as j}from"./nav.BPYuvgkN.js";import{l as k}from"./logo.DDDG-929.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.Cd3ohCN4.js";const y=x({components:{headerHeight:P,navBar:j},data:()=>({dateSearch:[new Date,new Date],currentDate:+new Date,logo:k,loading:!1,noMore:!1,detailData:null,pageConfig:{pageSize:20,currentPage:1,total:0},searchParams:{guild_id:0,start_time:new Date,end_time:new Date,token:a("token")||"",page:1,page_size:20},leaderStatus:null,flowDetail:null,flowList:[],ThemeData:null}),onLoad(e){const{id:t,leader:o}=e;this.leaderStatus=+o,this.searchParams.start_time=this.formatDate(new Date),this.searchParams.end_time=this.formatDate(new Date),this.searchParams.guild_id=t,t&&this.getFlow(),a("Theme_Data")&&(this.ThemeData=JSON.parse(a("Theme_Data")))},onReachBottom(){this.loading||this.noMore||this.getFlow()},methods:{formatDate(a){const e=new Date(a);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`},async getFlow(){const{code:a,data:t}=await e.get("/api/Guild/guild_flow",{...this.searchParams,page:this.pageConfig.currentPage,page_size:this.pageConfig.pageSize});if(a){this.flowDetail=t,this.pageConfig.total=t.count,this.loading=!1;const a=t.list||[];if(0===a.length)return void(this.noMore=!0);if(this.flowList=[...this.flowList,...a],this.pageConfig.currentPage++,this.flowList.length===this.pageConfig.total)return void(this.noMore=!0)}},jumpRoomPage(a){const e=t().platform;"ios"===e?window.webkit.messageHandlers.nativeHandler.postMessage({action:"jumpRoomPage",data:{room_id:a.room_id}}):"android"===e&&window.Android.jumpRoomPage(a.room_id)},changeDate(a){this.searchParams.start_time=a.length?a[0]:"",this.searchParams.end_time=a.length?a[1]:"",this.getFlow()}}},[["render",function(a,e,t,P,j,k){var x;const y=o("headerHeight"),C=o("navBar"),L=v(s("uni-datetime-picker"),w),M=n,R=v(s("uni-load-more"),S);return d(),l(M,{class:"view-page",style:r({backgroundImage:`url('${(null==(x=j.ThemeData)?void 0:x.app_bg)||a.$config.PRIMARY_BGURL}')`})},{default:i((()=>[m(y),m(C,{navTitle:""+(j.leaderStatus?"公会房间及流水":"公会房间")},{rightView:i((()=>[])),_:1},8,["navTitle"]),m(M,{class:"content_view"},{default:i((()=>[m(M,null,{default:i((()=>[m(L,{type:"range",style:{"background-color":"#f8f8f8"},"start-placeholder":"开始时间",end:j.currentDate,"end-placeholder":"结束时间",modelValue:j.dateSearch,"onUpdate:modelValue":e[0]||(e[0]=a=>j.dateSearch=a),rangeSeparator:"至",onChange:k.changeDate},null,8,["end","modelValue","onChange"])])),_:1}),j.flowDetail&&j.leaderStatus?(d(),l(M,{key:0,class:"header-view"},{default:i((()=>[m(M,{class:"flex-line flow-view w-fill flex-spaceB"},{default:i((()=>[m(M,{class:"flowTitle color-3"},{default:i((()=>[f(" 总流水 ")])),_:1})])),_:1}),m(M,{class:"flowNumber"},{default:i((()=>[f(c(j.flowDetail.total_transaction),1)])),_:1})])),_:1})):g("",!0),j.flowList&&j.flowList.length?(d(),l(M,{key:1,class:"room-list flex-line"},{default:i((()=>[(d(!0),u(p,null,h(j.flowList,(a=>(d(),l(M,{class:"room-line flex-line flex-spaceB",key:a.room_id,onClick:e=>k.jumpRoomPage(a)},{default:i((()=>[m(M,{class:"flex-line"},{default:i((()=>[m(M,{class:"head-portrait"},{default:i((()=>[_("img",{src:a.room_cover||j.logo,alt:""},null,8,["src"])])),_:2},1024),m(M,{class:"ml-20"},{default:i((()=>[m(M,{class:"color-3 font-32 font-w500"},{default:i((()=>[f(c(a.room_name),1)])),_:2},1024),m(M,{class:"color-6 font-24"},{default:i((()=>[f(" ID:"+c(a.room_number),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),j.leaderStatus?(d(),l(M,{key:0,class:"flex-line"},{default:i((()=>[m(M,{class:"flowIcon"},{default:i((()=>[_("img",{src:D,alt:""})])),_:1}),m(M,{class:"ml-20"},{d