Files
yusheng-h5/unpackage/dist/build/web/assets/pages-union-detail.DEfob04U.js

2 lines
11 KiB
JavaScript
Raw Normal View History

2025-11-29 11:33:18 +08:00
import{c as t,g as s,h as e,B as a,C as i,n as o,b as l,D as n,E as d,G as u,r as p,f as r,i as c,w as g,j as h,k as f,o as m,l as _,u as A,p as D,m as w,v as b,x as k,q as y,t as C,F as x}from"./index-CjgLNey7.js";import{_ as T}from"./uni-icons.Cd3ohCN4.js";import{r as j}from"./uni-app.es.Lj9F4eZi.js";import{_ as v}from"./uni-popup-message.DH7nc4kh.js";import{_ as S}from"./uni-popup.BsE0nR7F.js";import{h as E}from"./headerHeight.CXXE7c94.js";import{n as U}from"./nav.BPYuvgkN.js";import{l as G}from"./logo.DDDG-929.js";import{_ as P}from"./_plugin-vue_export-helper.BCo6x5W8.js";const B=P({components:{headerHeight:E,navBar:U},data:()=>({detailData:null,baseBgUrl:t.PRIMARY_BGURL,logo:G,logout:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAwBJREFUaEPtmD1oFFEQx2f2rkhhITkLC8EFS4Xbfe9AQcUrAh5oIYhgoaWYwsJCQbFRsIigiNgoaCcEMaCgjaBwdlq8fV48MWUEwRMNHFcZWN6YF+5kOZLcvg89g7vdsm9m/r+Z2bfzFmGTX7jJ9UMBMO4KFhUoKuCYgaKFHBPobP5/ViCO40NBEJwDgAMAsN0wjR0AOCaEeGdot+ZyowrU6/Vyr9e7jYhavPVFRI+SJDlt7SBjaATAGLvrKl7HJqLpJEnu/1UAzvleAHibCapb4SYRtYnop4GYrpSyZbB+w6W5K8AYm0XEk31vHaXUPinlZ19CbP3kBuCcfx28sEqpS1LKG7ZBfdqZANAgsFJqSkr52kVIrVbbr5SKEPGxEOKHrS9bgLqU8o1t0Gq1urtcLr8HgDIALCwvL9fb7fY3G39jAeCcHwGAFxnB1hBjAdCZZ4w9R8SGK8S4ACAMw4nJycmnrhBjA9CZ9wExVgAfEM4AOouVSmWWiCKbXUTbIOLEGkPhAgAcHLXFOgMwxs4i4j1b8SPsLgghbm20xhlAf5CIqNnf071yEFEjSZKXfxRAO4/juBoEgXULEdEUIp4aEnpeCHFnVEacKzAqwKjnjLHDiPgMAPR7MLhyiV99f0YFGDznnH8HgG36Pk3TPa1W62Ne2/XWuYo3AtDHSEScJqJXUsqH/4J4IwBXwVn7KIrCUqn0ybZtsr5yt5BPgDiOjwdBMGfT88M6jAD0RysMw7TZbKYuQP0R4gki1ojoqsv5ODdAfwTWWesqpRo+z7UuycgN0B9/j/aDzQkhTrgE9mVrAnAFEa9nAs8sLS1dW1xcNPkj4Uv3bz+5AaIo2loqlT4AwI6BNRF19ZEQEXNDrPwT6qRpenF+fv6LD5rcADrYShtxAGgi4hbH4A+EEGccfayaGwFogziOd+rpc+gkZaRFKTUjpbxsZLTOYmOAzGixSw9hNj93kyTRX3KnrXigwxrAR/Z8+CgAfGTRxUdRAZfs+bAtKuAjiy4+Nn0FfgEEw21ApaGh4QAAAABJRU5ErkJggg==",buttonStatus:null,buttonText:"申请加入公会",popupStstus:null,messageText:"",messageContent:"",msgType:"success",ThemeData:null}),onLoad(t){const{id:e}=t;e&&(this.getDetail(e),this.getUserInfo()),s("Theme_Data")&&(this.ThemeData=JSON.parse(s("Theme_Data")))},onShow(){this.getUserInfo()},methods:{async getUserInfo(){e.get("/api/User/get_user_info",{token:s("token")||""}).then((t=>{const{data:s,code:e}=t;this.isAuth=e?s.auth:0}))},async getDetail(t){a({mask:!0,title:"加载中"}),e.get("/api/Guild/guild_detail",{id:t,token:s("token")||""}).then((t=>{i();const{data:s,code:e}=t;this.detailData=e?s:null,s&&(this.buttonText=s.is_leader?"解散公会":s.is_join?"退出公会":"申请加入公会",this.buttonStatus=s.is_leader?2:s.is_join?0:1)}))},viewDetails(t){if(t)if(1===t)o({url:`/pages/union/unionMembers?id=${this.detailData.id||null}&leader=${this.detailData.is_leader||0}`});else if(2===t)o({url:`/pages/union/subsidy?id=${this.detailData.id||null}&leader=${this.detailData.is_leader||0}`});else{const t=l().platform,s={group_id:this.detailData.group_id,cover:this.detailData.cover,guild_name:this.detailData.guild_name};"ios"===t?window.webkit.messageHandlers.nativeHandler.postMessage({action:"enterGroupChat",data:s}):"android"===t&&window.Android.enterGroupChat(this.detailData.group_id,this.detailData.cover,this.detailData.guild_name)}else o({url:`/pages/union/roomAndflow?id=${this.detailData.id||null}&leader=${this.detailData.is_leader||0}`})},applyToJoin(){1===this.buttonStatus&&(this.isAuth?(this.popupStstus=1,this.messageContent="是否选择加入当前公会",this.$refs.popup.open("center")):(this.popupStstus=3,this.messageContent="当前尚未实名认证,是否跳转到实名认证页面?",this.$refs.popup.open("center")))},async joinUnionize(){e.post("/api/Guild/join_guild",{guild_id:this.detailData.id,token:s("token")||""}).then((t=>{const{data:s,code:e,msg:a}=t;e?(this.messageText="加入成功",this.$refs.message.open(),this.msgType="success",this.getDetail(this.detailData.id)):(this.messageText=a,this.msgType="error",this.$refs.message.open()),this.closePopup()}))},exit(){n({itemList:["申请退出","付费退出"],success:t=>{0===t.tapIndex?this.applyToWithdraw():1===t.tapIndex&&this.paidWithdr