123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view class="invitation-list">
- <view class="header-bg"></view>
- <view class="header">
- <view class="title">
- 粉丝
- </view>
- </view>
- <view class="list">
- <template v-for="item in subordinates">
- <view class="list-item">
- <view class="l">
- <image class="image" src="/static/img/logo.08771339.png" mode="scaleToFill"></image>
- </view>
- <view class="c">
- <view class="nickname">
- 昵称:{{item.nickname}}
- </view>
- <view>
- <text v-show="item.group_id===3" class="wddz">网店店主</text>
- <text v-show="item.group_id===2" class="zgcj">直供厂家</text>
- </view>
-
- <view class="phone" style="height: 10upx;">
-
- </view>
- <view class="time">加入时间:2021-02-20 20:10:11</view>
- </view>
- </view>
- </template>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- subordinates: [],
- page: 1,
- pageLoading: false
- }
- },
- onLoad() {
- this.getSubordinates();
- },
- onPageScroll(e) {
- const query = uni.createSelectorQuery();
- query.select("#order").boundingClientRect(data => {
- if (e.scrollTop > data.height - uni.getSystemInfoSync().windowHeight * 2 &&
- (this.page - 1) * 10 < this.subordinates.length) {
- this.getSubordinates();
- }
- }).exec();
- },
- methods: {
- getSubordinates() {
- if (!this.pageLoading) {
- console.log("加载下一页");
- this.pageLoading = true;
- this.$http.get({
- url: "/user/subordinates",
- data: {
- limit: 10,
- page: this.page
- },
- success: (res) => {
- this.subordinates = [...this.subordinates, ...res.data.data.rows]
- this.page++;
- this.pageLoading = false;
- }
- })
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .invitation-list {
- position: relative;
- overflow: hidden;
- }
- .header-bg {
- background: $primary-color;
- height: 100upx;
- position: absolute;
- top: 0;
- width: 100%;
- z-index: 1;
- }
- .header {
- margin: 20upx;
- background: white;
- text-align: center;
- border-radius: 20upx;
- position: relative;
- z-index: 2;
- .title {
- height: 100upx;
- font-size: 32upx;
- line-height: 100upx;
- // font-weight: bold;
- }
- }
- .list {
- .list-item {
- padding: 20upx;
- margin: 20upx;
- background: white;
- display: flex;
- // font-family: "Roboto";
- border-radius: 10upx;
- .l {
- height: 100upx;
- .image {
- background: #E0E0E0;
- width: 100upx;
- height: 100upx;
- border-radius: 50upx;
- }
- }
- .c {
- margin-left: 20upx;
- .nickname,
- .phone {
- font-size: 24upx;
- color: #666666;
- }
- .time {
- font-size: 24upx;
- color: #999999;
- }
- }
- .r {
- margin-left: auto;
- font-size: 36upx;
- }
- }
- }
- .wddz,
- .zgcj {
- font-size: 24upx;
- color: rgb(255, 93, 91);
- border: 2upx solid rgb(255, 93, 91);
- border-radius: 20upx;
- width: 140upx;
- height: 36upx;
- line-height: 36upx;
- text-align: center;
- // text-indent: 20upx;
- display: inline-block;
- padding: 0;
- background: url(../../static/images/do.png) no-repeat;
- background-size: 21upx 21upx;
- background-position: 10upx;
- }
-
- </style>
|