更新
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<view class="view-page"
|
||||
:style="{ backgroundImage: `url('${ThemeData?.app_bg ?? 'https://vespa.qxmier.com/image/bg.png'}')` }">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`历史记录`">
|
||||
</navBar>
|
||||
@@ -10,82 +11,86 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import http from '@/until/http.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import tableView from '@/component/newTable.vue'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar,
|
||||
tableView
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
guildId: null,
|
||||
dataList: [],
|
||||
pageConfig:{
|
||||
currentPage:1,
|
||||
pageSize:10
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import http from '@/until/http.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import tableView from '@/component/newTable.vue'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar,
|
||||
tableView
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
guildId: null,
|
||||
dataList: [],
|
||||
pageConfig: {
|
||||
currentPage: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
},
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getList()
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/guild_subsidy_list', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize,
|
||||
})
|
||||
if (code) {
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/guild_subsidy_list', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize,
|
||||
})
|
||||
if (code) {
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</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%;
|
||||
.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%;
|
||||
|
||||
.content {
|
||||
padding: 0 24rpx;
|
||||
width: calc(100vw - 48rpx);
|
||||
height: calc(100vh - 67px);
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
}
|
||||
.content {
|
||||
padding: 0 24rpx;
|
||||
width: calc(100vw - 48rpx);
|
||||
height: calc(100vh - 67px);
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user