123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <template>
- <app-layout>
- <view class="container">
- <template v-for="(item,index) in lists">
- <view class="cell-box main-left" :key="index">
- <view class="head-img">
- <u-image
- width="140"
- height="140"
- :src="item.child.head_img"
- shape="circle"></u-image>
- </view>
- <view class="nickname main-left cross-center">
- <text>{{item.child.nickname}}</text>
- <u-image
- width="35"
- height="35"
- src="@/static/images/vip.png"
- v-if="item.child.is_vip"
- ></u-image>
- </view>
- <view class="price main-center cross-center">
- 推荐奖励:<text>{{item.income}}</text>元
- </view>
- </view>
- <u-line></u-line>
- </template>
- </view>
- </app-layout>
- </template>
- <script>
- import appLayout from "@/components/app-layout"
- export default {
- components:{
- appLayout,
- },
- data() {
- return {
- lists: [],
- currentPage: 1,
- totalPage: 0
- }
- },
- methods: {
- getList(page){
- this.$u.api.userIncome(page).then(res => {
- this.currentPage = res.current_page
- this.totalPage = res.last_page
- this.lists = this.lists.concat(res.data);
- })
- }
- },
- onLoad(){
- this.getList();
- },
- onReachBottom(){
- if(this.currentPage < this.totalPage){
- this.getList(this.currentPage+1)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .cell-box{
- padding: 30rpx 0;
- .head-img{}
- .nickname{
- flex: 1;
- padding: 0 30rpx;
- color: #333333;
- font-size: 32rpx;
- font-weight: 500;
- text{
- margin-right: 12rpx;
- }
- }
- .price{
- color: #666666;
- font-size: 28rpx;
- }
- }
- </style>
|