| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <template>
- <view class="content">
- <view class="user-item flex">
- <image src="" mode="" class="item-logo"></image>
- <view class="item-info flex">
- <view class="info-name">
- 李丹丹 13523025369
- </view>
- <view class="info-address">
- 椒江区东海大道400号
- </view>
- <view class="info-t">
- 空桶型号:小瓶330ML
- </view>
- <view class="info-info flex">
- <view class="">
- 押桶:<text>0</text>
- </view>
- <view class="">
- 押金:<text>0</text>元
- </view>
- <view class="">
- 借桶:<text>0</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getUserList
- } from "@/api/user.js"
- export default {
- data() {
- return {
- keyword: '', //搜索关键字
- searchData: {
- page: 1,
- limit: 10,
- list: [],
- loadingType: 'more',
- loaded:false,
- }
- };
- },
- onLoad(opt) {
- this.getlist()
- },
- onShow() {
- },
- // #ifndef MP
- //点击导航栏 buttons 时触发
- onNavigationBarButtonTap(e) {
- const index = e.index;
- if (index === 0) {
- this.reLoadSearch();
- }
- },
- // 点击键盘搜索事件
- onNavigationBarSearchInputConfirmed(e) {
- this.reLoadSearch();
- },
- // 搜索栏内容变化事件
- onNavigationBarSearchInputChanged(e) {
- this.keyword = e.text;
- },
- // #endif
- onReady(res) {
- var that = this;
- },
- onReachBottom() {
- this.getlist();
- },
- methods: {
- // 搜索
- reLoadSearch() {
- this.searchData={
- page: 1,
- limit: 10,
- list: [],
- loadingType: 'more',
- loaded:false
- };
- this.getlist()
- },
- // 载入数据
- getlist() {
- //这里是将订单挂载到tab列表下
- let navItem = this.searchData;
- if (navItem.loadingType === 'loading') {
- //防止重复加载
- return;
- }
- if (navItem.loadingType === 'noMore') {
- //防止重复加载
- return;
- }
- // 修改当前对象状态为加载中
- navItem.loadingType = 'loading';
- GetAdminOrderList({
- page: navItem.page,
- limit: navItem.limit,
- keyword: this.keyword
- })
- .then(({
- data
- }) => {
- let arr = data.map(e => {
- return e;
- });
- navItem.list = navItem.list.concat(arr);
- // console.log(navItem.orderList);
- navItem.page++;
- if (navItem.limit == data.length) {
- //判断是否还有数据, 有改为 more, 没有改为noMore
- navItem.loadingType = 'more';
- return;
- } else {
- //判断是否还有数据, 有改为 more, 没有改为noMore
- navItem.loadingType = 'noMore';
- }
- uni.hideLoading();
- navItem.loaded = true;
- })
- .catch(e => {
- console.log(e);
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .user-item {
- width: 750rpx;
- height: 277rpx;
- align-items: flex-start;
- padding: 42rpx 35rpx;
- background-color: #fff;
- margin-bottom: 15rpx;
- .item-logo {
- width: 115rpx;
- height: 115rpx;
- border-radius: 50%;
- background-color: #eee;
- flex-shrink: 0;
- margin-right: 24rpx;
- }
- .item-info {
- flex-grow: 1;
- height: 100%;
- flex-direction: column;
- align-items: flex-start;
- justify-content: space-between;
- .info-name {
- font-size: 34rpx;
- font-weight: bold;
- color: #333333;
- }
- .info-address {
- font-size: 28rpx;
- font-weight: 500;
- color: #333333;
- }
- .info-t {
- font-size: 26rpx;
- font-weight: 500;
- color: #333333;
- }
- .info-info {
- width: 100%;
- font-size: 30rpx;
- font-weight: bold;
- color: #333333;
- text {
- color: #FF4C4C;
- }
- }
- }
- }
- </style>
|