Files
midi-h5/pages/union/subsidy.vue
yziiy f66cc10bf2
2025-08-14 11:26:34 +08:00

122 lines
2.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
<headerHeight />
<navBar :navTitle="`公会补贴`">
<template #rightView>
<view class="icon-right flex-line" @click="exit"
v-if="detailData && leaderStatus" >
<view @click="historyRecord" class="font-24 minUnicon" style="white-space: nowrap">
历史记录
</view>
</view>
</template>
</navBar>
<view class="content-view" v-if="detailData">
<view class="bottom" v-for="(data,index) in detailData" :key="index">
<view class="flex-line flex-spaceB w-fill">
<view class="color-3 font-w500 font-32">
{{data.name}}
</view>
<view class="font-28" :style="{'color' : data.status_str === '已发放' ? '#999' : '#DEB52E'}">
{{data.status_str}}
</view>
</view>
<view class="line">
</view>
<view class="flex-line flex-spaceB w-fill">
<view class="cumulative font-28 font-w400">
累计流水{{data.total_transaction}}
</view>
<view class="subsidy font-28">
获得补贴{{data.subsidy_amount}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import headerHeight from '@/component/headerHeight.vue';
import navBar from '@/component/nav.vue';
import http from '@/until/http.js';
import logo from '@/static/image/logo.png'
export default {
components: {
headerHeight,
navBar
},
data() {
return {
logo,
detailData: null,
searchParams: {
guild_id: 0,
token: uni.getStorageSync('token') ?? '',
},
ThemeData:null
}
},
onLoad(options) {
const {
id,
leader
} = options
this.leaderStatus = +leader
this.searchParams.guild_id = id
if (id) this.getSubsidy()
if(uni.getStorageSync('Theme_Data')) {
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
}
},
methods: {
//
async getSubsidy() {
const {
code,
data
} = await http.get('/api/Guild/guild_subsidy', this.searchParams)
this.detailData = code ? data.list : null
},
historyRecord(){
uni.navigateTo({
url: `/pages/union/historyRecord?id=${this.searchParams.guild_id}`
});
},
}
}
</script>
<style scoped lang="scss">
.view-page {
min-height: 100vh;
font-family: Source Han Sans CN, Source Han Sans CN;
// background-image: url('@/static/image/help/bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
.minUnicon{
color: var(--primary-color);
}
.content-view{
padding: 0 24rpx;
}
.bottom{
margin-top: 40rpx;
}
.cumulative {
color: var(--primary-color);
}
.line {
background-color: #ECECEC;
height: 1rpx;
margin: 24rpx 0;
}
.subsidy {
color: var(--warn-color);
}
}
</style>