绿满眶商城微信小程序-uniapp
zhanghua
2025-06-11 1eefd113e28e802348a9cae69a41945c1dc48b0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<template>
    <view >
        <!-- 内容区域 -->
        <scroll-view scroll-y  style="height: 100vh;"   @scrolltolower="loadMore" class="user-list"
             :lower-threshold="100"
            >
            <view >
            <view class="user-item" v-for="(user, index) in userList" :key="user.id" >
            
                <view class="user-info">
                    <text class="realName">{{ user.realName }}</text>
                    <text class="mobile">{{ user.mobile }}</text>
                </view>
                <!-- 操作按钮区域 -->
                <view class="action-buttons">
                    <u-button type="primary" size="mini" @click.stop="restPassword(user.memberId)" class="edit-btn">重置密码</u-button>
                    <u-button type="primary" size="mini" @click.stop="navigateToDetail(user.id)" class="edit-btn">修改</u-button>
                    <u-button type="error" size="mini" @click.stop="deleteUser(user.id)"
                        class="delete-btn">删除</u-button>
                </view>
            
            </view>
            </view>
 
             <!-- 改进的加载更多提示 -->
                  <view >
                    <u-loadmore  class="load-more"
                      v-if="mockData.length > 0"
                      :status="loading ? 'loading' : noMore ? 'nomore' : 'loadmore'"
                      :load-text="{
                        loadmore: '上拉加载更多',
                        loading: '正在加载',
                        nomore: '没有更多了'
                      }"
                    />
                  </view>
                  <view style="height:150rpx">
                      
                  </view>
        </scroll-view>
    
        
    
    </view>
</template>
 
<script>
    import UIcon from '@/uview-components/uview-ui/components/u-icon/u-icon.vue';
    import UButton from '@/uview-components/uview-ui/components/u-button/u-button.vue';
    import UForm from '@/uview-components/uview-ui/components/u-form/u-form.vue';
    import UFormItem from '@/uview-components/uview-ui/components/u-form-item/u-form-item.vue';
    import UInput from '@/uview-components/uview-ui/components/u-input/u-input.vue';
    import USearch from '@/uview-components/uview-ui/components/u-search/u-search.vue';
    import UPopup from '@/uview-components/uview-ui/components/u-popup/u-popup.vue';
    import ULoading from '@/uview-components/uview-ui/components/u-loading/u-loading.vue'
    export default {
        components: {
            UIcon,
            UButton,
            UForm,
            UFormItem,
            UInput,
            USearch,
            UPopup,
            ULoading
        },
        data() {
            return {
                
            }
        },
        methods: {
            
        }
    }
</script>
 
<style>
.load-more {
            padding: 20rpx 0;
            text-align: center;
            color: #999;
            font-size: 26rpx;
            background-color: #f7f8fa;
        }
</style>