hailu
2024-12-02 0bbcee731e5259feadd261e8a84c3e27b8387e01
pages/checkPolicies/project.vue
@@ -1,7 +1,8 @@
<template>
    <view class="container">
        <header>
            <u-input class="search" placeholder="搜索" type="text" v-model="search" /> <u-button type="primary" style="width: 100upx;margin-top: 20upx;" size="normal" text="搜索" @click="onPageChange(1)"></u-button>
            <u-input class="search" placeholder="搜索" type="text" v-model="search" /> <u-button type="primary"
                style="width: 100upx;margin-top: 20upx;" size="normal" text="搜索" @click="onPageChange(1)"></u-button>
        </header>
        <view
            style="padding: 40upx;background-color: #fff;margin-top: 20upx;display: flex;justify-content: space-between;">
@@ -17,7 +18,8 @@
            </u-tabs>
        </view>
        <view style="padding: 40upx;background-color: #fff;margin-top: 20upx;padding-bottom:200upx;color: #969799;font-size: 28upx;" >
        <view v-if="!loading &&  goodsList.length > 0"
            style="padding: 40upx;background-color: #fff;margin-top: 20upx;padding-bottom:200upx;color: #969799;font-size: 28upx;">
            <view class="goods-item" v-for="(item, index) in goodsList" :key="index" @click="godetail(item)">
                <view style="background-color: #f7f7f7;padding: 10upx;margin-bottom: 10upx;">
                    <view style="display: flex;justify-content: space-between;">
@@ -32,14 +34,15 @@
                </view>
            </view>
        </view>
        <view style="position: fixed;bottom: 0;background-color: #fff;width: 100%;">
            <Pagination :totalItems="total" :itemsPerPage="pageSize" :currentPage="pageIndex"
            @page-change="onPageChange" />
        <view v-if="loading" style="margin-top: 100upx;">
            <u-loading-icon></u-loading-icon>
        </view>
        <u-empty v-if="!loading && goodsList.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/car.png">
      </u-empty>
        <view style="position: fixed;bottom: 0;background-color: #fff;width: 100%;">
            <Pagination :totalItems="total" :itemsPerPage="pageSize" :currentPage="pageIndex"
                @page-change="onPageChange" />
        </view>
    </view>
</template>
@@ -52,6 +55,7 @@
    data() {
        return {
            loading: false,
            search: '',
            titleNViewBackground: '',
            swiperCurrent: 0,
@@ -76,7 +80,7 @@
            ],
            ArticleType: 0,
            pageIndex: 1,
            pageSize: 10,
            pageSize: 8,
            total: 0,
        };
    },
@@ -89,9 +93,11 @@
        chooseArticleType(e) {
            console.log('item', e);
            this.ArticleType = e.ArticleType
            this.getArticleDataList()
            this.onPageChange(1)
        },
        getArticleDataList() {
            this.loading = true
            let data = {
                Keyword: this.search,
                PageNumber: this.pageIndex,
@@ -102,7 +108,13 @@
                if (res.Check) {
                    this.goodsList = res.Data.Data
                    this.total = res.Data.TotalCount
                    this.loading = false
                } else {
                    this.$msg(res.Msg)
                    this.goodsList = []
                    this.loading = false
                }
            })
        },
        gooriginalText() {
@@ -126,7 +138,7 @@
                return '申报截止'
            }
        },
        onPageChange(e){
        onPageChange(e) {
            this.pageIndex = e
            this.getArticleDataList()
        },