| | |
| | | <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;"> |
| | |
| | | </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;"> |
| | |
| | | </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> |
| | | |
| | |
| | | |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | search: '', |
| | | titleNViewBackground: '', |
| | | swiperCurrent: 0, |
| | |
| | | ], |
| | | ArticleType: 0, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | pageSize: 8, |
| | | total: 0, |
| | | }; |
| | | }, |
| | |
| | | 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, |
| | |
| | | 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() { |
| | |
| | | return '申报截止' |
| | | } |
| | | }, |
| | | onPageChange(e){ |
| | | onPageChange(e) { |
| | | this.pageIndex = e |
| | | this.getArticleDataList() |
| | | }, |