Files
midi-h5/pages/union/subsidy.vue

122 lines
2.7 KiB
Vue
Raw Normal View History

2025-08-11 11:51:38 +08:00
<template>
2025-08-14 11:26:34 +08:00
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
2025-08-11 11:51:38 +08:00
<headerHeight />
<navBar :navTitle="`公会补贴`">
<template #rightView>
<view class="icon-right flex-line" @click="exit"
v-if="detailData && leaderStatus" >
2025-08-14 11:26:34 +08:00
<view @click="historyRecord" class="font-24 minUnicon" style="white-space: nowrap">
2025-08-11 11:51:38 +08:00
历史记录
</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>
2025-08-14 11:26:34 +08:00
<view class="font-28" :style="{'color' : data.status_str === '已发放' ? '#999' : '#DEB52E'}">
2025-08-11 11:51:38 +08:00
{{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') ?? '',
},
2025-08-13 10:51:01 +08:00
ThemeData:null
2025-08-11 11:51:38 +08:00
}
},
onLoad(options) {
const {
id,
leader
} = options
this.leaderStatus = +leader
this.searchParams.guild_id = id
if (id) this.getSubsidy()
2025-08-13 10:51:01 +08:00
if(uni.getStorageSync('Theme_Data')) {
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
}
2025-08-11 11:51:38 +08:00
},
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;
2025-08-13 10:51:01 +08:00
// background-image: url('@/static/image/help/bg.png');
2025-08-11 11:51:38 +08:00
background-repeat: no-repeat;
background-size: 100% 100%;
2025-08-14 11:26:34 +08:00
.minUnicon{
color: var(--primary-color);
}
2025-08-11 11:51:38 +08:00
.content-view{
padding: 0 24rpx;
}
.bottom{
margin-top: 40rpx;
}
.cumulative {
2025-08-14 11:26:34 +08:00
color: var(--primary-color);
2025-08-11 11:51:38 +08:00
}
.line {
background-color: #ECECEC;
height: 1rpx;
margin: 24rpx 0;
}
.subsidy {
2025-08-14 11:26:34 +08:00
color: var(--warn-color);
2025-08-11 11:51:38 +08:00
}
}
</style>