123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <view>
- <view class="goodsManageList">
- <view class="item" v-for="(item, index) in list" :key="index" >
- <view class="top">
- <view class="title omit">{{ item.shopName }}</view>
- <view class="state">
- <text style="color: lightskyblue;font-weight: bold;" @click="detail(item.id)">详情></text>
- </view>
- <view class="clear"></view>
- </view>
- <view class="con">
- <view style="float: left;margin-right: 10px;">铺主:{{item.ownerName}}</view>
- <view style="">编号:{{item.shopNo}}</view>
- <view class="tradeAreaName">{{ item.tradeAreaName }}</view>
- <view class="date">区域:{{ item.area }}</view>
- </view>
- <view class="clear"></view>
- </view>
- <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
- <u-empty v-if="!loadMore && list.length == 0"></u-empty>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list: [],
- loadMore: true,
- param: { pageNo: 1, pageSize: 10 },
- }
- },
- onLoad() {
- this.getData();
- },
- methods: {
- getData() {
- this.http.request({
- url: '/level-one-server/app/TbShop/getAppList',
- success: res=> {
- this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
- this.list.push(...res.data.data);
- }
- })
- },
- detail(id) {
- uni.navigateTo({ url: '/pages/shop/detail?id=' + id });
- },
- //刷新数据
- refresh() {
- this.loadMore = true;
- this.param.pageNo = 1;
- this.list = [];
- this.getData();
- }
- },
- //下拉刷新
- onPullDownRefresh() {
- setTimeout(() => {
- this.refresh();
- uni.stopPullDownRefresh();
- }, 1000);
- },
- //上拉加载
- onReachBottom() {
- if (this.loadMore) {
- this.param.pageNo++;
- this.getData();
- }
- }
- }
- </script>
- <style>
- </style>
|