| | |
| | | const params = Qs.stringify(data); |
| | | const data2 = {}; |
| | | params.split('&').forEach(param => { |
| | | const item = param.split('='); |
| | | data2[decodeURIComponent(item[0])] = decodeURIComponent(item[1]); |
| | | if (param) { |
| | | const item = param.split('='); |
| | | data2[decodeURIComponent(item[0])] = decodeURIComponent(item[1]); |
| | | } |
| | | }); |
| | | return this.query('post', url, data2, remap, options); |
| | | } |
| | |
| | | <slot /> |
| | | <view class="c-infinite-bottom"> |
| | | <view |
| | | class="loading" |
| | | class="c-infinite-loading" |
| | | v-if="loading" |
| | | >加载中,请稍后...</view> |
| | | <view v-if="ending"> |
| | | <text |
| | | class="ended" |
| | | class="c-infinite-ended" |
| | | v-if="pageTotal > 0" |
| | | >-- 没有更多了 --</text> |
| | | <text |
| | | class="empty" |
| | | class="c-infinite-empty" |
| | | v-else |
| | | >暂无数据...</text> |
| | | </view> |
| | |
| | | .c-infinite-scroll { |
| | | .c-infinite-bottom { |
| | | text-align: center; |
| | | .loading { |
| | | .c-infinite-loading { |
| | | height: 2rem; |
| | | color: #666; |
| | | line-height: 1.8rem; |
| | | } |
| | | .ended { |
| | | .c-infinite-ended { |
| | | height: 2rem; |
| | | color: #999; |
| | | line-height: 1.8rem; |
| | | } |
| | | .empty { |
| | | .c-infinite-empty { |
| | | line-height: 5rem; |
| | | color: #999; |
| | | } |